浏览代码

瓦斯日报修改-提交

lxh 4 月之前
父节点
当前提交
09b4223462
共有 1 个文件被更改,包括 263 次插入9 次删除
  1. 263 9
      pages/gasreport/gasreport.vue

+ 263 - 9
pages/gasreport/gasreport.vue

@@ -240,8 +240,262 @@ export default {
     methods: {
         //班次下拉选项切换
         changeBc(e) {
+            let that=this
             console.log(e, '班次----------')
             this.formState.bc = e
+            if (that.formState.bc == '早班' && that.formState.count == '第一次') {
+                if (that.saveShowList.bxySdzEarly1 || that.saveShowList.ch4Early1 || that.saveShowList.co2Early1 || that.saveShowList.coEarly1 || that.saveShowList.gwSdzEarly1 || that.saveShowList.jwSdzEarly1 || that.saveShowList.o2Early1 || that.saveShowList.tEarly1) {
+                    that.formState = {
+                        id: that.saveShowList.id || '',
+                        bc: that.formState.bc,
+                        count: that.formState.count,
+                        jcdd: that.formState.jcdd,
+                        jcy: that.formState.jcy,
+                        time: that.formState.time,
+                        ch4: that.saveShowList.ch4Early1 || '',
+                        co2: that.saveShowList.co2Early1 || '',
+                        co: that.saveShowList.coEarly1 || '',
+                        o2: that.saveShowList.o2Early1 || '',
+                        jw: that.saveShowList.jwSdzEarly1 || '',
+                        gw: that.saveShowList.gwSdzEarly1 || '',
+                        bxy: that.saveShowList.bxySdzEarly1 || '',
+                        tbrq: that.formState.tbrq,
+                        temp: that.saveShowList.tEarly1 || '',
+                        mcgzm: that.formState.mcgzm,
+                    }
+                    that.isDisabled = true
+                } else {
+                    that.formState = {
+                        id: that.formState.id,
+                        bc: that.formState.bc,
+                        count: that.formState.count,
+                        jcdd: that.formState.jcdd,
+                        jcy: that.formState.jcy,
+                        time: that.formState.time,
+                        ch4: '',
+                        co2: '',
+                        co: '',
+                        o2: '',
+                        jw: '',
+                        gw: '',
+                        bxy: '',
+                        tbrq: that.formState.tbrq,
+                        temp: '',
+                        mcgzm: that.formState.mcgzm,
+                    }
+                    that.isDisabled = false
+                }
+            } else if (that.formState.bc == '早班' && that.formState.count == '第二次') {
+                if (that.saveShowList.bxySdzEarly2 || that.saveShowList.ch4Early2 || that.saveShowList.co2Early2 || that.saveShowList.coEarly2 || that.saveShowList.gwSdzEarly2 || that.saveShowList.jwSdzEarly2 || that.saveShowList.o2Early2 || that.saveShowList.tEarly2) {
+                    that.formState = {
+                        id: that.saveShowList.id || '',
+                        bc: that.formState.bc,
+                        count: that.formState.count,
+                        jcdd: that.formState.jcdd,
+                        jcy: that.formState.jcy,
+                        time: that.formState.time,
+                        ch4: that.saveShowList.ch4Early2 || '',
+                        co2: that.saveShowList.co2Early2 || '',
+                        co: that.saveShowList.coEarly2 || '',
+                        o2: that.saveShowList.o2Early2 || '',
+                        jw: that.saveShowList.jwSdzEarly2 || '',
+                        gw: that.saveShowList.gwSdzEarly2 || '',
+                        bxy: that.saveShowList.bxySdzEarly2 || '',
+                        tbrq: that.formState.tbrq,
+                        temp: that.saveShowList.tEarly2 || '',
+                        mcgzm: that.formState.mcgzm,
+                    }
+                    that.isDisabled = true
+                } else {
+                    that.formState = {
+                        id: that.formState.id,
+                        bc: that.formState.bc,
+                        count: that.formState.count,
+                        jcdd: that.formState.jcdd,
+                        jcy: that.formState.jcy,
+                        time: that.formState.time,
+                        ch4: '',
+                        co2: '',
+                        co: '',
+                        o2: '',
+                        jw: '',
+                        gw: '',
+                        bxy: '',
+                        tbrq: that.formState.tbrq,
+                        temp: '',
+                        mcgzm: that.formState.mcgzm,
+                    }
+                    that.isDisabled = false
+                }
+            } else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
+                if (that.saveShowList.bxySdzNoon1 || that.saveShowList.ch4Noon1 || that.saveShowList.co2Noon1 || that.saveShowList.coNoon1 || that.saveShowList.gwSdzNoon1 || that.saveShowList.jwSdzNoon1 || that.saveShowList.o2Noon1 || that.saveShowList.tNoon1) {
+                    that.formState = {
+                        id: that.saveShowList.id || '',
+                        bc: that.formState.bc,
+                        count: that.formState.count,
+                        jcdd: that.formState.jcdd,
+                        jcy: that.formState.jcy,
+                        time: that.formState.time,
+                        ch4: that.saveShowList.bxySdzNoon1 || '',
+                        co2: that.saveShowList.co2Noon1 || '',
+                        co: that.saveShowList.coNoon1 || '',
+                        o2: that.saveShowList.o2Noon1 || '',
+                        jw: that.saveShowList.jwSdzNoon1 || '',
+                        gw: that.saveShowList.gwSdzNoon1 || '',
+                        bxy: that.saveShowList.bxySdzNoon1 || '',
+                        tbrq: that.formState.tbrq,
+                        temp: that.saveShowList.tNoon1 || '',
+                        mcgzm: that.formState.mcgzm,
+                    }
+                    that.isDisabled = true
+                } else {
+                    that.formState = {
+                        id: that.formState.id,
+                        bc: that.formState.bc,
+                        count: that.formState.count,
+                        jcdd: that.formState.jcdd,
+                        jcy: that.formState.jcy,
+                        time: that.formState.time,
+                        ch4: '',
+                        co2: '',
+                        co: '',
+                        o2: '',
+                        jw: '',
+                        gw: '',
+                        bxy: '',
+                        tbrq: that.formState.tbrq,
+                        temp: '',
+                        mcgzm: that.formState.mcgzm,
+                    }
+                    that.isDisabled = false
+                }
+            } else if (that.formState.bc == '中班' && that.formState.count == '第二次') {
+                if (that.saveShowList.bxySdzNoon2 || that.saveShowList.ch4Noon2 || that.saveShowList.co2Noon2 || that.saveShowList.coNoon2 || that.saveShowList.gwSdzNoon2 || that.saveShowList.jwSdzNoon2 || that.saveShowList.o2Noon2 || that.saveShowList.tNoon2) {
+                    that.formState = {
+                        id: that.saveShowList.id || '',
+                        bc: that.formState.bc,
+                        count: that.formState.count,
+                        jcdd: that.formState.jcdd,
+                        jcy: that.formState.jcy,
+                        time: that.formState.time,
+                        ch4: that.saveShowList.bxySdzNoon2 || '',
+                        co2: that.saveShowList.co2Noon2 || '',
+                        co: that.saveShowList.coNoon2 || '',
+                        o2: that.saveShowList.o2Noon2 || '',
+                        jw: that.saveShowList.jwSdzNoon2 || '',
+                        gw: that.saveShowList.gwSdzNoon2 || '',
+                        bxy: that.saveShowList.bxySdzNoon2 || '',
+                        tbrq: that.formState.tbrq,
+                        temp: that.saveShowList.tNoon2 || '',
+                        mcgzm: that.formState.mcgzm,
+                    }
+                    that.isDisabled = true
+                } else {
+                    that.formState = {
+                        id: that.formState.id,
+                        bc: that.formState.bc,
+                        count: that.formState.count,
+                        jcdd: that.formState.jcdd,
+                        jcy: that.formState.jcy,
+                        time: that.formState.time,
+                        ch4: '',
+                        co2: '',
+                        co: '',
+                        o2: '',
+                        jw: '',
+                        gw: '',
+                        bxy: '',
+                        tbrq: that.formState.tbrq,
+                        temp: '',
+                        mcgzm: that.formState.mcgzm,
+                    }
+                    that.isDisabled = false
+                }
+            } else if (that.formState.bc == '夜班' && that.formState.count == '第一次') {
+                if (that.saveShowList.bxySdzNight1 || that.saveShowList.ch4Night1 || that.saveShowList.co2Night1 || that.saveShowList.coNight1 || that.saveShowList.gwSdzNight1 || that.saveShowList.jwSdzNight1 || that.saveShowList.o2Night1 || that.saveShowList.tNight1) {
+                    that.formState = {
+                        id: that.saveShowList.id || '',
+                        bc: that.formState.bc,
+                        count: that.formState.count,
+                        jcdd: that.formState.jcdd,
+                        jcy: that.formState.jcy,
+                        time: that.formState.time,
+                        ch4: that.saveShowList.ch4Night1 || '',
+                        co2: that.saveShowList.co2Night1 || '',
+                        co: that.saveShowList.coNight1 || '',
+                        o2: that.saveShowList.o2Night1 || '',
+                        jw: that.saveShowList.jwSdzNight1 || '',
+                        gw: that.saveShowList.gwSdzNight1 || '',
+                        bxy: that.saveShowList.bxySdzNight1 || '',
+                        tbrq: that.formState.tbrq,
+                        temp: that.saveShowList.tNight1 || '',
+                        mcgzm: that.formState.mcgzm,
+                    }
+                    that.isDisabled = true
+                } else {
+                    that.formState = {
+                        id: that.formState.id,
+                        bc: that.formState.bc,
+                        count: that.formState.count,
+                        jcdd: that.formState.jcdd,
+                        jcy: that.formState.jcy,
+                        time: that.formState.time,
+                        ch4: '',
+                        co2: '',
+                        co: '',
+                        o2: '',
+                        jw: '',
+                        gw: '',
+                        bxy: '',
+                        tbrq: that.formState.tbrq,
+                        temp: '',
+                        mcgzm: that.formState.mcgzm,
+                    }
+                    that.isDisabled = false
+                }
+            } else if (that.formState.bc == '夜班' && that.formState.count == '第二次') {
+                if (that.saveShowList.bxySdzNight2 || that.saveShowList.ch4Night2 || that.saveShowList.co2Night2 || that.saveShowList.coNight2 || that.saveShowList.gwSdzNight2 || that.saveShowList.jwSdzNight2 || that.saveShowList.o2Night2 || that.saveShowList.tNight2) {
+                    that.formState = {
+                        id: that.saveShowList.id || '',
+                        bc: that.formState.bc,
+                        count: that.formState.count,
+                        jcdd: that.formState.jcdd,
+                        jcy: that.formState.jcy,
+                        time: that.formState.time,
+                        ch4: that.saveShowList.ch4Night2 || '',
+                        co2: that.saveShowList.co2Night2 || '',
+                        co: that.saveShowList.coNight2 || '',
+                        o2: that.saveShowList.o2Night2 || '',
+                        jw: that.saveShowList.jwSdzNight2 || '',
+                        gw: that.saveShowList.gwSdzNight2 || '',
+                        bxy: that.saveShowList.bxySdzNight2 || '',
+                        tbrq: that.formState.tbrq,
+                        temp: that.saveShowList.tNight2 || '',
+                        mcgzm: that.formState.mcgzm,
+                    }
+                    that.isDisabled = true
+                } else {
+                    that.formState = {
+                        id: that.formState.id,
+                        bc: that.formState.bc,
+                        count: that.formState.count,
+                        jcdd: that.formState.jcdd,
+                        jcy: that.formState.jcy,
+                        time: that.formState.time,
+                        ch4: '',
+                        co2: '',
+                        co: '',
+                        o2: '',
+                        jw: '',
+                        gw: '',
+                        bxy: '',
+                        tbrq: that.formState.tbrq,
+                        temp: '',
+                        mcgzm: that.formState.mcgzm,
+                    }
+                    that.isDisabled = false
+                }
+            }
         },
         //监测次数选项切换
         changeCount(e) {
@@ -331,7 +585,7 @@ export default {
                     }
                     that.isDisabled = false
                 }
-            } else if (that.formState.bc == '中班' || that.formState.count == '第一次') {
+            } else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
                 if (that.saveShowList.bxySdzNoon1 || that.saveShowList.ch4Noon1 || that.saveShowList.co2Noon1 || that.saveShowList.coNoon1 || that.saveShowList.gwSdzNoon1 || that.saveShowList.jwSdzNoon1 || that.saveShowList.o2Noon1 || that.saveShowList.tNoon1) {
                     that.formState = {
                         id: that.saveShowList.id || '',
@@ -424,7 +678,7 @@ export default {
                         jcdd: that.formState.jcdd,
                         jcy: that.formState.jcy,
                         time: that.formState.time,
-                        ch4: that.saveShowList.bxySdzNight1 || '',
+                        ch4: that.saveShowList.ch4Night1 || '',
                         co2: that.saveShowList.co2Night1 || '',
                         co: that.saveShowList.coNight1 || '',
                         o2: that.saveShowList.o2Night1 || '',
@@ -466,7 +720,7 @@ export default {
                         jcdd: that.formState.jcdd,
                         jcy: that.formState.jcy,
                         time: that.formState.time,
-                        ch4: that.saveShowList.bxySdzNight2 || '',
+                        ch4: that.saveShowList.ch4Night2 || '',
                         co2: that.saveShowList.co2Night2 || '',
                         co: that.saveShowList.coNight2 || '',
                         o2: that.saveShowList.o2Night2 || '',
@@ -598,7 +852,7 @@ export default {
                                         }
                                         that.isDisabled = false
                                     }
-                                } else if (that.formState.bc == '中班' || that.formState.count == '第一次') {
+                                } else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
                                     if (that.saveShowList.bxySdzNoon1 || that.saveShowList.ch4Noon1 || that.saveShowList.co2Noon1 || that.saveShowList.coNoon1 || that.saveShowList.gwSdzNoon1 || that.saveShowList.jwSdzNoon1 || that.saveShowList.o2Noon1 || that.saveShowList.tNoon1) {
                                         that.formState = {
                                             id: that.saveShowList.id || '',
@@ -691,7 +945,7 @@ export default {
                                             jcdd: that.formState.jcdd,
                                             jcy: that.formState.jcy,
                                             time: that.formState.time,
-                                            ch4: that.saveShowList.bxySdzNight1 || '',
+                                            ch4: that.saveShowList.ch4Night1 || '',
                                             co2: that.saveShowList.co2Night1 || '',
                                             co: that.saveShowList.coNight1 || '',
                                             o2: that.saveShowList.o2Night1 || '',
@@ -733,7 +987,7 @@ export default {
                                             jcdd: that.formState.jcdd,
                                             jcy: that.formState.jcy,
                                             time: that.formState.time,
-                                            ch4: that.saveShowList.bxySdzNight2 || '',
+                                            ch4: that.saveShowList.ch4Night2 || '',
                                             co2: that.saveShowList.co2Night2 || '',
                                             co: that.saveShowList.coNight2 || '',
                                             o2: that.saveShowList.o2Night2 || '',
@@ -901,7 +1155,7 @@ export default {
                                         }
                                         that.isDisabled = false
                                     }
-                                } else if (that.formState.bc == '中班' || that.formState.count == '第一次') {
+                                } else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
                                     if (that.saveShowList.bxySdzNoon1 || that.saveShowList.ch4Noon1 || that.saveShowList.co2Noon1 || that.saveShowList.coNoon1 || that.saveShowList.gwSdzNoon1 || that.saveShowList.jwSdzNoon1 || that.saveShowList.o2Noon1 || that.saveShowList.tNoon1) {
                                         that.formState = {
                                             id: that.saveShowList.id || '',
@@ -994,7 +1248,7 @@ export default {
                                             jcdd: that.formState.jcdd,
                                             jcy: that.formState.jcy,
                                             time: that.formState.time,
-                                            ch4: that.saveShowList.bxySdzNight1 || '',
+                                            ch4: that.saveShowList.ch4Night1 || '',
                                             co2: that.saveShowList.co2Night1 || '',
                                             co: that.saveShowList.coNight1 || '',
                                             o2: that.saveShowList.o2Night1 || '',
@@ -1036,7 +1290,7 @@ export default {
                                             jcdd: that.formState.jcdd,
                                             jcy: that.formState.jcy,
                                             time: that.formState.time,
-                                            ch4: that.saveShowList.bxySdzNight2 || '',
+                                            ch4: that.saveShowList.ch4Night2 || '',
                                             co2: that.saveShowList.co2Night2 || '',
                                             co: that.saveShowList.coNight2 || '',
                                             o2: that.saveShowList.o2Night2 || '',