stationInfo.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. <template>
  2. <div class="page stationInfoPage">
  3. <div class="timeBox">{{ time }}</div>
  4. <div class="kaiguanBox"><img src="../../../../public/largeScreenImg/kaiguan.png" style="width: 30px;height: 30px" @click="pushZaiXian()"/></div>
  5. <div class="topTiltle">
  6. <span class="title">在运风光场站信息</span>
  7. </div>
  8. <div class="btuGroup">
  9. <div class="topBtu topLeftBtu" @click="back()">
  10. <span class="btuText">返回&nbsp;</span>
  11. </div>
  12. <div class="topBtu topRightBtu" @click="push()">
  13. <span class="btuText">后台管理</span>
  14. </div>
  15. </div>
  16. <div class="myMain-container">
  17. <div class="rightTextBg">
  18. <div class="rightBg topBox">
  19. <div class="rightTiltleTextBg">
  20. <div class="rightMainTitle">
  21. <span class="mainTitle" @click="pushInfo()">{{ station.stationName }}</span>
  22. </div>
  23. </div>
  24. <div class="rightTopContent" v-for="item in dataInfo">
  25. <div class="branckTitleBg">
  26. <!-- <span class="fjName">{{item.category}}<span class="number">{{item.fjNum}}</span>台</span>-->
  27. <span class="fjModel">{{item.modelType}}<span class="number" style="margin-left: 4%">{{item.modelTotal}}</span>台</span>
  28. </div>
  29. <div class="mainContent">
  30. <div class="contentBox" v-if="station.type === '风'">
  31. <span class="numberBox">{{ item.wsAve }}</span>
  32. <span class="textBox">平均风速<span class="numberBox" style="font-size: 14px">(m/s)</span></span>
  33. </div>
  34. <div class="contentBox">
  35. <span class="numberBox">{{item.generatingCapacity}}</span>
  36. <span class="textBox">发电量<span class="numberBox" style="font-size: 14px">(MWh)</span></span>
  37. </div>
  38. <div class="contentBox" v-if="station.type === '风'">
  39. <span class="numberBox">{{ item.wdSum }}</span>
  40. <span class="textBox">主风向</span>
  41. </div>
  42. <div class="contentBox">
  43. <span class="numberBox">{{ item.realTimeTotal }}</span>
  44. <span class="textBox">等效小时数<span class="numberBox" style="font-size: 14px">(h)</span></span>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="mapBtuBg">
  51. <div id="mapBtuOne" class="mapBtu mapBtuBefore" @click="clickBtu('mapBtuOne')">
  52. <span class="mapBtuText">地形图</span>
  53. </div>
  54. <!-- <div id="mapBtuTwo" class="mapBtu mapBtuAfter" @click="clickBtu('mapBtuTwo')">-->
  55. <!-- <span class="mapBtuText">风场气象图</span>-->
  56. <!-- </div>-->
  57. <div id="mapBtuThree" class="mapBtu mapBtuAfter" @click="clickBtu('mapBtuThree')">
  58. <span class="mapBtuText">风资源分布图</span>
  59. </div>
  60. <!-- <div id="mapBtuFour" class="mapBtu mapBtuAfter" @click="clickBtu('mapBtuFour')">-->
  61. <!-- <span class="mapBtuText">光辐射气象图</span>-->
  62. <!-- </div>-->
  63. <div id="mapBtuFive" class="mapBtu mapBtuAfter" @click="clickBtu('mapBtuFive')">
  64. <span class="mapBtuText">光资源分布图</span>
  65. </div>
  66. <div id="mapBtu3D" class="mapBtu mapBtuAfter" @click="dialog3DMap()">
  67. <span class="mapBtuText">3D地形图</span>
  68. </div>
  69. </div>
  70. </div>
  71. <div v-if="mapMark === 'mapBtuOne'">
  72. <bige-map ref="childMethod" :mapValue="mapValue"/>
  73. </div>
  74. <div v-if="mapMark === 'mapBtuThree'">
  75. <bige-heat-map ref="childMethod" :mapValue="mapValue"/>
  76. </div>
  77. <div v-if="mapMark === 'mapBtuFive'">
  78. <bige-heat-sun-map ref="childMethod" :mapValue="mapValue"/>
  79. </div>
  80. <div v-if="mapMark === 'mapBtu'">
  81. <zai-xian-bige-map ref="childMethod" :mapValue="mapValue"/>
  82. </div>
  83. <!--3D弹窗-->
  84. <div class="map3D">
  85. <el-dialog
  86. :visible.sync="dialogVisible" :modal-append-to-body="false"
  87. width="80%"
  88. :before-close="handleClose">
  89. <bige-map3-d :mapValue="mapValue" v-if="dialogVisible"/>
  90. </el-dialog>
  91. </div>
  92. <div class="bottomPushBtu" @click="pushStationResource()">
  93. <span>在运风光场站资源管理</span>
  94. </div>
  95. </div>
  96. </template>
  97. <script>
  98. import {getPointMap, stationInfo} from "@/api/biz/dataQuery/largeScreenPage";
  99. import bigeMap from "@/views/largeScreenPage/components/bigeMap";
  100. import bigeHeatMap from "@/views/largeScreenPage/components/bigeHeatMap";
  101. import bigeHeatSunMap from "@/views/largeScreenPage/components/bigeHeatSunMap";
  102. import zaiXianBigeMap from "@/views/largeScreenPage/components/zaiXianBigeMap";
  103. import bigeMap3D from "@/views/largeScreenPage/components/3DbigeMap";
  104. export default {
  105. name: "stationInfo",
  106. components: {
  107. bigeMap, bigeHeatMap,bigeHeatSunMap,zaiXianBigeMap, bigeMap3D
  108. },
  109. data() {
  110. return {
  111. timer: null,
  112. time: '',
  113. station: {},
  114. dataInfo:[
  115. // {category:'一期',fjNum:'20',model:'恩德1.3MW机型',avgWs:'4.5',power:'39650',wd:'西南',hour:'1525'},
  116. // {category:'二期',fjNum:'30',model:'华锐1.5MW机型',avgWs:'4.7',power:'73125',wd:'西',hour:'1625'},
  117. ],
  118. modelT:[],
  119. coordinates:[],
  120. mapMark: 'mapBtuOne',
  121. //地图传值
  122. mapValue: {
  123. level: null,//地图层级
  124. center: [],//中心坐标
  125. allStationInfo: null,//场站坐标
  126. projectInfo: null,//项目坐标
  127. allPointInfo:null,//所有点位信息
  128. },
  129. allPointInfo:[],
  130. dialogVisible:false
  131. }
  132. },
  133. destroyed() {
  134. clearInterval(this.timer)
  135. this.timer = null
  136. },
  137. mounted() {
  138. this.station = JSON.parse(this.$store.getters.stationInfo)
  139. console.log(this.station)
  140. this.formatTime()
  141. this.getPointMap()
  142. this.timer = setInterval(this.formatTime, 1000 * 60)
  143. },
  144. methods: {
  145. /*所有风机、塔、拐点坐标信息*/
  146. getPointMap(){
  147. if(this.$store.getters.allPointInfo.length>0){
  148. this.allPointInfo = JSON.parse(this.$store.getters.allPointInfo).info
  149. this.getInfo()
  150. }else {
  151. getPointMap().then(res=>{
  152. // console.log(res.data)
  153. this.allPointInfo = res.data
  154. this.getInfo()
  155. sessionStorage.setItem("allPointInfo", JSON.stringify({info:this.allPointInfo}))
  156. this.$store.dispatch('equipmentInfo/allPointInfo', JSON.stringify({info:this.allPointInfo}))
  157. }).catch(err=>{
  158. console.log('所有点位坐标:'+err)
  159. })
  160. }
  161. },
  162. getInfo(){
  163. stationInfo({stationId:this.station.id}).then(res=>{
  164. // console.log(res.data)
  165. let data = res.data
  166. this.dataInfo = data.modelT
  167. if(data.latitude === undefined ){
  168. this.coordinates = []
  169. }else{
  170. this.coordinates = [Number(data.latitude),Number(data.longitude)]
  171. }
  172. this.mapValue ={
  173. params: new Date(),
  174. level: 12,//地图层级
  175. center: this.coordinates,//中心坐标
  176. allStationInfo: null,//场站坐标
  177. projectInfo: null,//项目坐标
  178. id:this.station.id,
  179. allPointInfo:this.allPointInfo,//所有点位信息
  180. }
  181. }).catch(err=>{
  182. this.mapValue ={
  183. params: new Date(),
  184. level: 6,//地图层级
  185. center: [],//中心坐标
  186. allStationInfo: null,//场站坐标
  187. projectInfo: null,//项目坐标
  188. id:this.station.id,
  189. allPointInfo:null,//所有点位信息
  190. }
  191. if(err.msg === 'Index: 0, Size: 0'){
  192. console.log('此场站没有风机与测风塔')
  193. }else{
  194. console.log('场站信息获取异常:'+err.msg)
  195. }
  196. })
  197. },
  198. push() {
  199. this.$router.push({path: "/dataQuery/windTowerStatusInfo"})
  200. },
  201. pushInfo() {
  202. let station = {stationId:this.station.id,equipmentNo:null}
  203. if(this.station.type === '风'){
  204. sessionStorage.setItem("realWindTowerInfo", JSON.stringify(station))
  205. this.$store.dispatch('equipmentInfo/realWindTowerInfo', JSON.stringify(station))
  206. this.$router.push({path: "/homepage/realResourcesInfo"})
  207. }else{
  208. sessionStorage.setItem("realPvWindTowerInfo", JSON.stringify(station))
  209. this.$store.dispatch('equipmentInfo/realPvWindTowerInfo', JSON.stringify(station))
  210. this.$router.push({path: "/homepage/realPvResourcesInfo"})
  211. }
  212. },
  213. back() {
  214. this.$router.push({path: "/homepage/stationResources"})
  215. },
  216. pushStationResource() {
  217. this.$router.push({path: "/homepage/stationResources"})
  218. },
  219. pushZaiXian(){
  220. if(this.mapMark === 'mapBtuOne'){
  221. let center = this.$refs.childMethod.center
  222. let level = this.$refs.childMethod.level
  223. this.mapValue ={
  224. params: new Date(),
  225. level: level === ''?null:level,//地图层级
  226. center: center.length === 0?[]:[center.lat,center.lng],//中心坐标
  227. allStationInfo: null,//场站坐标
  228. projectInfo: null,//项目坐标
  229. id:this.station.id,
  230. allPointInfo:this.allPointInfo,//所有点位信息
  231. }
  232. this.mapMark = 'mapBtu'
  233. }
  234. },
  235. dialog3DMap(){
  236. let center = this.$refs.childMethod.center
  237. let level = this.$refs.childMethod.level
  238. this.mapValue ={
  239. params: new Date(),
  240. level: level === ''?null:level,//地图层级
  241. center: center.length === 0?[]:[center.lat,center.lng],//中心坐标
  242. allStationInfo: null,//场站坐标
  243. projectInfo: null,//项目坐标
  244. id:this.station.id,
  245. allPointInfo:this.allPointInfo,//所有点位信息
  246. }
  247. this.dialogVisible = true
  248. },
  249. handleClose(){
  250. this.dialogVisible = false
  251. },
  252. clickBtu(id) {
  253. let center = this.$refs.childMethod.center
  254. let level = this.$refs.childMethod.level
  255. this.mapValue ={
  256. params: new Date(),
  257. level: level === ''?null:level,//地图层级
  258. center: center.length === 0?[]:[center.lat,center.lng],//中心坐标
  259. allStationInfo: null,//场站坐标
  260. projectInfo: null,//项目坐标
  261. id:this.station.id,
  262. allPointInfo:this.allPointInfo,//所有点位信息
  263. }
  264. this.mapMark = id
  265. let clickItem = document.getElementById(id)
  266. let activeItem = document.querySelector('.mapBtuBefore')
  267. activeItem.classList.remove('mapBtuBefore')
  268. activeItem.classList.add('mapBtuAfter')
  269. clickItem.classList.remove('mapBtuAfter')
  270. clickItem.classList.add('mapBtuBefore')
  271. },
  272. /*时间格式化*/
  273. formatTime() {
  274. this.time = ''
  275. let date = new Date()
  276. let year = date.getFullYear(); // 年
  277. let month = date.getMonth() + 1; // 月
  278. let day = date.getDate();
  279. let hour = date.getHours(); // 获取当前小时数(0-23)
  280. let minutes = date.getMinutes();
  281. if (month < 10) month = "0" + month;
  282. if (day < 10) day = "0" + day;
  283. if (minutes < 10) minutes = "0" + minutes;
  284. this.time = year + "-" + month + "-" + day + " " + hour + ' : ' + minutes;
  285. }
  286. }
  287. }
  288. </script>
  289. <style scoped>
  290. .stationInfoPage {
  291. width: 100%;
  292. height: calc(100vh);
  293. background: url(../../../assets/largeScreenImg/backBg.png) no-repeat;
  294. background-size: 100% 100%;
  295. color: white;
  296. }
  297. .timeBox {
  298. position: absolute;
  299. left: 2%;
  300. top: 0;
  301. font-size: 20px;
  302. line-height: 40px;
  303. font-family: timeFont !important;
  304. }
  305. .page {
  306. position: fixed;
  307. top: 0;
  308. left: 0;
  309. bottom: 0;
  310. right: 0;
  311. overflow: auto;
  312. box-shadow: inset -1px -20px 550px 200px rgb(12 25 69 / 80%);
  313. }
  314. .topTiltle {
  315. width: 100%;
  316. height: 5.5%;
  317. background: url(../../../assets/largeScreenImg/index/topTitleBg.png) -2px -1px no-repeat;
  318. background-size: 100% 100%;
  319. display: flex;
  320. justify-content: center;
  321. }
  322. .title {
  323. width: 17%;
  324. height: 100%;
  325. text-align: center;
  326. margin-top: .2%;
  327. font-size: 30px;
  328. font-weight: 800;
  329. background-image: linear-gradient(
  330. 360deg,
  331. rgba(178, 204, 252, 1) 0,
  332. rgba(178, 204, 252, 1) 0,
  333. rgba(255, 255, 255, 1) 100%,
  334. rgba(255, 255, 255, 1) 100%
  335. );
  336. background-clip: text;
  337. color: transparent;
  338. }
  339. .btuGroup {
  340. position: absolute;
  341. right: 0;
  342. top: 0;
  343. color: white;
  344. width: 15%;
  345. height: 5.5%;
  346. display: flex;
  347. justify-content: flex-end;
  348. font-size: 18px;
  349. }
  350. .topBtu {
  351. height: 100%;
  352. margin-top: -1.5%;
  353. display: flex;
  354. justify-content: center;
  355. align-items: center;
  356. cursor: pointer;
  357. }
  358. .topRightBtu {
  359. background: url(../../../assets/largeScreenImg/index/topRightBtuBg.png) 100% no-repeat;
  360. background-size: 100% 100%;
  361. width: 50%;
  362. }
  363. .topLeftBtu {
  364. background: url(../../../assets/largeScreenImg/index/topLeftBtuBg.png) 100% no-repeat;
  365. background-size: 100% 100%;
  366. width: 35%;
  367. }
  368. .rightTextBg {
  369. position: absolute;
  370. right: 2%;
  371. top: 8%;
  372. width: 20%;
  373. display: flex;
  374. flex-direction: column;
  375. z-index: 1000;
  376. }
  377. .rightBg {
  378. background: url(../../../assets/largeScreenImg/index/leftTextBg.png) 100% no-repeat;
  379. background-size: 100% 100%;
  380. padding: 5%;
  381. }
  382. .mapBtuBg {
  383. position: absolute;
  384. right: 22%;
  385. top: 7%;
  386. width: 10%;
  387. z-index: 1000;
  388. }
  389. .rightTiltleTextBg {
  390. height: 32px;
  391. background: url(../../../assets/largeScreenImg/index/rightTiltleTextBg.png) 100% no-repeat;
  392. background-size: 100% 100%;
  393. }
  394. .rightMainTitle {
  395. color: rgba(183, 243, 252, 1);
  396. font-size: 20px;
  397. font-weight: 550;
  398. margin-left: 8%;
  399. position: relative;
  400. top: -25%;
  401. }
  402. .rightTopContent {
  403. margin-top: 4%;
  404. }
  405. .branckTitleBg{
  406. background: url(../../../assets/largeScreenImg/zaiyunAndqianqi/branckTitleBg.png) 100% no-repeat;
  407. background-size: 100% 100%;
  408. height: 32px;
  409. display: flex;
  410. align-items: center;
  411. }
  412. .fjName{
  413. margin-left: 2%;
  414. }
  415. .fjModel{
  416. width: 100%;
  417. margin-left: 2%;
  418. }
  419. .mainContent{
  420. display: flex;
  421. flex-wrap: wrap;
  422. justify-content: center;
  423. }
  424. .contentBox {
  425. margin-top: 5%;
  426. width: 38%;
  427. height: 125px;
  428. background: url(../../../assets/largeScreenImg/index/liubianxingBorder.png) 100% no-repeat;
  429. background-size: 100% 100%;
  430. display: flex;
  431. flex-direction: column;
  432. justify-content: center;
  433. align-items: center;
  434. }
  435. .number{
  436. font-weight: 700;
  437. background-image: linear-gradient(
  438. rgba(255, 255, 255, 1) 0,
  439. rgba(255, 255, 255, 1) 0,
  440. rgba(70, 255, 222, 1) 98.730469%,
  441. rgba(70, 255, 222, 1) 100%
  442. );
  443. background-clip: text;
  444. color: transparent;
  445. }
  446. .numberBox {
  447. font-size: 24px;
  448. font-weight: 700;
  449. background-image: linear-gradient(
  450. rgba(255, 255, 255, 1) 0,
  451. rgba(255, 255, 255, 1) 0,
  452. rgba(70, 255, 222, 1) 98.730469%,
  453. rgba(70, 255, 222, 1) 100%
  454. );
  455. background-clip: text;
  456. color: transparent;
  457. }
  458. .mapBtu {
  459. height: 50px;
  460. width: 200px;
  461. }
  462. .mapBtuAfter {
  463. background: url(../../../assets/largeScreenImg/index/mapBtuClickAfter.png) 100% no-repeat;
  464. background-size: 100% 100%;
  465. }
  466. .mapBtuBefore {
  467. background: url(../../../assets/largeScreenImg/index/mapBtuClickBefore.png) 100% no-repeat;
  468. background-size: 100% 100%;
  469. /*margin-top: 9px;*/
  470. }
  471. .mapBtuText {
  472. line-height: 50px;
  473. font-size: 16px;
  474. display: flex;
  475. align-items: center;
  476. margin-left: 20%;
  477. }
  478. .bottomPushBtu {
  479. background: url(../../../assets/largeScreenImg/index/topLeftBtuBg.png) 100% no-repeat;
  480. background-size: 100% 100%;
  481. line-height: 60px;
  482. width: 12%;
  483. cursor: pointer;
  484. text-align: center;
  485. position: absolute;
  486. right: 0;
  487. bottom: 0;
  488. }
  489. .kaiguanBox{
  490. cursor: pointer;
  491. position: absolute;
  492. left: 22%;
  493. top: .5%;
  494. }
  495. .map3D /deep/ .el-dialog__header, .map3D /deep/ .el-dialog__body {
  496. padding: 0;
  497. }
  498. .map3D /deep/ .el-dialog__headerbtn {
  499. z-index: 100;
  500. top: 10px;
  501. right: 10px;
  502. }
  503. .map3D /deep/ .el-dialog__headerbtn .el-dialog__close {
  504. color: #ffffff;
  505. }
  506. </style>