一级联锁集中站多选
This commit is contained in:
parent
3b6da014ed
commit
0cec0db90a
@ -45,7 +45,7 @@ export interface IAreaConfigItem {
|
||||
areaName: string;
|
||||
deviceType: string;
|
||||
alertTypes: string[];
|
||||
data: string[];
|
||||
data: number[];
|
||||
}
|
||||
export function deviceRangeSet(data: IAreaConfigItem) {
|
||||
return api.post('/api/config/device/area/save', data);
|
||||
|
@ -94,7 +94,7 @@ const showRangeConfig = ref(true);
|
||||
const rangeConfig = reactive<{
|
||||
areaName: string;
|
||||
deviceType: `${DeviceType}` | '';
|
||||
device: string[];
|
||||
device: number[];
|
||||
alertTypes: string[];
|
||||
}>({
|
||||
areaName: '',
|
||||
@ -184,15 +184,11 @@ watch(
|
||||
}
|
||||
return select;
|
||||
}) as JlGraphic[];
|
||||
if (rangeConfig.alertTypes[0] !== '一级联锁') {
|
||||
selectGraphic.push(...deviceFilter);
|
||||
} else if (deviceFilter.length) {
|
||||
selectGraphic = [deviceFilter[0]];
|
||||
}
|
||||
selectGraphic = Array.from(new Set(selectGraphic));
|
||||
getRangeConfigApp().updateSelected(...selectGraphic);
|
||||
device.value = selectGraphic.map((g) => g.code) as string[];
|
||||
rangeConfig.device = selectGraphic.map((g) => g.id) as string[];
|
||||
rangeConfig.device = selectGraphic.map((g) => g.id) as number[];
|
||||
}
|
||||
}
|
||||
);
|
||||
@ -267,7 +263,7 @@ async function searchById(id: number) {
|
||||
(type) => (showAlertTypeData as never)[type + '']
|
||||
);
|
||||
const select: JlGraphic[] = [];
|
||||
response.data.data.forEach((id: string) => {
|
||||
response.data.data.forEach((id: number) => {
|
||||
const g = getRangeConfigApp().queryStore.queryById(id);
|
||||
select.push(g);
|
||||
device.value.push(g.code);
|
||||
|
Loading…
Reference in New Issue
Block a user