SandTable.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240
  1. <template>
  2. <div class="sand-table">
  3. <img :src="require('@assets/png/3dback.png')" class="i3dback" />
  4. <!-- <img :src="require('@assets/png/3dcloud.png')" class="i3dcloud" /> -->
  5. <StBack></StBack>
  6. <ThreeModel1
  7. class="three-model-layer"
  8. :data="mapSource"
  9. @when="when"
  10. @clickMapItem="clickMapItem"
  11. ></ThreeModel1>
  12. <div class="sand-table-left" v-if="showPanel">
  13. <PanelSand
  14. class="left-panel"
  15. title="气象预测"
  16. :subTitle="timeStr + '实况'"
  17. >
  18. <weather
  19. class="pd-t-16"
  20. style="cursor: pointer"
  21. :data="tqmap1"
  22. @click="openWeatherDialog"
  23. />
  24. </PanelSand>
  25. <PanelSand class="left-panel mg-t-16" title="健康推荐">
  26. <RankTable :data="rmls" @rowClick="clickHealthRow"></RankTable>
  27. </PanelSand>
  28. <PanelSand class="left-panel mg-t-16" title="停机信息">
  29. <RankTable :data="sels" @rowClick="clickStopRow"></RankTable>
  30. <!-- <ComTable :data="sels"></ComTable> -->
  31. </PanelSand>
  32. <PanelSandToolbar class="left-panel mg-t-16" title="隐患情况">
  33. <template v-slot:tools>
  34. <div class="exchange" @click="changeWarnSwitch">
  35. <span :class="warnSwitch ? 'gray' : 'green'">预警</span>
  36. <i class="green fa fa-exchange mg-l-8 mg-r-8"></i>
  37. <span :class="warnSwitch ? 'green' : 'gray'">故障</span>
  38. </div>
  39. </template>
  40. <template v-slot:default>
  41. <RadarPieChart
  42. height="20.6vh"
  43. :list="warnChartData"
  44. title="隐患情况"
  45. />
  46. </template>
  47. </PanelSandToolbar>
  48. </div>
  49. <div class="sand-table-right" v-if="showPanel">
  50. <PanelSand class="right-panel" title="视频监控">
  51. <el-row v-for="(pItem, pIndex) in videoArray" :key="pIndex">
  52. <el-col
  53. :span="12"
  54. class="pre-img-box"
  55. v-for="(cItem, cIndex) in pItem"
  56. :key="cIndex"
  57. @click="openVideoDialog(cItem)"
  58. >
  59. <div class="mask"></div>
  60. <iframe
  61. class="pre-img videoBoxiframe"
  62. :class="cItem.class"
  63. width="95%"
  64. height="8.657vh"
  65. :src="cItem.url + cItem.token"
  66. v-if="cItem.switch"
  67. />
  68. </el-col>
  69. </el-row>
  70. </PanelSand>
  71. <PanelSand class="right-panel mg-t-16" title="工单管理">
  72. <div
  73. class="person-info-box mg-t-16 animated a0"
  74. :class="peopleClass"
  75. v-if="workData.data[0]"
  76. >
  77. <img
  78. class="header mg-r-8 bg-green"
  79. style="width: 75px; height: 75px; cursor: pointer"
  80. :src="workData.data[workDataIndex].imgurl"
  81. @click="jumpUrl('/health/frist?tab=2')"
  82. />
  83. <div class="person-info">
  84. <div class="green font-lg" style="font-weight: bold">
  85. {{ workData.data[workDataIndex].laborname }}
  86. </div>
  87. <div class="white font-sm">
  88. <span>职务:{{ workData.data[workDataIndex].jobcode }}</span>
  89. <!-- <span class="mg-l-16">当前任务编号 000000</span> -->
  90. </div>
  91. <div class="white font-sm">
  92. <!-- 平均检修时间 <span class="green">5</span> 小时 -->
  93. 开始时间
  94. <span class="green">{{
  95. workData.data[workDataIndex].starttime
  96. }}</span>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="table mg-t-8" style="min-height: 180px">
  101. <Table :data="workData" />
  102. </div>
  103. </PanelSand>
  104. <PanelSandToolbar class="right-panel mg-t-16" title="部件">
  105. <template v-slot:tools>
  106. <div class="exchange" @click="changeBjSwitch">
  107. <span :class="bjSwitch ? 'gray' : 'green'">库存</span>
  108. <i class="green fa fa-exchange mg-l-8 mg-r-8"></i>
  109. <span :class="bjSwitch ? 'green' : 'gray'">记录</span>
  110. </div>
  111. </template>
  112. <template v-slot:default>
  113. <RadarPieChart height="21vh" :list="bjChartData" title="部件情况" />
  114. </template>
  115. </PanelSandToolbar>
  116. </div>
  117. <div class="sand-table-bottom" v-if="showPanel">
  118. <Ppanel
  119. title="利用小时"
  120. :data="riseNumber(gxkmap.bg_dxkyss)"
  121. dataColor="#05BB4C"
  122. :days="gxkmap.ydxkyss"
  123. :data1Icon="
  124. gxkmap.tb_dxkyss < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'
  125. "
  126. :data1IconClass="
  127. gxkmap.tb_dxkyss < 0
  128. ? 'svg-icon-sm svg-icon-yellow'
  129. : 'svg-icon-sm svg-icon-green'
  130. "
  131. :data2Icon="
  132. gxkmap.hb_dxkyss < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'
  133. "
  134. :data2IconClass="
  135. gxkmap.hb_dxkyss < 0
  136. ? 'svg-icon-sm svg-icon-yellow'
  137. : 'svg-icon-sm svg-icon-green'
  138. "
  139. ></Ppanel>
  140. <Ppanel
  141. title="设备可利用率"
  142. class="stb-p"
  143. :data="riseNumber(gxkmap.bg_sbklyl)"
  144. dataColor="#05BB4C"
  145. :days="gxkmap.ysbklyl"
  146. :data1Icon="
  147. gxkmap.hb_sbklyl < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'
  148. "
  149. :data1IconClass="
  150. gxkmap.hb_sbklyl < 0
  151. ? 'svg-icon-sm svg-icon-yellow'
  152. : 'svg-icon-sm svg-icon-green'
  153. "
  154. :data2Icon="
  155. gxkmap.tb_sbklyl < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'
  156. "
  157. :data2IconClass="
  158. gxkmap.tb_sbklyl < 0
  159. ? 'svg-icon-sm svg-icon-yellow'
  160. : 'svg-icon-sm svg-icon-green'
  161. "
  162. ></Ppanel>
  163. <Ppanel
  164. title="MTBF"
  165. class="stb-p"
  166. :data="riseNumber(gxkmap.bg_mtbf)"
  167. dataColor="#05BB4C"
  168. :days="gxkmap.mtbf"
  169. :data1Icon="gxkmap.hb_mtbf < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'"
  170. :data1IconClass="
  171. gxkmap.hb_mtbf < 0
  172. ? 'svg-icon-sm svg-icon-yellow'
  173. : 'svg-icon-sm svg-icon-green'
  174. "
  175. :data2Icon="gxkmap.tb_mtbf < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'"
  176. :data2IconClass="
  177. gxkmap.tb_mtbf < 0
  178. ? 'svg-icon-sm svg-icon-yellow'
  179. : 'svg-icon-sm svg-icon-green'
  180. "
  181. ></Ppanel>
  182. <Ppanel
  183. title="MTTR"
  184. class="stb-p"
  185. :data="riseNumber(gxkmap.bg_mttr)"
  186. dataColor="#05BB4C"
  187. :days="gxkmap.mttr"
  188. :data1Icon="gxkmap.hb_mttr < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'"
  189. :data1IconClass="
  190. gxkmap.hb_mttr < 0
  191. ? 'svg-icon-sm svg-icon-yellow'
  192. : 'svg-icon-sm svg-icon-green'
  193. "
  194. :data2Icon="gxkmap.tb_mttr < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'"
  195. :data2IconClass="
  196. gxkmap.tb_mttr < 0
  197. ? 'svg-icon-sm svg-icon-yellow'
  198. : 'svg-icon-sm svg-icon-green'
  199. "
  200. ></Ppanel>
  201. <Ppanel
  202. title="MTTF"
  203. class="stb-p"
  204. :data="riseNumber(gxkmap.bg_mttf)"
  205. dataColor="#05BB4C"
  206. :days="gxkmap.mttf"
  207. :data1Icon="gxkmap.hb_mttf < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'"
  208. :data1IconClass="
  209. gxkmap.hb_mttf < 0
  210. ? 'svg-icon-sm svg-icon-yellow'
  211. : 'svg-icon-sm svg-icon-green'
  212. "
  213. :data2Icon="gxkmap.tb_mttf < 0 ? 'svg-arrow-dpwn-1' : 'svg-arrow-up-1'"
  214. :data2IconClass="
  215. gxkmap.tb_mttf < 0
  216. ? 'svg-icon-sm svg-icon-yellow'
  217. : 'svg-icon-sm svg-icon-green'
  218. "
  219. ></Ppanel>
  220. </div>
  221. <el-dialog
  222. title=""
  223. :custom-class="tableDialogClass"
  224. v-model="showHealthDialog"
  225. width="80%"
  226. :destroy-on-close="true"
  227. :before-close="
  228. (done) => {
  229. tableDialogClass = 'modal animated a1 fadeOutLeftBig';
  230. delaylyFn(450, done);
  231. }
  232. "
  233. @closed="
  234. dialogVideoUrl = '';
  235. tableDialogClass = 'modal animated a1 fadeInLeftBig';
  236. "
  237. >
  238. <template #title>
  239. <div class="dialogTitle">
  240. 健康推荐详情
  241. <i class="jumpBtn el-icon-more" @click="jumpUrl('/health/frist')"></i>
  242. </div>
  243. </template>
  244. <el-form style="margin: 30px 0" label-width="120px" inline>
  245. <el-form-item label="风机ID" style="width: 45%; margin-bottom: 25px">
  246. <el-input v-model="tableItem.wtId" readonly></el-input>
  247. </el-form-item>
  248. <el-form-item label="检修类型" style="width: 45%; margin-bottom: 25px">
  249. <el-input v-model="tableItem.operation" readonly></el-input>
  250. </el-form-item>
  251. <el-form-item label="推荐理由" style="width: 45%; margin-bottom: 25px">
  252. <el-input v-model="tableItem.reason" readonly></el-input>
  253. </el-form-item>
  254. <el-form-item label="推荐日期" style="width: 45%; margin-bottom: 25px">
  255. <el-input v-model="tableItem.recodedate" readonly></el-input>
  256. </el-form-item>
  257. <el-form-item label="风速" style="width: 45%; margin-bottom: 25px">
  258. <el-input v-model="tableItem.speed" readonly></el-input>
  259. </el-form-item>
  260. <el-form-item label="预警名称" style="width: 45%; margin-bottom: 25px">
  261. <el-input v-model="tableItem.typename" readonly></el-input>
  262. </el-form-item>
  263. </el-form>
  264. </el-dialog>
  265. <el-dialog
  266. title=""
  267. :custom-class="tableDialogClass"
  268. v-model="showTableDialog"
  269. width="80%"
  270. :destroy-on-close="true"
  271. :before-close="
  272. (done) => {
  273. tableDialogClass = 'modal animated a1 fadeOutLeftBig';
  274. delaylyFn(450, done);
  275. }
  276. "
  277. @closed="
  278. dialogVideoUrl = '';
  279. tableDialogClass = 'modal animated a1 fadeInLeftBig';
  280. "
  281. >
  282. <template #title>
  283. <div class="dialogTitle">
  284. 停机详情
  285. <i
  286. class="jumpBtn el-icon-more"
  287. @click="jumpUrl('/health/gzzd/malfunctionRecall')"
  288. ></i>
  289. </div>
  290. </template>
  291. <el-form style="margin: 30px 0" label-width="120px" inline>
  292. <el-form-item label="风机ID" style="width: 45%; margin-bottom: 25px">
  293. <el-input v-model="tableItem.windTurbineId" readonly></el-input>
  294. </el-form-item>
  295. <el-form-item label="所属风场" style="width: 45%; margin-bottom: 25px">
  296. <el-input v-model="tableItem.wpName" readonly></el-input>
  297. </el-form-item>
  298. <el-form-item label="停机类型" style="width: 45%; margin-bottom: 25px">
  299. <el-input v-model="tableItem.statusName" readonly></el-input>
  300. </el-form-item>
  301. <el-form-item label="停机时间" style="width: 45%; margin-bottom: 25px">
  302. <el-input v-model="tableItem.stopTime" readonly></el-input>
  303. </el-form-item>
  304. <el-form-item label="恢复时间" style="width: 45%; margin-bottom: 25px">
  305. <el-input v-model="tableItem.startTime" readonly></el-input>
  306. </el-form-item>
  307. <el-form-item
  308. label="停机时长(小时)"
  309. style="width: 45%; margin-bottom: 25px"
  310. >
  311. <el-input v-model="tableItem.stopHours" readonly></el-input>
  312. </el-form-item>
  313. </el-form>
  314. </el-dialog>
  315. <el-dialog
  316. title="天气详情"
  317. :custom-class="tableDialogClass"
  318. v-model="showWeatherDialog"
  319. width="80%"
  320. :destroy-on-close="true"
  321. :before-close="
  322. (done) => {
  323. tableDialogClass = 'modal animated a1 fadeOutLeftBig';
  324. delaylyFn(450, done);
  325. }
  326. "
  327. @closed="tableDialogClass = 'modal animated a1 fadeInLeftBig'"
  328. >
  329. <div class="weatherBox">
  330. <div class="l">
  331. <DoubleLineChart :height="'100%'" :list="weatherChart" />
  332. </div>
  333. <div class="r">
  334. <el-collapse
  335. style="height: 400px; overflow-y: scroll"
  336. v-model="weathercollapse"
  337. accordion
  338. >
  339. <el-collapse-item
  340. :name="index"
  341. v-for="(item, index) in tqmap5"
  342. :key="index"
  343. >
  344. <template #title>
  345. <div class="collapseItemTitle">
  346. {{ item.time }}
  347. <div
  348. style="
  349. display: flex;
  350. justify-content: start;
  351. align-items: center;
  352. "
  353. >
  354. <div class="icon svg-icon svg-icon-white">
  355. <SvgIcon class="svg" :svgid="'svg-' + item.tqtp" />
  356. </div>
  357. <div class="info">{{ item.sd }}% / {{ item.wd }}°C</div>
  358. </div>
  359. <div class="otherWea">{{ item.tqmc }}</div>
  360. </div>
  361. </template>
  362. <div class="other-info">
  363. <Row>
  364. <Col>
  365. <div class="svg-icon svg-icon-sm svg-icon-green other-icon">
  366. <svg-icon svgid="svg-能见度" />
  367. </div>
  368. <div class="value">{{ item.qxd }}</div>
  369. <div class="text">能见度</div>
  370. </Col>
  371. <Col>
  372. <div class="svg-icon svg-icon-sm svg-icon-green other-icon">
  373. <svg-icon svgid="svg-湿度" />
  374. </div>
  375. <div class="value">{{ item.sd }}</div>
  376. <div class="text">湿度</div>
  377. </Col>
  378. <Col>
  379. <div class="svg-icon svg-icon-sm svg-icon-green other-icon">
  380. <svg-icon svgid="svg-气压" />
  381. </div>
  382. <div class="value">{{ item.dqyl }}</div>
  383. <div class="text">气压</div>
  384. </Col>
  385. <Col>
  386. <div class="svg-icon svg-icon-sm svg-icon-green other-icon">
  387. <svg-icon svgid="svg-日出" />
  388. </div>
  389. <div class="value">{{ item.richushijian }}</div>
  390. <div class="text">日出时间</div>
  391. </Col>
  392. <Col>
  393. <div class="svg-icon svg-icon-sm svg-icon-green other-icon">
  394. <svg-icon svgid="svg-日落" />
  395. </div>
  396. <div class="value">{{ item.riluoshijian }}</div>
  397. <div class="text">日落时间</div>
  398. </Col>
  399. </Row>
  400. </div>
  401. </el-collapse-item>
  402. </el-collapse>
  403. </div>
  404. </div>
  405. </el-dialog>
  406. <el-dialog
  407. top="50px"
  408. title="查看视频"
  409. :custom-class="videoDialogClass"
  410. v-model="showVideoDialog"
  411. width="80%"
  412. :destroy-on-close="true"
  413. :before-close="
  414. (done) => {
  415. videoDialogClass = 'modal animated a1 bounceOut';
  416. delaylyFn(450, done);
  417. }
  418. "
  419. @closed="
  420. dialogVideoUrl = '';
  421. videoDialogClass = 'modal animated a1 bounceIn';
  422. "
  423. >
  424. <iframe
  425. class="videoBoxiframe"
  426. width="95%"
  427. height="800px"
  428. :src="dialogVideoUrl"
  429. />
  430. </el-dialog>
  431. </div>
  432. </template>
  433. <script>
  434. import ThreeModel1 from "./component/ThreeModel1.vue";
  435. import PanelSand from "@com/coms/panel/panel-sand.vue";
  436. import PanelSandToolbar from "@com/coms/panel/panel-sand-toolbar.vue";
  437. import Weather from "./component/weather.vue";
  438. import StBack from "./component/st-back.vue";
  439. import Table from "@com/coms/table/table.vue";
  440. import RankTable from "./component/rank-table.vue";
  441. import Ppanel from "./component/p-panel.vue";
  442. import RadarPieChart from "@com/chart/pie/radar-pie-chart.vue";
  443. import DoubleLineChart from "@com/chart/line/double-line-chart.vue";
  444. import Col from "@com/coms/grid/col.vue";
  445. import Row from "@com/coms/grid/row.vue";
  446. import SvgIcon from "@com/coms/icon/svg-icon.vue";
  447. export default {
  448. // 名称
  449. name: "SandTable",
  450. // 使用组件
  451. components: {
  452. ThreeModel1,
  453. PanelSand,
  454. PanelSandToolbar,
  455. Weather,
  456. Table,
  457. RadarPieChart,
  458. StBack,
  459. RankTable,
  460. Ppanel,
  461. DoubleLineChart,
  462. Col,
  463. Row,
  464. SvgIcon,
  465. },
  466. // 数据
  467. data() {
  468. const that = this;
  469. return {
  470. videoShow: true,
  471. showPanel: false,
  472. bjSwitch: false,
  473. warnSwitch: false,
  474. timmer1: null,
  475. showWeatherDialog: false,
  476. showTableDialog: false,
  477. showHealthDialog: false,
  478. weathercollapse: "",
  479. weatherChart: [
  480. {
  481. title: "温度",
  482. smooth: true,
  483. value: [],
  484. },
  485. {
  486. title: "湿度",
  487. smooth: true,
  488. value: [],
  489. },
  490. ],
  491. videoDialogClass: "modal animated a1 bounceIn",
  492. tableDialogClass: "modal animated a1 fadeInLeftBig",
  493. peopleClass: "",
  494. timeStr: "",
  495. wpId: "0",
  496. tqmap1: {},
  497. tqmap5: [],
  498. gxkmap: {},
  499. tableItem: {},
  500. mapSource: {},
  501. videoArray: [
  502. [
  503. {
  504. url: "http://10.155.32.4:9984/ws.html",
  505. token: "?token=SBQ_FDC_SC&autoplay=true",
  506. class: "",
  507. switch: true,
  508. },
  509. {
  510. url: "http://10.155.32.4:9984/ws.html",
  511. token: "?token=NSS_FDC_SC&autoplay=true",
  512. class: "",
  513. switch: true,
  514. },
  515. ],
  516. [
  517. {
  518. url: "http://10.155.32.4:9984/ws.html",
  519. token: "?token=QS_FDC_SC&autoplay=true",
  520. class: "",
  521. switch: true,
  522. },
  523. {
  524. url: "http://10.155.32.4:9984/ws.html",
  525. token: "?token=MHS_FDC_SC&autoplay=true",
  526. class: "",
  527. switch: true,
  528. },
  529. ],
  530. [
  531. {
  532. url: "http://10.155.32.4:9984/ws.html",
  533. token: "?token=XS_FDC_SC&autoplay=true",
  534. class: "",
  535. switch: true,
  536. },
  537. {
  538. url: "http://10.155.32.4:9984/ws.html",
  539. token: "?token=PL_GDC_SC&autoplay=true",
  540. class: "",
  541. switch: true,
  542. },
  543. ],
  544. ],
  545. showVideoDialog: false,
  546. dialogVideoUrl: "",
  547. warnChartData: [],
  548. bjChartData: [],
  549. ForecastPower: [
  550. {
  551. name: "今日预测电量",
  552. value: 103.62,
  553. total: 150,
  554. },
  555. {
  556. name: "月预测发电量",
  557. value: 98.62,
  558. total: 100,
  559. },
  560. ],
  561. workDataIndex: 0,
  562. workData: {
  563. column: [
  564. {
  565. name: "人员",
  566. field: "laborname",
  567. is_num: false,
  568. is_light: false,
  569. click(e, row) {
  570. that.changePeople(row.index);
  571. },
  572. },
  573. {
  574. name: "职务",
  575. field: "jobcode",
  576. is_num: false,
  577. is_light: false,
  578. click(e, row) {
  579. that.changePeople(row.index);
  580. },
  581. },
  582. {
  583. name: "开始时间",
  584. field: "starttime",
  585. width: "150px",
  586. is_num: false,
  587. is_light: false,
  588. click(e, row) {
  589. that.changePeople(row.index);
  590. },
  591. },
  592. {
  593. name: "原因",
  594. field: "problem",
  595. is_num: false,
  596. is_light: false,
  597. click(e, row) {
  598. that.changePeople(row.index);
  599. },
  600. },
  601. ],
  602. data: [],
  603. },
  604. sels: {
  605. column: [
  606. {
  607. name: "风机编号",
  608. field: "windPowerStationId",
  609. },
  610. {
  611. name: "停机时间",
  612. field: "stopTime",
  613. width: "120px",
  614. },
  615. {
  616. name: "停机时长",
  617. field: "stopHours",
  618. },
  619. ],
  620. data: [],
  621. },
  622. rmls: {
  623. column: [
  624. {
  625. name: "风机编号",
  626. field: "wtId",
  627. },
  628. {
  629. name: "推荐时间",
  630. field: "recodedate",
  631. width: "120px",
  632. },
  633. {
  634. name: "类型",
  635. field: "operation",
  636. },
  637. ],
  638. data: [],
  639. },
  640. };
  641. },
  642. // 函数
  643. methods: {
  644. openWeatherDialog() {
  645. this.showWeatherDialog = true;
  646. },
  647. openVideoDialog(item) {
  648. if (item.url && item.token) {
  649. this.dialogVideoUrl = item.url + item.token;
  650. this.showVideoDialog = true;
  651. }
  652. },
  653. getWtInfo() {
  654. let that = this;
  655. that.API.requestData({
  656. method: "POST",
  657. subUrl: "sandtable/findWtInfo",
  658. data: {
  659. wpId: that.wpId,
  660. },
  661. success(res) {
  662. res.data.tqmap5.ls.forEach((ele) => {
  663. ele.time = new Date(ele.time).formatDate("yyyy-MM-dd hh:mm");
  664. });
  665. const keys = ["wd", "sd"];
  666. let weatherChart = [
  667. {
  668. title: "温度",
  669. smooth: true,
  670. value: [],
  671. },
  672. {
  673. title: "湿度",
  674. smooth: true,
  675. value: [],
  676. },
  677. ];
  678. keys.forEach((key, keyIndex) => {
  679. res.data.tqmap5.ls.forEach((ele) => {
  680. weatherChart[keyIndex].value.push({
  681. text: ele.time,
  682. value: ele[key],
  683. });
  684. });
  685. });
  686. that.tqmap1 = res.data.tqmap1;
  687. that.tqmap5 = res.data.tqmap5.ls;
  688. res.data.sels.forEach((ele) => {
  689. ele.stopTime = new Date(ele.stopTime).formatDate(
  690. "yyyy-MM-dd hh:mm:ss"
  691. );
  692. ele.startTime = new Date(ele.stopTime).formatDate(
  693. "yyyy-MM-dd hh:mm:ss"
  694. );
  695. });
  696. res.data.rmls.forEach((ele) => {
  697. ele.recodedate = new Date(ele.recodedate).formatDate(
  698. "yyyy-MM-dd hh:mm:ss"
  699. );
  700. });
  701. that.sels.data = res.data.sels;
  702. that.rmls.data = res.data.rmls;
  703. that.gxkmap = res.data.gxkmap;
  704. that.weatherChart = weatherChart;
  705. },
  706. });
  707. },
  708. // 获取中部地图数据
  709. getWpHealthInfo() {
  710. let that = this;
  711. that.API.requestData({
  712. method: "POST",
  713. subUrl: "sandtable/judgeWpHealth",
  714. data: {
  715. wpId: that.wpId,
  716. },
  717. success(res) {
  718. that.mapSource = res.data;
  719. },
  720. });
  721. },
  722. // 获取报警玫瑰图
  723. getWarnMGT() {
  724. let that = this;
  725. that.API.requestData({
  726. method: "GET",
  727. baseURL: "http://192.168.1.18:8075/",
  728. subUrl: "alarm/count/query/alltotal",
  729. data: {
  730. stationid: that.wpId,
  731. },
  732. success(res) {
  733. console.log(res);
  734. let warnChartData = [];
  735. for (let key in res.data) {
  736. const ele = res.data[key];
  737. warnChartData.push({
  738. value: ele.count,
  739. name: ele.relatePartsText,
  740. });
  741. }
  742. that.warnChartData = warnChartData;
  743. },
  744. });
  745. },
  746. // 获取故障玫瑰图
  747. getStopMGT() {
  748. let that = this;
  749. that.API.requestData({
  750. method: "GET",
  751. baseURL: "http://192.168.1.18:8075/",
  752. subUrl: "shutdown/count/alltotal",
  753. data: {
  754. stId: that.wpId,
  755. },
  756. success(res) {
  757. let warnChartData = [];
  758. for (let key in res.data) {
  759. const ele = res.data[key];
  760. warnChartData.push({
  761. value: ele.count,
  762. name: ele.type,
  763. });
  764. }
  765. that.warnChartData = warnChartData;
  766. },
  767. });
  768. },
  769. // 获取库存玫瑰图
  770. getRepertoryMGT() {
  771. let that = this;
  772. that.API.requestData({
  773. method: "GET",
  774. baseURL: "http://192.168.1.18:9988/",
  775. subUrl: "inventory/groupcount",
  776. data: {
  777. stId: that.wpId,
  778. },
  779. success(res) {
  780. let bjChartData = [];
  781. for (let key in res.data) {
  782. const ele = res.data[key];
  783. bjChartData.push({
  784. value: ele.curbal,
  785. name: ele.description,
  786. });
  787. }
  788. that.bjChartData = bjChartData;
  789. },
  790. });
  791. },
  792. // 获取记录玫瑰图
  793. getRecordMGT() {
  794. let that = this;
  795. that.API.requestData({
  796. method: "GET",
  797. baseURL: "http://192.168.1.18:9988/",
  798. subUrl: "equoperationrecord/equupdatecount",
  799. data: {
  800. stId: that.wpId,
  801. },
  802. success(res) {
  803. let bjChartData = [];
  804. for (let key in res.data) {
  805. const ele = res.data[key];
  806. bjChartData.push({
  807. value: ele.count,
  808. name: ele.description,
  809. });
  810. }
  811. that.bjChartData = bjChartData;
  812. },
  813. });
  814. },
  815. // 获取中部地图数据
  816. getTop4Info() {
  817. let that = this;
  818. that.API.requestData({
  819. method: "GET",
  820. baseURL: "http://192.168.1.18:9988/",
  821. subUrl: "equoperationrecord/top4",
  822. data: {
  823. stId: that.wpId,
  824. },
  825. success(res) {
  826. res.data.forEach((ele, index) => {
  827. ele.index = index;
  828. ele.jobcode = ele.jobcode || "------";
  829. });
  830. that.workData.data = res.data;
  831. },
  832. });
  833. },
  834. clickStopRow(row) {
  835. this.tableItem = row;
  836. this.showTableDialog = true;
  837. },
  838. clickHealthRow(row) {
  839. this.tableItem = row;
  840. this.showHealthDialog = true;
  841. },
  842. delaylyFn(time, fn) {
  843. setTimeout(() => {
  844. fn();
  845. }, time);
  846. },
  847. riseNumber(number) {
  848. // if (number < 0) {
  849. // return (number - number * 2) / 100;
  850. // } else {
  851. // return number / 100;
  852. // }
  853. return number / 100;
  854. },
  855. // 切换人员展示
  856. changePeople(index) {
  857. if (!this.peopleAnmLock && this.workDataIndex !== index) {
  858. this.peopleAnmLock = true;
  859. this.peopleClass = "fadeOutRight";
  860. setTimeout(() => {
  861. this.workDataIndex = index;
  862. this.peopleClass = "fadeInRight";
  863. this.peopleAnmLock = false;
  864. }, 150);
  865. }
  866. },
  867. // 点击风场或者光伏
  868. clickMapItem(videoArray, wpId) {
  869. this.wpId = wpId;
  870. this.videoArray.forEach((pEle, pIndex) => {
  871. pEle.forEach((cEle, cIndex) => {
  872. setTimeout(() => {
  873. // 设置隐藏动画
  874. cEle.class = "animated a1 flipOutX";
  875. setTimeout(() => {
  876. // 修改 token
  877. cEle.token =
  878. "?token=" + videoArray[pIndex + cIndex] + "&autoplay=true";
  879. setTimeout(() => {
  880. // 设置显示动画
  881. cEle.class = "animated a1 flipInX";
  882. }, 150);
  883. }, 350);
  884. }, (pIndex + cIndex + pIndex) * 150);
  885. });
  886. });
  887. this.getWtInfo();
  888. this.getWpHealthInfo();
  889. this.getTop4Info();
  890. this.getWarnMGT();
  891. this.getRepertoryMGT();
  892. },
  893. // 页面跳转
  894. jumpUrl(url) {
  895. this.$router.push(url);
  896. },
  897. when() {
  898. this.showPanel = true;
  899. },
  900. changeBjSwitch() {
  901. this.bjSwitch = !this.bjSwitch;
  902. if (this.bjSwitch) {
  903. this.getRecordMGT();
  904. } else {
  905. this.getRepertoryMGT();
  906. }
  907. },
  908. changeWarnSwitch() {
  909. this.warnSwitch = !this.warnSwitch;
  910. if (this.warnSwitch) {
  911. this.getStopMGT();
  912. } else {
  913. this.getWarnMGT();
  914. }
  915. },
  916. },
  917. // 生命周期钩子
  918. beforeCreate() {
  919. // 创建前
  920. },
  921. created() {
  922. this.getWtInfo();
  923. this.getWpHealthInfo();
  924. this.getTop4Info();
  925. this.getWarnMGT();
  926. this.getRepertoryMGT();
  927. this.timeStr = new Date().formatDate("MM-dd hh:mm");
  928. this.timmer1 = setInterval(() => {
  929. this.timeStr = new Date().formatDate("MM-dd hh:mm");
  930. });
  931. },
  932. beforeMount() {
  933. // 渲染前
  934. },
  935. mounted() {
  936. // 渲染后
  937. },
  938. beforeUpdate() {
  939. // 数据更新前
  940. },
  941. updated() {
  942. // 数据更新后
  943. },
  944. unmounted() {
  945. clearInterval(this.timmer1);
  946. this.timmer1 = null;
  947. },
  948. };
  949. </script>
  950. <style lang="less">
  951. .sand-table {
  952. width: 100%;
  953. height: 91.667vh;
  954. position: relative;
  955. .i3dback {
  956. position: fixed;
  957. z-index: -1;
  958. width: 100vw;
  959. height: 100vh;
  960. top: 0;
  961. left: 0;
  962. }
  963. .i3dcloud {
  964. position: absolute;
  965. z-index: 2;
  966. width: 100vw;
  967. height: 100vh;
  968. top: 0;
  969. left: 0;
  970. }
  971. .left-panel {
  972. width: 360px;
  973. }
  974. .right-panel {
  975. width: 36.852vh;
  976. }
  977. .three-model-layer {
  978. position: absolute;
  979. width: 100%;
  980. height: 100%;
  981. z-index: 1;
  982. }
  983. .sand-table-left {
  984. position: absolute;
  985. left: 0;
  986. top: 0;
  987. z-index: 2;
  988. }
  989. .sand-table-right {
  990. position: absolute;
  991. right: 0;
  992. top: 0;
  993. z-index: 2;
  994. }
  995. .sand-table-bottom {
  996. position: absolute;
  997. right: calc(50vw - 545px);
  998. bottom: 0;
  999. z-index: 2;
  1000. display: flex;
  1001. .stb-p {
  1002. margin-left: 0.926vh;
  1003. }
  1004. }
  1005. .pre-img-box {
  1006. display: flex;
  1007. align-items: center;
  1008. justify-content: center;
  1009. margin-top: 0.556vh;
  1010. padding: 0;
  1011. position: relative;
  1012. cursor: pointer;
  1013. .sand-table-bottom {
  1014. position: absolute;
  1015. right: calc(50vw - 545px);
  1016. bottom: 0;
  1017. z-index: 2;
  1018. display: flex;
  1019. }
  1020. .mask {
  1021. position: absolute;
  1022. left: 0;
  1023. top: 0;
  1024. width: 100%;
  1025. height: 100%;
  1026. z-index: 5;
  1027. }
  1028. .pre-img {
  1029. position: relative;
  1030. width: 95%;
  1031. height: 8.657vh;
  1032. z-index: 4;
  1033. }
  1034. }
  1035. .person-info-box {
  1036. display: flex;
  1037. .header {
  1038. width: 75px;
  1039. }
  1040. }
  1041. .table {
  1042. width: calc(100% + 2.963vh);
  1043. margin-left: -1.481vh;
  1044. margin-bottom: -1.481vh;
  1045. tr {
  1046. cursor: pointer;
  1047. }
  1048. .com-table thead tr th,
  1049. .com-table tr td {
  1050. padding: 0.556vh 0;
  1051. color: #fff;
  1052. }
  1053. }
  1054. .animated.a0 {
  1055. animation-duration: 0.35s;
  1056. }
  1057. .animated.a1 {
  1058. animation-duration: 0.5s;
  1059. }
  1060. .el-overlay {
  1061. overflow: hidden;
  1062. }
  1063. }
  1064. .exchange {
  1065. cursor: pointer;
  1066. }
  1067. .weatherBox {
  1068. width: 100%;
  1069. display: flex;
  1070. justify-content: space-around;
  1071. align-items: center;
  1072. .l,
  1073. .r {
  1074. width: 48%;
  1075. height: 500px;
  1076. padding: 50px 0;
  1077. }
  1078. .el-collapse {
  1079. border-top: 1px solid #999;
  1080. }
  1081. .el-collapse-item .el-collapse-item__wrap {
  1082. border-bottom: 1px solid #999;
  1083. }
  1084. .el-collapse-item__content {
  1085. background: rgba(18, 29, 28);
  1086. color: rgba(255, 255, 255, 0.75);
  1087. padding: 20px;
  1088. }
  1089. .el-collapse-item__header {
  1090. background: rgb(18, 29, 28);
  1091. border-bottom: 1px solid #999;
  1092. color: rgba(255, 255, 255, 0.75);
  1093. }
  1094. .el-card__header,
  1095. .el-collapse,
  1096. .el-collapse-item__header {
  1097. border-bottom: 1px solid #999;
  1098. }
  1099. .collapseItemTitle {
  1100. display: flex;
  1101. justify-content: space-between;
  1102. align-items: center;
  1103. width: 100%;
  1104. .svg {
  1105. width: 20px;
  1106. height: 20px;
  1107. }
  1108. .info {
  1109. margin-left: 4px;
  1110. }
  1111. .otherWea {
  1112. margin-right: 10px;
  1113. }
  1114. }
  1115. .other-info {
  1116. text-align: center;
  1117. font-size: @fontsize-s;
  1118. .text {
  1119. color: @font-color;
  1120. font-size: 12px;
  1121. }
  1122. .value {
  1123. margin: 0.741vh 0 0 0;
  1124. }
  1125. .other-icon {
  1126. margin: 0 auto;
  1127. }
  1128. }
  1129. }
  1130. .videoBoxiframe {
  1131. border: none;
  1132. overflow: hidden;
  1133. cursor: pointer;
  1134. }
  1135. .modal {
  1136. .dialogTitle {
  1137. position: relative;
  1138. }
  1139. .jumpBtn {
  1140. position: absolute;
  1141. right: 30px;
  1142. top: 8px;
  1143. cursor: pointer;
  1144. font-size: 20px;
  1145. }
  1146. animation-duration: 0;
  1147. @keyframes dialog-fade-in {
  1148. 0% {
  1149. transform: translate3d(-1000%, -1000%, 0);
  1150. opacity: 0;
  1151. }
  1152. 100% {
  1153. transform: translate3d(-1000%, -1000%, 0);
  1154. opacity: 1;
  1155. }
  1156. }
  1157. @keyframes dialog-fade-out {
  1158. 0% {
  1159. // transform: translate3d(0, 0, 0);
  1160. transform: translate3d(-1000%, -1000%, 0);
  1161. opacity: 1;
  1162. }
  1163. 100% {
  1164. // transform: translate3d(0, -100%, 0);
  1165. transform: translate3d(-1000%, -1000%, 0);
  1166. opacity: 0;
  1167. }
  1168. }
  1169. }
  1170. </style>