Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
cc4edd174c
@ -141,6 +141,13 @@ function handle(state, data) {
|
||||
case 'Simulation_Alarm':
|
||||
state.simulationAlarmInfo = msg;
|
||||
break;
|
||||
case 'Simulation_Scenes_Reload':
|
||||
if (msg) {
|
||||
store.dispatch('training/start');
|
||||
} else {
|
||||
store.dispatch('training/over');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -149,7 +149,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisable: false,
|
||||
tryTime: 0, // 进入页面多少秒
|
||||
timeNow: 0, // 进入页面 相对时间
|
||||
time: null, // 定时器
|
||||
@ -198,6 +197,9 @@ export default {
|
||||
},
|
||||
scriptModeList() {
|
||||
return ScriptMode;
|
||||
},
|
||||
isDisable() {
|
||||
return this.$store.state.training.started;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -236,8 +238,6 @@ export default {
|
||||
const initTime = new Date(this.$store.state.training.initTime || null);
|
||||
const model = {initTime:this.formatTime(initTime)};
|
||||
this.start(model);
|
||||
} else {
|
||||
this.isDisable = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -286,9 +286,6 @@ export default {
|
||||
const ss = prefixIntrger(initTime.getSeconds(), 2);
|
||||
return `${hh}:${mm}:${ss}`;
|
||||
},
|
||||
initPlannedDriving(isDisable) {
|
||||
this.isDisable = isDisable;
|
||||
},
|
||||
loadInitData() {
|
||||
const data = {
|
||||
mapId: this.$route.query.mapId,
|
||||
@ -334,7 +331,6 @@ export default {
|
||||
});
|
||||
},
|
||||
start(model) { // 开始仿真
|
||||
this.isDisable = true;
|
||||
const data = {
|
||||
time: model.initTime
|
||||
};
|
||||
@ -344,7 +340,6 @@ export default {
|
||||
ranAsPlan(data, this.group).then(res => {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||
}).catch(error => {
|
||||
this.isDisable = false;
|
||||
if (error.code == '5001') {
|
||||
this.$messageBox(this.$t('error.mapDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5002') {
|
||||
@ -375,7 +370,6 @@ export default {
|
||||
this.$refs.demonMenu.hideScheduling(run);
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
exitRunPlan(this.group).then(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
@ -385,7 +379,6 @@ export default {
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = true;
|
||||
this.$messageBox(this.$t('display.demon.endSimulationFail'));
|
||||
});
|
||||
},
|
||||
|
@ -233,13 +233,8 @@ export default {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||
this.$store.dispatch('training/countTime');
|
||||
this.planRunning = resp.data.planRunning;
|
||||
|
||||
if (this.isDemon) {
|
||||
this.$refs.menuDemon.initPlannedDriving(this.planRunning); // 是否正在按计划行车
|
||||
} else if (this.isScript) {
|
||||
if (resp.data.planRunning) {
|
||||
this.$store.commit('training/start');
|
||||
}
|
||||
if (resp.data.planRunning) {
|
||||
this.$store.commit('training/start');
|
||||
}
|
||||
} else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
|
||||
this.dataError = true;
|
||||
|
@ -98,7 +98,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisable: false,
|
||||
tryTime: 0, // 进入页面多少秒
|
||||
timeNow: 0, // 进入页面 相对时间
|
||||
time: null, // 定时器
|
||||
@ -140,6 +139,9 @@ export default {
|
||||
},
|
||||
projectDevice() {
|
||||
return this.$route.query.projectDevice;
|
||||
},
|
||||
isDisable() {
|
||||
return this.$store.state.training.started;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -210,9 +212,6 @@ export default {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
initPlannedDriving(isDisable) {
|
||||
this.isDisable = isDisable;
|
||||
},
|
||||
loadInitData() {
|
||||
const data = {
|
||||
mapId: this.$route.query.mapId,
|
||||
@ -239,7 +238,6 @@ export default {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
start(model) { // 开始仿真
|
||||
this.isDisable = true;
|
||||
const data = {
|
||||
time: model.initTime
|
||||
};
|
||||
@ -249,7 +247,6 @@ export default {
|
||||
ranAsPlan(data, this.group).then(res => {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||
}).catch(error => {
|
||||
this.isDisable = false;
|
||||
if (error.code == '5001') {
|
||||
this.$messageBox(this.$t('error.mapDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5002') {
|
||||
@ -280,7 +277,6 @@ export default {
|
||||
this.$refs.demonMenu.hideScheduling(run);
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
exitRunPlan(this.group).then(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
@ -290,14 +286,12 @@ export default {
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = true;
|
||||
this.$messageBox(this.$t('display.demon.endSimulationFail'));
|
||||
});
|
||||
},
|
||||
handleQuitQuest() {
|
||||
quitScriptNew(this.group).then(resp => {
|
||||
getSimulationInfoNew(this.group).then((res)=>{
|
||||
this.isDisable = false;
|
||||
EventBus.$emit('clearRunSeries');
|
||||
this.quitQuest();
|
||||
this.initLoadPage();
|
||||
|
@ -109,7 +109,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisable: false,
|
||||
backLoading: false,
|
||||
chatShow: true,
|
||||
jsStart: true,
|
||||
@ -161,6 +160,9 @@ export default {
|
||||
isDeviceLogin() {
|
||||
const typeList = ['LW', 'CW'];
|
||||
return typeList.includes(this.$route.query.type);
|
||||
},
|
||||
isDisable() {
|
||||
return this.$store.state.training.started;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -172,11 +174,6 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
'$store.state.training.started': function (val) {
|
||||
if (val) {
|
||||
this.isDisable = true;
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationOver':function(val) {
|
||||
if (val && this.project == 'refereeJsxt') {
|
||||
this.$router.go(-1);
|
||||
@ -284,7 +281,6 @@ export default {
|
||||
},
|
||||
// 开始仿真
|
||||
start(model) {
|
||||
this.isDisable = true;
|
||||
const data = {
|
||||
time: model.initTime
|
||||
};
|
||||
@ -294,7 +290,6 @@ export default {
|
||||
}
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
|
||||
}).catch((error) => {
|
||||
this.isDisable = false;
|
||||
if (error.code == '5001') {
|
||||
this.$messageBox(this.$t('error.mapDataError') + ',' + this.$t('error.startSimulationFailed'));
|
||||
} else if (error.code == '5002') {
|
||||
@ -319,13 +314,11 @@ export default {
|
||||
});
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
exitRunPlan(this.group).then(()=>{
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$store.dispatch('map/resetActiveTrainList', false);
|
||||
}).catch(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.isDisable = true;
|
||||
this.$store.dispatch('map/resetActiveTrainList', false);
|
||||
this.$messageBox(this.$t('error.endSimulationFailed'));
|
||||
});
|
||||
|
@ -158,6 +158,7 @@ export default {
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.$emit('clearConditionActionId');
|
||||
this.initData();
|
||||
},
|
||||
getSectionName(code) {
|
||||
|
@ -66,7 +66,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<add-script-member ref="addScriptMember" @addScriptMember="addScriptMember" />
|
||||
<condition-manage ref="conditionManage" />
|
||||
<condition-manage ref="conditionManage" @clearConditionActionId="clearConditionActionId" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -562,6 +562,9 @@ export default {
|
||||
},
|
||||
showConditionManage(actionId) {
|
||||
this.$refs.conditionManage.doShow(actionId);
|
||||
},
|
||||
clearConditionActionId() {
|
||||
this.$refs.getAction.conditionActionId = '';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user