Przeglądaj źródła

Merge branch 'mw' of http://124.70.43.205:3000/yangxiao/sis_zhfx

Koishi 4 lat temu
rodzic
commit
338726886c

+ 13 - 24
src/App.vue

@@ -254,29 +254,18 @@ l16.229-16.229l16.229,16.229l42.867-42.867C115.034,45.228,109.133,42.189,102.956
         active-text-color="#6262a2"
         background-color="#36348e"
       >
-        <el-sub-menu
-          :index="index"
-          :title="item.text"
-          v-for="(item, index) in menuData"
-          :key="index"
-        >
+        <el-sub-menu :index="index" :title="item.text" v-for="(item , index) in menuData">
           <template #title>
-            <router-link :to="item.path">
-              <el-icon>
-                <SvgIcon :svgid="item.icon" />
-              </el-icon>
-            </router-link>
+			  <router-link :to="item.path">
+				<el-icon>
+				  <SvgIcon :svgid="item.icon" />
+				</el-icon>
+			</router-link>
           </template>
-          <el-menu-item-group
-            v-for="(menu, idx) in item.children"
-            :index="idx"
-            :key="idx"
-          >
-            <router-link :to="menu.path">
-              <el-menu-item :index="index + '-' + idx">
-                {{ menu.text }}
-              </el-menu-item>
-            </router-link>
+          <el-menu-item-group v-for="(menu , idx) in item.children" :index="idx">
+			  <router-link :to="menu.path">
+				<el-menu-item :index="index+'-'+idx">{{menu.text}}</el-menu-item>
+			</router-link>
           </el-menu-item-group>
         </el-sub-menu>
       </el-menu>
@@ -325,7 +314,7 @@ export default {
       isLogined: true,
       showSisView: false,
       memuCloseTimeout: null,
-      menuData: [],
+	  menuData:[]
     };
   },
 
@@ -391,8 +380,8 @@ export default {
       this.showSisView = res.fullPath === "/sisView";
     },
     "$store.state.menuData"(res) {
-      this.menuData = res;
-    },
+		this.menuData = res;
+	},
   },
 };
 </script>

+ 4 - 0
src/assets/styles/common/common.less

@@ -17,9 +17,13 @@
 
 // 亮色主题
 @import "../theme/light/light-jsc.less"; // 驾驶舱
+@import "../theme/light/jsc-jcjz.less"; // 驾驶舱-基础矩阵
+@import "../theme/light/jsc-ztjs.less"; // 驾驶舱-状态监视
 @import "../theme/light/light-jjyx.less"; // 经济运行
 @import "../theme/light/light-sp.less"; // 沙盘
 @import "../theme/light/light-qt.less"; // 其他
 
+@import "../theme/light/jjyx-dbgl.less"; // 对标管理
+
 // 暗色主题
 @import "../theme/dark/dark-jsc.less"; // 驾驶舱

+ 117 - 0
src/assets/styles/theme/light/jjyx-dbgl.less

@@ -0,0 +1,117 @@
+// 对标管理
+@import "./setting.less";
+#appBody.light {
+	// 风机绩效榜
+    .com-table {
+		thead tr th{
+			color: @black;
+		}
+		
+		.el-scrollbar tr td {
+			color: @black;
+		}
+		
+		.el-scrollbar tr td.light span {
+			color: @blue;
+		}
+	}
+	.btn.green,.btn:hover{
+		color: @deepblue;
+		border-color: @deepblue;
+		background: rgba(54, 52, 142, 0.2);
+	}
+	
+	.el-select__popper.select,.el-picker__popper{
+		background: @white;
+        border-color: @white;
+		.el-popper__arrow::before{
+			border: 1px solid @white !important;
+			background: @white !important;
+		}
+		.el-select-dropdown__item.selected,.el-select-dropdown__item:hover {
+		    color: @deepblue;
+			background:fade(@deepblue, 20);
+			border: 1px solid @deepblue;
+		}
+		.el-select-dropdown__item{
+			color:@black;
+		}
+	}
+	
+	.el-picker__popper.el-popper[role="tooltip"] {
+		background: @white !important;
+		border-color: @white !important;
+		.el-date-table{
+			th{
+				color:@black ;
+			}
+			td.current:not(.disabled) span{
+				color: @white;
+				background:@blue;
+			}
+			td.today span,span:hover {
+			    color: @blue;
+			}
+			td.prev-month,td.next-month{
+				background: fade(@black,20);
+			}
+			span{
+				color:@black;
+			}
+		}
+		
+	}
+	.el-input{
+		.el-input__inner{
+			background: @white;
+			color: @black;
+		}
+	}
+	.query-item .lable{
+		color:@black;
+	}
+	
+	// 风机绩效榜-明细
+	.main-body{
+		input[type="checkbox"]:checked{
+			background:@blue;
+			border-color: @blue;
+		}
+		input[type="checkbox"]{
+			background: @white;
+			border-color: @gray-l;
+		}
+	} 
+	
+	.decision-page-2,.decision-page-3,.decision-page-4{
+		.com-panel{
+			border-radius:0;
+			padding:0;
+		}
+	}
+	.action{
+		color: @blue;
+	}
+	
+	//线路对标
+	.el-select {
+	  .el-select__tags .el-tag {
+	    background-color: fade(@deepblue, 20);
+	    color: @deepblue;
+	
+	    .el-icon-close {
+	      background-color: fade(@deepblue, 50);
+	    }
+	  }
+	}
+	
+	//单机横向对比
+	.direction-info {
+	  .com-table {
+	    th,
+	    td {
+	      color: @black;
+	    }
+	  }
+	}
+}

+ 101 - 0
src/assets/styles/theme/light/jsc-jcjz.less

@@ -0,0 +1,101 @@
+// 驾驶舱模块-基础矩阵白色主题样式
+
+@import "./setting.less";
+
+
+#appBody.light {
+    .panel-body{
+        background:@white;
+        transition: @transition;
+    }
+    .card-panel .card-left .tag{
+        color: @black;
+    }
+    .light-matrix .panel{
+        background-color: gainsboro;
+    }
+    .green[data-v-065abbc5]{
+        color: @green;
+    }
+    .green[data-v-6a0a9536]{
+        color: @green;
+    }
+
+    //驾驶舱模块-矩阵白色主题样式二级页面
+    //基本信息-日发电量1
+    .wind-site-base-info .generation {
+        background: @white;
+    }
+    //基本信息-日发电量2
+    .el-col-10 {
+        background: @white;
+    }
+    //基本信息-日发电量右侧
+    .wind-site-warning[data-v-40a70b04]{
+        background: @white;
+        transition: @transition;
+    }
+    //右侧导航栏第一个-天气
+    .wind-site-weather[data-v-ccb406f8]{
+        background: @white;
+        transition: @transition;
+    }
+    //右侧导航栏第一个-最右侧
+    .light-matrix-small{
+        background: @white;
+        transition: @transition;
+    }
+    //最右侧导航
+    .wind-site .page-common-body .page-common-body-menu .page-common-body-menu-box[data-v-3b6e4be5]{
+        background-color: @white;
+        transition: @transition;
+    }
+    .wind-site .page-common-body .page-common-body-menu .page-common-body-menu-box .page-common-body-menu-item[data-v-3b6e4be5] {
+        border: 0.093vh solid @deepblue;
+    }
+    //右侧导航栏第二个底色
+     .df-table .custom-table.el-table{
+        background: @white;
+        transition: @transition;
+    }
+    .general-appearance-body{
+        background: @white;
+        transition: @transition;
+    }
+    .booster-station-body{
+        background: @white;
+        transition: @transition;
+    }
+    .Inverter-Info .box-main .Inverter-Info-body .Inverter-Info-title{
+        position: relative;
+        background: @white;
+        transition: @transition;
+    }
+    table.table-form.mg-b-8{
+        background: @white;
+        transition: @transition;
+    }
+    .Inverter-Info .box-main .Inverter-Info-body .inverter-datas .inverter-item .inverter-item-info .states{
+        background: @white;
+        transition: @transition;
+    }
+    .com-collapse .collapse-box .collapse-items .item.active{
+        color: @deepblue;
+        cursor: pointer;
+        font-weight: bold;
+    }
+    .com-panel.line{
+        margin-left: 1px;
+    }
+    .wave{
+        z-index: 1;
+        // background: @white;
+        // transition: @transition;
+    }
+    .svg-icon.svg-icon-write svg use{
+        fill: @black;
+    }
+    .svg-icon.svg-icon-gray-l svg use{
+        fill: @black;
+    }
+}

+ 19 - 0
src/assets/styles/theme/light/jsc-ztjs.less

@@ -0,0 +1,19 @@
+//驾驶舱模块-状态监视白色主题样式
+@import "./setting.less";
+#appBody.light {
+    .status-panel .status-com-panel .p-body .category-box[data-v-74094c42]{
+        width: 100%;
+        background-color: @white;
+        transition : @transition;
+        display: flex;
+        margin-bottom: 0.37vh;
+    }
+    .el-scrollbar__wrap{
+        background: @white;
+        transition : @transition;
+    }
+    .btn-group-tabs{
+        background: @white;
+        height: 60px;
+    }
+}

+ 1 - 1
src/assets/styles/theme/light/light-jjyx.less

@@ -60,7 +60,7 @@
 
     .power-benchmarking-page .top .top-left .top-left-header .header-right>div.active,
     .power-benchmarking-page .top .top-left .top-left-header .header-right>div:hover {
-        background  : rgba(54, 52, 142, 0.2);
+        background  : red;
         border-color: @deepblue;
         color       : @deepblue;
         transition  : @transition;

+ 3 - 1
src/assets/styles/theme/light/light-jsc.less

@@ -375,11 +375,13 @@
 	
 	.el-popper.is-light.is-pure .el-menu--popup {
 	  padding:0;
+	  .el-menu-item-group__title{padding:0;}
+	  .el-menu-item{height: 46px;line-height: 46px;}
 	}
 	
 	.el-popper.is-light{
-		background:transparent;
 		border:none;
+		.el-menu{border-radius: 0px;}
 	}
 	
     .com-panel-3 {

+ 6 - 1
src/assets/styles/theme/light/setting.less

@@ -3,4 +3,9 @@
 @black      : #000;
 @transition : 0.25s;
 @deepblue   : #36348e;
-@borderRaduis: 12px;
+@borderRaduis: 12px;
+@blue : #159AFA;
+@white : #ffffff;
+@gray-l     : #B3BDC0;
+@darkgray-1 : #7b7d7e;
+@green      : #05bb4c;

+ 41 - 14
src/components/chart/combination/bar-line-chart.vue

@@ -123,18 +123,26 @@ export default {
           icon: "ract",
           itemWidth: 8,
           itemHeight: 8,
-          inactiveColor: partten.getColor("gray"),
+          inactiveColor: this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
           textStyle: {
-            color: partten.getColor("grayl"),
+            color: this.$store.state.themeName === "dark"
+              ? partten.getColor("grayl")
+              : "#000",
             fontSize: 12,
           },
         },
         tooltip: {
           trigger: "axis",
-          backgroundColor: "rgba(0,0,0,0.4)",
-          borderColor: partten.getColor("gray"),
+          backgroundColor: this.$store.state.themeName === "dark"
+              ? "rgba(0,0,0,0.4)"
+              : "rgba(255,255,255,0.5)",
+          borderColor: this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
           textStyle: {
-            color: "#fff",
+            color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
             fontSize: util.vh(16),
           },
         },
@@ -153,7 +161,9 @@ export default {
             backgroundColor: "transparent",
             // handleIcon: "path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z",
             handleStyle: {
-              color: partten.getColor("green"),
+              color: this.$store.state.themeName === "dark"
+              ? partten.getColor("green")
+              : partten.getColor("blue"),
             },
             moveHandleSize: 0,
             // dataBackground: {
@@ -174,9 +184,13 @@ export default {
             // },
             fillerColor: "transparent",
             textStyle: {
-              color: partten.getColor("grayl"),
+              color: this.$store.state.themeName === "dark"
+              ? partten.getColor("grayl")
+              : "#000",
             },
-            borderColor: partten.getColor("gray"),
+            borderColor: this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
             brushSelect: false,
           },
         ],
@@ -184,7 +198,9 @@ export default {
           {
             type: "category",
             axisLabel: {
-              color: partten.getColor("gray"),
+              color: this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
             },
             inverse: true,
             // minInterval: 10,
@@ -202,12 +218,16 @@ export default {
           {
             type: "value",
             axisLabel: {
-              color: partten.getColor("gray"),
+              color: this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
             },
             axisLine: {
               type: "dashed",
               lineStyle: {
-                color: partten.getColor("gray"),
+                color: this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
               },
               width: 5,
             },
@@ -218,7 +238,7 @@ export default {
               lineStyle: {
                 type: "dashed",
                 dashOffset: 10,
-                color: partten.getColor("gray") + 80,
+                color: this.$store.state.themeName === "dark" ? "#5a6162" : "#000" + 80,
               },
             },
           },
@@ -269,10 +289,14 @@ export default {
           smooth: false, //平滑展示
           xAxisIndex: 1,
           lineStyle: {
-            color: partten.getColor("green"),
+            color: this.$store.state.themeName === "dark"
+              ? partten.getColor("green")
+              : partten.getColor("blue"),
           },
           itemStyle: {
-            color: partten.getColor("green"),
+            color: this.$store.state.themeName === "dark"
+              ? partten.getColor("green")
+              : partten.getColor("blue"),
           },
         });
       }
@@ -315,6 +339,9 @@ export default {
         }
       }
     },
+	"$store.state.themeName"() {
+	  this.initChart();
+	},
   },
 };
 </script>

+ 25 - 10
src/components/chart/pie/dual-pie-chart.vue

@@ -99,10 +99,14 @@ export default {
         color: ["#1893ce", "#edbf00", "#039178", "#ae4802", "#ea8b00"],
         tooltip: {
           trigger: "item",
-          backgroundColor: "rgba(0,0,0,0.4)",
-          borderColor: partten.getColor("gray"),
+          backgroundColor: this.$store.state.themeName === "dark"
+              ? "rgba(0,0,0,0.4)"
+              : "rgba(255,255,255,0.5)",
+          borderColor: this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
           textStyle: {
-            color: "#fff",
+            color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
             fontSize: util.vh(16),
           },
         },
@@ -128,15 +132,21 @@ export default {
           //icon: 'circle',
           itemGap: 12, //图例item间距
           textStyle: {
-            color: partten.getColor("gray"),
+            color: this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
             fontSize: util.vh(14),
             rich: {
               name: {
-                color: partten.getColor("gray"),
+                color: this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
                 fontSize: 12,
               },
               value: {
-                color: partten.getColor("grayl"),
+                color: this.$store.state.themeName === "dark"
+                ? partten.getColor("grayl")
+                : "#000",
                 fontSize: 12,
               },
             },
@@ -175,14 +185,14 @@ export default {
                 // length: 40,
                 // length2: 120,
                 lineStyle: {
-                  color: "#fff",
+                  color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
                   fontSize: util.vh(14),
                 },
               },
             },
             itemStyle: {
               normal: {
-                borderWidth: util.vh(14),
+                borderWidth:this.$store.state.themeName === "dark" ? util.vh(14): util.vh(8),
                 borderColor: "#071812",
               },
             },
@@ -193,10 +203,10 @@ export default {
                 },
                 padding: [0, 0, 0, 0],
                 rich: {
-                  color: "#ffffff" + "cc",
+                  color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
                   percent: {
                     fontSize: util.vh(14),
-                    color: "#ffffff" + "cc",
+                    color: this.$store.state.themeName === "dark" ? "#FFFFFF" : "#000000" ,
                   },
                 },
               },
@@ -220,6 +230,11 @@ export default {
   updated() {
     this.initChart();
   },
+  watch: {
+    "$store.state.themeName"() {
+      this.initChart();
+    },
+  },
 };
 </script>
 

+ 83 - 31
src/components/chart/radar/normal-radar-chart.vue

@@ -52,34 +52,33 @@ export default {
     return {
       id: "",
       chart: null,
-      lineStyles: [
-        {
+      lineStyles: [],
+	  green:{
           areaStyle: {
-            color: "rgba(75,85,174, 0.9)",
+            color: "rgba(165,228,175, 0.9)",
           },
           lineStyle: {
             color: "rgba(255,255,255, 0.85)",
           },
           itemStyle: {
-            color: "rgba(75,85,174, 0.5)",
+            color: "rgba(165,228,175, 0.5)",
             borderColor: "rgba(255,255,255, 0.5)",
             borderWidth: 0.5,
           },
         },
-        {
+	blue:{
           areaStyle: {
-            color: "rgba(165,228,175, 0.9)",
+            color: 'rgba(75,85,174, 0.9)',
           },
           lineStyle: {
             color: "rgba(255,255,255, 0.85)",
           },
           itemStyle: {
-            color: "rgba(165,228,175, 0.5)",
+            color:'rgba(75,85,174, 0.9)',
             borderColor: "rgba(255,255,255, 0.5)",
             borderWidth: 0.5,
           },
-        },
-      ],
+        }
     };
   },
   methods: {
@@ -95,10 +94,16 @@ export default {
       return result;
     },
     initChart() {
+		let themeName = this.$store.state.themeName.split(' ')[1];
       let chart = echarts.init(this.$el);
-
       let maxValue = -1;
-
+		
+		if(themeName === "dark"){
+			this.lineStyles = [this.green,this.blue];
+		}else{
+			this.lineStyles = [this.blue,this.green];
+		}
+		
       if (this.value.length > 0)
         this.value[0].data.forEach((item, index) => {
           item.value.forEach((value) => {
@@ -130,20 +135,32 @@ export default {
         },
         tooltip: {
           trigger: "item",
-          backgroundColor: "rgba(0,0,0,0.4)",
-          borderColor: partten.getColor("gray"),
+          backgroundColor:
+            themeName === "dark"
+              ? "rgba(0,0,0,0.4)"
+              : "rgba(255,255,255,0.5)",
+          borderColor:
+            themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
           textStyle: {
-            color: "#fff",
+            color: themeName === "dark" ? "#fff" : "#000",
             fontSize: util.vh(16),
           },
         },
         legend: {
           show: this.showLegend,
           bottom: 16,
-          inactiveColor: partten.getColor("gray"),
+          inactiveColor:
+            themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
           textStyle: {
-            color: partten.getColor("grayl"),
             fontSize: 12,
+            color:
+              themeName === "dark"
+                ? partten.getColor("grayl")
+                : "#000",
           },
         },
         radar: [
@@ -155,19 +172,25 @@ export default {
             nameGap: "16",
             name: {
               textStyle: {
-                color: partten.getColor("gray") + 99,
+                color: themeName === "dark"
+              ? partten.getColor("gray") + 99
+              : "#000",
                 fontSize: 12,
               },
             },
             axisLine: {
               lineStyle: {
-                color: partten.getColor("gray") + 40,
+                color: themeName === "dark"
+              ? partten.getColor("gray") + 40
+              : "#000" + 40,
               },
             },
             splitLine: {
               lineStyle: {
                 width: 1,
-                color: partten.getColor("gray") + 40,
+                color: themeName === "dark"
+              ? partten.getColor("gray") + 40
+              : "#000" + 40,
               },
             },
             splitArea: {
@@ -188,7 +211,9 @@ export default {
             },
             axisLine: {
               lineStyle: {
-                color: partten.getColor("gray") + 40,
+                color: themeName === "dark"
+              ? partten.getColor("gray") + 40
+              : "#000" + 40,
                 shadowBlur: 1,
                 shadowColor: "#fff",
                 shadowOffsetX: 0.5,
@@ -198,7 +223,9 @@ export default {
             splitLine: {
               lineStyle: {
                 width: 1,
-                color: partten.getColor("gray") + 40,
+                color: themeName === "dark"
+              ? partten.getColor("gray") + 40
+              : "#000" + 40,
                 shadowColor: "#fff",
                 shadowBlur: 0,
                 shadowOffsetX: 0.5,
@@ -222,13 +249,17 @@ export default {
             },
             axisLine: {
               lineStyle: {
-                color: partten.getColor("gray") + 40,
+                color: themeName === "dark"
+              ? partten.getColor("gray") + 40
+              : "#000" + 40,
               },
             },
             splitLine: {
               lineStyle: {
                 width: 1,
-                color: partten.getColor("gray"),
+                color: themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
               },
             },
             splitArea: {
@@ -246,7 +277,9 @@ export default {
                     },
                     {
                       offset: 1,
-                      color: partten.getColor("green") + 60, // 100% 处的颜色
+                      color: themeName === "dark"
+              ? partten.getColor("green") + 60
+              : partten.getColor("deepblue") + 60, // 100% 处的颜色
                     },
                   ],
                   global: false, // 缺省为 false
@@ -265,13 +298,17 @@ export default {
             },
             axisLine: {
               lineStyle: {
-                color: partten.getColor("gray") + 40,
+                color: themeName === "dark"
+              ? partten.getColor("gray") + 40
+              : "#000" + 40,
               },
             },
             splitLine: {
               lineStyle: {
                 width: 1,
-                color: partten.getColor("gray"),
+                color: themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
               },
             },
             splitArea: {
@@ -289,7 +326,9 @@ export default {
                     },
                     {
                       offset: 1,
-                      color: partten.getColor("green") + 60, // 100% 处的颜色
+                      color: themeName === "dark"
+              ? partten.getColor("green") + 60
+              : partten.getColor("deepblue") + 60, // 100% 处的颜色
                     },
                   ],
                   global: false, // 缺省为 false
@@ -308,13 +347,17 @@ export default {
             },
             axisLine: {
               lineStyle: {
-                color: partten.getColor("gray") + 40,
+                color: themeName === "dark"
+              ? partten.getColor("gray") + 40
+              : "#000" + 40,
               },
             },
             splitLine: {
               lineStyle: {
                 width: 1,
-                color: partten.getColor("gray"),
+                color: themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
               },
             },
             splitArea: {
@@ -335,13 +378,17 @@ export default {
             },
             axisLine: {
               lineStyle: {
-                color: partten.getColor("gray") + 40,
+                color: themeName === "dark"
+              ? partten.getColor("gray") + 40
+              : "#000" + 40,
               },
             },
             splitLine: {
               lineStyle: {
                 width: 1,
-                color: partten.getColor("gray"),
+                color: themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
               },
             },
             splitArea: {
@@ -374,6 +421,11 @@ export default {
       this.initChart();
     });
   },
+  watch: {
+    "$store.state.themeName"() {
+      this.initChart();
+    },
+  },
 };
 </script>
 

+ 2 - 2
src/helper/partten.js

@@ -12,11 +12,11 @@ const color = [
 	{ key: "cyan", value: "#1cbbb4" },
 	{ key: "brown", value: "#a5673f" },
 	{ key: "mauve", value: "#9c26b0" },
+	{ key: "deepblue", value: "#36348e" },
 ];
 
 function getColor(key) {
-    if (!key)
-        key = "green"
+	if(!color.some(ele=>{ return ele.key === key })) key = "green";
     return color.find((t) => { return t.key == key }).value;
 }
 

+ 0 - 3
src/views/Decision/Decision3Db.vue

@@ -385,9 +385,7 @@ export default {
           date: that.value4,
         },
         success(res) {
-			console.log(res)
           var data = res.data;
-
           var arrName = [],
             arrKey = [],
             arrData = [],
@@ -431,7 +429,6 @@ export default {
               value: arr,
             });
           }
-		  console.log(tempArray)
           that.list = tempArray;
         },
       });

+ 24 - 9
src/views/Decision/dual-pie-chart.vue

@@ -99,8 +99,12 @@ export default {
         color: ["#1893ce", "#edbf00", "#039178", "#ae4802", "#ea8b00"],
         tooltip: {
           trigger: "item",
-          backgroundColor: "rgba(0,0,0,0.4)",
-          borderColor: partten.getColor("gray"),
+          backgroundColor: this.$store.state.themeName === "dark"
+              ? "rgba(0,0,0,0.4)"
+              : "rgba(255,255,255,0.5)",
+          borderColor: this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
           textStyle: {
             color: "#fff",
             fontSize: util.vh(16),
@@ -128,15 +132,21 @@ export default {
           //icon: 'circle',
           itemGap: 12, //图例item间距
           textStyle: {
-            color: partten.getColor("gray"),
+            color: this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
             fontSize: util.vh(14),
             rich: {
               name: {
-                color: partten.getColor("gray"),
+                color: this.$store.state.themeName === "dark"
+              ? partten.getColor("gray")
+              : "#000",
                 fontSize: 12,
               },
               value: {
-                color: partten.getColor("grayl"),
+                color: this.$store.state.themeName === "dark"
+                ? partten.getColor("grayl")
+                : "#000",
                 fontSize: 12,
               },
             },
@@ -175,14 +185,14 @@ export default {
                 // length: 40,
                 // length2: 120,
                 lineStyle: {
-                  color: "#fff",
+                  color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
                   fontSize: util.vh(14),
                 },
               },
             },
             itemStyle: {
               normal: {
-                borderWidth: util.vh(14),
+                borderWidth:util.vh(4),
                 borderColor: "#071812",
               },
             },
@@ -193,10 +203,10 @@ export default {
                 },
                 padding: [0, 0, 0, 0],
                 rich: {
-                  color: "#ffffff" + "cc",
+                  color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
                   percent: {
                     fontSize: util.vh(14),
-                    color: "#ffffff" + "cc",
+                    color: this.$store.state.themeName === "dark" ? "#FFFFFF" : "#000000" ,
                   },
                 },
               },
@@ -220,6 +230,11 @@ export default {
   updated() {
     this.initChart();
   },
+  watch: {
+    "$store.state.themeName"() {
+      this.initChart();
+    },
+  },
 };
 </script>
 

+ 653 - 702
src/views/NewPages/alarm-center-1.vue

@@ -1,723 +1,674 @@
 <template>
-  <div class="alarm-center-1">
-    <div class="action-bar">
-      <div class="query mg-b-16">
-        <div class="query-items">
-          <div class="query-item">
-            <div class="lable">风场:</div>
-            <div class="search-input">
-              <el-select
-                v-model="wpvalue"
-                clearable
-                placeholder="请选择"
-                popper-class="select"
-              >
-                <el-option
-                  v-for="item in wpoptions"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                >
-                </el-option>
-              </el-select>
-            </div>
-          </div>
-          <div class="query-item">
-            <div class="lable">开始日期:</div>
-            <div class="search-input">
-              <el-date-picker
-                v-model="startdate"
-                type="date"
-                placeholder="选择日期"
-                popper-class="date-select"
-              >
-              </el-date-picker>
-            </div>
-          </div>
-          <div class="query-item">
-            <div class="lable">结束日期:</div>
-            <div class="search-input">
-              <el-date-picker
-                v-model="enddate"
-                type="date"
-                placeholder="选择日期"
-                popper-class="date-select"
-              >
-              </el-date-picker>
-            </div>
-          </div>
-          <div class="query-item">
-            <div class="lable">规则:</div>
-            <el-cascader
-              style="width: 240px"
-              size="mini"
-              popper-class="search-select"
-              :options="cascaderOptions"
-              :props="cascaderProps"
-              v-model="cascaderSel"
-              collapse-tags
-              :clearable="true"
-            ></el-cascader>
-          </div>
-        </div>
-        <div class="query-actions">
-          <button class="btn green" @click="searchData">搜索</button>
-          <button class="btn green" @click="searchTree">筛选</button>
-		  <button class="btn green" @click="fx">分析</button>
-        </div>
-      </div>
-    </div>
-    <panel-3 class="table-panel">
-      <table-3 :data="tableData" :height="'85vh'">
-        <template v-for="(item, i) in column" :key="i" #[item]="scope">
-          <div class="bar" @click="showChart(scope)">
-            <div
-              class="bar-percent"
-              :style="{
-                width:
-                  (scope.data.count &&
-                    scope.data.count / (scope.data.count + scope.data.time)) *
-                    100 +
-                  'px',
-              }"
-            ></div>
-            <span class="value"
-              >{{ scope.data.count && scope.data.count }} 次数</span
-            >
-          </div>
-          <div class="bar" @click="showChart(scope)">
-            <div
-              class="bar-percent"
-              :style="{
-                width:
-                  (scope.data.count &&
-                    scope.data.time / (scope.data.count + scope.data.time)) *
-                    100 +
-                  'px',
-              }"
-            ></div>
-            <span class="value"
-              >{{ scope.data.count && scope.data.time }} 分钟</span
-            >
-          </div>
-        </template>
-      </table-3>
-    </panel-3>
-    <el-dialog
-      :title="dialogTitle"
-      v-model="dialogVisible"
-      width="70%"
-      top="10vh"
-      custom-class="modal"
-      :close-on-click-modal="false"
-    >
-      <div class="searchForm">
-        <div class="choose">
-          <button class="btn green">等间隔</button>
-          <!-- <button :class="chooseStatus?'btn green':'btn'" @click="switchChange(1,'original')">原始数据</button> -->
-        </div>
-        <el-select
-          v-if="!chooseStatus"
-          @change="switchChange(selectValue)"
-          class="inputs"
-          v-model="selectValue"
-          placeholder="请选择"
-        >
-          <el-option
-            v-for="item in timeoptions"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          >
-          </el-option>
-        </el-select>
-      </div>
-      <multiple-y-line-chart-normal
-        height="500px"
-        :list="Analysis"
-        :yAxises="AnalysisYAxises"
-        :showLegend="true"
-      />
-    </el-dialog>
-	<el-dialog :title="dialogTitleFX" v-model="dialogVisibleFX" width="70%" top="10vh" custom-class="modal" :close-on-click-modal="false" :destroy-on-close='true'>
-	  <FX :date='startdate' :wpid='wpvalue'/>
-	</el-dialog>
-  </div>
+	<div class="alarm-center-1">
+		<div class="action-bar">
+			<div class="query mg-b-16">
+				<div class="query-items">
+					<div class="query-item">
+						<div class="lable">风场:</div>
+						<div class="search-input">
+							<el-select v-model="wpvalue" clearable placeholder="请选择" popper-class="select">
+								<el-option v-for="item in wpoptions" :key="item.id" :label="item.name" :value="item.id">
+								</el-option>
+							</el-select>
+						</div>
+					</div>
+					<div class="query-item">
+						<div class="lable">开始日期:</div>
+						<div class="search-input">
+							<el-date-picker v-model="startdate" type="date" placeholder="选择日期"
+								popper-class="date-select">
+							</el-date-picker>
+						</div>
+					</div>
+					<div class="query-item">
+						<div class="lable">结束日期:</div>
+						<div class="search-input">
+							<el-date-picker v-model="enddate" type="date" placeholder="选择日期" popper-class="date-select">
+							</el-date-picker>
+						</div>
+					</div>
+					<div class="query-item">
+						<div class="lable">规则:</div>
+						<el-cascader style="width: 240px" size="mini" popper-class="search-select"
+							:options="cascaderOptions" :props="cascaderProps" v-model="cascaderSel" collapse-tags
+							:clearable="true"></el-cascader>
+					</div>
+				</div>
+				<div class="query-actions">
+					<button class="btn green" @click="searchData">搜索</button>
+					<button class="btn green" @click="searchTree">筛选</button>
+					<button class="btn green" @click="fx">分析</button>
+				</div>
+			</div>
+		</div>
+		<panel-3 class="table-panel">
+			<table-3 :data="tableData" :height="'85vh'">
+				<template v-for="(item, i) in column" :key="i" #[item]="scope">
+					<div class="bar" @click="showChart(scope)">
+						<div class="bar-percent" :style="{ width: scope?.data?.countStyle }"> </div>
+						<span class="value">{{ scope?.data?.count }} 次数</span>
+					</div>
+					
+					<div class="bar" @click="showChart(scope)">
+						<div class="bar-percent" :style="{ width: scope?.data?.timeStyle}"></div>
+						<span class="value">{{scope?.data?.time }} 分钟</span>
+					</div>
+				</template>
+			</table-3>
+		</panel-3>
+		<el-dialog :title="dialogTitle" v-model="dialogVisible" width="70%" top="10vh" custom-class="modal"
+			:close-on-click-modal="false">
+			<div class="searchForm">
+				<div class="choose">
+					<button class="btn green">等间隔</button>
+					<!-- <button :class="chooseStatus?'btn green':'btn'" @click="switchChange(1,'original')">原始数据</button> -->
+				</div>
+				<el-select v-if="!chooseStatus" @change="switchChange(selectValue)" class="inputs" v-model="selectValue"
+					placeholder="请选择">
+					<el-option v-for="item in timeoptions" :key="item.value" :label="item.label" :value="item.value">
+					</el-option>
+				</el-select>
+			</div>
+			<multiple-y-line-chart-normal height="500px" :list="Analysis" :yAxises="AnalysisYAxises"
+				:showLegend="true" />
+		</el-dialog>
+		<el-dialog :title="dialogTitleFX" v-model="dialogVisibleFX" width="70%" top="10vh" custom-class="modal"
+			:close-on-click-modal="false" :destroy-on-close='true'>
+			<FX :date='startdate' :wpid='wpvalue' />
+		</el-dialog>
+	</div>
 </template>
 
 <script>
-import Panel3 from "../../components/coms/panel/panel3.vue";
-import Table3 from "../../components/coms/table/table3.vue";
-import MultipleYLineChartNormal from "./multiple-y-line-chart-normal.vue";
-import FX from "./alarm-center-yjfx.vue";
-import BASE from '@tools/basicTool.js';
-export default {
-  components: { Panel3, Table3, MultipleYLineChartNormal,FX },
-  data() {
-    return {
-		dialogTitleFX: "",
-		dialogVisibleFX: false,
-      dialogTitle: "",
-      chooseStatus: false,
-      dialogVisible: false,
-      chooseTime: [],
-      wpvalue: "",
-      wpid: "",
-      wtId: "",
-      descName: "",
-      AnalysisName: "",
-      AnalysisUnit: "",
-      Analysis: [
-        {
-          title: "",
-          yAxisIndex: 0, // 使用单位
-          value: [],
-        },
-      ],
-      AnalysisYAxises: [
-        {
-          name: "",
-          min: "",
-          max: "",
-          unit: "",
-          position: "left",
-        },
-        {
-          name: "",
-          min: "",
-          max: "",
-          unit: "",
-          position: "right",
-        },
-      ],
-      selectValue: "60",
-      timeoptions: [
-        {
-          value: "60",
-          label: "一分钟",
-        },
-        {
-          value: "300",
-          label: "五分钟",
-        },
-        {
-          value: "600",
-          label: "十分钟",
-        },
-        {
-          value: "1800",
-          label: "三十分钟",
-        },
-        {
-          value: "3600",
-          label: "一小时",
-        },
-        {
-          value: "86400",
-          label: "一天",
-        },
-      ],
-      wpoptions: "",
-      options: [],
-      cascaderOptions: [],
-      cascaderSel: [],
-      cascaderProps: { multiple: true },
-      column: [
-        "风机偏航过程震动",
-        "齿轮箱轴承温升超过40度",
-        "三相电流不平衡",
-        "断轴或联轴器打滑",
-        "风速突变",
-      ],
-      columnObj: [
-        {
-          name: "风机编号",
-          field: "name",
-          width: "100px",
-          minWidth: "100px",
-        },
-        {
-          name: "风机偏航过程震动",
-          field: "风机偏航过程震动",
-          align: "left",
-          slot: true,
-          sortable: true,
-          minWidth: "200px",
-        },
-        {
-          name: "齿轮箱轴承温升超过40度",
-          field: "齿轮箱轴承温升超过40度",
-          align: "left",
-          slot: true,
-          sortable: true,
-          minWidth: "200px",
-        },
-        {
-          name: "三相电流不平衡",
-          field: "三相电流不平衡",
-          align: "left",
-          slot: true,
-          sortable: true,
-          minWidth: "200px",
-        },
-        {
-          name: "断轴或联轴器打滑",
-          field: "断轴或联轴器打滑",
-          align: "left",
-          slot: true,
-          sortable: true,
-          minWidth: "200px",
-        },
-        {
-          name: "风速突变",
-          align: "left",
-          field: "风速突变",
-          slot: true,
-          sortable: true,
-          minWidth: "200px",
-        },
-      ],
-      startdate: new Date(
-        new Date(new Date().setDate(new Date().getDate() - 1))
-      ).formatDate("yyyy-MM-dd"),
-      enddate: new Date(new Date()).formatDate("yyyy-MM-dd"),
-      tableData: {
-        column: [
-          { name: "风机编号", field: "name" },
-          {
-            name: "主轴温度温差大于8度",
-            field: "v1",
-            align: "left",
-            slot: true,
-          },
-          { name: "浆叶角过小", field: "v2", align: "left", slot: true },
-        ],
-        data: [{ name: "MG01_01", v1: { count: 12, time: 0 } }],
-      },
-    };
-  },
-  created() {
-    this.$nextTick(() => {
-      this.search();
-    });
-  },
-  methods: {
-    //对比
-    showChart(column) {
-		console.log(column.column.name)
-      let that = this;
-      that.dialogTitle = column.column.name;
-      that.wtId = column.row.name;
-      that.descName = column.column.name;
-      
-      that.requestDetailData(
-        that.wpvalue,
-        that.startdate,
-        that.enddate,
-        60,
-        column.row.name,
-        column.column.name
-      );
-    },
-    requestDetailData(station, startTs, endTs, interval, wtId, name) {
-      let that = this;
-      BASE.showLoading();
-      that.API.requestData({
-        method: "GET",
-        subUrl: "/analysis/detail",
-        data: {
-          // station: that.wpvalue,
-          // startTs: new Date(that.startdate).getTime(),
-          // endTs: new Date(that.enddate).getTime(),
-          // // interval: 360,
-          // interval:1,
-          // wtId: column.row.name,
-          // name: column.column.name,
-          station: station,
-          startTs: new Date(new Date(startTs).formatDate("yyyy/MM/dd")).getTime(),
-          endTs: new Date(new Date(endTs).formatDate("yyyy/MM/dd")).getTime(),
-          interval: interval,
-          wtId: wtId,
-          name: name,
-        },
-        success(res) {
-          if (res.data.length == 1) {
-            that.dialogVisible = true;
-            BASE.closeLoading();
-            let yaxises = [
-              {
-                name: "",
-                min: 0,
-                max: null,
-                unit: "",
-                position: "left",
-              },
-            ];
-            // yaxises.name = res.data[0].name;
-            yaxises.unit = res.data[0].unit;
-            that.AnalysisYAxises = yaxises;
-            let aKey1 = ["doubleValue"];
-            let aList1 = [
-              {
-                title: "",
-                // yAxisIndex:"",
-                smooth: true,
-                value: [],
-              },
-            ];
-            aKey1.forEach((keyEle, keyIndex) => {
-              aList1[keyIndex].title = res.data[keyIndex].name;
-              res.data[keyIndex].data.forEach((rEle) => {
-                aList1[keyIndex].value.push({
-                  text: new Date(rEle.ts).formatDate("hh:mm"),
-                  value: rEle.doubleValue,
-                });
-              });
-            });
-            that.Analysis = aList1;
-          } else if (res.data.length == 2) {
-            that.dialogVisible = true;
-            BASE.closeLoading();
-            let aKey2 = ["doubleValue", "doubleValue"];
-            let aList2 = [
-              {
-                title: "",
-                //  yAxisIndex:"",
-                smooth: true,
-                value: [],
-              },
-              {
-                title: "",
-                // yAxisIndex:"",
-                smooth: true,
-                value: [],
-              },
-            ];
-            let yaxises1 = [
-              {
-                name: "",
-                min: 0,
-                max: null,
-                unit: "",
-                position: "left",
-              },
-              {
-                name: "",
-                min: 0,
-                max: null,
-                unit: "",
-                position: "right",
-              },
-            ];
-            yaxises1.forEach((aEle, aIndex) => {
-              res.data.forEach((rEle) => {
-                // aEle.name = rEle.name;
-                aEle.unit = rEle.unit;
-              });
-            });
-            that.AnalysisYAxises = yaxises1;
-            aKey2.forEach((keyEle, keyIndex) => {
-              aList2[keyIndex].title = res.data[keyIndex].name;
-              res.data[keyIndex].data.forEach((rEle) => {
-                aList2[keyIndex].value.push({
-                  text: new Date(rEle.ts).formatDate("hh:mm"),
-                  value: rEle.doubleValue,
-                });
-              });
-            });
-            // res.data.forEach((rEle,rIndex)=>{
-            // })
-            // aKey2.forEach((keyEle, keyIndex) => {
-            //   res.data.forEach((rEle) => {
-            //     // alist2[keyIndex].yAxisIndex = keyIndex;
-            //     aList2[keyIndex].title = res.data[keyIndex].name;
-            //     rEle.data.forEach((tEle,tIndex) => {
-            //       aList2[keyIndex].value.push({
-            //         text: new Date(tEle.ts).formatDate("hh:mm"),
-            //         // value: tEle[keyEle],
-            //         // value:res.data[keyIndex].data[tIndex].doubleValue
+	import Panel3 from "../../components/coms/panel/panel3.vue";
+	import Table3 from "../../components/coms/table/table3.vue";
+	import MultipleYLineChartNormal from "./multiple-y-line-chart-normal.vue";
+	import FX from "./alarm-center-yjfx.vue";
+	import BASE from '@tools/basicTool.js';
+	export default {
+		components: {
+			Panel3,
+			Table3,
+			MultipleYLineChartNormal,
+			FX
+		},
+		data() {
+			return {
+				dialogTitleFX: "",
+				dialogVisibleFX: false,
+				dialogTitle: "",
+				chooseStatus: false,
+				dialogVisible: false,
+				chooseTime: [],
+				wpvalue: "",
+				wpid: "",
+				wtId: "",
+				descName: "",
+				AnalysisName: "",
+				AnalysisUnit: "",
+				Analysis: [{
+					title: "",
+					yAxisIndex: 0, // 使用单位
+					value: [],
+				}, ],
+				AnalysisYAxises: [{
+						name: "",
+						min: "",
+						max: "",
+						unit: "",
+						position: "left",
+					},
+					{
+						name: "",
+						min: "",
+						max: "",
+						unit: "",
+						position: "right",
+					},
+				],
+				selectValue: "60",
+				timeoptions: [{
+						value: "60",
+						label: "一分钟",
+					},
+					{
+						value: "300",
+						label: "五分钟",
+					},
+					{
+						value: "600",
+						label: "十分钟",
+					},
+					{
+						value: "1800",
+						label: "三十分钟",
+					},
+					{
+						value: "3600",
+						label: "一小时",
+					},
+					{
+						value: "86400",
+						label: "一天",
+					},
+				],
+				wpoptions: "",
+				options: [],
+				cascaderOptions: [],
+				cascaderSel: [],
+				cascaderProps: {
+					multiple: true
+				},
+				column: [
+					"风机偏航过程震动",
+					"齿轮箱轴承温升超过40度",
+					"三相电流不平衡",
+					"断轴或联轴器打滑",
+					"风速突变",
+				],
+				columnObj: [{
+						name: "风机编号",
+						field: "name",
+						width: "100px",
+						minWidth: "100px",
+					},
+					{
+						name: "风机偏航过程震动",
+						field: "风机偏航过程震动",
+						align: "left",
+						slot: true,
+						sortable: true,
+						minWidth: "200px",
+					},
+					{
+						name: "齿轮箱轴承温升超过40度",
+						field: "齿轮箱轴承温升超过40度",
+						align: "left",
+						slot: true,
+						sortable: true,
+						minWidth: "200px",
+					},
+					{
+						name: "三相电流不平衡",
+						field: "三相电流不平衡",
+						align: "left",
+						slot: true,
+						sortable: true,
+						minWidth: "200px",
+					},
+					{
+						name: "断轴或联轴器打滑",
+						field: "断轴或联轴器打滑",
+						align: "left",
+						slot: true,
+						sortable: true,
+						minWidth: "200px",
+					},
+					{
+						name: "风速突变",
+						align: "left",
+						field: "风速突变",
+						slot: true,
+						sortable: true,
+						minWidth: "200px",
+					},
+				],
+				startdate: new Date(
+					new Date(new Date().setDate(new Date().getDate() - 1))
+				).formatDate("yyyy-MM-dd"),
+				enddate: new Date(new Date()).formatDate("yyyy-MM-dd"),
+				tableData: {
+					column: [{
+							name: "风机编号",
+							field: "name"
+						},
+						{
+							name: "主轴温度温差大于8度",
+							field: "v1",
+							align: "left",
+							slot: true,
+						},
+						{
+							name: "浆叶角过小",
+							field: "v2",
+							align: "left",
+							slot: true
+						},
+					],
+					data: [{
+						name: "MG01_01",
+						v1: {
+							count: 12,
+							time: 0
+						}
+					}],
+				},
+			};
+		},
+		created() {
+			
+			this.$nextTick(() => {
+				this.search();
+			});
+		},
+		methods: {
+			//对比
+			showChart(column) {
+				let that = this;
+				that.dialogTitle = column.column.name;
+				that.wtId = column.row.name;
+				that.descName = column.column.name;
 
-            //       });
-            //     });
-            //   });
-            // });
+				that.requestDetailData(
+					that.wpvalue,
+					that.startdate,
+					that.enddate,
+					60,
+					column.row.name,
+					column.column.name
+				);
+			},
+			requestDetailData(station, startTs, endTs, interval, wtId, name) {
+				let that = this;
+				BASE.showLoading();
+				that.API.requestData({
+					method: "GET",
+					subUrl: "/analysis/detail",
+					data: {
+						// station: that.wpvalue,
+						// startTs: new Date(that.startdate).getTime(),
+						// endTs: new Date(that.enddate).getTime(),
+						// // interval: 360,
+						// interval:1,
+						// wtId: column.row.name,
+						// name: column.column.name,
+						station: station,
+						startTs: new Date(new Date(startTs).formatDate("yyyy/MM/dd")).getTime(),
+						endTs: new Date(new Date(endTs).formatDate("yyyy/MM/dd")).getTime(),
+						interval: interval,
+						wtId: wtId,
+						name: name,
+					},
+					success(res) {
+						if (res.data.length == 1) {
+							that.dialogVisible = true;
+							BASE.closeLoading();
+							let yaxises = [{
+								name: "",
+								min: 0,
+								max: null,
+								unit: "",
+								position: "left",
+							}, ];
+							// yaxises.name = res.data[0].name;
+							yaxises.unit = res.data[0].unit;
+							that.AnalysisYAxises = yaxises;
+							let aKey1 = ["doubleValue"];
+							let aList1 = [{
+								title: "",
+								// yAxisIndex:"",
+								smooth: true,
+								value: [],
+							}, ];
+							aKey1.forEach((keyEle, keyIndex) => {
+								aList1[keyIndex].title = res.data[keyIndex].name;
+								res.data[keyIndex].data.forEach((rEle) => {
+									aList1[keyIndex].value.push({
+										text: new Date(rEle.ts).formatDate("hh:mm"),
+										value: rEle.doubleValue,
+									});
+								});
+							});
+							that.Analysis = aList1;
+						} else if (res.data.length == 2) {
+							that.dialogVisible = true;
+							BASE.closeLoading();
+							let aKey2 = ["doubleValue", "doubleValue"];
+							let aList2 = [{
+									title: "",
+									//  yAxisIndex:"",
+									smooth: true,
+									value: [],
+								},
+								{
+									title: "",
+									// yAxisIndex:"",
+									smooth: true,
+									value: [],
+								},
+							];
+							let yaxises1 = [{
+									name: "",
+									min: 0,
+									max: null,
+									unit: "",
+									position: "left",
+								},
+								{
+									name: "",
+									min: 0,
+									max: null,
+									unit: "",
+									position: "right",
+								},
+							];
+							yaxises1.forEach((aEle, aIndex) => {
+								res.data.forEach((rEle) => {
+									// aEle.name = rEle.name;
+									aEle.unit = rEle.unit;
+								});
+							});
+							that.AnalysisYAxises = yaxises1;
+							aKey2.forEach((keyEle, keyIndex) => {
+								aList2[keyIndex].title = res.data[keyIndex].name;
+								res.data[keyIndex].data.forEach((rEle) => {
+									aList2[keyIndex].value.push({
+										text: new Date(rEle.ts).formatDate("hh:mm"),
+										value: rEle.doubleValue,
+									});
+								});
+							});
+							// res.data.forEach((rEle,rIndex)=>{
+							// })
+							// aKey2.forEach((keyEle, keyIndex) => {
+							//   res.data.forEach((rEle) => {
+							//     // alist2[keyIndex].yAxisIndex = keyIndex;
+							//     aList2[keyIndex].title = res.data[keyIndex].name;
+							//     rEle.data.forEach((tEle,tIndex) => {
+							//       aList2[keyIndex].value.push({
+							//         text: new Date(tEle.ts).formatDate("hh:mm"),
+							//         // value: tEle[keyEle],
+							//         // value:res.data[keyIndex].data[tIndex].doubleValue
 
-            that.Analysis = aList2;
-          } else if (res.data.length == 4) {
-            that.dialogVisible = true;
-            BASE.closeLoading();
-            let aKey4 = [
-              "doubleValue",
-              "doubleValue",
-              "doubleValue",
-              "doubleValue",
-            ];
-            let aList4 = [
-              {
-                title: "",
-                // yAxisIndex:"",
-                smooth: true,
-                value: [],
-              },
-              {
-                title: "",
-                // yAxisIndex:"",
-                smooth: true,
-                value: [],
-              },
-              {
-                title: "",
-                // yAxisIndex:"",
-                smooth: true,
-                value: [],
-              },
-              {
-                title: "",
-                // yAxisIndex:"",
-                smooth: true,
-                value: [],
-              },
-            ];
-            let yaxises2 = [
-              {
-                name: "",
-                min: 0,
-                max: null,
-                unit: "",
-                position: "left",
-              },
-              {
-                name: "",
-                min: 0,
-                max: null,
-                unit: "",
-                position: "right",
-              },
-            ];
-            yaxises2.forEach((aEle, aIndex) => {
-              res.data.forEach((rEle) => {
-                // aEle.name = rEle.name;
-                aEle.unit = rEle.unit;
-              });
-            });
-            that.AnalysisYAxises = yaxises2;
-            aKey4.forEach((keyEle, keyIndex) => {
-              aList4[keyIndex].title = res.data[keyIndex].name;
-              res.data[keyIndex].data.forEach((rEle) => {
-                aList4[keyIndex].value.push({
-                  text: new Date(rEle.ts).formatDate("hh:mm"),
-                  value: rEle.doubleValue,
-                });
-              });
-            });
-            that.Analysis = aList4;
-          } else if (res.data.length == 0) {
-            that.dialogVisible = false;
-            BASE.closeLoading();
-            that.BASE.showMsg({
-              type: "warning",
-              msg: "暂无数据",
-            });
-          }
-        },
-      });
-    },
-    //切换数据类型
-    switchChange(interval,status) {
-      if(status === 'interval') {
-        this.chooseStatus = false
-        this.selectValue = '60'
-      }else if(status === 'original'){
-        this.chooseStatus = true
-      }
-      this.requestDetailData(
-          this.wpvalue,
-          this.startdate,
-          this.enddate,
-          interval,
-          this.wtId,
-          this.descName
-        );
-    },
+							//       });
+							//     });
+							//   });
+							// });
 
-    async search() {
-      const { data } = await this.API.requestData({
-        subUrl: "powercompare/windfarmAjax",
-      });
-      this.wpoptions = data.data;
-      this.wpvalue = data.data[0].id;
-      this.searchData();
-    },
+							that.Analysis = aList2;
+						} else if (res.data.length == 4) {
+							that.dialogVisible = true;
+							BASE.closeLoading();
+							let aKey4 = [
+								"doubleValue",
+								"doubleValue",
+								"doubleValue",
+								"doubleValue",
+							];
+							let aList4 = [{
+									title: "",
+									// yAxisIndex:"",
+									smooth: true,
+									value: [],
+								},
+								{
+									title: "",
+									// yAxisIndex:"",
+									smooth: true,
+									value: [],
+								},
+								{
+									title: "",
+									// yAxisIndex:"",
+									smooth: true,
+									value: [],
+								},
+								{
+									title: "",
+									// yAxisIndex:"",
+									smooth: true,
+									value: [],
+								},
+							];
+							let yaxises2 = [{
+									name: "",
+									min: 0,
+									max: null,
+									unit: "",
+									position: "left",
+								},
+								{
+									name: "",
+									min: 0,
+									max: null,
+									unit: "",
+									position: "right",
+								},
+							];
+							yaxises2.forEach((aEle, aIndex) => {
+								res.data.forEach((rEle) => {
+									// aEle.name = rEle.name;
+									aEle.unit = rEle.unit;
+								});
+							});
+							that.AnalysisYAxises = yaxises2;
+							aKey4.forEach((keyEle, keyIndex) => {
+								aList4[keyIndex].title = res.data[keyIndex].name;
+								res.data[keyIndex].data.forEach((rEle) => {
+									aList4[keyIndex].value.push({
+										text: new Date(rEle.ts).formatDate("hh:mm"),
+										value: rEle.doubleValue,
+									});
+								});
+							});
+							that.Analysis = aList4;
+						} else if (res.data.length == 0) {
+							that.dialogVisible = false;
+							BASE.closeLoading();
+							that.BASE.showMsg({
+								type: "warning",
+								msg: "暂无数据",
+							});
+						}
+					},
+				});
+			},
+			//切换数据类型
+			switchChange(interval, status) {
+				if (status === 'interval') {
+					this.chooseStatus = false
+					this.selectValue = '60'
+				} else if (status === 'original') {
+					this.chooseStatus = true
+				}
+				this.requestDetailData(
+					this.wpvalue,
+					this.startdate,
+					this.enddate,
+					interval,
+					this.wtId,
+					this.descName
+				);
+			},
 
-    async searchTree() {
-      let arr = [];
-      let columnObj = [
-        {
-          name: "风机编号",
-          field: "name",
-          minWidth: "100px",
-        },
-      ];
-      this.cascaderSel.forEach((e) => {
-        let obj = {
-          name: e[1],
-          field: e[1],
-          align: "left",
-          slot: true,
-          sortable: true,
-          minWidth: "200px",
-        };
-        columnObj.push(obj);
+			async search() {
+				const {
+					data
+				} = await this.API.requestData({
+					subUrl: "powercompare/windfarmAjax",
+				});
+				this.wpoptions = data.data;
+				this.wpvalue = data.data[0].id;
+				this.searchData();
+			},
 
-        arr.push(e[1]);
-      });
-      this.columnObj = columnObj;
-      this.column = arr;
-      this.searchData();
-    },
+			async searchTree() {
+				let arr = [];
+				let columnObj = [{
+					name: "风机编号",
+					field: "name",
+					minWidth: "100px",
+				}, ];
+				this.cascaderSel.forEach((e) => {
+					let obj = {
+						name: e[1],
+						field: e[1],
+						align: "left",
+						slot: true,
+						sortable: true,
+						minWidth: "200px",
+					};
+					columnObj.push(obj);
 
-    async searchData() {
-      const { data } = await this.API.requestData({
-        baseURL: "http://192.168.1.18:8075/",
-        subUrl: "alarm/count/query/new2",
-        data: {
-          stationid: this.wpvalue,
-          startdate: new Date(this.startdate).formatDate("yyyy-MM-dd"),
-          enddate: new Date(this.enddate).formatDate("yyyy-MM-dd"),
-        },
-      });
-      ////////
-      const resData = data.data;
-      // const resData =this.resdata;
-      const column = this.columnObj;
-      let dataAll = []; // 总数据集合
-      resData.forEach((e) => {
-        let obj = {
-          name: Object.keys(e)[0],
-        };
-        let wpid = Object.keys(e)[0];
-        this.wpid = wpid;
+					arr.push(e[1]);
+				});
+				this.columnObj = columnObj;
+				this.column = arr;
+				this.searchData();
+			},
 
-        e[wpid].forEach((k) => {
-          column.forEach((c) => {
-            if (k.alertText == c.name) {
-              let obj1 = {
-                count: k.count,
-                time: k.time,
-              };
-              obj[k.alertText] = obj1;
-            }
-          });
-        });
-        dataAll.push(obj);
-      });
-      this.tableData.column = column;
-      this.tableData.data = dataAll;
-      ///////////////////// 获取规则list
-      const map = {};
-      var windNum = [];
-      for (let i in resData) {
-        for (let k in resData[i]) {
-          map[k] = resData[i][k];
-        }
-      }
-      // nmap为新的map 整理数据结构
-      const nmap = {};
-      for (let kv in map) {
-        var nchildMap = {};
-        var childrenMap = map[kv];
-        for (var ckv in childrenMap) {
-          var cckey = childrenMap[ckv].alertText;
-          var ccvalue = childrenMap[ckv];
-          nchildMap[cckey] = ccvalue;
-        }
-        nmap[kv] = nchildMap;
-      }
-      windNum = Object.keys(nmap);
-      var cascaderOptions = [];
-      var root = {}; // 原始根节点
-      var clumnsOnes = nmap[windNum[0]];
-      for (let k in clumnsOnes) {
-        let f = clumnsOnes[k].relatePartsText
-          ? clumnsOnes[k].relatePartsText
-          : "其他";
-        let fvalue = clumnsOnes[k].relateParts ? clumnsOnes[k].relateParts : "";
+			async searchData() {
+				const {
+					data
+				} = await this.API.requestData({
+					showLoading:true,
+					baseURL: "http://192.168.1.18:8075/",
+					subUrl: "alarm/count/query/new2",
+					data: {
+						stationid: this.wpvalue,
+						startdate: new Date(this.startdate).formatDate("yyyy-MM-dd"),
+						enddate: new Date(this.enddate).formatDate("yyyy-MM-dd"),
+					},
+				});
+				////////
+				this.tableData = [];
+				const resData = data.data;
+				// const resData =this.resdata;
+				const column = this.columnObj;
+				let dataAll = []; // 总数据集合
+				resData.forEach((e) => {
+					let obj = {
+						name: Object.keys(e)[0],
+					};
+					let wpid = Object.keys(e)[0];
+					this.wpid = wpid;
 
-        if (root[f]) {
-          // 已经存在此子节点
-          if (!root[f].children[k]) {
-            // 不存在子节点
-            root[f].children[k] = {};
-            root[f].children[k].value = root[f].children[k].label = k;
-            root[f].fobj.children.push(root[f].children[k]);
-          }
-        } // 不存在子节点
-        else {
-          root[f] = {};
-          // root[f].value = fvalue;
-          // root[f].label = f;
-          root[f].children = {};
-          root[f].children[k] = {};
-          root[f].children[k].value = root[f].children[k].label = k;
+					e[wpid].forEach((k) => {
+						column.forEach((c) => {
+							if (k.alertText == c.name) {
+								let obj1 = {
+									count: k.count,
+									countStyle:((k.count / (k.count + k.time)) * 100) + 'px',
+									time: k.time,
+									timeStyle:((k.time / (k.count + k.time)) * 100) + 'px'
+								};
+								obj[k.alertText] = obj1;
+							}
+						});
+					});
+					dataAll.push(obj);
+				});
+				
+				this.tableData.column = column;
+				this.tableData.data = dataAll;
+				
+				///////////////////// 获取规则list
+				const map = {};
+				var windNum = [];
+				for (let i in resData) {
+					for (let k in resData[i]) {
+						map[k] = resData[i][k];
+					}
+				}
+				// nmap为新的map 整理数据结构
+				const nmap = {};
+				for (let kv in map) {
+					var nchildMap = {};
+					var childrenMap = map[kv];
+					for (var ckv in childrenMap) {
+						var cckey = childrenMap[ckv].alertText;
+						var ccvalue = childrenMap[ckv];
+						nchildMap[cckey] = ccvalue;
+					}
+					nmap[kv] = nchildMap;
+				}
+				windNum = Object.keys(nmap);
+				var cascaderOptions = [];
+				var root = {}; // 原始根节点
+				var clumnsOnes = nmap[windNum[0]];
+				for (let k in clumnsOnes) {
+					let f = clumnsOnes[k].relatePartsText ?
+						clumnsOnes[k].relatePartsText :
+						"其他";
+					let fvalue = clumnsOnes[k].relateParts ? clumnsOnes[k].relateParts : "";
 
-          // 将对象放入 cascaderOptions
-          let childrenArray = [];
-          childrenArray.push(root[f].children[k]);
-          let fobj = {};
-          fobj.value = fvalue;
-          fobj.label = f;
-          fobj.children = childrenArray;
-          cascaderOptions.push(fobj);
-          root[f].fobj = fobj;
-        }
-      }
-      this.cascaderOptions = cascaderOptions;
-    },
-	fx(){
-		this.startdate=new Date(this.startdate).formatDate("yyyy-MM-dd");
-		this.dialogTitleFX= "预警分析";
-		this.dialogVisibleFX= true;
-	}
-  },
-};
+					if (root[f]) {
+						// 已经存在此子节点
+						if (!root[f].children[k]) {
+							// 不存在子节点
+							root[f].children[k] = {};
+							root[f].children[k].value = root[f].children[k].label = k;
+							root[f].fobj.children.push(root[f].children[k]);
+						}
+					} // 不存在子节点
+					else {
+						root[f] = {};
+						// root[f].value = fvalue;
+						// root[f].label = f;
+						root[f].children = {};
+						root[f].children[k] = {};
+						root[f].children[k].value = root[f].children[k].label = k;
+
+						// 将对象放入 cascaderOptions
+						let childrenArray = [];
+						childrenArray.push(root[f].children[k]);
+						let fobj = {};
+						fobj.value = fvalue;
+						fobj.label = f;
+						fobj.children = childrenArray;
+						cascaderOptions.push(fobj);
+						root[f].fobj = fobj;
+					}
+				}
+				this.cascaderOptions = cascaderOptions;
+			},
+			fx() {
+				this.startdate = new Date(this.startdate).formatDate("yyyy-MM-dd");
+				this.dialogTitleFX = "预警分析";
+				this.dialogVisibleFX = true;
+			}
+		},
+	};
 </script>
 
 <style lang="less">
-.alarm-center-1 {
-  .action-bar {
-    display: flex;
+	.alarm-center-1 {
+		.action-bar {
+			display: flex;
+
+			.query {
+				justify-content: flex-start;
+			}
+		}
 
-    .query {
-      justify-content: flex-start;
-    }
-  }
+		.table-panel {
+			width: 100%;
+			background: transparent;
+			padding: 0;
 
-  .table-panel {
-    width: 100%;
-    background: transparent;
-    padding: 0;
+			.bar {
+				display: flex;
+				align-items: center;
+				height: 16px;
+				margin: 8px 0;
 
-    .bar {
-      display: flex;
-      align-items: center;
-      height: 16px;
-      margin: 8px 0;
+				.bar-percent {
+					height: 100%;
+					background: @green;
+					margin-right: 8px;
+				}
+			}
+		}
 
-      .bar-percent {
-        height: 100%;
-        background: @green;
-        margin-right: 8px;
-      }
-    }
-  }
-  .searchForm {
-    display: flex;
-    margin-left: 36px;
-    flex-direction: row-reverse;
-    .inputs {
-      width: 15%;
-      margin-right: 18px;
-    }
-  }
-}
+		.searchForm {
+			display: flex;
+			margin-left: 36px;
+			flex-direction: row-reverse;
+
+			.inputs {
+				width: 15%;
+				margin-right: 18px;
+			}
+		}
+	}
 </style>

+ 7 - 18
src/views/NewPages/alarm-center-2.vue

@@ -39,26 +39,12 @@
       <table-2 :data="tableData" :height="'88vh'">
         <template v-for="(item, i) in column" :key="i" #[item]="scope">
           <div class="bar">
-            <div class="bar-percent" :style="{
-                width:
-                  (scope.data.count &&
-                    scope.data.count / (scope.data.count + scope.data.time)) *
-                    100 +
-                  'px',
-              }"></div>
-            <span class="value">{{
-              scope.data.count && scope.data.count
-              }}</span>
+          	<div class="bar-percent" :style="{ width: scope?.data?.countStyle }"> </div>
+          	<span class="value">{{ scope?.data?.count }} 次数</span>
           </div>
           <div class="bar">
-            <div class="bar-percent" :style="{
-                width:
-                  (scope.data.count &&
-                    scope.data.time / (scope.data.count + scope.data.time)) *
-                    100 +
-                  'px',
-              }"></div>
-            <span class="value">{{ scope.data.count && scope.data.time }}</span>
+          	<div class="bar-percent" :style="{ width: scope?.data?.timeStyle}"></div>
+          	<span class="value">{{scope?.data?.time }} 分钟</span>
           </div>
         </template>
       </table-2>
@@ -210,6 +196,7 @@ export default {
     },
     async searchData () {
       const { data } = await this.API.requestData({
+		  showLoading:true,
         baseURL: "http://192.168.1.18:8075/",
         subUrl: "shutdown/list",
         data: {
@@ -233,7 +220,9 @@ export default {
             if (k.type == c.name) {
               let obj1 = {
                 count: k.count,
+                countStyle:((k.count / (k.count + k.time)) * 100) + 'px',
                 time: k.time,
+                timeStyle:((k.time / (k.count + k.time)) * 100) + 'px'
               };
               obj[k.type] = obj1;
             }

+ 1 - 1
src/views/WindSite/pages/Info/Info.vue

@@ -20,7 +20,7 @@
           <!-- 使用 v-show 首次全部加载 之后隐藏 点击后显示 -->
           <base-info v-show="InfoBtns.activeIndex == 0" :data="sourceMap" />
           <!-- <base-info v-if="InfoBtns.activeIndex == 2" /> -->
-          <div style="text-align:center;">
+          <div :style="$store.state.themeName === 'dark' ? 'text-align:center;' : 'text-align:center;background:#fff;'">
             <StandAloneImg class="sai" v-show="InfoBtns.activeIndex != 0" :activeIndex="InfoBtns.activeIndex" @selectSvg="selectSvg"></StandAloneImg>
           </div>
           <generator class="saig" v-show="InfoBtns.activeIndex != 0" :index="InfoBtns.activeIndex" :data="sourceMap"></generator>

+ 1 - 1
src/views/singleAnalysis/index.vue

@@ -43,7 +43,7 @@
       <ComTable height="78vh" :data="tableData">
         <template v-slot:tr v-if="tableData.data.length > 0">
           <tr>
-            <td v-for="(item, index) in tableData.column" key="index">
+            <td v-for="(item, index) in tableData.column" :key="index">
               {{ tableDataEnd[item.field] }}
             </td>
           </tr>