Procházet zdrojové kódy

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

mw_666 před 3 roky
rodič
revize
5689af87e8

+ 3 - 0
src/App.vue

@@ -482,4 +482,7 @@ body {
 .el-tree-node__label{
   font-size: 18px !important;
 }
+.el-pagination.is-background .el-pager li:not(.disabled).active{
+  background-color: #05bb4c !important;
+}
 </style>

+ 88 - 54
src/api/api.js

@@ -3,25 +3,25 @@ import request from './zmaxios.js'
 
 //获取服务端公钥
 export const getPublickey = query => {
-        return request.get(`/info/publickey`);
+        return request.get(`info/publickey`);
     }
     // login
 export const loginRequest = params => {
-    return request.post("/user/login", params);
+    return request.post("user/login", params);
 };
 //register
 export const registerRequest = params => {
-    return request.post("/user/register", params);
+    return request.post("user/registers", params);
 };
 // ----------------------------------------user------------------------------------------------
 export const getUserList = () => {
-    return request.get(`/user/get`);
+    return request.get(`user/getall`);
 }
 export const editRequest = params => {
-    return request.post("/user/edit", params);
+    return request.post("user/edituser", params);
 };
 export const deleteUser = data => {
-        return request.delete(`/user/${data}`);
+        return request.delete(`user/${data}`);
     }
     // ----------------------------------------user------------------------------------------------
 
@@ -29,75 +29,109 @@ export const deleteUser = data => {
 //获取所有风场
 export const fetchStationList = () => {
     return request({
-        url: '/' + 'info/station',
+        url: '' + 'info/station',
         method: 'get'
     });
 };
 //根据风场id获取所有风机
 export const fetchWindturbineList = query => {
     return request({
-        url: '/' + 'info/windturbine',
+        url: '' + 'info/windturbine',
         method: 'get',
         params: {
             stationId: query
         }
     });
 };
-// ----------------------------------------基础数据- 设备管理------------------------------------------------
-//查询全部设备型号接口
+// ----------------------------------------安全生产- 报警记录------------------------------------------------
+//查询历史报警
+export const alarm_history = (params) => {
+        return request({
+            url: `alarm/history/page2`,
+            params: params
+        });
+    }
+    //查报警
+export const alarm_snap = (params) => {
+        return request({
+            url: `alarm/snap`,
+            params: params
+        });
+    }
+    // ----------------------------------------安全生产- 实时报警------------------------------------------------
+    //实时故障 最高级
+export const alarm_fault_recent = (params) => {
+        return request({
+            url: `fault/recent`,
+            params: params
+        });
+    }
+    //实时故障 第一次请求
+export const alarm_fault_top = (params) => {
+        return request({
+            url: `fault/snap/top`,
+            params: params
+        });
+    }
+    //底下的实时报警 
+export const alarm_snap_top = (params) => {
+        return request({
+            url: `alarm/snap/top`,
+            params: params
+        });
+    }
+    // ----------------------------------------基础数据- 设备管理------------------------------------------------
+    //查询全部设备型号接口
 export const device_list = () => {
-        return request.get(`/device/model/list`);
+        return request.get(`device/model/list`);
     }
     //获取结构tree
 export function tree(params) {
     return request({
-        url: '/device/structure/tree/windturbine',
+        url: 'device/structure/tree/windturbine',
         method: 'get',
     });
 }
 //根据结构获取测点
-export function point(params) {
-    return request({
-        url: `/device/metrics/windturbine/${params}`,
-        method: 'get',
-    });
+export function point(code, pagenum, pagesize) {
+    return request.get(`device/metrics/page?pagenum=${pagenum}&pagesize=${pagesize}&deviceId=windturbine&structureCode=${code}`);
 }
 //测点新增
 export function metrics(params) {
-    return request.post(`/device/metrics/single`, params);
+    return request.post(`device/metrics/single`, params);
 }
 //测点删除
 export function delmetrics(params) {
-    return request.delete(`/device/metrics/single/delete/${params}`);
+    return request.delete(`device/metrics/single/delete/${params}`);
 }
 
 //tree新增 添加一个设备结构节点
 export function treeAdd(params) {
-    return request.post(`/device/structure`, params);
+    return request.post(`device/structure`, params);
 }
 //tree删除 tree删除一个设备结构节点
 export function treeDel(params) {
-    return request.delete(`/device/structure/delete/${params}`);
+    return request.delete(`device/structure/delete/${params}`);
 }
 
 
 // 故障模式
 // get All
 export const faultmode_windturbine = () => {
-        return request.get(`/device/faultmode/windturbine`);
+        return request.get(`device/faultmode/windturbine`);
     }
     // 根据 structurecode get
 export const faultmode_structurecode = params => {
-        return request.get(`/device/faultmode/windturbine/${params}`);
+        return request.get(`device/faultmode/windturbine/${params}`);
     }
     // 根据 id delete
 export const faultmode_delete = params => {
-    return request.delete(`/device/faultmode/delete/${params}`);
+    return request.delete(`device/faultmode/delete/${params}`);
 }
 
 // 新增 修改
 export const faultmode_add_edit = data => {
-    return request.post(`/device/faultmode`, data);
+    return request.post(`device/faultmode`, data);
 }
 
 // ----------------------------------------end 基础数据- 风机管理------------------------------------------------
@@ -105,7 +139,7 @@ export const faultmode_add_edit = data => {
 
 // ---------------------------------------- 报警配置- 自定义预警------------------------------------------------
 export function custombj_fetchTableData(params) {
-    return request.get(`/alertrule2/page/`, {
+    return request.get(`alertrule2/page/`, {
         params: params
     });
 }
@@ -113,7 +147,7 @@ export function custombj_fetchTableData(params) {
 //根据场站编号,风机型号获取AI测点
 export const fetchAIPointList = (stationId, modelId) => {
     return request({
-        url: '/' + 'info/testing_point_ai',
+        url: '' + 'info/testing_point_ai',
         method: 'get',
         params: {
             stationId: stationId,
@@ -124,7 +158,7 @@ export const fetchAIPointList = (stationId, modelId) => {
 //根据场站编号,风机型号获取DI测点
 export const fetchDIPointList = (stationId, modelId) => {
     return request({
-        url: '/' + 'info/testing_point_di',
+        url: '' + 'info/testing_point_di',
         method: 'get',
         params: {
             stationId: stationId,
@@ -135,7 +169,7 @@ export const fetchDIPointList = (stationId, modelId) => {
 //根据场站编号,获取电气DI测点
 export const fetchElectricDIPointList = (stationId) => {
     return request({
-        url: '/' + 'info/electrical_point_di',
+        url: '' + 'info/electrical_point_di',
         method: 'get',
         params: {
             stationId: stationId
@@ -145,7 +179,7 @@ export const fetchElectricDIPointList = (stationId) => {
 //根据电气测点,获取测点信息
 export const fetchElectricDIPointByPointId = (pointId) => {
     return request({
-        url: '/' + 'info/electrical_point_di/byId',
+        url: '' + 'info/electrical_point_di/byId',
         method: 'get',
         params: {
             pointId: pointId
@@ -156,14 +190,14 @@ export const fetchElectricDIPointByPointId = (pointId) => {
 //获取风机关联部件列表
 export const fetchRelatePart = () => {
     return request({
-        url: '/' + 'info/windturbine_parts',
+        url: '' + 'info/windturbine_parts',
         method: 'get',
     });
 };
 //根据风场编号获取电气AI测点
 export const fetch_electrical_point_ai = (stationId) => {
     return request({
-        url: '/' + 'info/electrical_point_ai',
+        url: '' + 'info/electrical_point_ai',
         method: 'get',
         params: {
             stationId: stationId
@@ -173,7 +207,7 @@ export const fetch_electrical_point_ai = (stationId) => {
 //根据风场编号获取电气DI测点
 export const fetch_electrical_point_di = (stationId) => {
     return request({
-        url: '/' + 'info/electrical_point_di',
+        url: '' + 'info/electrical_point_di',
         method: 'get',
         params: {
             stationId: stationId
@@ -183,66 +217,66 @@ export const fetch_electrical_point_di = (stationId) => {
 //获取报警类型
 export const fetchWarningType = () => {
     return request({
-        url: '/' + 'info/warning_type',
+        url: '' + 'info/warning_type',
         method: 'get',
     });
 };
 //获取报警种类
 export const fetchWarningClassify = () => {
     return request({
-        url: '/' + 'info/warning_classify',
+        url: '' + 'info/warning_classify',
         method: 'get',
     });
 };
 export const custombj_batchImport = list => {
-    return Axrequestios.post('/' + "alertrule2/save-batch", list);
+    return Axrequestios.post('' + "alertrule2/save-batch", list);
 };
 export const custombj_postSave = form => {
-    return request.post('/' + "alertrule2/save", form)
+    return request.post('' + "alertrule2/save", form)
 };
 
 //******************************end****************************************//
 
 
-//******************************升压站报警************************************//
+//******************************升压站报警API************************************//
 
 export const scadabj_fetchTableData = query => {
     return request({
-        url: '/' + 'scadabj/page',
+        url: '' + 'scadabj/page',
         method: 'get',
         params: query,
         timeout: 20000,
     });
 };
 export const scadabj_postSave = objData => {
-    return request.post('/' + "scadabj/save", objData);
+    return request.post('' + "scadabj/save", objData);
 };
 export const scadabj_batchImport = list => {
-    return request.post('/' + "scadabj/save-batch", list);
+    return request.post('' + "scadabj/save-batch", list);
 };
 //********************************************end********************************//\
 
 
 
-//******************************风机报警************************************//
+//******************************风机报警API************************************//
 export const windturbinebj_fetchTableData = query => {
     return request({
-        url: '/' + 'warning2/page',
+        url: '' + 'warning2/page',
         method: 'get',
         params: query,
         timeout: 20000,
     });
 };
 export const windturbinebj_postSave = form => {
-    return Axios.post('/' + 'warning2/save', form);
+    return Axios.post('' + 'warning2/save', form);
 };
 export const windturbinebj_batchImport = list => {
-    return Axios.post('/' + "warning2/save-batch", list);
+    return Axios.post('' + "warning2/save-batch", list);
 };
 
 export const fetchLeaf = () => {
     return request({
-        url: '/' + 'warning2/page',
+        url: '' + 'warning2/page',
         method: 'get',
         params: {
             pagenum: 1,
@@ -256,7 +290,7 @@ export const fetchLeaf = () => {
 //根据风机型号获取DI测点统一编码相关数据 testingpointdi2
 export const getDIPointByModelId = query => {
     return request({
-        url: '/' + 'info/testing_point_di',
+        url: '' + 'info/testing_point_di',
         method: 'get',
         params: query
     });
@@ -265,25 +299,25 @@ export const getDIPointByModelId = query => {
 //******************************end*******************************************// 
 //******************************预警统计*******************************************//
 export const statistics_querymap = params => {
-    return request.get(`/alarm/count/querymap2`, { params: params })
-        // return request.get(`/alarm/count/querymap2?stationid=XS_FDC&datebegin=2021-10-12&dateend=2021-11-13`)
+    return request.get(`alarm/count/querymap2`, { params: params })
+        // return request.get(`alarm/count/querymap?stationid=XS_FDC&datebegin=2021-10-12&dateend=2021-11-13`)
 };
 export const statistics_querybyname = params => {
-    return request.get('/alarm/count/querybyname2', { params: params })
+    return request.get('alarm/count/querybyname2', { params: params })
 };
 export const statistics_lineandproject = params => {
-    return request.get('/alarm/count/lineandproject2', { params: params })
+    return request.get('alarm/count/lineandproject2', { params: params })
 };
 //******************************end*******************************************//
 
 //******************************预警分析*******************************************//
 export const warning_query_new = params => {
-    return request.get(`/alarm/count/query/new2`, { params: params })
+    return request.get(`alarm/count/query/new2`, { params: params })
 };
 export const warning_detail = params => {
-    return request.get('/analysis/detail', { params: params })
+    return request.get('analysis/detail', { params: params })
 };
 // export const statistics_lineandproject = params => {
-//     return request.get('/alarm/count/lineandproject2', { params: params })
+//     return request.get('alarm/count/lineandproject', { params: params })
 // };
 //******************************end*******************************************//

+ 1 - 1
src/api/zmaxios.js

@@ -3,7 +3,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
 
 // 配置新建一个 axios 实例
 const service = axios.create({
-    baseURL: 'http://192.168.1.14:8075',
+    baseURL: 'http://192.168.1.18:8075',
     timeout: 50000,
     headers: { 'Content-Type': 'application/json' },
 });

+ 23 - 5
src/views/Home/Home.vue

@@ -47,6 +47,8 @@
           :data="fcmap"
           :xtData="xtmap"
           @mapClick="changeShowType"
+          @mapClicks="changeShowTypes"
+          @mapClickBack="changeShowBackType"
           @backStation="onBackStation"
         ></Map>
       </div>
@@ -867,6 +869,8 @@ export default {
   },
   data() {
     return {
+      historyWpId: '',
+      historyPlanBtnName:'',
       timmer: null, // 计时器
       timmer2: null,
       timmer3: null,
@@ -1190,6 +1194,11 @@ export default {
               smooth: true,
               value: [],
             },
+            {
+              title: "72小时预测功率",
+              smooth: true,
+              value: [],
+            },
           ];
 
           rdlKey.forEach((keyEle, keyIndex) => {
@@ -1218,19 +1227,27 @@ export default {
 
     // 点击地图展示类型
     changeShowType(wpId, planBtnName) {
-      this.wpName = planBtnName;
-      this.planBtnName = planBtnName;
+      this.wpName = planBtnName?planBtnName:this.wpName;
+      this.planBtnName = planBtnName?planBtnName:this.planBtnName;
       this.jczbmap = {};
       clearInterval(this.timmer);
       this.timmer = null;
-      this.wpId = wpId;
+      this.wpId = wpId?wpId:this.wpId;
+      
       this.requestData(false);
       this.getCharts();
       this.timmer = setInterval(() => {
         this.requestData(false);
       }, this.$store.state.websocketTimeSec);
     },
-
+    changeShowTypes(wpId,planBtnName){
+      this.historyWpId = wpId
+      this.historyPlanBtnName = planBtnName
+      this.changeShowType(wpId,planBtnName);
+    },
+    changeShowBackType(){
+      this.changeShowType(this.historyWpId,this.historyPlanBtnName);
+    },
     // 打开弹窗
     openDialog(dialogTitle, subUrl, targetName, dialogType) {
       this.dialogTitle = dialogTitle;
@@ -1320,9 +1337,10 @@ export default {
     showDoneChart(res) {
       this.dialogTitle = res.dialogTitle;
       this.dialogType = res.dialogType;
-
       this.doneLineChartData = res.data;
+      this.doneLineChartData.units[0] = this.doneLineChartData.units[0]?this.doneLineChartData.units[0]:'(万KWh)';
       this.dialogShow = true;
+      console.log(this.doneLineChartData)
     },
 
     // 地图进入事件

+ 1 - 1
src/views/Home/components/coulometric-analysis.vue

@@ -26,7 +26,7 @@
         <div class="coulometric-info">
           <svg-icon svgid="svg-arrow-down" class="icon yellow" />
           <span class="title gray">避免故障</span>
-          <span class="value">{{ bmgz_ }}</span>
+          <span class="value">{{ bmgz_ }}</span>
         </div>
         <percent-card :value="jdl_" color="yellow" title="降低率" />
         <card-1

+ 2 - 3
src/views/Home/components/map.vue

@@ -268,13 +268,13 @@ export default {
       let wpId = showType === "all" ? "0" : showType === "fc" ? "-1" : "-2";
       this.safeDay = "---";
       this.mapName = "nx";
-      this.$emit("mapClick", wpId, this.tabs[index].text);
+      this.$emit("mapClicks", wpId, this.tabs[index].text);
     },
     backMap(wpId, planBtnName) {
       this.currentMode = "NX";
       this.mapName = "nx";
       this.mapIndex = -1;
-      this.$emit("mapClick", wpId, planBtnName);
+      this.$emit("mapClickBack");
     },
     clickLabel(wpId, planBtnName) {
       this.mapName = wpId;
@@ -311,7 +311,6 @@ export default {
       this.safeDay = res;
     },
     data(res) {
-		console.log(res)
       this.sourceMap = res;
     },
     xtData(res) {

+ 2 - 2
src/views/Home/components/weather.vue

@@ -80,8 +80,8 @@ export default {
       visibility: "20KM", //能见度
       humidity: "75.0%", // 湿度
       pressure: "994kPa", // 气压
-      sunrise: "04:06", // 日出
-      sunset: "18:50", // 日落
+      sunrise: "08:10", // 日出
+      sunset: "17:39", // 日落
     };
   },
 

+ 2 - 12
src/views/Status/Status.vue

@@ -57,7 +57,7 @@ export default {
         column: [
           {
             name: "场站名称",
-            field: "wpName",
+            field: "address",
             unit: "",
             is_num: false,
             is_light: false,
@@ -202,7 +202,7 @@ export default {
         column: [
           {
             // name: "场站名称",
-            field: "wpName",
+            field: "address",
             unit: "",
             is_num: false,
             is_light: false,
@@ -503,7 +503,6 @@ export default {
         subUrl: "monitor/monitor",
         success(res) {
           if (res.data) {
-            // console.log("resData:", res.data);
             let sourceMap = res.data;
             let datas = [];
             let data = [];
@@ -514,7 +513,6 @@ export default {
               that.wpId1 = sourceMap.vos.find((findEle) => {
                 return findEle.wpName === ele.name;
               }).wpId;
-              // console.log('wpid1:',that.wpId1)
               datas.push({
                 title: ele.name,
                 wpId: sourceMap.vos.find((findEle) => {
@@ -603,9 +601,7 @@ export default {
             });
             data2.push(zj[0]);
             fdcArr.push(fdhj[0]);
-            //  console.log(fdcArr)
             fdcArr.forEach((ele) => {
-              // console.log('vos:', sourceMap.vos)
               ele.row_span = [];
               ele.col_span = [];
               ele.is_light = false;
@@ -620,9 +616,7 @@ export default {
               return ele.wpId.includes("-2");
             });
             gdcArr.push(gdhj[0]);
-            //  console.log(gdcArr)
             gdcArr.forEach((ele) => {
-              // console.log('vos:', sourceMap.vos)
               ele.row_span = [];
               ele.col_span = [];
               ele.is_light = false;
@@ -630,7 +624,6 @@ export default {
             });
 
             // sourceMap.vos.forEach((ele) => {
-            //   // console.log('vos:', sourceMap.vos)
             //   ele.row_span = [];
             //   ele.col_span = [];
             //   ele.is_light = false;
@@ -638,7 +631,6 @@ export default {
             // });
 
             //  for(let i=0;i<sourceMap.vos.length;i++){
-            //     //  console.log('vos:',sourceMap.vos)
             //      data.push(sourceMap.vos[0],sourceMap.vos[1],sourceMap.vos[2],sourceMap.vos[3],sourceMap.vos[4],sourceMap.vos[5],sourceMap.vos[11])
             //      data1.push(sourceMap.vos[6],sourceMap.vos[7],sourceMap.vos[8],sourceMap.vos[9],sourceMap.vos[10],sourceMap.vos[11])
             //  }
@@ -646,8 +638,6 @@ export default {
             // //  that.unique(data1,sourceMap.vos.find((findEle) => {
             // //         return findEle.wpName === ele.name;
             // //       }).wpId);
-            //  console.log('vosData:',data);
-            // //  console.log('vosData1:',data1)
 
             that.sourceMap = sourceMap;
             that.datas = datas;

+ 1 - 1
src/views/device/device.vue

@@ -753,7 +753,7 @@ const export2Excel = () => {
 };
 const query = reactive({
   page: 1,
-  limit: 10,
+  limit: 15,
 });
 let pageTotal = ref(0);
 // 分页导航