bug修复
This commit is contained in:
parent
6df6aa6b3a
commit
3fbc2f20f0
@ -129,7 +129,7 @@ const optionsAlertType = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
enum DeviceType {
|
enum DeviceType {
|
||||||
Station = 'DEVICE_TYPE_RTU',
|
station = 'DEVICE_TYPE_RTU',
|
||||||
Turnout = 'DEVICE_TYPE_SWITCH',
|
Turnout = 'DEVICE_TYPE_SWITCH',
|
||||||
LogicSection = 'DEVICE_TYPE_TRACK',
|
LogicSection = 'DEVICE_TYPE_TRACK',
|
||||||
Platform = 'DEVICE_TYPE_PLATFORM',
|
Platform = 'DEVICE_TYPE_PLATFORM',
|
||||||
@ -146,13 +146,25 @@ watch(
|
|||||||
() => lineStore.selectedGraphics,
|
() => lineStore.selectedGraphics,
|
||||||
(val) => {
|
(val) => {
|
||||||
if (val && val.length > 0) {
|
if (val && val.length > 0) {
|
||||||
const deviceFilter = lineStore.selectedGraphics?.filter(
|
const deviceFilter = lineStore.selectedGraphics?.filter((g) => {
|
||||||
(g) =>
|
let select = false;
|
||||||
g.type == rangeConfig.deviceType ||
|
if (
|
||||||
|
g.type == Station.Type &&
|
||||||
|
rangeConfig.deviceType == Station.Type &&
|
||||||
|
(g as Station).datas.hasControl
|
||||||
|
) {
|
||||||
|
select = true;
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
(g.type == rangeConfig.deviceType && g.type !== Station.Type) ||
|
||||||
(g.type == Section.Type &&
|
(g.type == Section.Type &&
|
||||||
(g as Section).datas.sectionType === SectionType.TurnoutPhysical &&
|
(g as Section).datas.sectionType === SectionType.TurnoutPhysical &&
|
||||||
rangeConfig.deviceType == LogicSection.Type)
|
rangeConfig.deviceType == LogicSection.Type)
|
||||||
) as JlGraphic[];
|
) {
|
||||||
|
select = true;
|
||||||
|
}
|
||||||
|
return select;
|
||||||
|
}) as JlGraphic[];
|
||||||
selectGraphic.push(...deviceFilter);
|
selectGraphic.push(...deviceFilter);
|
||||||
selectGraphic = Array.from(new Set(selectGraphic));
|
selectGraphic = Array.from(new Set(selectGraphic));
|
||||||
lineStore.getLineApp().updateSelected(...selectGraphic);
|
lineStore.getLineApp().updateSelected(...selectGraphic);
|
||||||
@ -196,6 +208,7 @@ async function onSubmit() {
|
|||||||
type: 'positive',
|
type: 'positive',
|
||||||
message: handle.value,
|
message: handle.value,
|
||||||
});
|
});
|
||||||
|
onReset();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
$q.notify({
|
$q.notify({
|
||||||
type: 'negative',
|
type: 'negative',
|
||||||
|
Loading…
Reference in New Issue
Block a user