Selaa lähdekoodia

feat:阈值修改及刷新列表

开发 1 kuukausi sitten
vanhempi
commit
b875f1f8f5

+ 62 - 6
src/components/DaochaZhuangtai/DaochaZhuangtai.vue

@@ -46,6 +46,10 @@ const columns = ref([
     title: "报警时间",
     dataIndex: "bjsj",
   },
+  {
+    title: "报警类型",
+    dataIndex: "type",
+  },
   {
     title: "报警级别",
     dataIndex: "bjjb",
@@ -63,15 +67,25 @@ const cellStyle = ({ row, column, rowIndex, columnIndex }) => {
 const customRow = (record, index) => {
   return {
     onClick: () => {
-      console.log(record);
+      console.log(record.type);
       store.dispatch("handleDefaultPoint", {
         dcbh: record.dcbh,
         xlm: record.xlm,
         czm: record.czm,
-        type: 'gw'
+        type: record.type,
       });
       store.dispatch("handleRightPanelVisible", true);
       store.dispatch("handleLeftPanelVisible", true);
+      if (record.type === "工务") {
+        store.state.OverhaulWarning.GW = "建议工务检修";
+        store.state.OverhaulWarning.DW = "电务";
+      } else if (record.type === "功率") {
+        store.state.OverhaulWarning.DW = "建议电务检修";
+        store.state.OverhaulWarning.GW = "工务";
+      } else if (record.type === "缺口") {
+        store.state.OverhaulWarning.DW = "建议电务检修";
+        store.state.OverhaulWarning.GW = "工务";
+      }
     },
     style: {},
   };
@@ -107,7 +121,7 @@ export default {
           click: () => {
             console.log(record);
           },
-        }
+        },
       };
     },
     getJHFXacountData() {
@@ -122,10 +136,44 @@ export default {
               czm: res.rows[i].czm,
               dcbh: res.rows[i].dcbh,
               bjsj: res.rows[i].riqi,
+              type: "工务",
+              bjjb: "严重",
+            });
+          }
+        });
+
+      axios
+        .post("/EchartRouter/getglAlertList", { tbName: "t_jihefenxi_account" })
+        .then((res) => {
+          for (let i = 0; i < res.rows.length; i++) {
+            this.data.push({
+              key: i + 1,
+              xuhao: i + 1,
+              xlm: res.rows[i].xianlu,
+              czm: res.rows[i].chezhan,
+              dcbh: res.rows[i].dcbh,
+              bjsj: res.rows[i].time,
+              type: "功率",
+              bjjb: "严重",
+            });
+          }
+        });
+
+      axios
+        .post("/EchartRouter/getqkAlertList", { tbName: "t_jihefenxi_account" })
+        .then((res) => {
+          for (let i = 0; i < res.rows.length; i++) {
+            this.data.push({
+              key: i + 1,
+              xuhao: i + 1,
+              xlm: res.rows[i].xianlu,
+              czm: res.rows[i].chezhan,
+              dcbh: res.rows[i].dcbh,
+              bjsj: res.rows[i].time,
+              type: "缺口",
               bjjb: "严重",
             });
           }
-          console.log(res);
         });
     },
     getDataFun() {
@@ -160,7 +208,14 @@ export default {
         (day > 9 ? day : "0" + day)
       );
     },
-
+  },
+  watch: {
+    "$store.state.reloadAlertList": function (val) {
+      if(val || !val){
+        this.data = [];
+        this.getJHFXacountData();
+      }
+    },
   },
 };
 </script>
@@ -174,10 +229,11 @@ export default {
 .Dcpf_Box {
   position: absolute;
   height: 950rem;
-  width: 488rem;
+  width: 628rem;
   background: rgba(11, 47, 91, 1);
   z-index: 100;
   top: 130rem;
+  overflow-y: auto;
   padding: 16rem;
   transition: all 0.5s ease-in-out;
 }

+ 1 - 2
src/components/LeftPanel/GuiDaoBx/index.vue

@@ -158,13 +158,12 @@ export default {
 
   watch: {
     '$store.state.defaultPoint': function (val) {
-      if(val.type !== 'gw') return;
+      if(val.type !== '工务') return;
       this.dataarr = {
         riqi: [],
         dcqtqi: [],
         cthjfz: [],
       };
-      if(val.type !== 'gw') return;
       axios.post('/EchartRouter/getPointCurrent',{
         dcbh: val.dcbh,
         xlm: val.xlm,

+ 1 - 1
src/components/LeftPanel/JieChuWangBX/index.vue

@@ -257,7 +257,7 @@ getJHFXacountData();
 watch(
   () => store.state.defaultPoint,
   (val) => {
-    if(val.type !== 'gw') return;
+    if(val.type !== '工务') return;
     dataarr = {
       riqi: [],
       gdfz: [],

+ 1 - 1
src/components/RightPanel/GuiDaoQS/index.vue

@@ -261,7 +261,7 @@ export default {
   },
   watch: {
     "$store.state.defaultPoint": function (val) {
-      if (val.type !== "qk") return;
+      if (val.type !== "电务") return;
       this.dataarr = {
         riqi: [],
         movechange: [],

+ 1 - 1
src/components/RightPanel/JieChuWangQS/index.vue

@@ -504,7 +504,7 @@ export default {
   },
   watch: {
     "$store.state.defaultPoint": function (val) {
-      if (val.type !== "gl") return;
+      if (val.type !== "电务") return;
       this.dataarr = {
         riqi: [],
         totalworkmax: [],

+ 1 - 1
src/components/TopPanel/dataDwManage.vue

@@ -254,7 +254,7 @@ export default {
   margin-top: 10%;
   left: 25%;
   position: absolute;
-  z-index: 99;
+  z-index: 999;
 }
 
 

+ 1 - 1
src/components/TopPanel/dataManage.vue

@@ -377,7 +377,7 @@ export default {
   margin-top: 10%;
   left: 25%;
   position: absolute;
-  z-index: 99;
+  z-index: 999;
 }
 
 .queryParam {

+ 1 - 1
src/components/TopPanel/dataQkManage.vue

@@ -242,7 +242,7 @@ export default {
   margin-top: 10%;
   left: 25%;
   position: absolute;
-  z-index: 99;
+  z-index: 999;
 }
 
 .queryParam {

+ 168 - 82
src/components/TopPanel/yuzhixiugai.vue

@@ -40,9 +40,7 @@
           <li>TQI阈值 :</li>
         </a-col>
         <a-col :span="12"
-          ><a-input
-            v-model:value="selectindex.selectedRows[0].tqi"
-            placeholder=""
+          ><a-input v-model:value="selectindex.selectedRows[0].tqi" placeholder=""
         /></a-col>
       </a-row>
 
@@ -51,9 +49,7 @@
           <li>TQI变化阈值 :</li>
         </a-col>
         <a-col :span="12"
-          ><a-input
-            v-model:value="selectindex.selectedRows[0].tqibh"
-            placeholder=""
+          ><a-input v-model:value="selectindex.selectedRows[0].tqibh" placeholder=""
         /></a-col>
       </a-row>
       <a-row>
@@ -61,9 +57,7 @@
           <li>高低阈值 :</li>
         </a-col>
         <a-col :span="12"
-          ><a-input
-            v-model:value="selectindex.selectedRows[0].gdyz"
-            placeholder=""
+          ><a-input v-model:value="selectindex.selectedRows[0].gdyz" placeholder=""
         /></a-col>
       </a-row>
 
@@ -72,9 +66,7 @@
           <li>高低变化阈值 :</li>
         </a-col>
         <a-col :span="12"
-          ><a-input
-            v-model:value="selectindex.selectedRows[0].gdbhyz"
-            placeholder=""
+          ><a-input v-model:value="selectindex.selectedRows[0].gdbhyz" placeholder=""
         /></a-col>
       </a-row>
 
@@ -83,9 +75,7 @@
           <li>轨向阈值 :</li>
         </a-col>
         <a-col :span="12"
-          ><a-input
-            v-model:value="selectindex.selectedRows[0].gxyz"
-            placeholder=""
+          ><a-input v-model:value="selectindex.selectedRows[0].gxyz" placeholder=""
         /></a-col>
       </a-row>
 
@@ -94,9 +84,7 @@
           <li>水平阈值 :</li>
         </a-col>
         <a-col :span="12"
-          ><a-input
-            v-model:value="selectindex.selectedRows[0].spyz"
-            placeholder=""
+          ><a-input v-model:value="selectindex.selectedRows[0].spyz" placeholder=""
         /></a-col>
       </a-row>
 
@@ -105,9 +93,7 @@
           <li>水平变化阈值 :</li>
         </a-col>
         <a-col :span="12"
-          ><a-input
-            v-model:value="selectindex.selectedRows[0].spbhyz"
-            placeholder=""
+          ><a-input v-model:value="selectindex.selectedRows[0].spbhyz" placeholder=""
         /></a-col>
       </a-row>
 
@@ -116,9 +102,7 @@
           <li>三角坑阈值 :</li>
         </a-col>
         <a-col :span="12"
-          ><a-input
-            v-model:value="selectindex.selectedRows[0].sjkyz"
-            placeholder=""
+          ><a-input v-model:value="selectindex.selectedRows[0].sjkyz" placeholder=""
         /></a-col>
       </a-row>
 
@@ -127,9 +111,7 @@
           <li>三角坑变化阈值 :</li>
         </a-col>
         <a-col :span="12"
-          ><a-input
-            v-model:value="selectindex.selectedRows[0].sjkbhyz"
-            placeholder=""
+          ><a-input v-model:value="selectindex.selectedRows[0].sjkbhyz" placeholder=""
         /></a-col>
       </a-row>
 
@@ -138,14 +120,12 @@
           <li>晃车阈值 :</li>
         </a-col>
         <a-col :span="12"
-          ><a-input
-            v-model:value="selectindex.selectedRows[0].hcyz"
-            placeholder=""
+          ><a-input v-model:value="selectindex.selectedRows[0].hcyz" placeholder=""
         /></a-col>
       </a-row>
 
       <a-row class="button">
-        <a-button class="xiugaisure" @click="sure">确定</a-button>
+        <a-button class="xiugaisure" @click="sure('gw')">确定</a-button>
         <a-button class="xiugaicancle" @click="cancle">取消</a-button>
       </a-row>
     </div>
@@ -153,82 +133,156 @@
     <div class="prompt" v-if="promptclose2">
       <a-row>
         <a-col :span="12">
-          <li>缺口变化(天) :</li>
+          <li>搬动前后变化量 :</li>
+        </a-col>
+        <a-col :span="12"
+          ><a-input v-model:value="selectindex.selectedRows[0].passchange" placeholder=""
+        /></a-col>
+      </a-row>
+
+      <a-row>
+        <a-col :span="12">
+          <li>过车变化量 :</li>
+        </a-col>
+        <a-col :span="12"
+          ><a-input v-model:value="selectindex.selectedRows[0].change" placeholder=""
+        /></a-col>
+      </a-row>
+      <a-row>
+        <a-col :span="12">
+          <li>过车前后变化量 :</li>
+        </a-col>
+        <a-col :span="12"
+          ><a-input v-model:value="selectindex.selectedRows[0].movechange" placeholder=""
+        /></a-col>
+      </a-row>
+
+      <a-row>
+        <a-col :span="12">
+          <li>转换总功最大值 :</li>
         </a-col>
         <a-col :span="12"
           ><a-input
-            v-model:value="selectindex.selectedRows[0].qkbh"
+            v-model:value="selectindex.selectedRows[0].totalworkmax"
             placeholder=""
         /></a-col>
       </a-row>
 
       <a-row>
         <a-col :span="12">
-          <li>转换功率波动均值(天) :</li>
+          <li>转换总功最小值 :</li>
         </a-col>
         <a-col :span="12"
           ><a-input
-            v-model:value="selectindex.selectedRows[0].zhglbdjz"
+            v-model:value="selectindex.selectedRows[0].totalworkmin"
             placeholder=""
         /></a-col>
       </a-row>
+
       <a-row>
         <a-col :span="12">
-          <li>转换功率均值(天) :</li>
+          <li>转换总功平均值 :</li>
         </a-col>
         <a-col :span="12"
           ><a-input
-            v-model:value="selectindex.selectedRows[0].passchange"
+            v-model:value="selectindex.selectedRows[0].totalworkavg"
             placeholder=""
         /></a-col>
       </a-row>
 
       <a-row>
         <a-col :span="12">
-          <li>转换功率峰值(天) :</li>
+          <li>总功变化率最大值 :</li>
         </a-col>
         <a-col :span="12"
           ><a-input
-            v-model:value="selectindex.selectedRows[0].zhglfz"
+            v-model:value="selectindex.selectedRows[0].changeratemax"
             placeholder=""
         /></a-col>
       </a-row>
-
       <a-row>
         <a-col :span="12">
-          <li>锁闭功率波动均值(天) :</li>
+          <li>总功变化率最小值 :</li>
         </a-col>
         <a-col :span="12"
           ><a-input
-            v-model:value="selectindex.selectedRows[0].sbglbdjz"
+            v-model:value="selectindex.selectedRows[0].changeratemin"
             placeholder=""
         /></a-col>
       </a-row>
-
       <a-row>
         <a-col :span="12">
-          <li>锁闭功率均值(天) :</li>
+          <li>总功变化率平均值 :</li>
         </a-col>
         <a-col :span="12"
           ><a-input
-            v-model:value="selectindex.selectedRows[0].sbgljz"
+            v-model:value="selectindex.selectedRows[0].changerateavg"
             placeholder=""
         /></a-col>
       </a-row>
-
       <a-row>
         <a-col :span="12">
-          <li>锁闭功率峰值(天) :</li>
+          <li>最大功率偏移值最大值 :</li>
         </a-col>
         <a-col :span="12"
           ><a-input
-            v-model:value="selectindex.selectedRows[0].sbglfz"
+            v-model:value="selectindex.selectedRows[0].offsetvaluemax"
+            placeholder=""
+        /></a-col>
+      </a-row>
+      <a-row>
+        <a-col :span="12">
+          <li>最大功率偏移值最小值 :</li>
+        </a-col>
+        <a-col :span="12"
+          ><a-input
+            v-model:value="selectindex.selectedRows[0].offsetvaluemin"
+            placeholder=""
+        /></a-col>
+      </a-row>
+      <a-row>
+        <a-col :span="12">
+          <li>最大功率偏移值平均值 :</li>
+        </a-col>
+        <a-col :span="12"
+          ><a-input
+            v-model:value="selectindex.selectedRows[0].offsetvalueavg"
+            placeholder=""
+        /></a-col>
+      </a-row>
+      <a-row>
+        <a-col :span="12">
+          <li>功率方差最大值 :</li>
+        </a-col>
+        <a-col :span="12"
+          ><a-input
+            v-model:value="selectindex.selectedRows[0].powervariancemax"
+            placeholder=""
+        /></a-col>
+      </a-row>
+      <a-row>
+        <a-col :span="12">
+          <li>功率方差最小值 :</li>
+        </a-col>
+        <a-col :span="12"
+          ><a-input
+            v-model:value="selectindex.selectedRows[0].powervariancemin"
+            placeholder=""
+        /></a-col>
+      </a-row>
+      <a-row>
+        <a-col :span="12">
+          <li>功率方差平均值 :</li>
+        </a-col>
+        <a-col :span="12"
+          ><a-input
+            v-model:value="selectindex.selectedRows[0].powervarianceavg"
             placeholder=""
         /></a-col>
       </a-row>
 
       <a-row class="button">
-        <a-button class="xiugaisure" @click="sure">确定</a-button>
+        <a-button class="xiugaisure" @click="sure('dw')">确定</a-button>
         <a-button class="xiugaicancle" @click="cancle">取消</a-button>
       </a-row>
     </div>
@@ -440,36 +494,69 @@ export default {
     },
 
     //修改确定
-    sure() {
-      let param = {
-        tbName: "t_point_list",
-        id: this.selectindex.selectedRows[0].id,
-        tqi: this.selectindex.selectedRows[0].tqi,
-        tqibh: this.selectindex.selectedRows[0].tqibh,
-        gdyz: this.selectindex.selectedRows[0].gdyz,
-        gdbhyz: this.selectindex.selectedRows[0].gdbhyz,
-        gxyz: this.selectindex.selectedRows[0].gxyz,
-        spyz: this.selectindex.selectedRows[0].spyz,
-        spbhyz: this.selectindex.selectedRows[0].spbhyz,
-        sjkyz: this.selectindex.selectedRows[0].sjkyz,
-        sjkbhyz: this.selectindex.selectedRows[0].sjkbhyz,
-        hcyz: this.selectindex.selectedRows[0].hcyz,
-      };
-      const url = "/EchartRouter/updateyuzhi";
-      // 前后端连接
-      axios.post(url, param).then((res) => {});
-      setTimeout(function () {
-        this.initTable();
-      }, 600);
-
-      this.promptclose = false;
-      this.promptclose2 = false;
+    sure(type) {
+      if (type === "gw") {
+        let param = {
+          tbName: "t_point_list",
+          id: this.selectindex.selectedRows[0].id,
+          tqi: this.selectindex.selectedRows[0].tqi,
+          tqibh: this.selectindex.selectedRows[0].tqibh,
+          gdyz: this.selectindex.selectedRows[0].gdyz,
+          gdbhyz: this.selectindex.selectedRows[0].gdbhyz,
+          gxyz: this.selectindex.selectedRows[0].gxyz,
+          spyz: this.selectindex.selectedRows[0].spyz,
+          spbhyz: this.selectindex.selectedRows[0].spbhyz,
+          sjkyz: this.selectindex.selectedRows[0].sjkyz,
+          sjkbhyz: this.selectindex.selectedRows[0].sjkbhyz,
+          hcyz: this.selectindex.selectedRows[0].hcyz,
+        };
+        const url = "/EchartRouter/updateyuzhi";
+        // 前后端连接
+        axios.post(url, param).then((res) => {
+          setTimeout(function () {
+            this.initTable();
+          }, 600);
+          this.promptclose = false;
+
+          this.$store.dispatch("handleReloadAlertList", !this.$store.state.reloadAlertList);
+        });
+      } else {
+        let param = {
+          tbName: "t_point_list_dianwuyuzhi",
+          id: this.selectindex.selectedRows[0].id,
+          passchange: this.selectindex.selectedRows[0].passchange,
+          change: this.selectindex.selectedRows[0].change,
+          movechange: this.selectindex.selectedRows[0].movechange,
+          totalworkmax: this.selectindex.selectedRows[0].totalworkmax,
+          totalworkmin: this.selectindex.selectedRows[0].totalworkmin,
+          totalworkavg: this.selectindex.selectedRows[0].totalworkavg,
+          changeratemax: this.selectindex.selectedRows[0].changeratemax,
+          changeratemin: this.selectindex.selectedRows[0].changeratemin,
+          changerateavg: this.selectindex.selectedRows[0].changerateavg,
+          offsetvaluemax: this.selectindex.selectedRows[0].offsetvaluemax,
+          offsetvaluemin: this.selectindex.selectedRows[0].offsetvaluemin,
+          offsetvalueavg: this.selectindex.selectedRows[0].offsetvalueavg,
+          powervariancemax: this.selectindex.selectedRows[0].powervariancemax,
+          powervariancemin: this.selectindex.selectedRows[0].powervariancemin,
+          powervarianceavg: this.selectindex.selectedRows[0].powervarianceavg,
+        };
+        const url = "/EchartRouter/updateDwyuzhi";
+        // 前后端连接
+        axios.post(url, param).then((res) => {
+          setTimeout(function () {
+            this.initTable();
+          }, 600);
+          this.promptclose2 = false;
+          this.$store.dispatch("handleReloadAlertList", !this.$store.state.reloadAlertList);
+        });
+      }
     },
 
     //修改框关闭
     cancle() {
       this.initTable();
       this.promptclose = false;
+      this.promptclose2 = false;
       this.selectindex = {};
       this.selectedRowKeys = [];
     },
@@ -484,10 +571,10 @@ export default {
       }
 
       if (this.promptclose != this.promtclose && this.selectindex != false) {
-        if(this. activeKey === "1"){
-          this.promptclose =!this.promptclose;
-        }else{
-          this.promptclose2 =!this.promptclose2;
+        if (this.activeKey === "1") {
+          this.promptclose = !this.promptclose;
+        } else {
+          this.promptclose2 = !this.promptclose2;
         }
       }
     },
@@ -531,6 +618,7 @@ export default {
   padding: 16rem;
   z-index: 999;
   opacity: 1;
+  overflow: auto;
 }
 
 .ceshi .prompt li {
@@ -618,11 +706,9 @@ export default {
   color: aqua;
 }
 
-:deep(
-    .ant-table-tbody
-      > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
-      > td
-  ) {
+:deep(.ant-table-tbody
+    > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
+    > td) {
   background: #d03016;
 }
 

+ 5 - 0
src/store/actions.js

@@ -89,6 +89,11 @@ export default {
   }, params) {
     commit('handleDefaultPoint', params);
   },
+  handleReloadAlertList({
+    commit,
+  }, params) {
+    commit('handleReloadAlertList', params);
+  },
   closeBXDivEmit({
     commit,
   }, params) {

+ 1 - 0
src/store/index.js

@@ -24,6 +24,7 @@ export default createStore({
     showDataManage: false, //数据管理模块 显隐
     showDwDataManage: false, //功率数据管理模块 显隐
     showQkDataManage: false, //缺口数据管理模块 显隐
+    reloadAlertList: false, //刷新
     clearMap: {
       val: 0,
       excludes: '',

+ 3 - 0
src/store/mutations.js

@@ -69,6 +69,9 @@ export default {
   handleDefaultPoint(state, params) {
     state.defaultPoint = params;
   },
+  handleReloadAlertList(state, params) {
+    state.reloadAlertList = params;
+  },
   closeBXDivEmit(state, params) {
     state.BXechartShow_dxzb = params;
   },