|
@@ -165,15 +165,15 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
// 选择监测
|
|
|
- function selectDevice() {
|
|
|
+ function selectDevice(id) {
|
|
|
loading.value = true;
|
|
|
- getListdays();
|
|
|
setModalProps({ loading: true, confirmLoading: true });
|
|
|
setTimeout(() => {
|
|
|
loading.value = false;
|
|
|
activeDeviceID.value = id;
|
|
|
setModalProps({ loading: false, confirmLoading: false });
|
|
|
}, 300);
|
|
|
+ getListdays();
|
|
|
}
|
|
|
|
|
|
function handleOk(e) {
|
|
@@ -215,14 +215,14 @@ export default defineComponent({
|
|
|
isEmployee: true,
|
|
|
};
|
|
|
const result = await getHistoryData({ ...params });
|
|
|
- if(result['records'].length!=0){
|
|
|
- result['records'].forEach(el=>{
|
|
|
- el.ch2val=el.C2H4
|
|
|
- el.chval=el.C2H2
|
|
|
- el.co2val=el.CO2
|
|
|
- el.coval=el.CO
|
|
|
- el.gasval=el.CH4
|
|
|
- el.o2val=el.O2
|
|
|
+ if (result['records'].length != 0) {
|
|
|
+ result['records'].forEach(el => {
|
|
|
+ el.ch2val = el.C2H4
|
|
|
+ el.chval = el.C2H2
|
|
|
+ el.co2val = el.CO2
|
|
|
+ el.coval = el.CO
|
|
|
+ el.gasval = el.CH4
|
|
|
+ el.o2val = el.O2
|
|
|
})
|
|
|
}
|
|
|
historyList.value = result['records'];
|
|
@@ -239,13 +239,13 @@ export default defineComponent({
|
|
|
if ((!activeDeviceID.value && index == 0) || item.deviceID === activeDeviceID.value) {
|
|
|
// activeDeviceID.value = item.deviceID;
|
|
|
posMonitor.value = Object.assign(item, item.readData);
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
item.readTime = item.readTime?.substring(11);
|
|
|
return item;
|
|
|
});
|
|
|
- },{immediate:true});
|
|
|
- onMounted(()=>{
|
|
|
+ }, { immediate: true });
|
|
|
+ onMounted(() => {
|
|
|
getListdays();
|
|
|
})
|
|
|
return {
|