SandTable.vue 58 KB

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