范围配置更改
This commit is contained in:
parent
a79f6c71eb
commit
89dcf0e28d
@ -68,7 +68,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// import { useLineStore } from 'src/stores/line-store';
|
// import { useLineStore } from 'src/stores/line-store';
|
||||||
import { reactive, ref, watch } from 'vue';
|
import { reactive, ref, watch } from 'vue';
|
||||||
import { LogicSection } from 'src/graphics/logicSection/LogicSection';
|
|
||||||
import { Turnout } from 'src/graphics/turnout/Turnout';
|
import { Turnout } from 'src/graphics/turnout/Turnout';
|
||||||
import { Station } from 'src/graphics/station/Station';
|
import { Station } from 'src/graphics/station/Station';
|
||||||
import { Platform } from 'src/graphics/platform/Platform';
|
import { Platform } from 'src/graphics/platform/Platform';
|
||||||
@ -81,7 +80,7 @@ import {
|
|||||||
} from 'src/api/ConfigApi';
|
} from 'src/api/ConfigApi';
|
||||||
import { JlGraphic } from 'src/jl-graphic';
|
import { JlGraphic } from 'src/jl-graphic';
|
||||||
import { saveAlertTypeData, showAlertTypeData } from '../alarm/alarmInfoEnum';
|
import { saveAlertTypeData, showAlertTypeData } from '../alarm/alarmInfoEnum';
|
||||||
import { Section, SectionType } from 'src/graphics/section/Section';
|
import { Section } from 'src/graphics/section/Section';
|
||||||
import { useRangeConfigStore } from 'src/stores/range-config-store';
|
import { useRangeConfigStore } from 'src/stores/range-config-store';
|
||||||
import { getRangeConfigApp } from 'src/drawApp/rangeConfigApp';
|
import { getRangeConfigApp } from 'src/drawApp/rangeConfigApp';
|
||||||
import { errorNotify } from 'src/utils/CommonNotify';
|
import { errorNotify } from 'src/utils/CommonNotify';
|
||||||
@ -107,7 +106,7 @@ const device = ref<string[]>([]);
|
|||||||
const handleState = ref('新建范围配置');
|
const handleState = ref('新建范围配置');
|
||||||
|
|
||||||
const optionsType = [
|
const optionsType = [
|
||||||
{ label: '轨道', value: LogicSection.Type },
|
{ label: '轨道', value: Section.Type },
|
||||||
{ label: '道岔', value: Turnout.Type },
|
{ label: '道岔', value: Turnout.Type },
|
||||||
{ label: '集中站', value: Station.Type },
|
{ label: '集中站', value: Station.Type },
|
||||||
{ label: '站台', value: Platform.Type },
|
{ label: '站台', value: Platform.Type },
|
||||||
@ -136,13 +135,13 @@ 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',
|
Section = 'DEVICE_TYPE_TRACK',
|
||||||
Platform = 'DEVICE_TYPE_PLATFORM',
|
Platform = 'DEVICE_TYPE_PLATFORM',
|
||||||
}
|
}
|
||||||
enum DeviceTypeShow {
|
enum DeviceTypeShow {
|
||||||
DEVICE_TYPE_RTU = 'station',
|
DEVICE_TYPE_RTU = 'station',
|
||||||
DEVICE_TYPE_SWITCH = 'Turnout',
|
DEVICE_TYPE_SWITCH = 'Turnout',
|
||||||
DEVICE_TYPE_TRACK = 'LogicSection',
|
DEVICE_TYPE_TRACK = 'Section',
|
||||||
DEVICE_TYPE_PLATFORM = 'Platform',
|
DEVICE_TYPE_PLATFORM = 'Platform',
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,12 +179,7 @@ watch(
|
|||||||
) {
|
) {
|
||||||
select = true;
|
select = true;
|
||||||
}
|
}
|
||||||
if (
|
if (g.type == rangeConfig.deviceType && g.type !== Station.Type) {
|
||||||
(g.type == rangeConfig.deviceType && g.type !== Station.Type) ||
|
|
||||||
(g.type == Section.Type &&
|
|
||||||
(g as Section).datas.sectionType === SectionType.TurnoutPhysical &&
|
|
||||||
rangeConfig.deviceType == LogicSection.Type)
|
|
||||||
) {
|
|
||||||
select = true;
|
select = true;
|
||||||
}
|
}
|
||||||
return select;
|
return select;
|
||||||
|
Loading…
Reference in New Issue
Block a user