|
|
@@ -11,13 +11,13 @@
|
|
11
|
11
|
<div class="left_top1img">
|
|
12
|
12
|
<div class="left_top1img1 TiF_font">累计收益</div>
|
|
13
|
13
|
<div class="left_top1img2 custom-font">
|
|
14
|
|
- {{ formatAmount1(characteristic.money) }}<span class="left_top21img1">亿元</span>
|
|
|
14
|
+ {{ formatAmount10000(characteristic.totalProfit) }}<span class="left_top21img1">万元</span>
|
|
15
|
15
|
</div>
|
|
16
|
16
|
</div>
|
|
17
|
17
|
<div class="left_top1img">
|
|
18
|
18
|
<div class="left_top1img1 TiF_font">今日收益</div>
|
|
19
|
19
|
<div class="left_top1img2 custom-font">
|
|
20
|
|
- {{ formatAmounts2(characteristic.moneyDaily) }}<span class="left_top21img1">万元</span>
|
|
|
20
|
+ {{ formatAmounts2(characteristic.todayProfit) }}<span class="left_top21img1">元</span>
|
|
21
|
21
|
</div>
|
|
22
|
22
|
</div>
|
|
23
|
23
|
</div>
|
|
|
@@ -25,8 +25,8 @@
|
|
25
|
25
|
<div class="left_top21">
|
|
26
|
26
|
<div class="left_top21img">
|
|
27
|
27
|
<div class="left_top21imgfont custom-font18">
|
|
28
|
|
- {{formatAmount1(characteristic.chargeEnergyDaily)
|
|
29
|
|
- }}<span class="left_top21img1">GWh</span>
|
|
|
28
|
+ {{formatAmount1000(characteristic.dayImportKwh)
|
|
|
29
|
+ }}<span class="left_top21img1">MWh</span>
|
|
30
|
30
|
</div>
|
|
31
|
31
|
</div>
|
|
32
|
32
|
<div class="left_top21name TiF_font">今日总充电量</div>
|
|
|
@@ -34,7 +34,7 @@
|
|
34
|
34
|
<div class="left_top21">
|
|
35
|
35
|
<div class="left_top21img">
|
|
36
|
36
|
<div class="left_top21imgfont custom-font18">
|
|
37
|
|
- {{formatAmount1(characteristic.chargeEnergy) }}<span class="left_top21img1">GWh</span>
|
|
|
37
|
+ {{formatAmount1000(characteristic.accumulativeImportKwh) }}<span class="left_top21img1">MWh</span>
|
|
38
|
38
|
</div>
|
|
39
|
39
|
</div>
|
|
40
|
40
|
<div class="left_top21name TiF_font">累计总充电量</div>
|
|
|
@@ -42,8 +42,8 @@
|
|
42
|
42
|
<div class="left_top21">
|
|
43
|
43
|
<div class="left_top21img">
|
|
44
|
44
|
<div class="left_top21imgfont custom-font18">
|
|
45
|
|
- {{formatAmount1(characteristic.disChargeEnergyDaily)
|
|
46
|
|
- }}<span class="left_top21img1">GWh</span>
|
|
|
45
|
+ {{formatAmount1000(characteristic.dayExportKwh)
|
|
|
46
|
+ }}<span class="left_top21img1">MWh</span>
|
|
47
|
47
|
</div>
|
|
48
|
48
|
</div>
|
|
49
|
49
|
<div class="left_top21name TiF_font">今日总放电量</div>
|
|
|
@@ -51,8 +51,8 @@
|
|
51
|
51
|
<div class="left_top21">
|
|
52
|
52
|
<div class="left_top21img">
|
|
53
|
53
|
<div class="left_top21imgfont custom-font18">
|
|
54
|
|
- {{formatAmount1(characteristic.disChargeEnergy)
|
|
55
|
|
- }}<span class="left_top21img1">GWh</span>
|
|
|
54
|
+ {{formatAmount1000(characteristic.accumulativeExportKwh)
|
|
|
55
|
+ }}<span class="left_top21img1">MWh</span>
|
|
56
|
56
|
</div>
|
|
57
|
57
|
</div>
|
|
58
|
58
|
<div class="left_top21name TiF_font">累计总放电量</div>
|
|
|
@@ -68,10 +68,10 @@
|
|
68
|
68
|
<div class="left_eltable TiF_font">
|
|
69
|
69
|
<div class="left_eltabledivtitle">
|
|
70
|
70
|
<div class="left_eltabledivtitles"></div>
|
|
71
|
|
- <div>站点</div>
|
|
72
|
|
- <div>告警内容</div>
|
|
73
|
|
- <div>事件</div>
|
|
74
|
|
- <div>状态</div>
|
|
|
71
|
+ <div class="scrolladdress">站点</div>
|
|
|
72
|
+ <div class="scrollcontent">告警内容</div>
|
|
|
73
|
+ <div class="scrollevent">事件</div>
|
|
|
74
|
+ <div class="left_eltabnormal1">状态</div>
|
|
75
|
75
|
</div>
|
|
76
|
76
|
<div class="execdata">
|
|
77
|
77
|
<div class="execInfo">
|
|
|
@@ -82,18 +82,19 @@
|
|
82
|
82
|
<div class="left_eltabnormal">{{item.state}}</div>
|
|
83
|
83
|
</div> -->
|
|
84
|
84
|
<vue3-seamless-scroll
|
|
85
|
|
- :list="tableData"
|
|
|
85
|
+ :list="AlarmStatistics"
|
|
86
|
86
|
:step="1"
|
|
87
|
87
|
class="seamless-warp2"
|
|
88
|
88
|
>
|
|
89
|
89
|
<div class="left_eltablediv"
|
|
90
|
|
- v-for="item in tableData"
|
|
91
|
|
- :key="item.num"
|
|
|
90
|
+ v-for="(item,index) in AlarmStatistics"
|
|
|
91
|
+ :key="index"
|
|
92
|
92
|
>
|
|
93
|
|
- <div class="scrolladdress">{{item.address}}</div>
|
|
94
|
|
- <div class="scrollcontent">{{item.content}}</div>
|
|
95
|
|
- <div class="scrollevent">{{item.event}}</div>
|
|
96
|
|
- <div class="left_eltabnormal">{{item.state}}</div>
|
|
|
93
|
+ <div class="scrolladdress">{{item.powerName}}</div>
|
|
|
94
|
+ <div class="scrollcontent">{{item.title}}</div>
|
|
|
95
|
+ <div class="scrollevent">{{item.alarmname}}</div>
|
|
|
96
|
+ <div class="left_eltabnormal" v-if="item.todayname==1">已恢复</div>
|
|
|
97
|
+ <div class="left_eltabnormal" v-else>未恢复</div>
|
|
97
|
98
|
</div>
|
|
98
|
99
|
</vue3-seamless-scroll>
|
|
99
|
100
|
</div>
|
|
|
@@ -139,20 +140,20 @@
|
|
139
|
140
|
<div class="center_top1img11">
|
|
140
|
141
|
<div class="center_top1img1 TiF_font">电站总数</div>
|
|
141
|
142
|
<div class="center_top1img2 custom-font">
|
|
142
|
|
- {{ characteristic.cooperativeEnterprises }}
|
|
|
143
|
+ {{powerclassify.power}}
|
|
143
|
144
|
</div>
|
|
144
|
145
|
</div>
|
|
145
|
146
|
<div class="center_top1img22">
|
|
146
|
147
|
<img class="center_top1img22img" src="../assets/svg/center.svg" alt="" />
|
|
147
|
148
|
<div class="center_top1img1 TiF_font">总装机容量</div>
|
|
148
|
149
|
<div class="center_top1img2 custom-font">
|
|
149
|
|
- {{formatAmount1(characteristic.ratedCap)}}<span class="left_top21img2">GWh</span>
|
|
|
150
|
+ {{formatAmount1(characteristic.installedCap)}}<span class="left_top21img2">kWh</span>
|
|
150
|
151
|
</div>
|
|
151
|
152
|
</div>
|
|
152
|
153
|
<div class="center_top1img33">
|
|
153
|
154
|
<div class="center_top1img1 TiF_font">总装机功率</div>
|
|
154
|
155
|
<div class="center_top1img2 custom-font">
|
|
155
|
|
- {{formatAmount1(characteristic.ratedPower) }}<span class="left_top21img2">GW</span>
|
|
|
156
|
+ {{formatAmount1(characteristic.installedPower) }}<span class="left_top21img2">kW</span>
|
|
156
|
157
|
</div>
|
|
157
|
158
|
</div>
|
|
158
|
159
|
</div>
|
|
|
@@ -211,7 +212,7 @@
|
|
211
|
212
|
/>
|
|
212
|
213
|
<div class="left_cooperativename">
|
|
213
|
214
|
<div class="cooperative_title TiF_font">合作企业(家)</div>
|
|
214
|
|
- <div class="cooperative_title1 custom-font">80</div>
|
|
|
215
|
+ <div class="cooperative_title1 custom-font">{{powerclassify.tenant}}</div>
|
|
215
|
216
|
</div>
|
|
216
|
217
|
</div>
|
|
217
|
218
|
</div>
|
|
|
@@ -224,7 +225,7 @@
|
|
224
|
225
|
/>
|
|
225
|
226
|
<div class="left_cooperativename">
|
|
226
|
227
|
<div class="cooperative_title TiF_font">运营总数(个)</div>
|
|
227
|
|
- <div class="cooperative_title1 custom-font">11</div>
|
|
|
228
|
+ <div class="cooperative_title1 custom-font">{{powerclassify.power}}</div>
|
|
228
|
229
|
</div>
|
|
229
|
230
|
</div>
|
|
230
|
231
|
</div>
|
|
|
@@ -247,6 +248,7 @@
|
|
247
|
248
|
:key="index"
|
|
248
|
249
|
>
|
|
249
|
250
|
{{ char }}
|
|
|
251
|
+ <!-- //safetysky -->
|
|
250
|
252
|
</div>
|
|
251
|
253
|
<!-- <div class="right_centersecurity2 custom-fonts">8</div>
|
|
252
|
254
|
<div class="right_centersecurity2 custom-fonts">8</div>
|
|
|
@@ -262,27 +264,20 @@
|
|
262
|
264
|
<div class="right_bottom">
|
|
263
|
265
|
<div class="left_toptitle TiF_font">收益排行</div>
|
|
264
|
266
|
<div class="right_bottomrevenue">
|
|
265
|
|
- <div class="right_bottomprogress">
|
|
|
267
|
+
|
|
|
268
|
+ <div class="right_bottomprogress" v-for="(item,index) in RevenueRanking" :key="index">
|
|
266
|
269
|
<div class="bottomprogress">
|
|
267
|
270
|
<div class="bottomprogress2">
|
|
268
|
|
- <div class="bottomprogress1 TiF_font">TOP01</div>
|
|
269
|
|
- <span>新疆双河</span>
|
|
|
271
|
+ <div class="bottomprogress1 TiF_font">TOP0{{index+1}}</div>
|
|
|
272
|
+ <span>{{item.stationName}}</span>
|
|
270
|
273
|
</div>
|
|
271
|
|
- <div>95%</div>
|
|
|
274
|
+ <div>{{item.profit}}</div>
|
|
272
|
275
|
</div>
|
|
273
|
|
- <!-- <el-progress
|
|
274
|
|
- color="#30B4FF"
|
|
275
|
|
- :text-inside="true"
|
|
276
|
|
- :stroke-width="8"
|
|
277
|
|
- :percentage="80"
|
|
278
|
|
- class="custom-progress"
|
|
279
|
|
-
|
|
280
|
|
- ></el-progress> -->
|
|
281
|
276
|
<div class="custom-progress">
|
|
282
|
|
- <div class="progress" style="width: 95%"></div>
|
|
|
277
|
+ <div class="progress" :style="{ width: item.profit }"></div>
|
|
283
|
278
|
</div>
|
|
284
|
279
|
</div>
|
|
285
|
|
-
|
|
|
280
|
+<!--
|
|
286
|
281
|
<div class="right_bottomprogress">
|
|
287
|
282
|
<div class="bottomprogress">
|
|
288
|
283
|
<div class="bottomprogress2">
|
|
|
@@ -333,7 +328,7 @@
|
|
333
|
328
|
<div class="custom-progress">
|
|
334
|
329
|
<div class="progress" style="width: 70%"></div>
|
|
335
|
330
|
</div>
|
|
336
|
|
- </div>
|
|
|
331
|
+ </div> -->
|
|
337
|
332
|
</div>
|
|
338
|
333
|
</div>
|
|
339
|
334
|
</div>
|
|
|
@@ -345,7 +340,7 @@
|
|
345
|
340
|
</template>
|
|
346
|
341
|
|
|
347
|
342
|
<script setup>
|
|
348
|
|
-//--||--//
|
|
|
343
|
+//--http://127.0.0.1:8888/platform/login--//
|
|
349
|
344
|
import { onMounted, ref, onUnmounted,markRaw } from "vue";
|
|
350
|
345
|
import { useRouter } from "vue-router";
|
|
351
|
346
|
import { Vue3SeamlessScroll } from "vue3-seamless-scroll";
|
|
|
@@ -375,7 +370,14 @@ const weather = ref(""); // 天气
|
|
375
|
370
|
const currentTime = ref("");
|
|
376
|
371
|
const showOverlay = inject("showOverlay"); // 通过 inject 访问显示遮罩层方法
|
|
377
|
372
|
const domImg = ref("");
|
|
378
|
|
-const characteristic = ref({});
|
|
|
373
|
+const characteristic = ref({}); // 电站指标
|
|
|
374
|
+const powerclassify = ref({}); // 电站分类
|
|
|
375
|
+const ChargeDischargeTendency = ref([]); // 充放电趋势
|
|
|
376
|
+const AlarmStatistics = ref([]); // 告警统计
|
|
|
377
|
+const safetyEvaluation = ref([]); // 安全评价
|
|
|
378
|
+const RevenueRanking = ref([]); // 收益排行
|
|
|
379
|
+const sysCountries = ref([]); // 地理位置
|
|
|
380
|
+const sysCount = ref([]); // 运营总数
|
|
379
|
381
|
const daysandtime = ref("");
|
|
380
|
382
|
const clickTimeout = ref(null);
|
|
381
|
383
|
function updateTime() {
|
|
|
@@ -392,16 +394,16 @@ const currentDateyear = ref({});
|
|
392
|
394
|
const convertImageToBase64 = async () => {
|
|
393
|
395
|
// 登录接口
|
|
394
|
396
|
try {
|
|
395
|
|
- let postData = {
|
|
396
|
|
- username: "dexnui",
|
|
397
|
|
- password: "dexn1001",
|
|
398
|
|
- rememberMe: 1,
|
|
399
|
|
- };
|
|
400
|
|
- if (localStorage.getItem("Authorization") == null) {
|
|
401
|
|
- let { data: res } = await axios.post(`https://www.bjdexn.cn:8443/auth/login`, postData);
|
|
402
|
|
-
|
|
403
|
|
- localStorage.setItem("Authorization", res.msg);
|
|
404
|
|
- }
|
|
|
397
|
+ // let postData = {
|
|
|
398
|
+ // username: "dexnui",
|
|
|
399
|
+ // password: "dexn1001",
|
|
|
400
|
+ // rememberMe: 1,
|
|
|
401
|
+ // };
|
|
|
402
|
+ // if (localStorage.getItem("Authorization") == null) {
|
|
|
403
|
+ // let { data: res } = await axios.post(`https://www.bjdexn.cn:8443/auth/login`, postData);
|
|
|
404
|
+
|
|
|
405
|
+ // localStorage.setItem("Authorization", res.msg);
|
|
|
406
|
+ // }
|
|
405
|
407
|
if (fontSize(1) < 1.3) {
|
|
406
|
408
|
domImg.value = imgDara;
|
|
407
|
409
|
} else if (fontSize(1) < 1.7) {
|
|
|
@@ -410,61 +412,139 @@ const convertImageToBase64 = async () => {
|
|
410
|
412
|
|
|
411
|
413
|
domImg.value = imgDara2;
|
|
412
|
414
|
}
|
|
413
|
|
- // await gatstations(0, 100000); // 获取全国站点数据
|
|
|
415
|
+ await gatstations(100000); // 获取全国站点数据
|
|
414
|
416
|
await chartMap();
|
|
415
|
417
|
} catch (err) {}
|
|
416
|
418
|
};
|
|
417
|
|
-// 标记数据
|
|
418
|
|
-const gatstations = async (level, provinceAdcode) => {
|
|
|
419
|
+// 全国接口
|
|
|
420
|
+const gatstations = async (unm) => {
|
|
419
|
421
|
geoCoordMap.value = [];
|
|
420
|
422
|
toolTipData.value = [];
|
|
421
|
423
|
try {
|
|
422
|
|
- let accessToken = localStorage.getItem("Authorization");
|
|
423
|
|
- let { data: resdata } = await axios.get(
|
|
424
|
|
- `https://esos-iot.bjdexn.cn/api/v1/stations/1/${provinceAdcode}?level=${level}&page=1&rows=100000`,
|
|
425
|
|
- {
|
|
426
|
|
- headers: {
|
|
427
|
|
- Authorization: `JWT ${accessToken}`,
|
|
428
|
|
- },
|
|
429
|
|
- }
|
|
430
|
|
- );
|
|
431
|
|
- characteristic.value = resdata.data.characteristic;
|
|
432
|
|
- let res = resdata.data.list;
|
|
433
|
|
-//100000 // 100000
|
|
434
|
|
-//110000 //430000
|
|
435
|
|
-//110111 //430700
|
|
436
|
|
-
|
|
437
|
|
- for (let index = 0; index < res.length; index++) {
|
|
438
|
|
- if (res[index].location) {
|
|
439
|
|
- res[index].name = res[index].name.substring(0, 2);
|
|
440
|
|
- const firstCommaIndex = res[index].location.indexOf(",");
|
|
441
|
|
- const secondCommaIndex = res[index].location.indexOf(",", firstCommaIndex + 1);
|
|
442
|
|
- res[index].location = res[index].location.substring(0, secondCommaIndex);
|
|
443
|
|
- res[index].location = res[index].location.split(",");
|
|
444
|
|
- for (let i = 0; i < res[index].location.length; i++) {
|
|
445
|
|
- res[index].location[i] = res[index].location[i] * 1;
|
|
446
|
|
- }
|
|
447
|
|
- geoCoordMap.value[res[index].name] = res[index].location;
|
|
448
|
|
- // for (let j = 0; j < china.features.length; j++) {
|
|
449
|
|
- // if (res[index].name == china.features[j].properties.name.substr(0, 2)) {
|
|
|
424
|
+ // let { data: resdata } = await axios.post(`/api/screen/screenoverview`);
|
|
|
425
|
+ let { data: resdata } = await axios.post(`/screen/screenoverview`);
|
|
|
426
|
+ console.log(resdata);
|
|
|
427
|
+
|
|
|
428
|
+ characteristic.value = resdata.data.PowerStationIndex;
|
|
|
429
|
+ powerclassify.value = resdata.data.powerclassify;
|
|
|
430
|
+let ymd = resdata.data.ChargeDischargeTendency.map(item => item.ymd.slice(-2));
|
|
|
431
|
+ let chargeTotal = resdata.data.ChargeDischargeTendency.map(item => item.chargeTotal);
|
|
|
432
|
+ let dischargeTotal = resdata.data.ChargeDischargeTendency.map(item => item.dischargeTotal);
|
|
|
433
|
+ ChargeDischargeTendency.value[0]= ymd
|
|
|
434
|
+ ChargeDischargeTendency.value[1]= chargeTotal
|
|
|
435
|
+ ChargeDischargeTendency.value[2]= dischargeTotal
|
|
|
436
|
+ AlarmStatistics.value = resdata.data.AlarmStatistics
|
|
|
437
|
+ // for(let i = 0; i < ['#2F3230','#2D4C54','#0E4A59','#1A425D']; i++){
|
|
|
438
|
+
|
|
|
439
|
+ safetyEvaluation.value = resdata.data.safetyEvaluation
|
|
|
440
|
+
|
|
|
441
|
+ console.log(safetyEvaluation.value);
|
|
|
442
|
+ RevenueRanking.value = resdata.data.RevenueRanking
|
|
|
443
|
+ sysCount.value = resdata.data.sysCount
|
|
|
444
|
+ daysandtime.value = Number(resdata.data.PowerStationIndex.safetysky)+1;
|
|
|
445
|
+ console.log(daysandtime.value);
|
|
|
446
|
+ for (let index = 0; index < resdata.data.sysCountries.length; index++) {
|
|
450
|
447
|
let obj = {
|
|
451
|
|
- name: res[index].name,
|
|
452
|
|
- value: 1,
|
|
453
|
|
- adcode:res[index].adcode,
|
|
|
448
|
+ name: resdata.data.sysCountries[index].cname,
|
|
|
449
|
+ value: resdata.data.sysCountries[index].count,
|
|
|
450
|
+ adcode:resdata.data.sysCountries[index].areaId,
|
|
|
451
|
+ provinceCode:resdata.data.sysCountries[index].provinceCode,
|
|
|
452
|
+ location:[resdata.data.sysCountries[index].longitude,resdata.data.sysCountries[index].latitude]
|
|
454
|
453
|
};
|
|
455
|
454
|
toolTipData.value.push(obj);
|
|
456
|
|
- // }
|
|
457
|
|
- // }
|
|
458
|
|
- }
|
|
459
|
455
|
}
|
|
|
456
|
+
|
|
460
|
457
|
} catch (error) {
|
|
461
|
|
- localStorage.removeItem("Authorization");
|
|
462
|
|
- convertImageToBase64();
|
|
|
458
|
+ // convertImageToBase64();
|
|
463
|
459
|
|
|
464
|
460
|
console.error("请求出错:", error);
|
|
465
|
461
|
}
|
|
466
|
462
|
};
|
|
|
463
|
+ // 省级接口
|
|
|
464
|
+const gatprovincial = async (unm) => {
|
|
|
465
|
+ geoCoordMap.value = [];
|
|
|
466
|
+ toolTipData.value = [];
|
|
|
467
|
+ try {
|
|
|
468
|
+ // let { data: resdata } = await axios.post(`/api/screen/screeneconomize?statId=${unm}`);
|
|
|
469
|
+ let { data: resdata } = await axios.post(`/screen/screeneconomize?statId=${unm}`);
|
|
|
470
|
+ console.log(resdata);
|
|
|
471
|
+
|
|
|
472
|
+ characteristic.value = resdata.data.PowerStationIndex;
|
|
|
473
|
+ powerclassify.value = resdata.data.powerclassify;
|
|
|
474
|
+let ymd = resdata.data.ChargeDischargeTendency.map(item => item.ymd.slice(-2));
|
|
|
475
|
+ let chargeTotal = resdata.data.ChargeDischargeTendency.map(item => item.chargeTotal);
|
|
|
476
|
+ let dischargeTotal = resdata.data.ChargeDischargeTendency.map(item => item.dischargeTotal);
|
|
|
477
|
+ ChargeDischargeTendency.value[0]= ymd
|
|
|
478
|
+ ChargeDischargeTendency.value[1]= chargeTotal
|
|
|
479
|
+ ChargeDischargeTendency.value[2]= dischargeTotal
|
|
|
480
|
+ AlarmStatistics.value = resdata.data.AlarmStatistics
|
|
|
481
|
+
|
|
|
482
|
+ safetyEvaluation.value = resdata.data.safetyEvaluation
|
|
|
483
|
+ RevenueRanking.value = resdata.data.RevenueRanking
|
|
|
484
|
+ // sysCountries.value = resdata.data.sysCountries
|
|
|
485
|
+ sysCount.value = resdata.data.sysCount
|
|
|
486
|
+
|
|
|
487
|
+ daysandtime.value = Number(resdata.data.PowerStationIndex.safetysky)+1;
|
|
|
488
|
+ console.log(daysandtime.value);
|
|
|
489
|
+ for (let index = 0; index < resdata.data.sysCountries.length; index++) {
|
|
|
490
|
+ let obj = {
|
|
|
491
|
+ name: resdata.data.sysCountries[index].cname,
|
|
|
492
|
+ value: resdata.data.sysCountries[index].count,
|
|
|
493
|
+ adcode:resdata.data.sysCountries[index].code,
|
|
|
494
|
+ provinceCode:resdata.data.sysCountries[index].cityCode,
|
|
|
495
|
+ location:[resdata.data.sysCountries[index].longitude,resdata.data.sysCountries[index].latitude]
|
|
|
496
|
+ };
|
|
|
497
|
+ toolTipData.value.push(obj);
|
|
|
498
|
+ }
|
|
|
499
|
+
|
|
|
500
|
+ } catch (error) {
|
|
|
501
|
+ // convertImageToBase64();
|
|
|
502
|
+ console.error("请求出错:", error);
|
|
|
503
|
+ }
|
|
|
504
|
+};
|
|
|
505
|
+ // 市级接口
|
|
|
506
|
+ const gitCitylevel = async (unm) => {
|
|
|
507
|
+ geoCoordMap.value = [];
|
|
|
508
|
+ toolTipData.value = [];
|
|
|
509
|
+ try {
|
|
|
510
|
+ let { data: resdata } = await axios.post(`/screen/screenmarket?statId=${unm}`);
|
|
|
511
|
+ // let { data: resdata } = await axios.post(`/api/screen/screenmarket?statId=${unm}`);
|
|
|
512
|
+ console.log(resdata);
|
|
|
513
|
+
|
|
|
514
|
+ characteristic.value = resdata.data.PowerStationIndex;
|
|
|
515
|
+ powerclassify.value = resdata.data.powerclassify;
|
|
|
516
|
+let ymd = resdata.data.ChargeDischargeTendency.map(item => item.ymd.slice(-2));
|
|
|
517
|
+ let chargeTotal = resdata.data.ChargeDischargeTendency.map(item => item.chargeTotal);
|
|
|
518
|
+ let dischargeTotal = resdata.data.ChargeDischargeTendency.map(item => item.dischargeTotal);
|
|
|
519
|
+ ChargeDischargeTendency.value[0]= ymd
|
|
|
520
|
+ ChargeDischargeTendency.value[1]= chargeTotal
|
|
|
521
|
+ ChargeDischargeTendency.value[2]= dischargeTotal
|
|
|
522
|
+ AlarmStatistics.value = resdata.data.AlarmStatistics
|
|
|
523
|
+
|
|
|
524
|
+ safetyEvaluation.value = resdata.data.safetyEvaluation
|
|
|
525
|
+ RevenueRanking.value = resdata.data.RevenueRanking
|
|
|
526
|
+ // sysCountries.value = resdata.data.sysCountries
|
|
|
527
|
+ sysCount.value = resdata.data.sysCount
|
|
|
528
|
+
|
|
|
529
|
+ daysandtime.value = Number(resdata.data.PowerStationIndex.safetysky)+1;
|
|
|
530
|
+ console.log(daysandtime.value);
|
|
|
531
|
+ for (let index = 0; index < resdata.data.sysCountries.length; index++) {
|
|
|
532
|
+ let obj = {
|
|
|
533
|
+ name: resdata.data.sysCountries[index].cname,
|
|
|
534
|
+ value: resdata.data.sysCountries[index].count,
|
|
|
535
|
+ adcode:resdata.data.sysCountries[index].code,
|
|
|
536
|
+ provinceCode:resdata.data.sysCountries[index].cityCode,
|
|
|
537
|
+ location:[resdata.data.sysCountries[index].longitude,resdata.data.sysCountries[index].latitude]
|
|
|
538
|
+ };
|
|
|
539
|
+ toolTipData.value.push(obj);
|
|
|
540
|
+ }
|
|
467
|
541
|
|
|
|
542
|
+ } catch (error) {
|
|
|
543
|
+ // convertImageToBase64();
|
|
|
544
|
+
|
|
|
545
|
+ console.error("请求出错:", error);
|
|
|
546
|
+ }
|
|
|
547
|
+};
|
|
468
|
548
|
const formattedDateTime = async () => {
|
|
469
|
549
|
let datetime= new Date();
|
|
470
|
550
|
const year = datetime.getFullYear();
|
|
|
@@ -478,8 +558,8 @@ const gatstations = async (level, provinceAdcode) => {
|
|
478
|
558
|
const addLeadingZero = async (number) => {
|
|
479
|
559
|
return number < 10 ? '0' + number : number;
|
|
480
|
560
|
}
|
|
481
|
|
-
|
|
482
|
|
-// 天气
|
|
|
561
|
+
|
|
|
562
|
+
|
|
483
|
563
|
const gatstationstest = async () => {
|
|
484
|
564
|
const result = await formattedDateTime();
|
|
485
|
565
|
currentDateyear.value.year = result.year
|
|
|
@@ -533,27 +613,49 @@ const chartMap = () => {
|
|
533
|
613
|
clickTimeout.value = setTimeout(async () => {
|
|
534
|
614
|
let provinceName = "";
|
|
535
|
615
|
let provinceAdcode = "";
|
|
|
616
|
+ console.log(e);
|
|
|
617
|
+
|
|
536
|
618
|
if (e.componentSubType == "scatter") {
|
|
537
|
619
|
|
|
538
|
|
- if (level.value >= 2) {
|
|
539
|
|
- level.value--;
|
|
540
|
|
- return;
|
|
541
|
|
- }
|
|
|
620
|
+ // if (level.value >= 1) {
|
|
|
621
|
+ // level.value--;
|
|
|
622
|
+ // return;
|
|
|
623
|
+ // }
|
|
542
|
624
|
provinceName = e.data[2].name;
|
|
543
|
625
|
provinceAdcode = e.data[2].adcode;
|
|
544
|
|
- level.value=2;
|
|
|
626
|
+ level.value++
|
|
|
627
|
+ if(level.value==1){
|
|
|
628
|
+
|
|
|
629
|
+ await gatprovincial(e.data[2].provinceCode);
|
|
|
630
|
+ }else if(level.value==0){
|
|
|
631
|
+ await gatstations(e.data[2].provinceCode);
|
|
|
632
|
+ }else{
|
|
|
633
|
+ await gitCitylevel(e.data[2].provinceCode);
|
|
|
634
|
+
|
|
|
635
|
+ }
|
|
545
|
636
|
|
|
546
|
637
|
} else {
|
|
547
|
638
|
provinceName = e.name;
|
|
548
|
639
|
provinceAdcode = e.data.value.adcode;
|
|
549
|
640
|
level.value++;
|
|
|
641
|
+ if (level.value==1) {
|
|
|
642
|
+ await gatprovincial(e.data.value.provinceCode);
|
|
|
643
|
+ }else if(level.value==0){
|
|
|
644
|
+ await gatstations(e.data.value.provinceCode);
|
|
|
645
|
+
|
|
|
646
|
+ }else{
|
|
|
647
|
+ await gitCitylevel(e.data.value.provinceCode);
|
|
|
648
|
+
|
|
|
649
|
+ }
|
|
550
|
650
|
|
|
551
|
651
|
}
|
|
552
|
652
|
if (provinceAdcode !== "100000") {
|
|
553
|
653
|
isDeep.value = true;
|
|
554
|
654
|
}
|
|
555
|
655
|
|
|
556
|
|
- await gatstations(level.value, provinceAdcode);
|
|
|
656
|
+ console.log(provinceName, provinceAdcode);
|
|
|
657
|
+ console.log(e);
|
|
|
658
|
+
|
|
557
|
659
|
await initMap(myChart, provinceName, provinceAdcode, true);
|
|
558
|
660
|
// setTimeout(() => {
|
|
559
|
661
|
// },200)
|
|
|
@@ -564,17 +666,22 @@ const chartMap = () => {
|
|
564
|
666
|
// 调用函数并传入JSON文件的URL
|
|
565
|
667
|
// 柱状体的顶部
|
|
566
|
668
|
function scatterData() {
|
|
567
|
|
- return toolTipData.value
|
|
568
|
|
- .map((item) => {
|
|
569
|
|
- if (geoCoordMap.value[item.name]) {
|
|
570
|
|
- return [geoCoordMap.value[item.name][0], geoCoordMap.value[item.name][1], item];
|
|
571
|
|
- // return {name:item.name,value:[geoCoordMap.value[item.name][0], geoCoordMap.value[item.name][1]],adcode:''};
|
|
572
|
|
- } else {
|
|
573
|
|
- console.error("未找到坐标数据:" + item.name);
|
|
574
|
|
- return null;
|
|
575
|
|
- }
|
|
|
669
|
+ return toolTipData.value.map((item) => {
|
|
|
670
|
+ return [item.location[0], item.location[1], item];
|
|
576
|
671
|
})
|
|
577
|
672
|
.filter((item) => item !== null); // 过滤掉无效数据项
|
|
|
673
|
+ // return toolTipData.value
|
|
|
674
|
+ // .map((item) => {
|
|
|
675
|
+ // if (geoCoordMap.value[item.name]) {
|
|
|
676
|
+
|
|
|
677
|
+ // return [geoCoordMap.value[item.name][0], geoCoordMap.value[item.name][1], item];
|
|
|
678
|
+ // // return {name:item.name,value:[geoCoordMap.value[item.name][0], geoCoordMap.value[item.name][1]],adcode:''};
|
|
|
679
|
+ // } else {
|
|
|
680
|
+ // console.error("未找到坐标数据:" + item.name);
|
|
|
681
|
+ // return null;
|
|
|
682
|
+ // }
|
|
|
683
|
+ // })
|
|
|
684
|
+ // .filter((item) => item !== null); // 过滤掉无效数据项
|
|
578
|
685
|
}
|
|
579
|
686
|
// 底部光圈
|
|
580
|
687
|
var convertData = function (data) {
|
|
|
@@ -623,7 +730,7 @@ const backToLastMapJump = async (unm) => {
|
|
623
|
730
|
level.value = unm;
|
|
624
|
731
|
|
|
625
|
732
|
|
|
626
|
|
- await gatstations(level.value, adcode);
|
|
|
733
|
+ await gatstations(adcode);
|
|
627
|
734
|
await initMap(myChart, geoName, adcode);
|
|
628
|
735
|
};
|
|
629
|
736
|
// 返回上一级
|
|
|
@@ -636,7 +743,7 @@ const backToLastMap = async () => {
|
|
636
|
743
|
level.value=0;
|
|
637
|
744
|
let geoName = "china";
|
|
638
|
745
|
let adcode = "100000";
|
|
639
|
|
-await gatstations(level.value, adcode);
|
|
|
746
|
+await gatstations(adcode);
|
|
640
|
747
|
await initMap(myChart, geoName, adcode);
|
|
641
|
748
|
}else{
|
|
642
|
749
|
level.value--;
|
|
|
@@ -644,7 +751,7 @@ await initMap(myChart, geoName, adcode);
|
|
644
|
751
|
const lastMapData = historyMapData.value[historyMapData.value.length - 1];
|
|
645
|
752
|
const { geoName, adcode } = lastMapData;
|
|
646
|
753
|
|
|
647
|
|
-await gatstations(level.value, adcode);
|
|
|
754
|
+await gatstations(adcode);
|
|
648
|
755
|
await initMap(myChart, geoName, adcode);
|
|
649
|
756
|
}
|
|
650
|
757
|
}
|
|
|
@@ -998,11 +1105,13 @@ const getOption = (geoName, mapData) => {
|
|
998
|
1105
|
};
|
|
999
|
1106
|
// 充放电趋势图
|
|
1000
|
1107
|
const population = () => {
|
|
|
1108
|
+ console.log(ChargeDischargeTendency.value);
|
|
|
1109
|
+
|
|
1001
|
1110
|
column.value = markRaw(echarts.init(document.getElementById("column")));
|
|
1002
|
1111
|
|
|
1003
|
1112
|
const option2 = {
|
|
1004
|
1113
|
title: {
|
|
1005
|
|
- subtext: "GWh",
|
|
|
1114
|
+ subtext: "kWh",
|
|
1006
|
1115
|
subtextStyle: {
|
|
1007
|
1116
|
fontSize: fontSize(14),
|
|
1008
|
1117
|
|
|
|
@@ -1059,7 +1168,7 @@ const population = () => {
|
|
1059
|
1168
|
},
|
|
1060
|
1169
|
},
|
|
1061
|
1170
|
|
|
1062
|
|
- data: [" 03", " 04", " 05", " 06", " 07", "08"],
|
|
|
1171
|
+ data: ChargeDischargeTendency.value[0],
|
|
1063
|
1172
|
},
|
|
1064
|
1173
|
yAxis: {
|
|
1065
|
1174
|
type: "value",
|
|
|
@@ -1084,7 +1193,7 @@ const population = () => {
|
|
1084
|
1193
|
},
|
|
1085
|
1194
|
series: [
|
|
1086
|
1195
|
{
|
|
1087
|
|
- data: [223, 234, 290, 109, 131, 630],
|
|
|
1196
|
+ data: ChargeDischargeTendency.value[1],
|
|
1088
|
1197
|
|
|
1089
|
1198
|
name: "充电",
|
|
1090
|
1199
|
type: "bar",
|
|
|
@@ -1135,7 +1244,7 @@ const population = () => {
|
|
1135
|
1244
|
global: false,
|
|
1136
|
1245
|
},
|
|
1137
|
1246
|
},
|
|
1138
|
|
- data: [125, 238, 310, 121, 134, 681],
|
|
|
1247
|
+ data: ChargeDischargeTendency.value[2],
|
|
1139
|
1248
|
},
|
|
1140
|
1249
|
],
|
|
1141
|
1250
|
};
|
|
|
@@ -1195,17 +1304,17 @@ const incomechart = () => {
|
|
1195
|
1304
|
|
|
1196
|
1305
|
formatter: function (value) {
|
|
1197
|
1306
|
if (value == "电站在线") {
|
|
1198
|
|
- return `${value + " " + " " + " " + " "} {a|90.00%}`;
|
|
|
1307
|
+ return `${value + " " + " " + " " + " "} {a|${sysCount.value.stationOnlineCount}%}`;
|
|
1199
|
1308
|
} else if (value == "电站离线") {
|
|
1200
|
|
- return `${value + " " + " " + " " + " "} {b|10.00%}`;
|
|
|
1309
|
+ return `${value + " " + " " + " " + " "} {b|${sysCount.value.stationOfflineCount}%}`;
|
|
1201
|
1310
|
} else if (value == "工商业储能") {
|
|
1202
|
|
- return `${value + " " + " " + " " + " "} {c|40.00%}`;
|
|
|
1311
|
+ return `${value + " " + " " + " " + " "} {c|${sysCount.value.industryCommerce}%}`;
|
|
1203
|
1312
|
} else if (value == "电网侧储能") {
|
|
1204
|
|
- return `${value + " " + " " + " " + " "} {d|40.00%}`;
|
|
|
1313
|
+ return `${value + " " + " " + " " + " "} {d|${sysCount.value.gridSide}%}`;
|
|
1205
|
1314
|
} else if (value == "电源侧储能") {
|
|
1206
|
|
- return `${value + " " + " " + " " + " "} {e|20.00%}`;
|
|
|
1315
|
+ return `${value + " " + " " + " " + " "} {e|${sysCount.value.mainsSide}%}`;
|
|
1207
|
1316
|
} else if (value == "户用储能") {
|
|
1208
|
|
- return `${value + " " + " " + " " + " "} {f|0.00%}`;
|
|
|
1317
|
+ return `${value + " " + " " + " " + " "} {f|${sysCount.value.household}%}`;
|
|
1209
|
1318
|
}
|
|
1210
|
1319
|
},
|
|
1211
|
1320
|
},
|
|
|
@@ -1428,8 +1537,8 @@ const incomechart = () => {
|
|
1428
|
1537
|
},
|
|
1429
|
1538
|
|
|
1430
|
1539
|
data: [
|
|
1431
|
|
- { value:3, name: "电站离线", itemStyle: { color: "#6DACB8" } },
|
|
1432
|
|
- { value: 7, name: "电站在线", itemStyle: { color: "#CCFCFF" } },
|
|
|
1540
|
+ { value:sysCount.value.stationOfflineCount, name: "电站离线", itemStyle: { color: "#6DACB8" } },
|
|
|
1541
|
+ { value: sysCount.value.stationOnlineCount, name: "电站在线", itemStyle: { color: "#CCFCFF" } },
|
|
1433
|
1542
|
],
|
|
1434
|
1543
|
},
|
|
1435
|
1544
|
{
|
|
|
@@ -1443,10 +1552,10 @@ const incomechart = () => {
|
|
1443
|
1552
|
},
|
|
1444
|
1553
|
|
|
1445
|
1554
|
data: [
|
|
1446
|
|
- { value: 2, name: "工商业储能", itemStyle: { color: "#30DCFF" } },
|
|
1447
|
|
- { value: 3, name: "户用储能", itemStyle: { color: "#59FFFF" } },
|
|
1448
|
|
- { value: 3, name: "电源侧储能", itemStyle: { color: "#F5E74F" } },
|
|
1449
|
|
- { value: 2, name: "电网侧储能", itemStyle: { color: "#FFFFFF" } },
|
|
|
1555
|
+ { value: sysCount.value.industryCommerce, name: "工商业储能", itemStyle: { color: "#30DCFF" } },
|
|
|
1556
|
+ { value: sysCount.value.household, name: "户用储能", itemStyle: { color: "#59FFFF" } },
|
|
|
1557
|
+ { value: sysCount.value.mainsSide, name: "电源侧储能", itemStyle: { color: "#F5E74F" } },
|
|
|
1558
|
+ { value: sysCount.value.gridSide, name: "电网侧储能", itemStyle: { color: "#FFFFFF" } },
|
|
1450
|
1559
|
],
|
|
1451
|
1560
|
},
|
|
1452
|
1561
|
],
|
|
|
@@ -1477,6 +1586,24 @@ const incomechart = () => {
|
|
1477
|
1586
|
};
|
|
1478
|
1587
|
// 安全评价
|
|
1479
|
1588
|
const safetychart = () => {
|
|
|
1589
|
+ console.log(safetyEvaluation.value);
|
|
|
1590
|
+ for (let index = 0; index < safetyEvaluation.value.length; index++) {
|
|
|
1591
|
+ safetyEvaluation.value[index].value =safetyEvaluation.value[index].cnt
|
|
|
1592
|
+
|
|
|
1593
|
+ if (index==0) {
|
|
|
1594
|
+ safetyEvaluation.value[index].itemStyle = { color: '#FF5858' }
|
|
|
1595
|
+
|
|
|
1596
|
+ }else if(index==1){
|
|
|
1597
|
+ safetyEvaluation.value[index].itemStyle = { color: '#FFFFFF' }
|
|
|
1598
|
+
|
|
|
1599
|
+ }else if(index==2){
|
|
|
1600
|
+ safetyEvaluation.value[index].itemStyle = { color: '#FFFFFF' }
|
|
|
1601
|
+
|
|
|
1602
|
+ }else if(index==3){
|
|
|
1603
|
+ safetyEvaluation.value[index].itemStyle = { color: '#FFD130' }
|
|
|
1604
|
+
|
|
|
1605
|
+ }
|
|
|
1606
|
+ }
|
|
1480
|
1607
|
safety.value = echarts.init(document.getElementById("safety"));
|
|
1481
|
1608
|
|
|
1482
|
1609
|
let angle = 0; //角度,用来做简单的动画效果的
|
|
|
@@ -1496,47 +1623,17 @@ const safetychart = () => {
|
|
1496
|
1623
|
{
|
|
1497
|
1624
|
value: 0, // 将 cnt 键修改为 value
|
|
1498
|
1625
|
code: 1,
|
|
1499
|
|
- name: "普通"
|
|
|
1626
|
+ name: "事件"
|
|
1500
|
1627
|
},
|
|
1501
|
1628
|
{
|
|
1502
|
1629
|
value: 0, // 将 cnt 键修改为 value
|
|
1503
|
1630
|
code: 2,
|
|
1504
|
|
- name: "告警"
|
|
1505
|
|
- }
|
|
1506
|
|
- ],
|
|
1507
|
|
- formatter: function (name) {
|
|
1508
|
|
- if (name == "普通" || name == "告警") {
|
|
1509
|
|
- return `${name}`;
|
|
1510
|
|
-
|
|
1511
|
|
- }
|
|
1512
|
|
- }
|
|
1513
|
|
- }, {
|
|
1514
|
|
- bottom: fontSize(14)*1,
|
|
1515
|
|
- left:fontSize(14)*2,
|
|
1516
|
|
-
|
|
1517
|
|
- itemHeight: 8,
|
|
1518
|
|
- itemWidth: 8,
|
|
1519
|
|
- textStyle: {
|
|
1520
|
|
- fontSize: fontSize(14),
|
|
1521
|
|
- color: "#ffffff",
|
|
1522
|
|
- },
|
|
1523
|
|
- data: [
|
|
1524
|
|
- {
|
|
1525
|
|
- value: 0, // 将 cnt 键修改为 value
|
|
1526
|
|
- code: 1,
|
|
1527
|
1631
|
name: "故障"
|
|
1528
|
|
- },
|
|
1529
|
|
- {
|
|
1530
|
|
- value: 0, // 将 cnt 键修改为 value
|
|
1531
|
|
- code: 2,
|
|
1532
|
|
- name: "严重故障"
|
|
1533
|
1632
|
}
|
|
1534
|
1633
|
],
|
|
1535
|
1634
|
formatter: function (name) {
|
|
1536
|
|
- if (name == "故障" || name == "严重故障") {
|
|
1537
|
1635
|
return `${name}`;
|
|
1538
|
1636
|
|
|
1539
|
|
- }
|
|
1540
|
1637
|
}
|
|
1541
|
1638
|
}
|
|
1542
|
1639
|
],
|
|
|
@@ -1719,13 +1816,14 @@ const safetychart = () => {
|
|
1719
|
1816
|
labelLine: {
|
|
1720
|
1817
|
show: false,
|
|
1721
|
1818
|
},
|
|
1722
|
|
- data: [
|
|
1723
|
|
- { value: 4, itemStyle: { color: "#2F3230" } },
|
|
1724
|
|
- { value: 3, itemStyle: { color: "#2D4C54" } },
|
|
1725
|
|
-
|
|
1726
|
|
- { value: 3, itemStyle: { color: "#0E4A59" } },
|
|
1727
|
|
- { value: 3, itemStyle: { color: "#1A425D" } },
|
|
1728
|
|
- ],
|
|
|
1819
|
+ // data: [
|
|
|
1820
|
+ // { value: safetyEvaluation.value[1].cnt, itemStyle: { color: "#2F3230" } },
|
|
|
1821
|
+ // { value: safetyEvaluation.value[3].cnt, itemStyle: { color: "#2D4C54" } },
|
|
|
1822
|
+
|
|
|
1823
|
+ // { value: safetyEvaluation.value[2].cnt, itemStyle: { color: "#0E4A59" } },
|
|
|
1824
|
+ // { value: safetyEvaluation.value[1].cnt, itemStyle: { color: "#1A425D" } },
|
|
|
1825
|
+ // ],
|
|
|
1826
|
+ data:safetyEvaluation.value
|
|
1729
|
1827
|
},
|
|
1730
|
1828
|
{
|
|
1731
|
1829
|
type: "pie",
|
|
|
@@ -1747,12 +1845,14 @@ const safetychart = () => {
|
|
1747
|
1845
|
labelLine: {
|
|
1748
|
1846
|
show: false,
|
|
1749
|
1847
|
},
|
|
1750
|
|
- data: [
|
|
1751
|
|
- { value: 4, name: "普通", itemStyle: { color: "#FFFFFF" } },
|
|
1752
|
|
- { value: 3, name: "告警", itemStyle: { color: "#FFD130" } },
|
|
1753
|
|
- { value: 3, name: "故障", itemStyle: { color: "#DD7D4D" } },
|
|
1754
|
|
- { value: 3, name: "严重故障", itemStyle: { color: "#FF5858" } },
|
|
1755
|
|
- ],
|
|
|
1848
|
+ data:safetyEvaluation.value
|
|
|
1849
|
+
|
|
|
1850
|
+ // data: [
|
|
|
1851
|
+ // { value: safetyEvaluation.value[0].cnt, name: "故障", itemStyle: { color: "#FFFFFF" } },
|
|
|
1852
|
+ // { value: safetyEvaluation.value[1].cnt, name:"事件", itemStyle: { color: "#FF5858" } },
|
|
|
1853
|
+ // { value: safetyEvaluation.value[2].cnt, name: "预警", itemStyle: { color: "#DD7D4D" } },
|
|
|
1854
|
+ // { value: safetyEvaluation.value[3].cnt, name: "告警", itemStyle: { color: "#FFD130" } },
|
|
|
1855
|
+ // ],
|
|
1756
|
1856
|
},
|
|
1757
|
1857
|
],
|
|
1758
|
1858
|
};
|
|
|
@@ -1875,7 +1975,26 @@ const formatAmount1 = (amount) => {
|
|
1875
|
1975
|
if (amount == undefined||amount == null) {
|
|
1876
|
1976
|
return "0";
|
|
1877
|
1977
|
}else{
|
|
1878
|
|
- return (amount / 1000).toFixed(2);
|
|
|
1978
|
+ return amount.toFixed(0);
|
|
|
1979
|
+ // return amount
|
|
|
1980
|
+ }
|
|
|
1981
|
+
|
|
|
1982
|
+};
|
|
|
1983
|
+const formatAmount1000 = (amount) => {
|
|
|
1984
|
+ if (amount == undefined||amount == null) {
|
|
|
1985
|
+ return "0";
|
|
|
1986
|
+ }else{
|
|
|
1987
|
+ return (amount/1000).toFixed(1);
|
|
|
1988
|
+ // return amount
|
|
|
1989
|
+ }
|
|
|
1990
|
+
|
|
|
1991
|
+};
|
|
|
1992
|
+const formatAmount10000 = (amount) => {
|
|
|
1993
|
+ if (amount == undefined||amount == null) {
|
|
|
1994
|
+ return "0";
|
|
|
1995
|
+ }else{
|
|
|
1996
|
+ return (amount/10000).toFixed(2);
|
|
|
1997
|
+ // return amount
|
|
1879
|
1998
|
}
|
|
1880
|
1999
|
|
|
1881
|
2000
|
};
|
|
|
@@ -1886,26 +2005,46 @@ const formatAmounts2 = (amount) => {
|
|
1886
|
2005
|
return amount.toFixed(2);
|
|
1887
|
2006
|
}
|
|
1888
|
2007
|
};
|
|
1889
|
|
-onMounted(() => {
|
|
|
2008
|
+const id = ref('')
|
|
|
2009
|
+onMounted( async () => {
|
|
|
2010
|
+ const url = window.location.href; // 获取当前页面的 URL
|
|
|
2011
|
+ const match = url.match(/[?&]id=([^&#]*)/);
|
|
|
2012
|
+
|
|
|
2013
|
+ id.value = match ? match[1] : null; // 提取 id 参数
|
|
|
2014
|
+
|
|
|
2015
|
+console.log(id.value); // 输出: 2eec4706-3690-40fd-9e26-f2917b795367
|
|
|
2016
|
+if (id.value) {
|
|
|
2017
|
+ // 存储到 cookies,设置过期时间为 7 天
|
|
|
2018
|
+ const daysToExpire = 7;
|
|
|
2019
|
+ const date = new Date();
|
|
|
2020
|
+ date.setTime(date.getTime() + (daysToExpire * 24 * 60 * 60 * 1000));
|
|
|
2021
|
+ const expires = "expires=" + date.toUTCString();
|
|
|
2022
|
+
|
|
|
2023
|
+ document.cookie = `JSESSIONID=${id.value}; ${expires}; path=/`; // 设置 cookie
|
|
|
2024
|
+ console.log(`Cookie set: JSESSIONID=${id.value}`);
|
|
|
2025
|
+} else {
|
|
|
2026
|
+ console.log('没有找到 ID');
|
|
|
2027
|
+}
|
|
1890
|
2028
|
// const loading = inject('loading'); // 通过 inject 访问 layoutTitle 变量
|
|
1891
|
2029
|
// loading.close();
|
|
1892
|
2030
|
gatstationstest(); // 天气
|
|
1893
|
2031
|
|
|
1894
|
2032
|
showOverlay(false);
|
|
1895
|
|
- convertImageToBase64(); // 登录
|
|
1896
|
|
- let times = daysDifference() + "";
|
|
1897
|
|
- daysandtime.value = times.split("");
|
|
|
2033
|
+ await convertImageToBase64(); // 全国数据
|
|
|
2034
|
+ // let times = daysDifference() + "";
|
|
|
2035
|
+ // daysandtime.value = times.split("");
|
|
1898
|
2036
|
updateTime(); // 初始更新时间
|
|
1899
|
2037
|
const intervalId = setInterval(updateTime, 1000); // 每秒更新一次时间
|
|
1900
|
2038
|
onUnmounted(() => clearInterval(intervalId)); // 清除定时器
|
|
1901
|
2039
|
// 全国地图
|
|
1902
|
2040
|
|
|
1903
|
|
- // 充放电趋势图
|
|
1904
|
|
- population();
|
|
1905
|
|
- // 电站分类统计
|
|
1906
|
|
- incomechart();
|
|
|
2041
|
+ // 充放电趋势图
|
|
|
2042
|
+ await population();
|
|
|
2043
|
+ // 电站分类统计
|
|
|
2044
|
+ await incomechart();
|
|
1907
|
2045
|
// 安全评价
|
|
1908
|
|
- safetychart();
|
|
|
2046
|
+ await safetychart();
|
|
|
2047
|
+
|
|
1909
|
2048
|
|
|
1910
|
2049
|
window.addEventListener(
|
|
1911
|
2050
|
"resize",
|
|
|
@@ -2142,7 +2281,6 @@ onUnmounted(() => {
|
|
2142
|
2281
|
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25);
|
|
2143
|
2282
|
display: flex;
|
|
2144
|
2283
|
align-items: center;
|
|
2145
|
|
- justify-content: space-around;
|
|
2146
|
2284
|
}
|
|
2147
|
2285
|
.left_eltablediv:nth-child(odd) {
|
|
2148
|
2286
|
width: 372px;
|
|
|
@@ -2154,22 +2292,37 @@ onUnmounted(() => {
|
|
2154
|
2292
|
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25);
|
|
2155
|
2293
|
display: flex;
|
|
2156
|
2294
|
align-items: center;
|
|
2157
|
|
- justify-content: space-around;
|
|
2158
|
2295
|
}
|
|
2159
|
2296
|
|
|
2160
|
2297
|
.scrolladdress{
|
|
2161
|
|
- width: 70px;
|
|
|
2298
|
+ width: 90px;
|
|
|
2299
|
+ margin-right: 10px;
|
|
|
2300
|
+ white-space: nowrap; /* 不换行 */
|
|
|
2301
|
+ overflow: hidden; /* 隐藏超出部分 */
|
|
|
2302
|
+ text-overflow: ellipsis; /* 使用省略号表示超出部分 */
|
|
|
2303
|
+ padding-left: 10px;
|
|
2162
|
2304
|
}
|
|
2163
|
2305
|
.scrollcontent{
|
|
2164
|
|
- width: 60px;
|
|
2165
|
|
-
|
|
|
2306
|
+ width: 160px;
|
|
|
2307
|
+ white-space: nowrap; /* 不换行 */
|
|
|
2308
|
+ overflow: hidden; /* 隐藏超出部分 */
|
|
|
2309
|
+ text-overflow: ellipsis; /* 使用省略号表示超出部分 */
|
|
2166
|
2310
|
box-sizing: border-box;
|
|
2167
|
2311
|
}
|
|
2168
|
2312
|
.scrollevent{
|
|
2169
|
2313
|
width: 44px;
|
|
2170
|
2314
|
}
|
|
2171
|
2315
|
.left_eltabnormal{
|
|
2172
|
|
- width: 40px;
|
|
|
2316
|
+ width: 50px;
|
|
|
2317
|
+ white-space: nowrap; /* 不换行 */
|
|
|
2318
|
+ overflow: hidden; /* 隐藏超出部分 */
|
|
|
2319
|
+ text-overflow: ellipsis; /* 使用省略号表示超出部分 */
|
|
|
2320
|
+}
|
|
|
2321
|
+.left_eltabnormal1{
|
|
|
2322
|
+ width: 50px;
|
|
|
2323
|
+ white-space: nowrap; /* 不换行 */
|
|
|
2324
|
+ overflow: hidden; /* 隐藏超出部分 */
|
|
|
2325
|
+ text-overflow: ellipsis; /* 使用省略号表示超出部分 */
|
|
2173
|
2326
|
}
|
|
2174
|
2327
|
.left_eltabledivtitle {
|
|
2175
|
2328
|
width: 100%;
|
|
|
@@ -2179,7 +2332,6 @@ onUnmounted(() => {
|
|
2179
|
2332
|
color: #ffffff;
|
|
2180
|
2333
|
display: flex;
|
|
2181
|
2334
|
align-items: center;
|
|
2182
|
|
- justify-content: space-around;
|
|
2183
|
2335
|
position: relative;
|
|
2184
|
2336
|
overflow: hidden;
|
|
2185
|
2337
|
}
|
|
|
@@ -2663,5 +2815,9 @@ el-table {
|
|
2663
|
2815
|
height: 8px;
|
|
2664
|
2816
|
background: linear-gradient(280deg, rgba(70, 206, 182, 0.62) 0%, #30b4ff 100%);
|
|
2665
|
2817
|
}
|
|
|
2818
|
+.left_boxt{
|
|
|
2819
|
+ width: 20px;
|
|
|
2820
|
+ border: #1fffff;
|
|
|
2821
|
+}
|
|
2666
|
2822
|
</style>
|
|
2667
|
2823
|
<!-- -->
|