From cd4701b55db6f6cdb1bd70c0a133333d2c2df920 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 13 Nov 2023 11:23:27 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=8E=82=E5=95=86=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CategoryType.ts | 6 ------ src/pages/CategoryManage.vue | 18 +++++++++++++++--- src/pages/DraftManage.vue | 24 ++++++++++++++++++++++-- src/pages/PublishManage.vue | 24 ++++++++++++++++++++++-- 4 files changed, 59 insertions(+), 13 deletions(-) diff --git a/src/components/CategoryType.ts b/src/components/CategoryType.ts index 567431f..59827be 100644 --- a/src/components/CategoryType.ts +++ b/src/components/CategoryType.ts @@ -3,9 +3,3 @@ export enum CategoryType { TH = 'TH', ZDWX = 'ZDWX', } - -export const categoryTypeOptions = [ - { label: '交控(11)', value: CategoryType.JK }, - { label: '通号(12)', value: CategoryType.TH }, - { label: '浙大网新', value: CategoryType.ZDWX }, -]; diff --git a/src/pages/CategoryManage.vue b/src/pages/CategoryManage.vue index b59712a..fcd1b26 100644 --- a/src/pages/CategoryManage.vue +++ b/src/pages/CategoryManage.vue @@ -116,7 +116,7 @@ import { getCategoryInfo, } from '../api/CategoryInfoApi'; import { ApiError } from 'src/boot/axios'; -import { categoryTypeOptions } from 'src/components/CategoryType'; +import { CategoryType } from 'src/components/CategoryType'; const $q = useQuasar(); @@ -219,7 +219,7 @@ function onCreate() { const params: createParams = { name: editInfo.categoryName, code: editInfo.code, - config: editInfo.config, + config: JSON.stringify(editInfo.config), }; if (editInfo.id) { await saveCategoryData(+editInfo.id, params); @@ -286,7 +286,7 @@ function editData(row: CategoryItem) { editInfo.id = res.id + ''; editInfo.categoryName = res.name; editInfo.code = res.code; - editInfo.config = res.config || ''; + editInfo.config = res.config ? JSON.parse(res.config) : ''; createFormShow.value = true; }) .catch((err) => { @@ -297,4 +297,16 @@ function editData(row: CategoryItem) { }); }); } + +const categoryTypeOptions = computed(() => { + const list: { label: string; value: string }[] = []; + for (let item in CategoryType) { + const obj = { + label: item, + value: CategoryType[item as CategoryType], + }; + list.push(obj); + } + return list; +}); diff --git a/src/pages/DraftManage.vue b/src/pages/DraftManage.vue index edcb992..38b53d4 100644 --- a/src/pages/DraftManage.vue +++ b/src/pages/DraftManage.vue @@ -151,7 +151,7 @@ import { publishDraft } from '../api/PublishApi'; import { ApiError } from 'src/boot/axios'; import { PictureType } from 'src/protos/picture'; import { useRouter } from 'vue-router'; -import { categoryTypeOptions } from 'src/components/CategoryType'; +import { getCategoryList } from 'src/api/CategoryInfoApi'; const $q = useQuasar(); @@ -169,6 +169,7 @@ const tableHeight = computed(() => { const router = useRouter(); onMounted(() => { + getCategoryOptions(); tableRef.value.requestServerInteraction(); }); @@ -365,7 +366,7 @@ const pictureType = ref(PictureType.StationLayout); function categoryName(val?: string) { let n = ''; if (val) { - const find = categoryTypeOptions.find((item) => { + const find = categoryTypeOptions.value.find((item) => { return item.value == val; }); n = find ? find.label : val; @@ -392,4 +393,23 @@ function goToPath(row: DraftItem) { } router.push({ path: path }); } + +const categoryTypeOptions = ref<{ label: string; value: string }[]>([]); +function getCategoryOptions() { + getCategoryList() + .then((res) => { + const arr: { label: string; value: string }[] = []; + res.forEach((item) => { + const obj = { + label: item.name, + value: item.code, + }; + arr.push(obj); + }); + categoryTypeOptions.value = arr; + }) + .catch((err) => { + console.log(err, '获取厂家列表失败!'); + }); +} diff --git a/src/pages/PublishManage.vue b/src/pages/PublishManage.vue index 49552b6..6122be1 100644 --- a/src/pages/PublishManage.vue +++ b/src/pages/PublishManage.vue @@ -99,7 +99,7 @@ import { createSimulation } from 'src/api/Simulation'; import { ApiError } from 'src/boot/axios'; import { useLineStore } from 'src/stores/line-store'; import { MapInfo } from 'src/api/ProjectLinkApi'; -import { categoryTypeOptions } from 'src/components/CategoryType'; +import { getCategoryList } from 'src/api/CategoryInfoApi'; const router = useRouter(); const route = useRoute(); const $q = useQuasar(); @@ -117,6 +117,7 @@ const tableHeight = computed(() => { }); onMounted(() => { + getCategoryOptions(); tableRef.value.requestServerInteraction(); selected.value = props.selects; }); @@ -156,7 +157,7 @@ const columnDefs: QTableColumn[] = [ function categoryName(val?: string) { let n = ''; if (val) { - const find = categoryTypeOptions.find((item) => { + const find = categoryTypeOptions.value.find((item) => { return item.value == val; }); n = find ? find.label : val; @@ -309,4 +310,23 @@ watch( } } ); + +const categoryTypeOptions = ref<{ label: string; value: string }[]>([]); +function getCategoryOptions() { + getCategoryList() + .then((res) => { + const arr: { label: string; value: string }[] = []; + res.forEach((item) => { + const obj = { + label: item.name, + value: item.code, + }; + arr.push(obj); + }); + categoryTypeOptions.value = arr; + }) + .catch((err) => { + console.log(err, '获取厂家列表失败!'); + }); +} From f81ef0204e3a49a3e54ff8ef36d4a48c9acdcb8c Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 13 Nov 2023 11:26:01 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CategoryType.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/CategoryType.ts b/src/components/CategoryType.ts index 59827be..2018476 100644 --- a/src/components/CategoryType.ts +++ b/src/components/CategoryType.ts @@ -1,5 +1,5 @@ export enum CategoryType { - JK = 'JK', - TH = 'TH', - ZDWX = 'ZDWX', + JK = 'JK', // 交控(11) + TH = 'TH', // 通号(12) + ZDWX = 'ZDWX', // 浙大网新 } From 440e2c096e4d981fcb43af2985c08295835ac238 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 13 Nov 2023 15:08:32 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=88=97=E8=BD=A6=E8=BD=AE=E5=BE=84?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../draw-app/dialogs/AddTrainDialog.vue | 25 ++++- src/drawApp/graphics/SectionInteraction.ts | 52 +++++----- src/drawApp/graphics/TurnoutInteraction.ts | 54 ++++++----- src/pages/TrainWheelPage.vue | 96 +++++++++---------- src/protos/device_state.ts | 23 +++++ 5 files changed, 156 insertions(+), 94 deletions(-) diff --git a/src/components/draw-app/dialogs/AddTrainDialog.vue b/src/components/draw-app/dialogs/AddTrainDialog.vue index b726a7a..c91a194 100644 --- a/src/components/draw-app/dialogs/AddTrainDialog.vue +++ b/src/components/draw-app/dialogs/AddTrainDialog.vue @@ -16,7 +16,7 @@ type="number" dense outlined - :label="`列车偏移(mm)[长度${props.kmLength}mm]`" + :label="`列车偏移(mm)【长度${props.kmLength}mm】`" :max="kmLength" :min="0" v-model.number="offset" @@ -41,6 +41,17 @@ :options="lengthOptions" > + @@ -68,6 +79,10 @@ const props = defineProps({ type: Number, required: true, }, + wDiameter: { + type: Number, + default: 800, + }, }); const dir = ref(1); const offset = ref(0); @@ -94,6 +109,7 @@ onMounted(() => { if (mapId) { getLengthOption(mapId); } + wheelDiameter.value = props.wDiameter; }); function getLengthOption(mapId: number) { @@ -117,9 +133,16 @@ function onCreate() { dir: dir.value, offset: offset.value, trainLength: trainLength.value, + wheelDiameter: wheelDiameter.value, }); } }); } + +const wheelDiameter = ref(800); +const wheelDiameterRules = [ + (val: string) => (val !== null && val !== '') || '偏移量不能为空!', + (val: number) => (val >= 770 && val <= 840) || '列车轮径在770到840mm之间!', +]; diff --git a/src/drawApp/graphics/SectionInteraction.ts b/src/drawApp/graphics/SectionInteraction.ts index 85d78e8..f77c041 100644 --- a/src/drawApp/graphics/SectionInteraction.ts +++ b/src/drawApp/graphics/SectionInteraction.ts @@ -252,29 +252,37 @@ export class SectionOperateInteraction extends GraphicInteractionPlugin
componentProps: { dev: section, kmLength: d }, cancel: true, persistent: true, - }).onOk((data: { offset: number; dir: 1 | 0; trainLength: string }) => { - const params = { - simulationId, - mapId, - up: !!data.dir, - id: section.datas.id, - headOffset: data.offset, - }; - if (data.trainLength) { - Object.assign(params, { trainLength: +data.trainLength }); - } - addTrain(params) - .then(() => { - successNotify('添加列车成功!'); - }) - .catch((err) => { - const error = err as ApiError; - Notify.create({ - type: 'negative', - message: `添加列车失败!: ${error.title}`, + }).onOk( + (data: { + offset: number; + dir: 1 | 0; + trainLength: string; + wheelDiameter: number; + }) => { + const params = { + simulationId, + mapId, + up: !!data.dir, + id: section.datas.id, + headOffset: data.offset, + wheelDiameter: data.wheelDiameter, + }; + if (data.trainLength) { + Object.assign(params, { trainLength: +data.trainLength }); + } + addTrain(params) + .then(() => { + successNotify('添加列车成功!'); + }) + .catch((err) => { + const error = err as ApiError; + Notify.create({ + type: 'negative', + message: `添加列车失败!: ${error.title}`, + }); }); - }); - }); + } + ); }; SectionOperateMenu.open(e.global); } diff --git a/src/drawApp/graphics/TurnoutInteraction.ts b/src/drawApp/graphics/TurnoutInteraction.ts index f9d6a9d..45c2955 100644 --- a/src/drawApp/graphics/TurnoutInteraction.ts +++ b/src/drawApp/graphics/TurnoutInteraction.ts @@ -151,30 +151,38 @@ export class TurnoutOperationPlugin extends GraphicInteractionPlugin { componentProps: { dev: turnout, kmLength: d }, cancel: true, persistent: true, - }).onOk((data: { offset: number; dir: 1 | 0; trainLength: string }) => { - const params = { - simulationId, - mapId, - up: !!data.dir, - id: turnout.datas.id, - devicePort: port, - headOffset: data.offset, - }; - if (data.trainLength) { - Object.assign(params, { trainLength: +data.trainLength }); - } - addTrain(params) - .then(() => { - successNotify('添加列车成功!'); - }) - .catch((err) => { - const error = err as ApiError; - Notify.create({ - type: 'negative', - message: `添加列车失败!: ${error.title}`, + }).onOk( + (data: { + offset: number; + dir: 1 | 0; + trainLength: string; + wheelDiameter: number; + }) => { + const params = { + simulationId, + mapId, + up: !!data.dir, + id: turnout.datas.id, + devicePort: port, + headOffset: data.offset, + wheelDiameter: data.wheelDiameter, + }; + if (data.trainLength) { + Object.assign(params, { trainLength: +data.trainLength }); + } + addTrain(params) + .then(() => { + successNotify('添加列车成功!'); + }) + .catch((err) => { + const error = err as ApiError; + Notify.create({ + type: 'negative', + message: `添加列车失败!: ${error.title}`, + }); }); - }); - }); + } + ); }; TurnoutOperationMenu.open(e.global); } diff --git a/src/pages/TrainWheelPage.vue b/src/pages/TrainWheelPage.vue index b28447f..5cf67bf 100644 --- a/src/pages/TrainWheelPage.vue +++ b/src/pages/TrainWheelPage.vue @@ -66,14 +66,14 @@
{{ wheelEditInfo.id ? '编辑轮径' : '新建轮径' }}
- - --> + { wheelTableRef.value.requestServerInteraction(); }); -const directionOptions = [ - { label: '左侧', value: 'LEFT' }, - { label: '右侧', value: 'RIGHT' }, -]; -function getDirectionName(val: string) { - let n = ''; - if (val) { - const find = directionOptions.find((item) => { - return item.value == val; - }); - n = find ? find.label : ''; - } - return n; -} +// const directionOptions = [ +// { label: '左侧', value: 'LEFT' }, +// { label: '右侧', value: 'RIGHT' }, +// ]; +// function getDirectionName(val: string) { +// let n = ''; +// if (val) { +// const find = directionOptions.find((item) => { +// return item.value == val; +// }); +// n = find ? find.label : ''; +// } +// return n; +// } // 轮径 const wheelColumnDefs: QTableColumn[] = [ - { - name: 'name', - label: '名称', - field: 'name', - required: true, - align: 'center', - }, - { - name: 'axial_position', - label: '安装轴位', - field: 'axial_position', - required: true, - align: 'center', - }, - { - name: 'diameter', - label: '车轮直径(mm)', - field: 'diameter', - required: true, - align: 'center', - }, - { - name: 'install_direction', - label: '安装方向', - field: (row) => { - return getDirectionName(row.install_direction); - }, - required: true, - align: 'center', - }, + // { + // name: 'name', + // label: '名称', + // field: 'name', + // required: true, + // align: 'center', + // }, + // { + // name: 'axial_position', + // label: '安装轴位', + // field: 'axial_position', + // required: true, + // align: 'center', + // }, + // { + // name: 'diameter', + // label: '车轮直径(mm)', + // field: 'diameter', + // required: true, + // align: 'center', + // }, + // { + // name: 'install_direction', + // label: '安装方向', + // field: (row) => { + // return getDirectionName(row.install_direction); + // }, + // required: true, + // align: 'center', + // }, { name: 'max_diameter', label: '车轮的最大直径(mm)', diff --git a/src/protos/device_state.ts b/src/protos/device_state.ts index 49fc13c..51fb62b 100644 --- a/src/protos/device_state.ts +++ b/src/protos/device_state.ts @@ -1015,6 +1015,7 @@ export namespace state { vobcState?: TrainVobcState; trainKilometer?: number; controlDelayTime?: number; + wheelDiameter?: number; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); @@ -1064,6 +1065,9 @@ export namespace state { if ("controlDelayTime" in data && data.controlDelayTime != undefined) { this.controlDelayTime = data.controlDelayTime; } + if ("wheelDiameter" in data && data.wheelDiameter != undefined) { + this.wheelDiameter = data.wheelDiameter; + } } } get id() { @@ -1162,6 +1166,12 @@ export namespace state { set controlDelayTime(value: number) { pb_1.Message.setField(this, 15, value); } + get wheelDiameter() { + return pb_1.Message.getFieldWithDefault(this, 16, 0) as number; + } + set wheelDiameter(value: number) { + pb_1.Message.setField(this, 16, value); + } static fromObject(data: { id?: string; up?: boolean; @@ -1178,6 +1188,7 @@ export namespace state { vobcState?: ReturnType; trainKilometer?: number; controlDelayTime?: number; + wheelDiameter?: number; }): TrainState { const message = new TrainState({}); if (data.id != null) { @@ -1225,6 +1236,9 @@ export namespace state { if (data.controlDelayTime != null) { message.controlDelayTime = data.controlDelayTime; } + if (data.wheelDiameter != null) { + message.wheelDiameter = data.wheelDiameter; + } return message; } toObject() { @@ -1244,6 +1258,7 @@ export namespace state { vobcState?: ReturnType; trainKilometer?: number; controlDelayTime?: number; + wheelDiameter?: number; } = {}; if (this.id != null) { data.id = this.id; @@ -1290,6 +1305,9 @@ export namespace state { if (this.controlDelayTime != null) { data.controlDelayTime = this.controlDelayTime; } + if (this.wheelDiameter != null) { + data.wheelDiameter = this.wheelDiameter; + } return data; } serialize(): Uint8Array; @@ -1326,6 +1344,8 @@ export namespace state { writer.writeInt64(14, this.trainKilometer); if (this.controlDelayTime != 0) writer.writeInt64(15, this.controlDelayTime); + if (this.wheelDiameter != 0) + writer.writeInt32(16, this.wheelDiameter); if (!w) return writer.getResultBuffer(); } @@ -1380,6 +1400,9 @@ export namespace state { case 15: message.controlDelayTime = reader.readInt64(); break; + case 16: + message.wheelDiameter = reader.readInt32(); + break; default: reader.skipField(); } } From fa8049148472122256bb99fba9a8129e870cddf2 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 13 Nov 2023 16:09:25 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=88=97=E8=BD=A6=E8=BD=AE=E5=BE=84?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/Simulation.ts | 18 ++++++++++ src/components/line-app/infos/TrainInfo.vue | 8 +++++ src/drawApp/graphics/TrainInteraction.ts | 40 +++++++++++++++++++-- src/graphics/train/Train.ts | 2 ++ 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/src/api/Simulation.ts b/src/api/Simulation.ts index 711fc46..838cd6b 100644 --- a/src/api/Simulation.ts +++ b/src/api/Simulation.ts @@ -42,6 +42,24 @@ export async function addTrain(data: { const response = await api.post(`${UriBase}/train/add`, data); return response.data; } + +/** + * 添加列车 + * @param id 列车的id + * @param simulationId 仿真id + * @param trainLength 列车总长 + * @param wheelDiameter 列车轮径 + */ +export async function updateTrain(data: { + id: string; + simulationId: string; + trainLength?: number; + wheelDiameter?: number; +}) { + const response = await api.post(`${UriBase}/train/update`, data); + return response.data; +} + /** * 移除列车 * @param simulationId 仿真id diff --git a/src/components/line-app/infos/TrainInfo.vue b/src/components/line-app/infos/TrainInfo.vue index 5a84681..d17fbb3 100644 --- a/src/components/line-app/infos/TrainInfo.vue +++ b/src/components/line-app/infos/TrainInfo.vue @@ -90,6 +90,11 @@ const list: KeyType[] = [ key: 'controlDelayTime', formatFn: controlDelayTimeFormat, }, + { + label: '列车轮径', + key: 'wheelDiameter', + formatFn: wheelDiameterFormat, + }, ]; const list2: DynamicKeyType[] = [ // 动力学信息 @@ -191,6 +196,9 @@ function upslopeFormat(v: boolean) { // function runningUpFormat(v: boolean) { // return v ? '上行' : '下行'; // } +function wheelDiameterFormat(v: number) { + return `${v} mm`; +} function offsetFormat(v: number) { return `${v / 1000} m`; } diff --git a/src/drawApp/graphics/TrainInteraction.ts b/src/drawApp/graphics/TrainInteraction.ts index bcd66f9..5317b4e 100644 --- a/src/drawApp/graphics/TrainInteraction.ts +++ b/src/drawApp/graphics/TrainInteraction.ts @@ -10,9 +10,10 @@ import { JlGraphic, } from 'src/jl-graphic'; import { DisplayObject, FederatedMouseEvent } from 'pixi.js'; -import { removeTrain } from 'src/api/Simulation'; +import { removeTrain, updateTrain } from 'src/api/Simulation'; import { useLineStore } from 'src/stores/line-store'; import { successNotify, errorNotify } from '../../utils/CommonNotify'; +import { Dialog } from 'quasar'; export class TrainState extends GraphicStateBase implements ITrainState { constructor(proto?: state.TrainState) { let states; @@ -122,6 +123,12 @@ export class TrainState extends GraphicStateBase implements ITrainState { set controlDelayTime(v: number) { this.states.controlDelayTime = v; } + get wheelDiameter(): number { + return this.states.wheelDiameter; + } + set wheelDiameter(v: number) { + this.states.wheelDiameter = v; + } clone(): TrainState { return new TrainState(this.states.cloneMessage()); } @@ -133,6 +140,9 @@ export class TrainState extends GraphicStateBase implements ITrainState { } } +const wheelDiameterChange: MenuItemOptions = { + name: '列车轮径调整', +}; const removeTrainConfig: MenuItemOptions = { name: '清除列车', }; @@ -140,7 +150,7 @@ const TrainOperateMenu: ContextMenu = ContextMenu.init({ name: '列车操作菜单', groups: [ { - items: [removeTrainConfig], + items: [wheelDiameterChange, removeTrainConfig], }, ], }); @@ -181,6 +191,32 @@ export class TrainOperateInteraction extends GraphicInteractionPlugin { const lineStore = useLineStore(); const simulationId = lineStore.simulationId || ''; const mapId = lineStore.mapId as number; + wheelDiameterChange.handler = () => { + Dialog.create({ + title: '列车轮径调整', + message: '列车轮径(mm)范围【长度770-840mm】, 请调整!', + prompt: { + model: train.states.wheelDiameter + '', + isValid: (val) => +val >= 770 && +val <= 840, + type: 'number', + }, + cancel: true, + persistent: true, + }).onOk((data) => { + const params = { + id: train.states.id, + simulationId: simulationId, + wheelDiameter: +data, + }; + updateTrain(params) + .then(() => { + successNotify('列车轮径调整成功!'); + }) + .catch((err) => { + errorNotify('列车轮径调整失败!', err); + }); + }); + }; removeTrainConfig.handler = () => { removeTrain({ simulationId, diff --git a/src/graphics/train/Train.ts b/src/graphics/train/Train.ts index 22f8880..4832b62 100644 --- a/src/graphics/train/Train.ts +++ b/src/graphics/train/Train.ts @@ -54,6 +54,8 @@ export interface ITrainState extends GraphicState { set trainKilometer(v: number); get controlDelayTime(): number; set controlDelayTime(v: number); + get wheelDiameter(): number; + set wheelDiameter(v: number); } interface bodyWH { From 750e3736c8141f4c69685152da868cbe8c1a8560 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 13 Nov 2023 16:51:52 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/draw-app/dialogs/AddTrainDialog.vue | 2 +- src/drawApp/graphics/TrainInteraction.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/draw-app/dialogs/AddTrainDialog.vue b/src/components/draw-app/dialogs/AddTrainDialog.vue index c91a194..82e98e7 100644 --- a/src/components/draw-app/dialogs/AddTrainDialog.vue +++ b/src/components/draw-app/dialogs/AddTrainDialog.vue @@ -45,7 +45,7 @@ type="number" dense outlined - label="列车轮径(mm)【长度770-840mm】" + label="列车轮径(mm)【770-840mm】" :max="840" :min="770" v-model.number="wheelDiameter" diff --git a/src/drawApp/graphics/TrainInteraction.ts b/src/drawApp/graphics/TrainInteraction.ts index 5317b4e..326633f 100644 --- a/src/drawApp/graphics/TrainInteraction.ts +++ b/src/drawApp/graphics/TrainInteraction.ts @@ -194,7 +194,7 @@ export class TrainOperateInteraction extends GraphicInteractionPlugin { wheelDiameterChange.handler = () => { Dialog.create({ title: '列车轮径调整', - message: '列车轮径(mm)范围【长度770-840mm】, 请调整!', + message: '列车轮径(mm)【770-840mm】, 请调整!', prompt: { model: train.states.wheelDiameter + '', isValid: (val) => +val >= 770 && +val <= 840,