SandTable.vue 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322
  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. </div>
  464. </template>
  465. <script>
  466. import ThreeModel1 from "./component/ThreeModel1.vue";
  467. import PanelSand from "@com/coms/panel/panel-sand.vue";
  468. import PanelSandToolbar from "@com/coms/panel/panel-sand-toolbar.vue";
  469. import Weather from "./component/weather.vue";
  470. import StBack from "./component/st-back.vue";
  471. import Table from "@com/coms/table/table.vue";
  472. import RankTable from "./component/rank-table.vue";
  473. import Ppanel from "./component/p-panel.vue";
  474. import RadarPieChart from "@com/chart/pie/radar-pie-chart.vue";
  475. import DoubleLineChart from "@com/chart/line/double-line-chart.vue";
  476. import Col from "@com/coms/grid/col.vue";
  477. import Row from "@com/coms/grid/row.vue";
  478. import SvgIcon from "@com/coms/icon/svg-icon.vue";
  479. import hlsVideo from "./component/hls.vue";
  480. export default {
  481. // 名称
  482. name: "SandTable",
  483. // 使用组件
  484. components: {
  485. ThreeModel1,
  486. PanelSand,
  487. PanelSandToolbar,
  488. Weather,
  489. Table,
  490. RadarPieChart,
  491. StBack,
  492. RankTable,
  493. Ppanel,
  494. DoubleLineChart,
  495. Col,
  496. Row,
  497. SvgIcon,
  498. hlsVideo,
  499. },
  500. // 数据
  501. data() {
  502. const that = this;
  503. return {
  504. videoShow: true,
  505. showPanel: false,
  506. bjSwitch: false,
  507. warnSwitch: false,
  508. timmer1: null,
  509. showWeatherDialog: false,
  510. showTableDialog: false,
  511. showHealthDialog: false,
  512. weathercollapse: "",
  513. weatherChart: [
  514. {
  515. title: "温度",
  516. smooth: true,
  517. value: [],
  518. },
  519. {
  520. title: "湿度",
  521. smooth: true,
  522. value: [],
  523. },
  524. ],
  525. videoDialogClass: "modal animated a1 bounceIn",
  526. tableDialogClass: "modal animated a1 fadeInLeftBig",
  527. peopleClass: "",
  528. timeStr: "",
  529. wpId: "0",
  530. tqmap1: {},
  531. tqmap5: [],
  532. gxkmap: {},
  533. tableItem: {},
  534. mapSource: {},
  535. videoArray1: [
  536. // [
  537. // { code: "NSS_FDC_ZK", class: "", switch: true },
  538. // { code: "NSS_FDC_ZK", class: "", switch: true },
  539. // ],
  540. // [
  541. // { code: "NSS_FDC_ZK", class: "", switch: true },
  542. // { code: "QS_FDC_ZK", class: "", switch: true },
  543. // ],
  544. // [
  545. // { code: "QS_FDC_ZK", class: "", switch: true },
  546. // { code: "QS_FDC_ZK", class: "", switch: true },
  547. // ],
  548. [
  549. { code: "SBQ_FDC_SC", class: "", switch: true },
  550. { code: "NSS_FDC_SC", class: "", switch: true },
  551. ],
  552. [
  553. { code: "QS_FDC_SC", class: "", switch: true },
  554. { code: "MHS_FDC_SC", class: "", switch: true },
  555. ],
  556. [
  557. { code: "XS_FDC_SC", class: "", switch: true },
  558. { code: "PL_GDC_SC", class: "", switch: true },
  559. ],
  560. ],
  561. videoArray: [
  562. [
  563. {
  564. url: "http://10.155.32.4:9984/ws.html",
  565. token: "?token=SBQ_FDC_SC&autoplay=true",
  566. class: "",
  567. switch: true,
  568. },
  569. {
  570. url: "http://10.155.32.4:9984/ws.html",
  571. token: "?token=NSS_FDC_SC&autoplay=true",
  572. class: "",
  573. switch: true,
  574. },
  575. ],
  576. [
  577. {
  578. url: "http://10.155.32.4:9984/ws.html",
  579. token: "?token=QS_FDC_SC&autoplay=true",
  580. class: "",
  581. switch: true,
  582. },
  583. {
  584. url: "http://10.155.32.4:9984/ws.html",
  585. token: "?token=MHS_FDC_SC&autoplay=true",
  586. class: "",
  587. switch: true,
  588. },
  589. ],
  590. [
  591. {
  592. url: "http://10.155.32.4:9984/ws.html",
  593. token: "?token=XS_FDC_SC&autoplay=true",
  594. class: "",
  595. switch: true,
  596. },
  597. {
  598. url: "http://10.155.32.4:9984/ws.html",
  599. token: "?token=PL_GDC_SC&autoplay=true",
  600. class: "",
  601. switch: true,
  602. },
  603. ],
  604. ],
  605. showVideoDialog: false,
  606. dialogVideoUrl: "",
  607. warnChartData: [],
  608. bjChartData: [],
  609. ForecastPower: [
  610. {
  611. name: "今日预测电量",
  612. value: 103.62,
  613. total: 150,
  614. },
  615. {
  616. name: "月预测发电量",
  617. value: 98.62,
  618. total: 100,
  619. },
  620. ],
  621. workDataIndex: 0,
  622. workData: {
  623. column: [
  624. {
  625. name: "人员",
  626. field: "laborname",
  627. is_num: false,
  628. is_light: false,
  629. click(e, row) {
  630. that.changePeople(row.index);
  631. },
  632. },
  633. {
  634. name: "职务",
  635. field: "jobcode",
  636. is_num: false,
  637. is_light: false,
  638. click(e, row) {
  639. that.changePeople(row.index);
  640. },
  641. },
  642. {
  643. name: "开始时间",
  644. field: "starttime",
  645. width: "150px",
  646. is_num: false,
  647. is_light: false,
  648. click(e, row) {
  649. that.changePeople(row.index);
  650. },
  651. },
  652. {
  653. name: "原因",
  654. field: "problem",
  655. is_num: false,
  656. is_light: false,
  657. click(e, row) {
  658. that.changePeople(row.index);
  659. },
  660. },
  661. ],
  662. data: [],
  663. },
  664. sels: {
  665. column: [
  666. {
  667. name: "风机编号",
  668. field: "windPowerStationId",
  669. },
  670. {
  671. name: "停机时间",
  672. field: "stopTime",
  673. width: "120px",
  674. },
  675. {
  676. name: "停机时长",
  677. field: "stopHours",
  678. },
  679. ],
  680. data: [],
  681. },
  682. rmls: {
  683. column: [
  684. {
  685. name: "风机编号",
  686. field: "wtId",
  687. },
  688. {
  689. name: "推荐时间",
  690. field: "recodedate",
  691. width: "120px",
  692. },
  693. {
  694. name: "类型",
  695. field: "operation",
  696. },
  697. ],
  698. data: [],
  699. },
  700. };
  701. },
  702. // 函数
  703. methods: {
  704. openWeatherDialog() {
  705. this.showWeatherDialog = true;
  706. },
  707. openVideoDialog(item) {
  708. if (item.url && item.token) {
  709. this.dialogVideoUrl = item.url + item.token;
  710. this.showVideoDialog = true;
  711. }
  712. },
  713. openVideoDialog1(item) {
  714. if (item.code) {
  715. this.dialogVideoUrl = item.code;
  716. this.showVideoDialog = true;
  717. }
  718. },
  719. getWtInfo() {
  720. let that = this;
  721. that.API.requestData({
  722. method: "POST",
  723. subUrl: "sandtable/findWtInfo",
  724. data: {
  725. wpId: that.wpId,
  726. },
  727. success(res) {
  728. res.data.tqmap5.ls.forEach((ele) => {
  729. ele.time = new Date(ele.time).formatDate("yyyy-MM-dd hh:mm");
  730. });
  731. const keys = ["wd", "sd"];
  732. let weatherChart = [
  733. {
  734. title: "温度",
  735. smooth: true,
  736. value: [],
  737. },
  738. {
  739. title: "湿度",
  740. smooth: true,
  741. value: [],
  742. },
  743. ];
  744. keys.forEach((key, keyIndex) => {
  745. res.data.tqmap5.ls.forEach((ele) => {
  746. weatherChart[keyIndex].value.push({
  747. text: ele.time,
  748. value: ele[key],
  749. });
  750. });
  751. });
  752. that.tqmap1 = res.data.tqmap1;
  753. that.tqmap5 = res.data.tqmap5.ls;
  754. res.data.sels.forEach((ele) => {
  755. ele.stopTime = new Date(ele.stopTime).formatDate(
  756. "yyyy-MM-dd hh:mm:ss"
  757. );
  758. ele.startTime = new Date(ele.stopTime).formatDate(
  759. "yyyy-MM-dd hh:mm:ss"
  760. );
  761. });
  762. res.data.rmls.forEach((ele) => {
  763. ele.recodedate = new Date(ele.recodedate).formatDate(
  764. "yyyy-MM-dd hh:mm:ss"
  765. );
  766. });
  767. that.sels.data = res.data.sels;
  768. that.rmls.data = res.data.rmls;
  769. that.gxkmap = res.data.gxkmap;
  770. that.weatherChart = weatherChart;
  771. },
  772. });
  773. },
  774. // 获取中部地图数据
  775. getWpHealthInfo() {
  776. let that = this;
  777. that.API.requestData({
  778. method: "POST",
  779. subUrl: "sandtable/judgeWpHealth",
  780. data: {
  781. wpId: that.wpId,
  782. },
  783. success(res) {
  784. that.mapSource = res.data;
  785. },
  786. });
  787. },
  788. // 获取报警玫瑰图
  789. getWarnMGT() {
  790. let that = this;
  791. that.API.requestData({
  792. method: "GET",
  793. baseURL: "http://192.168.1.18:8075/",
  794. subUrl: "alarm/count/query/alltotal",
  795. data: {
  796. stationid: that.wpId,
  797. },
  798. success(res) {
  799. let warnChartData = [];
  800. for (let key in res.data) {
  801. const ele = res.data[key];
  802. warnChartData.push({
  803. value: ele.count,
  804. name: ele.relatePartsText,
  805. });
  806. }
  807. that.warnChartData = warnChartData;
  808. },
  809. });
  810. },
  811. // 获取故障玫瑰图
  812. getStopMGT() {
  813. let that = this;
  814. that.API.requestData({
  815. method: "GET",
  816. baseURL: "http://192.168.1.18:8075/",
  817. subUrl: "shutdown/count/alltotal",
  818. data: {
  819. stId: that.wpId,
  820. },
  821. success(res) {
  822. let warnChartData = [];
  823. for (let key in res.data) {
  824. const ele = res.data[key];
  825. warnChartData.push({
  826. value: ele.count,
  827. name: ele.type,
  828. });
  829. }
  830. that.warnChartData = warnChartData;
  831. },
  832. });
  833. },
  834. // 获取库存玫瑰图
  835. getRepertoryMGT() {
  836. let that = this;
  837. that.API.requestData({
  838. method: "GET",
  839. baseURL: "http://192.168.1.18:9988/",
  840. subUrl: "inventory/groupcount",
  841. data: {
  842. stId: that.wpId,
  843. },
  844. success(res) {
  845. let bjChartData = [];
  846. for (let key in res.data) {
  847. const ele = res.data[key];
  848. bjChartData.push({
  849. value: ele.curbal,
  850. name: ele.description,
  851. });
  852. }
  853. that.bjChartData = bjChartData;
  854. },
  855. });
  856. },
  857. // 获取记录玫瑰图
  858. getRecordMGT() {
  859. let that = this;
  860. that.API.requestData({
  861. method: "GET",
  862. baseURL: "http://192.168.1.18:9988/",
  863. subUrl: "equoperationrecord/equupdatecount",
  864. data: {
  865. stId: that.wpId,
  866. },
  867. success(res) {
  868. let bjChartData = [];
  869. for (let key in res.data) {
  870. const ele = res.data[key];
  871. bjChartData.push({
  872. value: ele.count,
  873. name: ele.description,
  874. });
  875. }
  876. that.bjChartData = bjChartData;
  877. },
  878. });
  879. },
  880. // 获取中部地图数据
  881. getTop4Info() {
  882. let that = this;
  883. that.API.requestData({
  884. method: "GET",
  885. baseURL: "http://192.168.1.18:9988/",
  886. subUrl: "equoperationrecord/top4",
  887. data: {
  888. stId: that.wpId,
  889. },
  890. success(res) {
  891. res.data.forEach((ele, index) => {
  892. ele.index = index;
  893. ele.jobcode = ele.jobcode || "------";
  894. });
  895. that.workData.data = res.data;
  896. },
  897. });
  898. },
  899. clickStopRow(row) {
  900. this.tableItem = row;
  901. this.showTableDialog = true;
  902. },
  903. clickHealthRow(row) {
  904. this.tableItem = row;
  905. this.showHealthDialog = true;
  906. },
  907. delaylyFn(time, fn) {
  908. setTimeout(() => {
  909. fn();
  910. }, time);
  911. },
  912. riseNumber(number) {
  913. // if (number < 0) {
  914. // return (number - number * 2) / 100;
  915. // } else {
  916. // return number / 100;
  917. // }
  918. return number / 100;
  919. },
  920. // 切换人员展示
  921. changePeople(index) {
  922. if (!this.peopleAnmLock && this.workDataIndex !== index) {
  923. this.peopleAnmLock = true;
  924. this.peopleClass = "fadeOutRight";
  925. setTimeout(() => {
  926. this.workDataIndex = index;
  927. this.peopleClass = "fadeInRight";
  928. this.peopleAnmLock = false;
  929. }, 150);
  930. }
  931. },
  932. // 点击风场或者光伏
  933. clickMapItem(videoArray, wpId) {
  934. this.wpId = wpId;
  935. // this.videoArray.forEach((pEle, pIndex) => {
  936. // pEle.forEach((cEle, cIndex) => {
  937. // setTimeout(() => {
  938. // // 设置隐藏动画
  939. // cEle.class = "animated a1 flipOutX";
  940. // setTimeout(() => {
  941. // // 修改 token
  942. // cEle.token =
  943. // "?token=" + videoArray[pIndex + cIndex] + "&autoplay=true";
  944. // setTimeout(() => {
  945. // // 设置显示动画
  946. // cEle.class = "animated a1 flipInX";
  947. // }, 150);
  948. // }, 350);
  949. // }, (pIndex + cIndex + pIndex) * 150);
  950. // });
  951. // });
  952. this.videoArray1.forEach((pEle, pIndex) => {
  953. pEle.forEach((cEle, cIndex) => {
  954. setTimeout(() => {
  955. // 设置隐藏动画
  956. cEle.class = "animated a1 flipOutX";
  957. setTimeout(() => {
  958. // 修改 token
  959. cEle.code = videoArray[pIndex + cIndex];
  960. setTimeout(() => {
  961. // 设置显示动画
  962. cEle.class = "animated a1 flipInX";
  963. }, 150);
  964. }, 350);
  965. }, (pIndex + cIndex + pIndex) * 150);
  966. });
  967. });
  968. this.getWtInfo();
  969. this.getWpHealthInfo();
  970. this.getTop4Info();
  971. this.getWarnMGT();
  972. this.getRepertoryMGT();
  973. },
  974. // 页面跳转
  975. jumpUrl(url) {
  976. this.$router.push(url);
  977. },
  978. when() {
  979. this.showPanel = true;
  980. },
  981. changeBjSwitch() {
  982. this.bjSwitch = !this.bjSwitch;
  983. if (this.bjSwitch) {
  984. this.getRecordMGT();
  985. } else {
  986. this.getRepertoryMGT();
  987. }
  988. },
  989. changeWarnSwitch() {
  990. this.warnSwitch = !this.warnSwitch;
  991. if (this.warnSwitch) {
  992. this.getStopMGT();
  993. } else {
  994. this.getWarnMGT();
  995. }
  996. },
  997. },
  998. // 生命周期钩子
  999. beforeCreate() {
  1000. // 创建前
  1001. },
  1002. created() {
  1003. this.getWtInfo();
  1004. this.getWpHealthInfo();
  1005. this.getTop4Info();
  1006. this.getWarnMGT();
  1007. this.getRepertoryMGT();
  1008. this.timeStr = new Date().formatDate("MM-dd hh:mm");
  1009. this.timmer1 = setInterval(() => {
  1010. this.timeStr = new Date().formatDate("MM-dd hh:mm");
  1011. });
  1012. },
  1013. beforeMount() {
  1014. // 渲染前
  1015. },
  1016. mounted() {
  1017. // 渲染后
  1018. },
  1019. beforeUpdate() {
  1020. // 数据更新前
  1021. },
  1022. updated() {
  1023. // 数据更新后
  1024. },
  1025. unmounted() {
  1026. clearInterval(this.timmer1);
  1027. this.timmer1 = null;
  1028. },
  1029. };
  1030. </script>
  1031. <style lang="less">
  1032. .sand-table {
  1033. width: 100%;
  1034. height: 91.667vh;
  1035. position: relative;
  1036. .i3dback {
  1037. position: fixed;
  1038. z-index: -1;
  1039. width: 100vw;
  1040. height: 100vh;
  1041. top: 0;
  1042. left: 0;
  1043. }
  1044. .i3dcloud {
  1045. position: absolute;
  1046. z-index: 2;
  1047. width: 100vw;
  1048. height: 100vh;
  1049. top: 0;
  1050. left: 0;
  1051. }
  1052. .left-panel {
  1053. width: 360px;
  1054. }
  1055. .right-panel {
  1056. width: 36.852vh;
  1057. }
  1058. .three-model-layer {
  1059. position: absolute;
  1060. width: 100%;
  1061. height: 100%;
  1062. z-index: 1;
  1063. }
  1064. .sand-table-left {
  1065. position: absolute;
  1066. left: 0;
  1067. top: 0;
  1068. z-index: 2;
  1069. }
  1070. .sand-table-right {
  1071. position: absolute;
  1072. right: 0;
  1073. top: 0;
  1074. z-index: 2;
  1075. }
  1076. .sand-table-bottom {
  1077. position: absolute;
  1078. right: calc(50vw - 545px);
  1079. bottom: 0;
  1080. z-index: 2;
  1081. display: flex;
  1082. .stb-p {
  1083. margin-left: 0.926vh;
  1084. }
  1085. }
  1086. .pre-img-box {
  1087. display: flex;
  1088. align-items: center;
  1089. justify-content: center;
  1090. margin-top: 0.556vh;
  1091. padding: 0;
  1092. position: relative;
  1093. cursor: pointer;
  1094. .sand-table-bottom {
  1095. position: absolute;
  1096. right: calc(50vw - 545px);
  1097. bottom: 0;
  1098. z-index: 2;
  1099. display: flex;
  1100. }
  1101. .mask {
  1102. position: absolute;
  1103. left: 0;
  1104. top: 0;
  1105. width: 100%;
  1106. height: 100%;
  1107. z-index: 5;
  1108. }
  1109. .pre-img {
  1110. position: relative;
  1111. width: 95%;
  1112. height: 8.657vh;
  1113. z-index: 4;
  1114. }
  1115. }
  1116. .person-info-box {
  1117. display: flex;
  1118. .header {
  1119. width: 75px;
  1120. }
  1121. }
  1122. .table {
  1123. width: calc(100% + 2.963vh);
  1124. margin-left: -1.481vh;
  1125. margin-bottom: -1.481vh;
  1126. tr {
  1127. cursor: pointer;
  1128. }
  1129. .com-table thead tr th,
  1130. .com-table tr td {
  1131. padding: 0.556vh 0;
  1132. color: #fff;
  1133. }
  1134. }
  1135. .animated.a0 {
  1136. animation-duration: 0.35s;
  1137. }
  1138. .animated.a1 {
  1139. animation-duration: 0.5s;
  1140. }
  1141. .el-overlay {
  1142. overflow: hidden;
  1143. }
  1144. }
  1145. .exchange {
  1146. cursor: pointer;
  1147. }
  1148. .weatherBox {
  1149. width: 100%;
  1150. display: flex;
  1151. justify-content: space-around;
  1152. align-items: center;
  1153. .l,
  1154. .r {
  1155. width: 48%;
  1156. height: 500px;
  1157. padding: 50px 0;
  1158. }
  1159. .el-collapse {
  1160. border-top: 1px solid #999;
  1161. }
  1162. .el-collapse-item .el-collapse-item__wrap {
  1163. border-bottom: 1px solid #999;
  1164. }
  1165. .el-collapse-item__content {
  1166. background: rgba(18, 29, 28);
  1167. color: rgba(255, 255, 255, 0.75);
  1168. padding: 20px;
  1169. }
  1170. .el-collapse-item__header {
  1171. background: rgb(18, 29, 28);
  1172. border-bottom: 1px solid #999;
  1173. color: rgba(255, 255, 255, 0.75);
  1174. }
  1175. .el-card__header,
  1176. .el-collapse,
  1177. .el-collapse-item__header {
  1178. border-bottom: 1px solid #999;
  1179. }
  1180. .collapseItemTitle {
  1181. display: flex;
  1182. justify-content: space-between;
  1183. align-items: center;
  1184. width: 100%;
  1185. .svg {
  1186. width: 20px;
  1187. height: 20px;
  1188. }
  1189. .info {
  1190. margin-left: 4px;
  1191. }
  1192. .otherWea {
  1193. margin-right: 10px;
  1194. }
  1195. }
  1196. .other-info {
  1197. text-align: center;
  1198. font-size: @fontsize-s;
  1199. .text {
  1200. color: @font-color;
  1201. font-size: 12px;
  1202. }
  1203. .value {
  1204. margin: 0.741vh 0 0 0;
  1205. }
  1206. .other-icon {
  1207. margin: 0 auto;
  1208. }
  1209. }
  1210. }
  1211. .videoBoxiframe {
  1212. border: none;
  1213. overflow: hidden;
  1214. cursor: pointer;
  1215. }
  1216. .modal {
  1217. .dialogTitle {
  1218. position: relative;
  1219. }
  1220. .jumpBtn {
  1221. position: absolute;
  1222. right: 30px;
  1223. top: 8px;
  1224. cursor: pointer;
  1225. font-size: 20px;
  1226. }
  1227. animation-duration: 0;
  1228. @keyframes dialog-fade-in {
  1229. 0% {
  1230. transform: translate3d(-1000%, -1000%, 0);
  1231. opacity: 0;
  1232. }
  1233. 100% {
  1234. transform: translate3d(-1000%, -1000%, 0);
  1235. opacity: 1;
  1236. }
  1237. }
  1238. @keyframes dialog-fade-out {
  1239. 0% {
  1240. // transform: translate3d(0, 0, 0);
  1241. transform: translate3d(-1000%, -1000%, 0);
  1242. opacity: 1;
  1243. }
  1244. 100% {
  1245. // transform: translate3d(0, -100%, 0);
  1246. transform: translate3d(-1000%, -1000%, 0);
  1247. opacity: 0;
  1248. }
  1249. }
  1250. }
  1251. </style>