车站增加是否车辆段
This commit is contained in:
parent
938559a0a9
commit
d94ae6b975
@ -60,6 +60,12 @@
|
||||
emit-value
|
||||
@update:model-value="onUpdate"
|
||||
/>
|
||||
<q-toggle
|
||||
v-model="stationModel.depots"
|
||||
label="是否车辆段"
|
||||
emit-value
|
||||
@update:model-value="onUpdate"
|
||||
/>
|
||||
</q-form>
|
||||
</template>
|
||||
|
||||
|
@ -74,6 +74,12 @@ export class StationData extends GraphicDataBase implements IStationData {
|
||||
set manageStations(v: number[]) {
|
||||
this.data.manageStations = v;
|
||||
}
|
||||
get depots(): boolean {
|
||||
return this.data.depots;
|
||||
}
|
||||
set depots(v: boolean) {
|
||||
this.data.depots = v;
|
||||
}
|
||||
clone(): StationData {
|
||||
return new StationData(this.data.cloneMessage());
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ export interface IStationData extends GraphicData {
|
||||
set name(v: string);
|
||||
get manageStations(): number[]; //集中站管理的车站
|
||||
set manageStations(v: number[]);
|
||||
get depots(): boolean; //是否车辆段
|
||||
set depots(v: boolean);
|
||||
clone(): IStationData;
|
||||
copyFrom(data: IStationData): void;
|
||||
eq(other: IStationData): boolean;
|
||||
|
@ -2382,6 +2382,7 @@ export namespace graphicData {
|
||||
kilometerSystem?: KilometerSystem;
|
||||
name?: string;
|
||||
manageStations?: number[];
|
||||
depots?: boolean;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [8], this.#one_of_decls);
|
||||
@ -2407,6 +2408,9 @@ export namespace graphicData {
|
||||
if ("manageStations" in data && data.manageStations != undefined) {
|
||||
this.manageStations = data.manageStations;
|
||||
}
|
||||
if ("depots" in data && data.depots != undefined) {
|
||||
this.depots = data.depots;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
@ -2457,6 +2461,12 @@ export namespace graphicData {
|
||||
set manageStations(value: number[]) {
|
||||
pb_1.Message.setField(this, 8, value);
|
||||
}
|
||||
get depots() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean;
|
||||
}
|
||||
set depots(value: boolean) {
|
||||
pb_1.Message.setField(this, 9, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
@ -2465,6 +2475,7 @@ export namespace graphicData {
|
||||
kilometerSystem?: ReturnType<typeof KilometerSystem.prototype.toObject>;
|
||||
name?: string;
|
||||
manageStations?: number[];
|
||||
depots?: boolean;
|
||||
}): Station {
|
||||
const message = new Station({});
|
||||
if (data.common != null) {
|
||||
@ -2488,6 +2499,9 @@ export namespace graphicData {
|
||||
if (data.manageStations != null) {
|
||||
message.manageStations = data.manageStations;
|
||||
}
|
||||
if (data.depots != null) {
|
||||
message.depots = data.depots;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -2499,6 +2513,7 @@ export namespace graphicData {
|
||||
kilometerSystem?: ReturnType<typeof KilometerSystem.prototype.toObject>;
|
||||
name?: string;
|
||||
manageStations?: number[];
|
||||
depots?: boolean;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
@ -2521,6 +2536,9 @@ export namespace graphicData {
|
||||
if (this.manageStations != null) {
|
||||
data.manageStations = this.manageStations;
|
||||
}
|
||||
if (this.depots != null) {
|
||||
data.depots = this.depots;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -2541,6 +2559,8 @@ export namespace graphicData {
|
||||
writer.writeString(7, this.name);
|
||||
if (this.manageStations.length)
|
||||
writer.writePackedUint32(8, this.manageStations);
|
||||
if (this.depots != false)
|
||||
writer.writeBool(9, this.depots);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -2571,6 +2591,9 @@ export namespace graphicData {
|
||||
case 8:
|
||||
message.manageStations = reader.readPackedUint32();
|
||||
break;
|
||||
case 9:
|
||||
message.depots = reader.readBool();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user