|
@@ -156,19 +156,20 @@
|
|
|
<view class="top-dialog-area">
|
|
|
<view class="dialog-item">
|
|
|
<text class="dialog-label">班次:</text>
|
|
|
- <uni-data-select placeholder="请选择班次" disabled align="center" :clear="true" v-model="formState.bc"
|
|
|
- :localdata="rangeBc"></uni-data-select>
|
|
|
+ <uni-data-select placeholder="请选择班次" disabled style="text-align: center;" :clear="true"
|
|
|
+ v-model="formState.bc" :localdata="rangeBc"></uni-data-select>
|
|
|
</view>
|
|
|
<view class="dialog-item">
|
|
|
<text class="dialog-label">检测次数:</text>
|
|
|
- <uni-data-select placeholder="请选择检测次数" align="center" :clear="true" v-model="formState.count"
|
|
|
- :disabled="statusShow == 'edit'" :localdata="rangeCount"
|
|
|
+ <uni-data-select placeholder="请选择检测次数" style="text-align: center;" :clear="true"
|
|
|
+ v-model="formState.count" :disabled="statusShow == 'edit'" :localdata="rangeCount"
|
|
|
@change="changeCount"></uni-data-select>
|
|
|
</view>
|
|
|
<view class="dialog-item">
|
|
|
<text class="dialog-label">检测地点:</text>
|
|
|
- <uni-data-select placeholder="请选择检测地点" align="center" :clear="true" v-model="formState.jcdd"
|
|
|
- :disabled="statusShow == 'edit'" :localdata="rangeJcdd" @change="changeJc"></uni-data-select>
|
|
|
+ <uni-data-select placeholder="请选择检测地点" style="text-align: center;" :clear="true"
|
|
|
+ v-model="formState.jcdd" :disabled="statusShow == 'edit'" :localdata="rangeJcdd"
|
|
|
+ @change="changeJc"></uni-data-select>
|
|
|
</view>
|
|
|
<view class="dialog-item" @click="getChangeTime">
|
|
|
<text class="dialog-label">检测时间:</text>
|
|
@@ -225,8 +226,8 @@
|
|
|
<div class="dialog-title">三对照数据</div>
|
|
|
<view class="dialog-item">
|
|
|
<text class="dialog-label">甲烷传感器:</text>
|
|
|
- <uni-data-select placeholder="请选择检测地点" align="center" :clear="true" v-model="formState.jw"
|
|
|
- :localdata="rangeJw" @change="changeJw"></uni-data-select>
|
|
|
+ <uni-data-select placeholder="请选择检测地点" style="text-align: center;" :clear="true"
|
|
|
+ v-model="formState.jw" :localdata="rangeJw" @change="changeJw"></uni-data-select>
|
|
|
</view>
|
|
|
<view class="dialog-item">
|
|
|
<text class="dialog-label">光瓦测量数据:</text>
|
|
@@ -350,7 +351,7 @@ export default {
|
|
|
break;
|
|
|
case '最近':
|
|
|
that.toggleTitle = '全部'
|
|
|
- that.gasList = that.tableData.slice(that.tableData.length - 1)
|
|
|
+ that.gasList = that.tableData.filter(v => v.deviceId == that.deviceId)
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
@@ -438,58 +439,131 @@ export default {
|
|
|
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,
|
|
|
- }
|
|
|
|
|
|
- }
|
|
|
+ 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 == '早班') {
|
|
|
+ let param = {
|
|
|
+ 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,
|
|
|
+ }
|
|
|
+ that.paramData = Object.assign({}, that.saveShowList, param)
|
|
|
+ } else if (that.formState.bc == '中班') {
|
|
|
+ let param = {
|
|
|
+ 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,
|
|
|
+ }
|
|
|
+ that.paramData = Object.assign({}, that.saveShowList, param)
|
|
|
+ } else if (that.formState.bc == '夜班') {
|
|
|
+ let param = {
|
|
|
+ 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,
|
|
|
+ }
|
|
|
+ that.paramData = Object.assign({}, that.saveShowList, param)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ that.saveShowList = {}
|
|
|
+ if (that.formState.bc == '早班') {
|
|
|
+ let param = {
|
|
|
+ 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,
|
|
|
+ }
|
|
|
+ that.paramData = Object.assign({}, that.saveShowList, param)
|
|
|
+ } else if (that.formState.bc == '中班') {
|
|
|
+ let param = {
|
|
|
+ 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,
|
|
|
+ }
|
|
|
+ that.paramData = Object.assign({}, that.saveShowList, param)
|
|
|
+ } else if (that.formState.bc == '夜班') {
|
|
|
+ let param = {
|
|
|
+ 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,
|
|
|
+ }
|
|
|
+ that.paramData = Object.assign({}, that.saveShowList, param)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ reject(response);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ console.log("catch===>response", response);
|
|
|
+ reject(error);
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
//删除
|
|
|
delSb() {
|
|
@@ -505,7 +579,7 @@ export default {
|
|
|
if (that.formState.bc == '早班' && that.formState.count == '第一次') {
|
|
|
|
|
|
let param = {
|
|
|
- // deviceId: that.deviceId,
|
|
|
+ deviceId: that.deviceId,
|
|
|
bxySdzEarly1: that.formState.bxy,
|
|
|
ch4Early1: that.formState.ch4,
|
|
|
checkPersonEarly: that.formState.jcy,
|
|
@@ -522,7 +596,7 @@ export default {
|
|
|
that.paramData = Object.assign({}, that.saveShowList, param)
|
|
|
} else if (that.formState.bc == '早班' && that.formState.count == '第二次') {
|
|
|
let param = {
|
|
|
- // deviceId: that.deviceId,
|
|
|
+ deviceId: that.deviceId,
|
|
|
bxySdzEarly2: that.formState.bxy,
|
|
|
ch4Early2: that.formState.ch4,
|
|
|
checkPersonEarly: that.formState.jcy,
|
|
@@ -540,7 +614,7 @@ export default {
|
|
|
|
|
|
} else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
|
|
|
let param = {
|
|
|
- // deviceId: that.deviceId,
|
|
|
+ deviceId: that.deviceId,
|
|
|
bxySdzNoon1: that.formState.bxy,
|
|
|
ch4Noon1: that.formState.ch4,
|
|
|
checkPersonNoon: that.formState.jcy,
|
|
@@ -559,7 +633,7 @@ export default {
|
|
|
|
|
|
} else if (that.formState.bc == '中班' && that.formState.count == '第二次') {
|
|
|
let param = {
|
|
|
- // deviceId: that.deviceId,
|
|
|
+ deviceId: that.deviceId,
|
|
|
bxySdzNoon2: that.formState.bxy,
|
|
|
ch4Noon2: that.formState.ch4,
|
|
|
checkPersonNoon: that.formState.jcy,
|
|
@@ -577,7 +651,7 @@ export default {
|
|
|
|
|
|
} else if (that.formState.bc == '夜班' && that.formState.count == '第一次') {
|
|
|
let param = {
|
|
|
- // deviceId: that.deviceId,
|
|
|
+ deviceId: that.deviceId,
|
|
|
bxySdzNight1: that.formState.bxy,
|
|
|
ch4Night1: that.formState.ch4,
|
|
|
checkPersonNight: that.formState.jcy,
|
|
@@ -596,7 +670,7 @@ export default {
|
|
|
|
|
|
} else if (that.formState.bc == '夜班' && that.formState.count == '第二次') {
|
|
|
let param = {
|
|
|
- // deviceId: that.deviceId,
|
|
|
+ deviceId: that.deviceId,
|
|
|
bxySdzNight2: that.formState.bxy,
|
|
|
ch4Night2: that.formState.ch4,
|
|
|
checkPersonNight: that.formState.jcy,
|
|
@@ -1798,7 +1872,7 @@ export default {
|
|
|
if (response.data.code == 200) {
|
|
|
that.getGasList()
|
|
|
that.isShowAdd = false
|
|
|
- that.editData = {}
|
|
|
+ // that.editData = {}
|
|
|
that.clearData()
|
|
|
} else {
|
|
|
reject(response);
|
|
@@ -1865,8 +1939,11 @@ export default {
|
|
|
.then((response) => {
|
|
|
if (response.data.code == 200) {
|
|
|
that.tableData = response.data.result.records
|
|
|
- that.gasList = that.tableData.slice(that.tableData.length - 1)
|
|
|
-
|
|
|
+ if (that.statusShow == 'edit') {
|
|
|
+ that.gasList = that.tableData.filter(v => v.deviceId == that.editData.deviceId)
|
|
|
+ } else {
|
|
|
+ that.gasList = that.tableData.filter(v => v.deviceId == that.deviceId)
|
|
|
+ }
|
|
|
} else {
|
|
|
reject(response);
|
|
|
}
|