|
@@ -22,10 +22,10 @@
|
|
|
>
|
|
>
|
|
|
<!-- 图片预览 -->
|
|
<!-- 图片预览 -->
|
|
|
<view class="imgView">
|
|
<view class="imgView">
|
|
|
- <image
|
|
|
|
|
- v-if="imageSrc"
|
|
|
|
|
|
|
+ <image
|
|
|
|
|
+ v-if="saveImg || imageSrc"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
- :src="imageSrc"
|
|
|
|
|
|
|
+ :src="imageSrc ? imageSrc : saveImg"
|
|
|
@click="getPreview"
|
|
@click="getPreview"
|
|
|
>
|
|
>
|
|
|
</image>
|
|
</image>
|
|
@@ -39,7 +39,7 @@
|
|
|
margin: 2px 0px;
|
|
margin: 2px 0px;
|
|
|
"
|
|
"
|
|
|
>
|
|
>
|
|
|
- <!-- <u-button
|
|
|
|
|
|
|
+ <u-button
|
|
|
icon="eye"
|
|
icon="eye"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
size="small"
|
|
size="small"
|
|
@@ -48,17 +48,17 @@
|
|
|
style="width: 49%; margin: 0"
|
|
style="width: 49%; margin: 0"
|
|
|
@click="getGasIdentify"
|
|
@click="getGasIdentify"
|
|
|
>识别</u-button
|
|
>识别</u-button
|
|
|
- > -->
|
|
|
|
|
|
|
+ >
|
|
|
<u-button
|
|
<u-button
|
|
|
icon="trash"
|
|
icon="trash"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
size="small"
|
|
size="small"
|
|
|
- style="width: 100%; margin: 0"
|
|
|
|
|
|
|
+ style="width: 49%; margin: 0"
|
|
|
@click="delSb"
|
|
@click="delSb"
|
|
|
>删除</u-button
|
|
>删除</u-button
|
|
|
>
|
|
>
|
|
|
</view>
|
|
</view>
|
|
|
- <!-- <helang-compress ref="helangCompress"></helang-compress> -->
|
|
|
|
|
|
|
+ <helang-compress ref="helangCompress"></helang-compress>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -93,6 +93,8 @@
|
|
|
? '295px 0px 10px 0px'
|
|
? '295px 0px 10px 0px'
|
|
|
: imageSrc
|
|
: imageSrc
|
|
|
? '330px 0px 10px 0px'
|
|
? '330px 0px 10px 0px'
|
|
|
|
|
+ : saveImg
|
|
|
|
|
+ ? '330px 0px 10px 0px'
|
|
|
: '54px 0px 10px 0px',
|
|
: '54px 0px 10px 0px',
|
|
|
}"
|
|
}"
|
|
|
:class="statusShow == 'edit' ? 'bot-gas-list1' : 'bot-gas-list'"
|
|
:class="statusShow == 'edit' ? 'bot-gas-list1' : 'bot-gas-list'"
|
|
@@ -289,12 +291,12 @@
|
|
|
import api from "@/api/api";
|
|
import api from "@/api/api";
|
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
|
import configService from "@/common/service/config.service.js";
|
|
import configService from "@/common/service/config.service.js";
|
|
|
-// import { RHFselcet } from "@/uni_modules/fz-media-selcet";
|
|
|
|
|
-// import helangCompress from "@/components/helang-compress/helang-compress";
|
|
|
|
|
|
|
+import { RHFselcet } from "@/uni_modules/fz-media-selcet";
|
|
|
|
|
+import helangCompress from "@/components/helang-compress/helang-compress";
|
|
|
export default {
|
|
export default {
|
|
|
name: "gasFill",
|
|
name: "gasFill",
|
|
|
components: {
|
|
components: {
|
|
|
- // helangCompress,
|
|
|
|
|
|
|
+ helangCompress,
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
|
Ids: {
|
|
Ids: {
|
|
@@ -337,6 +339,10 @@ export default {
|
|
|
type: String,
|
|
type: String,
|
|
|
default: "",
|
|
default: "",
|
|
|
},
|
|
},
|
|
|
|
|
+ saveImg: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ default: "",
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
data() {
|
|
@@ -499,7 +505,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
uni.previewImage({
|
|
uni.previewImage({
|
|
|
- urls: this.tempFilePaths,
|
|
|
|
|
|
|
+ urls: this.saveImg ? [this.saveImg] : this.tempFilePaths,
|
|
|
current: 0,
|
|
current: 0,
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -935,942 +941,924 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
//先压缩后识别
|
|
//先压缩后识别
|
|
|
- // getScale() {
|
|
|
|
|
- // let that = this;
|
|
|
|
|
- // // 单张压缩
|
|
|
|
|
- // that.$refs.helangCompress
|
|
|
|
|
- // .compress({
|
|
|
|
|
- // src: that.imageSrc,
|
|
|
|
|
- // maxSize: 800,
|
|
|
|
|
- // fileType: "png",
|
|
|
|
|
- // quality: 0.85,
|
|
|
|
|
- // minSize: 640, //最小压缩尺寸,图片尺寸小于该时值不压缩,非H5平台有效。若需要忽略该设置,可设置为一个极小的值,比如负数。
|
|
|
|
|
- // })
|
|
|
|
|
- // .then((res) => {
|
|
|
|
|
- // that.imageSrc = res;
|
|
|
|
|
- // // 压缩成功回调
|
|
|
|
|
- // that.loading = true;
|
|
|
|
|
- // let jcNum = that.deviceName.indexOf("第三次") != -1 ? 3 : null;
|
|
|
|
|
- // let apiUrlImg = `${configService.apiUrlP}:6008`;
|
|
|
|
|
- // uni.uploadFile({
|
|
|
|
|
- // url: `${apiUrlImg}/gasIdentify`,
|
|
|
|
|
- // filePath: that.imageSrc,
|
|
|
|
|
- // name: "img",
|
|
|
|
|
- // formData: {
|
|
|
|
|
- // user: that.username,
|
|
|
|
|
- // order: that.classType,
|
|
|
|
|
- // reportdate: that.searchTime,
|
|
|
|
|
- // checkorder: jcNum ? jcNum : Number(that.checkNum),
|
|
|
|
|
- // checkpath: that.deviceName,
|
|
|
|
|
- // imgpath: that.imageSrc,
|
|
|
|
|
- // },
|
|
|
|
|
-
|
|
|
|
|
- // 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;
|
|
|
|
|
- // },
|
|
|
|
|
- // });
|
|
|
|
|
- // })
|
|
|
|
|
- // .catch((err) => {
|
|
|
|
|
- // // 压缩失败回调
|
|
|
|
|
- // uni.showToast({
|
|
|
|
|
- // title: "压缩失败!",
|
|
|
|
|
- // icon: "none", // 可选图标,'success', 'loading', 'none'
|
|
|
|
|
- // });
|
|
|
|
|
- // that.loading = false;
|
|
|
|
|
- // });
|
|
|
|
|
- // },
|
|
|
|
|
|
|
+ getScale() {
|
|
|
|
|
+ let that = this;
|
|
|
|
|
+ // 单张压缩
|
|
|
|
|
+ that.$refs.helangCompress
|
|
|
|
|
+ .compress({
|
|
|
|
|
+ src: that.imageSrc,
|
|
|
|
|
+ maxSize: 800,
|
|
|
|
|
+ fileType: "png",
|
|
|
|
|
+ quality: 0.85,
|
|
|
|
|
+ minSize: 640, //最小压缩尺寸,图片尺寸小于该时值不压缩,非H5平台有效。若需要忽略该设置,可设置为一个极小的值,比如负数。
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ that.imageSrc = res;
|
|
|
|
|
+ // 压缩成功回调
|
|
|
|
|
+ that.loading = true;
|
|
|
|
|
+ let jcNum = that.deviceName.indexOf("第三次") != -1 ? 3 : null;
|
|
|
|
|
+ let apiUrlImg = `${configService.apiUrlP}:6008`;
|
|
|
|
|
+ uni.uploadFile({
|
|
|
|
|
+ url: `${apiUrlImg}/gasIdentify`,
|
|
|
|
|
+ filePath: that.imageSrc,
|
|
|
|
|
+ name: "img",
|
|
|
|
|
+ formData: {
|
|
|
|
|
+ user: that.username,
|
|
|
|
|
+ order: that.classType,
|
|
|
|
|
+ reportdate: that.searchTime,
|
|
|
|
|
+ checkorder: jcNum ? jcNum : Number(that.checkNum),
|
|
|
|
|
+ checkpath: that.deviceName,
|
|
|
|
|
+ imgpath: that.imageSrc,
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ 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;
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ // 压缩失败回调
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: "压缩失败!",
|
|
|
|
|
+ icon: "none", // 可选图标,'success', 'loading', 'none'
|
|
|
|
|
+ });
|
|
|
|
|
+ that.loading = false;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
//直接识别
|
|
//直接识别
|
|
|
- // getIdentyfe() {
|
|
|
|
|
- // let that = this;
|
|
|
|
|
- // that.loading = true;
|
|
|
|
|
- // let jcNum = that.deviceName.indexOf("第三次") != -1 ? 3 : null;
|
|
|
|
|
- // let apiUrlImg = `${configService.apiUrlP}:6008`;
|
|
|
|
|
- // 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),
|
|
|
|
|
- // checkpath: that.deviceName,
|
|
|
|
|
- // imgpath: that.saveImg,
|
|
|
|
|
- // },
|
|
|
|
|
- // 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;
|
|
|
|
|
- // },
|
|
|
|
|
- // });
|
|
|
|
|
- // },
|
|
|
|
|
|
|
+ getIdentyfe() {
|
|
|
|
|
+ let that = this;
|
|
|
|
|
+ that.loading = true;
|
|
|
|
|
+ let jcNum = that.deviceName.indexOf("第三次") != -1 ? 3 : null;
|
|
|
|
|
+ let apiUrlImg = `${configService.apiUrlP}:6008`;
|
|
|
|
|
+ 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),
|
|
|
|
|
+ checkpath: that.deviceName,
|
|
|
|
|
+ imgpath: that.saveImg,
|
|
|
|
|
+ },
|
|
|
|
|
+ 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() {
|
|
|
|
|
- // uni.chooseImage({
|
|
|
|
|
- // count: 1, // 默认9,设置图片的最大选择数
|
|
|
|
|
- // sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
|
|
|
|
- // sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
|
|
|
|
- // success: (res) => {
|
|
|
|
|
- // console.log(res, 'res===')
|
|
|
|
|
- // // 获取选中的图片路径,这里我们只取第一张图进行预览
|
|
|
|
|
- // this.imageSrc = res.tempFilePaths[0];
|
|
|
|
|
- // this.tempFilePaths = res.tempFilePaths
|
|
|
|
|
- // this.imageSrcList = res.tempFiles
|
|
|
|
|
- // },
|
|
|
|
|
- // fail: (err) => {
|
|
|
|
|
- // console.error('选择图片失败:', err);
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
- // },
|
|
|
|
|
|
|
+ getGasIdentify() {
|
|
|
|
|
+ let that = this;
|
|
|
|
|
+ if (that.imageSrc) {
|
|
|
|
|
+ that.getScale();
|
|
|
|
|
+ } else if (that.saveImg) {
|
|
|
|
|
+ that.getIdentyfe();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: "请选择上传图片!",
|
|
|
|
|
+ icon: "none", // 可选图标,'success', 'loading', 'none'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
//删除
|
|
//删除
|
|
|
delSb() {
|
|
delSb() {
|