Bläddra i källkod

大海泽瓦斯巡检更新

lxh 3 veckor sedan
förälder
incheckning
dffc2bf42b

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

@@ -10,8 +10,8 @@ if (process.env.NODE_ENV == "development") {
   // BASE_URL = "http://10.246.183.35:9999"; // 乌兰木伦
   // 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 = "http://172.16.53.16:9999"; //大海则
+  // BASE_URL = "http://10.246.167.205:9999"; //上湾
   // BASE_URL = "http://172.30.157.9:9999"; //元子沟
   // BASE_URL = "http://10.246.167.205:9999"; //上湾
 }

+ 1 - 1
common/util/hexiii-nfc.js

@@ -205,7 +205,7 @@ export default {
             let data = plus.android.newObject("java.lang.String", result);
             // 写入vuex
             store.commit('setNfcReadTxt', data);
-            toast('NFC 数据:' + data);
+            // toast('NFC 数据:' + data);
             readResult = data;
         } else {
             toast('没有读取到数据');

+ 2 - 2
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "智能通风",
+    "name" : "瓦斯巡检",
     "appid" : "__UNI__2000523",
     "description" : "",
     "versionName" : "2.2.22",
@@ -110,7 +110,7 @@
         }
     },
     "h5" : {
-        "title" : "智能通风",
+        "title" : "瓦斯巡检",
         "domain" : "myhjdc.cn",
         "router" : {
             "mode" : "history"

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 214 - 180
pages/gasreport/components/gasFill.vue


+ 334 - 31
pages/gasreport/components/gasImgIdentify.vue

@@ -9,7 +9,8 @@
                     style="margin: 2px 0px;">图片选取</u-button>
                 <!-- 图片预览 -->
                 <view class="imgView">
-                    <image v-if="imageSrc" style="width:300px;" :src="imageSrc" mode="aspectFit" @click="getPreview">
+                    <image v-if="saveImg || imageSrc" style="width:300px;" :src="imageSrc ? imageSrc : saveImg"
+                        mode="aspectFit" @click="getPreview">
                     </image>
                 </view>
 
@@ -109,13 +110,11 @@
                             :placeholder="isRule3 ? '请输入' : '数据有误'" type="number" v-model="formState.bxy" clearable
                             @blur="getBlurBxy" @input="changeInput($event, 'bxy')"></u--input>
                     </view>
-
                 </view>
             </view>
-
             <view class="dialog-btn">
-                <u-button type="success" v-if="statusShow == 'add'" size="small" @click="getConfirm">保存</u-button>
-                <u-button type="success" size="small" v-if="statusShow == 'edit'" @click="getConfirm">保存</u-button>
+                <u-button type="success" v-if="statusShow == 'add' || statusShow == 'edit'" size="small"
+                    @click="getConfirm">保存</u-button>
                 <u-button type="primary" size="small" @click="getCancel">取消</u-button>
             </view>
         </view>
@@ -127,7 +126,7 @@
 import api from "@/api/api";
 import moment from 'moment'
 import configService from '@/common/service/config.service.js'
-import { RHFselcet } from '@/uni_modules/fz-media-selcet';
+// import { RHFselcet } from '@/uni_modules/fz-media-selcet';
 import helangCompress from '@/components/helang-compress/helang-compress';
 export default {
     name: 'gasFill',
@@ -164,6 +163,10 @@ export default {
         checkState: {
             type: String,
             default: ''
+        },
+        saveImg: {
+            type: String,
+            default: ''
         }
     },
 
@@ -173,24 +176,6 @@ export default {
             gasTitle: '数据采集',//标题
             backPic0: "url(/static/topnavbar0.png)",
             backPic: "url(../../static/topnavbar.png)",
-            //双指缩放信息
-            scaleImg: 1, // 初始图片缩放比例
-            lastDistance: 0, // 上一次的缩放距离
-            animationTime: 0.5, // 动画时间
-            fingers: false, // 是否是双指操作
-            move: {
-                x: 0, // 手指水平移动距离
-                y: 0, // 手指垂直移动距离
-            },
-            offset: {
-                x: 0, // 水平偏移量
-                y: 0, // 垂直偏移量
-            },
-            imgLocation: {
-                x: 0, // 水平位置
-                y: 0, // 垂直位置
-            },
-            isFirst: true, // 是否是第一次缩放
             loading: false,
             paramData: {},
             statusShow: '',
@@ -329,11 +314,11 @@ export default {
         getPreview() {
             // 预览图片
             uni.previewImage({
-                urls: this.tempFilePaths,
+                urls: this.saveImg ? [this.saveImg] : this.tempFilePaths,
                 current: 0
             });
         },
-        //压缩图片
+        //先压缩后识别
         getScale() {
             let that = this
             // 单张压缩
@@ -360,6 +345,7 @@ export default {
                         'reportdate': that.searchTime,
                         'checkorder': jcNum ? jcNum : Number(that.checkNum)
                     },
+
                     success: (res) => {
                         if (res) {
                             uni.showToast({
@@ -668,20 +654,337 @@ export default {
                 that.loading = false
             })
         },
+        //直接识别
+        getIdentyfe() {
+            let that = this
+            that.loading = true
+            let jcNum = that.deviceName.indexOf('第三次') != -1 ? 3 : null
+            let apiUrlImg = `${configService.apiUrlP.substring(0, configService.apiUrlP.lastIndexOf(':'))}:6006`
+            uni.uploadFile({
+                url: `${apiUrlImg}/gasIdentify`,
+                filePath: that.saveImg,
+                name: 'img',
+                formData: {
+                    'user': that.username,
+                    'order': that.classType,
+                    'reportdate': that.searchTime,
+                    'checkorder': jcNum ? jcNum : Number(that.checkNum)
+                },
+                success: (res) => {
+                    if (res) {
+                        uni.showToast({
+                            title: '识别成功!',
+                            icon: 'none' // 可选图标,'success', 'loading', 'none'
+                        });
+                        that.indexList = JSON.parse(res.data).data || []
+                        that.isShowAdd = true
+                        that.loading = false
+                        that.isShowAdd = true
+                        that.statusShow = 'add'
+                        that.deviceId = that.deviceID
+
+                        if (that.indexList.length != 0) {
+                            that.indexParam = that.indexList[0]
+                            that.formState = {
+                                id: '',
+                                bc: that.classType || '',
+                                count: that.checkNum == '1' ? '第一次' : that.checkNum == '2' ? '第二次' : '',
+                                jcdd: that.deviceName || '',
+                                jcy: that.indexParam && that.indexParam['检查人'] ? that.indexParam['检查人'] : that.username,
+                                time: that.indexParam && that.indexParam['检查时间'] ? that.indexParam['检查时间'] : '',
+                                ch4: that.indexParam && that.indexParam['CH4%'] ? that.indexParam['CH4%'] : '',
+                                co2: that.indexParam && that.indexParam['CO2%'] ? that.indexParam['CO2%'] : '',
+                                co: that.indexParam && that.indexParam['CO(ppm)'] ? that.indexParam['CO(ppm)'] : '',
+                                o2: that.indexParam && that.indexParam['O2%'] ? that.indexParam['O2%'] : '',
+                                jw: that.isSensor == '1' ? '0' : '-',
+                                bxy: '0',
+                                tbrq: that.indexParam && that.indexParam['检查时间'] ? that.indexParam['检查时间'].substring(0, that.indexParam['检查时间'].indexOf(' ')) : '',
+                                temp: that.indexParam && that.indexParam['温度(℃)'] ? that.indexParam['温度(℃)'] : '',
+                            }
+
+                            new Promise((resolve, reject) => {
+                                api
+                                    .getGas({ reportTime: that.formState.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]
+                                                if (that.formState.bc == '早班' && that.formState.count == '第一次') {
+                                                    let param = {
+                                                        taskDetailsId: that.Ids,
+                                                        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.ch4,
+                                                        jwSdzEarly1: that.formState.jw,
+                                                        o2Early1: that.formState.o2,
+                                                        strInstallPos: that.formState.jcdd,
+                                                        timeEarly1: that.formState.time,
+                                                        reportTime: that.formState.tbrq,
+                                                        tearly1: that.formState.temp,
+                                                    }
+                                                    that.paramData = Object.assign({}, that.saveShowList, param)
+                                                } else if (that.formState.bc == '早班' && that.formState.count == '第二次') {
+                                                    let param = {
+                                                        taskDetailsId: that.Ids,
+                                                        deviceId: that.deviceId,
+                                                        bxySdzEarly2: that.formState.bxy,
+                                                        ch4Early2: that.formState.ch4,
+                                                        checkPersonEarly: that.formState.jcy,
+                                                        co2Early2: that.formState.co2,
+                                                        coEarly2: that.formState.co,
+                                                        gwSdzEarly2: that.formState.ch4,
+                                                        jwSdzEarly2: that.formState.jw,
+                                                        o2Early2: that.formState.o2,
+                                                        strInstallPos: that.formState.jcdd,
+                                                        timeEarly2: that.formState.time,
+                                                        reportTime: that.formState.tbrq,
+                                                        tearly2: that.formState.temp,
+                                                    }
+                                                    that.paramData = Object.assign({}, that.saveShowList, param)
+                                                } else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
+                                                    let param = {
+                                                        taskDetailsId: that.Ids,
+                                                        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.ch4,
+                                                        jwSdzNoon1: that.formState.jw,
+                                                        o2Noon1: that.formState.o2,
+                                                        strInstallPos: that.formState.jcdd,
+                                                        timeNoon1: that.formState.time,
+                                                        reportTime: that.formState.tbrq,
+                                                        tnoon1: that.formState.temp,
+                                                    }
+                                                    that.paramData = Object.assign({}, that.saveShowList, param)
+                                                } else if (that.formState.bc == '中班' && that.formState.count == '第二次') {
+                                                    let param = {
+                                                        taskDetailsId: that.Ids,
+                                                        deviceId: that.deviceId,
+                                                        bxySdzNoon2: that.formState.bxy,
+                                                        ch4Noon2: that.formState.ch4,
+                                                        checkPersonNoon: that.formState.jcy,
+                                                        co2Noon2: that.formState.co2,
+                                                        coNoon2: that.formState.co,
+                                                        gwSdzNoon2: that.formState.ch4,
+                                                        jwSdzNoon2: that.formState.jw,
+                                                        o2Noon2: that.formState.o2,
+                                                        strInstallPos: that.formState.jcdd,
+                                                        timeNoon2: that.formState.time,
+                                                        reportTime: that.formState.tbrq,
+                                                        tnoon2: that.formState.temp,
+                                                    }
+                                                    that.paramData = Object.assign({}, that.saveShowList, param)
+                                                } else if (that.formState.bc == '夜班' && that.formState.count == '第一次') {
+                                                    let param = {
+                                                        taskDetailsId: that.Ids,
+                                                        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.ch4,
+                                                        jwSdzNight1: that.formState.jw,
+                                                        o2Night1: that.formState.o2,
+                                                        strInstallPos: that.formState.jcdd,
+                                                        timeNight1: that.formState.time,
+                                                        reportTime: that.formState.tbrq,
+                                                        tnight1: that.formState.temp,
+                                                    }
+                                                    that.paramData = Object.assign({}, that.saveShowList, param)
+                                                } else if (that.formState.bc == '夜班' && that.formState.count == '第二次') {
+                                                    let param = {
+                                                        taskDetailsId: that.Ids,
+                                                        deviceId: that.deviceId,
+                                                        bxySdzNight2: that.formState.bxy,
+                                                        ch4Night2: that.formState.ch4,
+                                                        checkPersonNight: that.formState.jcy,
+                                                        co2Night2: that.formState.co2,
+                                                        coNight2: that.formState.co,
+                                                        gwSdzNight2: that.formState.ch4,
+                                                        jwSdzNight2: that.formState.jw,
+                                                        o2Night2: that.formState.o2,
+                                                        strInstallPos: that.formState.jcdd,
+                                                        timeNight2: that.formState.time,
+                                                        reportTime: that.formState.tbrq,
+                                                        tnight2: that.formState.temp,
+                                                    }
+                                                    that.paramData = Object.assign({}, that.saveShowList, param)
+                                                }
+                                            } else {
+                                                that.saveShowList = {}
+                                                if (that.formState.bc == '早班' && that.formState.count == '第一次') {
+                                                    let param = {
+                                                        taskDetailsId: that.Ids,
+                                                        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.ch4,
+                                                        jwSdzEarly1: that.formState.jw,
+                                                        o2Early1: that.formState.o2,
+                                                        strInstallPos: that.formState.jcdd,
+                                                        timeEarly1: that.formState.time,
+                                                        reportTime: that.formState.tbrq,
+                                                        tearly1: that.formState.temp,
+                                                    }
+                                                    that.paramData = Object.assign({}, that.saveShowList, param)
+                                                } else if (that.formState.bc == '早班' && that.formState.count == '第二次') {
+                                                    let param = {
+                                                        taskDetailsId: that.Ids,
+                                                        deviceId: that.deviceId,
+                                                        bxySdzEarly2: that.formState.bxy,
+                                                        ch4Early2: that.formState.ch4,
+                                                        checkPersonEarly: that.formState.jcy,
+                                                        co2Early2: that.formState.co2,
+                                                        coEarly2: that.formState.co,
+                                                        gwSdzEarly2: that.formState.ch4,
+                                                        jwSdzEarly2: that.formState.jw,
+                                                        o2Early2: that.formState.o2,
+                                                        strInstallPos: that.formState.jcdd,
+                                                        timeEarly2: that.formState.time,
+                                                        reportTime: that.formState.tbrq,
+                                                        tearly2: that.formState.temp,
+                                                    }
+                                                    that.paramData = Object.assign({}, that.saveShowList, param)
+                                                } else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
+                                                    let param = {
+                                                        taskDetailsId: that.Ids,
+                                                        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.ch4,
+                                                        jwSdzNoon1: that.formState.jw,
+                                                        o2Noon1: that.formState.o2,
+                                                        strInstallPos: that.formState.jcdd,
+                                                        timeNoon1: that.formState.time,
+                                                        reportTime: that.formState.tbrq,
+                                                        tnoon1: that.formState.temp,
+                                                    }
+                                                    that.paramData = Object.assign({}, that.saveShowList, param)
+                                                } else if (that.formState.bc == '中班' && that.formState.count == '第二次') {
+                                                    let param = {
+                                                        taskDetailsId: that.Ids,
+                                                        deviceId: that.deviceId,
+                                                        bxySdzNoon2: that.formState.bxy,
+                                                        ch4Noon2: that.formState.ch4,
+                                                        checkPersonNoon: that.formState.jcy,
+                                                        co2Noon2: that.formState.co2,
+                                                        coNoon2: that.formState.co,
+                                                        gwSdzNoon2: that.formState.ch4,
+                                                        jwSdzNoon2: that.formState.jw,
+                                                        o2Noon2: that.formState.o2,
+                                                        strInstallPos: that.formState.jcdd,
+                                                        timeNoon2: that.formState.time,
+                                                        reportTime: that.formState.tbrq,
+                                                        tnoon2: that.formState.temp,
+                                                    }
+                                                    that.paramData = Object.assign({}, that.saveShowList, param)
+                                                } else if (that.formState.bc == '夜班' && that.formState.count == '第一次') {
+                                                    let param = {
+                                                        taskDetailsId: that.Ids,
+                                                        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.ch4,
+                                                        jwSdzNight1: that.formState.jw,
+                                                        o2Night1: that.formState.o2,
+                                                        strInstallPos: that.formState.jcdd,
+                                                        timeNight1: that.formState.time,
+                                                        reportTime: that.formState.tbrq,
+                                                        tnight1: that.formState.temp,
+                                                    }
+                                                    that.paramData = Object.assign({}, that.saveShowList, param)
+                                                } else if (that.formState.bc == '夜班' && that.formState.count == '第二次') {
+                                                    let param = {
+                                                        taskDetailsId: that.Ids,
+                                                        deviceId: that.deviceId,
+                                                        bxySdzNight2: that.formState.bxy,
+                                                        ch4Night2: that.formState.ch4,
+                                                        checkPersonNight: that.formState.jcy,
+                                                        co2Night2: that.formState.co2,
+                                                        coNight2: that.formState.co,
+                                                        gwSdzNight2: that.formState.ch4,
+                                                        jwSdzNight2: that.formState.jw,
+                                                        o2Night2: that.formState.o2,
+                                                        strInstallPos: that.formState.jcdd,
+                                                        timeNight2: that.formState.time,
+                                                        reportTime: that.formState.tbrq,
+                                                        tnight2: that.formState.temp,
+                                                    }
+                                                    that.paramData = Object.assign({}, that.saveShowList, param)
+                                                }
+                                            }
+                                        } else {
+                                            reject(response);
+                                        }
+                                    })
+                                    .catch((error) => {
+                                        console.log("catch===>response", response);
+                                        reject(error);
+                                    });
+                            });
+                        } else {
+                            that.formState = {
+                                id: '',
+                                bc: that.classType || '',
+                                count: that.checkNum == '1' ? '第一次' : that.checkNum == '2' ? '第二次' : '',
+                                jcdd: that.deviceName || '',
+                                jcy: that.username,
+                                time: '',
+                                ch4: '',
+                                co2: '',
+                                co: '',
+                                o2: '',
+                                jw: that.isSensor == '1' ? '0' : '-',
+                                bxy: '0',
+                                tbrq: '',
+                                temp: '',
+                            }
+                        }
+                    }
+                },
+                fail: (error) => {
+                    uni.showToast({
+                        title: '识别失败!',
+                        icon: 'none' // 可选图标,'success', 'loading', 'none'
+                    });
+                    that.loading = false
+                }
+            });
+
+
+        },
+
         //获取图片识别数据
         getGasIdentify() {
             let that = this
             if (that.imageSrc) {
                 that.getScale()
+            } else if (that.saveImg) {
+                that.getIdentyfe()
             } else {
                 uni.showToast({
                     title: '请选择上传图片!',
                     icon: 'none' // 可选图标,'success', 'loading', 'none'
                 });
             }
-
-
-
         },
         // // 选择图片的方法
         // chooseImage() {
@@ -708,6 +1011,7 @@ export default {
             this.indexList = []
             this.indexParam = {}
             this.imageSrc = ''
+            that.$emit('clearImg', true)
         },
 
 
@@ -1292,7 +1596,6 @@ export default {
 
                     }
                 }
-
             }
         },
         //便携仪失去焦点时参数校验
@@ -1380,6 +1683,7 @@ export default {
                             that.indexParam = {}
                             that.imageSrc = ''
                             that.clearData()
+                            that.$emit('clearImg', true)
                             that.$emit('getBackAddress')
                         } else {
                             reject(response);
@@ -1864,7 +2168,6 @@ export default {
                     flag = true
                 }
             })
-            console.log(flag)
             if (that.statusShow == 'add') {
                 if (flag) {
                     uni.showToast({

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

+ 87 - 0
pages/gasreport/components/save-component.vue

@@ -0,0 +1,87 @@
+<template>
+    <view class="save-component">
+        <u-navbar :bgStatusImage="backPic0" :bgImage="backPic" :title="topTitle" :safeAreaInsetTop="true"
+            leftIcon="arrow-left" @leftClick="handlerToggle">
+        </u-navbar>
+        <u-list :height="666">
+            <u-list-item v-for="(item, index) in zcList" :key="index">
+                <u-cell icon="list-dot">
+                    <view slot="title" class="u-slot-title">
+                        <text class="u-cell-text">
+                            <text>{{ item.bc }}</text>
+                            <text style="margin-left:75px">{{ item.count }}</text>
+                        </text>
+                    </view>
+                    <view slot="value" class="u-slot-title">
+                        <u-tag text="提交" plain size="mini" type="primary" @click="getsubmit(item)">
+                        </u-tag>
+                    </view>
+                </u-cell>
+            </u-list-item>
+        </u-list>
+
+    </view>
+</template>
+
+<script>
+import api from "@/api/api";
+
+import moment from 'moment'
+export default {
+    name: 'save-component',
+
+    props: {},
+
+    data() {
+        return {
+
+            indexList: [],
+            topTitle: '暂存列表',//标题
+            backPic0: "url(/static/topnavbar0.png)",
+            backPic: "url(../../static/topnavbar.png)",
+        }
+    },
+    computed: {
+        zcList: function () {
+            return uni.getStorageSync('zcList')
+        },
+    },
+    mounted() { },
+    methods: {
+        //点击返回上一级
+        handlerToggle() {
+            this.$emit('closeZc')
+        },
+        //提交
+        getsubmit(item) {
+            this.$emit('closeZc', item)
+        }
+    }
+
+};
+</script>
+
+<style lang="scss" scoped>
+.save-component {
+    position: relative;
+    width: 100%;
+    height: 100%;
+    background-color: #fff;
+
+}
+
+
+
+
+::v-deep .u-cell__body {
+    font-size: 14px;
+}
+
+::v-deep .u-popup {
+    flex: 0
+}
+
+::v-deep .u-slot-title {
+    display: flex;
+}
+</style>

+ 1 - 1
pages/gasreport/components/taskBoard.vue

@@ -52,7 +52,7 @@ export default {
             searchTime: '',//检测时间
             showCalendar: false,//控制日期选型下拉开启
             // timeRan: Number(new Date()),
-            minDate: moment().subtract(30, 'days').format('YYYY-MM-DD'),
+            minDate: moment().subtract(60, 'days').format('YYYY-MM-DD'),
             isShow: true,
             loadComponent: '',
             taskId: '',

+ 18 - 7
pages/gasreport/components/taskBoardAddress.vue

@@ -4,7 +4,7 @@
             leftIcon="arrow-left" @leftClick="handlerToggle"> </u-navbar>
         <u-list :height="666" :scrollTop="topH" v-if="isShow">
             <u-list-item v-for="(item, index) in indexList" :key="index">
-                <u-cell icon="share" >
+                <u-cell icon="share">
                     <view slot="title" class="u-slot-title">
                         <text class="u-cell-text">{{ `${item.deviceName} (${item.checkNum == '1' ? '第一次' :
                             item.checkNum == '2' ? '第二次' : ''})` }}</text>
@@ -12,14 +12,16 @@
                         </u-tag> -->
                     </view>
                     <view slot="value" style="display: flex;align-items: center;">
-                        <u-icon :name="item.checkState == '0' ? 'plus' : 'checkmark'" size="16" @click="getBoradAddress(item, index)"></u-icon>
+                        <u-icon :name="item.checkState == '0' ? 'plus' : 'checkmark'" size="16"
+                            @click="getBoradAddress(item, index)"></u-icon>
                         <u-icon style="margin-left:10px" name="photo" size="16" @click="getView(item)"></u-icon>
                     </view>
                 </u-cell>
             </u-list-item>
         </u-list>
         <component :is="toComponent" :Ids="Ids" :checkNum="checkNum" :classType="classType" :isSensor="isSensor"
-            :deviceID="deviceID" :deviceName="deviceName" :checkState="checkState" @getBackAddress="getBackAddress">
+            :deviceID="deviceID" :deviceName="deviceName" :saveImg="saveImg" :checkState="checkState"
+            @getBackAddress="getBackAddress" @clearImg="clearImg">
         </component>
     </view>
 </template>
@@ -40,7 +42,8 @@ export default {
 
     data() {
         return {
-            imgList: [],
+            saveImg: '',
+            // imgList: [],
             topH: 0,
             activeIndex: 0,
             Ids: '',
@@ -73,14 +76,20 @@ export default {
         },
         //暂存图片预览
         getView(item) {
-            this.imgList = []
-            this.imgList.push(uni.getStorageSync(item.deviceId))
+            let imgList = []
+            imgList.push(uni.getStorageSync(item.deviceId))
             // 预览图片
             uni.previewImage({
-                urls: this.imgList,
+                urls: imgList,
                 current: 0
             });
         },
+        //清除暂存图片
+        clearImg(data){
+            if(data){
+                this.saveImg=''
+            }
+        },
 
         getBoradAddress(item, index) {
             let that = this
@@ -95,6 +104,7 @@ export default {
                 that.deviceID = item.deviceId
                 that.deviceName = item.deviceName
                 that.toComponent = 'gasImgIdentify'
+                that.saveImg = uni.getStorageSync(item.deviceId)
             } else {
                 that.isShow = false
                 that.checkState = item.checkState
@@ -102,6 +112,7 @@ export default {
                 that.deviceID = item.deviceId
                 that.classType = item.classType_dictText
                 that.toComponent = 'gasImgIdentify'
+                that.saveImg = uni.getStorageSync(item.deviceId)
             }
 
         },

+ 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: '',//二次线路

+ 2 - 1
pages/login/login.vue

@@ -3,7 +3,8 @@
       <!-- <u-icon name="setting-fill" color="#2979ff" size="28" @tap="setIp()"></u-icon> -->
       <scroll-view scroll-y class="page">
         <view class="text-center" :style="[{ animation: 'show ' + 0.4 + 's 1' }]">
-          <image src="/static/desk-img/logo.png" mode='aspectFit' class="zai-logo "></image>
+          <!-- <image src="/static/desk-img/logo.png" mode='aspectFit' class="zai-logo "></image> -->
+              <image src="/static/dhz-logo.png" mode='aspectFit' class="zai-logo "></image>
         </view>
         <view class="text-center" :style="[{ animation: 'show ' + 0.4 + 's 1' }]">
           <!-- <u-link  class="zai-title2 text-shadow " href="http://localhost:8080?ticket=234" >切换单点登录</u-link> -->

BIN
static/dhz-logo.png


Vissa filer visades inte eftersom för många filer har ändrats