联锁编号映射暂提
This commit is contained in:
parent
e769e16fc3
commit
d45232e6c9
@ -1 +1 @@
|
||||
Subproject commit b84f16bc347d346c7a42b6152386457af53e090b
|
||||
Subproject commit f232ff605d44f4c989a823f2416215e4c3bb60b9
|
410
src/components/draw-app/dialogs/LianSuoBianHao.vue
Normal file
410
src/components/draw-app/dialogs/LianSuoBianHao.vue
Normal file
@ -0,0 +1,410 @@
|
||||
<!-- eslint-disable vue/no-mutating-props -->
|
||||
<template>
|
||||
<draggable-dialog
|
||||
seamless
|
||||
title="联锁编号映射数据"
|
||||
v-model="showLianSuoBianHao"
|
||||
:width="600"
|
||||
:height="500"
|
||||
>
|
||||
<q-splitter v-model="splitterModel" style="height: 390px">
|
||||
<template v-slot:before>
|
||||
<q-tabs
|
||||
v-model="tab"
|
||||
vertical
|
||||
class="text-teal"
|
||||
@update:model-value="tabUpdate"
|
||||
>
|
||||
<q-tab name="station" label="联锁站" />
|
||||
<q-tab name="turnout" label="道岔" />
|
||||
<q-tab name="screenDoor" label="屏蔽门" />
|
||||
<q-tab name="signal" label="信号机" />
|
||||
<q-tab name="section" label="区段" />
|
||||
<q-tab name="floodGate" label="防淹门" />
|
||||
<q-tab name="spksSwitch" label="SPKS" />
|
||||
<q-tab name="garageDoor" label="车库门" />
|
||||
<q-tab name="carWashing" label="洗车机" />
|
||||
</q-tabs>
|
||||
</template>
|
||||
|
||||
<template v-slot:after>
|
||||
<q-tab-panels
|
||||
v-model="tab"
|
||||
animated
|
||||
swipeable
|
||||
vertical
|
||||
transition-prev="jump-up"
|
||||
transition-next="jump-up"
|
||||
>
|
||||
<q-tab-panel name="station">
|
||||
<div class="row" style="justify-content: space-around">
|
||||
<template :key="item.id" v-for="item in deviceOptions">
|
||||
<q-input
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
v-model.number="item.index"
|
||||
type="number"
|
||||
:label="item.name + '联锁编号:'"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="turnout">
|
||||
<div class="row" style="justify-content: space-around">
|
||||
<template :key="item.id" v-for="item in deviceOptions">
|
||||
<q-input
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
v-model.number="item.index"
|
||||
type="number"
|
||||
:label="item.name + '联锁编号:'"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="screenDoor">
|
||||
<div class="row" style="justify-content: space-around">
|
||||
<template :key="item.id" v-for="item in deviceOptions">
|
||||
<q-input
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
v-model.number="item.index"
|
||||
type="number"
|
||||
:label="item.name + '联锁编号:'"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="signal">
|
||||
<div class="row" style="justify-content: space-around">
|
||||
<template :key="item.id" v-for="item in deviceOptions">
|
||||
<q-input
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
v-model.number="item.index"
|
||||
type="number"
|
||||
:label="item.name + '联锁编号:'"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="section">
|
||||
<div class="row" style="justify-content: space-around">
|
||||
<template :key="item.id" v-for="item in deviceOptions">
|
||||
<q-input
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
v-model.number="item.index"
|
||||
type="number"
|
||||
:label="item.name + '联锁编号:'"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="floodGate">
|
||||
<div class="row" style="justify-content: space-around">
|
||||
<template :key="item.id" v-for="item in deviceOptions">
|
||||
<q-input
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
v-model.number="item.index"
|
||||
type="number"
|
||||
:label="item.name + '联锁编号:'"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="spksSwitch">
|
||||
<div class="row" style="justify-content: space-around">
|
||||
<template :key="item.id" v-for="item in deviceOptions">
|
||||
<q-input
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
v-model.number="item.index"
|
||||
type="number"
|
||||
:label="item.name + '联锁编号:'"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="garageDoor">
|
||||
<div class="row" style="justify-content: space-around">
|
||||
<template :key="item.id" v-for="item in deviceOptions">
|
||||
<q-input
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
v-model.number="item.index"
|
||||
type="number"
|
||||
:label="item.name + '联锁编号:'"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="carWashing">
|
||||
<div class="row" style="justify-content: space-around">
|
||||
<template :key="item.id" v-for="item in deviceOptions">
|
||||
<q-input
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
v-model.number="item.index"
|
||||
type="number"
|
||||
:label="item.name + '联锁编号:'"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</template>
|
||||
</q-splitter>
|
||||
</draggable-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import DraggableDialog from 'src/components/common/DraggableDialog.vue';
|
||||
import { Station } from 'src/graphics/station/Station';
|
||||
import { useDrawStore } from 'src/stores/draw-store';
|
||||
import { Turnout } from 'src/graphics/turnout/Turnout';
|
||||
import { ScreenDoor } from 'src/graphics/screenDoor/ScreenDoor';
|
||||
import { Platform } from 'src/graphics/platform/Platform';
|
||||
import { Signal } from 'src/graphics/signal/Signal';
|
||||
import { Section } from 'src/graphics/section/Section';
|
||||
import { FloodGate } from 'src/graphics/floodGate/FloodGate';
|
||||
import { SpksSwitch } from 'src/graphics/spksSwitch/SpksSwitch';
|
||||
import { GarageDoor } from 'src/graphics/garageDoor/GarageDoor';
|
||||
import { CarWashing } from 'src/graphics/carWashing/CarWashing';
|
||||
const drawStore = useDrawStore();
|
||||
|
||||
const deviceOptions = ref<{ id: number; name: string; index: number }[]>([]);
|
||||
const tab = ref<string>('');
|
||||
const splitterModel = ref<number>(20);
|
||||
|
||||
const showLianSuoBianHao = ref(true);
|
||||
const drawApp = drawStore.getDrawApp();
|
||||
|
||||
function stationUpdateData() {
|
||||
const list: { id: number; name: string; index: number }[] = [];
|
||||
const stations = drawApp.queryStore.queryByType<Station>(Station.Type);
|
||||
deviceOptions.value = [];
|
||||
stations.forEach((sta) => {
|
||||
list.push({ id: sta.datas.id, name: sta.datas.stationName, index: 0 });
|
||||
deviceOptions.value = list;
|
||||
});
|
||||
}
|
||||
|
||||
function turnoutUpdateData() {
|
||||
const list: { id: number; name: string; index: number }[] = [];
|
||||
const turnouts = drawApp.queryStore.queryByType<Turnout>(Turnout.Type);
|
||||
turnouts.forEach((turnout) => {
|
||||
let name = turnout.datas.code;
|
||||
if (turnout.datas.centralizedStations.length > 0) {
|
||||
turnout.datas.centralizedStations.forEach((id) => {
|
||||
const station = drawApp.queryStore.queryById<Station>(id);
|
||||
name = name + '-' + station.datas.stationName;
|
||||
});
|
||||
}
|
||||
list.push({ id: turnout.datas.id, name: name, index: 0 });
|
||||
deviceOptions.value = list;
|
||||
});
|
||||
}
|
||||
|
||||
function screenDoorUpdateData() {
|
||||
const list: { id: number; name: string; index: number }[] = [];
|
||||
const screenDoors = drawApp.queryStore.queryByType<ScreenDoor>(
|
||||
ScreenDoor.Type
|
||||
);
|
||||
screenDoors.forEach((screenDoor) => {
|
||||
let name = screenDoor.datas.code;
|
||||
if (screenDoor.datas.refPlatform) {
|
||||
const stand = drawApp.queryStore.queryById<Platform>(
|
||||
screenDoor.datas.refPlatform
|
||||
);
|
||||
name = name + '-' + stand.datas.code;
|
||||
if (stand.datas.refStation) {
|
||||
const station = drawApp.queryStore.queryById<Station>(
|
||||
stand.datas.refStation
|
||||
);
|
||||
name = name + '-' + station.datas.stationName;
|
||||
}
|
||||
}
|
||||
list.push({
|
||||
id: screenDoor.datas.id,
|
||||
name: name,
|
||||
index: 0,
|
||||
});
|
||||
deviceOptions.value = list;
|
||||
});
|
||||
}
|
||||
|
||||
function signalUpdateData() {
|
||||
const list: { id: number; name: string; index: number }[] = [];
|
||||
const signals = drawApp.queryStore.queryByType<Signal>(Signal.Type);
|
||||
signals.forEach((signal) => {
|
||||
let name = signal.datas.code;
|
||||
if (signal.datas.centralizedStations.length > 0) {
|
||||
signal.datas.centralizedStations.forEach((id) => {
|
||||
const station = drawApp.queryStore.queryById<Station>(id);
|
||||
name = name + '-' + station.datas.stationName;
|
||||
});
|
||||
}
|
||||
list.push({
|
||||
id: signal.datas.id,
|
||||
name: name,
|
||||
index: 0,
|
||||
});
|
||||
deviceOptions.value = list;
|
||||
});
|
||||
}
|
||||
|
||||
function sectionUpdateData() {
|
||||
const list: { id: number; name: string; index: number }[] = [];
|
||||
const sections = drawApp.queryStore.queryByType<Section>(Section.Type);
|
||||
sections.forEach((section) => {
|
||||
let name = section.datas.code;
|
||||
if (section.datas.centralizedStations.length > 0) {
|
||||
section.datas.centralizedStations.forEach((id) => {
|
||||
const station = drawApp.queryStore.queryById<Station>(id);
|
||||
name = name + '-' + station.datas.stationName;
|
||||
});
|
||||
}
|
||||
list.push({
|
||||
id: section.datas.id,
|
||||
name: name,
|
||||
index: 0,
|
||||
});
|
||||
deviceOptions.value = list;
|
||||
});
|
||||
}
|
||||
|
||||
function floodGateUpdateData() {
|
||||
const list: { id: number; name: string; index: number }[] = [];
|
||||
const floodGates = drawApp.queryStore.queryByType<FloodGate>(FloodGate.Type);
|
||||
floodGates.forEach((floodGate) => {
|
||||
let name = floodGate.datas.code;
|
||||
if (floodGate.datas.centralizedStations.length > 0) {
|
||||
floodGate.datas.centralizedStations.forEach((id) => {
|
||||
const station = drawApp.queryStore.queryById<Station>(id);
|
||||
name = name + '-' + station.datas.stationName;
|
||||
});
|
||||
}
|
||||
list.push({
|
||||
id: floodGate.datas.id,
|
||||
name: name,
|
||||
index: 0,
|
||||
});
|
||||
deviceOptions.value = list;
|
||||
});
|
||||
}
|
||||
|
||||
function spksSwitchUpdateData() {
|
||||
const list: { id: number; name: string; index: number }[] = [];
|
||||
const spksSwitches = drawApp.queryStore.queryByType<SpksSwitch>(
|
||||
SpksSwitch.Type
|
||||
);
|
||||
spksSwitches.forEach((spksSwitch) => {
|
||||
let name = spksSwitch.datas.code;
|
||||
if (spksSwitch.datas.refStand) {
|
||||
const stand = drawApp.queryStore.queryById<Platform>(
|
||||
spksSwitch.datas.refStand
|
||||
);
|
||||
name = name + '-' + stand.datas.code;
|
||||
if (stand.datas.refStation) {
|
||||
const station = drawApp.queryStore.queryById<Station>(
|
||||
stand.datas.refStation
|
||||
);
|
||||
name = name + '-' + station.datas.stationName;
|
||||
}
|
||||
}
|
||||
list.push({
|
||||
id: spksSwitch.datas.id,
|
||||
name: name,
|
||||
index: 0,
|
||||
});
|
||||
deviceOptions.value = list;
|
||||
});
|
||||
}
|
||||
|
||||
function garageDoorUpdateData() {
|
||||
const list: { id: number; name: string; index: number }[] = [];
|
||||
const garageDoors = drawApp.queryStore.queryByType<GarageDoor>(
|
||||
GarageDoor.Type
|
||||
);
|
||||
garageDoors.forEach((garageDoor) => {
|
||||
let name = garageDoor.code;
|
||||
if (garageDoor.datas.centralizedStations.length > 0) {
|
||||
garageDoor.datas.centralizedStations.forEach((id) => {
|
||||
const station = drawApp.queryStore.queryById<Station>(id);
|
||||
name = name + '-' + station.datas.stationName;
|
||||
});
|
||||
}
|
||||
list.push({
|
||||
id: garageDoor.datas.id,
|
||||
name: name,
|
||||
index: 0,
|
||||
});
|
||||
deviceOptions.value = list;
|
||||
});
|
||||
}
|
||||
|
||||
function carWashingUpdateData() {
|
||||
const list: { id: number; name: string; index: number }[] = [];
|
||||
const carWashings = drawApp.queryStore.queryByType<CarWashing>(
|
||||
CarWashing.Type
|
||||
);
|
||||
carWashings.forEach((carWashing) => {
|
||||
let name = carWashing.code;
|
||||
if (carWashing.datas.centralizedStations.length > 0) {
|
||||
carWashing.datas.centralizedStations.forEach((id) => {
|
||||
const station = drawApp.queryStore.queryById<Station>(id);
|
||||
name = name + '-' + station.datas.stationName;
|
||||
});
|
||||
}
|
||||
list.push({
|
||||
id: carWashing.datas.id,
|
||||
name: name,
|
||||
index: 0,
|
||||
});
|
||||
deviceOptions.value = list;
|
||||
});
|
||||
}
|
||||
|
||||
function tabUpdate() {
|
||||
switch (tab.value) {
|
||||
case 'station':
|
||||
stationUpdateData();
|
||||
break;
|
||||
case 'turnout':
|
||||
turnoutUpdateData();
|
||||
break;
|
||||
case 'screenDoor':
|
||||
screenDoorUpdateData();
|
||||
break;
|
||||
case 'signal':
|
||||
signalUpdateData();
|
||||
break;
|
||||
case 'section':
|
||||
sectionUpdateData();
|
||||
break;
|
||||
case 'floodGate':
|
||||
floodGateUpdateData();
|
||||
break;
|
||||
case 'spksSwitch':
|
||||
spksSwitchUpdateData();
|
||||
break;
|
||||
case 'garageDoor':
|
||||
garageDoorUpdateData();
|
||||
break;
|
||||
case ' carWashing':
|
||||
carWashingUpdateData();
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped></style>
|
@ -5,10 +5,10 @@ function getHost(): string {
|
||||
return 'joylink.club/bjrtsts-server';
|
||||
} else if (process.env.URL_ENV == 'local_test') {
|
||||
return '192.168.33.233:9091';
|
||||
}else if(process.env.URL_ENV == 'local_pxf'){
|
||||
} else if (process.env.URL_ENV == 'local_pxf') {
|
||||
//北京现场
|
||||
|
||||
return '172.29.5.168/bjrtss-server'
|
||||
return '172.29.5.168/bjrtss-server';
|
||||
}
|
||||
|
||||
// return '192.168.3.7:9091';
|
||||
@ -18,7 +18,7 @@ function getHost(): string {
|
||||
// return '192.168.33.93:9091';
|
||||
// return '192.168.3.37:9091'; //卫志宏
|
||||
// return 'test.joylink.club/bjrtsts-service'; // 测试
|
||||
return '127.0.0.1:9091';
|
||||
return '192.168.33.233:9091';
|
||||
}
|
||||
|
||||
export function getHttpBase() {
|
||||
@ -31,7 +31,7 @@ export function getHttpBase() {
|
||||
|
||||
export function getWebsocketUrl() {
|
||||
let protocol = 'ws';
|
||||
let host = '127.0.0.1';
|
||||
let host = '192.168.33.233:9091';
|
||||
// let host = 'test.joylink.club';
|
||||
let port = '8083';
|
||||
let url = `${protocol}://${host}:${port}`;
|
||||
|
@ -248,6 +248,7 @@ import { CategoryType } from 'src/components/CategoryType';
|
||||
import { graphicData } from 'src/protos/stationLayoutGraphics';
|
||||
import KilometerConvertList from 'src/components/draw-app/dialogs/KilometerConvertList.vue';
|
||||
import LoadTransponderData from 'src/components/draw-app/dialogs/LoadTransponderData.vue';
|
||||
import LianSuoBianHao from 'src/components/draw-app/dialogs/LianSuoBianHao.vue';
|
||||
import KilometerConvertConfig from 'src/components/draw-app/properties/KilometerConvertConfig.vue';
|
||||
import SectionCodePointList from 'src/components/draw-app/dialogs/SectionCodePointList.vue';
|
||||
import SectionCodePointConfig from 'src/components/draw-app/properties/SectionCodePointConfig.vue';
|
||||
@ -409,6 +410,10 @@ const dataManageConfig = [
|
||||
label: '导入应答器报文',
|
||||
click: uploadTransponderMessage,
|
||||
},
|
||||
{
|
||||
label: '联锁编号映射数据',
|
||||
click: lianSuoBianHao,
|
||||
},
|
||||
];
|
||||
|
||||
onMounted(() => {
|
||||
@ -1169,6 +1174,18 @@ function uploadTransponderMessage() {
|
||||
});
|
||||
}
|
||||
|
||||
let lianSuoBianHaoDialog: DialogChainObject | null = null;
|
||||
function lianSuoBianHao() {
|
||||
if (lianSuoBianHaoDialog) return;
|
||||
lianSuoBianHaoDialog = $q
|
||||
.dialog({
|
||||
component: LianSuoBianHao,
|
||||
})
|
||||
.onCancel(() => {
|
||||
lianSuoBianHaoDialog = null;
|
||||
});
|
||||
}
|
||||
|
||||
let relateDeviceDialogInstance: DialogChainObject | null = null;
|
||||
const relateDeviceConfigEdit =
|
||||
ref<InstanceType<typeof StationRelateDeviceConfig>>();
|
||||
|
Loading…
Reference in New Issue
Block a user