SandTable.vue 71 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922
  1. <template>
  2. <!-- padding: 0 10px; -->
  3. <div style="width: 100%;height:100%;">
  4. <div class="sand-table" id="sandTable" v-if="$route.path === '/integratedAlarm'">
  5. <!-- <img :src="require('@assets/png/3dcloud.png')" class="i3dcloud" /> -->
  6. <StBack></StBack>
  7. <ThreeModel1 class="three-model-layer" :data="mapSource" @when="when" @clickMapItem="clickMapItem">
  8. </ThreeModel1>
  9. <!-- <img :src="require('@/assets/png/3dback.png')" class="i3dback" /> -->
  10. <!-- v-if="showPanel" -->
  11. <!-- 第一机组 -->
  12. <div class="sand-table-left">
  13. <PanelSand class="left-panel" title="停机信息">
  14. <template v-slot:tools>
  15. <div class="exchange" @click="changeBjSwitch('left')">
  16. <span :class="bjSwitch ? 'gray' : 'white'">故障</span>
  17. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  18. <span :class="bjSwitch ? 'white' : 'gray'">检修</span>
  19. </div>
  20. </template>
  21. <RankTable :data="selsZC" @rowClick="clickStopRow('left')" height="20vh"></RankTable>
  22. </PanelSand>
  23. <PanelSandToolbar class="right-panel mg-t-16" title="预警情况">
  24. <template v-slot:tools>
  25. <div class="exchange">
  26. <span :class="warnSwitch === 'z' ? 'white' : 'gray'" @click="changeWarnSwitch('z')">周</span>
  27. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  28. <span :class="warnSwitch === 'y' ? 'white' : 'gray'" @click="changeWarnSwitch('y')">月</span>
  29. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  30. <span :class="warnSwitch === 'n' ? 'white' : 'gray'" @click="changeWarnSwitch('n')">年</span>
  31. </div>
  32. </template>
  33. <template v-slot:toolsL>
  34. <div class="exchange">
  35. <span :class="warnPC ? 'white' : 'gray'" @click="changeWarnPC('left')">频次</span>
  36. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  37. <span :class="warnPC ? 'gray' : 'white'" @click="changeWarnPC('left')">时长</span>
  38. </div>
  39. </template>
  40. <template v-slot:default>
  41. <RadarPieChart height="18vh" :list="warnChartDataZC" :title="warnPC ? '预警频次情况' : '预警时长情况'" />
  42. </template>
  43. </PanelSandToolbar>
  44. <PanelSandToolbar class="right-panel mg-t-16" title="故障情况" @click="clickTime('WT2000D121H85')" style="cursor: pointer">
  45. <template v-slot:tools>
  46. <div class="exchange">
  47. <span :class="probSwitch === 'z' ? 'white' : 'gray'" @click.stop="changeProbSwitch('z')">周</span>
  48. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  49. <span :class="probSwitch === 'y' ? 'white' : 'gray'" @click.stop="changeProbSwitch('y')">月</span>
  50. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  51. <span :class="probSwitch === 'n' ? 'white' : 'gray'" @click.stop="changeProbSwitch('n')">年</span>
  52. </div>
  53. </template>
  54. <template v-slot:toolsL>
  55. <div class="exchange">
  56. <span :class="probPC ? 'white' : 'gray'" @click.stop="changeProbPC('left')">频次</span>
  57. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  58. <span :class="probPC ? 'gray' : 'white'" @click.stop="changeProbPC('left')">时长</span>
  59. </div>
  60. </template>
  61. <template v-slot:default>
  62. <!-- <RadarPieChartCom height="18vh" :list="probChartData" title="故障情况" /> -->
  63. <RadarPieChart height="18vh" :list="probChartDataZC" :title="probPC ? '故障频次情况' : '故障时长情况'" />
  64. </template>
  65. </PanelSandToolbar>
  66. </div>
  67. <!-- <div></div>
  68. v-if="showPanel" -->
  69. <!-- 第二机组 -->
  70. <div class="sand-table-right">
  71. <PanelSand class="left-panel" title="停机信息">
  72. <template v-slot:tools>
  73. <div class="exchange" @click="changeBjSwitch('right')">
  74. <span :class="bjSwitch2 ? 'gray' : 'white'">故障</span>
  75. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  76. <span :class="bjSwitch2 ? 'white' : 'gray'">检修</span>
  77. </div>
  78. </template>
  79. <RankTable :data="selsLH" @rowClick="clickStopRow('right')" height="20vh"></RankTable>
  80. </PanelSand>
  81. <PanelSandToolbar class="right-panel mg-t-16" title="预警情况">
  82. <template v-slot:tools>
  83. <div class="exchange">
  84. <span :class="warnSwitch2 === 'z' ? 'white' : 'gray'" @click="changeWarnSwitch2('z')">周</span>
  85. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  86. <span :class="warnSwitch2 === 'y' ? 'white' : 'gray'" @click="changeWarnSwitch2('y')">月</span>
  87. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  88. <span :class="warnSwitch2 === 'n' ? 'white' : 'gray'" @click="changeWarnSwitch2('n')">年</span>
  89. </div>
  90. </template>
  91. <template v-slot:toolsL>
  92. <div class="exchange">
  93. <span :class="warnPC2 ? 'white' : 'gray'" @click="changeWarnPC('right')">频次</span>
  94. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  95. <span :class="warnPC2 ? 'gray' : 'white'" @click="changeWarnPC('right')">时长</span>
  96. </div>
  97. </template>
  98. <template v-slot:default>
  99. <RadarPieChart height="18vh" :list="warnChartDataLH" :title="warnPC2 ? '预警频次情况' : '预警时长情况'" />
  100. </template>
  101. </PanelSandToolbar>
  102. <PanelSandToolbar class="right-panel mg-t-16" title="故障情况" @click="clickTime('UP2000-130')">
  103. <template v-slot:tools>
  104. <div class="exchange">
  105. <span :class="probSwitch2 === 'z' ? 'white' : 'gray'" @click.stop="changeProbSwitch2('z')">周</span>
  106. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  107. <span :class="probSwitch2 === 'y' ? 'white' : 'gray'" @click.stop="changeProbSwitch2('y')">月</span>
  108. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  109. <span :class="probSwitch2 === 'n' ? 'white' : 'gray'" @click.stop="changeProbSwitch2('n')">年</span>
  110. </div>
  111. </template>
  112. <template v-slot:toolsL>
  113. <div class="exchange">
  114. <span :class="probPC2 ? 'white' : 'gray'" @click.stop="changeProbPC('right')">频次</span>
  115. <i class="blue fa fa-exchange mg-l-8 mg-r-8"></i>
  116. <span :class="probPC2 ? 'gray' : 'white'" @click.stop="changeProbPC('right')">时长</span>
  117. </div>
  118. </template>
  119. <template v-slot:default>
  120. <!-- <RadarPieChartCom height="18vh" :list="probChartData" title="故障情况" style="cursor: pointer" /> -->
  121. <RadarPieChart height="18vh" :list="probChartDataLH" :title="probPC ? '故障频次情况' : '故障时长情况'" />
  122. </template>
  123. </PanelSandToolbar>
  124. </div>
  125. <div class="footer">
  126. <div class="hover72Power">
  127. <div
  128. id="problem1"
  129. class="cur"
  130. style="width: 100%; height: 100%"
  131. ></div>
  132. <div class="hidBtn" @click="clickTime('WT2000D121H85')"></div>
  133. </div>
  134. <div class="monthPower">
  135. <div
  136. id="problem2"
  137. class="cur"
  138. style="width: 100%; height: 100%"
  139. ></div>
  140. <div class="hidBtn" @click="clickTime('UP2000-130')"></div>
  141. </div>
  142. </div>
  143. <el-dialog
  144. v-model="noTimeDialog"
  145. :custom-class="noTimeDialogsc"
  146. width="80%"
  147. >
  148. <template #title>
  149. <div class="dialogTitle">
  150. <span style="margin-left: 10px">非停时长占比与故障次数</span>
  151. </div>
  152. </template>
  153. <div class="allStyle">
  154. <div class="radioGroupTime">
  155. <el-date-picker
  156. v-model="radioTime"
  157. type="datetimerange"
  158. range-separator="至"
  159. start-placeholder="开始日期"
  160. end-placeholder="结束日期"
  161. format="YYYY-MM-DD HH:mm:ss">
  162. </el-date-picker>
  163. <el-radio-group v-model="radioGroup" @change="changeRadio">
  164. <el-radio :label="1" >按日</el-radio>
  165. <el-radio :label="2">按月</el-radio>
  166. </el-radio-group>
  167. </div>
  168. <div class="allMain">
  169. <!-- <span class="mainTit">2025-01-{{it}}</span> -->
  170. <div class="allMsg">
  171. <div class="warnLine">
  172. <RadarLineChartCom width="45vw" height="50vh" :xAxis="problem3.xAxis" :series="problem3.series" />
  173. </div>
  174. <div class="warnPie">
  175. <RadarPieChartCom width="30vw" height="50vh" :list="probChartData" title="非停时长占比" style="cursor: pointer" />
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. <!-- <template #footer>
  181. <div class="dialog-footer">
  182. <el-button @click="dialogVisible = false">Cancel</el-button>
  183. <el-button type="primary" @click="dialogVisible = false">
  184. Confirm
  185. </el-button>
  186. </div>
  187. </template> -->
  188. </el-dialog>
  189. <el-dialog
  190. v-model="showTableDialog"
  191. :custom-class="noTimeDialogsc"
  192. width="80%"
  193. >
  194. <template #title>
  195. <div class="dialogTitle">
  196. <span style="margin-left: 10px">停机信息</span>
  197. </div>
  198. </template>
  199. <div class="warnTable">
  200. <el-table
  201. size="mini"
  202. :data="tableData"
  203. style="width: 100%; height: calc(100% - 310px)"
  204. max-height="520px"
  205. stripe>
  206. <el-table-column
  207. v-for="item in tableHeader"
  208. :label="item.name"
  209. :prop="item.code"
  210. :key="item.code"
  211. :width="item.width || ''"
  212. show-overflow-tooltip
  213. header-align="center"
  214. align="center"
  215. >
  216. <template #default="scope">
  217. <span v-if="item.code == 'status'">
  218. <span :style="scope.row.status === 0 ? 'color: red' : ''">{{scope.row.status === 0 ? "异常" : "正常"}}</span>
  219. </span>
  220. <span v-else>
  221. {{
  222. scope.row[item.code] != "NULL" ? scope.row[item.code] : ""
  223. }}
  224. </span>
  225. </template>
  226. </el-table-column>
  227. </el-table>
  228. </div>
  229. </el-dialog>
  230. </div>
  231. <router-view v-else />
  232. </div>
  233. </template>
  234. <script>
  235. import ThreeModel1 from "./component/ThreeModel1.vue";
  236. import PanelSand from "@com/coms/panel/panel-sand.vue";
  237. import PanelSandToolbar from "@com/coms/panel/panel-sand-toolbar.vue";
  238. import StBack from "./component/st-back.vue";
  239. import RankTable from "./component/rank-table.vue";
  240. import RadarPieChart from "@com/chart/pie/radar-pie-chart.vue";
  241. import RadarPieChartCom from "./component/radar-pie-chart.vue";
  242. import RadarLineChartCom from "./component/radar-line-chart.vue";
  243. import dataJson from "./component/dataBJJson.json"
  244. import dayjs from "dayjs";
  245. import {
  246. alarm_history,
  247. } from "@/api/zhbj/index.js";
  248. import {
  249. apiGetqueryshutdowneventlist,
  250. apiGetfindCtFeatureStat,
  251. apiGetqueryShutdownEvent2ByType,
  252. apiGetqueryShutdownEvent2ByDay,
  253. apiGetqueryShutdownEvent2ByMonth,
  254. apiGetqueryShutdownEvent2ByMap
  255. } from "@/api/sandtable/index.js";
  256. import jsonData from "./component/data.json";
  257. export default {
  258. // 名称
  259. name: "SandTable",
  260. // 使用组件
  261. components: {
  262. ThreeModel1,
  263. PanelSand,
  264. PanelSandToolbar,
  265. RadarPieChart,
  266. StBack,
  267. RankTable,
  268. RadarPieChartCom,
  269. RadarLineChartCom
  270. },
  271. // 数据
  272. data() {
  273. const that = this;
  274. return {
  275. radioGroup: 1,
  276. radioTime: [],
  277. problem1: null,
  278. problem2: null,
  279. problem3: {},
  280. videoShow: true,
  281. showPanel: false,
  282. bjSwitch: false,
  283. bjSwitch2: false,
  284. warnSwitch: 'y',
  285. warnSwitch2: 'y',
  286. probSwitch: 'y',
  287. probSwitch2: 'y',
  288. warnPC: true,
  289. warnPC2: true,
  290. probPC: true,
  291. probPC2: true,
  292. timmer1: null,
  293. showWeatherDialog: false,
  294. showTableDialog: false,
  295. showHealthDialog: false,
  296. showMainInfoDialog: false,
  297. noTimeDialog: false,
  298. noTimeType: "",
  299. weathercollapse: "",
  300. weatherChart: [{
  301. title: "温度",
  302. smooth: true,
  303. value: [],
  304. },
  305. {
  306. title: "湿度",
  307. smooth: true,
  308. value: [],
  309. },
  310. ],
  311. videoDialogClass: "modal animated a1 bounceIn",
  312. tableDialogClass: "modal animated a1 fadeInLeftBig",
  313. mainInfoDialogClass: "modal curModal animated a0 fadeInDownBig",
  314. mainInfo: [],
  315. peopleClass: "",
  316. timeStr: "",
  317. wpId: "0",
  318. tqmap1: {},
  319. tqmap5: [],
  320. gxkmap: {},
  321. tableItem: {},
  322. mapSource: {},
  323. videoArray1: [
  324. // [
  325. // { code: "NSS_FDC_ZK", class: "", switch: true },
  326. // { code: "NSS_FDC_ZK", class: "", switch: true },
  327. // ],
  328. // [
  329. // { code: "NSS_FDC_ZK", class: "", switch: true },
  330. // { code: "QS_FDC_ZK", class: "", switch: true },
  331. // ],
  332. // [
  333. // { code: "QS_FDC_ZK", class: "", switch: true },
  334. // { code: "QS_FDC_ZK", class: "", switch: true },
  335. // ],
  336. [{
  337. code: "SBQ_FDC_SC",
  338. class: "",
  339. switch: true
  340. },
  341. {
  342. code: "NSS_FDC_SC",
  343. class: "",
  344. switch: true
  345. },
  346. ],
  347. [{
  348. code: "QS_FDC_SC",
  349. class: "",
  350. switch: true
  351. },
  352. {
  353. code: "MHS_FDC_SC",
  354. class: "",
  355. switch: true
  356. },
  357. ],
  358. [{
  359. code: "XS_FDC_SC",
  360. class: "",
  361. switch: true
  362. },
  363. {
  364. code: "PL_GDC_SC",
  365. class: "",
  366. switch: true
  367. },
  368. ],
  369. ],
  370. videoArray: [
  371. [{
  372. url: "http://192.168.10.10:9984/ws.html",
  373. token: "?token=SBQ_FDC_SC&autoplay=true",
  374. class: "",
  375. switch: true,
  376. },
  377. {
  378. url: "http://192.168.10.10:9984/ws.html",
  379. token: "?token=NSS_FDC_SC&autoplay=true",
  380. class: "",
  381. switch: true,
  382. },
  383. ],
  384. [{
  385. url: "http://192.168.10.10:9984/ws.html",
  386. token: "?token=QS_FDC_SC&autoplay=true",
  387. class: "",
  388. switch: true,
  389. },
  390. {
  391. url: "http://192.168.10.10:9984/ws.html",
  392. token: "?token=MHS_FDC_SC&autoplay=true",
  393. class: "",
  394. switch: true,
  395. },
  396. ],
  397. [{
  398. url: "http://192.168.10.10:9984/ws.html",
  399. token: "?token=XS_FDC_SC&autoplay=true",
  400. class: "",
  401. switch: true,
  402. },
  403. {
  404. url: "http://192.168.10.10:9984/ws.html",
  405. token: "?token=PL_GDC_SC&autoplay=true",
  406. class: "",
  407. switch: true,
  408. },
  409. ],
  410. ],
  411. showVideoDialog: false,
  412. dialogVideoUrl: "",
  413. warnChartDataZC: dataJson.data.warnChartData,
  414. warnChartDataLH: dataJson.data.warnChartData,
  415. probChartDataZC: dataJson.data.probChartData,
  416. probChartDataLH: dataJson.data.probChartData,
  417. probChartData: dataJson.data.probChartData,
  418. bjChartData: [],
  419. ForecastPower: [{
  420. name: "今日预测电量",
  421. value: 103.62,
  422. total: 150,
  423. },
  424. {
  425. name: "月预测发电量",
  426. value: 98.62,
  427. total: 100,
  428. },
  429. ],
  430. workDataIndex: 0,
  431. workData: {
  432. column: [{
  433. name: "人员",
  434. field: "laborname",
  435. is_num: false,
  436. is_light: false,
  437. click(e, row) {
  438. that.changePeople(row.index);
  439. },
  440. },
  441. {
  442. name: "职务",
  443. field: "jobcode",
  444. is_num: false,
  445. is_light: false,
  446. click(e, row) {
  447. that.changePeople(row.index);
  448. },
  449. },
  450. {
  451. name: "开始时间",
  452. field: "starttime",
  453. width: "150px",
  454. is_num: false,
  455. is_light: false,
  456. click(e, row) {
  457. that.changePeople(row.index);
  458. },
  459. },
  460. {
  461. name: "原因",
  462. field: "problem",
  463. is_num: false,
  464. is_light: false,
  465. click(e, row) {
  466. that.changePeople(row.index);
  467. },
  468. },
  469. ],
  470. data: [],
  471. },
  472. selsZC: {
  473. column: [
  474. {
  475. name: "机组",
  476. field: "code",
  477. width: "60px",
  478. },
  479. {
  480. name: "停机时长(h)",
  481. field: "selsTime",
  482. },
  483. {
  484. name: "状态",
  485. field: "isCloseName",
  486. width: "60px",
  487. },
  488. ],
  489. data: dataJson.data.sels.data
  490. },
  491. selsLH: {
  492. column: [
  493. {
  494. name: "机组",
  495. field: "code",
  496. width: "60px",
  497. },
  498. {
  499. name: "停机时长(h)",
  500. field: "selsTime",
  501. },
  502. {
  503. name: "状态",
  504. field: "isCloseName",
  505. width: "60px",
  506. },
  507. ],
  508. data: dataJson.data.sels.data
  509. },
  510. rmls: {
  511. column: [{
  512. // name: "风机编号",
  513. name: "机组",
  514. field: "code",
  515. width: "60px",
  516. },
  517. {
  518. // name: "推荐时间",
  519. name: "报警时间",
  520. field: "rmlsTime",
  521. },
  522. {
  523. // name: "类型",
  524. name: "状态",
  525. // field: "operation",
  526. field: "isCloseName",
  527. width: "60px",
  528. },
  529. ],
  530. data: [],
  531. },
  532. tableHeader: [
  533. {
  534. name: "机组",
  535. code: "code"
  536. },
  537. {
  538. name: "停机开始时间",
  539. code: "startTime"
  540. },
  541. {
  542. name: "停机结束时间",
  543. code: "endTime"
  544. },
  545. {
  546. name: "停机时长",
  547. code: "stopHours"
  548. },
  549. {
  550. name: "故障信息",
  551. code: "faultView"
  552. },
  553. {
  554. name: "当前状态",
  555. code: "status"
  556. }
  557. ],
  558. tableData: [
  559. {
  560. code: "1001",
  561. startTime: "2024-12-31 09:00",
  562. endTime: "2024-12-31 18:00",
  563. selsTime: "8.0",
  564. message: "电气故障,机械故障",
  565. status: "正常"
  566. }
  567. ]
  568. };
  569. },
  570. // 函数
  571. methods: {
  572. init(res) {
  573. let that = this
  574. // 72小时功率曲线
  575. if (res.data["72time"] && res.data["72time"].length > 0) {
  576. let xAxis = [];
  577. let seriesSpeed = [];
  578. let seriesGl = [];
  579. res.data["72time"].forEach((it) => {
  580. xAxis.push(dayjs(it.time).format("MM-DD HH:mm"));
  581. seriesSpeed.push(it.speed);
  582. seriesGl.push(it.expectedpower);
  583. });
  584. let series = [
  585. {
  586. name: "故障次数",
  587. data: seriesSpeed,
  588. type: "line",
  589. symbol: "none",
  590. },
  591. {
  592. name: "故障时长",
  593. data: seriesGl,
  594. yAxisIndex: 1,
  595. type: "line",
  596. symbol: "none",
  597. },
  598. ];
  599. that.getPowerLine(
  600. xAxis,
  601. series,
  602. "problem1"
  603. );
  604. that.getPowerLine2(
  605. xAxis,
  606. series,
  607. "problem2"
  608. );
  609. }
  610. },
  611. getDataInfo() {
  612. let that = this;
  613. that.radioTime = [
  614. dayjs().startOf('month').format("YYYY-MM-DD HH:mm:ss"),
  615. dayjs().format("YYYY-MM-DD HH:mm:ss")
  616. ]
  617. that.getShutDownevenList("gz", "WT2000D121H85", 5)
  618. that.getShutDownevenList("gz", "UP2000-130", 5)
  619. that.getFindCtFeature("WT2000D121H85", this.warnSwitch)
  620. that.getFindCtFeature("UP2000-130", this.warnSwitch2)
  621. that.getShutDownEvent("WT2000D121H85", this.probSwitch)
  622. that.getShutDownEvent("UP2000-130", this.probSwitch2)
  623. that.getShutdownEventByDay("WT2000D121H85", that.radioTime)
  624. that.getShutdownEventByDay("UP2000-130", that.radioTime)
  625. },
  626. changeRadio(val) {
  627. if (val === 1) {
  628. if (this.noTimeType === "WT2000D121H85") {
  629. this.getShutdownEventByDay("WT2000D121H85", this.radioTime, "Dia")
  630. this.getShutdownEventByMap("WT2000D121H85", this.radioTime)
  631. } else {
  632. this.getShutdownEventByDay("UP2000-130", this.radioTime, "Dia")
  633. this.getShutdownEventByMap("UP2000-130", this.radioTime)
  634. }
  635. } else {
  636. if (this.noTimeType === "WT2000D121H85") {
  637. this.getShutdownEventByMonth("WT2000D121H85", this.radioTime)
  638. this.getShutdownEventByMap("WT2000D121H85", this.radioTime)
  639. } else {
  640. this.getShutdownEventByMonth("UP2000-130", this.radioTime)
  641. this.getShutdownEventByMap("UP2000-130", this.radioTime)
  642. }
  643. }
  644. },
  645. //获取停机表格信息
  646. getShutDownevenList(types, modelIds, size) {
  647. let that = this
  648. let params = {
  649. wpId: "NX_FGS_HA_FDC_STA",
  650. modelId: modelIds,
  651. begin: dayjs().subtract(1, 'month').format("YYYY-MM-DD HH:mm:ss"),
  652. end: dayjs().format("YYYY-MM-DD HH:mm:ss"),
  653. pageNum: 1,
  654. pageSize: size,
  655. type: types
  656. }
  657. apiGetqueryshutdowneventlist(params).then(res =>{
  658. if (res && res.data) {
  659. if (size === 5) {
  660. let result = []
  661. res.data.result.forEach(it =>{
  662. let obj = {
  663. code: it.code,
  664. selsTime: it.stopHours,
  665. isCloseName: types === "gz" ? "故障" : "检修"
  666. }
  667. result.push(obj)
  668. })
  669. if (modelIds === "WT2000D121H85") {
  670. that.selsZC.data = result
  671. } else {
  672. that.selsLH.data = result
  673. }
  674. } else {
  675. res.data.result.forEach(it =>{
  676. it.status = types === "gz" ? "故障" : "检修"
  677. })
  678. that.tableData = res.data.result
  679. }
  680. }
  681. })
  682. },
  683. //获取预警统计
  684. getFindCtFeature(modelIds, dateType) {
  685. let that = this
  686. let date = ""
  687. if (dateType === "z") {
  688. date = dayjs().subtract(1, 'week').format("YYYY-MM-DD HH:mm:ss")
  689. } else if (dateType === "y") {
  690. date = dayjs().subtract(1, 'month').format("YYYY-MM-DD HH:mm:ss")
  691. } else if (dateType === "n") {
  692. date = dayjs().subtract(1, 'year').format("YYYY-MM-DD HH:mm:ss")
  693. } else {
  694. date = dayjs().subtract(1, 'month').format("YYYY-MM-DD HH:mm:ss")
  695. }
  696. let params = {
  697. stationid: "NX_FGS_HA_FDC_STA",
  698. modelId: modelIds,
  699. begin: date,
  700. end: dayjs().format("YYYY-MM-DD HH:mm:ss"),
  701. deviceType: "windturbine"
  702. }
  703. apiGetfindCtFeatureStat(params).then(res =>{
  704. if (res) {
  705. let result = []
  706. res.forEach(it =>{
  707. let obj = {
  708. name: it.typeName,
  709. value: modelIds === "WT2000D121H85" ? that.warnPC : that.warnPC2 ? it.total : it.totalSeconds
  710. }
  711. result.push(obj)
  712. })
  713. if (modelIds === "WT2000D121H85") {
  714. that.warnChartDataZC = result
  715. } else {
  716. that.warnChartDataLH = result
  717. }
  718. }
  719. })
  720. },
  721. //获取故障统计
  722. getShutDownEvent(modelIds, dateType) {
  723. let that = this
  724. let date = ""
  725. if (dateType === "z") {
  726. date = dayjs().subtract(1, 'week').format("YYYY-MM-DD HH:mm:ss")
  727. } else if (dateType === "y") {
  728. date = dayjs().subtract(1, 'month').format("YYYY-MM-DD HH:mm:ss")
  729. } else if (dateType === "n") {
  730. date = dayjs().subtract(1, 'year').format("YYYY-MM-DD HH:mm:ss")
  731. } else {
  732. date = dayjs().subtract(1, 'month').format("YYYY-MM-DD HH:mm:ss")
  733. }
  734. let params = {
  735. wpId: "NX_FGS_HA_FDC_STA",
  736. modelId: modelIds,
  737. begin: date,
  738. end: dayjs().format("YYYY-MM-DD HH:mm:ss")
  739. }
  740. apiGetqueryShutdownEvent2ByType(params).then(res =>{
  741. if (res && res.data) {
  742. let result = []
  743. res.data.forEach(it =>{
  744. let obj = {
  745. name: it.name,
  746. value: modelIds === "WT2000D121H85" ? that.warnPC : that.warnPC2 ? it.times : it.hours
  747. }
  748. result.push(obj)
  749. })
  750. if (modelIds === "WT2000D121H85") {
  751. that.probChartDataZC = result
  752. } else {
  753. that.probChartDataLH = result
  754. }
  755. }
  756. })
  757. },
  758. //获取故障次数时长----日
  759. getShutdownEventByDay(modelIds, dates, type) {
  760. let that = this
  761. let params = {
  762. wpId: "NX_FGS_HA_FDC_STA",
  763. modelId: modelIds,
  764. begin: dates[0],
  765. end: dates[1]
  766. }
  767. apiGetqueryShutdownEvent2ByDay(params).then(res =>{
  768. if (res && res.data) {
  769. let xAxis = [];
  770. let seriesSpeed = [];
  771. let seriesGl = [];
  772. res.data.forEach((it) => {
  773. xAxis.push(it.stoptime);
  774. seriesSpeed.push(it.times);
  775. seriesGl.push(it.hours);
  776. });
  777. let series = [
  778. {
  779. name: "故障次数",
  780. data: seriesSpeed,
  781. type: "line",
  782. symbol: "none",
  783. },
  784. {
  785. name: "故障时长",
  786. data: seriesGl,
  787. yAxisIndex: 1,
  788. type: "line",
  789. symbol: "none",
  790. },
  791. ];
  792. if (modelIds === "WT2000D121H85") {
  793. if (type === 'Dia') {
  794. that.problem3 = {
  795. xAxis: xAxis,
  796. series: series
  797. }
  798. } else {
  799. that.getPowerLine(
  800. xAxis,
  801. series,
  802. "problem1"
  803. );
  804. }
  805. } else {
  806. if (type === 'Dia') {
  807. that.problem3 = {
  808. xAxis: xAxis,
  809. series: series
  810. }
  811. } else {
  812. that.getPowerLine2(
  813. xAxis,
  814. series,
  815. "problem2"
  816. );
  817. }
  818. }
  819. }
  820. })
  821. },
  822. getShutdownEventByMonth(modelIds, dates) {
  823. let that = this
  824. let params = {
  825. wpId: "NX_FGS_HA_FDC_STA",
  826. modelId: modelIds,
  827. begin: dates[0],
  828. end: dates[1]
  829. }
  830. apiGetqueryShutdownEvent2ByMonth(params).then(res =>{
  831. if (res && res.data) {
  832. let xAxis = [];
  833. let seriesSpeed = [];
  834. let seriesGl = [];
  835. res.data.forEach((it) => {
  836. xAxis.push(it.stoptime);
  837. seriesSpeed.push(it.times);
  838. seriesGl.push(it.hours);
  839. });
  840. let series = [
  841. {
  842. name: "故障次数",
  843. data: seriesSpeed,
  844. type: "line",
  845. symbol: "none",
  846. },
  847. {
  848. name: "故障时长",
  849. data: seriesGl,
  850. yAxisIndex: 1,
  851. type: "line",
  852. symbol: "none",
  853. },
  854. ];
  855. if (modelIds === "WT2000D121H85") {
  856. that.problem3 = {
  857. xAxis: xAxis,
  858. series: series
  859. }
  860. } else {
  861. that.problem3 = {
  862. xAxis: xAxis,
  863. series: series
  864. }
  865. }
  866. }
  867. })
  868. },
  869. getShutdownEventByMap(modelIds, dates) {
  870. let that = this
  871. let params = {
  872. wpId: "NX_FGS_HA_FDC_STA",
  873. modelId: modelIds,
  874. begin: dates[0],
  875. end: dates[1]
  876. }
  877. apiGetqueryShutdownEvent2ByMap(params).then(res =>{
  878. if (res && res.data) {
  879. let result = []
  880. for (let i in res.data) {
  881. res.data[i].forEach(it =>{
  882. let obj = {
  883. name: it.name,
  884. value: it.times
  885. }
  886. result.push(obj)
  887. })
  888. }
  889. if (modelIds === "WT2000D121H85") {
  890. that.probChartData = result
  891. } else {
  892. that.probChartData = result
  893. }
  894. }
  895. })
  896. },
  897. getPowerLine(
  898. xAxis,
  899. series,
  900. name
  901. ) {
  902. let myChart;
  903. let legendState = {};
  904. if (this.problem1?.getOption) {
  905. legendState = this.problem1.getOption().legend[0].selected;
  906. }
  907. let option = {
  908. title: {
  909. text: "故障次数时长",
  910. left: "5px",
  911. top: "5px",
  912. textStyle: {
  913. fontSize: "16",
  914. fontWeight: 400,
  915. color: "#fff",
  916. },
  917. },
  918. tooltip: {
  919. trigger: "axis",
  920. },
  921. color: ["#7981AF", "#1C99FF", "#E57F25", "#f25656"],
  922. legend: {
  923. right: "25",
  924. top: "5",
  925. itemWidth: 5,
  926. itemHeight: 5,
  927. data: ["故障次数", "故障时长"],
  928. textStyle: {
  929. color: "#fff",
  930. },
  931. selected: legendState,
  932. },
  933. grid: {
  934. left: "2%",
  935. right: "4%",
  936. bottom: "5%",
  937. height: "110px",
  938. containLabel: true,
  939. },
  940. xAxis: {
  941. type: "category",
  942. boundaryGap: false,
  943. data: xAxis,
  944. axisLine: {
  945. lineStyle: {
  946. color: "#fff", // 修改为需要的颜色
  947. },
  948. },
  949. },
  950. yAxis: [
  951. {
  952. type: "value",
  953. splitLine: {
  954. lineStyle: {
  955. color: "#ccc",
  956. type: "dashed", // 修改为虚线
  957. opacity: 0.2,
  958. },
  959. },
  960. name: "单位:次",
  961. axisLine: {
  962. lineStyle: {
  963. color: "#fff",
  964. },
  965. },
  966. axisLabel: {
  967. formatter(value) {
  968. return parseFloat(value.toFixed(1));
  969. },
  970. },
  971. },
  972. {
  973. type: "value",
  974. splitLine: {
  975. lineStyle: {
  976. color: "#ccc",
  977. type: "dashed", // 修改为虚线
  978. opacity: 0.2,
  979. },
  980. },
  981. name: "单位:时长",
  982. axisLine: {
  983. lineStyle: {
  984. color: "#fff",
  985. },
  986. },
  987. axisLabel: {
  988. formatter(value) {
  989. return parseFloat(value.toFixed(1));
  990. },
  991. },
  992. },
  993. ],
  994. series: series,
  995. };
  996. // 基于准备好的dom,初始化echarts实例
  997. let dom = document.getElementById(name);
  998. dom && dom.removeAttribute("_echarts_instance_");
  999. myChart = this.$echarts.init(dom);
  1000. this.problem1 = myChart;
  1001. myChart.setOption(option);
  1002. window.addEventListener("resize", () => {
  1003. myChart.resize();
  1004. });
  1005. },
  1006. getPowerLine2(
  1007. xAxis,
  1008. series,
  1009. name
  1010. ) {
  1011. let myChart;
  1012. let legendState = {};
  1013. if (this.problem2?.getOption) {
  1014. legendState = this.problem2.getOption().legend[0].selected;
  1015. }
  1016. let option = {
  1017. title: {
  1018. text: "故障次数时长",
  1019. left: "5px",
  1020. top: "5px",
  1021. textStyle: {
  1022. fontSize: "16",
  1023. fontWeight: 400,
  1024. color: "#fff",
  1025. },
  1026. },
  1027. tooltip: {
  1028. trigger: "axis",
  1029. },
  1030. color: ["#7981AF", "#1C99FF", "#E57F25", "#f25656"],
  1031. legend: {
  1032. right: "25",
  1033. top: "5",
  1034. itemWidth: 5,
  1035. itemHeight: 5,
  1036. data: ["故障次数", "故障时长"],
  1037. textStyle: {
  1038. color: "#fff",
  1039. },
  1040. selected: legendState,
  1041. },
  1042. grid: {
  1043. left: "2%",
  1044. right: "4%",
  1045. bottom: "5%",
  1046. height: "110px",
  1047. containLabel: true,
  1048. },
  1049. xAxis: {
  1050. type: "category",
  1051. boundaryGap: false,
  1052. data: xAxis,
  1053. axisLine: {
  1054. lineStyle: {
  1055. color: "#fff", // 修改为需要的颜色
  1056. },
  1057. },
  1058. },
  1059. yAxis: [
  1060. {
  1061. type: "value",
  1062. splitLine: {
  1063. lineStyle: {
  1064. color: "#ccc",
  1065. type: "dashed", // 修改为虚线
  1066. opacity: 0.2,
  1067. },
  1068. },
  1069. name: "单位:次",
  1070. axisLine: {
  1071. lineStyle: {
  1072. color: "#fff",
  1073. },
  1074. },
  1075. axisLabel: {
  1076. formatter(value) {
  1077. return parseFloat(value.toFixed(1));
  1078. },
  1079. },
  1080. },
  1081. {
  1082. type: "value",
  1083. splitLine: {
  1084. lineStyle: {
  1085. color: "#ccc",
  1086. type: "dashed", // 修改为虚线
  1087. opacity: 0.2,
  1088. },
  1089. },
  1090. name: "单位:时长",
  1091. axisLine: {
  1092. lineStyle: {
  1093. color: "#fff",
  1094. },
  1095. },
  1096. axisLabel: {
  1097. formatter(value) {
  1098. return parseFloat(value.toFixed(1));
  1099. },
  1100. },
  1101. },
  1102. ],
  1103. series: series,
  1104. };
  1105. // 基于准备好的dom,初始化echarts实例
  1106. let dom = document.getElementById(name);
  1107. dom && dom.removeAttribute("_echarts_instance_");
  1108. myChart = this.$echarts.init(dom);
  1109. this.problem2 = myChart;
  1110. myChart.setOption(option);
  1111. window.addEventListener("resize", () => {
  1112. myChart.resize();
  1113. });
  1114. },
  1115. clickStopRow(type) {
  1116. this.showTableDialog = true;
  1117. if (type === 'left') {
  1118. if (!this.bjSwitch) {
  1119. this.getShutDownevenList("gz", "WT2000D121H85", 100)
  1120. } else {
  1121. this.getShutDownevenList("wh", "WT2000D121H85", 100)
  1122. }
  1123. } else {
  1124. if (!this.bjSwitch2) {
  1125. this.getShutDownevenList("gz", "UP2000-130", 100)
  1126. } else {
  1127. this.getShutDownevenList("wh", "UP2000-130", 100)
  1128. }
  1129. }
  1130. },
  1131. changeBjSwitch(type) {
  1132. if (type === "left") {
  1133. this.bjSwitch = !this.bjSwitch;
  1134. if (!this.bjSwitch) {
  1135. this.getShutDownevenList("gz", "WT2000D121H85", 5)
  1136. } else {
  1137. this.getShutDownevenList("wh", "WT2000D121H85", 5)
  1138. }
  1139. } else {
  1140. this.bjSwitch2 = !this.bjSwitch2;
  1141. if (!this.bjSwitch2) {
  1142. this.getShutDownevenList("gz", "UP2000-130", 5)
  1143. } else {
  1144. this.getShutDownevenList("wh", "UP2000-130", 5)
  1145. }
  1146. }
  1147. },
  1148. changeWarnSwitch(val) {
  1149. this.warnSwitch = val
  1150. this.getFindCtFeature("WT2000D121H85", val)
  1151. },
  1152. changeWarnSwitch2(val) {
  1153. this.warnSwitch2 = val
  1154. this.getFindCtFeature("UP2000-130", val)
  1155. },
  1156. changeProbSwitch(val) {
  1157. this.probSwitch = val
  1158. this.getShutDownEvent("WT2000D121H85", val)
  1159. },
  1160. changeProbSwitch2(val) {
  1161. this.probSwitch2 = val
  1162. this.getShutDownEvent("UP2000-130", val)
  1163. },
  1164. changeProbPC(type) {
  1165. if (type === 'left') {
  1166. this.probPC = !this.probPC;
  1167. this.getShutDownEvent("WT2000D121H85", this.probSwitch)
  1168. } else {
  1169. this.probPC2 = !this.probPC2;
  1170. this.getShutDownEvent("UP2000-130", this.probSwitch2)
  1171. }
  1172. },
  1173. changeWarnPC(type) {
  1174. if (type === 'left') {
  1175. this.warnPC = !this.warnPC;
  1176. this.getFindCtFeature("WT2000D121H85", this.warnSwitch)
  1177. } else {
  1178. this.warnPC2 = !this.warnPC2;
  1179. this.getFindCtFeature("UP2000-130", this.warnSwitch2)
  1180. }
  1181. },
  1182. clickTime(type) {
  1183. let res = jsonData
  1184. this.noTimeDialog = true
  1185. this.noTimeType = type
  1186. let that = this
  1187. // 72小时功率曲线
  1188. if (res.data["72time"] && res.data["72time"].length > 0) {
  1189. let xAxis = [];
  1190. let seriesSpeed = [];
  1191. let seriesGl = []
  1192. res.data["72time"].forEach((it) => {
  1193. xAxis.push(dayjs(it.time).format("MM-DD HH:mm"));
  1194. seriesSpeed.push(it.speed);
  1195. seriesGl.push(it.expectedpower);
  1196. });
  1197. let series = [
  1198. {
  1199. name: "故障次数",
  1200. data: seriesSpeed,
  1201. type: "line",
  1202. symbol: "none",
  1203. },
  1204. {
  1205. name: "故障时长",
  1206. data: seriesGl,
  1207. yAxisIndex: 1,
  1208. type: "line",
  1209. symbol: "none",
  1210. },
  1211. ];
  1212. this.problem3 = {
  1213. xAxis: xAxis,
  1214. series: series
  1215. }
  1216. }
  1217. if (type === 'left') {
  1218. that.getShutdownEventByDay("WT2000D121H85", that.radioTime)
  1219. that.getShutdownEventByMap("WT2000D121H85", that.radioTime)
  1220. } else {
  1221. that.getShutdownEventByDay("UP2000-130", that.radioTime)
  1222. that.getShutdownEventByMap("UP2000-130", that.radioTime)
  1223. }
  1224. },
  1225. // 获取历史记录表
  1226. async getAlarmHistoryt(params, type) {
  1227. if (type === 'history') {
  1228. params.alarmType = 'windturbine',
  1229. params.stationid = 'NX_FGS_HA_FDC_STA',
  1230. params.deviceid = ""
  1231. } else {
  1232. params.alarmType = 'custom',
  1233. params.stationid = 'NX_FGS_HA_FDC_STA',
  1234. params.deviceid = "",
  1235. params.deviceType = "windturbine"
  1236. }
  1237. const { data } = await alarm_history(params);
  1238. if (data) {
  1239. if (type === 'history') {
  1240. data?.ls?.forEach((ele) => {
  1241. ele.isCloseName = ele.endts ? "已解除" : "未解除";
  1242. ele.rmlsTime = ele.ts > 0 ? this.formatTime(ele.ts) : "--";
  1243. });
  1244. this.rmls.data = data?.ls;
  1245. } else {
  1246. data?.ls?.forEach((ele) => {
  1247. ele.isCloseName = ele.endts ? "已解除" : "未解除";
  1248. ele.selsTime = ele.ts > 0 ? this.formatTime(ele.ts) : "--";
  1249. });
  1250. this.sels.data = data?.ls;
  1251. }
  1252. } else {
  1253. this.sels.data = dataJson.data.sels.data;
  1254. this.warnChartData = dataJson.data.warnChartData;
  1255. this.probChartData = dataJson.data.probChartData;
  1256. }
  1257. },
  1258. // 时间格式化
  1259. formatTime(val) {
  1260. return dayjs(val).format("YYYY-MM-DD HH:mm:ss");
  1261. },
  1262. // 获取中部地图数据
  1263. getWpHealthInfo() {
  1264. let that = this;
  1265. that.API.requestData({
  1266. method: "POST",
  1267. subUrl: "sandtable/judgeWpHealth",
  1268. data: {
  1269. wpId: that.wpId,
  1270. },
  1271. success(res) {
  1272. that.mapSource = res.data;
  1273. },
  1274. });
  1275. },
  1276. // 获取报警玫瑰图
  1277. getWarnMGT() {
  1278. let that = this;
  1279. that.API.requestData({
  1280. method: "GET",
  1281. baseURL: "http://192.168.1.82:8075/",
  1282. subUrl: "alarm/count/query/alltotal",
  1283. data: {
  1284. stationid: that.wpId,
  1285. },
  1286. success(res) {
  1287. let warnChartData = [];
  1288. for (let key in res.data) {
  1289. const ele = res.data[key];
  1290. warnChartData.push({
  1291. value: ele.count,
  1292. name: ele.relatePartsText,
  1293. });
  1294. }
  1295. that.warnChartData = warnChartData;
  1296. }
  1297. });
  1298. },
  1299. // 获取故障玫瑰图
  1300. getStopMGT() {
  1301. let that = this;
  1302. that.API.requestData({
  1303. method: "GET",
  1304. baseURL: "http://192.168.1.82:8075/",
  1305. subUrl: "shutdown/count/alltotal",
  1306. data: {
  1307. stId: that.wpId,
  1308. },
  1309. success(res) {
  1310. let warnChartData = [];
  1311. for (let key in res.data) {
  1312. const ele = res.data[key];
  1313. warnChartData.push({
  1314. value: ele.count,
  1315. name: ele.type,
  1316. });
  1317. }
  1318. that.warnChartData = warnChartData;
  1319. },
  1320. });
  1321. },
  1322. // 获取库存玫瑰图
  1323. getRepertoryMGT() {
  1324. let that = this;
  1325. that.API.requestData({
  1326. method: "GET",
  1327. baseURL: "http://10.155.32.4:9988/",
  1328. subUrl: "inventory/groupcount",
  1329. data: {
  1330. stId: that.wpId,
  1331. },
  1332. success(res) {
  1333. let bjChartData = [];
  1334. for (let key in res.data) {
  1335. const ele = res.data[key];
  1336. bjChartData.push({
  1337. value: ele.curbal,
  1338. name: ele.description,
  1339. });
  1340. }
  1341. that.bjChartData = bjChartData;
  1342. },
  1343. });
  1344. },
  1345. // 获取记录玫瑰图
  1346. getRecordMGT() {
  1347. let that = this;
  1348. that.API.requestData({
  1349. method: "GET",
  1350. baseURL: "http://10.155.32.4:9988/",
  1351. subUrl: "equoperationrecord/equupdatecount",
  1352. data: {
  1353. stId: that.wpId,
  1354. },
  1355. success(res) {
  1356. let bjChartData = [];
  1357. for (let key in res.data) {
  1358. const ele = res.data[key];
  1359. bjChartData.push({
  1360. value: ele.count,
  1361. name: ele.description,
  1362. });
  1363. }
  1364. that.bjChartData = bjChartData;
  1365. },
  1366. });
  1367. },
  1368. // 获取中部地图数据
  1369. getTop4Info() {
  1370. let that = this;
  1371. that.API.requestData({
  1372. method: "GET",
  1373. baseURL: "http://10.155.32.4:9988/",
  1374. subUrl: "equoperationrecord/top4",
  1375. data: {
  1376. stId: that.wpId,
  1377. },
  1378. success(res) {
  1379. res.data.forEach((ele, index) => {
  1380. ele.index = index;
  1381. ele.jobcode = ele.jobcode || "------";
  1382. });
  1383. that.workData.data = res.data;
  1384. },
  1385. });
  1386. },
  1387. // 获取主要指标
  1388. getWpMainInfo() {
  1389. let that = this;
  1390. that.API.requestData({
  1391. method: "GET",
  1392. baseURL: "http://10.155.32.4:8034/",
  1393. subUrl: "benchmark/zyzb",
  1394. data: {
  1395. windPowerStation: that.wpId,
  1396. },
  1397. success(res) {
  1398. that.mainInfo = res.data;
  1399. that.showMainInfoDialog = true;
  1400. },
  1401. });
  1402. },
  1403. // 切换人员展示
  1404. changePeople(index) {
  1405. if (!this.peopleAnmLock && this.workDataIndex !== index) {
  1406. this.peopleAnmLock = true;
  1407. this.peopleClass = "fadeOutRight";
  1408. setTimeout(() => {
  1409. this.workDataIndex = index;
  1410. this.peopleClass = "fadeInRight";
  1411. this.peopleAnmLock = false;
  1412. }, 150);
  1413. }
  1414. },
  1415. // 点击风场或者光伏
  1416. clickMapItem(videoArray, wpId) {
  1417. this.wpId = wpId;
  1418. // this.videoArray.forEach((pEle, pIndex) => {
  1419. // pEle.forEach((cEle, cIndex) => {
  1420. // setTimeout(() => {
  1421. // // 设置隐藏动画
  1422. // cEle.class = "animated a1 flipOutX";
  1423. // setTimeout(() => {
  1424. // // 修改 token
  1425. // cEle.token =
  1426. // "?token=" + videoArray[pIndex + cIndex] + "&autoplay=true";
  1427. // setTimeout(() => {
  1428. // // 设置显示动画
  1429. // cEle.class = "animated a1 flipInX";
  1430. // }, 150);
  1431. // }, 350);
  1432. // }, (pIndex + cIndex + pIndex) * 150);
  1433. // });
  1434. // });
  1435. this.videoArray1.forEach((pEle, pIndex) => {
  1436. pEle.forEach((cEle, cIndex) => {
  1437. setTimeout(() => {
  1438. // 设置隐藏动画
  1439. cEle.class = "animated a1 flipOutX";
  1440. setTimeout(() => {
  1441. // 修改 token
  1442. cEle.code = videoArray[pIndex + cIndex];
  1443. setTimeout(() => {
  1444. // 设置显示动画
  1445. cEle.class = "animated a1 flipInX";
  1446. }, 150);
  1447. }, 350);
  1448. }, (pIndex + cIndex + pIndex) * 150);
  1449. });
  1450. });
  1451. this.getWtInfo();
  1452. this.getWpHealthInfo();
  1453. this.getTop4Info();
  1454. this.getWarnMGT();
  1455. this.getRepertoryMGT();
  1456. this.getWpMainInfo();
  1457. },
  1458. when() {
  1459. this.showPanel = true;
  1460. },
  1461. },
  1462. // 生命周期钩子
  1463. beforeCreate() {
  1464. // 创建前
  1465. },
  1466. created() {
  1467. this.getDataInfo();
  1468. // this.getWpHealthInfo();
  1469. // this.getTop4Info();
  1470. // this.getWarnMGT();
  1471. // this.getRepertoryMGT();
  1472. this.timeStr = new Date().formatDate("MM-dd hh:mm");
  1473. this.timmer1 = setInterval(() => {
  1474. this.timeStr = new Date().formatDate("MM-dd hh:mm");
  1475. });
  1476. },
  1477. beforeMount() {
  1478. // 渲染前
  1479. },
  1480. mounted() {
  1481. // 渲染后
  1482. this.$nextTick(() =>{
  1483. this.init(jsonData)
  1484. })
  1485. },
  1486. watch: {
  1487. $route: {
  1488. handler(val) {
  1489. this.$nextTick(() =>{
  1490. this.init(jsonData)
  1491. })
  1492. },
  1493. },
  1494. },
  1495. beforeUpdate() {
  1496. // 数据更新前
  1497. },
  1498. updated() {
  1499. // 数据更新后
  1500. },
  1501. unmounted() {
  1502. clearInterval(this.timmer1);
  1503. this.timmer1 = null;
  1504. },
  1505. };
  1506. </script>
  1507. <style lang="less">
  1508. .sand-table {
  1509. width: 100%;
  1510. // height: 91.667vh;
  1511. height: 100%;
  1512. position: relative;
  1513. background-image: url("../../assets/png/3dback.png");
  1514. .i3dback {
  1515. position: fixed;
  1516. // z-index: -1;
  1517. width: 100vw;
  1518. height: 100%;
  1519. top: 0;
  1520. left: 0;
  1521. }
  1522. .i3dcloud {
  1523. position: absolute;
  1524. z-index: 2;
  1525. width: 100vw;
  1526. height: 100vh;
  1527. top: 0;
  1528. left: 0;
  1529. }
  1530. .left-panel {
  1531. width: 360px;
  1532. margin-top: 20px;
  1533. }
  1534. .right-panel {
  1535. width: 36.852vh;
  1536. .mask {
  1537. width: 100%;
  1538. height: 28vh;
  1539. background: url("~@assets/nxfImg/ship.png");
  1540. background-size: 100% 100%;
  1541. }
  1542. }
  1543. .three-model-layer {
  1544. position: absolute;
  1545. width: 100%;
  1546. height: 100%;
  1547. z-index: 1;
  1548. }
  1549. .sand-table-left {
  1550. position: absolute;
  1551. left: 0;
  1552. top: 0;
  1553. z-index: 2;
  1554. }
  1555. .sand-table-right {
  1556. position: absolute;
  1557. right: 0;
  1558. top: 0;
  1559. z-index: 2;
  1560. }
  1561. .sand-table-bottom {
  1562. position: absolute;
  1563. bottom: 20px;
  1564. z-index: 2;
  1565. display: flex;
  1566. transform: 0.2s;
  1567. .stb-p {
  1568. margin-left: 0.926vh;
  1569. }
  1570. }
  1571. .pre-img-box {
  1572. display: flex;
  1573. align-items: center;
  1574. justify-content: center;
  1575. margin-top: 0.556vh;
  1576. padding: 0;
  1577. position: relative;
  1578. cursor: pointer;
  1579. .sand-table-bottom {
  1580. position: absolute;
  1581. bottom: 0;
  1582. z-index: 2;
  1583. display: flex;
  1584. transition: 0.2s;
  1585. }
  1586. .mask {
  1587. width: 100%;
  1588. height: 8.657vh;
  1589. background: url("~@assets/nxfImg/ship.png");
  1590. background-size: 100% 100%;
  1591. // img {
  1592. // width: 100%;
  1593. // height: 100px;
  1594. // }
  1595. }
  1596. .pre-img {
  1597. position: relative;
  1598. width: 95%;
  1599. height: 8.657vh;
  1600. z-index: 4;
  1601. }
  1602. }
  1603. .person-info-box {
  1604. display: flex;
  1605. .header {
  1606. width: 75px;
  1607. }
  1608. }
  1609. .table {
  1610. width: calc(100% + 2.963vh);
  1611. margin-left: -1.481vh;
  1612. margin-bottom: -1.481vh;
  1613. tr {
  1614. cursor: pointer;
  1615. }
  1616. .com-table thead tr th,
  1617. .com-table tr td {
  1618. padding: 0.556vh 0;
  1619. color: #fff;
  1620. }
  1621. }
  1622. .animated.a0 {
  1623. animation-duration: 0.35s;
  1624. }
  1625. .animated.a1 {
  1626. animation-duration: 0.5s;
  1627. }
  1628. .el-overlay {
  1629. overflow: hidden;
  1630. }
  1631. .footer {
  1632. display: flex;
  1633. justify-content: space-between;
  1634. width: 100%;
  1635. height: 19vh;
  1636. position: relative;
  1637. bottom: -80vh;
  1638. z-index: 111;
  1639. .hover72Power,
  1640. .monthPower {
  1641. width: calc(50% - 10px);
  1642. background: rgba(41, 45, 53, 0.4);
  1643. border-radius: 6px;
  1644. position: relative;
  1645. .hidBtn {
  1646. position: absolute;
  1647. left: 5px;
  1648. top: 5px;
  1649. width: 0;
  1650. height: 24px;
  1651. cursor: pointer;
  1652. }
  1653. }
  1654. .hover72Power {
  1655. .hidBtn {
  1656. width: 125px;
  1657. }
  1658. }
  1659. .monthPower {
  1660. .hidBtn {
  1661. width: 75px;
  1662. }
  1663. }
  1664. }
  1665. }
  1666. #sandTable.sand-table .curModal .el-dialog__body {
  1667. max-height: 600px;
  1668. overflow-y: scroll;
  1669. }
  1670. .exchange {
  1671. cursor: pointer;
  1672. }
  1673. .weatherBox {
  1674. width: 100%;
  1675. display: flex;
  1676. justify-content: space-around;
  1677. align-items: center;
  1678. .l,
  1679. .r {
  1680. width: 48%;
  1681. height: 500px;
  1682. padding: 50px 0;
  1683. }
  1684. .el-collapse {
  1685. border-top: 1px solid #999;
  1686. }
  1687. .el-collapse-item .el-collapse-item__wrap {
  1688. border-bottom: 1px solid #999;
  1689. }
  1690. .el-collapse-item__content {
  1691. background: rgba(18, 29, 28, 1);
  1692. color: rgba(255, 255, 255, 0.75);
  1693. padding: 20px;
  1694. }
  1695. .el-collapse-item__header {
  1696. background: rgb(18, 29, 28);
  1697. border-bottom: 1px solid #999;
  1698. color: rgba(255, 255, 255, 0.75);
  1699. }
  1700. .el-card__header,
  1701. .el-collapse,
  1702. .el-collapse-item__header {
  1703. border-bottom: 1px solid #999;
  1704. }
  1705. .collapseItemTitle {
  1706. display: flex;
  1707. justify-content: space-between;
  1708. align-items: center;
  1709. width: 100%;
  1710. .svg {
  1711. width: 20px;
  1712. height: 20px;
  1713. }
  1714. .info {
  1715. margin-left: 4px;
  1716. }
  1717. .otherWea {
  1718. margin-right: 10px;
  1719. }
  1720. }
  1721. .other-info {
  1722. text-align: center;
  1723. font-size: @fontsize-s;
  1724. .text {
  1725. color: @font-color;
  1726. font-size: 12px;
  1727. }
  1728. .value {
  1729. margin: 0.741vh 0 0 0;
  1730. }
  1731. .other-icon {
  1732. margin: 0 auto;
  1733. }
  1734. }
  1735. }
  1736. .videoBoxiframe {
  1737. border: none;
  1738. overflow: hidden;
  1739. cursor: pointer;
  1740. }
  1741. .modal {
  1742. .dialogTitle {
  1743. position: relative;
  1744. left: 10px;
  1745. }
  1746. .jumpBtn {
  1747. position: absolute;
  1748. right: 30px;
  1749. top: 8px;
  1750. cursor: pointer;
  1751. font-size: 20px;
  1752. }
  1753. .el-divider__text {
  1754. background: rgb(17, 28, 27);
  1755. color: #b3bdc0;
  1756. }
  1757. .el-divider {
  1758. background: #b3bdc0;
  1759. }
  1760. animation-duration: 0;
  1761. @keyframes dialog-fade-in {
  1762. 0% {
  1763. transform: translate3d(-1000%, -1000%, 0);
  1764. opacity: 0;
  1765. }
  1766. 100% {
  1767. transform: translate3d(-1000%, -1000%, 0);
  1768. opacity: 1;
  1769. }
  1770. }
  1771. @keyframes dialog-fade-out {
  1772. 0% {
  1773. // transform: translate3d(0, 0, 0);
  1774. transform: translate3d(-1000%, -1000%, 0);
  1775. opacity: 1;
  1776. }
  1777. 100% {
  1778. // transform: translate3d(0, -100%, 0);
  1779. transform: translate3d(-1000%, -1000%, 0);
  1780. opacity: 0;
  1781. }
  1782. }
  1783. }
  1784. .el-overlay{
  1785. .el-overlay-dialog{
  1786. .el-dialog{
  1787. .el-dialog__body{
  1788. padding-top: 0 !important;
  1789. .allStyle{
  1790. max-height: 55vh;
  1791. overflow: auto;
  1792. .radioGroupTime{
  1793. display: flex;
  1794. margin-bottom: 10px;
  1795. .el-date-editor{
  1796. margin-right: 10px;
  1797. }
  1798. }
  1799. .allMain{
  1800. .mainTit{
  1801. display: inline-block;
  1802. margin-left: 10px;
  1803. font-size: 20px;
  1804. color: #fff;
  1805. margin-bottom: 10px;
  1806. }
  1807. .allMsg{
  1808. width: 100%;
  1809. height: 500px;
  1810. display: flex;
  1811. .warnLine{
  1812. width: 60%;
  1813. height: 100%;
  1814. }
  1815. .warnPie{
  1816. width: 40%;
  1817. height: 100%;
  1818. }
  1819. }
  1820. }
  1821. }
  1822. }
  1823. }
  1824. }
  1825. }
  1826. </style>