浏览代码

问题修改

SunZehao 2 年之前
父节点
当前提交
6d23c67a5d

+ 2 - 2
.env.development

@@ -1,5 +1,5 @@
 VUE_APP_API=http://18.6.30.63:8099
 VUE_APP_SHARDINGURL=http://18.6.30.63:8075
-VUE_APP_ADAPTERURL=http://18.6.30.63:8011
+VUE_APP_ADAPTERURL=http://18.6.30.71:8011
 VUE_APP_APIS=18.6.30.63:8099
-VUE_APP_ADAPTERURLS=18.6.30.63:8011
+VUE_APP_ADAPTERURLS=18.6.30.71:8011

+ 6 - 4
src/components/allMatrices.vue

@@ -240,7 +240,7 @@ export default {
       showpieColor: [
         {
             name: '×5:  0%~5%',
-            value: '#05bb4c'
+            value: '#57cf3a'
         },
         {
             name: '×4:  5%~10%',
@@ -248,15 +248,15 @@ export default {
         },
         {
             name: '×3:  10%~20%',
-            value: '#4b55ae'
+            value: '#1974ff'
         },
         {
             name: '×2:  20%~40%',
-            value: '#e17d24'
+            value: '#cd4cdd'
         },
         {
             name: '×1:  >40%',
-            value: '#ba3237'
+            value: '#ff3c80'
         },
       ]
     };
@@ -391,6 +391,8 @@ export default {
       }
       this.stationObj = stationObj;
       this.stationArr = stationArr;
+      console.log('stationArr======>>>>>', this.stationArr)
+      debugger
     },
     //风场回调
     handleDetial(itm) {

+ 4 - 3
src/components/matrixBlock.vue

@@ -132,14 +132,15 @@ export default {
   updated() {},
   methods: {
     getName(item, type) {
+        // debugger
         let name = ''
         if (type === 'top') {
-            if (item.stationId) {
-                name = item.stationId.slice(0, item.stationId.indexOf('_'))
+            if (item.windturbineId) {
+                name = item.windturbineId.slice(0, 2)
             }
         } else {
             if (item.windturbineId) {
-                name = item.windturbineId.slice(item.windturbineId.indexOf('_'))
+                name = item.windturbineId.slice(item.windturbineId.indexOf('_')+1)
             }
         }
         return name

+ 14 - 3
src/components/search/fault.vue

@@ -235,8 +235,19 @@ export default {
       let date = new Date();
       this.timeValue[0] = new Date(new Date().toLocaleDateString()).getTime() - 86400000;
       this.timeValue[1] = new Date(new Date().toLocaleDateString()).getTime();
-      let stationList = this.$store.state.stationList;
-      this.selectValue = stationList[0].id;
+      let stationArr = [
+        {
+            name: '全部',
+            id: ''
+        }
+      ]
+        this.$store.state.stationList.forEach(item =>{
+            if (item.name.indexOf('全部') === -1) {
+                stationArr.push(item)
+            }
+        })
+      let stationList = stationArr;
+      this.selectValue = stationList[1].id;
       this.stationList = stationList;
       this.listedChange(this.selectValue);
       this.getWarning();
@@ -249,7 +260,7 @@ export default {
         .getWindturbineWarning({
           pagesize: this.currentPage,
           pagenum: this.pagenum,
-          stationid: this.selectValue,
+          stationid: this.selectValue === 'WIND_ALL' ? '' : this.selectValue,
           windturbineid: this.windturbineId,
           starttime: dayjs(this.timeValue[0]).format("YYYY-MM-DD HH:mm:ss"),
           endtime: dayjs(this.timeValue[1]).format("YYYY-MM-DD HH:mm:ss"),

+ 14 - 2
src/components/search/record.vue

@@ -122,7 +122,19 @@ export default {
   mounted() { },
   methods: {
     opened() {
-      let stationList = this.$store.state.stationList;
+    //   let stationList = this.$store.state.stationList;
+    let stationArr = [
+        {
+            name: '全部',
+            id: ''
+        }
+      ]
+        this.$store.state.stationList.forEach(item =>{
+            if (item.name.indexOf('全部') === -1) {
+                stationArr.push(item)
+            }
+        })
+      let stationList = stationArr;
       this.selectValue = stationList[0].id;
       this.stationList = stationList;
       this.listedChange(this.selectValue);
@@ -150,7 +162,7 @@ export default {
       api.recommended({
         pagesize: this.pagesize,
         pagenum: this.pagenum,
-        stationid: this.selectValue,
+        stationid: this.selectValue === 'WIND_ALL' ? '' : this.selectValue,
         windturbineid: this.selectWind,
       }).then(res => {
         if (res.data) {

+ 8 - 1
src/components/search/state.vue

@@ -100,7 +100,14 @@ export default {
       // let date = new Date();
       this.timeValue[0] = new Date(new Date().toLocaleDateString()).getTime() - 86400000;
       this.timeValue[1] = new Date(new Date().toLocaleDateString()).getTime();
-      let stationList = this.$store.state.stationList;
+    //   let stationList = this.$store.state.stationList;
+    let stationArr = []
+        this.$store.state.stationList.forEach(item =>{
+            if (item.name.indexOf('全部') === -1) {
+                stationArr.push(item)
+            }
+        })
+      let stationList = stationArr;
       this.selectValue = stationList[0].id;
       this.stationList = stationList;
       this.listedChange(this.selectValue);

+ 14 - 2
src/components/search/status.vue

@@ -146,7 +146,19 @@ export default {
       let date = new Date();
       this.timeValue[0] = new Date(new Date().toLocaleDateString()).getTime() - 86400000;
       this.timeValue[1] = new Date(new Date().toLocaleDateString()).getTime();
-      let stationList = this.$store.state.stationList;
+    //   let stationList = this.$store.state.stationList;
+    let stationArr = [
+        {
+            name: '全部',
+            id: ''
+        }
+      ]
+        this.$store.state.stationList.forEach(item =>{
+            if (item.name.indexOf('全部') === -1) {
+                stationArr.push(item)
+            }
+        })
+      let stationList = stationArr;
       this.selectValue = stationList[0].id;
       this.stationList = stationList;
       this.getData()
@@ -154,7 +166,7 @@ export default {
     getData(){
       console.log(11111111);
       api.statusTime({
-        stationid: this.selectValue,
+        stationid: this.selectValue === 'WIND_ALL' ? '' : this.selectValue,
         startTs: this.timeValue[0],
         endTs: this.timeValue[1],
       }).then(res =>{

+ 15 - 3
src/components/search/warning.vue

@@ -223,8 +223,20 @@ export default {
       let date = new Date();
       this.timeValue[0] = new Date(new Date().toLocaleDateString()).getTime() - 86400000;
       this.timeValue[1] = new Date(new Date().toLocaleDateString()).getTime();
-      let stationList = this.$store.state.stationList;
-      this.selectValue = stationList[0].id;
+    //   let stationList = this.$store.state.stationList;
+    let stationArr = [
+        {
+            name: '全部',
+            id: ''
+        }
+      ]
+        this.$store.state.stationList.forEach(item =>{
+            if (item.name.indexOf('全部') === -1) {
+                stationArr.push(item)
+            }
+        })
+      let stationList = stationArr;
+      this.selectValue = stationList[1].id;
       this.stationList = stationList;
       this.listedChange(this.selectValue);
       this.getWarning();
@@ -237,7 +249,7 @@ export default {
         .getWindturbineWarning({
           pagesize: this.currentPage,
           pagenum: this.pagenum,
-          stationid: this.selectValue,
+          stationid: this.selectValue === 'WIND_ALL' ? '' : this.selectValue,
           windturbineid: '',
           starttime: dayjs(this.timeValue[0]).format("YYYY-MM-DD HH:mm:ss"),
           endtime: dayjs(this.timeValue[1]).format("YYYY-MM-DD HH:mm:ss"),

+ 14 - 5
src/components/unpaidMatrixBlockPv.vue

@@ -99,16 +99,25 @@ export default {
     // this.getWindturbineFdc();
   },
   created() {
-    console.log('dataList', this.dataList)
+    console.log('dataList======>>>>>', this.dataList)
   },
   methods: {
     getName(item, type) {
         let name = ''
-        if (item.id) {
-            if (type === 'top') {
-                name = item.id.slice(0, item.id.indexOf('_'))
+        if (item.station) {
+            if (item.station.indexOf('HZJ') > -1) {
+                // debugger
+                if (type === 'top') {
+                    name = item.code.slice(0, item.code.indexOf('-'))
+                } else {
+                    name = item.code.slice(item.code.indexOf('-')+1)
+                }
             } else {
-                name = item.id.slice(item.id.indexOf('_'))
+                if (type === 'top') {
+                    name = item.station.slice(0, item.station.indexOf('_'))
+                } else {
+                    name = item.id.slice(item.id.indexOf('_')+1)
+                }
             }
         }
         return name