lxh 1 hete
szülő
commit
8e91a5298a

+ 3 - 3
common/service/config.service.js

@@ -12,15 +12,15 @@ if (process.env.NODE_ENV == "development") {
   // BASE_URL = "http://10.120.120.164:9999"; // 察哈素
   // BASE_URL = "http://182.92.126.35:9999"; // 生产环境
   // BASE_URL = "http://172.16.53.16:9999"; // 
-  BASE_URL = "http://10.246.167.205:9999"; //上湾
-  // BASE_URL = "172.30.157.9:8092"; //元子沟
+  // BASE_URL = "http://10.246.167.205:9999"; //上湾
+  BASE_URL = "172.30.157.9:9999"; //元子沟
 
 }
 let staticDomainURL = BASE_URL + "/sys/common/static";
 
 const configService = {
   apiUrl: BASE_URL,
-  apiUrlP:'http://10.226.13.96:6006',
+  apiUrlP: 'http://10.226.13.96:6006',
   staticDomainURL: staticDomainURL,
 };
 

+ 102 - 202
pages/gasreport/components/gasImgIdentify.vue

@@ -46,8 +46,9 @@
             <view :class="indexList.length != 0 ? 'bot-gas-list1' : 'bot-gas-list'">
                 <view class="top-title">
                     <view style="font-weight: bold;">瓦斯填报列表</view>
-                    <view style="width:80px;height:20px;display: flex;justify-content: center;align-items: center;font-size: 12px;">
-                        <text style="margin-right:5px" @click="getAll">显示全部</text>
+                    <view
+                        style="width:55px;height:20px;display: flex;justify-content: center;align-items: center;font-size: 12px;">
+                        <text style="margin-right:5px" @click="getAll(toggleTitle)">{{ toggleTitle }}</text>
                         <text>
                             <u-icon name="arrow-right-double" size="12" top="2px" color="#000"></u-icon>
                         </text>
@@ -264,7 +265,8 @@ export default {
 
     data() {
         return {
-            tableData:[],
+            toggleTitle: '全部',
+            tableData: [],
             loading: false,
             imgPreShow: false,
             paramData: {},
@@ -338,10 +340,19 @@ export default {
             let permission = uni.getStorageSync('btnPermission')
             return permission.filter(v => v.action == param).length != 0 ? true : false
         },
-        //显示全部
-        getAll(){
-            let that=this
-            that.gasList=that.tableData
+        //全部
+        getAll(title) {
+            let that = this
+            switch (title) {
+                case '全部':
+                    that.toggleTitle = '最近'
+                    that.gasList = that.tableData
+                    break;
+                case '最近':
+                    that.toggleTitle = '全部'
+                    that.gasList = that.tableData.slice(that.tableData.length - 1)
+                    break;
+            }
         },
         //图片点击
         getPreview() {
@@ -400,32 +411,85 @@ export default {
         },
         //进行选择识别
         choiceSb(item) {
-            let that=this
+            let that = this
             console.log(item, '选择识别---')
             this.indexParam = Object.assign({}, item)
-                that.isShowAdd = true
-                that.statusShow = 'add'
-                let jcddList=that.rangeJcdd.map(el=>el.text)
-                let addressName= that.indexParam['检查地点']
-                let jcddData=stringSimilarity.findBestMatch(addressName,jcddList)
-                that.formState = {
-                    id: '',
-                    bc: that.indexParam['班次'],
-                    count: that.formState.count,
-                    jcdd: jcddData.bestMatch.target,
-                    jcy: that.indexParam['检查人'],
-                    time: that.indexParam['检查时间'],
-                    ch4: that.indexParam['CH4%'],
-                    co2: that.indexParam['CO2%'],
-                    co: that.indexParam['CO(ppm)'],
-                    o2: that.indexParam['O2%'],
-                    jw: '0',
-                    gw: that.indexParam['CH4%'],
-                    bxy: '0',
-                    tbrq: that.indexParam['检查时间'].substring(0, that.indexParam['检查时间'].indexOf(' ')),
-                    temp: that.indexParam['温度(℃)'],
-                    // mcgzm: '',
+            that.isShowAdd = true
+            that.statusShow = 'add'
+            let jcddList = that.rangeJcdd.map(el => el.text)
+            let addressName = that.indexParam['检查地点']
+            let jcddData = stringSimilarity.findBestMatch(addressName, jcddList)
+            that.deviceId = that.rangeJcdd.filter(v => v.text == jcddData.bestMatch.target)[0].deviceId
+            that.formState = {
+                id: '',
+                bc: that.indexParam['班次'],
+                count: '第一次',
+                jcdd: jcddData.bestMatch.target,
+                jcy: that.indexParam['检查人'],
+                time: that.indexParam['检查时间'],
+                ch4: that.indexParam['CH4%'],
+                co2: that.indexParam['CO2%'],
+                co: that.indexParam['CO(ppm)'],
+                o2: that.indexParam['O2%'],
+                jw: '0',
+                gw: that.indexParam['CH4%'],
+                bxy: '0',
+                tbrq: that.indexParam['检查时间'].substring(0, that.indexParam['检查时间'].indexOf(' ')),
+                temp: that.indexParam['温度(℃)'],
+                // mcgzm: '',
+            }
+            if (that.formState.bc == '早班') {
+                that.paramData = {
+                    deviceId: that.deviceId,
+                    bxySdzEarly1: that.formState.bxy,
+                    ch4Early1: that.formState.ch4,
+                    checkPersonEarly: that.formState.jcy,
+                    co2Early1: that.formState.co2,
+                    coEarly1: that.formState.co,
+                    gwSdzEarly1: that.formState.gw,
+                    jwSdzEarly1: that.formState.jw,
+                    o2Early1: that.formState.o2,
+                    strInstallPos: that.formState.jcdd,
+                    timeEarly1: that.formState.time,
+                    reportTime: that.formState.tbrq,
+                    tearly1: that.formState.temp,
+                }
+
+            } else if (that.formState.bc == '中班') {
+                that.paramData = {
+                    deviceId: that.deviceId,
+                    bxySdzNoon1: that.formState.bxy,
+                    ch4Noon1: that.formState.ch4,
+                    checkPersonNoon: that.formState.jcy,
+                    co2Noon1: that.formState.co2,
+                    coNoon1: that.formState.co,
+                    gwSdzNoon1: that.formState.gw,
+                    jwSdzNoon1: that.formState.jw,
+                    o2Noon1: that.formState.o2,
+                    strInstallPos: that.formState.jcdd,
+                    timeNoon1: that.formState.time,
+                    reportTime: that.formState.tbrq,
+                    tnoon1: that.formState.temp,
                 }
+
+            } else if (that.formState.bc == '夜班') {
+                that.paramData = {
+                    deviceId: that.deviceId,
+                    bxySdzNight1: that.formState.bxy,
+                    ch4Night1: that.formState.ch4,
+                    checkPersonNight: that.formState.jcy,
+                    co2Night1: that.formState.co2,
+                    coNight1: that.formState.co,
+                    gwSdzNight1: that.formState.gw,
+                    jwSdzNight1: that.formState.jw,
+                    o2Night1: that.formState.o2,
+                    strInstallPos: that.formState.jcdd,
+                    timeNight1: that.formState.time,
+                    reportTime: that.formState.tbrq,
+                    tnight1: that.formState.temp,
+                }
+
+            }
         },
         //删除
         delSb() {
@@ -433,163 +497,13 @@ export default {
             this.indexParam = {}
             this.imageSrc = ''
         },
-        //班次下拉选项切换
-        // 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,
-        //             }
-        //         
-        //         } else {
-        //            
-        //         }
-        //     } 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,
-        //             }
-        //            
-        //         } else {
-        //           
-        //         }
-        //     } 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,
-        //             }
-        //           
-        //         } else {
-        //            
-        //         }
-        //     } 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,
-        //             }
-        //             
-        //         } else {
-        //            
-        //         }
-        //     } 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,
-        //             }
-        //           
-        //         } else {
-        //             
-        //         }
-        //     } 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,
-        //             }
-        //            
-        //         } else {
-        //           
-        //         }
-        //     }
-        // },
+
         //监测次数选项切换
         changeCount(e) {
             let that = this
             that.formState.count = e
             if (that.formState.bc == '早班' && that.formState.count == '第一次') {
-          
+
                 let param = {
                     // deviceId: that.deviceId,
                     bxySdzEarly1: that.formState.bxy,
@@ -717,24 +631,6 @@ export default {
                             if (data.length != 0) {
                                 that.saveShowList = data[0]
                                 if (that.formState.bc == '早班' && that.formState.count == '第一次') {
-                                    // that.formState = {
-                                    //     id: '',
-                                    //     bc: that.indexParam['班次'],
-                                    //     count: that.formState.count || '',
-                                    //     jcdd: that.formState.jcdd || '',
-                                    //     jcy: that.indexParam['检查人'],
-                                    //     time: that.indexParam['检查时间'],
-                                    //     ch4: that.indexParam['CH4%'],
-                                    //     co2: that.indexParam['CO2%'],
-                                    //     co: that.indexParam['CO(ppm)'],
-                                    //     o2: that.indexParam['O2%'],
-                                    //     jw: '0',
-                                    //     gw: that.indexParam['CH4%'],
-                                    //     bxy: '0',
-                                    //     tbrq: that.indexParam['检查时间'].substring(0, that.indexParam['检查时间'].indexOf(' ')),
-                                    //     temp: that.indexParam['温度(℃)'],
-                                    //     // mcgzm: '',
-                                    // }
                                     let param = {
                                         // deviceId: that.deviceId,
                                         bxySdzEarly1: that.formState.bxy,
@@ -1445,6 +1341,9 @@ export default {
                             that.getGasList()
                             that.isShowAdd = false
                             that.saveShowList = {}
+                            that.paramData = {}
+                            that.indexList = []
+                            that.indexParam = {}
                             that.clearData()
                         } else {
                             reject(response);
@@ -1953,6 +1852,7 @@ export default {
             this.isShowAdd = false
             this.saveShowList = {}
             this.indexParam = {}
+            this.paramData = {}
             this.clearData()
         },
 
@@ -1964,8 +1864,8 @@ export default {
                     .getGas({ reportTime: that.tbTime, })
                     .then((response) => {
                         if (response.data.code == 200) {
-                             that.tableData= response.data.result.records
-                            that.gasList =  that.tableData.slice(that.tableData.length-1)
+                            that.tableData = response.data.result.records
+                            that.gasList = that.tableData.slice(that.tableData.length - 1)
 
                         } else {
                             reject(response);

+ 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: '瓦斯巡检填报' },
             ],
         }
     },

+ 2 - 2
pages/gasreport/gasreport.vue

@@ -32,8 +32,8 @@ export default {
         return {
             gasTitle: '',//标题
             showModel: false,//是否打开弹出层
-            // loadComponent: 'gasFill',//默认加载组件
-            loadComponent: 'gasImgIdentify',//默认加载组件
+            loadComponent: 'gasFill',//默认加载组件
+            // loadComponent: 'gasImgIdentify',//默认加载组件
             taskTj: {},
             firstAddress: '',//一次线路
             secondAddress: '',//二次线路