|
@@ -206,7 +206,7 @@ export default {
|
|
|
nfcShow: true,//是否使用NFC
|
|
|
isDisabled: false,
|
|
|
isStatus: '',
|
|
|
- deviceId: '',
|
|
|
+ deviceId: '1',
|
|
|
rangeBc: [
|
|
|
{ value: '夜班', text: "夜班" },
|
|
|
{ value: '早班', text: "早班" },
|
|
@@ -381,7 +381,7 @@ export default {
|
|
|
jcdd: that.formState.jcdd,
|
|
|
jcy: that.formState.jcy,
|
|
|
time: that.formState.time,
|
|
|
- ch4: that.saveShowList.bxySdzNoon1 || '',
|
|
|
+ ch4: that.saveShowList.ch4Noon1 || '',
|
|
|
co2: that.saveShowList.co2Noon1 || '',
|
|
|
co: that.saveShowList.coNoon1 || '',
|
|
|
o2: that.saveShowList.o2Noon1 || '',
|
|
@@ -423,7 +423,7 @@ export default {
|
|
|
jcdd: that.formState.jcdd,
|
|
|
jcy: that.formState.jcy,
|
|
|
time: that.formState.time,
|
|
|
- ch4: that.saveShowList.bxySdzNoon2 || '',
|
|
|
+ ch4: that.saveShowList.ch4Noon2 || '',
|
|
|
co2: that.saveShowList.co2Noon2 || '',
|
|
|
co: that.saveShowList.coNoon2 || '',
|
|
|
o2: that.saveShowList.o2Noon2 || '',
|
|
@@ -639,7 +639,7 @@ export default {
|
|
|
jcdd: that.formState.jcdd,
|
|
|
jcy: that.formState.jcy,
|
|
|
time: that.formState.time,
|
|
|
- ch4: that.saveShowList.bxySdzNoon1 || '',
|
|
|
+ ch4: that.saveShowList.ch4Noon1 || '',
|
|
|
co2: that.saveShowList.co2Noon1 || '',
|
|
|
co: that.saveShowList.coNoon1 || '',
|
|
|
o2: that.saveShowList.o2Noon1 || '',
|
|
@@ -681,7 +681,7 @@ export default {
|
|
|
jcdd: that.formState.jcdd,
|
|
|
jcy: that.formState.jcy,
|
|
|
time: that.formState.time,
|
|
|
- ch4: that.saveShowList.bxySdzNoon2 || '',
|
|
|
+ ch4: that.saveShowList.ch4Noon2 || '',
|
|
|
co2: that.saveShowList.co2Noon2 || '',
|
|
|
co: that.saveShowList.coNoon2 || '',
|
|
|
o2: that.saveShowList.o2Noon2 || '',
|
|
@@ -906,7 +906,8 @@ export default {
|
|
|
jcdd: that.formState.jcdd,
|
|
|
jcy: that.formState.jcy,
|
|
|
time: that.formState.time,
|
|
|
- ch4: that.saveShowList.bxySdzNoon1 || '',
|
|
|
+ // ch4: that.saveShowList.bxySdzNoon1 || '',
|
|
|
+ ch4: that.saveShowList.ch4Noon1 || '',
|
|
|
co2: that.saveShowList.co2Noon1 || '',
|
|
|
co: that.saveShowList.coNoon1 || '',
|
|
|
o2: that.saveShowList.o2Noon1 || '',
|
|
@@ -948,7 +949,7 @@ export default {
|
|
|
jcdd: that.formState.jcdd,
|
|
|
jcy: that.formState.jcy,
|
|
|
time: that.formState.time,
|
|
|
- ch4: that.saveShowList.bxySdzNoon2 || '',
|
|
|
+ ch4: that.saveShowList.ch4Noon2 || '',
|
|
|
co2: that.saveShowList.co2Noon2 || '',
|
|
|
co: that.saveShowList.coNoon2 || '',
|
|
|
o2: that.saveShowList.o2Noon2 || '',
|
|
@@ -1209,7 +1210,7 @@ export default {
|
|
|
jcdd: that.formState.jcdd,
|
|
|
jcy: that.formState.jcy,
|
|
|
time: that.formState.time,
|
|
|
- ch4: that.saveShowList.bxySdzNoon1 || '',
|
|
|
+ ch4: that.saveShowList.ch4Noon1 || '',
|
|
|
co2: that.saveShowList.co2Noon1 || '',
|
|
|
co: that.saveShowList.coNoon1 || '',
|
|
|
o2: that.saveShowList.o2Noon1 || '',
|
|
@@ -1251,7 +1252,7 @@ export default {
|
|
|
jcdd: that.formState.jcdd,
|
|
|
jcy: that.formState.jcy,
|
|
|
time: that.formState.time,
|
|
|
- ch4: that.saveShowList.bxySdzNoon2 || '',
|
|
|
+ ch4: that.saveShowList.ch4Noon2 || '',
|
|
|
co2: that.saveShowList.co2Noon2 || '',
|
|
|
co: that.saveShowList.coNoon2 || '',
|
|
|
o2: that.saveShowList.o2Noon2 || '',
|
|
@@ -2159,6 +2160,7 @@ export default {
|
|
|
//保存提示弹窗-确定
|
|
|
confrimSave() {
|
|
|
let that = this
|
|
|
+ console.log(that.saveShowList, 'saveShowList')
|
|
|
that.isStatus = JSON.stringify(that.saveShowList) != '{}' ? 'edit' : 'add'
|
|
|
that.isShowSave = false
|
|
|
if (that.isStatus == 'add') {
|
|
@@ -2288,19 +2290,45 @@ export default {
|
|
|
that.isShowAdd = false
|
|
|
},
|
|
|
//暂存列表跳转到填报界面保存/返回上一级
|
|
|
- closeZc(param) {
|
|
|
+ async closeZc(param) {
|
|
|
+ console.log(param, '提交---')
|
|
|
let that = this
|
|
|
if (param) {
|
|
|
that.zcShow = false
|
|
|
that.isShowAdd = true
|
|
|
- that.formState = Object.assign({}, param.info)
|
|
|
that.zcParamData = Object.assign({}, param)
|
|
|
- // that.zcList = that.zcList.filter(v => v.cardId != that.zcParamData.cardId) || []
|
|
|
- // uni.setStorageSync('zcList', that.zcList)
|
|
|
- that.getCardLists(param.cardId)
|
|
|
+ await that.getCardLists(param.cardId)
|
|
|
+ await that.isEditOrAdd(param.info)
|
|
|
} else {
|
|
|
that.zcShow = false
|
|
|
}
|
|
|
+ },
|
|
|
+ isEditOrAdd(param) {
|
|
|
+ let that = this
|
|
|
+ new Promise((resolve, reject) => {
|
|
|
+ api
|
|
|
+ .getGas({ reportTime: param.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]
|
|
|
+ that.formState = { ...param, id: that.saveShowList.id, jcdd: that.formState.jcdd }
|
|
|
+ } else {
|
|
|
+ that.saveShowList = {}
|
|
|
+ that.formState = param
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ reject(response);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ console.log("catch===>response", response);
|
|
|
+ reject(error);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
|