12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123 |
- <template>
- <div class="windDetail" :class="$store.state.isLeft ? 'windDetailWidth' : ''">
- <div class="action-bar">
- <div class="selections">
- <div
- class="selections_btn"
- @click="tabSelect(0)"
- :class="{ active: tabIndex == 0 }"
- >
- 风机运行情况信息
- </div>
- <div
- class="selections_btn"
- @click="tabSelect(1)"
- :class="{ active: tabIndex == 1 }"
- >
- 风机日详细信息
- </div>
- <div
- class="selections_btn"
- @click="tabSelect(2)"
- :class="{ active: tabIndex == 2 }"
- >
- 测风塔玫瑰图
- </div>
- <div
- class="selections_btn"
- @click="tabSelect(3)"
- :class="{ active: tabIndex == 3 }"
- >
- 风机玫瑰图
- </div>
- <div
- class="selections_btn"
- @click="tabSelect(4)"
- :class="{ active: tabIndex == 4 }"
- >
- 风机切入切出分析
- </div>
- </div>
- <div class="windDetailseach">
- <div class="query-items">
- <div class="query-item">
- <div class="label">{{ tabIndex != 2 ? "风场:" : "测风塔:" }}</div>
- <el-select
- v-model="wpId"
- clearable
- placeholder="请选择"
- @change="changeStationsVal"
- >
- <el-option
- v-for="item in tabIndex != 2 ? wpArray : cftlist"
- :key="item.id"
- :value="item.id"
- :label="item.name"
- />
- </el-select>
- </div>
- <div class="query-item" v-if="tabIndex != 2">
- <div class="label">风机:</div>
- <el-select
- v-model="wtId"
- clearable
- placeholder="请选择"
- popper-class="select"
- >
- <el-option
- v-for="item in wtArray"
- :key="item.id"
- :value="item.id"
- :label="item.name"
- />
- </el-select>
- </div>
- <!-- <div class="query-item">
- <div class="label">风场:</div>
- <el-select
- v-model="wpId"
- clearable
- placeholder="请选择"
- @change="changeStationsVal"
- >
- <el-option
- v-for="item in wpArray"
- :key="item.id"
- :value="item.id"
- :label="item.name"
- />
- </el-select>
- </div>
- <div class="query-item">
- <div class="label">风机:</div>
- <el-select
- v-model="wtId"
- clearable
- placeholder="请选择"
- popper-class="select"
- >
- <el-option
- v-for="item in wtArray"
- :key="item.id"
- :value="item.id"
- :label="item.aname"
- />
- </el-select>
- </div> -->
- <div class="query-item">
- <div class="label">日期:</div>
- <el-date-picker
- v-model="recorddate"
- type="date"
- value-format="YYYY-MM-DD"
- placeholder="选择日期"
- size="mini"
- popper-class="date-select"
- >
- </el-date-picker>
- </div>
- </div>
- <div class="query-actions">
- <el-button class="buttons" size="mini" round @click="search"
- >搜索</el-button
- >
- </div>
- </div>
- </div>
- <!-- tab1 -->
- <div v-if="tabIndex == 0" class="TabOne tabs">
- <panel :title="'功率分析'" class="TabOne_topChart">
- <area-line-chart
- :height="'100%'"
- :lineData="lostChartData"
- :units="lostChartUnit"
- :areaData="LostChartBgColorData"
- @areaClick="areaBarChartClick"
- :showLegend="true"
- />
- </panel>
- <panel :title="'损失电量分析'" class="TabOne_centerChart">
- <multiple-bar-line-chart
- :height="'100%'"
- :barData="powerChartData"
- :lineData="powerChartLineData"
- :units="['(kWh)', '(m/s)']"
- :showLegend="true"
- />
- </panel>
- <div class="table-info">
- <panel class="table-panel" :title="'当日报警记录'" :showLine="false">
- <el-table
- :data="warnTableData.data"
- height="calc(100% - 33px)"
- stripe
- size="mini"
- >
- <el-table-column
- v-for="(item, index) in warnTableData.column"
- :key="index"
- align="center"
- :label="item.name"
- :prop="item.field"
- />
- </el-table>
- <el-pagination
- v-if="warnPage.total > 0"
- hide-on-single-page
- style="text-align: center"
- @current-change="
- (val) => {
- warnPage.pageNum = val;
- getWarnTableData();
- }
- "
- :current-page="warnPage.pageNum"
- :page-size="warnPage.pageSize"
- layout="total, prev, pager, next, jumper"
- :total="warnPage.total"
- ></el-pagination>
- </panel>
- <panel class="table-panel" :title="'当日故障记录'" :showLine="false">
- <Table :data="stopTableData" :canScroll="true" :height="'100%'" />
- </panel>
- <panel class="table-panel" :title="'当日限电记录'" :showLine="false">
- <Table :data="xdTableData" :canScroll="true" :height="'100%'" />
- </panel>
- </div>
- </div>
- <!-- tab2 -->
- <div v-if="tabIndex == 1" class="tab-2 tabs">
- <el-row style="height: 100%">
- <el-col style="height: 100%; padding-right: 10px" :span="15">
- <panel :title="'功率曲线'" style="height: 270px; margin-bottom: 10px">
- <marker-line-chart
- :height="'100%'"
- :list="powerLineChartData"
- :units="['(MW)', '(功率)']"
- :showLegend="true"
- />
- </panel>
- <panel
- :title="'日发电量信息'"
- style="height: 297px; margin-bottom: 10px"
- :showLine="false"
- >
- <div class="power-info">
- <div class="info-item">
- <div class="text">发电量:</div>
- <div class="value green">{{ dayPowerInfo.rfdl }}</div>
- </div>
- <div class="info-item">
- <div class="text">理论发电量:</div>
- <div class="value green">{{ dayPowerInfo.ryfdl }}</div>
- </div>
- <div class="info-item">
- <div class="text">平均功率:</div>
- <div class="value green">{{ dayPowerInfo.rpjgl }}</div>
- </div>
- <div class="info-item">
- <div class="text">平均风速:</div>
- <div class="value green">{{ dayPowerInfo.rpjfs }}</div>
- </div>
- <div class="info-item">
- <div class="text">拟合优度:</div>
- <div class="value green">{{ dayPowerInfo.rnhyd }}</div>
- </div>
- <div class="info-item">
- <div class="text">运行小时:</div>
- <div class="value green">{{ dayPowerInfo.ryxxs }}</div>
- </div>
- <div class="info-item">
- <div class="text">停机小时:</div>
- <div class="value green">
- {{ Number(dayPowerInfo.rgzxs) + Number(dayPowerInfo.rjxxs) }}
- </div>
- </div>
- <div class="info-item">
- <div class="text">故障小时:</div>
- <div class="value green">{{ dayPowerInfo.rgzxs }}</div>
- </div>
- <div class="info-item">
- <div class="text">维护小时:</div>
- <div class="value green">{{ dayPowerInfo.rjxxs }}</div>
- </div>
- <div class="info-item">
- <div class="text">中断小时:</div>
- <div class="value green">{{ dayPowerInfo.rzdxs }}</div>
- </div>
- <div class="info-item">
- <div class="text">有效风时数:</div>
- <div class="value green">{{ dayPowerInfo.ryxfs }}</div>
- </div>
- <div class="info-item">
- <div class="text">损失电量:</div>
- <div class="value green">{{ dayPowerInfo.rssdl }}</div>
- </div>
- <div class="info-item">
- <div class="text">报警次数:</div>
- <div class="value green">{{ dayPowerInfo.rbjcs }}</div>
- </div>
- <div class="info-item">
- <div class="text">停机次数:</div>
- <div class="value green">{{ dayPowerInfo.rtjcs }}</div>
- </div>
- <div class="info-item">
- <div class="text">不饱和次数:</div>
- <div class="value green">{{ dayPowerInfo.rbbhcs }}</div>
- </div>
- <div class="info-item">
- <div class="text">设备可利用率:</div>
- <div class="value green">{{ dayPowerInfo.rsbklyl }}</div>
- </div>
- <div class="info-item">
- <div class="text">实际/保证偏差率:</div>
- <div class="value green">{{ dayPowerInfo.rsjbz }}</div>
- </div>
- <div class="info-item">
- <div class="text">平均温度:</div>
- <div class="value green">{{ dayPowerInfo.rpjwd }}</div>
- </div>
- <div class="info-item">
- <div class="text">平均湿度:</div>
- <div class="value green">{{ dayPowerInfo.rpjsd }}</div>
- </div>
- <div class="info-item">
- <div class="text">平均压强:</div>
- <div class="value green">{{ dayPowerInfo.rpjyq }}</div>
- </div>
- </div>
- </panel>
- <div class="month-info">
- <div class="month-info-left">
- <panel
- :title="'月发电量信息'"
- style="height: 100%"
- :showLine="false"
- >
- <div class="power-info month-3">
- <div class="info-item">
- <div class="text">月发电量:</div>
- <div class="value green">{{ dayPowerInfo.yfdl }}</div>
- </div>
- <div class="info-item">
- <div class="text">月理论发电量:</div>
- <div class="value green">{{ dayPowerInfo.yyfdl }}</div>
- </div>
- <div class="info-item">
- <div class="text">月平均功率:</div>
- <div class="value green">{{ dayPowerInfo.ypjgl }}</div>
- </div>
- <div class="info-item">
- <div class="text">月平均风速:</div>
- <div class="value green">{{ dayPowerInfo.ypjfs }}</div>
- </div>
- <div class="info-item">
- <div class="text">月拟合优度:</div>
- <div class="value green">{{ dayPowerInfo.ynhyd }}</div>
- </div>
- <div class="info-item">
- <div class="text">月运行小时:</div>
- <div class="value green">{{ dayPowerInfo.yyxxs }}</div>
- </div>
- <div class="info-item">
- <div class="text">月停机小时:</div>
- <div class="value green">
- {{
- Number(dayPowerInfo.ygzxs) + Number(dayPowerInfo.yjxxs)
- }}
- </div>
- </div>
- <div class="info-item">
- <div class="text">月故障小时:</div>
- <div class="value green">{{ dayPowerInfo.ygzxs }}</div>
- </div>
- <div class="info-item">
- <div class="text">月维护小时:</div>
- <div class="value green">{{ dayPowerInfo.yjxxs }}</div>
- </div>
- <div class="info-item">
- <div class="text">月中断小时:</div>
- <div class="value green">{{ dayPowerInfo.yzdxs }}</div>
- </div>
- <div class="info-item">
- <div class="text">月有效风时数:</div>
- <div class="value green">{{ dayPowerInfo.yyxfs }}</div>
- </div>
- <div class="info-item">
- <div class="text">月报警次数:</div>
- <div class="value green">{{ dayPowerInfo.ybjcs }}</div>
- </div>
- <div class="info-item">
- <div class="text">月停机次数:</div>
- <div class="value green">{{ dayPowerInfo.ytjcs }}</div>
- </div>
- <div class="info-item">
- <div class="text">月实际/保证:</div>
- <div class="value green">{{ dayPowerInfo.ysjbz }}</div>
- </div>
- <div class="info-item">
- <div class="text">设备可利用率:</div>
- <div class="value green">{{ dayPowerInfo.ysbklyl }}</div>
- </div>
- </div>
- </panel>
- </div>
- <div class="month-info-right">
- <panel
- :title="'年发电量信息'"
- style="height: calc(100% - 220px - 10px)"
- :showLine="false"
- >
- <div class="power-info month-2">
- <div class="info-item">
- <div class="text">年发电量:</div>
- <div class="value green">{{ dayPowerInfo.nfdl }}</div>
- </div>
- <div class="info-item">
- <div class="text">年拟合优度:</div>
- <div class="value green">{{ dayPowerInfo.nnhyd }}</div>
- </div>
- </div>
- </panel>
- <panel
- :title="'风资源'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend mg-r-16" v-if="jfplStr.length">
- <span class="dot"></span>
- <span style="color: #fff; white-space: nowrap">{{
- jfplStr
- }}</span>
- </div>
- <direction-radar-chart
- :width="'80%'"
- :height="'100%'"
- :series="windResourcesData"
- :showLegend="true"
- />
- </div>
- </panel>
- </div>
- </div>
- </el-col>
- <el-col :span="9" style="height: 100%">
- <panel
- class="table-panel outline"
- :title="'当日报警记录'"
- :showLine="false"
- >
- <el-table
- :data="warnTableData.data"
- height="calc(100% - 33px)"
- stripe
- size="mini"
- >
- <el-table-column
- v-for="(item, index) in warnTableData.column"
- :key="index"
- align="center"
- :label="item.name"
- :prop="item.field"
- />
- </el-table>
- <el-pagination
- v-if="warnPage.total > 0"
- hide-on-single-page
- style="text-align: center"
- @current-change="
- (val) => {
- warnPage.pageNum = val;
- getWarnTableData();
- }
- "
- :current-page="warnPage.pageNum"
- :page-size="warnPage.pageSize"
- layout="total, prev, pager, next, jumper"
- :total="warnPage.total"
- ></el-pagination>
- </panel>
- <panel
- class="table-panel outline"
- :title="'当日故障记录'"
- :showLine="false"
- >
- <Table :data="stopTableData" :canScroll="true" :height="'23vh'" />
- </panel>
- <panel
- class="table-panel outline"
- :title="'当月报警排行'"
- :showLine="false"
- >
- <Table
- :data="monthWarnRecordData"
- :canScroll="true"
- :height="'23vh'"
- />
- </panel>
- </el-col>
- </el-row>
- </div>
- <!-- tab3 -->
- <div v-if="tabIndex == 2" class="tab-3 tabs">
- <el-row style="height: calc((100% - 10px) / 2); margin-bottom: 10px">
- <el-col :span="8" class="tabColSty">
- <panel
- :title="'日最大风速'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend">
- <span class="dot"></span>
- <span class="titSty">{{ rzdfsStr }}</span>
- </div>
- <!-- <radar-chart
- :width="'100%'"
- :height="'350px'"
- :value="rzdfsData"
- title="日最大风速"
- /> -->
- <rander-new-chart
- width="100%"
- height="100%"
- :lenged="rzdfsLen"
- :xAxis="rzdfsxaisx"
- :series="rzdfsData"
- :isRadar="false"
- />
- </div>
- </panel>
- </el-col>
- <el-col :span="8" class="tabColSty">
- <panel
- :title="'月最大风速'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend">
- <span class="dot"></span>
- <span class="titSty">{{ yzdfsStr }}</span>
- </div>
- <!-- <radar-chart
- :width="'100%'"
- :height="'350px'"
- :value="yzdfsData"
- title="月最大风速"
- /> -->
- <rander-new-chart
- width="100%"
- height="100%"
- :lenged="yzdfsLen"
- :xAxis="yzdfsxaisx"
- :series="yzdfsData"
- :isRadar="false"
- />
- </div>
- </panel>
- </el-col>
- <el-col :span="8" class="tabColSty">
- <panel
- :title="'年最大风速'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend">
- <span class="dot"></span>
- <span class="titSty">{{ nzdfsStr }}</span>
- </div>
- <!-- <radar-chart
- :width="'100%'"
- :height="'350px'"
- :value="nzdfsData"
- title="年最大风速"
- /> -->
- <rander-new-chart
- width="100%"
- height="100%"
- :lenged="nzdfsLen"
- :xAxis="nzdfsxaisx"
- :series="nzdfsData"
- :isRadar="false"
- />
- </div>
- </panel>
- </el-col>
- </el-row>
- <el-row style="height: calc((100% - 10px) / 2)">
- <el-col :span="8" class="tabColSty">
- <panel
- :title="'日风向频率'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend">
- <span class="dot"></span>
- <span class="titSty">{{ rfxplStr }}</span>
- </div>
- <!-- <radar-chart
- :width="'100%'"
- :height="'350px'"
- :value="rfxplData"
- title="日风向频率"
- /> -->
- <rander-new-chart
- width="100%"
- height="100%"
- :lenged="rfxplLen"
- :xAxis="rfxplxaisx"
- :series="rfxplData"
- :isRadar="false"
- />
- </div>
- </panel>
- </el-col>
- <el-col :span="8" class="tabColSty">
- <panel
- :title="'月风向频率'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend">
- <span class="dot"></span>
- <span class="titSty">{{ yfxplStr }}</span>
- </div>
- <!-- <radar-chart
- :width="'100%'"
- :height="'350px'"
- :value="yfxplData"
- title="月风向频率"
- /> -->
- <rander-new-chart
- width="100%"
- height="100%"
- :lenged="yfxplLen"
- :xAxis="yfxplxaisx"
- :series="yfxplData"
- :isRadar="false"
- />
- </div>
- </panel>
- </el-col>
- <el-col :span="8" class="tabColSty">
- <panel
- :title="'年风向频率'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend">
- <span class="dot"></span>
- <span class="titSty">{{ nfxplStr }}</span>
- </div>
- <!-- <radar-chart
- :width="'100%'"
- :height="'350px'"
- :value="nfxplData"
- title="年风向频率"
- /> -->
- <rander-new-chart
- width="100%"
- height="100%"
- :lenged="nfxplLen"
- :xAxis="nfxplxaisx"
- :series="nfxplData"
- :isRadar="false"
- />
- </div>
- </panel>
- </el-col>
- </el-row>
- </div>
- <!-- tab4 -->
- <div v-if="tabIndex == 3" class="tab-4 tabs">
- <el-row style="height: calc((100% - 10px) / 2); margin-bottom: 10px">
- <el-col :span="8" class="tabColSty">
- <panel
- :title="'日最大风速'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend mg-r-16">
- <span class="dot"></span>
- <span class="titSty">{{ rzdfsStr }}</span>
- </div>
- <!-- <radar-chart
- :width="'100%'"
- :height="'350px'"
- :value="rzdfsData"
- title="日最大风速"
- /> -->
- <rander-new-chart
- width="100%"
- height="100%"
- :lenged="rzdfsLen"
- :xAxis="rzdfsxaisx"
- :series="rzdfsData"
- :isRadar="false"
- />
- </div>
- </panel>
- </el-col>
- <el-col :span="8" class="tabColSty">
- <panel
- :title="'月最大风速'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend mg-r-16">
- <span class="dot"></span>
- <span class="titSty">{{ yzdfsStr }}</span>
- </div>
- <!-- <radar-chart
- :width="'100%'"
- :height="'350px'"
- :value="yzdfsData"
- title="月最大风速"
- /> -->
- <rander-new-chart
- width="100%"
- height="100%"
- :lenged="yzdfsLen"
- :xAxis="yzdfsxaisx"
- :series="yzdfsData"
- :isRadar="false"
- />
- </div>
- </panel>
- </el-col>
- <el-col :span="8" class="tabColSty">
- <panel
- :title="'年最大风速'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend mg-r-16">
- <span class="dot"></span>
- <span class="titSty">{{ nzdfsStr }}</span>
- </div>
- <!-- <radar-chart
- :width="'100%'"
- :height="'350px'"
- :value="nzdfsData"
- title="年最大风速"
- /> -->
- <rander-new-chart
- width="100%"
- height="100%"
- :lenged="nzdfsLen"
- :xAxis="nzdfsxaisx"
- :series="nzdfsData"
- :isRadar="false"
- />
- </div>
- </panel>
- </el-col>
- </el-row>
- <el-row style="height: calc((100% - 10px) / 2)">
- <el-col :span="8" class="tabColSty">
- <panel
- :title="'日风向频率'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend">
- <span class="dot"></span>
- <span class="titSty">{{ rfxplStr }}</span>
- </div>
- <!-- <radar-chart
- :width="'100%'"
- :height="'350px'"
- :value="rfxplData"
- title="日风向频率"
- /> -->
- <rander-new-chart
- width="100%"
- height="100%"
- :lenged="rfxplLen"
- :xAxis="rfxplxaisx"
- :series="rfxplData"
- :isRadar="false"
- />
- </div>
- </panel>
- </el-col>
- <el-col :span="8" class="tabColSty">
- <panel
- :title="'月风向频率'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend">
- <span class="dot"></span>
- <span class="titSty">{{ yfxplStr }}</span>
- </div>
- <!-- <radar-chart
- :width="'100%'"
- :height="'350px'"
- :value="yfxplData"
- title="月风向频率"
- /> -->
- <rander-new-chart
- width="100%"
- height="100%"
- :lenged="yfxplLen"
- :xAxis="yfxplxaisx"
- :series="yfxplData"
- :isRadar="false"
- />
- </div>
- </panel>
- </el-col>
- <el-col :span="8" class="tabColSty">
- <panel
- :title="'年风向频率'"
- class="radar-panel"
- :icon="'svg-wind-site'"
- >
- <div class="wind-info">
- <div class="legend">
- <span class="dot"></span>
- <span class="titSty">{{ nfxplStr }}</span>
- </div>
- <!-- <radar-chart
- :width="'100%'"
- :height="'350px'"
- :value="nfxplData"
- title="年风向频率"
- /> -->
- <!-- <rander-new-chart
- width="100%"
- height="100%"
- :lenged="nfxplLen"
- :xAxis="nfxplxaisx"
- :series="nfxplData"
- :isRadar="false"
- /> -->
- </div>
- </panel>
- </el-col>
- </el-row>
- </div>
- <!-- tab5 -->
- <div v-if="tabIndex == 4" class="tab-5 tabs">
- <el-row style="height: calc((100% - 10px) / 2); margin-bottom: 10px">
- <el-col :span="8">
- <panel title="日小风切入">
- <dual-pie-chart
- width="100%"
- height="350px"
- title="日切入频率分析"
- :series="dayWindPieData"
- />
- </panel>
- </el-col>
- <el-col :span="8">
- <panel title="月小风切入">
- <dual-pie-chart
- width="100%"
- height="350px"
- title="月切入频率分析"
- :series="monthWindPieData"
- />
- </panel>
- </el-col>
- <el-col :span="8">
- <panel title="年小风切入">
- <dual-pie-chart
- width="100%"
- height="350px"
- title="年切入频率分析"
- :series="yearWindPieData"
- />
- </panel>
- </el-col>
- </el-row>
- <el-row style="height: calc((100% - 10px) / 2)">
- <el-col :span="8">
- <panel title="日小风切出">
- <dual-pie-chart
- width="100%"
- height="350px"
- title="日切出频率分析"
- :series="dayStopPieData"
- />
- </panel>
- </el-col>
- <el-col :span="8">
- <panel title="月小风切出">
- <dual-pie-chart
- width="100%"
- height="350px"
- title="月切出频率分析"
- :series="monthStopPieData"
- />
- </panel>
- </el-col>
- <el-col :span="8">
- <panel title="年小风切出">
- <dual-pie-chart
- width="100%"
- height="350px"
- title="年切出频率分析"
- :series="yearStopPieData"
- />
- </panel>
- </el-col>
- </el-row>
- </div>
- <el-dialog
- v-model="dialogShow"
- width="85%"
- top="120px"
- :close-on-click-modal="true"
- >
- <template #title>
- <div class="dialog-title">
- <div class="title">区域详情查看</div>
- </div>
- </template>
- <el-form ref="form" label-width="100px" inline>
- <el-form-item style="width: 32%" label="开始时间:">{{
- form.ks
- }}</el-form-item>
- <el-form-item style="width: 32%" label="结束时间:">{{
- form.js
- }}</el-form-item>
- <el-form-item style="width: 32%" label="时长:"
- >{{ form.sc }}(小时)</el-form-item
- >
- <el-form-item style="width: 32%" label="风速:"
- >{{ form.fs }}(m/s)</el-form-item
- >
- <el-form-item style="width: 32%" label="功率:"
- >{{ form.gl }}(KW)</el-form-item
- >
- <el-form-item style="width: 32%" label="理论发电量:"
- >{{ form.llfdl }}(KWh)</el-form-item
- >
- <el-form-item style="width: 32%" label="发电量:"
- >{{ form.fdl }}(KWh)</el-form-item
- >
- <el-form-item style="width: 32%" label="损失电量:"
- >{{ form.ssdl }}(KWh)</el-form-item
- >
- <el-form-item style="width: 32%" label="风机状态:">{{
- form.fjzt
- }}</el-form-item>
- </el-form>
- </el-dialog>
- </div>
- </template>
- <script>
- import AreaLineChart from "@/components/chart/combination/area-line-chart.vue";
- import MultipleBarLineChart from "@/components/chart/combination/multiple-bar-line-chart.vue";
- import MarkerLineChart from "@/components/chart/line/multiple-line-chart.vue";
- import DualPieChart from "@/components/chart/pie/dual-pie-chart.vue";
- import DirectionRadarChart from "@/components/chart/radar/direction-radar-chart.vue";
- import RadarChart from "@/components/chart/radar/radar-chart.vue";
- import panel from "@/components/coms/panel/panel.vue";
- import Table from "@/components/coms/table/table.vue";
- import randerNewChart from "./raderswithhart.vue";
- import dayjs from "dayjs";
- import { alarm_history } from "@/api/zhbj/index.js";
- import {
- getApifindWtRealPowerChar,
- getApigetplotBands,
- getApiplotBandAjax,
- getApifindRealPowerCharBy24,
- getApibjjllist,
- getApigzjllist,
- getApixdjllist,
- getApiwadAjax,
- getApibjphlist,
- getApiglchat,
- getApifjfzy,
- getApiequipmentList,
- getApiWeatherstation,
- getApiComMGTWP,
- getApiComMGTWT,
- getApiComPie,
- } from "@/api/monthlyPerformanceAnalysis";
- import * as echarts from "echarts";
- export default {
- components: {
- panel,
- AreaLineChart,
- MultipleBarLineChart,
- Table,
- MarkerLineChart,
- DirectionRadarChart,
- DualPieChart,
- RadarChart,
- randerNewChart,
- },
- props: {
- wpArray: {
- type: Array,
- default: () => [],
- },
- },
- data() {
- return {
- tabIndex: 0,
- tableData: {
- column: [
- {
- name: "风机",
- field: "name",
- is_num: false,
- is_light: false,
- },
- {
- name: "描述",
- field: "desc",
- is_num: false,
- is_light: false,
- },
- {
- name: "报警时间",
- field: "date",
- is_num: false,
- is_light: false,
- },
- ],
- data: [],
- },
- wpId: "",
- wtArray: [],
- wtId: "",
- recorddate: "",
- lostChartData: [
- {
- text: "",
- value: [],
- },
- ],
- lostChartUnit: [],
- LostChartBgColorData: [
- // {
- // name: "",
- // },
- ],
- powerChartData: [],
- powerChartLineData: {},
- warnTableData: {
- column: [
- {
- name: "风机",
- field: "code",
- is_num: false,
- is_light: false,
- },
- {
- name: "描述",
- field: "description",
- is_num: false,
- is_light: false,
- },
- {
- name: "报警时间",
- field: "ts",
- is_num: false,
- is_light: false,
- },
- ],
- data: [],
- },
- warnPage: { pageSize: 5, pageNum: 1, total: 0 },
- stopTableData: {
- column: [
- {
- name: "风机",
- field: "windTurbineId",
- is_num: false,
- is_light: false,
- },
- {
- name: "停机时间",
- field: "stopTime",
- is_num: false,
- is_light: false,
- },
- {
- name: "恢复时间",
- field: "starttime",
- is_num: false,
- is_light: false,
- },
- ],
- data: [],
- },
- xdTableData: {
- column: [
- {
- name: "风机",
- field: "windturbineid",
- is_num: false,
- is_light: false,
- },
- {
- name: "停机时间",
- field: "stoptime",
- is_num: false,
- is_light: false,
- },
- {
- name: "恢复时间",
- field: "starttime",
- is_num: false,
- is_light: false,
- },
- {
- name: "损失电量",
- field: "losspower",
- is_num: false,
- is_light: false,
- },
- {
- name: "限电时长",
- field: "stophours",
- is_num: false,
- is_light: false,
- },
- ],
- data: [],
- },
- powerLineChartData: [
- {
- title: "",
- yAxisIndex: 0,
- value: [],
- },
- ],
- dayPowerInfo: {},
- monthWarnRecordData: {
- column: [
- {
- name: "名字",
- field: "name",
- is_num: false,
- is_light: false,
- },
- {
- name: "次数",
- field: "frequency",
- is_num: true,
- is_light: false,
- },
- ],
- data: [],
- },
- jfplStr: "",
- windResourcesData: {},
- rzdfsStr: "",
- rzdfsLen: [],
- rzdfsData: [],
- rzdfsxaisx: {
- type: "category",
- boundaryGap: false,
- data: [],
- splitLine: {
- show: true,
- },
- },
- yzdfsStr: "",
- yzdfslen: [],
- yzdfsData: [],
- yzdfsxaisx: {
- type: "category",
- boundaryGap: false,
- data: [],
- splitLine: {
- show: true,
- },
- },
- nzdfsStr: "",
- nzdfsLen: [],
- nzdfsData: [],
- nzdfsxaisx: {
- type: "category",
- boundaryGap: false,
- data: [],
- splitLine: {
- show: true,
- },
- },
- rfxplStr: "",
- rfxplLen: [],
- rfxplData: [],
- rfxplxaisx: {
- type: "category",
- boundaryGap: false,
- data: [],
- splitLine: {
- show: true,
- },
- },
- yfxplStr: "",
- yfxplLen: [],
- yfxplData: [],
- yfxplxaisx: {
- type: "category",
- boundaryGap: false,
- data: [],
- splitLine: {
- show: true,
- },
- },
- nfxplStr: "",
- nfxplLen: [],
- nfxplData: [],
- nfxplxaisx: {
- type: "category",
- boundaryGap: false,
- data: [],
- splitLine: {
- show: true,
- },
- },
- dayWindPieData: [],
- monthWindPieData: [],
- yearWindPieData: [],
- dayStopPieData: [],
- monthStopPieData: [],
- yearStopPieData: [],
- dialogShow: false,
- form: {},
- hisWpid: "",
- hisSubid: "",
- hisWtid: "",
- };
- },
- computed: {
- cftlist() {
- return this.$store.state.cftList.filter(
- (item) => !item.name.includes("光电站")
- );
- },
- },
- methods: {
- init(row) {
- this.wpId = row.windtpowerstationId;
- this.hisWpid = row.windtpowerstationId;
- // this.wtId = row.windturbineId.substring(row.windturbineId.indexOf('_F'))
- this.wtId = row.windturbineId;
- this.hisWtid = row.windturbineId;
- this.tabIndex = 0;
- this.getWindData();
- this.search();
- },
- // 切换风场
- changeStationsVal(val) {
- this.wpId = val;
- if (this.tabIndex == 2) {
- this.hisSubid = val;
- } else {
- this.getWindData();
- }
- },
- // 获取风机
- async getWindData() {
- let params = {
- companyId: "",
- wpIds: this.wpId,
- projectIds: "",
- lineIds: "",
- type: 0,
- };
- const { data: datas } = await getApiequipmentList(params);
- this.wtArray = datas.data;
- // this.wtId = datas.data[0].id;
- },
- // tab1 ----------------------------------------
- // tab1 - 获取损失电量分析图表数据
- async getLostChartData() {
- let that = this;
- let params = {
- wtId: that.wtId,
- recorddate: that.recorddate,
- };
- const { data: datas } = await getApifindWtRealPowerChar(params);
- if (datas && datas.data.length > 0) {
- const keyArray = ["value1", "value2", "value3"];
- let lostChartData = [
- {
- text: "实发功率",
- value: [
- // {
- // text: "1",
- // value: 1,
- // },
- ],
- },
- {
- text: "保证功率",
- value: [],
- },
- {
- text: "风速",
- value: [],
- },
- ];
- const lostChartUnit = ["实发功率", "保证功率", "风速"];
- keyArray.forEach((key, keyIndex) => {
- datas.data.forEach((ele) => {
- lostChartData[keyIndex].value.push({
- text: new Date(ele.time).formatDate("hh:mm"),
- value: ele[key],
- });
- });
- });
- that.lostChartData = lostChartData;
- that.lostChartUnit = lostChartUnit;
- that.getLostChartBgColorData();
- }
- },
- // tab1 - 获取损失电量分析图表背景颜色
- async getLostChartBgColorData() {
- let that = this;
- let params = {
- wtId: that.wtId,
- recorddate: that.recorddate,
- };
- const { data: datas } = await getApigetplotBands(params);
- if (datas && datas.data.length > 0) {
- let LostChartBgColorData = [];
- datas.data.forEach((pEle, pIndex) => {
- LostChartBgColorData.push({
- name: pEle[0].name,
- start: pIndex ? LostChartBgColorData[pIndex - 1].end : 0,
- end:
- (pIndex ? LostChartBgColorData[pIndex - 1].end : 0) +
- (new Date(pEle[0].time2).getTime() / 1000 -
- new Date(pEle[0].time1).getTime() / 1000),
- color: pEle[0].itemStyle.color,
- beginDate: pEle[0].time1,
- endDate: pEle[0].time2,
- wtId: that.wtId,
- });
- });
- that.LostChartBgColorData = LostChartBgColorData;
- }
- },
- // 损失电量分析图背景颜色区域点击事件
- async areaBarChartClick(item) {
- let that = this;
- let params = {
- wtId: item.data.wtId,
- beginDate: item.data.beginDate,
- endDate: item.data.endDate,
- };
- const { data: datas } = await getApiplotBandAjax(params);
- if (datas && datas.data) {
- that.form = datas.data || {};
- that.dialogShow = true;
- }
- },
- // tab1 - 获取电量图表数据
- async getPowerChartData() {
- let that = this;
- let params = {
- wtId: that.wtId,
- recorddate: that.recorddate,
- };
- const { data: datas } = await getApifindRealPowerCharBy24(params);
- if (datas && datas.data.length > 0) {
- const keyArray = ["value1", "value2", "value3", "value4", "value5"];
- let powerChartData = [
- {
- title: "scada发电量",
- type: "bar",
- yAxisIndex: 0,
- value: [],
- },
- {
- title: "检修损失",
- type: "bar",
- yAxisIndex: 0,
- value: [],
- },
- {
- title: "故障损失",
- type: "bar",
- yAxisIndex: 0,
- value: [],
- },
- {
- title: "限电损失",
- type: "bar",
- yAxisIndex: 0,
- value: [],
- },
- {
- title: "欠发损失",
- type: "bar",
- yAxisIndex: 0,
- value: [],
- },
- ];
- let powerChartLineData = {
- name: "风速",
- unit: "(m/s)",
- type: "line",
- data: [],
- };
- for (let i = 0; i < keyArray.length; i++) {
- let keyEle = keyArray[i];
- for (let j = 0; j < datas.data.length; j++) {
- let ele = datas.data[j];
- powerChartData[i].value.push({
- text: new Date(ele.time).formatDate("MM-dd hh:mm"),
- value: ele[keyEle],
- });
- powerChartLineData.data.push(ele.value6);
- }
- }
- that.powerChartData = powerChartData;
- that.powerChartLineData = powerChartLineData;
- }
- },
- // tab1 - 获取当日报警数据
- async getWarnTableData() {
- let params = {
- pageNum: this.warnPage.pageNum,
- pageSize: this.warnPage.pageSize,
- alarmId: "",
- alarmType: "windturbine",
- stationid: this.wpId,
- deviceid: this.wtId,
- modelId: "",
- components: "",
- description: "",
- begin:
- dayjs(this.recorddate).format("YYYY-MM-DD") !=
- dayjs(new Date()).format("YYYY-MM-DD")
- ? dayjs(this.recorddate)
- .startOf("day")
- .format("YYYY-MM-DD HH:mm:ss")
- : dayjs(new Date()).startOf("day").format("YYYY-MM-DD HH:mm:ss"),
- end:
- dayjs(this.recorddate).format("YYYY-MM-DD") !=
- dayjs(new Date()).format("YYYY-MM-DD")
- ? dayjs(this.recorddate).endOf("day").format("YYYY-MM-DD HH:mm:ss")
- : dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
- };
- const { data: datas } = await alarm_history(params);
- if (datas && datas.ls && datas.ls.length > 0) {
- datas.ls.forEach((ele) => {
- ele.ts = dayjs(ele.ts).format("YYYY-MM-DD HH:mm:ss");
- });
- this.warnTableData.data = datas.ls;
- this.warnPage.total = datas.total;
- } else {
- this.warnTableData.data = [];
- this.warnPage.total = 0;
- }
- },
- // tab1 - 获取当日故障数据
- async getStopData() {
- let that = this;
- let params = {
- wtId: that.wtId,
- recorddate: that.recorddate,
- pageNum: "1",
- pageSize: "5",
- };
- // const { data: datas } = await getApigzjllist(params);
- // if (datas && datas.data && datas.data.records.length > 0) {
- // datas.data.records.forEach((ele) => {
- // ele.stopTime = new Date(ele.stopTime).formatDate(
- // "yyyy-MM-dd hh:mm:ss"
- // );
- // ele.starttime = ele.starttime
- // ? new Date(ele.starttime).formatDate("yyyy-MM-dd hh:mm:ss")
- // : "";
- // });
- // that.stopTableData.data = datas.data.records;
- // }
- },
- // tab1 - 获取当日限电数据
- async getXdData() {
- let that = this;
- let params = {
- wtId: that.wtId,
- recorddate: that.recorddate,
- pageNum: "1",
- pageSize: "5",
- };
- // const { data: datas } = await getApixdjllist(params);
- // if (datas && datas.data && datas.data.records.length > 0) {
- // datas.data.records.forEach((ele) => {
- // ele.stopTime = new Date(ele.stopTime).formatDate(
- // "yyyy-MM-dd hh:mm:ss"
- // );
- // ele.starttime = ele.starttime
- // ? new Date(ele.starttime).formatDate("yyyy-MM-dd hh:mm:ss")
- // : "";
- // });
- // that.xdTableData.data = datas.data.records;
- // }
- },
- // tab2 ----------------------------------------
- // tab2 - 获取日发电量信息
- async getDayPowerInfo() {
- let that = this;
- let params = {
- wtId: that.wtId,
- recorddate: that.recorddate,
- };
- const { data: datas } = await getApiwadAjax(params);
- if (datas && datas.data) {
- that.dayPowerInfo = datas.data;
- }
- },
- // tab2 - 获取当月报警排行
- async getMonthWarnRecord() {
- let that = this;
- let params = {
- wtId: that.wtId,
- recorddate: that.recorddate,
- pageNum: "1",
- pageSize: "5",
- };
- const { data: datas } = await getApibjphlist(params);
- if (datas && datas.data) {
- that.monthWarnRecordData.data = datas.data;
- }
- },
- // tab2 - 获取当月报警排行
- async getPowerLineChartData() {
- let that = this;
- let params = {
- wtId: that.wtId,
- recorddate: that.recorddate,
- };
- const { data: datas } = await getApiglchat(params);
- if (datas && datas.data.length > 0) {
- const keyArray = ["value2", "value3", "value4"];
- let powerLineChartData = [
- {
- title: "实际拟合功率",
- yAxisIndex: 0,
- value: [],
- },
- {
- title: "最优功率",
- yAxisIndex: 0,
- value: [],
- },
- {
- title: "保证功率",
- yAxisIndex: 0,
- value: [],
- },
- ];
- keyArray.forEach((keyEle, keyIndex) => {
- datas.data.forEach((ele, index) => {
- powerLineChartData[keyIndex].value.push({
- text: index + 1,
- value: ele[keyEle],
- });
- });
- });
- that.powerLineChartData = powerLineChartData;
- }
- },
- // tab2 - 获取风资源
- async getWindResources() {
- let that = this;
- let params = {
- wtId: that.wtId,
- recorddate: that.recorddate,
- };
- const { data: datas } = await getApifjfzy(params);
- if (datas && datas.data) {
- that.jfplStr = datas.data.jfpl || "";
- let windResourcesData = {
- data: [],
- name: [],
- };
- if (datas.data.data) {
- datas.data.data.forEach((ele, index) => {
- let jiaodu = (360 / 16) * index;
- windResourcesData.data.push([ele.data1, jiaodu]);
- windResourcesData.name.push(ele.name);
- });
- windResourcesData.data.push([datas.data.data[0].data1, 0]);
- }
- that.windResourcesData = windResourcesData;
- }
- },
- // tab3,tab4 - 获取玫瑰图
- async getMgt(subUrl, data, dataKey, logFlg) {
- let that = this;
- let params = {};
- if (logFlg === "wp") {
- params.url = subUrl;
- params.recorddate = data.recorddate;
- params.wpId = data.wpId;
- const { data: datas } = await getApiComMGTWP(params);
- // this.changeAllMsg(datas, dataKey);
- this.changeAllMsgNewChart(datas, dataKey);
- } else {
- params.url = subUrl;
- params.recorddate = data.recorddate;
- params.wtId = data.wtId;
- const { data: datas } = await getApiComMGTWT(params);
- // this.changeAllMsg(datas, dataKey);
- this.changeAllMsgNewChart(datas, dataKey);
- }
- },
- //整合数据
- changeAllMsg(datas, dataKey) {
- if (datas && datas.data) {
- let strrt = dataKey.split("Data")[0] + "Str";
- this[strrt] = datas.data.jfpl || "";
- let mgtData = {
- indicator: [],
- data: [
- {
- name: "",
- value: [],
- },
- ],
- };
- let indicatorArr = [
- { nameZn: "北", nameEn: "N" },
- { nameZn: "北北西", nameEn: "NNW" },
- { nameZn: "北西", nameEn: "NW" },
- { nameZn: "西北西", nameEn: "WNW" },
- { nameZn: "西", nameEn: "W" },
- { nameZn: "西南西", nameEn: "WSW" },
- { nameZn: "南西", nameEn: "SW" },
- { nameZn: "南南西", nameEn: "SSW" },
- { nameZn: "南", nameEn: "S" },
- { nameZn: "南南东", nameEn: "SSE" },
- { nameZn: "南东", nameEn: "SE" },
- { nameZn: "东南东", nameEn: "ESE" },
- { nameZn: "东", nameEn: "E" },
- { nameZn: "东北东", nameEn: "ENE" },
- { nameZn: "北东", nameEn: "NE" },
- { nameZn: "北北东", nameEn: "NNE" },
- ];
- if (datas.data.data.length > 0) {
- datas.data.data.forEach((ele) => {
- mgtData.data[0].value.push(ele.data1);
- indicatorArr.forEach((itc) => {
- let str = "";
- if (ele.name.substring(0, ele.name.indexOf(" ")) === itc.nameEn) {
- str = ele.name.replace(itc.nameEn, itc.nameZn);
- str = str.substring(0, str.indexOf(" "));
- mgtData.indicator.push(str);
- }
- });
- });
- }
- this[dataKey] = mgtData;
- }
- },
- changeAllMsgNewChart(datas, dataKey) {
- if (datas && datas.data) {
- let strrt = dataKey.split("Data")[0] + "Str";
- let strLen = dataKey.split("Data")[0] + "Len";
- let strxaisx = dataKey.split("Data")[0] + "xaisx";
- this[strrt] = datas.data.jfpl || "";
- this[strxaisx].data = [];
- this[strLen] = [];
- this[dataKey] = [];
- let lengedSer = [];
- let series = [];
- let objsxArrAll = [];
- if (datas.data.data.length > 0) {
- datas.data.data.forEach((item) => {
- let str = item.name.substring(
- item.name.indexOf(" ") + 1,
- item.name.length
- );
- if (lengedSer.indexOf(str) === -1) {
- lengedSer.push(str);
- }
- });
- for (let i = 0; i < lengedSer.length; i++) {
- // debugger
- let ia = lengedSer[i];
- let objsxArr = [];
- let objsxArrObj = {
- name: "",
- data: [],
- };
- for (let j = 0; j < datas.data.data.length; j++) {
- let ic = datas.data.data[j];
- let objsx = {
- fx: "",
- data: "",
- };
- objsx.fx = ic.name.substring(0, ic.name.indexOf(" "));
- if (ic.name.indexOf(ia) > 0) {
- objsx.data = ic.data1;
- } else {
- objsx.data = 0;
- }
- objsxArr.push(objsx);
- }
- objsxArrObj.name = ia;
- objsxArrObj.data = objsxArr;
- objsxArrAll.push(objsxArrObj);
- }
- objsxArrAll.forEach((iiv, index) => {
- let barObj = {
- type: "bar",
- data: [],
- coordinateSystem: "polar",
- name: iiv.name,
- stack: "a",
- emphasis: {
- focus: "series",
- },
- };
- if (index === 0) {
- iiv.data.forEach((iu) => {
- this[strxaisx].data.push(iu.fx);
- });
- }
- iiv.data.forEach((iu) => {
- barObj.data.push(iu.data);
- });
- series.push(barObj);
- });
- } else {
- lengedSer = [];
- series = [];
- }
- this[strLen] = lengedSer;
- this[dataKey] = series;
- }
- },
- // tab5 - 获取饼图
- async getPieChart(subUrl, type, dataKey) {
- let that = this;
- let params = {
- url: subUrl,
- wtId: that.wtId,
- recorddate: that.recorddate,
- type: type,
- };
- const { data: datas } = await getApiComPie(params);
- // const datas = await request({
- // method: "GET",
- // url: subUrl + `?recorddate=${params.recorddate}&wtId=${params.wtId}&type=${params.type}`
- // })
- // if (datas && datas.data.length>0) {
- // let pieChart = [];
- // datas.data.forEach((ele) => {
- // pieChart.push({
- // name: ele.name,
- // value: ele.value2,
- // unit: "(m/s)",
- // });
- // });
- // that[dataKey] = pieChart;
- // }
- if (datas && datas.data.length > 0) {
- let series = [];
- let color1 = [
- "#da0d68",
- "#da1d23",
- "#ebb40f",
- "#187a2f",
- "#0aa3b5",
- "#c94930",
- "#ad213e",
- ];
- let color2 = [
- "#cc7b6a",
- "#db646a",
- "#80a89d",
- "#794752",
- "#7a9bae",
- "#039fb8",
- "#5e777b",
- ];
- let color3 = [
- "#62aa3c",
- "#03a653",
- "#038549",
- "#28b44b",
- "#a3a830",
- "#7ac141",
- "#a2bb2b",
- ];
- let color4 = [
- "#e65832",
- "#da1d23",
- "#4b55ae",
- "#3aa255",
- "#0aa3b5",
- "#1c99ff",
- "#ebb40f",
- ];
- datas.data.forEach((ele, idx) => {
- series.push({ name: ele.name, value: ele.value2 });
- });
- that[dataKey] = series;
- }
- },
- // 切换tab
- tabSelect(index) {
- if (this.tabIndex == 2) {
- this.hisSubid = this.wpId;
- } else {
- this.hisWpid = this.wpId;
- }
- if (index == 2) {
- this.wpId = this.hisSubid ? this.hisSubid : this.cftlist[0].id;
- } else {
- this.wpId = this.hisWpid ? this.hisWpid : this.wpArray[0].id;
- }
- this.tabIndex = index;
- this.search();
- },
- // 搜索
- search() {
- if (this.tabIndex === 0) {
- this.getLostChartData();
- this.getPowerChartData();
- this.getWarnTableData();
- this.getStopData();
- this.getXdData();
- } else if (this.tabIndex === 1) {
- this.getWarnTableData();
- this.getStopData();
- this.getDayPowerInfo();
- this.getMonthWarnRecord();
- this.getPowerLineChartData();
- this.getWindResources();
- } else if (this.tabIndex === 2) {
- const xhrParam = { wpId: this.wpId, recorddate: this.recorddate };
- this.getMgt(`/goodness/wprzdfs`, xhrParam, "rzdfsData", "wp");
- this.getMgt(`/goodness/wpyzdfs`, xhrParam, "yzdfsData", "wp");
- this.getMgt(`/goodness/wpnzdfs`, xhrParam, "nzdfsData", "wp");
- this.getMgt(`/goodness/wprfxpl`, xhrParam, "rfxplData", "wp");
- this.getMgt(`/goodness/wpyfxpl`, xhrParam, "yfxplData", "wp");
- this.getMgt(`/goodness/wpnfxpl`, xhrParam, "nfxplData", "wp");
- } else if (this.tabIndex === 3) {
- const xhrParam = { wtId: this.wtId, recorddate: this.recorddate };
- this.getMgt(`/goodness/wtrzdfs`, xhrParam, "rzdfsData", "wt");
- this.getMgt(`/goodness/wtyzdfs`, xhrParam, "yzdfsData", "wt");
- this.getMgt(`/goodness/wtnzdfs`, xhrParam, "nzdfsData", "wt");
- this.getMgt(`/goodness/wtrfxpl`, xhrParam, "rfxplData", "wt");
- this.getMgt(`/goodness/wtyfxpl`, xhrParam, "yfxplData", "wt");
- this.getMgt(`/goodness/wtnfxpl`, xhrParam, "nfxplData", "wt");
- } else if (this.tabIndex === 4) {
- this.getPieChart(`/goodness/pieChart`, "1", "dayWindPieData");
- this.getPieChart(`/goodness/pieChart`, "2", "monthWindPieData");
- this.getPieChart(`/goodness/pieChart`, "3", "yearWindPieData");
- this.getPieChart(`/goodness/pieChart`, "4", "dayStopPieData");
- this.getPieChart(`/goodness/pieChart`, "5", "monthStopPieData");
- this.getPieChart(`/goodness/pieChart`, "6", "yearStopPieData");
- }
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .windDetailWidth {
- width: calc(100%-50px);
- margin-left: 50px;
- }
- .windDetail {
- height: 100%;
- .action-bar {
- display: flex;
- padding: 10px 0 20px 0;
- .selections {
- flex: 1 0 auto;
- display: flex;
- .selections_btn {
- flex: 0 0 164px;
- text-align: center;
- height: 33px;
- line-height: 33px;
- margin-right: 8px;
- color: #b9b9b9;
- font-size: 1.296vh;
- background: fade(#606769, 20);
- border: 1px solid fade(#606769, 20);
- border-radius: 20px;
- &:hover,
- &.active {
- background: rgba(5, 187, 76, 0.6);
- // border: 1px solid #0046c7;
- color: #fff;
- cursor: pointer;
- }
- }
- }
- .windDetailseach {
- display: flex;
- .query-items {
- flex: 0 0 auto;
- display: flex;
- align-items: center;
- .query-item {
- flex: 0 0 auto;
- display: flex;
- align-items: center;
- .label {
- color: #fff;
- }
- }
- }
- .query-actions {
- margin-left: 5px;
- .buttons {
- background-color: rgba(5, 187, 76, 0.2);
- border: 1px solid #3b6c53;
- color: #b3b3b3;
- font-size: 14px;
- &:hover,
- &.active {
- background-color: rgba(5, 187, 76, 0.5);
- color: #ffffff;
- }
- }
- }
- }
- }
- .tabs {
- height: calc(100% - 55px);
- }
- .outline {
- outline: 1px solid fade(#606769, 50);
- }
- .TabOne {
- .TabOne_topChart {
- height: calc((100% - 260px) / 2);
- margin-bottom: 10px;
- }
- .TabOne_centerChart {
- margin-bottom: 10px;
- height: calc((100% - 260px) / 2);
- }
- .table-info {
- display: flex;
- height: 260px;
- .table-panel {
- flex: 1 0 calc(100% / 3 - 8px);
- outline: 1px solid fade(#606769, 50);
- height: 100%;
- & + .table-panel {
- margin-left: 8px;
- }
- }
- }
- }
- .tab-2 {
- .power-info {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- height: 100%;
- color: #05bb4c;
- &.month-3 {
- .info-item {
- height: calc((100% - 8px * 4) / 5);
- line-height: calc((100% - 8px * 4) / 5);
- flex: 0 0 calc(100% / 3 - 6px);
- &:nth-child(-n + 3) {
- margin-top: 0px;
- }
- }
- }
- &.month-2 {
- .info-item {
- flex: 0 0 calc(100% / 2 - 4px);
- height: calc(100% - 8px);
- &:nth-child(-n + 5) {
- margin-top: 8px;
- }
- &:nth-child(-n + 2) {
- margin-top: 0px;
- }
- }
- }
- .info-item {
- display: flex;
- align-items: center;
- flex: 0 0 calc(100% / 5 - 8px);
- background: fade(#606769, 20);
- height: calc((100% - 8px * 3) / 4);
- line-height: calc((100% - 8px * 3) / 4);
- &:nth-child(-n + 5) {
- margin-top: 0px;
- }
- .text {
- font-size: 12px;
- flex: 0 0 110px;
- text-align: right;
- margin-right: 24px;
- color: #fff;
- }
- .value {
- font-size: 16px;
- color: #05bb4c;
- }
- }
- }
- .month-info {
- display: flex;
- height: calc(100% - 270px - 297px - 20px);
- .month-info-left {
- height: 100%;
- flex: 0 0 705px;
- margin-right: 10px;
- }
- .month-info-right {
- height: 100%;
- flex: 1 0 auto;
- }
- }
- .radar-panel {
- height: 220px;
- .wind-info {
- height: 100%;
- }
- }
- .table-panel {
- margin-bottom: 10px;
- height: calc((100% - 10px * 2) / 3);
- &:nth-child(3) {
- margin-bottom: 0px;
- }
- }
- .wind-info {
- display: flex;
- .legend {
- font-size: 12px;
- height: 20px;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 32px;
- margin-bottom: 16px;
- .dot {
- width: 7px;
- height: 7px;
- background: #05bb4c;
- display: inline-block;
- margin-right: 8px;
- }
- }
- }
- }
- .tab-3,
- .tab-4 {
- .tabColSty {
- height: 100%;
- .radar-panel {
- height: 100%;
- }
- }
- .wind-info {
- position: relative;
- height: 100%;
- .legend {
- position: absolute;
- left: 500px;
- top: 0;
- font-size: 12px;
- flex: 0 0 140px;
- height: 20px;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 32px;
- margin-bottom: 16px;
- .dot {
- width: 7px;
- height: 7px;
- background: #05bb4c;
- display: inline-block;
- margin-right: 8px;
- }
- .titSty {
- color: #fff;
- white-space: nowrap;
- }
- }
- }
- }
- .tab-5 {
- .panel-body {
- padding: 16px;
- }
- }
- }
- </style>
|