!2 接口请求方式修复和页面数据格式修复

Merge pull request !2 from 陈俊波/master
pull/3/MERGE
张红元 2 years ago committed by Gitee
commit 70f5b19fca
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -191,27 +191,27 @@ export const pointApi = {
export const dictionaryApi = { export const dictionaryApi = {
driverDictionary: () => request({ driverDictionary: () => request({
url: 'manager_api/manager/dictionary/driver', url: 'manager_api/manager/dictionary/driver',
method: 'get' method: 'post'
}), }),
profileDictionary: () => request({ profileDictionary: () => request({
url: 'manager_api/manager/dictionary/profile', url: 'manager_api/manager/dictionary/profile',
method: 'get' method: 'post'
}), }),
driverAttributeDictionary: () => request({ driverAttributeDictionary: () => request({
url: 'manager_api/manager/dictionary/driver_attribute', url: 'manager_api/manager/dictionary/driver_attribute',
method: 'get' method: 'post'
}), }),
pointAttributeDictionary: () => request({ pointAttributeDictionary: () => request({
url: 'manager_api/manager/dictionary/point_attribute', url: 'manager_api/manager/dictionary/point_attribute',
method: 'get' method: 'post'
}), }),
deviceDictionary: () => request({ deviceDictionary: () => request({
url: 'manager_api/manager/dictionary/device', url: 'manager_api/manager/dictionary/device',
method: 'get' method: 'post'
}), }),
pointDictionary: (parent) => request({ pointDictionary: (parent) => request({
url: 'manager_api/manager/dictionary/point/' + parent, url: 'manager_api/manager/dictionary/point/' + parent,
method: 'get' method: 'post'
}) })
}; };

@ -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