diff --git a/rts-sim-testing-message b/rts-sim-testing-message
index a153409..86b35d3 160000
--- a/rts-sim-testing-message
+++ b/rts-sim-testing-message
@@ -1 +1 @@
-Subproject commit a1534096aa1ed2566b93ffe7bfde76750de10a60
+Subproject commit 86b35d3ead9a269f812b105d8a30a43c019da8bc
diff --git a/src/components/draw-app/dialogs/LoadTransponderData.vue b/src/components/draw-app/dialogs/LoadTransponderData.vue
index 2479cfe..dd8352e 100644
--- a/src/components/draw-app/dialogs/LoadTransponderData.vue
+++ b/src/components/draw-app/dialogs/LoadTransponderData.vue
@@ -105,6 +105,9 @@ function onCreate() {
const messageIndex = titleKeys.findIndex(
(key) => title[key] === '报文(1023bits)'
);
+ const originalCodeIndex = titleKeys.findIndex(
+ (key) => title[key] === '应答器编号'
+ );
dataList.forEach((data, i) => {
if (i > index) {
const tranCode =
@@ -126,6 +129,9 @@ function onCreate() {
datas.fixedUserTelegram = data[
titleKeys[userMessageIndex]
].replaceAll(' ', '');
+ datas.originalCode = data[
+ titleKeys[originalCodeIndex]
+ ].replaceAll(' ', '');
transpnder.updateData(datas);
}
}
diff --git a/src/components/draw-app/properties/TransponderProperty.vue b/src/components/draw-app/properties/TransponderProperty.vue
index e27f51c..3f5d145 100644
--- a/src/components/draw-app/properties/TransponderProperty.vue
+++ b/src/components/draw-app/properties/TransponderProperty.vue
@@ -40,6 +40,13 @@
+
(new TransponderState());
const code = ref('');
+const originalCode = ref('');
const type = ref(0);
const kilometer = ref(0);
enum TransponderOperation {
@@ -144,6 +145,7 @@ interface KeyType {
const list: KeyType[] = [
{ label: '应答器索引', key: 'code' },
{ label: '应答器名称', key: 'code', formatFn: getNameFormat },
+ { label: '应答器原编号', key: 'code', formatFn: getOriginalCodeFormat },
{ label: '坐标系', key: 'km', formatFn: getCoordinateSystemFormat },
{ label: '公里标', key: 'km', formatFn: getKilometerFormat },
{ label: '方向', key: 'km', formatFn: getDirectionFormat },
@@ -162,6 +164,9 @@ const list1: KeyType[] = [
function getNameFormat(v: string) {
return code.value || v;
}
+function getOriginalCodeFormat(v: string) {
+ return originalCode.value || v;
+}
function getCoordinateSystemFormat(v: graphicData.KilometerSystem) {
return v.coordinateSystem;
}
@@ -198,6 +203,7 @@ function initTransponderState(transponder: Transponder) {
copySelectGraphic = toRaw(transponder);
code.value = transponder.datas.code;
type.value = transponder.datas.type;
+ originalCode.value = transponder.datas.originalCode;
kilometer.value = transponder.states.km?.kilometer || 0;
transponderState.value = transponder.states.clone() as TransponderState;
subscribeState(transponder);
diff --git a/src/drawApp/graphics/TransponderInteraction.ts b/src/drawApp/graphics/TransponderInteraction.ts
index d75a8f5..e13284c 100644
--- a/src/drawApp/graphics/TransponderInteraction.ts
+++ b/src/drawApp/graphics/TransponderInteraction.ts
@@ -24,14 +24,15 @@ import {
resetMessageTransponder,
resetPositionTransponder,
stopTransponderTelegram,
- sendTransponderTelegram
+ sendTransponderTelegram,
} from 'src/api/Simulation';
import { errorNotify } from 'src/utils/CommonNotify';
import { state } from 'src/protos/device_state';
export class TransponderData
extends GraphicDataBase
- implements ITransponderData {
+ implements ITransponderData
+{
constructor(data?: graphicData.Transponder) {
let transponder;
if (!data) {
@@ -92,6 +93,12 @@ export class TransponderData
set type(v: TransponderTypeEnum) {
this.data.type = v;
}
+ get originalCode(): string {
+ return this.data.originalCode;
+ }
+ set originalCode(v: string) {
+ this.data.originalCode = v;
+ }
clone(): TransponderData {
return new TransponderData(this.data.cloneMessage());
}
@@ -127,7 +134,8 @@ const TransponderOperationMenu: ContextMenu = ContextMenu.init({
export class TransponderState
extends GraphicStateBase
- implements ITransponderState {
+ implements ITransponderState
+{
constructor(proto?: state.BaliseState) {
let states;
if (proto) {
@@ -150,10 +158,10 @@ export class TransponderState
return this.states.km
? this.states.km
: new graphicData.KilometerSystem({
- coordinateSystem: '',
- kilometer: 0,
- direction: 0,
- });
+ coordinateSystem: '',
+ kilometer: 0,
+ direction: 0,
+ });
}
set km(v: graphicData.KilometerSystem) {
this.states.km = new graphicData.KilometerSystem(v);
diff --git a/src/graphics/transponder/Transponder.ts b/src/graphics/transponder/Transponder.ts
index 829511a..6ad9c21 100644
--- a/src/graphics/transponder/Transponder.ts
+++ b/src/graphics/transponder/Transponder.ts
@@ -37,6 +37,8 @@ export interface ITransponderData extends GraphicData {
set fixedUserTelegram(v: string);
get type(): TransponderTypeEnum; // 应答器类型
set type(v: TransponderTypeEnum);
+ get originalCode(): string; //原编号
+ set originalCode(v: string);
clone(): ITransponderData;
copyFrom(data: ITransponderData): void;
eq(other: ITransponderData): boolean;
@@ -217,8 +219,8 @@ export class Transponder extends JlGraphic {
this.states.km &&
this.states.km.kilometer === this.datas.kilometerSystem.kilometer &&
this.states.fixedTelegram === this.datas.fixedTelegram &&
- this.states.fixedUserTelegram === this.datas.fixedUserTelegram
- && this.states.work
+ this.states.fixedUserTelegram === this.datas.fixedUserTelegram &&
+ this.states.work
) {
textColor = '#ffffff';
}
diff --git a/src/protos/stationLayoutGraphics.ts b/src/protos/stationLayoutGraphics.ts
index 764c18b..32ddc6f 100644
--- a/src/protos/stationLayoutGraphics.ts
+++ b/src/protos/stationLayoutGraphics.ts
@@ -5345,6 +5345,7 @@ export namespace graphicData {
centralizedStations?: number[];
fixedTelegram?: string;
fixedUserTelegram?: string;
+ originalCode?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7, 10], this.#one_of_decls);
@@ -5376,6 +5377,9 @@ export namespace graphicData {
if ("fixedUserTelegram" in data && data.fixedUserTelegram != undefined) {
this.fixedUserTelegram = data.fixedUserTelegram;
}
+ if ("originalCode" in data && data.originalCode != undefined) {
+ this.originalCode = data.originalCode;
+ }
}
}
get common() {
@@ -5441,6 +5445,12 @@ export namespace graphicData {
set fixedUserTelegram(value: string) {
pb_1.Message.setField(this, 12, value);
}
+ get originalCode() {
+ return pb_1.Message.getFieldWithDefault(this, 13, "") as string;
+ }
+ set originalCode(value: string) {
+ pb_1.Message.setField(this, 13, value);
+ }
static fromObject(data: {
common?: ReturnType;
code?: string;
@@ -5451,6 +5461,7 @@ export namespace graphicData {
centralizedStations?: number[];
fixedTelegram?: string;
fixedUserTelegram?: string;
+ originalCode?: string;
}): Transponder {
const message = new Transponder({});
if (data.common != null) {
@@ -5480,6 +5491,9 @@ export namespace graphicData {
if (data.fixedUserTelegram != null) {
message.fixedUserTelegram = data.fixedUserTelegram;
}
+ if (data.originalCode != null) {
+ message.originalCode = data.originalCode;
+ }
return message;
}
toObject() {
@@ -5493,6 +5507,7 @@ export namespace graphicData {
centralizedStations?: number[];
fixedTelegram?: string;
fixedUserTelegram?: string;
+ originalCode?: string;
} = {};
if (this.common != null) {
data.common = this.common.toObject();
@@ -5521,6 +5536,9 @@ export namespace graphicData {
if (this.fixedUserTelegram != null) {
data.fixedUserTelegram = this.fixedUserTelegram;
}
+ if (this.originalCode != null) {
+ data.originalCode = this.originalCode;
+ }
return data;
}
serialize(): Uint8Array;
@@ -5545,6 +5563,8 @@ export namespace graphicData {
writer.writeString(11, this.fixedTelegram);
if (this.fixedUserTelegram.length)
writer.writeString(12, this.fixedUserTelegram);
+ if (this.originalCode.length)
+ writer.writeString(13, this.originalCode);
if (!w)
return writer.getResultBuffer();
}
@@ -5581,6 +5601,9 @@ export namespace graphicData {
case 12:
message.fixedUserTelegram = reader.readString();
break;
+ case 13:
+ message.originalCode = reader.readString();
+ break;
default: reader.skipField();
}
}