Browse Source

常规消缺

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 2 months ago
parent
commit
747ca0f95b

+ 1 - 1
src/components/chart/radar/radar-chart.vue

@@ -105,7 +105,7 @@ export default {
       this.chart = chart;
 
       let themeName = "";
-      let theme = localStorage.getItem("themeName");
+      let theme = localStorage.getItem("moreSty");
       themeName = theme;
 
       let maxValue = -1;

+ 1 - 2
src/store/index.js

@@ -10,7 +10,7 @@ import { get } from "jquery";
 const state = {
   websocketTimeSec: 1000,
   loading: false, //全局 - 加载中....
-  themeName: localStorage.getItem("themeName") || "greenSty", // 主题
+  themeName: localStorage.getItem("themeName") || "dark", // 主题
   menuData: [],
   windturbineMap: {},
   moudleName: localStorage.getItem("ModuleName") || "",
@@ -39,7 +39,6 @@ const state = {
 //改变状态的方法`
 const mutations = {
   proStyle(state, tag) {
-    state.themeName = tag;
     state.moreSty = tag;
   },
   loadingStore(state, tag) {

+ 22 - 12
src/views/Home/components/map/svg-map-nx.vue

@@ -121,7 +121,7 @@
         </g>
         <g id="effects-svg-path">
           <path
-            class="effects-svg-path "
+            class="effects-svg-path"
             :class="$store.state.moreSty === 'greenSty' ? 'esp-6' : 'esp-66'"
             :style="'stroke-dashoffset: ' + sd"
             fill="none"
@@ -143,7 +143,13 @@
           ></path>
         </g>
       </defs>
-      <circle cx="390" cy="200" :r="r" fill="none" :class="$store.state.moreSty === 'greenSty' ? 'esp-c' : 'esp-cc'"></circle>
+      <circle
+        cx="390"
+        cy="200"
+        :r="r"
+        fill="none"
+        :class="$store.state.moreSty === 'greenSty' ? 'esp-c' : 'esp-cc'"
+      ></circle>
 
       <use
         v-for="(y, index) of effectsY"
@@ -155,7 +161,7 @@
       ></use>
 
       <g :opacity="o" class="map-dt">
-          <!-- v-if="$store.state.themeName === 'dark'" 
+        <!-- v-if="$store.state.themeName === 'dark'" 
           v-if="$store.state.themeName === 'light'"
           -->
         <image
@@ -168,7 +174,7 @@
           transform="matrix(1 0 0 1 -113 60.6679)"
         />
         <image
-            v-if="$store.state.moreSty === 'blueSty'"
+          v-if="$store.state.moreSty === 'blueSty'"
           style="overflow: visible"
           width="912"
           height="340"
@@ -177,7 +183,7 @@
           transform="matrix(1 0 0 1 -113 60.6679)"
         />
         <image
-        v-if="$store.state.moreSty === 'greenSty'"
+          v-if="$store.state.moreSty === 'greenSty'"
           style="overflow: visible"
           width="150"
           id="map-main"
@@ -187,7 +193,7 @@
           transform="matrix(1 0 0 1 -70 50.6679)"
         />
         <image
-        v-if="$store.state.moreSty === 'blueSty'"
+          v-if="$store.state.moreSty === 'blueSty'"
           style="overflow: visible"
           width="150"
           id="map-main"
@@ -4203,7 +4209,11 @@ export default {
   // 数据
   data() {
     return {
-        fillSty: window.sessionStorage.getItem("moreSty") ? window.sessionStorage.getItem("moreSty") === 'greenSty' ? "#05bb4c" : "#1a93cf" : "#05bb4c",
+      fillSty: window.sessionStorage.getItem("moreSty")
+        ? window.sessionStorage.getItem("moreSty") === "greenSty"
+          ? "#05bb4c"
+          : "#1a93cf"
+        : "#05bb4c",
       mapDataContentState: "",
 
       // hb_state: false,
@@ -4351,11 +4361,11 @@ export default {
       this.sourceMap = res;
     },
     "$store.state.moreSty"(value) {
-        if (value === 'greenSty') {
-            this.fillSty = '#05bb4c';
-        } else {
-            this.fillSty = '#1a93cf';
-        }
+      if (value === "greenSty") {
+        this.fillSty = "#05bb4c";
+      } else {
+        this.fillSty = "#1a93cf";
+      }
     },
   },
 };

+ 0 - 1
src/views/layout/Header.vue

@@ -221,7 +221,6 @@ export default {
   methods: {
     commandDrop(value) {
       this.$emit("proStyle", value);
-      localStorage.setItem("themeName", value);
       localStorage.setItem("moreSty", value);
       if (value === "blueSty") {
         document.body.classList.remove("blueStyle");