فهرست منبع

大海泽-瓦斯巡检更新

lxh 19 ساعت پیش
والد
کامیت
2171e59ada

+ 1 - 1
common/util/websocket.js

@@ -106,6 +106,6 @@ function startHeartbeat() {
     }).catch(() => {
       clearInterval(heartbeatTimer);
     });
-  }, 3*60000);
+  }, 60000);
 }
 

+ 42 - 14
pages/gasreport/components/gasFill.vue

@@ -206,7 +206,7 @@ export default {
             nfcShow: true,//是否使用NFC
             isDisabled: false,
             isStatus: '',
-            deviceId: '',
+            deviceId: '1',
             rangeBc: [
                 { value: '夜班', text: "夜班" },
                 { value: '早班', text: "早班" },
@@ -381,7 +381,7 @@ export default {
                         jcdd: that.formState.jcdd,
                         jcy: that.formState.jcy,
                         time: that.formState.time,
-                        ch4: that.saveShowList.bxySdzNoon1 || '',
+                        ch4: that.saveShowList.ch4Noon1 || '',
                         co2: that.saveShowList.co2Noon1 || '',
                         co: that.saveShowList.coNoon1 || '',
                         o2: that.saveShowList.o2Noon1 || '',
@@ -423,7 +423,7 @@ export default {
                         jcdd: that.formState.jcdd,
                         jcy: that.formState.jcy,
                         time: that.formState.time,
-                        ch4: that.saveShowList.bxySdzNoon2 || '',
+                        ch4: that.saveShowList.ch4Noon2 || '',
                         co2: that.saveShowList.co2Noon2 || '',
                         co: that.saveShowList.coNoon2 || '',
                         o2: that.saveShowList.o2Noon2 || '',
@@ -639,7 +639,7 @@ export default {
                         jcdd: that.formState.jcdd,
                         jcy: that.formState.jcy,
                         time: that.formState.time,
-                        ch4: that.saveShowList.bxySdzNoon1 || '',
+                        ch4: that.saveShowList.ch4Noon1 || '',
                         co2: that.saveShowList.co2Noon1 || '',
                         co: that.saveShowList.coNoon1 || '',
                         o2: that.saveShowList.o2Noon1 || '',
@@ -681,7 +681,7 @@ export default {
                         jcdd: that.formState.jcdd,
                         jcy: that.formState.jcy,
                         time: that.formState.time,
-                        ch4: that.saveShowList.bxySdzNoon2 || '',
+                        ch4: that.saveShowList.ch4Noon2 || '',
                         co2: that.saveShowList.co2Noon2 || '',
                         co: that.saveShowList.coNoon2 || '',
                         o2: that.saveShowList.o2Noon2 || '',
@@ -906,7 +906,8 @@ export default {
                                             jcdd: that.formState.jcdd,
                                             jcy: that.formState.jcy,
                                             time: that.formState.time,
-                                            ch4: that.saveShowList.bxySdzNoon1 || '',
+                                            // ch4: that.saveShowList.bxySdzNoon1 || '',
+                                             ch4: that.saveShowList.ch4Noon1 || '',
                                             co2: that.saveShowList.co2Noon1 || '',
                                             co: that.saveShowList.coNoon1 || '',
                                             o2: that.saveShowList.o2Noon1 || '',
@@ -948,7 +949,7 @@ export default {
                                             jcdd: that.formState.jcdd,
                                             jcy: that.formState.jcy,
                                             time: that.formState.time,
-                                            ch4: that.saveShowList.bxySdzNoon2 || '',
+                                            ch4: that.saveShowList.ch4Noon2 || '',
                                             co2: that.saveShowList.co2Noon2 || '',
                                             co: that.saveShowList.coNoon2 || '',
                                             o2: that.saveShowList.o2Noon2 || '',
@@ -1209,7 +1210,7 @@ export default {
                                             jcdd: that.formState.jcdd,
                                             jcy: that.formState.jcy,
                                             time: that.formState.time,
-                                            ch4: that.saveShowList.bxySdzNoon1 || '',
+                                            ch4: that.saveShowList.ch4Noon1 || '',
                                             co2: that.saveShowList.co2Noon1 || '',
                                             co: that.saveShowList.coNoon1 || '',
                                             o2: that.saveShowList.o2Noon1 || '',
@@ -1251,7 +1252,7 @@ export default {
                                             jcdd: that.formState.jcdd,
                                             jcy: that.formState.jcy,
                                             time: that.formState.time,
-                                            ch4: that.saveShowList.bxySdzNoon2 || '',
+                                            ch4: that.saveShowList.ch4Noon2 || '',
                                             co2: that.saveShowList.co2Noon2 || '',
                                             co: that.saveShowList.coNoon2 || '',
                                             o2: that.saveShowList.o2Noon2 || '',
@@ -2159,6 +2160,7 @@ export default {
         //保存提示弹窗-确定
         confrimSave() {
             let that = this
+            console.log(that.saveShowList, 'saveShowList')
             that.isStatus = JSON.stringify(that.saveShowList) != '{}' ? 'edit' : 'add'
             that.isShowSave = false
             if (that.isStatus == 'add') {
@@ -2288,19 +2290,45 @@ export default {
             that.isShowAdd = false
         },
         //暂存列表跳转到填报界面保存/返回上一级
-        closeZc(param) {
+        async closeZc(param) {
+            console.log(param, '提交---')
             let that = this
             if (param) {
                 that.zcShow = false
                 that.isShowAdd = true
-                that.formState = Object.assign({}, param.info)
                 that.zcParamData = Object.assign({}, param)
-                // that.zcList = that.zcList.filter(v => v.cardId != that.zcParamData.cardId) || []
-                // uni.setStorageSync('zcList', that.zcList)
-                that.getCardLists(param.cardId)
+                await that.getCardLists(param.cardId)
+                await that.isEditOrAdd(param.info)
             } else {
                 that.zcShow = false
             }
+        },
+        isEditOrAdd(param) {
+            let that = this
+            new Promise((resolve, reject) => {
+                api
+                    .getGas({ reportTime: param.tbrq, deviceId: that.deviceId })
+                    .then((response) => {
+                        if (response.data.code == 200) {
+                            let data = response.data.result.records
+                            if (data.length != 0) {
+                                that.saveShowList = data[0]
+                                that.formState = { ...param, id: that.saveShowList.id, jcdd: that.formState.jcdd }
+                            } else {
+                                that.saveShowList = {}
+                                that.formState = param
+                            }
+                        } else {
+                            reject(response);
+                        }
+                    })
+                    .catch((error) => {
+                        console.log("catch===>response", response);
+                        reject(error);
+                    });
+            });
+
+
         }
     },
 

+ 3 - 3
pages/gasreport/components/popupModal.vue

@@ -32,8 +32,8 @@ export default {
     data() {
         return {
             indexList: [
-                // { id: 1, label: '瓦斯巡检记录卡管理', },
-                { id: 1, label: '图片识别', },
+                { id: 1, label: '瓦斯巡检记录卡管理', },
+                // { id: 1, label: '图片识别', },
                 {
                     id: 2, label: '巡检任务面板', children: [
                         { label: '早班', },
@@ -41,7 +41,7 @@ export default {
                         { label: '夜班' },
                     ]
                 },
-                // { id: 3, label: '瓦斯巡检填报' },
+                { id: 3, label: '瓦斯巡检填报' },
             ],
         }
     },

+ 1 - 1
pages/gasreport/components/save-component.vue

@@ -49,7 +49,7 @@ export default {
     methods: {
         //点击返回上一级
         handlerToggle() {
-            this.$emit('closeZc')
+            this.$emit('closeZc',null)
         },
         //提交
         getsubmit(item) {

+ 2 - 2
pages/gasreport/gasreport.vue

@@ -37,9 +37,9 @@ export default {
             backPic: "url(../../static/topnavbar.png)",
             gasTitle: '瓦斯日报',//标题
             showModel: false,//是否打开弹出层
-            // loadComponent: 'gasFill',//默认加载组件
+            loadComponent: 'gasFill',//默认加载组件
             // loadComponent: 'gasImgIdentify',//默认加载组件
-            loadComponent: 'taskBoard',//默认加载组件
+            // loadComponent: 'taskBoard',//默认加载组件
             taskTj: {},
             firstAddress: '',//一次线路
             secondAddress: '',//二次线路

+ 1 - 0
pages/ipConfig/ipConfig.vue

@@ -33,6 +33,7 @@ export default {
       IPSet: "",
       IpConfig: [
         [
+            { label: "准东二矿", value: "http://172.19.7.101:9999" },
           { label: "大海则煤矿", value: "http://172.16.53.16:9999" },
           { label: "大柳塔井", value: "http://10.248.135.10:9999" },
           { label: "活鸡兔井", value: "http://10.248.135.121:9999" },

+ 1 - 0
pages/login/login.vue

@@ -107,6 +107,7 @@ export default {
       IPSet: "",
       IpConfig: [
         [
+           { label: "准东二矿", value: "http://172.19.7.101:9999" },
           { label: "大海则煤矿", value: "http://172.16.53.16:9999" },
           { label: "大柳塔井", value: "http://10.248.135.10:9999" },
           { label: "活鸡兔井", value: "http://10.248.135.121:9999" },