SandTable.vue 37 KB

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