代码调整
This commit is contained in:
parent
cf693b6d59
commit
d06d0eec15
@ -61,10 +61,10 @@ export function setLwConfig(id, data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 查询所有的某类型设备 */
|
||||
export function getDevicesByType(type) {
|
||||
/** 查询某个项目下的所有的某类型设备 */
|
||||
export function getDevicesByType(project, type) {
|
||||
return request({
|
||||
url: `/api/device/${type}/all`,
|
||||
url: `/api/device/${project}/${type}/all`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ export default {
|
||||
this.mapList = [];
|
||||
this.stationList = [];
|
||||
if (['VR_IBP', 'ISCS_LW'].includes(this.data.type)) {
|
||||
getDevicesByType('LW').then(res => {
|
||||
getDevicesByType(row.project, 'LW').then(res => {
|
||||
if (res.data && res.data.length) {
|
||||
this.lwList = res.data;
|
||||
}
|
||||
@ -285,7 +285,7 @@ export default {
|
||||
this.$message.error('获取设备列表失败!');
|
||||
});
|
||||
} else if (this.data.type === 'ISCS_CW') {
|
||||
getDevicesByType('CW').then(res => {
|
||||
getDevicesByType(row.project, 'CW').then(res => {
|
||||
if (res.data && res.data.length) {
|
||||
this.lwList = res.data;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initData(row) {
|
||||
getDevicesByType('IM').then(resp => {
|
||||
getDevicesByType(row.project, 'IM').then(resp => {
|
||||
this.deviceList = resp.data;
|
||||
}).catch(()=> {
|
||||
this.$message.error('获取项目设备详情失败!');
|
||||
|
Loading…
Reference in New Issue
Block a user