diff --git a/bj-rtss-message b/bj-rtss-message
index 60ed568..df9ed05 160000
--- a/bj-rtss-message
+++ b/bj-rtss-message
@@ -1 +1 @@
-Subproject commit 60ed5685cf48665f31df84a62a1182bfcb08dbb2
+Subproject commit df9ed054c0bb76f7de1f188ef7fb8c31a6513509
diff --git a/src/api/Simulation.ts b/src/api/Simulation.ts
index 6ed7c0b..1ec78cb 100644
--- a/src/api/Simulation.ts
+++ b/src/api/Simulation.ts
@@ -56,12 +56,11 @@ export async function removeTrain(data: {
return response.data;
}
-export async function setSaxleSectionState(data: {
+export async function setAxleSectionState(data: {
simulationId: string;
mapId: number;
id: string;
operation: number;
- reset?: boolean;
}) {
return await api.post(`${UriBase}/axleSection/operation`, data);
}
diff --git a/src/components/line-app/states/SectionState.vue b/src/components/line-app/states/SectionState.vue
index c95ac9d..afba07b 100644
--- a/src/components/line-app/states/SectionState.vue
+++ b/src/components/line-app/states/SectionState.vue
@@ -53,7 +53,7 @@ import { useLineStore } from 'src/stores/line-store';
import { ref, watch, onMounted } from 'vue';
import { Section } from 'src/graphics/section/Section';
import { request } from 'src/protos/request';
-import { setSaxleSectionState } from 'src/api/Simulation';
+import { setAxleSectionState } from 'src/api/Simulation';
import { useQuasar } from 'quasar';
import { ApiError } from 'src/boot/axios';
@@ -103,17 +103,29 @@ onMounted(() => {
});
const options = [
- { label: '设置计轴直接复位', value: request.Section.AxleOperation.Drst },
- { label: '取消计轴直接复位', value: request.Section.AxleOperation.Drst },
- { label: '设置计轴预复位', value: request.Section.AxleOperation.Pdrst },
- { label: '取消计轴预复位', value: request.Section.AxleOperation.Pdrst },
{
- label: '设置计轴区段内有车轴',
- value: request.Section.AxleOperation.TrainIn,
+ label: '设置计轴直接复位',
+ value: request.Section.Operation.SetDrst,
},
{
- label: '设置计轴区段内没有车轴',
- value: request.Section.AxleOperation.TrainOut,
+ label: '取消计轴直接复位',
+ value: request.Section.Operation.CancelDrst,
+ },
+ {
+ label: '设置计轴预复位',
+ value: request.Section.Operation.SetPdrst,
+ },
+ {
+ label: '取消计轴预复位',
+ value: request.Section.Operation.CancelPdrst,
+ },
+ {
+ label: '设置区段故障占用',
+ value: request.Section.Operation.SetFaultOcc,
+ },
+ {
+ label: '取消区段故障占用',
+ value: request.Section.Operation.CancelFaultOcc,
},
];
function toDo(item: { label: string; value: number }) {
@@ -124,16 +136,7 @@ function toDo(item: { label: string; value: number }) {
id: sectionState.value.id,
operation: item.value,
};
- if (
- [
- request.Section.AxleOperation.Drst,
- request.Section.AxleOperation.Pdrst,
- ].includes(item.value)
- ) {
- const s = !item.label.includes('取消');
- Object.assign(obj, { reset: s });
- }
- setSaxleSectionState(obj)
+ setAxleSectionState(obj)
.then(() => {
$q.notify({ type: 'positive', message: '修改区段状态成功' });
})
diff --git a/src/configs/UrlManage.ts b/src/configs/UrlManage.ts
index 6f2adb8..798ac14 100644
--- a/src/configs/UrlManage.ts
+++ b/src/configs/UrlManage.ts
@@ -8,9 +8,9 @@ function getHost(): string {
// return '192.168.3.47:9091';
// return '192.168.3.37:9091';
// return '192.168.3.15:9091';
- // return '192.168.3.5:9091';
+ return '192.168.3.5:9091';
// return '192.168.3.37:9091'; //卫志宏
- return '192.168.3.233:9091';
+ // return '192.168.3.233:9091';
}
export function getHttpBase() {
diff --git a/src/drawApp/commonApp.ts b/src/drawApp/commonApp.ts
index 8fdac52..58c0033 100644
--- a/src/drawApp/commonApp.ts
+++ b/src/drawApp/commonApp.ts
@@ -46,7 +46,7 @@ import { TurnoutDraw } from 'src/graphics/turnout/TurnoutDrawAssistant';
import { TurnoutData, TurnoutStates } from './graphics/TurnoutInteraction';
import { Section, SectionTemplate } from 'src/graphics/section/Section';
import { SectionDraw } from 'src/graphics/section/SectionDrawAssistant';
-import { SectionData } from './graphics/SectionInteraction';
+import { SectionData, SectionStates } from './graphics/SectionInteraction';
import { toStorageTransform } from './graphics/GraphicDataBase';
import { SeparatorDraw } from 'src/graphics/separator/SeparatorDrawAssistant';
import { Separator, SeparatorTemplate } from 'src/graphics/separator/Separator';
@@ -181,7 +181,10 @@ export function initCommonDrawApp(app: IDrawApp) {
);
// new SignalDraw(app, new SignalTemplate(new SignalData(), new SignalState()));
new TrainDraw(app, new TrainTemplate(new TrainState()));
- new SectionDraw(app, new SectionTemplate(new SectionData()));
+ new SectionDraw(
+ app,
+ new SectionTemplate(new SectionData(), new SectionStates())
+ );
new TurnoutDraw(
app,
new TurnoutTemplate(new TurnoutData(), new TurnoutStates())
diff --git a/src/layouts/LineLayout.vue b/src/layouts/LineLayout.vue
index f80b44e..b0ee624 100644
--- a/src/layouts/LineLayout.vue
+++ b/src/layouts/LineLayout.vue
@@ -19,7 +19,13 @@
class="q-mr-md"
@click="destroySimAndBack"
/>
-
+
+
@@ -108,7 +114,7 @@ const simulationId = (route.query.simulationId as string) || '';
const projectId = (route.query.projectId as string) || '';
const defaultMapId = (route.query.defaultMapId as string) || '';
let sceneName = '';
-const drawerRight = ref(false);
+const drawerRight = ref(true);
const projectName = computed(() => projectInfo.name);
@@ -192,7 +198,7 @@ onMounted(async () => {
lineStore.setMapId(null);
lineStore.setSimulationId(null);
}
- drawerRight.value = false;
+ // drawerRight.value = false;
});
onUnmounted(() => {
if (dialogInstance.value && lineStore.showLayerDialog) {
@@ -209,17 +215,6 @@ onUnmounted(() => {
lineStore.destroy();
});
-watch(
- [() => lineStore.stateProCount, () => lineStore.selectedGraphics],
- ([count, sg], [prevCount]) => {
- if (count !== prevCount && sg && sg.length === 1) {
- drawerRight.value = true;
- } else {
- drawerRight.value = false;
- }
- }
-);
-
const pslCanvasWidth = ref(500);
const pslCanvasHeight = ref(600);
watch(
diff --git a/src/protos/device_state.ts b/src/protos/device_state.ts
index 5509507..4287152 100644
--- a/src/protos/device_state.ts
+++ b/src/protos/device_state.ts
@@ -222,6 +222,17 @@ export namespace state {
reverse?: boolean;
dw?: boolean;
fw?: boolean;
+ force?: boolean;
+ sb?: boolean;
+ dwsb?: boolean;
+ fwsb?: boolean;
+ jc?: boolean;
+ qdc?: boolean;
+ qfc?: boolean;
+ qyc?: boolean;
+ dc?: boolean;
+ fc?: boolean;
+ yc?: boolean;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@@ -241,6 +252,39 @@ export namespace state {
if ("fw" in data && data.fw != undefined) {
this.fw = data.fw;
}
+ if ("force" in data && data.force != undefined) {
+ this.force = data.force;
+ }
+ if ("sb" in data && data.sb != undefined) {
+ this.sb = data.sb;
+ }
+ if ("dwsb" in data && data.dwsb != undefined) {
+ this.dwsb = data.dwsb;
+ }
+ if ("fwsb" in data && data.fwsb != undefined) {
+ this.fwsb = data.fwsb;
+ }
+ if ("jc" in data && data.jc != undefined) {
+ this.jc = data.jc;
+ }
+ if ("qdc" in data && data.qdc != undefined) {
+ this.qdc = data.qdc;
+ }
+ if ("qfc" in data && data.qfc != undefined) {
+ this.qfc = data.qfc;
+ }
+ if ("qyc" in data && data.qyc != undefined) {
+ this.qyc = data.qyc;
+ }
+ if ("dc" in data && data.dc != undefined) {
+ this.dc = data.dc;
+ }
+ if ("fc" in data && data.fc != undefined) {
+ this.fc = data.fc;
+ }
+ if ("yc" in data && data.yc != undefined) {
+ this.yc = data.yc;
+ }
}
}
get id() {
@@ -273,12 +317,89 @@ export namespace state {
set fw(value: boolean) {
pb_1.Message.setField(this, 5, value);
}
+ get force() {
+ return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean;
+ }
+ set force(value: boolean) {
+ pb_1.Message.setField(this, 6, value);
+ }
+ get sb() {
+ return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean;
+ }
+ set sb(value: boolean) {
+ pb_1.Message.setField(this, 7, value);
+ }
+ get dwsb() {
+ return pb_1.Message.getFieldWithDefault(this, 8, false) as boolean;
+ }
+ set dwsb(value: boolean) {
+ pb_1.Message.setField(this, 8, value);
+ }
+ get fwsb() {
+ return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean;
+ }
+ set fwsb(value: boolean) {
+ pb_1.Message.setField(this, 9, value);
+ }
+ get jc() {
+ return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean;
+ }
+ set jc(value: boolean) {
+ pb_1.Message.setField(this, 10, value);
+ }
+ get qdc() {
+ return pb_1.Message.getFieldWithDefault(this, 11, false) as boolean;
+ }
+ set qdc(value: boolean) {
+ pb_1.Message.setField(this, 11, value);
+ }
+ get qfc() {
+ return pb_1.Message.getFieldWithDefault(this, 12, false) as boolean;
+ }
+ set qfc(value: boolean) {
+ pb_1.Message.setField(this, 12, value);
+ }
+ get qyc() {
+ return pb_1.Message.getFieldWithDefault(this, 13, false) as boolean;
+ }
+ set qyc(value: boolean) {
+ pb_1.Message.setField(this, 13, value);
+ }
+ get dc() {
+ return pb_1.Message.getFieldWithDefault(this, 14, false) as boolean;
+ }
+ set dc(value: boolean) {
+ pb_1.Message.setField(this, 14, value);
+ }
+ get fc() {
+ return pb_1.Message.getFieldWithDefault(this, 15, false) as boolean;
+ }
+ set fc(value: boolean) {
+ pb_1.Message.setField(this, 15, value);
+ }
+ get yc() {
+ return pb_1.Message.getFieldWithDefault(this, 16, false) as boolean;
+ }
+ set yc(value: boolean) {
+ pb_1.Message.setField(this, 16, value);
+ }
static fromObject(data: {
id?: string;
normal?: boolean;
reverse?: boolean;
dw?: boolean;
fw?: boolean;
+ force?: boolean;
+ sb?: boolean;
+ dwsb?: boolean;
+ fwsb?: boolean;
+ jc?: boolean;
+ qdc?: boolean;
+ qfc?: boolean;
+ qyc?: boolean;
+ dc?: boolean;
+ fc?: boolean;
+ yc?: boolean;
}): SwitchState {
const message = new SwitchState({});
if (data.id != null) {
@@ -296,6 +417,39 @@ export namespace state {
if (data.fw != null) {
message.fw = data.fw;
}
+ if (data.force != null) {
+ message.force = data.force;
+ }
+ if (data.sb != null) {
+ message.sb = data.sb;
+ }
+ if (data.dwsb != null) {
+ message.dwsb = data.dwsb;
+ }
+ if (data.fwsb != null) {
+ message.fwsb = data.fwsb;
+ }
+ if (data.jc != null) {
+ message.jc = data.jc;
+ }
+ if (data.qdc != null) {
+ message.qdc = data.qdc;
+ }
+ if (data.qfc != null) {
+ message.qfc = data.qfc;
+ }
+ if (data.qyc != null) {
+ message.qyc = data.qyc;
+ }
+ if (data.dc != null) {
+ message.dc = data.dc;
+ }
+ if (data.fc != null) {
+ message.fc = data.fc;
+ }
+ if (data.yc != null) {
+ message.yc = data.yc;
+ }
return message;
}
toObject() {
@@ -305,6 +459,17 @@ export namespace state {
reverse?: boolean;
dw?: boolean;
fw?: boolean;
+ force?: boolean;
+ sb?: boolean;
+ dwsb?: boolean;
+ fwsb?: boolean;
+ jc?: boolean;
+ qdc?: boolean;
+ qfc?: boolean;
+ qyc?: boolean;
+ dc?: boolean;
+ fc?: boolean;
+ yc?: boolean;
} = {};
if (this.id != null) {
data.id = this.id;
@@ -321,6 +486,39 @@ export namespace state {
if (this.fw != null) {
data.fw = this.fw;
}
+ if (this.force != null) {
+ data.force = this.force;
+ }
+ if (this.sb != null) {
+ data.sb = this.sb;
+ }
+ if (this.dwsb != null) {
+ data.dwsb = this.dwsb;
+ }
+ if (this.fwsb != null) {
+ data.fwsb = this.fwsb;
+ }
+ if (this.jc != null) {
+ data.jc = this.jc;
+ }
+ if (this.qdc != null) {
+ data.qdc = this.qdc;
+ }
+ if (this.qfc != null) {
+ data.qfc = this.qfc;
+ }
+ if (this.qyc != null) {
+ data.qyc = this.qyc;
+ }
+ if (this.dc != null) {
+ data.dc = this.dc;
+ }
+ if (this.fc != null) {
+ data.fc = this.fc;
+ }
+ if (this.yc != null) {
+ data.yc = this.yc;
+ }
return data;
}
serialize(): Uint8Array;
@@ -337,6 +535,28 @@ export namespace state {
writer.writeBool(4, this.dw);
if (this.fw != false)
writer.writeBool(5, this.fw);
+ if (this.force != false)
+ writer.writeBool(6, this.force);
+ if (this.sb != false)
+ writer.writeBool(7, this.sb);
+ if (this.dwsb != false)
+ writer.writeBool(8, this.dwsb);
+ if (this.fwsb != false)
+ writer.writeBool(9, this.fwsb);
+ if (this.jc != false)
+ writer.writeBool(10, this.jc);
+ if (this.qdc != false)
+ writer.writeBool(11, this.qdc);
+ if (this.qfc != false)
+ writer.writeBool(12, this.qfc);
+ if (this.qyc != false)
+ writer.writeBool(13, this.qyc);
+ if (this.dc != false)
+ writer.writeBool(14, this.dc);
+ if (this.fc != false)
+ writer.writeBool(15, this.fc);
+ if (this.yc != false)
+ writer.writeBool(16, this.yc);
if (!w)
return writer.getResultBuffer();
}
@@ -361,6 +581,39 @@ export namespace state {
case 5:
message.fw = reader.readBool();
break;
+ case 6:
+ message.force = reader.readBool();
+ break;
+ case 7:
+ message.sb = reader.readBool();
+ break;
+ case 8:
+ message.dwsb = reader.readBool();
+ break;
+ case 9:
+ message.fwsb = reader.readBool();
+ break;
+ case 10:
+ message.jc = reader.readBool();
+ break;
+ case 11:
+ message.qdc = reader.readBool();
+ break;
+ case 12:
+ message.qfc = reader.readBool();
+ break;
+ case 13:
+ message.qyc = reader.readBool();
+ break;
+ case 14:
+ message.dc = reader.readBool();
+ break;
+ case 15:
+ message.fc = reader.readBool();
+ break;
+ case 16:
+ message.yc = reader.readBool();
+ break;
default: reader.skipField();
}
}
diff --git a/src/protos/request.ts b/src/protos/request.ts
index 87c51db..81806e3 100644
--- a/src/protos/request.ts
+++ b/src/protos/request.ts
@@ -55,7 +55,10 @@ export namespace request {
SetSB = 5,
CancelSB = 6,
SetJC = 7,
- CancelJC = 8
+ CancelJC = 8,
+ ForceDw = 9,
+ ForceFw = 10,
+ CancelForce = 11
}
}
export class TurnoutOperationReq extends pb_1.Message {
@@ -291,11 +294,13 @@ export namespace request {
}
}
export namespace Section {
- export enum AxleOperation {
- Drst = 0,
- Pdrst = 1,
- TrainIn = 2,
- TrainOut = 3
+ export enum Operation {
+ SetDrst = 0,
+ CancelDrst = 1,
+ SetPdrst = 2,
+ CancelPdrst = 3,
+ SetFaultOcc = 4,
+ CancelFaultOcc = 5
}
}
}