|
@@ -42,6 +42,7 @@
|
|
|
statusConfigC,
|
|
|
} from '../dedust.data';
|
|
|
import List from '/@/views/vent/gas/components/list/index.vue';
|
|
|
+ import _ from 'lodash';
|
|
|
|
|
|
const props = defineProps({
|
|
|
deviceId: {
|
|
@@ -68,7 +69,7 @@
|
|
|
return config.map((c) => {
|
|
|
return {
|
|
|
...c,
|
|
|
- value: _.get(c.prop, source),
|
|
|
+ value: _.get(source, c.prop),
|
|
|
label: c.label,
|
|
|
};
|
|
|
});
|
|
@@ -125,9 +126,13 @@
|
|
|
|
|
|
async function getDataSource(systemID) {
|
|
|
const res = await list({ devicetype: 'sys', systemID, type: 'all' });
|
|
|
- deviceInfo.value = res.deviceInfo;
|
|
|
- workFaceHistorySource.value = res['sysInfo']['history'];
|
|
|
- workFaceSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
|
|
|
+ res.deviceInfo.dedustefan.datalist.forEach((e: any) => {
|
|
|
+ Object.assign(e, e.readData);
|
|
|
+ e.readData = null;
|
|
|
+ });
|
|
|
+ deviceInfo.value = _.get(res, 'deviceInfo.dedustefan.datalist[0]', {});
|
|
|
+ workFaceHistorySource.value = res.sysInfo.history;
|
|
|
+ workFaceSource.value = Object.assign(res.sysInfo, res.sysInfo.readData);
|
|
|
loading.value = false;
|
|
|
}
|
|
|
|