Squashed commit of the following:
All checks were successful
CI / Docker-Build (push) Successful in 1m49s
All checks were successful
CI / Docker-Build (push) Successful in 1m49s
commit9738678e54
Author: joylink_zhaoerwei <Bob_Engineer@163.com> Date: Thu May 9 17:23:28 2024 +0800 打开列车驾驶台优化 commit89012e6290
Author: joylink_zhaoerwei <Bob_Engineer@163.com> Date: Thu May 9 16:08:02 2024 +0800 列车驾驶台方向按钮操作失败会回到之前的位置
This commit is contained in:
parent
9e8abf4624
commit
15702d4ac6
@ -288,8 +288,8 @@ watch(
|
||||
);
|
||||
|
||||
function tccHide() {
|
||||
lineApp.getScene(`tcc${tccStore.tccId}`).unbindDom();
|
||||
tccStore.clearTccParam();
|
||||
lineApp.getScene('tcc').unbindDom();
|
||||
}
|
||||
|
||||
watch(
|
||||
|
@ -25,8 +25,12 @@ export const useTccStore = defineStore('tcc', {
|
||||
getTccScene() {
|
||||
const lineApp = getLineApp();
|
||||
if (!lineApp) throw Error('未初始化app');
|
||||
lineApp.removeScene('tcc');
|
||||
return initTccScene(lineApp, 'tcc');
|
||||
try {
|
||||
return lineApp.getScene(`tcc${this.tccId}`);
|
||||
} catch (error) {
|
||||
const tccScene = initTccScene(lineApp, `tcc${this.tccId}`);
|
||||
return tccScene;
|
||||
}
|
||||
},
|
||||
setTccParam(tccId: number, trainControlMapId: number) {
|
||||
this.tccId = tccId;
|
||||
@ -34,14 +38,13 @@ export const useTccStore = defineStore('tcc', {
|
||||
this.isTccDialogOpen = true;
|
||||
},
|
||||
clearTccParam() {
|
||||
this.tccId = 0;
|
||||
this.trainControlMapId = 0;
|
||||
this.isTccDialogOpen = false;
|
||||
},
|
||||
onMouseUpFromTccHandle() {
|
||||
const simulationId = useLineStore().simulationId;
|
||||
const tccHandle = (getLineApp() as IGraphicApp)
|
||||
.getScene('tcc')
|
||||
.getScene(`tcc${this.tccId}`)
|
||||
.queryStore.queryById<TccHandle>(this.tccHandleId);
|
||||
if (!simulationId) return;
|
||||
const handleVal = Number(
|
||||
@ -61,7 +64,7 @@ export const useTccStore = defineStore('tcc', {
|
||||
},
|
||||
onMouseUpFromTccKeyDir() {
|
||||
const tccKeyDir = (getLineApp() as IGraphicApp)
|
||||
.getScene('tcc')
|
||||
.getScene(`tcc${this.tccId}`)
|
||||
.queryStore.queryById<TccKey>(this.tccKeyDirId);
|
||||
let position = 0;
|
||||
switch (tccKeyDir._tccKey.rotation) {
|
||||
|
Loading…
Reference in New Issue
Block a user