SandTable.vue 72 KB

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