浏览代码

故障信息

master
dong 1年前
父节点
当前提交
7677f21ff9
共有 10 个文件被更改,包括 45554 次插入259 次删除
  1. 47
    0
      package-lock.json
  2. 1
    0
      package.json
  3. 二进制
      src/assets/Putaway.png
  4. 二进制
      src/assets/open.png
  5. 21441
    1
      src/json/100000/650000.geoJson
  6. 3
    1
      src/json/100000/710000.geoJson
  7. 23363
    1
      src/json/100000/810000.geoJson
  8. 344
    188
      src/views/nationwide.vue
  9. 346
    67
      src/views/singlestation.vue
  10. 9
    1
      vite.config.ts

+ 47
- 0
package-lock.json 查看文件

@@ -35,6 +35,7 @@
35 35
         "postcss-pxtorem": "^6.1.0",
36 36
         "px2rem-loader": "^0.1.9",
37 37
         "sass": "^1.71.1",
38
+        "sass-loader": "^16.0.2",
38 39
         "typescript": "~5.3.0",
39 40
         "vite": "^5.0.11",
40 41
         "vite-plugin-mock": "^3.0.1",
@@ -2196,6 +2197,12 @@
2196 2197
       "integrity": "sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==",
2197 2198
       "deprecated": "This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x."
2198 2199
     },
2200
+    "node_modules/neo-async": {
2201
+      "version": "2.6.2",
2202
+      "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
2203
+      "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
2204
+      "dev": true
2205
+    },
2199 2206
     "node_modules/node-releases": {
2200 2207
       "version": "2.0.14",
2201 2208
       "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
@@ -2783,6 +2790,46 @@
2783 2790
         "node": ">=14.0.0"
2784 2791
       }
2785 2792
     },
2793
+    "node_modules/sass-loader": {
2794
+      "version": "16.0.2",
2795
+      "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-16.0.2.tgz",
2796
+      "integrity": "sha512-Ll6iXZ1EYwYT19SqW4mSBb76vSSi8JgzElmzIerhEGgzB5hRjDQIWsPmuk1UrAXkR16KJHqVY0eH+5/uw9Tmfw==",
2797
+      "dev": true,
2798
+      "dependencies": {
2799
+        "neo-async": "^2.6.2"
2800
+      },
2801
+      "engines": {
2802
+        "node": ">= 18.12.0"
2803
+      },
2804
+      "funding": {
2805
+        "type": "opencollective",
2806
+        "url": "https://opencollective.com/webpack"
2807
+      },
2808
+      "peerDependencies": {
2809
+        "@rspack/core": "0.x || 1.x",
2810
+        "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
2811
+        "sass": "^1.3.0",
2812
+        "sass-embedded": "*",
2813
+        "webpack": "^5.0.0"
2814
+      },
2815
+      "peerDependenciesMeta": {
2816
+        "@rspack/core": {
2817
+          "optional": true
2818
+        },
2819
+        "node-sass": {
2820
+          "optional": true
2821
+        },
2822
+        "sass": {
2823
+          "optional": true
2824
+        },
2825
+        "sass-embedded": {
2826
+          "optional": true
2827
+        },
2828
+        "webpack": {
2829
+          "optional": true
2830
+        }
2831
+      }
2832
+    },
2786 2833
     "node_modules/semver": {
2787 2834
       "version": "7.6.0",
2788 2835
       "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",

+ 1
- 0
package.json 查看文件

@@ -38,6 +38,7 @@
38 38
     "postcss-pxtorem": "^6.1.0",
39 39
     "px2rem-loader": "^0.1.9",
40 40
     "sass": "^1.71.1",
41
+    "sass-loader": "^16.0.2",
41 42
     "typescript": "~5.3.0",
42 43
     "vite": "^5.0.11",
43 44
     "vite-plugin-mock": "^3.0.1",

二进制
src/assets/Putaway.png 查看文件


二进制
src/assets/open.png 查看文件


+ 21441
- 1
src/json/100000/650000.geoJson
文件差异内容过多而无法显示
查看文件


+ 3
- 1
src/json/100000/710000.geoJson 查看文件

@@ -1 +1,3 @@
1
-{"type":"FeatureCollection","features":[]}
1
+{"type":"FeatureCollection","features":[
2
+    
3
+]}

+ 23363
- 1
src/json/100000/810000.geoJson
文件差异内容过多而无法显示
查看文件


+ 344
- 188
src/views/nationwide.vue 查看文件

@@ -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
 <!--  -->

+ 346
- 67
src/views/singlestation.vue 查看文件

@@ -3,6 +3,8 @@
3 3
     <div class="left">
4 4
       <div class="left_logo">
5 5
         <img class="left_logo1" src="../assets/svg/logo.svg" alt="logo">
6
+      
7
+
6 8
       </div>
7 9
       <div class="left_top">
8 10
         <div class="left_toptitle TiF_font">电站指标</div>
@@ -10,31 +12,31 @@
10 12
         <div class="left_top1">
11 13
           <div class="left_top21">
12 14
             <div class="left_top21img">
13
-              <div class="custom-font18 left_top21imgfont">2.67<span class="left_top21img1">GWh</span></div> </div>
14
-            <div class="left_top21name TiF_font">装机容量</div>
15
+              <div class="custom-font18 left_top21imgfont">{{characteristic.installedCap}}<span class="left_top21img1">kWh</span></div> </div>
16
+            <div class="left_top21name TiF_font">装机容量</div>
15 17
           </div>
16 18
           <div class="left_top21">
17 19
             <div class="left_top21img">
18
-              <div class="left_top21imgfont custom-font18">1.304<span class="left_top21img1">GW</span></div> </div>
19
-            <div class="left_top21name TiF_font">装机功率</div>
20
+              <div class="left_top21imgfont custom-font18">{{characteristic.installedPower}}<span class="left_top21img1">kW</span></div> </div>
21
+            <div class="left_top21name TiF_font">装机功率</div>
20 22
           </div>
21 23
         </div>
22 24
        <div class="left_top2img">
23 25
         <div class="left_top21">
24 26
           <div class="left_top21img">
25
-            <div class="left_top21imgfont custom-font18">2.6<span class="left_top21img1">GWh</span></div> </div>
27
+            <div class="left_top21imgfont custom-font18">{{characteristic.dayImportKwh}}<span class="left_top21img1">kWh</span></div> </div>
26 28
           <div class="left_top21name TiF_font">今日总充电量</div>
27 29
         </div>
28 30
         <div class="left_top21">
29
-          <div class="left_top21img"> <div class="left_top21imgfont custom-font18">2.2<span class="left_top21img1">GWh</span></div> </div>
31
+          <div class="left_top21img"> <div class="left_top21imgfont custom-font18">{{formatAmount1000(characteristic.accumulativeImportKwh)}}<span class="left_top21img1">MWh</span></div> </div>
30 32
           <div class="left_top21name TiF_font">累计总充电量</div>
31 33
         </div>
32 34
         <div class="left_top21">
33
-          <div class="left_top21img"> <div class="left_top21imgfont custom-font18">949.8<span class="left_top21img1">GWh</span></div> </div>
35
+          <div class="left_top21img"> <div class="left_top21imgfont custom-font18">{{characteristic.dayExportKwh}}<span class="left_top21img1">kWh</span></div> </div>
34 36
           <div class="left_top21name TiF_font">今日总放电量</div>
35 37
         </div>
36 38
         <div class="left_top21">
37
-          <div class="left_top21img"> <div class="left_top21imgfont custom-font18">835.1<span class="left_top21img1">GWh</span></div> </div>
39
+          <div class="left_top21img"> <div class="left_top21imgfont custom-font18">{{formatAmount1000(characteristic.accumulativeExportKwh)}}<span class="left_top21img1">MWh</span></div> </div>
38 40
           <div class="left_top21name TiF_font">累计总放电量</div>
39 41
         </div>
40 42
        </div>
@@ -49,32 +51,38 @@
49 51
       <div class="left_eltable TiF_font">
50 52
          <div class="left_eltabledivtitle">
51 53
           <div class="left_eltabledivtitles"></div>
52
-          <div>站点</div>
53
-          <div>告警内容</div>
54
-          <div>事件</div>
55
-          <div>状态</div>
54
+          <div class="scrolladdress">站点</div>
55
+          <div class="scrollcontent">告警内容</div>
56
+          <div class="scrollevent">事件</div>
57
+          <div class="left_eltabnormal1">状态</div>
56 58
          </div>
57
-         
58
-         <div class="left_eltablediv">  <div>电站1</div>
59
-         <div>告警内容</div>
60
-         <div>事件</div>
61
-         <div class="left_eltabnormal">正常</div></div>
62
-         <div class="left_eltabledivs">  <div>电站2</div>
63
-         <div>告警内容</div>
64
-         <div>事件</div>
65
-         <div class="left_eltabnormal">正常</div></div>
66
-         <div class="left_eltablediv">  <div>电站3</div>
67
-         <div>告警内容</div>
68
-         <div>事件</div>
69
-         <div class="left_eltabnormals">故障</div></div>
70
-         <div class="left_eltabledivs">  <div>电站4</div>
71
-         <div>告警内容</div>
72
-         <div>事件</div>
73
-         <div class="left_eltabnormal">正常</div></div>
74
-         <div class="left_eltablediv">  <div>电站5</div>
75
-         <div>告警内容</div>
76
-         <div>事件</div>
77
-         <div class="left_eltabnormals">故障</div></div>
59
+         <div class="execdata">
60
+          <div class="execInfo">
61
+            <!-- <div class="left_eltablediv" v-for="(item,index) in tableData" :key="index">
62
+              <div>{{item.address}}</div>
63
+              <div>{{item.content}}</div>
64
+              <div>{{item.event}}</div>
65
+              <div class="left_eltabnormal">{{item.state}}</div>
66
+            </div> -->
67
+            <vue3-seamless-scroll
68
+        :list="AlarmStatistics"
69
+        :step="1"
70
+        class="seamless-warp2"
71
+        >
72
+        <div class="left_eltablediv"
73
+            v-for="(item,index) in AlarmStatistics"
74
+            :key="index"
75
+        >
76
+        <div class="scrolladdress">{{item.deviceName}}</div>
77
+        <div class="scrollcontent">{{item.title}}</div>
78
+        <div class="scrollevent">{{item.alarmname}}</div>
79
+        <div class="left_eltabnormal" v-if="item.todayname==1">已恢复</div>
80
+        <div class="left_eltabnormal" v-else>未恢复</div>
81
+        </div>
82
+    </vue3-seamless-scroll> 
83
+          </div>
84
+        
85
+        </div>
78 86
 
79 87
       </div>
80 88
 
@@ -84,20 +92,54 @@
84 92
       <div class="center_top">
85 93
         <div class="center_top1img11">
86 94
           <div class="center_top1img1 TiF_font">实时功率</div>
87
-          <div class="center_top1img2 custom-font30">4368<span class="left_top21img2">kw</span></div>
95
+          <div class="center_top1img2 custom-font30">{{formatAmount(sysBatterystack.totalActivePower*1)}}<span class="left_top21img2">kW</span></div>
88 96
         </div>
89 97
         <div class="center_top1img22">
90 98
           <div class="center_top1img1 TiF_font">状态</div>
91
-          <div class="center_top1img21 TiF_font">充电</div>
99
+          <div class="center_top1img21 TiF_font" v-if="sysBatterystack.batteryStatus==0">空闲</div>
100
+          <div class="center_top1img21 TiF_font" v-if="sysBatterystack.batteryStatus==1">充电</div>
101
+          <div class="center_top1img21 TiF_font" v-if="sysBatterystack.batteryStatus==2">放电</div>
102
+          <div class="center_top1img21 TiF_font" v-if="sysBatterystack.batteryStatus==3">充满</div>
103
+          <div class="center_top1img21 TiF_font" v-if="sysBatterystack.batteryStatus==4">放空</div>
104
+          <div class="center_top1img21 TiF_font" v-if="sysBatterystack.batteryStatus==5">故障</div>
92 105
         </div>
93 106
         <div class="center_top1img33">
94 107
           <div class="center_top1img1 TiF_font">SOC</div>
95
-          <div class="center_top1img2 custom-font30">20<span class="left_top21img2">%</span></div>
108
+          <div class="center_top1img2 custom-font30">{{formatAmount(sysBatterystack.soc*1)}}<span class="left_top21img2">%</span></div>
96 109
         </div>
97 110
         <div class="center_top1img44">
98 111
           <div class="center_top1img1 TiF_font">系统功率</div> 
99
-          <div class="center_top1img2 custom-font30">20<span class="left_top21img2">%</span></div>
112
+          <div class="center_top1img2 custom-font30">{{sysBatterystack.systemPower}}<span class="left_top21img2">%</span></div>
100 113
         </div>
114
+        
115
+      </div>
116
+      <div class="left_boxt">
117
+        <div></div>
118
+        <!-- <div class="left_boxt1">
119
+          浙江临安鹏达
120
+          <img class="left_boxopen" src="../assets/open.png" alt="">
121
+          <img class="left_boxopen" src="../assets/Putaway.png" alt="">
122
+        </div> -->
123
+        <div class="left_boxt1">
124
+          <el-select
125
+          v-model="Singlevalue"
126
+          collapse-tags
127
+          placeholder="选择电站"
128
+          popper-class="custom_header"
129
+          :max-collapse-tags="1"
130
+          class="Space_content"
131
+          size="large"
132
+          :popper-append-to-body="false"
133
+          @change="postemsDevice"
134
+        >
135
+          <el-option v-for="(item, index) in cities" :key="index" :label="item.stationName" :value="item.id" />
136
+          <template #prefix>
137
+            {{ (cities.find(s => s.id === Singlevalue) || {}).stationName }}
138
+          </template>
139
+        </el-select>
140
+ 
141
+        </div>
142
+       
101 143
       </div>
102 144
       <!-- 单站模型 -->
103 145
       <div id="main"></div>  
@@ -128,11 +170,11 @@
128 170
         <div class="left_toptitle TiF_font">收益指标</div>
129 171
           <div class="left_topdiv">
130 172
             <div class="left_topdivname custom-font30">累计收益</div>
131
-            <div class="left_topdivpay custom-font30">3432432432万元</div>
173
+            <div class="left_topdivpay custom-font30">{{formatAmount10000(characteristic.totalProfit)}}万元</div>
132 174
           </div>
133 175
           <div class="left_Alarm">
134 176
             <div class="left_topdivname1 custom-fonts">今日收益</div>
135
-            <div class="left_topdivpay1 custom-fonts">3432432432万元</div>
177
+            <div class="left_topdivpay1 custom-fonts">{{formatAmount(characteristic.todayProfit)}}元</div>
136 178
           </div>
137 179
       </div>
138 180
       <div class="right_center">
@@ -147,14 +189,14 @@
147 189
             <img class="right_bottomrevenueimg" src="../assets/svg/voltage.svg" alt="">
148 190
             <div class="right_bottomrevenuediv">
149 191
              <div class="right_bottomrevenuedivd custom-font">单体最低电压</div>
150
-             <div class="right_bottomrevenuev custom-fonts">46<span class="left_top21img1">V</span></div>
192
+             <div class="right_bottomrevenuev custom-fonts">{{formatAmount(sysBatterystack.maxCellVoltage*1)}}<span class="left_top21img1">V</span></div>
151 193
             </div>
152 194
          </div>
153 195
          <div class="right_bottomrevenue">
154 196
           <img class="right_bottomrevenueimg" src="../assets/svg/voltage.svg" alt="">
155 197
           <div class="right_bottomrevenuediv">
156 198
            <div class="right_bottomrevenuedivd custom-font">单体最高电压</div>
157
-           <div class="right_bottomrevenuev custom-fonts">46<span class="left_top21img1">V</span></div>
199
+           <div class="right_bottomrevenuev custom-fonts">{{formatAmount(sysBatterystack.minCellVoltage*1)}}<span class="left_top21img1">V</span></div>
158 200
           </div>
159 201
        </div>
160 202
         </div>
@@ -163,14 +205,14 @@
163 205
             <img class="right_bottomrevenueimg" src="../assets/svg/temperature.svg" alt="">
164 206
             <div class="right_bottomrevenuediv">
165 207
              <div class="right_bottomrevenuedivd custom-font">单体最低温度</div>
166
-             <div class="right_bottomrevenuev custom-fonts">46<span class="left_top21img1">℃</span></div>
208
+             <div class="right_bottomrevenuev custom-fonts">{{formatAmount(sysBatterystack.minCellTempr*1)}}<span class="left_top21img1">℃</span></div>
167 209
             </div>
168 210
          </div>
169 211
          <div class="right_bottomrevenue">
170 212
           <img class="right_bottomrevenueimg" src="../assets/svg/temperature.svg" alt="">
171 213
           <div class="right_bottomrevenuediv">
172 214
            <div class="right_bottomrevenuedivd custom-font">单体最高温度</div>
173
-           <div class="right_bottomrevenuev custom-fonts">46<span class="left_top21img1">℃</span></div>
215
+           <div class="right_bottomrevenuev custom-fonts">{{formatAmount(sysBatterystack.maxCellTempr*1)}}<span class="left_top21img1">℃</span></div>
174 216
           </div>
175 217
        </div>
176 218
         </div>
@@ -179,14 +221,14 @@
179 221
             <img class="right_bottomrevenueimg" src="../assets/svg/water.svg" alt="">
180 222
             <div class="right_bottomrevenuediv">
181 223
              <div class="right_bottomrevenuedivd custom-font">液冷回水温度</div>
182
-             <div class="right_bottomrevenuev custom-fonts">46<span class="left_top21img1">℃</span></div>
224
+             <div class="right_bottomrevenuev custom-fonts">{{formatAmount(sysBatterystack.airInTempr*1)}}<span class="left_top21img1">℃</span></div>
183 225
             </div>
184 226
          </div>
185 227
          <div class="right_bottomrevenue">
186 228
           <img class="right_bottomrevenueimg" src="../assets/svg/water.svg" alt="">
187 229
           <div class="right_bottomrevenuediv">
188 230
            <div class="right_bottomrevenuedivd custom-font">液冷出水温度</div>
189
-           <div class="right_bottomrevenuev custom-fonts">46<span class="left_top21img1">V</span></div>
231
+           <div class="right_bottomrevenuev custom-fonts">{{formatAmount(sysBatterystack.airOutTempr*1)}}<span class="left_top21img1">V</span></div>
190 232
           </div>
191 233
        </div>
192 234
         </div>
@@ -200,8 +242,10 @@
200 242
 </template>
201 243
  
202 244
 <script setup>
203
-//--------//
245
+//---- ----//
204 246
 import { onMounted, ref,onUnmounted,markRaw  } from "vue";
247
+import { Vue3SeamlessScroll } from "vue3-seamless-scroll";
248
+
205 249
 import { useRouter } from 'vue-router'
206 250
 import axios from "axios";
207 251
 import { inject } from 'vue';
@@ -212,6 +256,8 @@ const weather = ref(''); // 天气
212 256
 const currentTime = ref('');
213 257
 const column = ref(null);// 充放电趋势图
214 258
 const income = ref(null);// 充放电趋势图
259
+const Singlevalue = ref('浙江临安');// 充放电趋势图
260
+const cities = ref([]);
215 261
 const currentDateyear = ref({});
216 262
 
217 263
 function updateTime() {
@@ -269,7 +315,73 @@ const getWeather = async () => {
269 315
     console.error("请求出错:", error);
270 316
   }
271 317
 }
272
- 
318
+const characteristic = ref({}); // 电站指标
319
+const AlarmStatistics = ref([]); // 告警统计
320
+const sysBatterystack = ref([]); // 告警统计
321
+const ChargeDischargeTendency = ref([]); // 告警统计
322
+const scureenpofit = ref([]); // 收益趋势
323
+
324
+ // 电站列表
325
+ const poststationstationName = async () => {
326
+  try {
327
+  //  let { data } = await axios.post(`/api/station/list/stationName`);
328
+  let { data } = await axios.post(`/station/list/stationName`);
329
+console.log( data.data[0].id);
330
+
331
+  if (data.data.length == 0) {
332
+    Singlevalue.value = "";
333
+    return;
334
+  } else {
335
+    Singlevalue.value = data.data[0].id;
336
+  }
337
+  cities.value = data.data;
338
+  await gitCitylevel()
339
+
340
+} catch (error) {
341
+    // convertImageToBase64();
342
+
343
+    console.error("请求出错:", error);
344
+  }
345
+};
346
+//equipmentID 设备id
347
+const equipmentID =ref('');
348
+const postemsDevice = (e) => {
349
+  Singlevalue.value = e
350
+   gitCitylevel()
351
+  
352
+};
353
+  // 单站接口
354
+  const gitCitylevel = async () => {
355
+  try {
356
+    // let { data: resdata } = await axios.post(`/api/screen/screenpower?powerId=bf91569e-bedd-4609-80ee-1f8d9bb5a5ed`);
357
+    let { data: resdata } = await axios.post(`/screen/screenpower?powerId=${Singlevalue.value}`);
358
+    console.log(resdata);
359
+    characteristic.value = resdata.data.PowerStationIndex;
360
+   AlarmStatistics.value = resdata.data.AlarmStatistics
361
+   sysBatterystack.value = resdata.data.sysBatterystack
362
+   let ymd = resdata.data.ChargeDischargeTendency.map(item => item.ymd.slice(-2));
363
+   let chargeTotal = resdata.data.ChargeDischargeTendency.map(item => item.chargeTotal);
364
+   let dischargeTotal = resdata.data.ChargeDischargeTendency.map(item => item.dischargeTotal);
365
+   ChargeDischargeTendency.value[0]= ymd
366
+   ChargeDischargeTendency.value[1]= chargeTotal
367
+   ChargeDischargeTendency.value[2]= dischargeTotal
368
+   let ymd1 = resdata.data.scureenpofit.map(item => item.ymd.slice(-2));
369
+   let profit = resdata.data.scureenpofit.map(item => item.profit);
370
+   scureenpofit.value[0]= ymd1
371
+   scureenpofit.value[1]= profit
372
+
373
+
374
+    // 充放电趋势图
375
+   await population();
376
+  // 电站分类统计
377
+  await incomechart();
378
+  } catch (error) {
379
+    // convertImageToBase64();
380
+
381
+    console.error("请求出错:", error);
382
+  }
383
+}; 
384
+
273 385
 // 充放电趋势图
274 386
 const population = () => {
275 387
   column.value = markRaw(echarts.init(document.getElementById("column")));
@@ -282,7 +394,7 @@ const population = () => {
282 394
   );
283 395
   let myoption = {
284 396
     title: {
285
-    subtext: 'GWh',
397
+    subtext: 'kWh',
286 398
     subtextStyle: {
287 399
     fontSize:fontSize(14),
288 400
 
@@ -340,7 +452,7 @@ const population = () => {
340 452
        
341 453
     },
342 454
 
343
-      data: [" 03", " 04", " 05", " 06", " 07", "08"],
455
+      data:ChargeDischargeTendency.value[0],
344 456
     },
345 457
     yAxis: {
346 458
       type: "value",
@@ -366,7 +478,7 @@ const population = () => {
366 478
     series: [
367 479
     
368 480
     {
369
-        data: [223, 234, 290, 109, 131, 630],
481
+        data:ChargeDischargeTendency.value[1],
370 482
 
371 483
         name: '充电',
372 484
         type: "bar",
@@ -409,7 +521,7 @@ const population = () => {
409 521
         global: false
410 522
       }
411 523
     },
412
-        data: [125, 238, 310, 121, 134, 681],
524
+        data: ChargeDischargeTendency.value[2],
413 525
 
414 526
       },
415 527
     ],
@@ -418,6 +530,8 @@ const population = () => {
418 530
 };
419 531
  // 收益趋势
420 532
  function incomechart (){
533
+  console.log(scureenpofit.value);
534
+  
421 535
   income.value = markRaw(echarts.init(document.getElementById("income")));
422 536
   window.addEventListener(
423 537
     "resize",
@@ -482,7 +596,7 @@ const population = () => {
482 596
 	    },
483 597
     },
484 598
 
485
-      data: ["03", "04", "05", "06", "07", "08"],
599
+      data: scureenpofit.value[0],
486 600
     },
487 601
     yAxis: {
488 602
       type: "value",
@@ -509,7 +623,7 @@ const population = () => {
509 623
       {
510 624
         name: 'hill',
511 625
         type: 'pictorialBar',
512
-        barWidth: '215%',
626
+        barWidth: '160%',
513 627
         // symbol: 'path://M0,10 L10,10 L5,0 L0,10 z',
514 628
         symbol: 'path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z',
515 629
         itemStyle: {
@@ -520,13 +634,12 @@ const population = () => {
520 634
             opacity: 1
521 635
           }
522 636
         },
523
-       
524
-        data: [{value: 100, symbolSize: [fontSize(80),fontSize(100)]}, // 第一个值表示柱子的宽度,第二个值表示柱子的高度
525
-      {value: 60, symbolSize: [fontSize(130),fontSize(60)]},
526
-      {value: 75, symbolSize: [fontSize(130),fontSize(75)]},
527
-      {value: 58, symbolSize: [fontSize(130),fontSize(58)]},
528
-      {value: 82, symbolSize: [fontSize(130), fontSize(82)]},
529
-      {value: 91, symbolSize: [fontSize(80),fontSize(91)]},],
637
+        data: [{value:  scureenpofit.value[1][0]}, // 第一个值表示柱子的宽度,第二个值表示柱子的高度
638
+      {value: scureenpofit.value[1][1]},
639
+      {value: scureenpofit.value[1][2]},
640
+      {value:scureenpofit.value[1][3]},
641
+      {value:scureenpofit.value[1][4]},
642
+      {value: scureenpofit.value[1][5]},],
530 643
       }
531 644
     ]
532 645
   };
@@ -551,7 +664,36 @@ const fontSize = (res) => {
551 664
    
552 665
             return res * fontSize;
553 666
 };
667
+const formatAmount1000 = (amount) => {
668
+  if (amount == undefined||amount == null) {
669
+    return "0";
670
+  }else{
671
+    return (amount/1000).toFixed(1);
672
+    // return amount
673
+  }
674
+ 
675
+};
676
+const formatAmount10000 = (amount) => {
677
+  if (amount == undefined||amount == null) {
678
+    return "0";
679
+  }else{
680
+    return (amount/10000).toFixed(2);
681
+    // return amount
682
+  }
683
+ 
684
+};
685
+ // 省略小数点后1位
686
+ const formatAmount = (amount) => {
687
+  if (amount == undefined||amount == null) {
688
+    return "0";
689
+  }else{
690
+    // return (amount / 1000).toFixed(2);
691
+    return amount.toFixed(1);
692
+  }
693
+ 
694
+};
554 695
 onMounted(() => {
696
+  poststationstationName();
555 697
   showOverlay(true)
556 698
 
557 699
 
@@ -560,10 +702,7 @@ onMounted(() => {
560 702
   const intervalId = setInterval(updateTime, 1000); // 每秒更新一次时间
561 703
   onUnmounted(() => clearInterval(intervalId)); // 清除定时器
562 704
   gatstationstest()
563
-  // 充放电趋势图
564
-  population();
565
-  // 电站分类统计
566
-  incomechart();
705
+ 
567 706
   showOverlay(false)
568 707
 
569 708
 });
@@ -577,7 +716,7 @@ onUnmounted(() => {
577 716
   }
578 717
 });
579 718
 </script>
580
-<style scoped>
719
+<style scoped lang="scss">
581 720
 *{
582 721
   color: #ffffff;
583 722
   padding: 0px;
@@ -603,10 +742,30 @@ onUnmounted(() => {
603 742
   width: 100%;
604 743
   height: 38px;
605 744
   margin-top: 40px;
745
+  display: flex;
746
+  align-items: center;
747
+  justify-content: space-between;
606 748
 }
607 749
 .left_logo1{
608 750
   height: 100%;
609 751
 }
752
+.left_boxt{
753
+  width: 100%;
754
+  padding: 0px 120px;
755
+  margin-top: 20px;
756
+  display: flex;
757
+  align-items: center;
758
+  justify-content: space-between;
759
+
760
+}
761
+
762
+
763
+
764
+.left_boxopen{
765
+  width: 30px;
766
+  height: 30px;
767
+  margin-right: 10px;
768
+}
610 769
 .left_top {
611 770
   width: 100%;
612 771
   height: 280px;
@@ -788,7 +947,6 @@ color: rgba(255,255,255,0.78);
788 947
 text-shadow: 1px 1px 1px rgba(0,0,0,0.25);
789 948
 display: flex;
790 949
 align-items: center;
791
-justify-content: space-around;
792 950
 }
793 951
 .left_eltabnormal{
794 952
   font-size: 14px;
@@ -810,7 +968,6 @@ line-height: 14px;
810 968
 text-shadow: 1px 1px 1px rgba(0,0,0,0.25);
811 969
 display: flex;
812 970
 align-items: center;
813
-justify-content: space-around;
814 971
 }
815 972
 el-table{
816 973
   color: #222;
@@ -1314,4 +1471,126 @@ height: 803px;
1314 1471
 .TiF_font {
1315 1472
   font-family: 'AlimamaFangYuanTiF', sans-serif;
1316 1473
 }
1474
+.execdata{
1475
+  overflow: hidden;
1476
+ }
1477
+.execInfo {
1478
+  width: 100%;
1479
+  height: 200px;
1480
+  overflow: hidden;
1481
+
1482
+}
1483
+.scrolladdress{
1484
+  width: 90px;
1485
+  margin-left: 10px;
1486
+  margin-right: 10px;
1487
+  white-space: nowrap; /* 不换行 */
1488
+  overflow: hidden; /* 隐藏超出部分 */
1489
+  text-overflow: ellipsis; /* 使用省略号表示超出部分 */
1490
+}
1491
+.scrollcontent{
1492
+  width: 160px;
1493
+  white-space: nowrap; /* 不换行 */
1494
+  overflow: hidden; /* 隐藏超出部分 */
1495
+  text-overflow: ellipsis; /* 使用省略号表示超出部分 */
1496
+  box-sizing: border-box;
1497
+}
1498
+.scrollevent{
1499
+  width: 44px;
1500
+}
1501
+.left_eltabnormal{
1502
+  width: 50px;
1503
+  white-space: nowrap; /* 不换行 */
1504
+  overflow: hidden; /* 隐藏超出部分 */
1505
+  text-overflow: ellipsis; /* 使用省略号表示超出部分 */
1506
+}
1507
+.left_eltabnormal1{
1508
+  width: 50px;
1509
+  white-space: nowrap; /* 不换行 */
1510
+  overflow: hidden; /* 隐藏超出部分 */
1511
+  text-overflow: ellipsis; /* 使用省略号表示超出部分 */
1512
+}
1513
+.left_boxt1 {
1514
+
1515
+  font-size: 18px;
1516
+  display: flex;
1517
+  align-items: center;
1518
+ 
1519
+ 
1520
+  :deep(.el-select__wrapper) {
1521
+    .el-select__prefix {
1522
+  background-image: linear-gradient(to bottom, #30CBEB, #FFFFFF); /* 调整颜色渐变位置和数量 */
1523
+  -webkit-background-clip: text !important;
1524
+  background-clip: text !important;
1525
+  color: transparent !important;
1526
+
1527
+    }
1528
+  
1529
+    :deep(.el-select__selected-item) {
1530
+      font-size: 22px;
1531
+    }
1532
+
1533
+    background-color: rgb(0 0 0 / 0%);
1534
+    box-shadow: 0 0 0 0 !important;
1535
+
1536
+    --el-input-transparent-border: 0 0 0 0px;
1537
+    --el-input-hover-border: 0px !important;
1538
+    --el-input-border: 0px;
1539
+
1540
+    // background-color:
1541
+  }
1542
+  :deep(.el-select .el-input__wrapper.is-focus) {
1543
+    box-shadow: 0 0 0 0 !important;
1544
+  }
1545
+  :deep(.el-select .el-input.is-focus .el-input__wrapper) {
1546
+    box-shadow: 0 0 0 0 !important;
1547
+  }
1548
+
1549
+  // 自定义el-select的下拉箭头
1550
+  :deep(.el-select__caret) {
1551
+    /* 为下拉小箭头留出一点位置,避免被文字覆盖 */
1552
+    padding-right: 14px;
1553
+width: 24px;
1554
+height: 24px;
1555
+    /* 很关键:将默认的select选择框样式清除 */
1556
+    appearance: none;
1557
+
1558
+    /* 自定义图片 */
1559
+    background: url("http://ourjs.github.io/static/2015/arrow.png") no-repeat scroll right center transparent;
1560
+
1561
+    /* 自定义图片的大小 */
1562
+    background-size: 100% 100%;
1563
+  }
1564
+
1565
+  /* 将小箭头的样式去去掉 */
1566
+  :deep(.el-select__suffix .el-icon svg) {
1567
+    width: 0;
1568
+  }
1569
+  :deep(.el-icon-arrow-up::before) {
1570
+    content: "";
1571
+  }
1572
+  :deep(.el-select--large .el-select__wrapper) {
1573
+    font-size: 24px;
1574
+    
1575
+  }
1576
+
1577
+}
1578
+ 
1579
+.el-select-dropdown__item{
1580
+  color: #fff;
1581
+  font-size: 16px;
1582
+  padding-left:20px;
1583
+}
1584
+.is-selected{
1585
+  color: #30CBEB;
1586
+  font-size: 16px;
1587
+  padding-left:20px;
1588
+
1589
+}
1590
+
1591
+.el-select-dropdown__item.is-hovering{
1592
+  background-color: rgb(0 0 0 / 0%);
1593
+}
1594
+ 
1595
+
1317 1596
 </style>

+ 9
- 1
vite.config.ts 查看文件

@@ -9,8 +9,16 @@ export default defineConfig({
9 9
   base:"./",
10 10
 	plugins:[
11 11
 		vue(),
12
-		 
13 12
 	],
13
+  server: {
14
+    proxy: {
15
+      '/api': {
16
+        target: 'https://esos-iot.bjdexn.cn', // 目标服务器
17
+        changeOrigin: true, // 是否改变原始主机头为目标URL
18
+        rewrite: (path) => path.replace(/^\/api/, ''), // 重写路径
19
+      },
20
+    },
21
+  },
14 22
   css: {
15 23
     postcss: {
16 24
       plugins: [

正在加载...
取消
保存