修复了驱动属性 位号属性,模板,位号,设备等页面因为服务端返回数据格式变化导致显示和添加的异常

pull/2/head
若寒若冰 3 years ago
parent f8c4da16d2
commit 3c73be9718

@ -257,13 +257,13 @@
}, },
driver() { driver() {
dictionaryApi.driverDictionary().then(res => { dictionaryApi.driverDictionary().then(res => {
this.findObject(this.listOption.column, 'driverId').dicData = res.data; this.findObject(this.listOption.column, 'driverId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },
profile() { profile() {
dictionaryApi.profileDictionary().then(res => { dictionaryApi.profileDictionary().then(res => {
this.findObject(this.listOption.column, 'profileIds').dicData = res.data; this.findObject(this.listOption.column, 'profileIds').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },

@ -215,7 +215,7 @@
}, },
driver() { driver() {
dictionaryApi.driverDictionary().then(res => { dictionaryApi.driverDictionary().then(res => {
this.findObject(this.listOption.column,'driverId').dicData = res.data; this.findObject(this.listOption.column,'driverId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },

@ -148,13 +148,13 @@
}, },
device() { device() {
dictionaryApi.deviceDictionary().then(res => { dictionaryApi.deviceDictionary().then(res => {
this.findObject(this.listOption.column, 'deviceId').dicData = res.data; this.findObject(this.listOption.column, 'deviceId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },
driverAttribute() { driverAttribute() {
dictionaryApi.driverAttributeDictionary().then(res => { dictionaryApi.driverAttributeDictionary().then(res => {
this.findObject(this.listOption.column, 'driverAttributeId').dicData = res.data; this.findObject(this.listOption.column, 'driverAttributeId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },

@ -188,13 +188,13 @@
}, },
device() { device() {
dictionaryApi.deviceDictionary('group').then(res => { dictionaryApi.deviceDictionary('group').then(res => {
this.findObject(this.listOption.column, 'deviceId').dicData = res.data; this.findObject(this.listOption.column, 'deviceId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },
point() { point() {
dictionaryApi.pointDictionary('profile').then(res => { dictionaryApi.pointDictionary('profile').then(res => {
this.findObject(this.listOption.column, 'pointId').dicData = res.data; this.findObject(this.listOption.column, 'pointId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },

@ -318,7 +318,7 @@
}, },
profile() { profile() {
dictionaryApi.profileDictionary().then(res => { dictionaryApi.profileDictionary().then(res => {
this.findObject(this.listOption.column,'profileId').dicData = res.data; this.findObject(this.listOption.column,'profileId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },

@ -215,7 +215,7 @@
}, },
driver() { driver() {
dictionaryApi.driverDictionary().then(res => { dictionaryApi.driverDictionary().then(res => {
this.findObject(this.listOption.column,'driverId').dicData = res.data; this.findObject(this.listOption.column,'driverId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },

@ -165,19 +165,19 @@
}, },
device() { device() {
dictionaryApi.deviceDictionary().then(res => { dictionaryApi.deviceDictionary().then(res => {
this.findObject(this.listOption.column,'deviceId').dicData = res.data; this.findObject(this.listOption.column,'deviceId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },
point() { point() {
dictionaryApi.pointDictionary('profile').then(res => { dictionaryApi.pointDictionary('profile').then(res => {
this.findObject(this.listOption.column,'pointId').dicData = res.data; this.findObject(this.listOption.column,'pointId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },
pointAttribute() { pointAttribute() {
dictionaryApi.pointAttributeDictionary().then(res => { dictionaryApi.pointAttributeDictionary().then(res => {
this.findObject(this.listOption.column,'pointAttributeId').dicData = res.data; this.findObject(this.listOption.column,'pointAttributeId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },

@ -152,13 +152,13 @@
}, },
device() { device() {
dictionaryApi.deviceDictionary().then(res => { dictionaryApi.deviceDictionary().then(res => {
this.findObject(this.listOption.column, 'deviceId').dicData = res.data; this.findObject(this.listOption.column, 'deviceId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },
point() { point() {
dictionaryApi.pointDictionary('profile').then(res => { dictionaryApi.pointDictionary('profile').then(res => {
this.findObject(this.listOption.column, 'pointId').dicData = res.data; this.findObject(this.listOption.column, 'pointId').dicData = res.data.records;
}).catch(() => { }).catch(() => {
}); });
}, },

Loading…
Cancel
Save