SandTable.vue 32 KB

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