Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2021-10-27 18:02:58 +08:00
commit db682c319b
2 changed files with 13 additions and 3 deletions

View File

@ -207,6 +207,7 @@ export default {
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); //
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
// this.$store.dispatch('training/countTime');
this.$store.dispatch('training/setPrdType', resp.data.prodType);
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
this.planRunning = resp.data.planRunning;
if (resp.data.planRunning) {

View File

@ -102,9 +102,6 @@ export default {
isShowLeftSlider() {
return this.$route.query.lessonId != '0' && !this.isOther;
},
prdType() {
return this.$route.query.prdType;
},
project() {
return getSessionStorage('project');
},
@ -127,6 +124,18 @@ export default {
'$store.state.training.operateErrMsg': function (val) {
this.tipInfo({ color: val.color, message: val.errMsg });
},
'$store.state.training.simulationUserList': function(val) {
const userInfo = this.$store.state.training.simulationUserList.find(user => user.userId == this.$store.state.user.id );
if (userInfo.type === 'STATION_SUPERVISOR') {
this.$store.dispatch('map/setShowCentralizedStationCode', userInfo.deviceCode);
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowStation(list, userInfo.deviceCode);
}
},
async $route() {
loadTrainingInSimulation(this.group, this.$route.query.trainingId).then(resp => {
this.setTrainingData(resp);