stationInfo.vue 13 KB

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