Koishi 3 роки тому
батько
коміт
b8abbf09d5

+ 3 - 0
src/components/chart/radar/radar-chart.vue

@@ -122,6 +122,8 @@ export default {
             color: "#fff",
             fontSize: util.vh(16),
           },
+          extraCssText: "position: absolute; margin-top:50%;"
+          // extraCssText: "max-width:140px;position:sticky;top:0;left:0"
         },
         radar: [
           // 最低层 90
@@ -367,5 +369,6 @@ export default {
   height: 100%;
   display: block;
   margin: auto;
+  position: relative;
 }
 </style>

+ 14 - 8
src/components/coms/table/table3.vue

@@ -16,7 +16,7 @@
       :width="col.width"
       :min-width="col.minWidth"
       :sortable="col.sortable"
-	  :sort-orders="sortOrder"
+      :sort-orders="sortOrder"
       :sort-by="col.field + '.count'"
       :show-overflow-tooltip="!col.slot"
       :fixed="col.fixed"
@@ -89,6 +89,12 @@ export default {
         };
       },
     },
+    sortOrder: {
+      type: Array,
+      default: () => {
+        return ["descending", "ascending", null];
+      },
+    },
   },
   // 自定义事件
   emits: {
@@ -136,12 +142,12 @@ export default {
       if (this.pageable) return this.currentPage * this.pageSize;
       else return this.data.data.length;
     },
-	sortOrder:{
-	  type:Array,
-	  default:()  =>{
-		return ['descending', 'ascending', null]
-	  }
-	}
+    // sortOrder: {
+    //   type: Array,
+    //   default: () => {
+    //     return ["descending", "ascending", null];
+    //   },
+    // },
   },
   // 函数
   methods: {
@@ -164,7 +170,7 @@ export default {
   },
   created() {
     // 创建后
-	this.selfPageSize = this.pageSize
+    this.selfPageSize = this.pageSize;
   },
   beforeMount() {
     // 渲染前

+ 15 - 15
src/components/other/cesium/index.vue

@@ -50,22 +50,22 @@
 </template>
  
 <script>
-// import addCircleWave from "./static/CiecleScan";
-// import Windy from "./static/wind/Windy";
-// import response from "./static/2017121300";
-// import wtTree from "./static/fj";
+import addCircleWave from "./static/CiecleScan";
+import Windy from "./static/wind/Windy";
+import response from "./static/2017121300";
+import wtTree from "./static/fj";
 
-// import h337 from "./static/heatmap";
+import h337 from "./static/heatmap";
 
-// import $ from "jquery";
+import $ from "jquery";
 
-// import {
-//   createSnowStage,
-//   createRainStage,
-// } from "./static/postProcessController";
+import {
+  createSnowStage,
+  createRainStage,
+} from "./static/postProcessController";
 
-// const Cesium = require("cesium/Cesium");
-// const widgets = require("cesium/Widgets/widgets.css");
+const Cesium = require("cesium/Cesium");
+const widgets = require("cesium/Widgets/widgets.css");
 
 export default {
   data() {
@@ -106,9 +106,9 @@ export default {
   created() {},
 
   mounted() {
-    // this.initMap();
-    // this.handleCommand("b");
-    // this.flyto(1600000);
+    this.initMap();
+    this.handleCommand("b");
+    this.flyto(1600000);
   },
 
   computed: {},

+ 107 - 81
src/views/NewPages/alarm-center-1.vue

@@ -54,9 +54,9 @@
               popper-class="search-select"
               :options="cascaderOptions"
               :props="cascaderProps"
-              v-model="cascaderSel"
+              @change="getCascaderChange"
               collapse-tags
-              :clearable="true"
+              clearable
             ></el-cascader>
           </div>
         </div>
@@ -112,35 +112,27 @@
       custom-class="modal"
       :close-on-click-modal="false"
     >
-    <div class="searchForm">
-       <el-select
-        @change="searchTime(selectValue)"
-        class="inputs"
-        v-model="selectValue"
-        placeholder="请选择"
-      >
-        <el-option
-          v-for="item in timeoptions"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value"
+      <div class="searchForm">
+        <el-select
+          @change="searchTime(selectValue)"
+          class="inputs"
+          v-model="selectValue"
+          placeholder="请选择"
         >
-        </el-option>
-      </el-select>
-      <div class="choose">
-        <button class="btn"
-          @click="switchChange(60)"
-        >
-          等间隔
-        </button>
-        <button class="btn"
-          @click="switchChange(0)"
-        >
-          原始数据
-        </button>
+          <el-option
+            v-for="item in timeoptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+        <div class="choose">
+          <button class="btn" @click="switchChange(60)">等间隔</button>
+          <button class="btn" @click="switchChange(0)">原始数据</button>
+        </div>
       </div>
-    </div>
-     
+
       <multiple-y-line-chart-normal
         height="500px"
         :list="Analysis"
@@ -165,8 +157,8 @@ export default {
       chooseTime: [],
       wpvalue: "",
       wpid: "",
-      wtId:"",
-      descName:"",
+      wtId: "",
+      descName: "",
       AnalysisName: "",
       AnalysisUnit: "",
       Analysis: [
@@ -283,7 +275,19 @@ export default {
         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,},},],},
+      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() {
@@ -359,16 +363,16 @@ export default {
                 value: [],
               },
             ];
-                      aKey1.forEach((keyEle,keyIndex)=>{
-            // console.log('keyindex:',res.data[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
-              })
-            })
-          })
+            aKey1.forEach((keyEle, keyIndex) => {
+              // console.log('keyindex:',res.data[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,
+                });
+              });
+            });
             // aKey1.forEach((keyEle, keyIndex) => {
             //   res.data.forEach((rEle) => {
             //     rEle.data.forEach((tEle) => {
@@ -387,8 +391,8 @@ export default {
             let aKey2 = ["doubleValue", "doubleValue"];
             let aList2 = [
               {
-               title: "", 
-              //  yAxisIndex:"",
+                title: "",
+                //  yAxisIndex:"",
                 smooth: true,
                 value: [],
               },
@@ -425,16 +429,16 @@ export default {
             });
             that.AnalysisYAxises = yaxises1;
             console.log("AnalysisYAxises:", that.AnalysisYAxises);
-                    aKey2.forEach((keyEle,keyIndex)=>{
-            // console.log('keyindex:',res.data[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
-              })
-            })
-          })
+            aKey2.forEach((keyEle, keyIndex) => {
+              // console.log('keyindex:',res.data[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)=>{
             //   console.log('rele:',rEle)
             // })
@@ -448,7 +452,7 @@ export default {
             //         text: new Date(tEle.ts).formatDate("hh:mm"),
             //         // value: tEle[keyEle],
             //         // value:res.data[keyIndex].data[tIndex].doubleValue
-                  
+
             //       });
             //     });
             //   });
@@ -515,16 +519,16 @@ export default {
             });
             that.AnalysisYAxises = yaxises2;
             console.log("AnalysisYAxises:", that.AnalysisYAxises);
-          aKey4.forEach((keyEle,keyIndex)=>{
-            // console.log('keyindex:',res.data[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
-              })
-            })
-          })
+            aKey4.forEach((keyEle, keyIndex) => {
+              // console.log('keyindex:',res.data[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,
+                });
+              });
+            });
             // aKey4.forEach((keyEle, keyIndex) => {
             //   res.data.forEach((rEle) => {
             //     // aList4[keyIndex].yAxisIndex = keyIndex;
@@ -541,24 +545,39 @@ export default {
             // });
             that.Analysis = aList4;
             console.log("that.Analysis4:", that.Analysis);
-          }else if (res.data.length == 0) {
-             that.dialogVisible = false;
-                that.BASE.showMsg({
-          type: "warning",
-          msg: "暂无数据",
-        });
+          } else if (res.data.length == 0) {
+            that.dialogVisible = false;
+            that.BASE.showMsg({
+              type: "warning",
+              msg: "暂无数据",
+            });
           }
-
         },
       });
     },
+    getCascaderChange(res) {
+      this.cascaderSel=res || [];
+    },
     //切换数据类型
     switchChange(interval) {
-      if(interval == 0){
-        this.requestDetailData(this.wpvalue,this.startdate,this.enddate,0,this.wtId,this.descName)
-      }
-      else if(interval == 60){
-        this.requestDetailData(this.wpvalue,this.startdate,this.enddate,60,this.wtId,this.descName)
+      if (interval == 0) {
+        this.requestDetailData(
+          this.wpvalue,
+          this.startdate,
+          this.enddate,
+          0,
+          this.wtId,
+          this.descName
+        );
+      } else if (interval == 60) {
+        this.requestDetailData(
+          this.wpvalue,
+          this.startdate,
+          this.enddate,
+          60,
+          this.wtId,
+          this.descName
+        );
       }
       // this.switchFlag = !this.switchFlag;
       // this.selectValue = "60";
@@ -575,7 +594,14 @@ export default {
     },
     searchTime(values) {
       console.log("values:", values);
-      this.requestDetailData(this.wpvalue,this.startdate,this.enddate,values,this.wtId,this.descName)
+      this.requestDetailData(
+        this.wpvalue,
+        this.startdate,
+        this.enddate,
+        values,
+        this.wtId,
+        this.descName
+      );
       // let times = [];
       // this.chooseTime.forEach((item) => {
       //   times.push(dayjs(item).valueOf());
@@ -773,12 +799,12 @@ export default {
       }
     }
   }
-  .searchForm{
+  .searchForm {
     display: flex;
     margin-left: 36px;
-    .inputs{
+    .inputs {
       width: 15%;
-    margin-right: 18px;
+      margin-right: 18px;
     }
   }
 }

+ 33 - 23
src/views/NewPages/area-line-chart.vue

@@ -201,7 +201,7 @@ export default {
     units: {
       type: Array,
       // default: () => ["健康趋势", "风机健康状态数量"],
-       default: () => ["(实时功率)", "(风速)"],
+      default: () => ["(实时功率)", "(风速)"],
     },
     // 显示 legend
     showLegend: {
@@ -211,24 +211,31 @@ export default {
     // 颜色
     color: {
       type: Array,
-      default: () => ["#323E6F", "#1DA0D7", "#02BB4C", "#DB5520", "#EDB32F", "#EDEB2F"],
+      default: () => [
+        "#323E6F",
+        "#1DA0D7",
+        "#02BB4C",
+        "#DB5520",
+        "#EDB32F",
+        "#EDEB2F",
+      ],
     },
   },
-  data () {
+  data() {
     return {
       id: "",
       chart: null,
     };
   },
   computed: {
-    legend () {
+    legend() {
       let data = [];
       this.lineData.forEach((value, index) => {
         data.push(value.text);
       });
       return data;
     },
-    xAxisData () {
+    xAxisData() {
       let data = [];
       if (this.lineData.length > 0)
         this.lineData[0].value.forEach((value, index) => {
@@ -236,7 +243,7 @@ export default {
         });
       return data;
     },
-    areaChartData () {
+    areaChartData() {
       let data = [];
       for (var i = 0; i < this.areaData.length; i++) {
         let item = this.areaData[i];
@@ -254,7 +261,7 @@ export default {
       }
       return data;
     },
-    areaMax () {
+    areaMax() {
       let max = 0;
       this.areaData.forEach((value) => {
         if (max < value.end) max = value.end;
@@ -263,7 +270,7 @@ export default {
     },
   },
   methods: {
-    renderItem (params, api) {
+    renderItem(params, api) {
       var start = api.coord([api.value(0)]);
       var end = api.coord([api.value(1)]);
       var height = api.size([0, 1])[1];
@@ -292,9 +299,7 @@ export default {
         }
       );
     },
-    initChart () {
-      console.log("units:",this.units)
-      console.log("areaData:",this.areaData)
+    initChart() {
       let that = this;
       let chart = echarts.init(this.$el);
 
@@ -336,15 +341,14 @@ export default {
         xAxis: [
           {
             type: "category",
-             name: this.units[2],
+            name: this.units[2],
             axisLabel: {
-              
               color: partten.getColor("gray"),
             },
             // axisLine: {
             //   show: false,
             // },
-               axisLine: {
+            axisLine: {
               type: "dashed",
               lineStyle: {
                 color: partten.getColor("gray"),
@@ -368,9 +372,10 @@ export default {
             },
           },
         ],
-        yAxis: [{
-           type: "value",
-        },
+        yAxis: [
+          {
+            type: "value",
+          },
           {
             type: "value",
             name: this.units[0],
@@ -400,6 +405,12 @@ export default {
             data: [this.areaData[0].name],
             axisLabel: { show: false },
           },
+          {
+            name: "风速",
+            type: "value",
+            min: 0,
+            max: 30,
+          },
         ],
         series: [],
       };
@@ -407,13 +418,12 @@ export default {
       // line data
       if (this.lineData.length > 0) {
         this.lineData.forEach((value, index) => {
-          console.log('valueTEXT:',value)
           option.series.push({
             name: value.text,
             type: "line",
             data: value.value,
             smooth: true, //平滑展示
-            yAxisIndex: 0,
+            yAxisIndex: value.yAxisIndex,
             // lineStyle: {
             //   color: partten.getColor("green"),
             // },
@@ -456,23 +466,23 @@ export default {
   emits: {
     areaClick: null,
   },
-  created () {
+  created() {
     this.id = "pie-chart-" + util.newGUID();
   },
-  mounted () {
+  mounted() {
     this.$nextTick(() => {
       this.$el.style.width = this.width;
       this.$el.style.height = this.height;
       let that = this;
       let chart = this.initChart();
-      chart.on("click", function(e, p) {
+      chart.on("click", function (e, p) {
         if (e.seriesType == "custom") {
           that.$emit("areaClick", { data: e.data.exData });
         }
       });
     });
   },
-  updated () {
+  updated() {
     this.$nextTick(() => {
       this.initChart();
     });

+ 25 - 9
src/views/NewPages/dj1.vue

@@ -726,6 +726,7 @@
 
 <script>
 import AreaLineChart from "./area-line-chart.vue";
+// import AreaLineChart from "../../components/chart/line/multiple-y-line-chart-normal.vue";
 // import AreaLineChart from "../../components/chart/combination/area-line-chart.vue";
 // import MultipleBarLineChart1 from "./multiple-bar-line-chart.vue";
 import MultipleBarLineChart from "../../components/chart/combination/multiple-bar-line-chart.vue";
@@ -1070,23 +1071,21 @@ export default {
           let lostChartData = [
             {
               text: "实发功率",
-              value: [
-                {
-                  text: "1",
-                  value: 1,
-                },
-              ],
+              yAxisIndex: 0,
+              value: [],
             },
             {
               text: "保证功率",
+              yAxisIndex: 0,
               value: [],
             },
             {
               text: "风速",
+              yAxisIndex: 3,
               value: [],
             },
           ];
-          const lostChartUnit = ["实发功率", "保证功率", "风速", "状态"];
+          const lostChartUnit = ["实发功率", "保证功率", "风速"];
 
           keyArray.forEach((key, keyIndex) => {
             res.data.forEach((ele) => {
@@ -1416,13 +1415,30 @@ export default {
           };
 
           if (res.data.data) {
-			  mgtData.indicator = ["北", "北北西", "北西", "西北西", "西", "西南西", "南西", "南南西", "南", "南南东", "东南", "东南东","东", "东北东", "北东", "北北东"]
+            mgtData.indicator = [
+              "北",
+              "北北西",
+              "北西",
+              "西北西",
+              "西",
+              "西南西",
+              "南西",
+              "南南西",
+              "南",
+              "南南东",
+              "东南",
+              "东南东",
+              "东",
+              "东北东",
+              "北东",
+              "北北东",
+            ];
             res.data.data.forEach((ele) => {
               // mgtData.indicator.push(ele.name);
               mgtData.data[0].value.push(ele.data1);
             });
           }
-			mgtData.data[0].value.reverse();
+          mgtData.data[0].value.reverse();
           that[dataKey] = mgtData;
         },
       });