SandTable.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237
  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. let warnChartData = [];
  734. for (let key in res.data) {
  735. const ele = res.data[key];
  736. warnChartData.push({
  737. value: ele.count,
  738. name: ele.relatePartsText,
  739. });
  740. }
  741. // 这句warnChartData.pop();在项目演示结束后删除,因为条数过多,显示导致侧边栏和图表图层重合而加的
  742. warnChartData.pop();
  743. that.warnChartData = warnChartData;
  744. },
  745. });
  746. },
  747. // 获取故障玫瑰图
  748. getStopMGT() {
  749. let that = this;
  750. that.API.requestData({
  751. method: "GET",
  752. baseURL: "http://192.168.1.18:8075/",
  753. subUrl: "shutdown/count/alltotal",
  754. data: {
  755. stId: that.wpId,
  756. },
  757. success(res) {
  758. let warnChartData = [];
  759. for (let key in res.data) {
  760. const ele = res.data[key];
  761. warnChartData.push({
  762. value: ele.count,
  763. name: ele.type,
  764. });
  765. }
  766. that.warnChartData = warnChartData;
  767. },
  768. });
  769. },
  770. // 获取库存玫瑰图
  771. getRepertoryMGT() {
  772. let that = this;
  773. that.API.requestData({
  774. method: "GET",
  775. baseURL: "http://192.168.1.18:9988/",
  776. subUrl: "inventory/groupcount",
  777. data: {
  778. stId: that.wpId,
  779. },
  780. success(res) {
  781. let bjChartData = [];
  782. for (let key in res.data) {
  783. const ele = res.data[key];
  784. bjChartData.push({
  785. value: ele.curbal,
  786. name: ele.description,
  787. });
  788. }
  789. that.bjChartData = bjChartData;
  790. },
  791. });
  792. },
  793. // 获取记录玫瑰图
  794. getRecordMGT() {
  795. let that = this;
  796. that.API.requestData({
  797. method: "GET",
  798. baseURL: "http://192.168.1.18:9988/",
  799. subUrl: "equoperationrecord/equupdatecount",
  800. data: {
  801. stId: that.wpId,
  802. },
  803. success(res) {
  804. let bjChartData = [];
  805. for (let key in res.data) {
  806. const ele = res.data[key];
  807. bjChartData.push({
  808. value: ele.count,
  809. name: ele.description,
  810. });
  811. }
  812. that.bjChartData = bjChartData;
  813. },
  814. });
  815. },
  816. // 获取中部地图数据
  817. getTop4Info() {
  818. let that = this;
  819. that.API.requestData({
  820. method: "GET",
  821. baseURL: "http://192.168.1.18:9988/",
  822. subUrl: "equoperationrecord/top4",
  823. data: {
  824. stId: that.wpId,
  825. },
  826. success(res) {
  827. res.data.forEach((ele, index) => {
  828. ele.index = index;
  829. ele.jobcode = ele.jobcode || "------";
  830. });
  831. that.workData.data = res.data;
  832. },
  833. });
  834. },
  835. clickStopRow(row) {
  836. this.tableItem = row;
  837. this.showTableDialog = true;
  838. },
  839. clickHealthRow(row) {
  840. this.tableItem = row;
  841. this.showHealthDialog = true;
  842. },
  843. delaylyFn(time, fn) {
  844. setTimeout(() => {
  845. fn();
  846. }, time);
  847. },
  848. riseNumber(number) {
  849. // if (number < 0) {
  850. // return (number - number * 2) / 100;
  851. // } else {
  852. // return number / 100;
  853. // }
  854. return number / 100;
  855. },
  856. // 切换人员展示
  857. changePeople(index) {
  858. if (!this.peopleAnmLock && this.workDataIndex !== index) {
  859. this.peopleAnmLock = true;
  860. this.peopleClass = "fadeOutRight";
  861. setTimeout(() => {
  862. this.workDataIndex = index;
  863. this.peopleClass = "fadeInRight";
  864. this.peopleAnmLock = false;
  865. }, 150);
  866. }
  867. },
  868. // 点击风场或者光伏
  869. clickMapItem(videoArray) {
  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. },
  888. // 页面跳转
  889. jumpUrl(url) {
  890. this.$router.push(url);
  891. },
  892. when() {
  893. this.showPanel = true;
  894. },
  895. changeBjSwitch() {
  896. this.bjSwitch = !this.bjSwitch;
  897. if (this.bjSwitch) {
  898. this.getRecordMGT();
  899. } else {
  900. this.getRepertoryMGT();
  901. }
  902. },
  903. changeWarnSwitch() {
  904. this.warnSwitch = !this.warnSwitch;
  905. if (this.warnSwitch) {
  906. this.getStopMGT();
  907. } else {
  908. this.getWarnMGT();
  909. }
  910. },
  911. },
  912. // 生命周期钩子
  913. beforeCreate() {
  914. // 创建前
  915. },
  916. created() {
  917. this.getWtInfo();
  918. this.getWpHealthInfo();
  919. this.getTop4Info();
  920. this.getWarnMGT();
  921. this.getRepertoryMGT();
  922. this.timeStr = new Date().formatDate("MM-dd hh:mm");
  923. this.timmer1 = setInterval(() => {
  924. this.timeStr = new Date().formatDate("MM-dd hh:mm");
  925. });
  926. },
  927. beforeMount() {
  928. // 渲染前
  929. },
  930. mounted() {
  931. // 渲染后
  932. },
  933. beforeUpdate() {
  934. // 数据更新前
  935. },
  936. updated() {
  937. // 数据更新后
  938. },
  939. unmounted() {
  940. clearInterval(this.timmer1);
  941. this.timmer1 = null;
  942. },
  943. };
  944. </script>
  945. <style lang="less">
  946. .sand-table {
  947. width: 100%;
  948. height: 91.667vh;
  949. position: relative;
  950. .i3dback {
  951. position: fixed;
  952. z-index: -1;
  953. width: 100vw;
  954. height: 100vh;
  955. top: 0;
  956. left: 0;
  957. }
  958. .i3dcloud {
  959. position: absolute;
  960. z-index: 2;
  961. width: 100vw;
  962. height: 100vh;
  963. top: 0;
  964. left: 0;
  965. }
  966. .left-panel {
  967. width: 360px;
  968. }
  969. .right-panel {
  970. width: 36.852vh;
  971. }
  972. .three-model-layer {
  973. position: absolute;
  974. width: 100%;
  975. height: 100%;
  976. z-index: 1;
  977. }
  978. .sand-table-left {
  979. position: absolute;
  980. left: 0;
  981. top: 0;
  982. z-index: 2;
  983. }
  984. .sand-table-right {
  985. position: absolute;
  986. right: 0;
  987. top: 0;
  988. z-index: 2;
  989. }
  990. .sand-table-bottom {
  991. position: absolute;
  992. right: calc(50vw - 545px);
  993. bottom: 0;
  994. z-index: 2;
  995. display: flex;
  996. .stb-p {
  997. margin-left: 0.926vh;
  998. }
  999. }
  1000. .pre-img-box {
  1001. display: flex;
  1002. align-items: center;
  1003. justify-content: center;
  1004. margin-top: 0.556vh;
  1005. padding: 0;
  1006. position: relative;
  1007. cursor: pointer;
  1008. .sand-table-bottom {
  1009. position: absolute;
  1010. right: calc(50vw - 545px);
  1011. bottom: 0;
  1012. z-index: 2;
  1013. display: flex;
  1014. }
  1015. .mask {
  1016. position: absolute;
  1017. left: 0;
  1018. top: 0;
  1019. width: 100%;
  1020. height: 100%;
  1021. z-index: 5;
  1022. }
  1023. .pre-img {
  1024. position: relative;
  1025. width: 95%;
  1026. height: 8.657vh;
  1027. z-index: 4;
  1028. }
  1029. }
  1030. .person-info-box {
  1031. display: flex;
  1032. .header {
  1033. width: 75px;
  1034. }
  1035. }
  1036. .table {
  1037. width: calc(100% + 2.963vh);
  1038. margin-left: -1.481vh;
  1039. margin-bottom: -1.481vh;
  1040. tr {
  1041. cursor: pointer;
  1042. }
  1043. .com-table thead tr th,
  1044. .com-table tr td {
  1045. padding: 0.556vh 0;
  1046. color: #fff;
  1047. }
  1048. }
  1049. .animated.a0 {
  1050. animation-duration: 0.35s;
  1051. }
  1052. .animated.a1 {
  1053. animation-duration: 0.5s;
  1054. }
  1055. .el-overlay {
  1056. overflow: hidden;
  1057. }
  1058. }
  1059. .exchange {
  1060. cursor: pointer;
  1061. }
  1062. .weatherBox {
  1063. width: 100%;
  1064. display: flex;
  1065. justify-content: space-around;
  1066. align-items: center;
  1067. .l,
  1068. .r {
  1069. width: 48%;
  1070. height: 500px;
  1071. padding: 50px 0;
  1072. }
  1073. .el-collapse {
  1074. border-top: 1px solid #999;
  1075. }
  1076. .el-collapse-item .el-collapse-item__wrap {
  1077. border-bottom: 1px solid #999;
  1078. }
  1079. .el-collapse-item__content {
  1080. background: rgba(18, 29, 28);
  1081. color: rgba(255, 255, 255, 0.75);
  1082. padding: 20px;
  1083. }
  1084. .el-collapse-item__header {
  1085. background: rgb(18, 29, 28);
  1086. border-bottom: 1px solid #999;
  1087. color: rgba(255, 255, 255, 0.75);
  1088. }
  1089. .el-card__header,
  1090. .el-collapse,
  1091. .el-collapse-item__header {
  1092. border-bottom: 1px solid #999;
  1093. }
  1094. .collapseItemTitle {
  1095. display: flex;
  1096. justify-content: space-between;
  1097. align-items: center;
  1098. width: 100%;
  1099. .svg {
  1100. width: 20px;
  1101. height: 20px;
  1102. }
  1103. .info {
  1104. margin-left: 4px;
  1105. }
  1106. .otherWea {
  1107. margin-right: 10px;
  1108. }
  1109. }
  1110. .other-info {
  1111. text-align: center;
  1112. font-size: @fontsize-s;
  1113. .text {
  1114. color: @font-color;
  1115. font-size: 12px;
  1116. }
  1117. .value {
  1118. margin: 0.741vh 0 0 0;
  1119. }
  1120. .other-icon {
  1121. margin: 0 auto;
  1122. }
  1123. }
  1124. }
  1125. .videoBoxiframe {
  1126. border: none;
  1127. overflow: hidden;
  1128. cursor: pointer;
  1129. }
  1130. .modal {
  1131. .dialogTitle {
  1132. position: relative;
  1133. }
  1134. .jumpBtn {
  1135. position: absolute;
  1136. right: 30px;
  1137. top: 8px;
  1138. cursor: pointer;
  1139. font-size: 20px;
  1140. }
  1141. animation-duration: 0;
  1142. @keyframes dialog-fade-in {
  1143. 0% {
  1144. transform: translate3d(-1000%, -1000%, 0);
  1145. opacity: 0;
  1146. }
  1147. 100% {
  1148. transform: translate3d(-1000%, -1000%, 0);
  1149. opacity: 1;
  1150. }
  1151. }
  1152. @keyframes dialog-fade-out {
  1153. 0% {
  1154. // transform: translate3d(0, 0, 0);
  1155. transform: translate3d(-1000%, -1000%, 0);
  1156. opacity: 1;
  1157. }
  1158. 100% {
  1159. // transform: translate3d(0, -100%, 0);
  1160. transform: translate3d(-1000%, -1000%, 0);
  1161. opacity: 0;
  1162. }
  1163. }
  1164. }
  1165. </style>