Ver código fonte

2023-03-14 update

1. 同步neic  2023-03-13 及 之前的代码
moccus 2 anos atrás
pai
commit
bbe0e7d2e1
36 arquivos alterados com 75113 adições e 2662 exclusões
  1. 6 6
      .env.development
  2. 1 1
      .env.eapi
  3. 5 5
      .env.production
  4. 31 31
      .gitignore
  5. 19 19
      README.md
  6. 1 4
      src/App.vue
  7. 91 27
      src/api/index.js
  8. 46 50
      src/components/BasicInformationDetail.vue
  9. 5931 0
      src/components/BoosterStation/dwk.vue
  10. 4945 0
      src/components/BoosterStation/hzj.vue
  11. 2845 0
      src/components/BoosterStation/mch.vue
  12. 9139 0
      src/components/BoosterStation/mhs.vue
  13. 5433 0
      src/components/BoosterStation/nss.vue
  14. 5305 0
      src/components/BoosterStation/pl1.vue
  15. 3618 0
      src/components/BoosterStation/pl2.vue
  16. 4 4
      src/components/BoosterStation/previewPicture.vue
  17. 4051 0
      src/components/BoosterStation/qs.vue
  18. 2503 0
      src/components/BoosterStation/sbdl.vue
  19. 4404 0
      src/components/BoosterStation/sbq.vue
  20. 12164 0
      src/components/BoosterStation/xh.vue
  21. 10412 0
      src/components/BoosterStation/xs.vue
  22. 1162 1165
      src/components/allMatrices.vue
  23. 444 267
      src/components/control/controlAllArea.vue
  24. 1 6
      src/components/control/parametersContrast.vue
  25. 700 256
      src/components/focus/syzDetails.vue
  26. 18 4
      src/components/matrixBlock.vue
  27. 926 0
      src/components/matrixBlockPv.vue
  28. 611 612
      src/components/modeControl/modeControl.vue
  29. 13 5
      src/components/search/action.vue
  30. 30 18
      src/components/search/fault.vue
  31. 18 6
      src/components/search/record.vue
  32. 14 31
      src/components/search/state.vue
  33. 21 8
      src/components/search/status.vue
  34. 113 42
      src/components/search/warning.vue
  35. 77 92
      src/components/warning/warningCard.vue
  36. 11 3
      src/components/warning/warningRecords.vue

+ 6 - 6
.env.development

@@ -1,6 +1,6 @@
-VUE_APP_API=http://127.0.0.1:8100
-VUE_APP_WARNING=http://11.0.118.57:8075
-VUE_APP_SHARDINGURL=http://11.0.118.57:8075
-VUE_APP_ADAPTERURL=http://11.0.118.57:8011
-VUE_APP_APIS=11.0.118.57:8100
-VUE_APP_ADAPTERURLS=127.0.0.1:8011
+VUE_APP_API=http://11.0.118.57:8100
+VUE_APP_WARNING=http://11.0.118.57:8075
+VUE_APP_SHARDINGURL=http://11.0.118.57:8075
+VUE_APP_ADAPTERURL=http://11.0.118.57:8011
+VUE_APP_APIS=11.0.118.57:8100
+VUE_APP_ADAPTERURLS=11.0.118.57:8011

+ 1 - 1
.env.eapi

@@ -1 +1 @@
-NODE_ENV=eapi
+NODE_ENV=eapi

+ 5 - 5
.env.production

@@ -1,6 +1,6 @@
-VUE_APP_API=http://11.0.118.57:8100
-VUE_APP_WARNING=http://11.0.118.57:8075
-VUE_APP_SHARDINGURL=http://11.0.118.57:8075
-VUE_APP_ADAPTERURL=http://11.0.118.57:8011
-VUE_APP_APIS=11.0.118.57:8100
+VUE_APP_API=http://11.0.118.57:8100
+VUE_APP_WARNING=http://11.0.118.57:8075
+VUE_APP_SHARDINGURL=http://11.0.118.57:8075
+VUE_APP_ADAPTERURL=http://11.0.118.57:8011
+VUE_APP_APIS=11.0.118.57:8100
 VUE_APP_ADAPTERURLS=11.0.118.57:8011

+ 31 - 31
.gitignore

@@ -1,31 +1,31 @@
-.DS_Store
-node_modules
-/dist
-
-
-# local env files
-.env.local
-.env.*.local
-
-# Log files
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-
-# Editor directories and files
-.idea
-.vscode
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
-
-#Electron-builder output
-/dist_electron
-
-#压缩包
-*.zip
-*.rar
-*.7z
+.DS_Store
+node_modules
+/dist
+
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
+
+#Electron-builder output
+/dist_electron
+
+#压缩包
+*.zip
+*.rar
+*.7z

+ 19 - 19
README.md

@@ -1,20 +1,20 @@
-# project-neic
-
-## Project setup
-```
-npm install
-```
-
-### Compiles and hot-reloads for development
-```
-npm run serve
-```
-
-### Compiles and minifies for production
-```
-npm run build
-```
-
-### Customize configuration
-See [Configuration Reference](https://cli.vuejs.org/config/).
+# project-neic
+
+## Project setup
+```
+npm install
+```
+
+### Compiles and hot-reloads for development
+```
+npm run serve
+```
+
+### Compiles and minifies for production
+```
+npm run build
+```
+
+### Customize configuration
+See [Configuration Reference](https://cli.vuejs.org/config/).
 采用node14版本

+ 1 - 4
src/App.vue

@@ -187,7 +187,7 @@ export default {
       });
     },
     handleChange(val,flag) {
-      if (val !== 10) {
+      if (val !== 9) {
         this.matricesDisplay = false;
         this.syzDialogShow = false;
         // this.$store.commit("syzDialogShow", false);
@@ -225,9 +225,6 @@ export default {
         case 7:
           this.lockMaskDisplay = !this.lockMaskDisplay;
           break;
-        case 8:
-          this.voiceCV = !this.voiceCV;
-          break;
         case 9:
           this.toImage();
           break;

+ 91 - 27
src/api/index.js

@@ -7,6 +7,55 @@ const getWindturbine = () => {
         method: "get",
     });
 };
+// 获取所有升压站tab数据
+const getAllStationTab = () => {
+    return request({
+        baseURL:process.env.VUE_APP_API,
+        url: `/api/boost_station/stations`,
+        method: "get",
+    });
+}
+// 获取svg触发器
+const getAllStationSvgInfo = (params) => {
+    return request({
+        baseURL:process.env.VUE_APP_API,
+        url: `/api/boost_station/svginfo?id=${params.id}`,
+        method: "get",
+    });
+}
+// 获取升压站svg图片数据
+const getSvgData = (params) => {
+    return request({
+        baseURL:process.env.VUE_APP_API,
+        url: `/api/boost_station/svg?id=${params.id}`,
+        method: "get",
+    });
+}
+// 获取矩阵页面光伏二级页左侧栏数据
+const getStationInfoData = () => {
+    return request({
+        baseURL:process.env.VUE_APP_API,
+        url: `/api/station/pv_info`,
+        method: "get",
+    });
+}
+// 获取矩阵页面光伏二级页整体数据
+const getAllPvStationData = (params) => {
+    return request({
+        baseURL:process.env.VUE_APP_ADAPTERURL,
+        url: `/ts/latest?thingType=windturbine&thingId=${params.id}&uniformCodes=${params.codes}`,
+        method: "get",
+    });
+}
+// 获取矩阵页面光伏二级页echarts数据
+const getAllPvHistoryData = (params) => {
+    return request({
+        baseURL:process.env.VUE_APP_ADAPTERURL,
+        url: `/ts/history/snap?thingType=windturbine&thingId=${params.id}&uniformCode=${params.code}&startTs=${params.startTime}&endTs=${params.endTime}&interval=${params.interval}`,
+        method: "get",
+    });
+}
+
 // 标题栏数据
 const stationOverview = () => {
     return request({
@@ -291,58 +340,58 @@ const alarmCountQuery = (data) => {
         method: "get",
     });
 };
-//状态时间查询
-const statusTime = (data) => {
+//获取风场机型
+const getStationModels = (data) => {
     return request({
         baseURL:process.env.VUE_APP_API,
-        url: `/api/windturbine/status-time?stationId=${data.stationid}&startTs=${data.startTs}&endTs=${data.endTs}`,
+        url: `/api/station/models?stationid=${data.stationid}`,
         method: "get",
     });
 };
-
-//推荐记录查询
-const recommended = (data) => {
+//获取设置查询
+const getSettings = (data) => {
     return request({
         baseURL:process.env.VUE_APP_API,
-        url: `control-record/recommended?pagesize=${data.pagesize}&pagenum=${data.pagenum}&stationid=${data.stationid}&windturbineid=${data.windturbineid}`,
+        url: `/api/settings/recommendation?stationId=${data.stationId}&modelId=${data.modelId}`,
         method: "get",
     });
 };
-
-//状态变化查询
-const statusChange = (data) => {
+//修改设置
+const updateSettings = (data) => {
     return request({
         baseURL:process.env.VUE_APP_API,
-        url: `/api/windturbine/status?startTs=${data.startTs}&endTs=${data.endTs}&pagesize=${data.pagesize}&pagenum=${data.pagenum}&windturbineId=${data.windturbineid}`,
-        method: "get",
+        url: `/api/settings/recommendation`,
+        method: "post",
+        data:data
     });
 };
-
-//获取风场机型
-const getStationModels = (data) => {
+//状态时间查询
+const statusTime = (data) => {
     return request({
         baseURL:process.env.VUE_APP_API,
-        url: `/api/station/models?stationid=${data.stationid}`,
+        url: `/api/windturbine/status-time?stationId=${data.stationid}&startTs=${data.startTs}&endTs=${data.endTs}`,
         method: "get",
     });
 };
-//获取设置查询
-const getSettings = (data) => {
+
+//推荐记录查询
+const recommended = (data) => {
     return request({
         baseURL:process.env.VUE_APP_API,
-        url: `/api/settings/recommendation?stationId=${data.stationId}&modelId=${data.modelId}`,
+        url: `control-record/recommended?pagesize=${data.pagesize}&pagenum=${data.pagenum}&stationid=${data.stationid}&windturbineid=${data.windturbineid}`,
         method: "get",
     });
 };
-//修改设置
-const updateSettings = (data) => {
+
+//状态变化查询
+const statusChange = (data) => {
     return request({
         baseURL:process.env.VUE_APP_API,
-        url: `/api/settings/recommendation`,
-        method: "post",
-        data:data
+        url: `/api/windturbine/status?startTs=${data.startTs}&endTs=${data.endTs}&pagesize=${data.pagesize}&pagenum=${data.pagenum}&windturbineId=${data.windturbineid}`,
+        method: "get",
     });
 };
+
 //恢复默认设置
 const returnSetting = (data) => {
     return request({
@@ -370,6 +419,14 @@ const costumeSetting = (data) => {
     })
 }
 
+//刷新报警信息
+const getAlarmSnap = (data) => {
+    return request({
+        baseURL:process.env.VUE_APP_SHARDINGURL,
+        url: `/alarm/snap?stationid=${data.stationid}&category1=${data.category1}&windturbineid=${data.windturbineid}&isopened=${data.isopened}`,
+        method: "get",
+    });
+};
 export default {
     login,
     getStation,
@@ -407,15 +464,22 @@ export default {
     alarmCountQuery,
     statusTime,
     getWindturbine,
+    getSvgData,
+    getStationInfoData,
+    getAllPvStationData,
+    getAllPvHistoryData,
+    getAllStationTab,
+    getAllStationSvgInfo,
     stationOverview,
     alarmFault,
     recommendation,
-    recommended,
-    statusChange,
     getStationModels,
     getSettings,
     updateSettings,
-    returnSetting,
     warningSetting,
     costumeSetting,
+    recommended,
+    statusChange,
+    returnSetting,
+    getAlarmSnap,
 };

+ 46 - 50
src/components/BasicInformationDetail.vue

@@ -212,7 +212,7 @@
                 'text-align': 'center',
               }"
             >
-              <el-table-column prop="alertTime" label="时间" width="220">
+              <el-table-column prop="lastUpdateTime" label="时间" width="220">
               </el-table-column>
               <el-table-column prop="alertText" label="故障信息" width="280">
               </el-table-column>
@@ -316,7 +316,7 @@ export default {
       selectValue: "7",
       healthInfo: {},
       dataValues: {},
-      warning: ["-"],
+      warning: [],
       showData: [],
       partsName: "",
       modelData: {},
@@ -416,19 +416,15 @@ export default {
         });
     },
     async getWarning() {
-      await api.getWindturbineWarning({
-          pagenum: 1000,
-          pagesize: 1,
+      await api.getAlarmSnap({
+          stationid: this.windturbine.stationId,
+          category1: 'windturbine',
           windturbineid: this.windturbine.windturbineId,
-          starttime: dayjs(new Date(this.windturbine.ts).getTime()- 172800000).format('YYYY-MM-DD HH:mm:ss'),
-          endtime:  dayjs(new Date(this.windturbine.ts).getTime()).format('YYYY-MM-DD HH:mm:ss'),
+          isopened: 1,
         })
         .then((msg) => {
           if (msg.data) {
-            msg.data.records.forEach((item) => {
-                item.alertTime = dayjs(item.alertTime).format("MM-DD HH:mm:ss");
-              });
-            this.warning = msg.data.records;
+            this.warning = msg.data;
             // this.warningDeal() 
           }
         })
@@ -592,45 +588,45 @@ export default {
       // this.getWarning();
       // this.warningDeal()
     },
-    // sendCommand(msg, windturbine) {
-    //   let bd = BackgroundData.getInstance();
-    //   if (!bd.LoginUser) {
-    //     this.$notify({
-    //       title: "请登录",
-    //       message: "控制风机需要先登录!",
-    //       type: "warning",
-    //       position: "bottom-right",
-    //       offset: 60,
-    //       duration: 3000,
-    //     });
-    //     return;
-    //   }
-    //   let sendList = [];
-    //   this.windturbine.controlType = Number(msg.controlType);
-    //   sendList.push(this.windturbine);
-    //   if (sendList.length > 0) {
-    //     bd.checkout(sendList);
-    //     let pairs = {};
-    //     sendList.forEach((item) => {
-    //       let ct = {
-    //         windturbineId: item.windturbineId,
-    //         stationId: item.stationId,
-    //         projectId: item.projectId,
-    //         modelId: item.modelId,
-    //         controlType: item.controlType,
-    //         lockType: item.lockType,
-    //         userName: `system_${bd.LoginUser.name}`,
-    //         userId: 0,
-    //       };
-    //       pairs[ct.windturbineId] = ct;
-    //     });
-    //     api.windturbControl(pairs).then((res) => {
-    //       if (res) {
-    //         this.controlSuccess(res);
-    //       }
-    //     });
-    //   }
-    // },
+    sendCommand(msg, windturbine) {
+      let bd = BackgroundData.getInstance();
+      if (!bd.LoginUser) {
+        this.$notify({
+          title: "请登录",
+          message: "控制风机需要先登录!",
+          type: "warning",
+          position: "bottom-right",
+          offset: 60,
+          duration: 3000,
+        });
+        return;
+      }
+      let sendList = [];
+      this.windturbine.controlType = Number(msg.controlType);
+      sendList.push(this.windturbine);
+      if (sendList.length > 0) {
+        bd.checkout(sendList);
+        let pairs = {};
+        sendList.forEach((item) => {
+          let ct = {
+            windturbineId: item.windturbineId,
+            stationId: item.stationId,
+            projectId: item.projectId,
+            modelId: item.modelId,
+            controlType: item.controlType,
+            lockType: item.lockType,
+            userName: `system_${bd.LoginUser.name}`,
+            userId: 0,
+          };
+          pairs[ct.windturbineId] = ct;
+        });
+        api.windturbControl(pairs).then((res) => {
+          if (res) {
+            this.controlSuccess(res);
+          }
+        });
+      }
+    },
 
     sendLock(msg) {
       let bd = BackgroundData.getInstance();

Diferenças do arquivo suprimidas por serem muito extensas
+ 5931 - 0
src/components/BoosterStation/dwk.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 4945 - 0
src/components/BoosterStation/hzj.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 2845 - 0
src/components/BoosterStation/mch.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 9139 - 0
src/components/BoosterStation/mhs.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 5433 - 0
src/components/BoosterStation/nss.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 5305 - 0
src/components/BoosterStation/pl1.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 3618 - 0
src/components/BoosterStation/pl2.vue


+ 4 - 4
src/components/BoosterStation/previewPicture.vue

@@ -95,8 +95,8 @@ export default {
       imgIndex: 0,
       isChange: true,
       // 图片显示默认大小
-      width: '1823px',
-      height: '103vh',  
+      width: "1200px",
+      height: "800px",
       // 可缩小倍数,为空则可无限缩小
       minification: 3,
       // 可放大倍数 为空则可无限放大
@@ -642,7 +642,7 @@ export default {
 <style lang="less" scoped>
 .pop-up-main {
 		width: 100%;
-		height: calc(100vh - 12vh);
+		height: calc(100vh - 32vh);
 		overflow-y:hidden ;
 
 		.paln-box {
@@ -654,7 +654,7 @@ export default {
 				position: absolute;
 				// top: 75%;
 				left: 50%;
-				transform: translate(-50%, -8%);
+				transform: translate(-50%, -15%);
 
 				img,
 				.svg {

Diferenças do arquivo suprimidas por serem muito extensas
+ 4051 - 0
src/components/BoosterStation/qs.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 2503 - 0
src/components/BoosterStation/sbdl.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 4404 - 0
src/components/BoosterStation/sbq.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 12164 - 0
src/components/BoosterStation/xh.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 10412 - 0
src/components/BoosterStation/xs.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 1162 - 1165
src/components/allMatrices.vue


+ 444 - 267
src/components/control/controlAllArea.vue

@@ -32,12 +32,21 @@
           <div class="scoll"> -->
         <div class="matrix" v-if="showList.length > 0">
           <box-select node=".box" @selectList="selectList">
+            
+                <!-- v-if="showWh(showList[0])" -->
             <MatrixBlock
-              @choose-click="handleClick"
-              @on-click="handleDetails"
-              :dataList="showList"
+                v-if="showWh(showList[0])"
+                @choose-click="handleClick"
+                @on-click="handleDetails"
+                :dataList="showList"
             >
             </MatrixBlock>
+            <MatrixBlockPv
+                v-else
+              @on-click="handleDetialPv"
+              :dataList="showList"
+            >
+            </MatrixBlockPv>
           </box-select>
         </div>
         <!-- </div>
@@ -51,6 +60,8 @@
       @close="handleClose"
       :windturbine="currentWindturbine"
     ></WindturbineDetailPages>
+    <PvDetailPages v-model="dialogPvDia" @close="handleClose" :windturbine="currentWindturbinePv">
+    </PvDetailPages>
     <ParametersContrast
       :chooseList="chooseList"
       v-model="parametersDisplay"
@@ -60,7 +71,9 @@
 
 <script>
 import WindturbineDetailPages from "../WindturbineDetailPages.vue";
+import PvDetailPages from "components/PvDetailPages.vue";
 import MatrixBlock from "../matrixBlock.vue";
+import MatrixBlockPv from "../matrixBlockPv.vue";
 import EaxyMatrxBlock from "../eaxyMatrixBlock.vue";
 import BackgroundData from "utils/BackgroundData";
 import api from "api/index";
@@ -71,7 +84,9 @@ export default {
   name: "ProblemArea",
   components: {
     WindturbineDetailPages,
+    PvDetailPages,
     MatrixBlock,
+    MatrixBlockPv,
     boxSelect,
     ParametersContrast,
     EaxyMatrxBlock,
@@ -93,7 +108,9 @@ export default {
       chooseList: [],
       lockValues: [],
       currentWindturbine: {},
+      currentWindturbinePv: {},
       dialogVisible: false,
+      dialogPvDia: false,
       showSvg: false,
       parametersDisplay: false,
       windturbinelist: {},
@@ -144,128 +161,145 @@ export default {
   computed: {},
   created: function () {
     this.initData();
+    this.handleWindturbineChange();
     this.controls();
     this.getLocks();
-    this.handleWindturbineChange();
-    this.intervals = setInterval(this.handleWindturbineChange, 3000);
+    this.intervals = setInterval(() =>{
+        this.handleWindturbineChange
+    }, 3000);
   },
   methods: {
+    showWh(item) {
+        let show = false
+        if (item.stationId) {
+            show = true
+        }
+        return show
+    },
     selectList(val) {
       val.forEach((item) => {
         this.handleClick(this.windturbinelist[item.id]);
       });
     },
     controls() {
-      this.options = [
-        {
-          value: "0",
-          label: "问题设备",
-        },
-        {
-          value: "1",
-          label: "故障",
-        },
-        {
-          value: "2",
-          label: "维护",
-        },
-        {
-          value: "3",
-          label: "离线",
-        },
-        {
-          value: "4",
-          label: "挂牌",
-        },
-      ];
-      let stationList = this.$store.state.stationList;
-      stationList.forEach((item, index) => {
-        let obj = {};
-        obj.value = String(index + 6);
-        obj.label = item.name;
-        obj.stationId = item.code || item.id;
-        this.options.push(obj);
-      });
-      let json = this.$store.state.windturbinelist;
-      this.dataList = [];
-      const showList = [];
-      let arr = Object.keys(json).sort();
-      for (let id of arr) {
-        let val = json[id];
-        this.chooseList.forEach((item) => {
-          if (item.windturbineId === val.windturbineId) {
-            val.active = true;
-          }
-        });
-        this.dataList.push(val);
-        switch (Number(this.selectValue)) {
-          case 0:
-            if (
-              val.status === 5 ||
-              val.status === 6 ||
-              val.status === 7 ||
-              val.lockValue > 0
-            ) {
-              showList.push(val);
-            }
-            break;
-          case 1:
-            val.status === 5 ? showList.push(val) : "";
-            break;
-          case 2:
-            val.status === 6 ? showList.push(val) : "";
-            break;
-          case 3:
-            val.status === 7 ? showList.push(val) : "";
-            break;
-          case 4:
-            val.lockValue > 0 ? showList.push(val) : "";
-            break;
-          default:
-            if (
-              val.stationId ===
-              this.options.filter((ops) => ops?.value === this.selectValue)[0]
-                .stationId
-            ) {
-              showList.push(val);
+        this.options = [
+            {
+            value: "0",
+            label: "问题设备",
+            },
+            {
+            value: "1",
+            label: "故障",
+            },
+            {
+            value: "2",
+            label: "维护",
+            },
+            {
+            value: "3",
+            label: "离线",
+            },
+            {
+            value: "4",
+            label: "挂牌",
+            },
+        ];
+        let stationList = this.$store.state.stationList;
+        stationList.forEach((item, index) => {
+            if (item.id.indexOf("FDC") != -1 || item.id.indexOf("GDC") != -1) {
+                let obj = {};
+                obj.value = String(index + 6);
+                obj.label = item.name;
+                obj.stationId = item.code || item.id;
+                this.options.push(obj);
             }
-            break;
-        }
-      }
-      let checkoutList = BackgroundData.getInstance().checkouts;
-      checkoutList.forEach((item) => {
-        let showIndex = null;
-        showList.forEach((param, index) => {
-          if (item.windturbineId === param.windturbineId) {
-            showIndex = index;
-          }
         });
-        showList.splice(showIndex, 1);
-      });
-      showList.sort((a,b)=>{
-        let aSubString = '0', bSubString = '0'
-        let aStation = '1', bStation = '2'
-        if(a.windturbineId && b.windturbineId){
-          aSubString = a.windturbineId.substring(a.windturbineId.lastIndexOf('_')+1)
-          bSubString = b.windturbineId.substring(b.windturbineId.lastIndexOf('_')+1)
+        // let json = this.$store.state.windturbinelist;
+        let wswind = JSON.parse(window.sessionStorage.getItem('windSbq'))
+        let pv = JSON.parse(window.sessionStorage.getItem('pvSbq'))
+        let json = {}
+        if (wswind && pv) {
+            json = {...wswind, ...pv}
+            this.dataList = [];
+            const showList = [];
+            let arr = Object.keys(json).sort();
+            for (let id of arr) {
+                let val = json[id];
+                this.chooseList.forEach((item) => {
+                if (item.windturbineId === val.windturbineId) {
+                    val.active = true;
+                }
+                });
+                this.dataList.push(val);
+                switch (Number(this.selectValue)) {
+                case 0:
+                    if (
+                    val.status === 5 ||
+                    val.status === 6 ||
+                    val.status === 7 ||
+                    val.lockValue > 0
+                    ) {
+                    showList.push(val);
+                    }
+                    break;
+                case 1:
+                    val.status === 5 ? showList.push(val) : "";
+                    break;
+                case 2:
+                    val.status === 6 ? showList.push(val) : "";
+                    break;
+                case 3:
+                    val.status === 7 ? showList.push(val) : "";
+                    break;
+                case 4:
+                    val.lockValue > 0 ? showList.push(val) : "";
+                    break;
+                default:
+                    if (
+                    val.stationId ===
+                    this.options.filter((ops) => ops?.value === this.selectValue)[0]
+                        .stationId
+                    ) {
+                    showList.push(val);
+                    }
+                    break;
+                }
+            }
+            let checkoutList = BackgroundData.getInstance().checkouts;
+            checkoutList.forEach((item) => {
+                let showIndex = null;
+                showList.forEach((param, index) => {
+                if (item.windturbineId === param.windturbineId) {
+                    showIndex = index;
+                }
+                });
+                showList.splice(showIndex, 1);
+            });
+            showList.sort((a,b)=>{
+              let aSubString = '0', bSubString = '0'
+              let aStation = '1', bStation = '2'
+              if(a.windturbineId && b.windturbineId){
+                aSubString = a.windturbineId.substring(a.windturbineId.lastIndexOf('_')+1)
+                bSubString = b.windturbineId.substring(b.windturbineId.lastIndexOf('_')+1)
 
-          aStation = a.windturbineId.substring(0, a.windturbineId.lastIndexOf('_'))
-          bStation = b.windturbineId.substring(0, b.windturbineId.lastIndexOf('_'))
+                aStation = a.windturbineId.substring(0, a.windturbineId.lastIndexOf('_'))
+                bStation = b.windturbineId.substring(0, b.windturbineId.lastIndexOf('_'))
 
-        }else if(a.id && b.id){
-          aSubString = a.id.substring(a.id.lastIndexOf('_')+1)
-          bSubString = b.id.substring(b.id.lastIndexOf('_')+1)
+              }else if(a.id && b.id){
+                aSubString = a.id.substring(a.id.lastIndexOf('_')+1)
+                bSubString = b.id.substring(b.id.lastIndexOf('_')+1)
 
-          aStation = a.id.substring(0, a.id.lastIndexOf('_'))
-          bStation = b.id.substring(0, b.id.lastIndexOf('_'))
-        }
-        if(aStation === bStation){
-          return parseInt(aSubString) - parseInt(bSubString)
-        }else{
-          return 0
+                aStation = a.id.substring(0, a.id.lastIndexOf('_'))
+                bStation = b.id.substring(0, b.id.lastIndexOf('_'))
+              }
+              if(aStation === bStation){
+                return parseInt(aSubString) - parseInt(bSubString)
+              }else{
+                return 0
+              }
+            })
+            this.showList = showList
         }
-      })
-      this.showList = showList
     },
     getLocks() {
       api.getCustomerLock().then((res) => {
@@ -275,8 +309,97 @@ export default {
       });
     },
     initData: function () {
+        let mb = MessageBridge.getInstance();
+        let vss = [
+            { key: "/topic/voice-control", action: this.windturbineMessage },
+        ];
+        mb.register(vss);
+    },
+    windturbineMessage(msg) {
+      if (this.$store.state.current === 2) {
+        let arr = [];
+        if (msg === "CLOSE") {
+          arr.push(msg);
+        } else {
+          arr = msg.split("-");
+        }
+        this.dialogVisible = false;
+        this.showSvg = false;
+        this.svgWeb = "";
+        if (arr[0] === "OPEN_FJ") {
+          this.currentWindturbine = this.windturbinelist[arr[1]];
+          this.dialogVisible = true;
+        } else if (arr[0] === "CLOSE") {
+          this.dialogVisible = false;
+        }  else if (
+          arr[0] === "CONTROL_START" ||
+          arr[0] === "CONTROL_STOP" ||
+          arr[0] === "CONTROL_MAINTAIN"
+        ) {
+          let windControlList = [];
+          let mss = {};
+          arr.forEach((item) => {
+            if (
+              item ===
+              (this.windturbinelist[item]
+                ? this.windturbinelist[item].windturbineId
+                : "")
+            ) {
+              switch (arr[0]) {
+                case "CONTROL_START":
+                  this.windturbinelist[item].controlType = "1";
+                  break;
+                case "CONTROL_STOP":
+                  this.windturbinelist[item].controlType = "2";
+                  break;
+                case "CONTROL_MAINTAIN":
+                  this.windturbinelist[item].controlType = "6";
+                  break;
+                case "CONTROL_UNMAINTAIN":
+                  this.windturbinelist[item].controlType = "8";
+                  break;
+              }
+              windControlList.push(this.windturbinelist[item]);
+            }
+          });
+          mss.type = "send";
+          this.sendCommand(mss, windControlList);
+        } else if (
+          arr[0] === "CONTROL_LOCK_OVERHAUL" ||
+          arr[0] === "CONTROL_LOCK_MAINTAIN" ||
+          arr[0] === "CONTROL_LOCK_LNVOLVED_OVERHAUL" ||
+          arr[0] === "CONTROL_LOCK_LNVOLVED_MAINTAIN" ||
+          arr[0] === "CONTROL_LOCK_LNVOLVED_PG" ||
+          arr[0] === "CONTROL_LOCK_LNVOLVED_WEATHER" ||
+          arr[0] === "CONTROL_UNLOCK"
+        ) {
+          let windturbine = this.windturbinelist[arr[1]];
+          switch (arr[0]) {
+            case "CONTROL_LOCK_OVERHAUL":
+              this.sendLock({ value: "CheckLock" }, windturbine);
+              break;
+            case "CONTROL_LOCK_MAINTAIN":
+              this.sendLock({ value: "FaultLock" }, windturbine);
+              break;
+            case "CONTROL_LOCK_LNVOLVED_OVERHAUL":
+              this.sendLock({ value: "StationCheckLock" }, windturbine);
+              break;
+            case "CONTROL_LOCK_LNVOLVED_MAINTAIN":
+              this.sendLock({ value: "StationFaulLock" }, windturbine);
+              break;
+            case "CONTROL_LOCK_LNVOLVED_PG":
+              this.sendLock({ value: "StationPowerLineLock" }, windturbine);
+              break;
+            case "CONTROL_LOCK_LNVOLVED_WEATHER":
+              this.sendLock({ value: "StationWeatherLock" }, windturbine);
+              break;
+            case "CONTROL_UNLOCK":
+              this.sendLock({ value: "UnLock" }, windturbine);
+              break;
+          }
+        }
+      }
     },
-    
     /* 右键菜单 */
     contextmenu() {
       const remote = require("electron").remote;
@@ -290,12 +413,6 @@ export default {
         this.selectValue === "4"
       ) {
         menuTemplate = [
-          // {
-          //     label: "标注",
-          //     click() {
-          //         that.sendLock({ type: "marking" });
-          //     },
-          // },
           {
             label: "挂牌",
             submenu: [
@@ -352,36 +469,36 @@ export default {
         ];
       } else {
         menuTemplate = [
-          // {
-          //   label: "启动",
-          //   click() {
-          //     that.sendCommand({ controlType: "1", deviceType: "Manual" });
-          //   },
-          // },
-          // {
-          //   label: "停机",
-          //   click() {
-          //     that.sendCommand({ controlType: "2", deviceType: "Manual" });
-          //   },
-          // },
-          // {
-          //   label: "复位",
-          //   click() {
-          //     that.sendCommand({ controlType: "5", deviceType: "Manual" });
-          //   },
-          // },
-          // {
-          //   label: "维护",
-          //   click() {
-          //     that.sendCommand({ controlType: "6", deviceType: "Manual" });
-          //   },
-          // },
-          // {
-          //   label: "取消维护",
-          //   click() {
-          //     that.sendCommand({ controlType: "8", deviceType: "Manual" });
-          //   },
-          // },
+          {
+            label: "启动",
+            click() {
+              that.sendCommand({ controlType: "1", deviceType: "Manual" });
+            },
+          },
+          {
+            label: "停机",
+            click() {
+              that.sendCommand({ controlType: "2", deviceType: "Manual" });
+            },
+          },
+          {
+            label: "复位",
+            click() {
+              that.sendCommand({ controlType: "5", deviceType: "Manual" });
+            },
+          },
+          {
+            label: "维护",
+            click() {
+              that.sendCommand({ controlType: "6", deviceType: "Manual" });
+            },
+          },
+          {
+            label: "取消维护",
+            click() {
+              that.sendCommand({ controlType: "8", deviceType: "Manual" });
+            },
+          },
           {
             label: "挂牌",
             submenu: [
@@ -443,55 +560,55 @@ export default {
       menu.popup(remote.getCurrentWindow());
     },
 
-    // sendCommand(msg, windturbine) {
-    //   let bd = BackgroundData.getInstance();
-    //   if (!bd.LoginUser) {
-    //     this.$notify({
-    //       title: "请登录",
-    //       message: "控制风机需要先登录!",
-    //       type: "warning",
-    //       position: "bottom-right",
-    //       offset: 60,
-    //       duration: 3000,
-    //     });
-    //     return;
-    //   }
-    //   let sendList = [];
-    //   if (windturbine) {
-    //     sendList = windturbine;
-    //   } else {
-    //     this.chooseList.forEach((item) => {
-    //       item.controlType = Number(msg.controlType);
-    //     });
-    //     sendList = this.chooseList;
-    //   }
+    sendCommand(msg, windturbine) {
+      let bd = BackgroundData.getInstance();
+      if (!bd.LoginUser) {
+        this.$notify({
+          title: "请登录",
+          message: "控制风机需要先登录!",
+          type: "warning",
+          position: "bottom-right",
+          offset: 60,
+          duration: 3000,
+        });
+        return;
+      }
+      let sendList = [];
+      if (windturbine) {
+        sendList = windturbine;
+      } else {
+        this.chooseList.forEach((item) => {
+          item.controlType = Number(msg.controlType);
+        });
+        sendList = this.chooseList;
+      }
 
-    //   if (sendList.length > 0) {
-    //     bd.checkout(sendList);
-    //     this.chooseList = [];
-    //     let pairs = {};
-    //     sendList.forEach((item) => {
-    //       let ct = {
-    //         windturbineId: item.windturbineId,
-    //         stationId: item.stationId,
-    //         projectId: item.projectId,
-    //         modelId: item.modelId,
-    //         controlType: item.controlType,
-    //         lockType: item.lockType,
-    //         userName: `system_${bd.LoginUser.name}`,
-    //         userId: 0,
-    //         auto: false,
-    //         deviceType: msg.deviceType,
-    //       };
-    //       pairs[ct.windturbineId] = ct;
-    //     });
-    //     api.windturbControl(pairs).then((res) => {
-    //       if (res) {
-    //         this.controlSuccess(res);
-    //       }
-    //     });
-    //   }
-    // },
+      if (sendList.length > 0) {
+        bd.checkout(sendList);
+        this.chooseList = [];
+        let pairs = {};
+        sendList.forEach((item) => {
+          let ct = {
+            windturbineId: item.windturbineId,
+            stationId: item.stationId,
+            projectId: item.projectId,
+            modelId: item.modelId,
+            controlType: item.controlType,
+            lockType: item.lockType,
+            userName: `system_${bd.LoginUser.name}`,
+            userId: 0,
+            auto: false,
+            deviceType: msg.deviceType,
+          };
+          pairs[ct.windturbineId] = ct;
+        });
+        api.windturbControl(pairs).then((res) => {
+          if (res) {
+            this.controlSuccess(res);
+          }
+        });
+      }
+    },
     sendLock(msg, windturbine) {
       let bd = BackgroundData.getInstance();
       if (!bd.LoginUser) {
@@ -646,12 +763,22 @@ export default {
             val.lockValue > 0 ? showList.push(val) : "";
             break;
           default:
-            if (
-              val.stationId ===
-              this.options.filter((ops) => ops?.value === this.selectValue)[0]
-                .stationId
-            ) {
-              showList.push(val);
+            if (Number(this.selectValue) < 12) {
+                if (
+                  val.stationId ===
+                  this.options.filter((ops) => ops?.value === this.selectValue)[0]
+                    .stationId
+                ) {
+                  showList.push(val);
+                }
+            } else {
+                if (
+                  val.station ===
+                  this.options.filter((ops) => ops?.value === this.selectValue)[0]
+                    .stationId
+                ) {
+                  showList.push(val);
+                }
             }
             break;
         }
@@ -685,6 +812,10 @@ export default {
       this.dialogVisible = true;
       this.currentWindturbine = itm;
     },
+    handleDetialPv(item) {
+        this.dialogPvDia = true;
+        this.currentWindturbinePv = item;
+    },
     handleClose() {
       this.dialogVisible = false;
       this.showSvg = false;
@@ -696,75 +827,121 @@ export default {
       }
     },
     handleWindturbineChange() {
-      api.getWindturbine().then((res) => {
-        if (res.data) {
-          this.windturbinelist = res.data;
-          this.$store.commit("windturbinelist", res.data);
-          this.dataList = [];
-          const showList = [];
-          let arr = Object.keys(res.data).sort();
-          let newArr = [];
-          for (let id of arr) {
-            let val = res.data[id];
-            newArr.push(val);
-            this.chooseList.forEach((item) => {
-              if (item.windturbineId === val.windturbineId) {
-                val.active = true;
-              }
-            });
-            if (val.lockValue === 9) {
-              val.lockValues = this.lockValues.filter(
-                (item) => val.windturbineId === item.windturbineID
-              )[0]?.value;
-            }
-            this.dataList.push(val);
-            switch (Number(this.selectValue)) {
-              case 0:
-                if (
-                  val.status === 5 ||
-                  val.status === 6 ||
-                  val.status === 7 ||
-                  val.lockValue > 0
-                ) {
-                  showList.push(val);
+        let ws = MessageBridge.getInstance();
+        let wind = [
+            { key: "/topic/windturbine", action: this.getWindMsg },
+        ];
+        let guangfu = [
+            { key: "/topic/pv", action: this.getPvMsg },
+        ];
+        ws.register(wind);
+        ws.register(guangfu);
+    },
+    getPvMsg(msg) {
+        window.sessionStorage.removeItem('pvSbq')
+        // let jsonMsg = JSON.parse(msg)
+        window.sessionStorage.setItem('pvSbq', msg)
+        this.changeData()
+    },
+    getWindMsg(msg) {
+        window.sessionStorage.removeItem('windSbq')
+        // let jsonMsg = JSON.parse(msg)
+        window.sessionStorage.setItem('windSbq', msg)
+        this.changeData()
+    },
+    changeData() {
+        let wswind = JSON.parse(window.sessionStorage.getItem('windSbq'))
+        let pv = JSON.parse(window.sessionStorage.getItem('pvSbq'))
+        let msg = {}
+        if (wswind && pv) {
+            msg = {...wswind, ...pv}
+            this.windturbinelist = msg;
+            this.$store.commit("windturbinelist", msg);
+            this.dataList = [];
+            const showList = [];
+            let arr = Object.keys(msg).sort();
+            let newArr = [];
+            for (let id of arr) {
+                let val = msg[id];
+                newArr.push(val);
+                this.chooseList.forEach((item) => {
+                if (item.windturbineId === val.windturbineId) {
+                    val.active = true;
                 }
-                break;
-              case 1:
-                val.status === 5 ? showList.push(val) : "";
-                break;
-              case 2:
-                val.status === 6 ? showList.push(val) : "";
-                break;
-              case 3:
-                val.status === 7 ? showList.push(val) : "";
-                break;
-              case 4:
-                val.lockValue > 0 ? showList.push(val) : "";
-                break;
+                });
+                if (val.lockValue === 9) {
+                val.lockValues = this.lockValues.filter(
+                    (item) => val.windturbineId === item.windturbineID
+                )[0]?.value;
+                }
+                this.dataList.push(val);
+                switch (Number(this.selectValue)) {
+                case 0:
+                    if (
+                    val.status === 5 ||
+                    val.status === 6 ||
+                    val.status === 7 ||
+                    val.lockValue > 0
+                    ) {
+                    showList.push(val);
+                    }
+                    break;
+                case 1:
+                    val.status === 5 ? showList.push(val) : "";
+                    break;
+                case 2:
+                    val.status === 6 ? showList.push(val) : "";
+                    break;
+                case 3:
+                    val.status === 7 ? showList.push(val) : "";
+                    break;
+                case 4:
+                    val.lockValue > 0 ? showList.push(val) : "";
+                    break;
 
-              default:
-                if (
-                  val.stationId ===
-                  this.options.filter(
-                    (ops) => ops?.value === this.selectValue
-                  )[0].stationId
-                ) {
-                  showList.push(val);
+                default:
+                    // if (
+                    // val.stationId ===
+                    // this.options.filter(
+                    //     (ops) => ops?.value === this.selectValue
+                    // )[0].stationId
+                    // ) {
+                    // this.showList.push(val);
+                    // }
+                    if (Number(this.selectValue) < 12) {
+                        if (
+                        val.stationId ===
+                        this.options.filter((ops) => ops?.value === this.selectValue)[0]
+                            .stationId
+                        ) {
+                        showList.push(val);
+                        }
+                    } else {
+                        if (
+                        val.station ===
+                        this.options.filter((ops) => ops?.value === this.selectValue)[0]
+                            .stationId
+                        ) {
+                        showList.push(val);
+                        }
+                    }
+                    break;
                 }
-                break;
             }
-          }
-          let checkoutList = BackgroundData.getInstance().checkouts;
-          checkoutList.forEach((item) => {
-            let showIndex = null;
-            showList.forEach((param, index) => {
-              if (item.windturbineId === param.windturbineId) {
-                showIndex = index;
-              }
-            });
-            showList.splice(showIndex, 1);
-          });
-          showList.sort((a,b)=>{
+            // console.log('showList', this.showList)
+            let checkoutList = BackgroundData.getInstance().checkouts;
+            if (checkoutList.length>0) {
+                checkoutList.forEach((item) => {
+                    let showIndex = null;
+                    showList.forEach((param, index) => {
+                    if (item.windturbineId === param.windturbineId) {
+                        showIndex = index;
+                    }
+                    });
+                    showList.splice(showIndex, 1);
+                });
+            }
+            showList.sort((a,b)=>{
               let aSubString = '0', bSubString = '0'
               let aStation = '1', bStation = '2'
               if(a.windturbineId && b.windturbineId){
@@ -788,9 +965,9 @@ export default {
               }
             })
             this.showList = showList
+            
         }
-      });
-    },
+    }
   },
   unmounted() {
     clearInterval(this.intervals);

+ 1 - 6
src/components/control/parametersContrast.vue

@@ -155,11 +155,7 @@ export default {
       });
       this.titleList.forEach((item, index) => {
         if (index !== 0) {
-          arr.forEach(val =>{
-            if(val.name === item.name){
-              val.type = true
-            }
-          })
+          arr.filter((val) => val.name === item.name)[0].type = true;
         }
       });
       arr.map((item) => {
@@ -216,7 +212,6 @@ export default {
       this.arrList = [];
       // clearInterval(this.intervals);
       // this.intervals = null;
-      this.$emit('par-closed');
     },
     handleClick(value) {
       this.dataList = [];

Diferenças do arquivo suprimidas por serem muito extensas
+ 700 - 256
src/components/focus/syzDetails.vue


+ 18 - 4
src/components/matrixBlock.vue

@@ -22,10 +22,10 @@
         <div
           :class="item.active ? 'left-' + item.status : 'unleft-' + item.status"
         >
-          <!-- <div>{{ item.id.slice(0, 2) }}</div>
-          <div>{{ item.id.slice(5) }}</div> -->
-          <div>{{ item.id.slice(0, 2) }}</div>
-        <div>{{ item.code }}</div>
+          <div>{{ getName(item, 'top') }}</div>
+          <div>{{ getName(item, 'bot') }}</div>
+          <!-- <div>{{ item.windturbineId.slice(0, 2) }}</div>
+        <div>{{ item.code }}</div> -->
         </div>
         <div
           :class="
@@ -131,6 +131,20 @@ export default {
   },
   updated() {},
   methods: {
+    getName(item, type) {
+        // debugger
+        let name = ''
+        if (type === 'top') {
+            if (item.windturbineId) {
+                name = item.windturbineId.slice(0, 2)
+            }
+        } else {
+            if (item.windturbineId) {
+                name = item.windturbineId.slice(item.windturbineId.indexOf('_')+1)
+            }
+        }
+        return name
+    },
     handleDeal(val) {
       let data = dayjs(val).format("YYYY-MM-DD HH:mm:ss");
       this.showVlaues = this.timeFn(data);

+ 926 - 0
src/components/matrixBlockPv.vue

@@ -0,0 +1,926 @@
+<template>
+  <div>
+    <div
+      class="box"
+      style="display: flex; flex-direction: row; flex-wrap: wrap"
+    >
+    <!-- @click="onSelectHandler(item)" -->
+      <div
+        :class="
+          item.active
+            ? 'box-' + item.status
+            : item.flashing && item.status === 5
+            ? 'unbox-flashing-' + item.status
+            : 'unbox-' + item.status
+        "
+        :id="item.windturbineId"
+        v-for="(item, index) in dataList"
+        :key="index"
+        
+        @dblclick="sendMsg(item)"
+        style="margin-right: 8px"
+      >
+        <div
+          :class="item.active ? 'left-' + item.status : 'unleft-' + item.status"
+        >
+          <div>{{ getName(item, 'top') }}</div>
+          <div>{{ getName(item, 'bot') }}</div>
+          <!-- <div>{{ item.windturbineId.slice(0, 2) }}</div>
+        <div>{{ item.code }}</div> -->
+        </div>
+        <div
+          :class="
+            item.active ? 'right-' + item.status : 'unright-' + item.status
+          "
+        >
+            <div class="rightrow">{{ item.i.toFixed(2) }} A</div>
+
+            <div class="rightrow">{{ item.u.toFixed(2) }} V</div>
+
+            <div class="rightrow">{{ item.p.toFixed(2) }} kw</div>
+        </div>
+        <div class="duration">
+          <el-popover
+            placement="bottom-start"
+            :width="200"
+            trigger="hover"
+            class="durationPopover"
+            :show-arrow="false"
+            @show="handleDeal(item.ts)"
+          >
+            <template #reference>
+              <img
+                :class="item.lockValue > 0 ? 'durationImgs' : 'durationImg'"
+                src="../assets/img/type/duration.png"
+                alt=""
+              />
+            </template>
+            <input
+              class="lock_inputs"
+              type="text"
+              placeholder=""
+              :value="showVlaues"
+              disabled
+            />
+          </el-popover>
+        </div>
+        <div class="locks" v-if="item.lockValue > 0">
+          <el-popover
+            placement="bottom-start"
+            :width="150"
+            trigger="hover"
+            class="popoverBack"
+            :show-arrow="false"
+          >
+            <template #reference>
+              <img class="lock" src="../assets/img/type/lock.png" alt="" />
+            </template>
+            <input
+              class="lock_input"
+              type="text"
+              placeholder=""
+              :value="
+                item.lockValue === 9 ? item.lockValues : options[item.lockValue]
+              "
+              disabled
+            />
+          </el-popover>
+        </div>
+        <div class="locks" v-if="item.reasonType">
+          <img
+            class="lock"
+            src="../assets/img/type/electricityRestrictions.png"
+            alt=""
+          />
+        </div>
+      </div>
+    </div>
+    <WindturbineDetailPages
+      v-model="dialogVisible"
+      :showSvg="showSvg"
+      @close="handleClose"
+      :windturbine="currentWindturbine"
+    ></WindturbineDetailPages>
+  </div>
+</template>
+<script>
+import WindturbineDetailPages from "./WindturbineDetailPages.vue";
+import api from "api/index";
+import dayjs from "dayjs";
+export default {
+  components: {
+    WindturbineDetailPages,
+  },
+  props: {
+    dataList: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    area: String,
+  },
+  mounted() {
+    // this.getWindturbineFdc();
+  },
+  updated() {},
+  methods: {
+    getName(item, type) {
+        let name = ''
+        if (item.id) {
+            if (type === 'top') {
+                name = item.id.slice(0, item.id.indexOf('_'))
+            } else {
+                name = item.id.slice(item.id.indexOf('_'))
+            }
+        }
+        return name
+    },
+    handleDeal(val) {
+      let data = dayjs(val).format("YYYY-MM-DD HH:mm:ss");
+      this.showVlaues = this.timeFn(data);
+      // return `该状态共持续:`
+    },
+
+    timeFn(d1) {
+      //di作为一个变量传进来
+      //如果时间格式是正确的,那下面这一步转化时间格式就可以不用了
+      var dateBegin = new Date(d1.replace(/-/g, "/")); //将-转化为/,使用new Date
+      var dateEnd = new Date(); //获取当前时间
+      var dateDiff = dateEnd.getTime() - dateBegin.getTime(); //时间差的毫秒数
+      var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000)); //计算出相差天数
+      var leave1 = dateDiff % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
+      var hours = Math.floor(leave1 / (3600 * 1000)); //计算出小时数
+      //计算相差分钟数
+      var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
+      var minutes = Math.floor(leave2 / (60 * 1000)); //计算相差分钟数
+      //计算相差秒数
+      var leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
+      var seconds = Math.round(leave3 / 1000);
+      return `持续时长:${dayDiff !== 0 ? dayDiff + "天" : ""}${
+        hours !== 0 ? hours + "小时" : ""
+      }${minutes !== 0 ? minutes + "分钟" : ""}${
+        seconds !== 0 ? seconds + "秒" : ""
+      }`;
+    },
+    // getWindturbineFdc() {
+    //   api.getWindturbineFdc().then((res) => {
+    //     this.station = res.data;
+    //   });
+    // },
+    onSelectHandler(values) {
+      if (this.area === "problem") {
+        this.$emit("problem-click", values);
+      } else {
+        this.$emit("choose-click", values);
+      }
+    },
+    sendMsg: function (itm) {
+      // this.dialogVisible = true;
+      this.$emit("on-click", itm);
+      // this.currentWindturbine = itm;
+    },
+    handleClose() {
+      this.dialogVisible = false;
+      this.showSvg = false;
+    },
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      showSvg: false,
+      currentWindturbine: {},
+      showVlaues: "",
+      // station: [],
+      options: {
+        8: "检修",
+        7: "故障维修",
+        2: "场内受累检修",
+        3: "场内受累故障",
+        4: "场外受累电网",
+        5: "场外受累天气",
+      },
+    };
+  },
+};
+</script>
+<style scoped>
+.lock {
+  width: 10px;
+  height: 10px;
+  position: relative;
+  right: 2px;
+  top: -15px;
+}
+
+.durationImg {
+  width: 15px;
+  height: 15px;
+  position: relative;
+  right: 5px;
+  top: -15px;
+}
+.durationImgs {
+  width: 15px;
+  height: 15px;
+  position: relative;
+  right: 5px;
+  top: -15px;
+}
+.lock-on {
+  width: 0px;
+  height: 0px;
+  opacity: 0;
+}
+
+.locks:hover .lock-on {
+  position: fixed;
+  display: flex;
+  align-items: center;
+  width: 80px;
+  height: 30px;
+  border: 1px solid #999999;
+  background-color: #999999;
+  opacity: 1;
+  color: #ffffff;
+  z-index: 999;
+}
+
+.duration {
+  width: 15px;
+  height: 15px;
+  position: relative;
+  visibility: hidden;
+}
+.unbox-1:hover .duration {
+  visibility: visible;
+}
+.unbox-2:hover .duration {
+  visibility: visible;
+}
+.unbox-3:hover .duration {
+  visibility: visible;
+}
+.unbox-4:hover .duration {
+  visibility: visible;
+}
+.unbox-5:hover .duration {
+  visibility: visible;
+}
+.unbox-6:hover .duration {
+  visibility: visible;
+}
+.unbox-7:hover .duration {
+  visibility: visible;
+}
+
+.lock_input {
+  width: 140px;
+  background-color: #292929;
+  height: 40px;
+  color: #ffffff;
+}
+.lock_inputs {
+  width: 200px;
+  background-color: #292929;
+  height: 40px;
+  color: #ffffff;
+}
+.box-0 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(05, 187, 76, 1);
+  background-color: rgba(255, 255, 255, 0.05);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #09e45e;
+}
+
+.unbox-0 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(05, 187, 76, 1);
+  background-color: rgba(05, 187, 76, 0.2);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+}
+
+.left-0 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(05, 187, 76, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-0 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(05, 187, 76, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-0 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(05, 187, 76, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-0 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(05, 187, 76, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.box-1 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(75, 85, 174, 1);
+  background-color: rgba(75, 85, 174, 0.05);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #6876f2;
+}
+
+.unbox-1 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(75, 85, 174, 1);
+  background-color: rgba(75, 85, 174, 0.2);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+}
+
+.left-1 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(75, 85, 174, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-1 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(75, 85, 174, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-1 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(75, 85, 174, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-1 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(75, 85, 174, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.box-2, .box-4, .box-5 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(186, 50, 55, 1);
+  background-color: rgba(186, 50, 55, 0.05);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #ff1313;
+}
+
+.unbox-2, .unbox-4, .unbox-5 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(186, 50, 55, 1);
+  background-color: rgba(186, 50, 55, 0.2);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+}
+
+.left-2, .left-4, .left-5 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-2, .unleft-4, .unleft-5 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-2, .right-4, .right-5 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-2, .unright-4, .unright-5 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.box-3 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(225, 125, 36, 1);
+  background-color: rgba(225, 125, 36, 0.05);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #f28627;
+}
+
+.unbox-3 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(225, 125, 36, 1);
+  background-color: rgba(225, 125, 36, 0.2);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+}
+
+.left-3 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(225, 125, 36, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-3 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(225, 125, 36, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-3 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(225, 125, 36, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-3 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(225, 125, 36, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.box-4 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(75, 85, 174, 1);
+  background-color: rgba(75, 85, 174, 0.05);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #6876f2;
+}
+
+.unbox-4 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(75, 85, 174, 1);
+  background-color: rgba(75, 85, 174, 0.2);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+}
+
+.left-4 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(75, 85, 174, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-4 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(75, 85, 174, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-4 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(75, 85, 174, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-4 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(75, 85, 174, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.box-5 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(186, 50, 55, 1);
+  background-color: rgba(186, 50, 55, 0.05);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #ff1313;
+}
+
+@keyframes fade {
+  from {
+    opacity: 1;
+  }
+  50% {
+    opacity: 0.6;
+  }
+  to {
+    opacity: 1;
+  }
+}
+@-webkit-keyframes fade {
+  from {
+    opacity: 1;
+  }
+  50% {
+    opacity: 0.6;
+  }
+  to {
+    opacity: 1;
+  }
+}
+
+.unbox-flashing-5 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(186, 50, 55, 1);
+  background-color: rgba(186, 50, 55, 0.2);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+  animation: fade 1600ms infinite;
+  -webkit-animation: fade 1600ms infinite;
+}
+
+.unbox-5 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(186, 50, 55, 1);
+  background-color: rgba(186, 50, 55, 0.2);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+}
+
+.left-5 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-5 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-5 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-5 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(186, 50, 55, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.box-6 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(225, 125, 36, 1);
+  background-color: rgba(225, 125, 36, 0.05);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #f28627;
+}
+
+.unbox-6 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(225, 125, 36, 1);
+  background-color: rgba(225, 125, 36, 0.2);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+}
+
+.left-6 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(225, 125, 36, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-6 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(225, 125, 36, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-6 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(225, 125, 36, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-6 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(225, 125, 36, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.box-7 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(96, 103, 105, 1);
+  background-color: rgba(96, 103, 105, 0.05);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+  box-shadow: 0px 0px 6px #ffffff;
+}
+
+.unbox-7 {
+  width: 135px;
+  height: 50px;
+  color: #ffffff;
+  border: 1px solid rgba(96, 103, 105, 1);
+  background-color: rgba(96, 103, 105, 0.2);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  margin-right: 5px;
+  margin-top: 10px;
+}
+
+.left-7 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(96, 103, 105, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.unleft-7 {
+  width: 35%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(96, 103, 105, 1);
+  font-weight: 600;
+  line-height: 20px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.right-7 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(96, 103, 105, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.unright-7 {
+  width: 69%;
+  height: 100%;
+  font-size: 12px;
+  color: rgba(96, 103, 105, 1);
+  line-height: 15px;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+</style>

Diferenças do arquivo suprimidas por serem muito extensas
+ 611 - 612
src/components/modeControl/modeControl.vue


+ 13 - 5
src/components/search/action.vue

@@ -135,7 +135,7 @@ export default {
   mounted() {},
   data() {
     return {
-      currentPage: 10,
+      currentPage: 20,
       filterText: "",
       pageIndex: 1,
       station: [],
@@ -185,14 +185,23 @@ export default {
     // },
     dataDeal() {
       let stationList = this.$store.state.stationList;
-      this.showData[0].children = [];
+      this.showData[0].children = [
+        // {
+        //   id : 1,
+        // code : "风机全部",
+        // stationId : "WIND_ALL",
+        // children : [],
+        // }
+      ];
       stationList.forEach((item, index) => {
-        let obj = {};
+        if (item.type === 1) {
+          let obj = {};
         obj.id = index + 1;
         obj.code = item.name;
         obj.stationId = item.id;
         obj.children = [];
         this.showData[0].children.push(obj);
+        }
       });
       this.datas = this.$store.state.windturbinelist
         ? this.$store.state.windturbinelist
@@ -204,7 +213,6 @@ export default {
           .filter((val) => val.stationId === item.stationId)[0]
           ?.children.push(item);
       }
-      console.log(this.showData);
     },
     handleChange(value) {
       this.chooseStation = value;
@@ -256,7 +264,7 @@ export default {
             ? this.chooseStation.stationId
             : "",
           userName: "",
-          windturbineId: this.chooseStation.id
+          windturbineId: String(this.chooseStation?.id)?.length<2
             ? ""
             : this.chooseStation.stationId
             ? this.chooseStation.windturbineId

+ 30 - 18
src/components/search/fault.vue

@@ -14,6 +14,7 @@
     </template>
     <div class="body">
       <div class="searchTitle">
+        
         <div class="search">
           <div class="date">风场:</div>
           <el-select
@@ -32,18 +33,6 @@
           </el-select>
         </div>
         <div class="search">
-          <div class="date">风机名称:</div>
-          <el-select class="inputs" v-model="selectWind" @change="handleChange" placeholder="请选择" clearable>
-            <el-option
-              v-for="item in windturbinelist"
-              :key="item.code"
-              :label="item.code"
-              :value="item.code"
-            >
-            </el-option>
-          </el-select>
-        </div>
-        <div class="search">
           <div class="date">日期:</div>
           <el-date-picker
             class="pickers"
@@ -57,6 +46,18 @@
           </el-date-picker>
         </div>
         <div class="search">
+          <div class="date">风机名称:</div>
+          <el-select class="inputs" v-model="selectWind" @change="handleChange" placeholder="请选择" clearable>
+            <el-option
+              v-for="item in windturbinelist"
+              :key="item.code"
+              :label="item.code"
+              :value="item.code"
+            >
+            </el-option>
+          </el-select>
+        </div>
+        <div class="search">
           <div class="date">关键字:</div>
           <el-input
             class="inputs"
@@ -126,7 +127,7 @@
           <el-table-column label="状态" width="120" align="center">
                 <template #default="scope">
                   <span>
-                    {{ scope.row?.messageType  === 1 ? "触发" : "已解除" }}
+                    {{ scope.row.messageType  === 1 ? "触发" : "已解除" }}
                   </span>
                 </template>
               </el-table-column>
@@ -232,10 +233,21 @@ export default {
     },
     opened() {
       let date = new Date();
-      this.timeValue[0] = date.getTime() - 28800000;
-      this.timeValue[1] = date.getTime() + 3600000;
-      let stationList = this.$store.state.stationList;
-      this.selectValue = stationList[0].id;
+      this.timeValue[0] = new Date(new Date().toLocaleDateString()).getTime() - 86400000;
+      this.timeValue[1] = new Date(new Date().toLocaleDateString()).getTime();
+      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();
@@ -248,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"),

+ 18 - 6
src/components/search/record.vue

@@ -10,14 +10,14 @@
         <div class="search">
           <div class="date">风场:</div>
           <el-select @change="listedChange(selectValue)" class="inputs" v-model="selectValue" placeholder="请选择">
-            <el-option v-for="item in stationList" :key="item.id" :label="item.name" :value="item.id">
+            <el-option v-for="item in stationList" :key="item.id" :label="item.name"  :value="item.id">
             </el-option>
           </el-select>
         </div>
         <div class="search">
           <div class="date">风机名称:</div>
           <el-select class="inputs" v-model="selectWind" @change="handleChange" placeholder="请选择" clearable>
-            <el-option v-for="item in windturbinelist" :key="item.code" :label="item.code" :value="item.code">
+            <el-option v-for="item in windturbinelist" :key="item.id" :label="item.id" :value="item.id">
             </el-option>
           </el-select>
         </div>
@@ -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);
@@ -142,7 +154,7 @@ export default {
           windturbine.push(wind);
         }
       }
-      this.selectWind = windturbine[0]?.code || "";
+      this.selectWind = windturbine[0]?.id || "";
       this.windturbineId = windturbine[0]?.windturbineId
       this.windturbinelist = windturbine;
     },
@@ -150,8 +162,8 @@ export default {
       api.recommended({
         pagesize: this.pagesize,
         pagenum: this.pagenum,
-        stationid: this.selectValue,
-        windturbineid: this.windturbineId || 'SG01_57',
+        stationid: this.selectValue === 'WIND_ALL' ? '' : this.selectValue,
+        windturbineid: this.selectWind,
       }).then(res => {
         if (res.data) {
           this.total = Number(res.data.totalPages)

+ 14 - 31
src/components/search/state.vue

@@ -17,7 +17,7 @@
         <div class="search">
           <div class="date">风机名称:</div>
           <el-select class="inputs" v-model="selectWind" @change="handleChange" placeholder="请选择">
-            <el-option v-for="item in windturbinelist" :key="item.code" :label="item.code" :value="item.code">
+            <el-option v-for="item in windturbinelist" :key="item.id" :label="item.id" :value="item.id">
             </el-option>
           </el-select>
         </div>
@@ -88,30 +88,6 @@ export default {
       pagenum: 1,
       total: 20,
       stateList: [
-      {
-            "ts": 1662385197000,
-            "status": "Standby",
-            "code": "MG01-03",
-            "statusName": "待机"
-        },
-        {
-            "ts": 1662385201000,
-            "status": "Standby",
-            "code": "MG01-03",
-            "statusName": "待机"
-        },
-        {
-            "ts": 1662386645000,
-            "status": "Start",
-            "code": "MG01-03",
-            "statusName": "启动"
-        },
-        {
-            "ts": 1662386690000,
-            "status": "OnPower",
-            "code": "MG01-03",
-            "statusName": "上电"
-        },
       ],
     };
   },
@@ -121,10 +97,17 @@ export default {
   mounted() { },
   methods: {
     opened() {
-      let date = new Date();
-      this.timeValue[0] = date.getTime() - 28800000;
-      this.timeValue[1] = date.getTime() + 3600000;
-      let stationList = this.$store.state.stationList;
+      // 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 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);
@@ -144,7 +127,7 @@ export default {
           windturbine.push(wind);
         }
       }
-      this.selectWind = windturbine[0]?.code || "";
+      this.selectWind = windturbine[0]?.id || "";
       this.windturbineId = windturbine[0]?.windturbineId
       this.windturbinelist = windturbine;
     },
@@ -154,7 +137,7 @@ export default {
         pagenum: this.pagenum,
         startTs: new Date(this.timeValue[0]).getTime(),
         endTs: new Date(this.timeValue[1]).getTime(),
-        windturbineid: this.windturbineId || 'MG01_03',
+        windturbineid: this.selectWind,
       }).then(res =>{
         if(res.data){
           this.total = Number(res.data.totalPages)

+ 21 - 8
src/components/search/status.vue

@@ -13,8 +13,9 @@
       </div>
     </template>
     <div class="body">
-        <div class="searchTitle">
-          <div class="search">
+      <div class="searchTitle">
+        
+        <div class="search">
           <div class="date">风场:</div>
           <el-select
             class="inputs"
@@ -143,9 +144,21 @@ export default {
   methods: {
     opened() {
       let date = new Date();
-      this.timeValue[0] = date.getTime() - (28800000 *3);
-      this.timeValue[1] = date.getTime();
-      let stationList = this.$store.state.stationList;
+      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 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()
@@ -153,9 +166,9 @@ export default {
     getData(){
       console.log(11111111);
       api.statusTime({
-        stationid: this.selectValue,
-        startTs: new Date(this.timeValue[0]).getTime(),
-        endTs: new Date(this.timeValue[1]).getTime(),
+        stationid: this.selectValue === 'WIND_ALL' ? '' : this.selectValue,
+        startTs: this.timeValue[0],
+        endTs: this.timeValue[1],
       }).then(res =>{
         res.data.forEach(item =>{
         for (const key in item) {

+ 113 - 42
src/components/search/warning.vue

@@ -1,5 +1,12 @@
 <template>
-  <el-dialog width="70%" @open="opened" @closed="closed" :fullscreen="true" :show-close="true" class="dialogs">
+  <el-dialog
+    width="70%"
+    @open="opened"
+    @closed="closed"
+    :fullscreen="true"
+    :show-close="true"
+    class="dialogs"
+  >
     <template #title>
       <div class="showTitles currentShowTitles">
         <div class="titles">预警查询</div>
@@ -7,22 +14,44 @@
     </template>
     <div class="body">
       <div class="searchTitle">
+        
         <div class="search">
           <div class="date">风场:</div>
-          <el-select @change="listedChange(selectValue)" class="inputs" v-model="selectValue" placeholder="请选择">
-            <el-option v-for="item in stationList" :key="item.id" :label="item.name" :value="item.id">
+          <el-select
+            @change="listedChange(selectValue)"
+            class="inputs"
+            v-model="selectValue"
+            placeholder="请选择"
+          >
+            <el-option
+              v-for="item in stationList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
             </el-option>
           </el-select>
         </div>
         <div class="search">
           <div class="date">日期:</div>
-          <el-date-picker class="pickers" @change="changes" v-model="timeValue" type="datetimerange" range-separator="至"
-            start-placeholder="开始日期" end-placeholder="结束日期">
+          <el-date-picker
+            class="pickers"
+            @change="changes"
+            v-model="timeValue"
+            type="datetimerange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+          >
           </el-date-picker>
         </div>
         <div class="search">
           <div class="date">关键字:</div>
-          <el-input class="inputs" placeholder="请输入" v-model="inputVlaues"></el-input>
+          <el-input
+            class="inputs"
+            placeholder="请输入"
+            v-model="inputVlaues"
+          ></el-input>
         </div>
 
         <div class="buttons" @click="getWarning()">查询</div>
@@ -34,44 +63,83 @@
         </div>
       </div> -->
       <div class="tables">
-        <el-table :data="warningList" class="table" style="width: 100%" height="80vh" :header-cell-style="{
-          background: 'rgb(30,30,30)',
-          color: 'rgb(220,220,220)',
-          padding: '4px',
-          fontSize: '14px',
-          'border-bottom': 'solid 1px rgba(77, 77, 77, 1)',
-        }" :cell-style="{
+        <el-table
+        stripe="true"
+          :data="warningList"
+          class="table"
+          style="width: 100%"
+          height="80vh"
+          :header-cell-style="{
+            background: 'rgb(30,30,30)',
+            color: 'rgb(220,220,220)',
+            padding: '4px',
+            fontSize: '14px',
+            'border-bottom': 'solid 1px rgba(77, 77, 77, 1)',
+          }"
+          :cell-style="{
             height: '40px',
             background: 'rgb(30,30,30)',
             color: 'rgb(220,220,220)',
             padding: '3px',
             fontSize: '12px',
             'border-bottom': '1px solid #000000',
-          }">
-          <el-table-column prop="alertTime" label="发生时间" width="150" align="center">
+          }"
+        >
+          <el-table-column
+            prop="alertTime"
+            label="发生时间"
+            width="150"
+            align="center"
+          >
           </el-table-column>
-          <el-table-column prop="stationName" label="风场名称" width="120" align="center">
+          <el-table-column
+            prop="stationName"
+            label="风场名称"
+            width="120"
+            align="center"
+          >
           </el-table-column>
-          <el-table-column prop="windturbineName" label="风机名称" width="120" align="center">
+          <el-table-column
+            prop="windturbineName"
+            label="风机名称"
+            width="120"
+            align="center"
+          >
           </el-table-column>
-          <el-table-column prop="rank" label="报警等级" width="100" align="center">
+          <el-table-column
+            prop="rank"
+            label="报警等级"
+            width="100"
+            align="center"
+          >
           </el-table-column>
           <el-table-column label="状态" width="120" align="center">
-            <template #default="scope">
-              <span>
-                {{ scope.row.messageType === 1 ? "触发" : "已解除" }}
-              </span>
-            </template>
-          </el-table-column>
-          <el-table-column prop="snapId" label="故障编号" width="240" align="center">
+                <template #default="scope">
+                  <span>
+                    {{ scope.row.messageType  === 1 ? "触发" : "已解除" }}
+                  </span>
+                </template>
+              </el-table-column>
+          <el-table-column
+            prop="snapId"
+            label="故障编号"
+            width="240"
+            align="center"
+          >
           </el-table-column>
           <el-table-column prop="alertText" label="故障信息" align="center">
           </el-table-column>
         </el-table>
       </div>
       <div class="paginations">
-        <el-pagination :hide-on-single-page="true" :page-size="currentPage" background layout="prev, pager, next"
-          :total="total" @current-change="handleCurrentChange">
+        <el-pagination
+          :hide-on-single-page="true"
+          :page-size="currentPage"
+          background
+          layout="prev, pager, next"
+          :total="total"
+          @current-change="handleCurrentChange"
+        >
         </el-pagination>
       </div>
     </div>
@@ -153,10 +221,22 @@ export default {
     },
     opened() {
       let date = new Date();
-      this.timeValue[0] = date.getTime() - 28800000;
-      this.timeValue[1] = date.getTime() + 3600000;
-      let stationList = this.$store.state.stationList;
-      this.selectValue = stationList[0].id;
+      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 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();
@@ -169,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"),
@@ -204,7 +284,7 @@ export default {
       this.windturbineId = windturbine[0]?.windturbineId
       this.windturbinelist = windturbine;
     },
-    handleChange(val) {
+    handleChange(val){
       this.windturbineId = this.windturbinelist.filter(item => item.code === val)[0].windturbineId
     }
   },
@@ -218,7 +298,6 @@ export default {
   margin-left: -1%;
   margin-top: -40px;
 }
-
 .searchTitle {
   display: flex;
   flex-direction: row;
@@ -227,24 +306,20 @@ export default {
   padding-top: 10px;
   color: #ffffff;
 }
-
 .search {
   display: flex;
   flex-direction: row;
   align-items: center;
   margin-right: 50px;
 }
-
 .date {
   margin-right: 10px;
   font-size: 16px;
 }
-
 .tables {
   margin-left: 3vw;
   padding-top: 10px;
 }
-
 .lable {
   display: flex;
   flex-direction: row;
@@ -254,7 +329,6 @@ export default {
   margin-left: 75px;
   padding-top: 10px;
 }
-
 .lable-item {
   font-size: 16px;
   display: flex;
@@ -264,12 +338,10 @@ export default {
   color: #ffffff;
   margin-bottom: 10px;
 }
-
 .el-table {
   position: static;
   background-color: #141414;
 }
-
 .inputs {
   border: none;
   width: 174px !important;
@@ -277,7 +349,6 @@ export default {
   height: 40px;
   color: #ffffff;
 }
-
 .paginations {
   display: flex;
   flex-direction: row-reverse;

+ 77 - 92
src/components/warning/warningCard.vue

@@ -89,7 +89,7 @@ export default {
   props: {},
   data() {
     return {
-      values: ["-"],
+      values: [],
       dialogVisible: false,
       showSvg: false,
       svgVisible: false,
@@ -104,117 +104,101 @@ export default {
     faultMessage(json) {
       api.alarmFault().then((res) => {
         if (res.data) {
+          this.values = []
           let val = res.data;
           if (Object.keys(val).length > 0) {
-            let syzAlarmArray = this.$store.state.syzAlarmArray || [];
-            console.log('syzAlarmRank', this.$store.state.syzAlarmRank)
-            val.forEach((ele) => {
-              if (
-                ele.category1 === "SYZ" &&
-                ele.rank === this.$store.state.syzAlarmRank
-              ) {
-                let item = syzAlarmArray.find((findEle) => {
-                  return ele.idString === findEle.idString;
-                });
-                if (!item) {
-                  ele.soundSource = "syz";
-                  ele.isConfirm = false;
-                  syzAlarmArray.push(ele);
-                }
-              }
-            });
+            // let syzAlarmArray = this.$store.state.syzAlarmArray || [];
+            // val.forEach((ele) => {
+            //   if (
+            //     ele.category1 === "SYZ" &&
+            //     ele.rank === this.$store.state.syzAlarmRank
+            //   ) {
+            //     let item = syzAlarmArray.find((findEle) => {
+            //       return ele.idString === findEle.idString;
+            //     });
+            //     if (!item) {
+            //       ele.soundSource = "syz";
+            //       ele.isConfirm = false;
+            //       syzAlarmArray.push(ele);
+            //     }
+            //   }
+            // });
 
-            this.$store.commit("syzAlarmArray", syzAlarmArray);
+            // this.$store.commit("syzAlarmArray", syzAlarmArray);
 
-            this.$store.commit(
-              "showWarningMask",
-              syzAlarmArray.some((ele) => {
-                return ele.rank === this.$store.state.syzAlarmRank;
-              })
-            );
+            // this.$store.commit(
+            //   "showWarningMask",
+            //   syzAlarmArray.some((ele) => {
+            //     return ele.rank === this.$store.state.syzAlarmRank;
+            //   })
+            // );
 
-            const syzAlarmItem = this.$store.getters.syzAlarmArray.some(
-              (ele) => {
-                return (
-                  ele.category1 === "SYZ" &&
-                  ele.rank === this.$store.state.syzAlarmRank
-                );
-              }
-            );
+            // const syzAlarmItem = this.$store.getters.syzAlarmArray.some(
+            //   (ele) => {
+            //     return (
+            //       ele.category1 === "SYZ" &&
+            //       ele.rank === this.$store.state.syzAlarmRank
+            //     );
+            //   }
+            // );
 
-            const syzDialogShow = this.$store.getters.syzAlarmArray.some(
-              (ele) => {
-                return !ele.isConfirm;
-              }
-            );
+            // const syzDialogShow = this.$store.getters.syzAlarmArray.some(
+            //   (ele) => {
+            //     return !ele.isConfirm;
+            //   }
+            // );
 
-            syzDialogShow && this.$store.commit("syzDialogShow", syzDialogShow);
+            // syzDialogShow && this.$store.commit("syzDialogShow", syzDialogShow);
 
-            let syzBtnFlicker = syzAlarmArray.some((ele) => {
-              return ele.rank === this.$store.state.syzAlarmRank;
-            });
+            // let syzBtnFlicker = syzAlarmArray.some((ele) => {
+            //   return ele.rank === this.$store.state.syzAlarmRank;
+            // });
 
-            this.$store.commit("syzBtnFlicker", syzBtnFlicker);
+            // this.$store.commit("syzBtnFlicker", syzBtnFlicker);
 
-            let sleected = {};
-            this.values.forEach((it) => {
-              if (it.isSelected) {
-                sleected[it.id] = 0;
-              }
-            });
-            this.values = new Array();
             for (let v in val) {
               let vl = val[v];
-              if (vl.stationId != "QS_FDC" && vl.category1 == "FJ") {
-                vl.alertText = vl.windturbineName + "-" + vl.alertText;
-              }
-              if (
-                sleected[vl.id] == 0 &&
-                BackgroundData.getInstance().LoginUser
-              ) {
-                vl.isSelected = true;
-              }
               if (vl.category1 !== "GF" && vl.objectId.indexOf("GDC") < 0) {
                 this.values.push(vl);
               }
             }
 
-            let fjAlarArray = [];
-            let fjDataArray = [];
+            // let fjAlarArray = [];
+            // let fjDataArray = [];
 
-            this.values.forEach((ele) => {
-              if (ele.category1 === "FJ") {
-                if (ele.rank >= this.$store.state.fjAlarmRank) {
-                  fjAlarArray.push(ele);
-                } else {
-                  fjDataArray.push(ele);
-                }
-              }
-            });
+            // this.values.forEach((ele) => {
+            //   if (ele.category1 === "FJ") {
+            //     if (ele.rank >= this.$store.state.fjAlarmRank) {
+            //       fjAlarArray.push(ele);
+            //     } else {
+            //       fjDataArray.push(ele);
+            //     }
+            //   }
+            // });
 
-            if (syzAlarmItem) {
-              let syzRes = syzAlarmArray.find((syzAlarmItem) => {
-                return (
-                  syzAlarmItem.category1 === "SYZ" &&
-                  syzAlarmItem.rank === this.$store.state.syzAlarmRank &&
-                  this.$store.getters.syzArray.some((findEle) => {
-                    return (
-                      findEle.id === syzAlarmItem.stationId && !findEle.isMute
-                    );
-                  })
-                );
-              });
-              if (syzRes) {
-                // this.syzAudioPlay(syzAlarmArray);
-                this.audioPlay(this.getSound("syz"));
-              } else {
-                this.audioPlay(this.getSound("wd"));
-              }
-            } else if (!syzAlarmItem && fjAlarArray.length) {
-              this.audioPlay(this.getSound(fjAlarArray[0].soundSource || "wd"));
-            }
+            // if (syzAlarmItem) {
+            //   let syzRes = syzAlarmArray.find((syzAlarmItem) => {
+            //     return (
+            //       syzAlarmItem.category1 === "SYZ" &&
+            //       syzAlarmItem.rank === this.$store.state.syzAlarmRank &&
+            //       this.$store.getters.syzArray.some((findEle) => {
+            //         return (
+            //           findEle.id === syzAlarmItem.stationId && !findEle.isMute
+            //         );
+            //       })
+            //     );
+            //   });
+            //   if (syzRes) {
+            //     // this.syzAudioPlay(syzAlarmArray);
+            //     this.audioPlay(this.getSound("syz"));
+            //   } else {
+            //     this.audioPlay(this.getSound("wd"));
+            //   }
+            // } else if (!syzAlarmItem && fjAlarArray.length) {
+            //   this.audioPlay(this.getSound(fjAlarArray[0].soundSource || "wd"));
+            // }
 
-            this.values = [].concat(fjAlarArray, fjDataArray);
+            // this.values = [].concat(fjAlarArray, fjDataArray);
           }
         }
       });
@@ -335,6 +319,7 @@ export default {
             offset: 60,
             duration: 3000,
           });
+          this.faultMessage();
         });
     },
     setCellClassName({ row }) {

+ 11 - 3
src/components/warning/warningRecords.vue

@@ -76,13 +76,15 @@
             prop="categoryName"
             align="center"
             label="故障类型"
+            width="120"
           >
           </el-table-column>
 
           <el-table-column
-            prop="stationName"
+            prop="showName"
             align="center"
-            label="场站名称"
+            label="名称"
+            width="150"
           >
           </el-table-column>
           
@@ -102,7 +104,6 @@
             prop="alertText"
             align="center"
             label="描述"
-            width="520"
           >
           </el-table-column>
         </el-table>
@@ -152,6 +153,13 @@ export default {
           pageIndex: this.pageIndex,
         })
         .then((res) => {
+          res.data.records.forEach(item =>{
+            if(item.category1 === "FJ"){
+              item.showName = item.windturbineName
+            }else{
+              item.showName = item.stationName
+            }
+          })
           this.recordData = res.data.records;
           this.total = res.data.total
         });