瀏覽代碼

预警报警模块调整、样式调整

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 4 月之前
父節點
當前提交
8eae06db44

+ 5 - 2
.env.development

@@ -27,7 +27,7 @@ VUE_APP_ALARM=http://10.220.1.11:6015
 
 # # VUE_APP_API=http://192.168.1.116:6060
 # VUE_APP_API=http://120.46.128.147:6060
-VUE_APP_API=http://10.220.1.245:6060
+VUE_APP_API=http://10.220.1.11:6015
 # VUE_APP_API=http://127.0.0.1:6060
 # # VUE_APP_API=http://192.168.1.109:6060
 
@@ -48,8 +48,11 @@ VUE_APP_API=http://10.220.1.245:6060
 # # VUE_APP_NEW_WISDOM=http://10.81.3.162:8170
 # # VUE_APP_NEW_WISDOM=http://192.168.1.103:8170 # 石林
 # VUE_APP_NEW_WISDOM=http://10.81.3.155:8170
+
 # # 综合报警
-# VUE_APP_ALARM=http://10.81.3.154:6015
+VUE_APP_ALARM=http://10.220.1.11:6015
+
+VUE_APP_ADP_BASE_URL='http://172.16.12.103'
 # # 登录
 # VUE_APP_VUE_LOGIN_URL=http://10.81.3.127:48080
 # # VUE_APP_VUE_LOGIN_URL=http://192.168.1.102:48080

+ 5 - 2
.env.production

@@ -27,7 +27,7 @@ VUE_APP_ALARM=http://10.220.1.11:6015
 
 
 # VUE_APP_API=http://123.60.219.66:6060
-VUE_APP_API=http://10.220.1.8:6070
+VUE_APP_API=http://10.220.1.11:6015
 # VUE_APP_TEST=http://10.81.3.155:9002
 # VUE_APP_WS='ws://10.81.3.155:9002'
 # VUE_APP_ADAPTERURL=http://10.81.3.155:8011
@@ -41,7 +41,10 @@ VUE_APP_API=http://10.220.1.8:6070
 # # 智慧检修
 # # VUE_APP_NEW_WISDOM=http://10.81.3.162:8170
 # VUE_APP_NEW_WISDOM=http://10.81.3.155:8170
+
 # # 综合报警
-# VUE_APP_ALARM=http://10.81.3.154:6015
+VUE_APP_ALARM=http://10.220.1.11:6015
+
+VUE_APP_ADP_BASE_URL='http://172.16.12.103'
 # # 登录
 # VUE_APP_VUE_LOGIN_URL=http://10.81.3.127:48080

+ 3 - 3
public/static/config/modeConfig.js

@@ -13,7 +13,7 @@ let tilesUrl = null;
 const tilesMaxLevel = 18;
 
 // 适配器地址
-const adapterUrl = "http://10.155.32.4:8011/";
+const adapterUrl = "http://10.220.1.11:8011/";
 
 // 切换模块时是否提示当前模块名称(用于对内介绍项目时便捷显示模块名称)
 const showModuleName = 1;
@@ -25,10 +25,10 @@ if (localTest) {
 
     tilesUrl = "http://localhost:8080/static/cesium/Assets/Textures/NaturalEarthII";
 } else {
-    baseURL = "http://10.155.32.4:8082/" // 正式环境
+    baseURL = "http://10.220.1.11:8082/" // 正式环境
     // baseURL = "http://192.168.1.103:8082/" // 正式环境
 
-    tilesUrl = "http://10.155.32.4:8070/zhfx/new_tiles";
+    tilesUrl = "http://10.220.1.11:8070/zhfx/new_tiles";
 }
 
 websocketUrl = (baseURL.replace(/http:\/\/|https:\/\//g, "")) + "gyee-websocket";

+ 7 - 7
src/App.vue

@@ -188,16 +188,16 @@ export default {
       }
     },
     getBooster() {
-      GetBoosterlist().then((res) => {
-        if (res.data && res.data.code == 200) {
-          this.$store.commit("changeBooster", res.data.data);
-        }
-      });
+      // GetBoosterlist().then((res) => {
+      //   if (res.data && res.data.code == 200) {
+      //     this.$store.commit("changeBooster", res.data.data);
+      //   }
+      // });
     },
     // 获取测风塔
     async getCftlist() {
-      const { data: datas } = await getApiWeatherstation();
-      this.$store.commit("changeCft", datas.data);
+      // const { data: datas } = await getApiWeatherstation();
+      // this.$store.commit("changeCft", datas.data);
     },
     // 获取全部场站(不分风电光伏)
     async getAllStation() {

+ 95 - 116
src/api/zhbj/index.js

@@ -4,15 +4,12 @@ import JSONBIG from "json-bigint";
 export function GetDeviceTableData(data, timeout = 5000) {
   return request({
     baseURL: process.env.VUE_APP_ALARM,
-    url: `/alarminfo/findAlarmlist?begin=${data.begin}&end=${
-      data.end
-    }&alarmType=${data.alarmType}&stationid=${data.stationid}${
-      data.alarmType == "windturbine" || data.alarmType == "inverter"
+    url: `/alarminfo/findAlarmlist?begin=${data.begin}&end=${data.end
+      }&alarmType=${data.alarmType}&stationid=${data.stationid}${data.alarmType == "windturbine" || data.alarmType == "inverter"
         ? `&deviceid=${data.deviceid}`
         : ""
-    }&pageNum=${data.pageNum}&pageSize=${data.pageSize}&description=${
-      data.description
-    }&isclose=${data.isclose}`,
+      }&pageNum=${data.pageNum}&pageSize=${data.pageSize}&description=${data.description
+      }&isclose=${data.isclose}`,
     method: "get",
     timeout,
   });
@@ -21,15 +18,12 @@ export function GetDeviceTableData(data, timeout = 5000) {
 export function GetTableData(data) {
   return request({
     baseURL: process.env.VUE_APP_ALARM,
-    url: `/alarm/history/findAlarmlist?begin=${data.begin}&end=${
-      data.end
-    }&alarmType=${data.alarmType}&stationid=${data.stationid}${
-      data.alarmType == "windturbine" || data.alarmType == "inverter"
+    url: `/alarm/history/findAlarmlist?begin=${data.begin}&end=${data.end
+      }&alarmType=${data.alarmType}&stationid=${data.stationid}${data.alarmType == "windturbine" || data.alarmType == "inverter"
         ? `&deviceid=${data.deviceid}`
         : ""
-    }&pageNum=${data.pageNum}&pageSize=${data.pageSize}&description=${
-      data.description
-    }${data.id ? `&id=${data.id}` : ""}`,
+      }&pageNum=${data.pageNum}&pageSize=${data.pageSize}&description=${data.description
+      }${data.id ? `&id=${data.id}` : ""}`,
     method: "get",
   });
 }
@@ -195,13 +189,10 @@ export const alarm_snap_top = (params) => {
   });
 };
 //数据查询实时数据
-export const getAdapterLatest = (stationId, AIlist, stationType) => {
+export const getAdapterLatest = (stationId, AIlist, stationType, baseURL) => {
   return request({
     url: `ts/latest?uniformCodes=${AIlist}&thingId=${stationId}&thingType=windturbine`,
-    baseURL: `http://10.81.3.162:801${/FDC/.test(stationType) ? "1" : "2"}/`,
-    showLoading: {
-      statu: false,
-    },
+    baseURL: `${baseURL}:801${/FDC/.test(stationType) ? "1" : "2"}/`,
     timeout: 10000,
     transformResponse: [
       function (data) {
@@ -367,9 +358,6 @@ export const getintellList = (query) => {
     params: {
       stationId: query,
     },
-    showLoading: {
-      statu: false,
-    },
   });
 };
 export const getReportList = (params) => {
@@ -377,9 +365,6 @@ export const getReportList = (params) => {
     url: "earlyreport/list",
     method: "get",
     params: params,
-    showLoading: {
-      statu: false,
-    },
   });
 };
 export const getreportReviewList = (query) => {
@@ -395,9 +380,6 @@ export const getHomeOrdercount = (query) => {
   return request({
     url: "home/ordercount",
     method: "get",
-    showLoading: {
-      statu: false,
-    },
   });
 };
 //首页获取机型接口
@@ -406,27 +388,18 @@ export const getHomeAlertrule = (params) => {
     url: "home/alertrule",
     method: "get",
     params: params,
-    showLoading: {
-      statu: false,
-    },
   });
 };
 export const getHomeDangerHidden = (params) => {
   return request({
     url: "home/hidden/danger",
     method: "get",
-    showLoading: {
-      statu: false,
-    },
   });
 };
 export const getHomeDurationTotal = (params) => {
   return request({
     url: "home/total/duration",
     method: "get",
-    showLoading: {
-      statu: false,
-    },
   });
 };
 // 巡检计划
@@ -509,9 +482,6 @@ export const new_alarm_history = (params) => {
       "Content-Type": "application/json",
     },
     responseType: "blob",
-    showLoading: {
-      text: "拼命下载中...",
-    },
     timeout: 99999999,
   });
 };
@@ -530,9 +500,6 @@ export const alarm_fault_recent = (params) => {
   return request({
     url: `fault/recent`,
     params: params,
-    showLoading: {
-      statu: false,
-    },
     transformResponse: [
       function (data) {
         const json = JSONBIG({
@@ -615,13 +582,19 @@ export function point(
 }
 //测点新增
 export function metrics(data) {
-  return request.post(`device/metrics/single`, data);
+  return request({
+    method: "post",
+    url: `device/metrics/single`,
+    data,
+    baseURL: process.env.VUE_APP_ALARM,
+  });
+  // return request.post(`device/metrics/single`, data);
 }
 //测点删除
 export function delmetrics(params) {
   return request({
-    method: "delete",
     baseURL: process.env.VUE_APP_ALARM,
+    method: "delete",
     url: `device/metrics/single/delete/${params}`,
   });
 }
@@ -655,7 +628,7 @@ export const faultmode_windturbine = () => {
   });
 };
 // 根据 structurecode get
-export const faultmode_structurecode = (params) => {
+export const faultmode_structureCode = (params) => {
   return request({
     baseURL: process.env.VUE_APP_ALARM,
     url: `device/faultmode/windturbine/${params}`,
@@ -688,9 +661,6 @@ export function getStationinfo(params) {
   return request({
     url: `info/stationinfo?stationId=${params}`,
     method: "get",
-    showLoading: {
-      statu: false,
-    },
   });
 }
 
@@ -731,22 +701,27 @@ export const fetchElectricDIPointByPointId = (pointId) => {
 };
 
 //根据风场编号获取电气AI测点
-export const fetch_electrical_point_ai = (stationId) => {
+export const fetch_electrical_point_ai = (stationId, modelId) => {
   return request({
-    url: "info/electrical_point_ai",
+    baseURL: process.env.VUE_APP_ALARM,
+    url: "info/testing_point_ai",
     method: "get",
     params: {
-      stationId: stationId,
+      stationId,
+      modelId
     },
   });
 };
+
 //根据风场编号获取电气DI测点
-export const fetch_electrical_point_di = (stationId) => {
+export const fetch_electrical_point_di = (stationId, modelId) => {
   return request({
-    url: "info/electrical_point_di",
+    baseURL: process.env.VUE_APP_ALARM,
+    url: "info/testing_point_di",
     method: "get",
     params: {
-      stationId: stationId,
+      stationId,
+      modelId
     },
   });
 };
@@ -883,9 +858,6 @@ export const getReportDetail = (id) => {
   return request({
     url: `earlyreport/info?id=${id}`,
     method: "get",
-    showLoading: {
-      statu: false,
-    },
   });
 };
 
@@ -969,68 +941,75 @@ export const getStopQueryTableData = (params) => {
 
 export const getWarningCountList = (params) => {
   return request({
-    url: `alarm/history/findCtFeatureStat?timeType=${params.timeType}&begin=${
-      params.begin
-    }&end=${params.end}&stationid=${
-      params.stationid
-    }&components=${params.components.toString()}&modelId=${
-      params.modelId
-    }&alarmIds=${params.alarmIds}&deviceType=${params.deviceType}`,
+    url: `alarm/history/findCtFeatureStat?timeType=${params.timeType}&begin=${params.begin
+      }&end=${params.end}&stationid=${params.stationid
+      }&components=${params.components.toString()}&modelId=${params.modelId
+      }&alarmIds=${params.alarmIds}&deviceType=${params.deviceType}`,
     baseURL: process.env.VUE_APP_ALARM,
     method: "get",
   });
 };
 
+//查询所有场站
+export function getAllStation() {
+  return request({
+    baseURL: process.env.VUE_APP_ALARM,
+    url: `/electricity/czlist`,
+    method: "GET",
+  });
+}
 
 export function getAlarmMap(url = "/alarmplan/queryAlarmPlanMap", params = {}) {
-    return request({
-      baseURL: process.env.VUE_APP_ALARM,
-      url,
-      params,
-      method: "GET",
-    });
-  }
-  
-  export function getAlarmMapById(params) {
-    return request({
-      baseURL: process.env.VUE_APP_ALARM,
-      url: "/alarmplan/alarmPlanlistById",
-      params,
-      method: "GET",
-    });
-  }
-  
-  export function getAlarmTypeList() {
-    return request({
-      baseURL: process.env.VUE_APP_ALARM,
-      url: `/alarmplan/alarmPlanTypelist`,
-      method: "GET",
-    });
-  }
-  
-  export function addAlarmItem(data) {
-    return request({
-      baseURL: process.env.VUE_APP_ALARM,
-      url: `/alarmplan/save`,
-      method: "POST",
-      data
-    });
-  }
-  
-  export function deleteAlarmItem(params) {
-    return request({
-      baseURL: process.env.VUE_APP_ALARM,
-      url: `/alarmplan/delete`,
-      method: "delete",
-      params
-    });
-  }
-  
-  export function getAlarmExcelTemplate() {
-    return request({
-      baseURL: process.env.VUE_APP_ALARM,
-      url: `/alarmplan/importtemplate`,
-      method: "get",
-      responseType: "blob",
-    });
-  }
+  return request({
+    baseURL: process.env.VUE_APP_ALARM,
+    url,
+    params,
+    method: "GET",
+  });
+}
+
+export function getAlarmMapById(params) {
+  return request({
+    baseURL: process.env.VUE_APP_ALARM,
+    url: "/alarmplan/alarmPlanlistById",
+    params,
+    method: "GET",
+  });
+}
+
+export function getAlarmTypeList() {
+  return request({
+    baseURL: process.env.VUE_APP_ALARM,
+    url: `/alarmplan/alarmPlanTypelist`,
+    method: "GET",
+  });
+}
+
+export function addAlarmItem(data) {
+  return request({
+    baseURL: process.env.VUE_APP_ALARM,
+    url: `/alarmplan/save`,
+    method: "POST",
+    data
+  });
+}
+
+export function deleteAlarmItem(params) {
+  return request({
+    baseURL: process.env.VUE_APP_ALARM,
+    url: `/alarmplan/delete`,
+    method: "delete",
+    params
+  });
+}
+
+export function getAlarmExcelTemplate() {
+  return request({
+    baseURL: process.env.VUE_APP_ALARM,
+    url: `/alarmplan/importtemplate`,
+    method: "get",
+    responseType: "blob",
+  });
+}
+
+

+ 117 - 73
src/nxfStyle.less

@@ -5,7 +5,7 @@
 
     // /integratedAlarm/safe/realwarning 卡片
     .card {
-        color: rgb(228, 236, 255);
+        color     : rgb(228, 236, 255);
         background: #142446;
 
         .safeCom {
@@ -36,8 +36,8 @@
     .pickerFifter {
         .buttons {
             background-color: rgba(37, 112, 206, 0.2);
-            border: 1px solid rgb(37, 112, 206);
-            color: rgb(37, 112, 206);
+            border          : 1px solid rgb(37, 112, 206);
+            color           : rgb(37, 112, 206);
         }
     }
 
@@ -50,7 +50,7 @@
         }
 
         .el-button:last-of-type {
-            color: #fff;
+            color           : #fff;
             background-color: rgb(37, 112, 206);
         }
     }
@@ -63,12 +63,12 @@
     }
 
     .buttons {
-        color: #fff;
+        color           : #fff;
         background-color: rgb(37, 112, 206);
-        border: 0;
+        border          : 0;
 
         &:hover {
-            color: rgb(223, 232, 250);
+            color     : rgb(223, 232, 250);
             background: rgb(26, 92, 175);
         }
     }
@@ -91,24 +91,24 @@
 
     // /economicsOperation/thematicAnalysis/windEnergy
     .parcel-box .search .searchColor {
-        color: #fff;
+        color           : #fff;
         background-color: rgb(37, 112, 206);
-        border: 0;
+        border          : 0;
 
         &:hover {
-            color: rgb(223, 232, 250);
+            color     : rgb(223, 232, 250);
             background: rgb(26, 92, 175);
         }
     }
 
     // /economicsOperation/stationAnalyse/WindAndPhotovoltaic
     .windAndPhotovoltaic .wp-search .searchColor {
-        color: #fff;
+        color           : #fff;
         background-color: rgb(37, 112, 206);
-        border: 0;
+        border          : 0;
 
         &:hover {
-            color: rgb(223, 232, 250);
+            color     : rgb(223, 232, 250);
             background: rgb(26, 92, 175);
         }
     }
@@ -117,11 +117,11 @@
     .selections {
         .selections_btn {
             background: rgba(37, 112, 206, 0.2);
-            border: 1px solid rgba(37, 112, 206, 0.2);
+            border    : 1px solid rgba(37, 112, 206, 0.2);
 
             &.active {
                 background: rgb(37, 112, 206);
-                border: 1px solid rgb(37, 112, 206);
+                border    : 1px solid rgb(37, 112, 206);
             }
         }
     }
@@ -148,12 +148,12 @@
     }
 
     .searchColor {
-        color: #fff;
+        color           : #fff;
         background-color: rgb(37, 112, 206);
-        border: 0;
+        border          : 0;
 
         &:hover {
-            color: rgb(223, 232, 250);
+            color     : rgb(223, 232, 250);
             background: rgb(26, 92, 175);
         }
     }
@@ -171,7 +171,7 @@
         }
 
         .mouth {
-            border-top: 1px solid #67b9ff;
+            border-top   : 1px solid #67b9ff;
             border-bottom: 1px solid #67b9ff;
 
             &.active {
@@ -193,8 +193,8 @@
                 outline: none;
 
                 &.active {
-                    color: #67b9ff;
-                    background: linear-gradient(to top, rgba(#2169c3, 0.5), rgba(#142446, 0)) !important;
+                    color       : #67b9ff;
+                    background  : linear-gradient(to top, rgba(#2169c3, 0.5), rgba(#142446, 0)) !important;
                     border-color: #2169c3 !important;
 
                     &:after {
@@ -247,12 +247,12 @@
     .form-wrapper {
         .btns {
             .buttons {
-                color: #fff;
+                color           : #fff;
                 background-color: rgb(37, 112, 206);
-                border: 0;
+                border          : 0;
 
                 &:hover {
-                    color: rgb(223, 232, 250);
+                    color     : rgb(223, 232, 250);
                     background: rgb(26, 92, 175);
                 }
             }
@@ -265,12 +265,12 @@
 
         // 左侧导航菜单二级
         .sub-menu {
-            background: rgba(3, 7, 19, 0.75);
+            background  : rgba(3, 7, 19, 0.75);
             border-color: rgba(#2169c3, 0.5);
 
             .menu-item {
-                border: 0;
-                color: #777;
+                border    : 0;
+                color     : #777;
                 background: rgb(8, 23, 44);
 
                 &.active {
@@ -302,7 +302,7 @@
     // el-dialog 弹窗
     .el-dialog {
         background: fade(rgb(3, 7, 19), 95);
-        border: 1px solid fade(#2169c3, 50);
+        border    : 1px solid fade(#2169c3, 50);
         box-shadow: 0px 8px 17px 1px rgba(#2169c3, 0.3);
 
         &.el-dialog--center .el-dialog__body,
@@ -313,7 +313,7 @@
         &.hide-header {
             .el-dialog__header {
                 background: none; // 去除弹窗 header 背景图片
-                border: none;
+                border    : none;
 
                 .el-dialog__title {
                     display: none;
@@ -349,7 +349,7 @@
 
                 .el-icon-close {
                     background-color: transparent;
-                    border: 1px solid #fff;
+                    border          : 1px solid #fff;
                 }
             }
         }
@@ -358,7 +358,7 @@
     // 组件下拉选框
     .el-popper {
         &.el-cascader__dropdown[role="tooltip"] {
-            background: @picker-bg-color;
+            background  : @picker-bg-color;
             border-color: @picker-bg-color;
 
             .el-cascader-menu {
@@ -368,7 +368,7 @@
             .el-cascader-node:not(.is-disabled):focus,
             .el-cascader-node:not(.is-disabled):hover {
                 background: fade(@green, 20);
-                color: @green;
+                color     : @green;
             }
 
             .el-cascader-node.in-active-path,
@@ -380,7 +380,7 @@
 
         &.el-select__popper[role="tooltip"] {
             border-color: @picker-bg-color;
-            background: @picker-bg-color;
+            background  : @picker-bg-color;
 
             .el-cascader-menu {
                 border-color: @gray;
@@ -389,7 +389,7 @@
             .el-select-dropdown__item.hover,
             .el-select-dropdown__item:hover {
                 background: fade(rgb(26, 92, 175), 20);
-                color: rgb(223, 232, 250);
+                color     : rgb(223, 232, 250);
 
                 // color           : #fff;
                 // background-color: rgb(37, 112, 206);
@@ -397,8 +397,8 @@
             }
 
             .el-select-dropdown__item.selected {
-                background: transparent;
-                color: rgb(26, 92, 175);
+                background  : transparent;
+                color       : rgb(26, 92, 175);
                 border-color: rgb(26, 92, 175);
             }
         }
@@ -406,8 +406,8 @@
 
     // 日期选择组件
     .el-picker__popper.el-popper[role="tooltip"] {
-        border-color: @picker-bg-color !important;
-        background: @picker-bg-color !important;
+        border-color: @picker-bg-color  !important;
+        background  : @picker-bg-color  !important;
     }
 
     .el-picker-panel__footer {
@@ -418,7 +418,7 @@
         }
 
         .el-button.is-plain {
-            color: #67b9ff;
+            color       : #67b9ff;
             border-color: #67b9ff;
         }
     }
@@ -452,9 +452,9 @@
 
     .el-picker-panel {
         .el-time-panel {
-            border-color: #fff;
+            border-color    : #fff;
             background-color: rgb(3, 7, 19);
-            box-shadow: var(--el-box-shadow-light);
+            box-shadow      : var(--el-box-shadow-light);
         }
 
         .el-time-spinner__item {
@@ -512,17 +512,17 @@
     // 确认弹窗
     .el-overlay .el-message-box {
         background: rgba(3, 7, 19, 0.95);
-        border: 1px solid rgba(33, 105, 195, 0.5);
+        border    : 1px solid rgba(33, 105, 195, 0.5);
         box-shadow: 0px 8px 17px 1px rgba(33, 105, 195, 0.3);
 
         .el-message-box__btns {
             .el-button.el-button--primary {
-                color: #fff;
+                color           : #fff;
                 background-color: rgb(37, 112, 206);
-                border: 0;
+                border          : 0;
 
                 &:hover {
-                    color: rgb(223, 232, 250);
+                    color     : rgb(223, 232, 250);
                     background: rgb(26, 92, 175);
                 }
             }
@@ -551,7 +551,7 @@
     .el-checkbox .el-checkbox__input.is-checked .el-checkbox__inner,
     .el-checkbox .el-checkbox__input.is-indeterminate .el-checkbox__inner {
         background-color: #2169c3;
-        border-color: #2169c3;
+        border-color    : #2169c3;
     }
 
     .el-checkbox .el-checkbox__input.is-checked+.el-checkbox__label {
@@ -600,14 +600,14 @@
     // 顶部右上角退出登录
     .el-scrollbar__view.el-dropdown__list {
         background: transparent;
-        margin: 0;
-        padding: 0;
+        margin    : 0;
+        padding   : 0;
     }
 
     // el-radio 选中状态
     .el-radio.is-checked {
         .el-radio__inner {
-            background: #67b9ff;
+            background  : #67b9ff;
             border-color: #67b9ff;
         }
 
@@ -624,12 +624,12 @@
     // 部分页面顶部搜索条件右侧按钮
     .search-wrapper {
         .buttons {
-            color: #fff;
+            color           : #fff;
             background-color: rgb(37, 112, 206);
-            border: 0;
+            border          : 0;
 
             &:hover {
-                color: rgb(223, 232, 250);
+                color     : rgb(223, 232, 250);
                 background: rgb(26, 92, 175);
             }
         }
@@ -643,7 +643,7 @@
         .el-table,
         .custom-table.el-table {
             background: rgb(3, 7, 19);
-            border: 0px; // 包裹表格父元素边框
+            border    : 0px; // 包裹表格父元素边框
 
 
 
@@ -675,17 +675,17 @@
                 }
 
                 &:hover td {
-                    color: #67b9ff; // 表格基数行 hover 文字颜色
+                    color           : #67b9ff; // 表格基数行 hover 文字颜色
                     background-color: rgb(3, 7, 19) !important; // 表格基数行 hover 背景颜色
                 }
             }
 
             td {
-                border: 0px; // 表格内部除了最后一行底部以外的上下左右边框
-                padding: 0;
-                height: 37px;
+                border     : 0px; // 表格内部除了最后一行底部以外的上下左右边框
+                padding    : 0;
+                height     : 37px;
                 line-height: 37px;
-                color: rgb(194, 225, 255);
+                color      : rgb(194, 225, 255);
 
                 &.light,
                 &.always-light {
@@ -694,15 +694,15 @@
             }
 
             th {
-                border: 0px;
-                padding: 0px;
-                height: 37px;
-                line-height: 37px;
-                font-weight: normal;
-                text-align: center;
+                border        : 0px;
+                padding       : 0px;
+                height        : 37px;
+                line-height   : 37px;
+                font-weight   : normal;
+                text-align    : center;
                 // color      : rgb(85, 113, 166);
-                color: rgb(255, 255, 255);
-                cursor: pointer;
+                color         : rgb(255, 255, 255);
+                cursor        : pointer;
 
                 &.is-leaf {
                     border: 0px;
@@ -717,26 +717,26 @@
             th,
             tr {
                 background-color: transparent;
-                border: 0px;
+                border          : 0px;
             }
 
             thead {
-                color: @gray-l;
+                color      : @gray-l;
                 font-weight: 500;
-                font-size: 14px;
-                border: 0px;
+                font-size  : 14px;
+                border     : 0px;
 
                 th,
                 &.is-group th {
                     &.el-table__cell {
-                        background: rgb(19, 35, 71);
+                        background  : rgb(19, 35, 71);
                         border-color: transparent !important;
                     }
                 }
             }
 
             .el-table__body {
-                border: 0px; // 表格最外侧除右边以外边框
+                border   : 0px; // 表格最外侧除右边以外边框
                 font-size: 14px;
             }
 
@@ -746,7 +746,7 @@
                 }
 
                 &:hover td {
-                    color: #67b9ff;
+                    color           : #67b9ff;
                     background-color: rgb(16, 25, 46) !important; // 表格偶数行 hover 背景颜色
                 }
 
@@ -775,4 +775,48 @@
             background: #1a1f2fcc;
         }
     }
+
+    .el-cascader__dropdown {
+
+        .el-cascader-node {
+
+            &.in-active-path {
+
+                .el-cascader-node__label,
+                .el-icon-arrow-right {
+                    color: #2169c3;
+                }
+            }
+
+            &.is-active {
+
+                .el-cascader-node__label,
+                .el-icon-arrow-right {
+                    color: #2169c3;
+                }
+            }
+
+            &:hover {
+                background: rgba(#2169c3, 0.2) !important;
+
+                .el-cascader-node__label,
+                .el-icon-arrow-right {
+                    color: #2169c3;
+                }
+            }
+
+            &[aria-expanded="true"] {
+                background: rgba(#2169c3, 0.2) !important;
+            }
+
+            &[role="menuitem"]:focus {
+                background: rgba(#2169c3, 0.2) !important;
+
+                .el-cascader-node__label {
+                    color: #2169c3;
+                }
+            }
+        }
+
+    }
 }

+ 2 - 0
src/store/index.js

@@ -34,6 +34,8 @@ const state = {
   setConfig: 1,
   menuState: 1,
   showGf: false,
+  baseURL: process.env.VUE_APP_ALARM,
+  baseURL1: process.env.VUE_APP_ADP_BASE_URL,
 };
 
 //改变状态的方法`

+ 1 - 0
src/views/IntegratedAlarm/deviceConfig/components/custom.vue

@@ -114,6 +114,7 @@
     <el-table
       :data="state.tableData"
       stripe
+      :height="`calc(100% - 100px)`"
       style="width: 100%; height: calc(100% - 100px)"
     >
       <el-table-column

+ 88 - 74
src/views/IntegratedAlarm/deviceConfig/components/custom_components.vue

@@ -30,7 +30,7 @@
                 label="风机"
                 value="windturbine"
               ></el-option>
-              <el-option
+              <!-- <el-option
                 key="inverter"
                 label="逆变器"
                 value="inverter"
@@ -39,7 +39,7 @@
                 key="booststation"
                 label="升压站"
                 value="booststation"
-              ></el-option>
+              ></el-option> -->
             </el-select>
           </el-form-item>
           <el-form-item prop="rank">
@@ -52,10 +52,10 @@
               <el-option key="5" label="高级" value="5" />
             </el-select>
           </el-form-item>
-          <el-form-item prop="enabled">
+          <el-form-item prop="enable">
             <el-tag size="small">是否启用</el-tag>
             <el-switch
-              v-model="form.enabled"
+              v-model="form.enable"
               :active-value="true"
               :inactive-value="false"
               active-color="#13ce66"
@@ -100,8 +100,8 @@
             <el-select v-model="form.relatedParts" style="width: 100%">
               <el-option
                 v-for="i in state.relatePartList"
-                :key="i.partCode"
-                :value="i.partCode"
+                :key="i.nemCode"
+                :value="i.nemCode"
                 :label="i.name"
               />
             </el-select>
@@ -131,7 +131,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="9">
-          <el-tabs type="border-card">
+          <el-tabs type="border-card" class="currentTabs">
             <el-tab-pane label="AI测点">
               <el-input v-model="state.AIPointSearch"> </el-input>
               <el-table
@@ -218,16 +218,22 @@
       </el-row>
       <el-row :gutter="24">
         <el-col :span="24">
-          <el-form-item prop="descriptionShow">
+          <el-form-item prop="description">
             <el-tag size="small">规则描述</el-tag>
-            <el-input type="textarea" rows="4" v-model="form.descriptionShow" />
+            <el-input type="textarea" rows="4" v-model="form.description" />
           </el-form-item>
         </el-col>
       </el-row>
     </el-form>
     <template #footer>
       <span class="footerButton">
-        <el-button round size="mini" @click="closeDialog">取 消</el-button>
+        <el-button
+          :style="`color: #${$store.state.theme ? '000' : 'fff'}`"
+          round
+          size="mini"
+          @click="closeDialog"
+          >取 消</el-button
+        >
         <el-button round size="mini" @click="submitForm(ruleFormRef)"
           >确 定</el-button
         >
@@ -239,9 +245,9 @@
 import { ref, onMounted, reactive, computed, watch, nextTick } from "vue";
 import { ElMessageBox, ElMessage } from "element-plus";
 import {
-  //   fetchAIPointList,
-  //   fetchDIPointList,
-  //   fetchRelatePart,
+  // fetchAIPointList,
+  // fetchDIPointList,
+  fetchRelatePart,
   custombj_postSave,
   fetch_electrical_point_ai,
   fetch_electrical_point_di,
@@ -251,50 +257,52 @@ import {
 import { useStore } from "vuex";
 const store = useStore();
 const stationList = computed(() =>
-  store.state.stationListAll.map((i) => i.windType == -1)
+  store.state.stationListAll.map((i) => {
+    if (i.windType === "-1") {
+      return i;
+    }
+  })
 );
+const props = defineProps({
+  isVisible: {
+    type: Boolean,
+    defaule: false,
+  },
+  form: {
+    type: Object,
+  },
+});
 onMounted(() => {
   getfetchRelatePart();
 });
-// watch(
-//   () => props.isVisible,
-//   (val, old) => {
-//     isShow.value = val;
-//   },
-//   {
-//     deep: true,
-//   }
-// );
-// watch(
-//   () => props.form?.id,
-//   (val, old) => {
-//     if (val != "") {
-//       nextTick(async () => {
-//         getfetchAIPointList();
-//         getfetchDIPointList();
-//       });
-//     }
-//   },
-//   {
-//     deep: true,
-//   }
-// );
-// watch(
-//   () => props.form,
-//   (val, old) => {
-//     nextTick(() => {
-//       form.value = val;
-//     });
-//   },
-//   {
-//     deep: true,
-//   }
-// );
+watch(
+  () => props?.isVisible,
+  (val, old) => {
+    isShow.value = val;
+  },
+  {
+    deep: true,
+  }
+);
+watch(
+  () => props.form,
+  (val, old) => {
+    nextTick(() => {
+      form.value = val;
+      if (props.form.stationId && props.form.modelId) {
+        modelIdChange();
+      }
+    });
+  },
+  {
+    deep: true,
+  }
+);
 const isShow = ref(false);
 const form = ref({
   id: "",
   name: "",
-  descriptionShow: "",
+  description: "",
   expression: "",
   tag: "",
   rank: "",
@@ -303,7 +311,7 @@ const form = ref({
   ednaValue: "",
   category: "",
   range: 0,
-  station: "",
+  stationId: "",
   windturbine: "",
   line: "",
   project: "",
@@ -313,15 +321,6 @@ const form = ref({
   userName: "",
 });
 const emits = defineEmits(["close"]);
-const props = defineProps({
-  isVisible: {
-    type: Boolean,
-    defaule: false,
-  },
-  form: {
-    type: Object,
-  },
-});
 const toEmits = () => {
   emits("close"); // 向父组件传递数据
 };
@@ -578,8 +577,8 @@ const rules = reactive({
 });
 
 //stationChange
-const stationChange = async () => {
-  form.value.modelId = "";
+const stationChange = async (id) => {
+  form.value.stationId = id;
   getequipmentmodel_list();
 };
 //modelIdChange
@@ -595,14 +594,24 @@ const getequipmentmodel_list = async () => {
 //所属部件
 const getfetchRelatePart = async () => {
   const res = await fetchRelatePartAndAlarmType();
-  state.relatePartList = res;
+  let relatePartList = [];
+  for (let key in res.data) {
+    res.data[key].forEach((ele) => {
+      ele.disabled = ele.enable === 1;
+      relatePartList.push(ele);
+    });
+  }
+  state.relatePartList = relatePartList;
 };
 // 查询风场AI、DI测点
 const getfetchAIPointList = async () => {
-  //   const res = await fetchAIPointList(form.value.station, form.value.modelId);
-  //   state.AIPointList = res.sort(function (a, b) {
-  //     return a.uniformCode - b.uniformCode;
-  //   });
+  const res = await fetch_electrical_point_ai(
+    form.value.stationId,
+    form.value.modelId
+  );
+  state.AIPointList = res.sort(function (a, b) {
+    return a.uniformCode - b.uniformCode;
+  });
 };
 const filterAIList = computed(() =>
   state.AIPointList?.filter(
@@ -621,7 +630,10 @@ const filterDIList = computed(() =>
   )
 );
 const getfetchDIPointList = async () => {
-  const res = await fetchDIPointList(form.value.station, form.value.modelId);
+  const res = await fetch_electrical_point_di(
+    form.value.stationId,
+    form.value.modelId
+  );
   state.DIPointList = res.sort(function (a, b) {
     return a.uniformCode - b.uniformCode;
   });
@@ -662,8 +674,8 @@ const tabFuncRowClickHandle = (row) => {
   form.value.expression = result; // 赋值给表单中的的字段
 };
 //rowDbclick
-const rowDbclick = (row) => {
-  elInputSplit(row.uniformCode);
+const rowDbclick = async (row) => {
+  await elInputSplit(row.uniformCode);
 };
 // 表达式字符串拼接
 const elInputSplit = async (val) => {
@@ -678,13 +690,17 @@ const elInputSplit = async (val) => {
   elInput.focus();
   elInput.selectionStart = startPos + txtSplit.length;
   elInput.selectionEnd = startPos + txtSplit.length;
+  form.value.expression = result; // 赋值给表单中的的字段
 };
 //保存
 const save = async () => {
   const res = await custombj_postSave(form.value);
-  console.warn(res);
-  ElMessage.success(`保存成功!`);
-  closeDialog();
+  if (res.code === 200) {
+    ElMessage.success(`保存成功`);
+    closeDialog();
+  } else {
+    ElMessage.error(`保存失败`);
+  }
 };
 //提交
 const submitForm = async (formEl) => {
@@ -692,8 +708,6 @@ const submitForm = async (formEl) => {
   await formEl.validate((valid, fields) => {
     if (valid) {
       save();
-    } else {
-      console.log("error submit!", fields);
     }
   });
 };

+ 2 - 1
src/views/IntegratedAlarm/deviceConfig/components/faultmode.vue

@@ -11,7 +11,7 @@
       <el-upload
         style="display: inline-block; margin: 0 10px 10px 10px"
         class="upload-demo"
-        action="/sharding/device/faultmode/input"
+        :action="`${$store.state.baseURL}/device/faultmode/input`"
         :show-file-list="false"
         :on-success="handleSuccess"
         :on-progress="handleProgress"
@@ -38,6 +38,7 @@
     <el-table
       :data="state.faultmodeTableData"
       stripe
+      :height="`calc(100% - 38px)`"
       style="width: 100%; height: calc(100% - 38px)"
     >
       <el-table-column type="index" width="50" />

+ 1 - 0
src/views/IntegratedAlarm/deviceConfig/components/windturbine.vue

@@ -85,6 +85,7 @@
       <el-table
         :data="state.tableData"
         size="mini"
+        :height="`calc(100% - 65px)`"
         style="width: 100%; height: calc(100% - 65px)"
         stripe
       >

+ 2 - 1
src/views/IntegratedAlarm/deviceConfig/components/ycpoint.vue

@@ -45,7 +45,7 @@
       <el-upload
         class="upload-demo"
         :disabled="desc?.code == ''"
-        action="/sharding/device/input"
+        :action="`${$store.state.baseURL}/device/input`"
         :show-file-list="false"
         :on-success="handleSuccess"
         :on-progress="handleProgress"
@@ -73,6 +73,7 @@
     <el-table
       :data="state.pointTableData"
       stripe
+      :height="`calc(100% - 45px)`"
       style="width: 100%; height: calc(100% - 45px)"
     >
       <el-table-column type="index" width="50" />

+ 1 - 0
src/views/IntegratedAlarm/deviceConfig/components/yxpoint.vue

@@ -45,6 +45,7 @@
     <el-table
       :data="state.pointTableData"
       stripe
+      :height="`calc(100% - 45px)`"
       style="width: 100%; height: calc(100% - 45px)"
     >
       <el-table-column type="index" width="50" />

+ 4 - 4
src/views/IntegratedAlarm/deviceConfig/index.vue

@@ -38,20 +38,20 @@
           <el-tab-pane label="遥测点" v-if="1">
             <ycpoint />
           </el-tab-pane>
-          <el-tab-pane label="遥信点" v-if="0">
+          <el-tab-pane label="遥信点" v-if="1">
             <yxpoint />
           </el-tab-pane>
-          <el-tab-pane label="报警" v-if="0">
+          <el-tab-pane label="报警" v-if="1">
             <windturbine />
           </el-tab-pane>
-          <el-tab-pane label="预警" v-if="0">
+          <el-tab-pane label="预警" v-if="1">
             <custom />
           </el-tab-pane>
           <!-- 故障原因模块隐藏,模块内修改与新增接口异常,导入 excel 接口404 -->
           <el-tab-pane label="故障原因" v-if="0">
             <faultmode />
           </el-tab-pane>
-          <el-tab-pane label="基本信息" v-if="0">
+          <el-tab-pane label="基本信息" v-if="1">
             <message />
           </el-tab-pane>
         </el-tabs>