|
@@ -46,8 +46,9 @@
|
|
<view :class="indexList.length != 0 ? 'bot-gas-list1' : 'bot-gas-list'">
|
|
<view :class="indexList.length != 0 ? 'bot-gas-list1' : 'bot-gas-list'">
|
|
<view class="top-title">
|
|
<view class="top-title">
|
|
<view style="font-weight: bold;">瓦斯填报列表</view>
|
|
<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>
|
|
<text>
|
|
<u-icon name="arrow-right-double" size="12" top="2px" color="#000"></u-icon>
|
|
<u-icon name="arrow-right-double" size="12" top="2px" color="#000"></u-icon>
|
|
</text>
|
|
</text>
|
|
@@ -264,7 +265,8 @@ export default {
|
|
|
|
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- tableData:[],
|
|
|
|
|
|
+ toggleTitle: '全部',
|
|
|
|
+ tableData: [],
|
|
loading: false,
|
|
loading: false,
|
|
imgPreShow: false,
|
|
imgPreShow: false,
|
|
paramData: {},
|
|
paramData: {},
|
|
@@ -338,10 +340,19 @@ export default {
|
|
let permission = uni.getStorageSync('btnPermission')
|
|
let permission = uni.getStorageSync('btnPermission')
|
|
return permission.filter(v => v.action == param).length != 0 ? true : false
|
|
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() {
|
|
getPreview() {
|
|
@@ -400,32 +411,85 @@ export default {
|
|
},
|
|
},
|
|
//进行选择识别
|
|
//进行选择识别
|
|
choiceSb(item) {
|
|
choiceSb(item) {
|
|
- let that=this
|
|
|
|
|
|
+ let that = this
|
|
console.log(item, '选择识别---')
|
|
console.log(item, '选择识别---')
|
|
this.indexParam = Object.assign({}, 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() {
|
|
delSb() {
|
|
@@ -433,163 +497,13 @@ export default {
|
|
this.indexParam = {}
|
|
this.indexParam = {}
|
|
this.imageSrc = ''
|
|
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) {
|
|
changeCount(e) {
|
|
let that = this
|
|
let that = this
|
|
that.formState.count = e
|
|
that.formState.count = e
|
|
if (that.formState.bc == '早班' && that.formState.count == '第一次') {
|
|
if (that.formState.bc == '早班' && that.formState.count == '第一次') {
|
|
-
|
|
|
|
|
|
+
|
|
let param = {
|
|
let param = {
|
|
// deviceId: that.deviceId,
|
|
// deviceId: that.deviceId,
|
|
bxySdzEarly1: that.formState.bxy,
|
|
bxySdzEarly1: that.formState.bxy,
|
|
@@ -717,24 +631,6 @@ export default {
|
|
if (data.length != 0) {
|
|
if (data.length != 0) {
|
|
that.saveShowList = data[0]
|
|
that.saveShowList = data[0]
|
|
if (that.formState.bc == '早班' && that.formState.count == '第一次') {
|
|
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 = {
|
|
let param = {
|
|
// deviceId: that.deviceId,
|
|
// deviceId: that.deviceId,
|
|
bxySdzEarly1: that.formState.bxy,
|
|
bxySdzEarly1: that.formState.bxy,
|
|
@@ -1445,6 +1341,9 @@ export default {
|
|
that.getGasList()
|
|
that.getGasList()
|
|
that.isShowAdd = false
|
|
that.isShowAdd = false
|
|
that.saveShowList = {}
|
|
that.saveShowList = {}
|
|
|
|
+ that.paramData = {}
|
|
|
|
+ that.indexList = []
|
|
|
|
+ that.indexParam = {}
|
|
that.clearData()
|
|
that.clearData()
|
|
} else {
|
|
} else {
|
|
reject(response);
|
|
reject(response);
|
|
@@ -1953,6 +1852,7 @@ export default {
|
|
this.isShowAdd = false
|
|
this.isShowAdd = false
|
|
this.saveShowList = {}
|
|
this.saveShowList = {}
|
|
this.indexParam = {}
|
|
this.indexParam = {}
|
|
|
|
+ this.paramData = {}
|
|
this.clearData()
|
|
this.clearData()
|
|
},
|
|
},
|
|
|
|
|
|
@@ -1964,8 +1864,8 @@ export default {
|
|
.getGas({ reportTime: that.tbTime, })
|
|
.getGas({ reportTime: that.tbTime, })
|
|
.then((response) => {
|
|
.then((response) => {
|
|
if (response.data.code == 200) {
|
|
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 {
|
|
} else {
|
|
reject(response);
|
|
reject(response);
|