SandTable.vue 37 KB

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