SandTable.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230
  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. },
  614. {
  615. name: "停机时长",
  616. field: "stopHours",
  617. },
  618. ],
  619. data: [],
  620. },
  621. rmls: {
  622. column: [
  623. {
  624. name: "风机编号",
  625. field: "wtId",
  626. },
  627. {
  628. name: "推荐时间",
  629. field: "recodedate",
  630. },
  631. {
  632. name: "类型",
  633. field: "operation",
  634. },
  635. ],
  636. data: [],
  637. },
  638. };
  639. },
  640. // 函数
  641. methods: {
  642. openWeatherDialog() {
  643. this.showWeatherDialog = true;
  644. },
  645. openVideoDialog(item) {
  646. if (item.url && item.token) {
  647. this.dialogVideoUrl = item.url + item.token;
  648. this.showVideoDialog = true;
  649. }
  650. },
  651. getWtInfo() {
  652. let that = this;
  653. that.API.requestData({
  654. method: "POST",
  655. subUrl: "sandtable/findWtInfo",
  656. data: {
  657. wpId: that.wpId,
  658. },
  659. success(res) {
  660. res.data.tqmap5.ls.forEach((ele) => {
  661. ele.time = new Date(ele.time).formatDate("yyyy-MM-dd hh:mm");
  662. });
  663. const keys = ["wd", "sd"];
  664. let weatherChart = [
  665. {
  666. title: "温度",
  667. smooth: true,
  668. value: [],
  669. },
  670. {
  671. title: "湿度",
  672. smooth: true,
  673. value: [],
  674. },
  675. ];
  676. keys.forEach((key, keyIndex) => {
  677. res.data.tqmap5.ls.forEach((ele) => {
  678. weatherChart[keyIndex].value.push({
  679. text: ele.time,
  680. value: ele[key],
  681. });
  682. });
  683. });
  684. that.tqmap1 = res.data.tqmap1;
  685. that.tqmap5 = res.data.tqmap5.ls;
  686. res.data.sels.forEach((ele) => {
  687. ele.stopTime = new Date(ele.stopTime).formatDate(
  688. "yyyy-MM-dd hh:mm:ss"
  689. );
  690. ele.startTime = new Date(ele.stopTime).formatDate(
  691. "yyyy-MM-dd hh:mm:ss"
  692. );
  693. });
  694. res.data.rmls.forEach((ele) => {
  695. ele.recodedate = new Date(ele.recodedate).formatDate(
  696. "yyyy-MM-dd hh:mm:ss"
  697. );
  698. });
  699. that.sels.data = res.data.sels;
  700. that.rmls.data = res.data.rmls;
  701. that.gxkmap = res.data.gxkmap;
  702. that.weatherChart = weatherChart;
  703. },
  704. });
  705. },
  706. // 获取中部地图数据
  707. getWpHealthInfo() {
  708. let that = this;
  709. that.API.requestData({
  710. method: "POST",
  711. subUrl: "sandtable/judgeWpHealth",
  712. data: {
  713. wpId: that.wpId,
  714. },
  715. success(res) {
  716. that.mapSource = res.data;
  717. },
  718. });
  719. },
  720. // 获取报警玫瑰图
  721. getWarnMGT() {
  722. let that = this;
  723. that.API.requestData({
  724. method: "GET",
  725. baseURL: "http://192.168.1.18:8075/",
  726. subUrl: "alarm/count/query/alltotal",
  727. data: {
  728. stationid: that.wpId,
  729. },
  730. success(res) {
  731. let warnChartData = [];
  732. for (let key in res.data) {
  733. const ele = res.data[key];
  734. warnChartData.push({
  735. value: ele.count,
  736. name: ele.relatePartsText,
  737. });
  738. }
  739. that.warnChartData = warnChartData;
  740. },
  741. });
  742. },
  743. // 获取故障玫瑰图
  744. getStopMGT() {
  745. let that = this;
  746. that.API.requestData({
  747. method: "GET",
  748. baseURL: "http://192.168.1.18:8075/",
  749. subUrl: "shutdown/count/alltotal",
  750. data: {
  751. stId: that.wpId,
  752. },
  753. success(res) {
  754. let warnChartData = [];
  755. for (let key in res.data) {
  756. const ele = res.data[key];
  757. warnChartData.push({
  758. value: ele.count,
  759. name: ele.type,
  760. });
  761. }
  762. that.warnChartData = warnChartData;
  763. },
  764. });
  765. },
  766. // 获取库存玫瑰图
  767. getRepertoryMGT() {
  768. let that = this;
  769. that.API.requestData({
  770. method: "GET",
  771. baseURL: "http://192.168.1.18:9988/",
  772. subUrl: "inventory/groupcount",
  773. data: {
  774. stId: that.wpId,
  775. },
  776. success(res) {
  777. let bjChartData = [];
  778. for (let key in res.data) {
  779. const ele = res.data[key];
  780. bjChartData.push({
  781. value: ele.curbal,
  782. name: ele.description,
  783. });
  784. }
  785. that.bjChartData = bjChartData;
  786. },
  787. });
  788. },
  789. // 获取记录玫瑰图
  790. getRecordMGT() {
  791. let that = this;
  792. that.API.requestData({
  793. method: "GET",
  794. baseURL: "http://192.168.1.18:9988/",
  795. subUrl: "equoperationrecord/equupdatecount",
  796. data: {
  797. stId: that.wpId,
  798. },
  799. success(res) {
  800. let bjChartData = [];
  801. for (let key in res.data) {
  802. const ele = res.data[key];
  803. bjChartData.push({
  804. value: ele.count,
  805. name: ele.description,
  806. });
  807. }
  808. that.bjChartData = bjChartData;
  809. },
  810. });
  811. },
  812. // 获取中部地图数据
  813. getTop4Info() {
  814. let that = this;
  815. that.API.requestData({
  816. method: "GET",
  817. baseURL: "http://192.168.1.18:9988/",
  818. subUrl: "equoperationrecord/top4",
  819. data: {
  820. stId: that.wpId,
  821. },
  822. success(res) {
  823. res.data.forEach((ele, index) => {
  824. ele.index = index;
  825. ele.jobcode = ele.jobcode || "------";
  826. });
  827. that.workData.data = res.data;
  828. },
  829. });
  830. },
  831. clickStopRow(row) {
  832. this.tableItem = row;
  833. this.showTableDialog = true;
  834. },
  835. clickHealthRow(row) {
  836. this.tableItem = row;
  837. this.showHealthDialog = true;
  838. },
  839. delaylyFn(time, fn) {
  840. setTimeout(() => {
  841. fn();
  842. }, time);
  843. },
  844. riseNumber(number) {
  845. if (number < 0) {
  846. return (number - number * 2) / 100;
  847. } else {
  848. return number / 100;
  849. }
  850. },
  851. // 切换人员展示
  852. changePeople(index) {
  853. if (!this.peopleAnmLock && this.workDataIndex !== index) {
  854. this.peopleAnmLock = true;
  855. this.peopleClass = "fadeOutRight";
  856. setTimeout(() => {
  857. this.workDataIndex = index;
  858. this.peopleClass = "fadeInRight";
  859. this.peopleAnmLock = false;
  860. }, 150);
  861. }
  862. },
  863. // 点击风场或者光伏
  864. clickMapItem(videoArray) {
  865. this.videoArray.forEach((pEle, pIndex) => {
  866. pEle.forEach((cEle, cIndex) => {
  867. setTimeout(() => {
  868. // 设置隐藏动画
  869. cEle.class = "animated a1 flipOutX";
  870. setTimeout(() => {
  871. // 修改 token
  872. cEle.token =
  873. "?token=" + videoArray[pIndex + cIndex] + "&autoplay=true";
  874. setTimeout(() => {
  875. // 设置显示动画
  876. cEle.class = "animated a1 flipInX";
  877. }, 150);
  878. }, 350);
  879. }, (pIndex + cIndex + pIndex) * 150);
  880. });
  881. });
  882. },
  883. // 页面跳转
  884. jumpUrl(url) {
  885. this.$router.push(url);
  886. },
  887. when() {
  888. this.showPanel = true;
  889. },
  890. changeBjSwitch() {
  891. this.bjSwitch = !this.bjSwitch;
  892. if (this.bjSwitch) {
  893. this.getRecordMGT();
  894. } else {
  895. this.getRepertoryMGT();
  896. }
  897. },
  898. changeWarnSwitch() {
  899. this.warnSwitch = !this.warnSwitch;
  900. if (this.warnSwitch) {
  901. this.getStopMGT();
  902. } else {
  903. this.getWarnMGT();
  904. }
  905. },
  906. },
  907. // 生命周期钩子
  908. beforeCreate() {
  909. // 创建前
  910. },
  911. created() {
  912. this.getWtInfo();
  913. this.getWpHealthInfo();
  914. this.getTop4Info();
  915. this.getWarnMGT();
  916. this.getRepertoryMGT();
  917. this.timeStr = new Date().formatDate("MM-dd hh:mm");
  918. this.timmer1 = setInterval(() => {
  919. this.timeStr = new Date().formatDate("MM-dd hh:mm");
  920. });
  921. },
  922. beforeMount() {
  923. // 渲染前
  924. },
  925. mounted() {
  926. // 渲染后
  927. },
  928. beforeUpdate() {
  929. // 数据更新前
  930. },
  931. updated() {
  932. // 数据更新后
  933. },
  934. unmounted() {
  935. clearInterval(this.timmer1);
  936. this.timmer1 = null;
  937. },
  938. };
  939. </script>
  940. <style lang="less">
  941. .sand-table {
  942. width: 100%;
  943. height: 91.667vh;
  944. position: relative;
  945. .i3dback {
  946. position: fixed;
  947. z-index: -1;
  948. width: 100vw;
  949. height: 100vh;
  950. top: 0;
  951. left: 0;
  952. }
  953. .i3dcloud {
  954. position: absolute;
  955. z-index: 2;
  956. width: 100vw;
  957. height: 100vh;
  958. top: 0;
  959. left: 0;
  960. }
  961. .left-panel {
  962. width: 360px;
  963. }
  964. .right-panel {
  965. width: 36.852vh;
  966. }
  967. .three-model-layer {
  968. position: absolute;
  969. width: 100%;
  970. height: 100%;
  971. z-index: 1;
  972. }
  973. .sand-table-left {
  974. position: absolute;
  975. left: 0;
  976. top: 0;
  977. z-index: 2;
  978. }
  979. .sand-table-right {
  980. position: absolute;
  981. right: 0;
  982. top: 0;
  983. z-index: 2;
  984. }
  985. .sand-table-bottom {
  986. position: absolute;
  987. left: calc(50vw - 550px);
  988. bottom: 0;
  989. z-index: 2;
  990. display: flex;
  991. .stb-p {
  992. margin-left: 0.926vh;
  993. }
  994. }
  995. .pre-img-box {
  996. display: flex;
  997. align-items: center;
  998. justify-content: center;
  999. margin-top: 0.556vh;
  1000. padding: 0;
  1001. position: relative;
  1002. cursor: pointer;
  1003. .sand-table-bottom {
  1004. position: absolute;
  1005. right: calc(50vw - 545px);
  1006. bottom: 0;
  1007. z-index: 2;
  1008. display: flex;
  1009. }
  1010. .mask {
  1011. position: absolute;
  1012. left: 0;
  1013. top: 0;
  1014. width: 100%;
  1015. height: 100%;
  1016. z-index: 5;
  1017. }
  1018. .pre-img {
  1019. position: relative;
  1020. width: 95%;
  1021. height: 8.657vh;
  1022. z-index: 4;
  1023. }
  1024. }
  1025. .person-info-box {
  1026. display: flex;
  1027. .header {
  1028. width: 75px;
  1029. }
  1030. }
  1031. .table {
  1032. width: calc(100% + 2.963vh);
  1033. margin-left: -1.481vh;
  1034. margin-bottom: -1.481vh;
  1035. tr {
  1036. cursor: pointer;
  1037. }
  1038. .com-table thead tr th,
  1039. .com-table tr td {
  1040. padding: 0.556vh 0;
  1041. color: #fff;
  1042. }
  1043. }
  1044. .animated.a0 {
  1045. animation-duration: 0.35s;
  1046. }
  1047. .animated.a1 {
  1048. animation-duration: 0.5s;
  1049. }
  1050. .el-overlay {
  1051. overflow: hidden;
  1052. }
  1053. }
  1054. .exchange {
  1055. cursor: pointer;
  1056. }
  1057. .weatherBox {
  1058. width: 100%;
  1059. display: flex;
  1060. justify-content: space-around;
  1061. align-items: center;
  1062. .l,
  1063. .r {
  1064. width: 48%;
  1065. height: 500px;
  1066. padding: 50px 0;
  1067. }
  1068. .el-collapse {
  1069. border-top: 1px solid #999;
  1070. }
  1071. .el-collapse-item .el-collapse-item__wrap {
  1072. border-bottom: 1px solid #999;
  1073. }
  1074. .el-collapse-item__content {
  1075. background: rgba(18, 29, 28);
  1076. color: rgba(255, 255, 255, 0.75);
  1077. padding: 20px;
  1078. }
  1079. .el-collapse-item__header {
  1080. background: rgb(18, 29, 28);
  1081. border-bottom: 1px solid #999;
  1082. color: rgba(255, 255, 255, 0.75);
  1083. }
  1084. .el-card__header,
  1085. .el-collapse,
  1086. .el-collapse-item__header {
  1087. border-bottom: 1px solid #999;
  1088. }
  1089. .collapseItemTitle {
  1090. display: flex;
  1091. justify-content: space-between;
  1092. align-items: center;
  1093. width: 100%;
  1094. .svg {
  1095. width: 20px;
  1096. height: 20px;
  1097. }
  1098. .info {
  1099. margin-left: 4px;
  1100. }
  1101. .otherWea {
  1102. margin-right: 10px;
  1103. }
  1104. }
  1105. .other-info {
  1106. text-align: center;
  1107. font-size: @fontsize-s;
  1108. .text {
  1109. color: @font-color;
  1110. font-size: 12px;
  1111. }
  1112. .value {
  1113. margin: 0.741vh 0 0 0;
  1114. }
  1115. .other-icon {
  1116. margin: 0 auto;
  1117. }
  1118. }
  1119. }
  1120. .videoBoxiframe {
  1121. border: none;
  1122. overflow: hidden;
  1123. cursor: pointer;
  1124. }
  1125. .modal {
  1126. .dialogTitle {
  1127. position: relative;
  1128. }
  1129. .jumpBtn {
  1130. position: absolute;
  1131. right: 30px;
  1132. top: 8px;
  1133. cursor: pointer;
  1134. font-size: 20px;
  1135. }
  1136. animation-duration: 0;
  1137. @keyframes dialog-fade-in {
  1138. 0% {
  1139. transform: translate3d(-1000%, -1000%, 0);
  1140. opacity: 0;
  1141. }
  1142. 100% {
  1143. transform: translate3d(-1000%, -1000%, 0);
  1144. opacity: 1;
  1145. }
  1146. }
  1147. @keyframes dialog-fade-out {
  1148. 0% {
  1149. // transform: translate3d(0, 0, 0);
  1150. transform: translate3d(-1000%, -1000%, 0);
  1151. opacity: 1;
  1152. }
  1153. 100% {
  1154. // transform: translate3d(0, -100%, 0);
  1155. transform: translate3d(-1000%, -1000%, 0);
  1156. opacity: 0;
  1157. }
  1158. }
  1159. }
  1160. </style>