场景显示psl和ibp,屏蔽门状态面板、继电器吸起/落下统一改为Q/H
This commit is contained in:
parent
75b8f03e30
commit
2e07f7413b
@ -107,41 +107,41 @@ function setPlatformState(platform: Platform) {
|
||||
}
|
||||
|
||||
function getEMPRelayState(v: boolean) {
|
||||
if (v) return '吸起';
|
||||
return '落下';
|
||||
if (v) return 'Q';
|
||||
return 'H';
|
||||
}
|
||||
|
||||
function getSPKSXRelayState(spksState: state.ReplyState[]) {
|
||||
if (spksState.find((item) => item.code == 'SPKSX旁路')?.xh) return '吸起';
|
||||
return '落下';
|
||||
if (spksState.find((item) => item.code == 'SPKSX旁路')?.xh) return 'Q';
|
||||
return 'H';
|
||||
}
|
||||
|
||||
function getSPKS1RelayState(spksState: state.ReplyState[]) {
|
||||
if (spksState.find((item) => item.code == 'SPKS1')?.xh) return '吸起';
|
||||
return '落下';
|
||||
if (spksState.find((item) => item.code == 'SPKS1')?.xh) return 'Q';
|
||||
return 'H';
|
||||
}
|
||||
|
||||
function getSPKS3RelayState(spksState: state.ReplyState[]) {
|
||||
if (spksState.find((item) => item.code == 'SPKS3')?.xh) return '吸起';
|
||||
return '落下';
|
||||
if (spksState.find((item) => item.code == 'SPKS3')?.xh) return 'Q';
|
||||
return 'H';
|
||||
}
|
||||
|
||||
function getConfirmRelayState(mkxJState: state.MkxJState) {
|
||||
if (mkxJState.replyState.find((item) => item.code == '站台确认继电器')?.xh)
|
||||
return '吸起';
|
||||
return '落下';
|
||||
return 'Q';
|
||||
return 'H';
|
||||
}
|
||||
|
||||
function getCloseSPKS1RelayState(mkxJState: state.MkxJState) {
|
||||
if (mkxJState.replyState.find((item) => item.code == '站台关门继电器')?.xh)
|
||||
return '吸起';
|
||||
return '落下';
|
||||
return 'Q';
|
||||
return 'H';
|
||||
}
|
||||
|
||||
function getOpenRelayState(mkxJState: state.MkxJState) {
|
||||
if (mkxJState.replyState.find((item) => item.code == '站台开门继电器')?.xh)
|
||||
return '吸起';
|
||||
return '落下';
|
||||
return 'Q';
|
||||
return 'H';
|
||||
}
|
||||
|
||||
onUnmounted(stop);
|
||||
|
@ -87,7 +87,7 @@ interface KeyType {
|
||||
const list: KeyType[] = [
|
||||
{ label: '继电器索引', key: 'id' },
|
||||
{ label: '继电器名称', key: 'code' },
|
||||
{ label: '是否吸合', key: 'xh', formatFn: getName },
|
||||
{ label: '继电器状态', key: 'xh', formatFn: getRelayStateName },
|
||||
{ label: '是否强制', key: 'force', formatFn: getName },
|
||||
];
|
||||
|
||||
@ -112,6 +112,11 @@ onMounted(() => {
|
||||
}
|
||||
});
|
||||
|
||||
function getRelayStateName(v: boolean) {
|
||||
if (v) return 'Q';
|
||||
return 'H';
|
||||
}
|
||||
|
||||
function getName(v: boolean) {
|
||||
if (v) return '是';
|
||||
return '否';
|
||||
|
@ -37,39 +37,25 @@
|
||||
</q-card-section>
|
||||
<q-separator inset />
|
||||
<q-card-section>
|
||||
<div class="q-gutter-sm">
|
||||
<div>选择子门:</div>
|
||||
<template :key="item" v-for="item in asdOptions">
|
||||
<q-checkbox
|
||||
disable
|
||||
v-model="asdCodes"
|
||||
:val="item"
|
||||
:label="item < 10 ? '0' + item : item + ''"
|
||||
/>
|
||||
<div>
|
||||
<template :key="item.id" v-for="item in screenDoorState.asdStates">
|
||||
<q-list dense>
|
||||
<q-item v-for="(listItem, index) in smallDoorlist" :key="index">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ listItem.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-item-label caption>{{
|
||||
listItem.formatFn
|
||||
? listItem.formatFn(item[listItem.key])
|
||||
: item[listItem.key]
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-separator inset />
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 15px; border: 1px solid #ccc; border-radius: 3px">
|
||||
<q-expansion-item label="子屏蔽门状态">
|
||||
<template :key="item.id" v-for="item in screenDoorState.asdStates">
|
||||
<q-list dense>
|
||||
<q-item v-for="(listItem, index) in smallDoorlist" :key="index">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ listItem.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-item-label caption>{{
|
||||
listItem.formatFn
|
||||
? listItem.formatFn(item[listItem.key])
|
||||
: item[listItem.key]
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-separator inset />
|
||||
</template>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</template>
|
||||
|
@ -161,10 +161,10 @@ import {
|
||||
import { errorNotify, successNotify } from 'src/utils/CommonNotify';
|
||||
import { removeAllTrain } from 'src/api/Simulation';
|
||||
import { ApiError } from 'src/boot/axios';
|
||||
import { IbpBox } from 'src/graphics/ibpBox/IbpBox';
|
||||
import { PslBox } from 'src/graphics/pslBox/PslBox';
|
||||
import { PslBoxOperateInteraction } from './graphics/PslBoxInteraction';
|
||||
import { IbpBoxOperateInteraction } from './graphics/IbpBoxInteraction';
|
||||
import { IbpBox,IbpBoxTemplate } from 'src/graphics/ibpBox/IbpBox';
|
||||
import { PslBox,PslBoxTemplate } from 'src/graphics/pslBox/PslBox';
|
||||
import { PslBoxData, PslBoxOperateInteraction } from './graphics/PslBoxInteraction';
|
||||
import { IbpBoxData, IbpBoxOperateInteraction } from './graphics/IbpBoxInteraction';
|
||||
|
||||
const showOptions: MenuItemOptions = {
|
||||
name: '显示控制',
|
||||
@ -280,6 +280,8 @@ export function initLineScene(lineApp: IGraphicApp, sceneName: string) {
|
||||
new SpksSwitchTemplate(new SpksSwitchData()),
|
||||
new GatedBoxTemplate(new GatedBoxData()),
|
||||
new EsbButtonTemplate(new EsbButtonData(), new EsbButtonState()),
|
||||
new IbpBoxTemplate(new IbpBoxData()),
|
||||
new PslBoxTemplate(new PslBoxData()),
|
||||
new TransponderTemplate(new TransponderData(), new TransponderState()),
|
||||
new SlopeKiloMarkerTemplate(new SlopeKiloMarkerData()),
|
||||
// new LinkTemplate(new LinkData()),
|
||||
@ -598,6 +600,12 @@ export async function loadLineDatas(): Promise<IGraphicStorage> {
|
||||
storage.autoReturnBoxs.forEach((autoReturnBox) => {
|
||||
datas.push(new AutoReturnBoxData(autoReturnBox));
|
||||
});
|
||||
storage.ibpBoxs.forEach((ibpBox) => {
|
||||
datas.push(new IbpBoxData(ibpBox));
|
||||
});
|
||||
storage.pslBoxs.forEach((pslBox) => {
|
||||
datas.push(new PslBoxData(pslBox));
|
||||
});
|
||||
// const linkIdGenerator = new IdGenerator(Link.Type);
|
||||
// storage.CalculateLink.forEach((link) => {
|
||||
// const g = new LinkData(link);
|
||||
|
Loading…
Reference in New Issue
Block a user