- {{$t('global.mapList')}}
+ {{ $t('global.mapList') }}
diff --git a/src/views/display/index.vue b/src/views/display/index.vue
index 6f468b7d5..163787bfb 100644
--- a/src/views/display/index.vue
+++ b/src/views/display/index.vue
@@ -158,15 +158,15 @@ export default {
trainingId() {
return this.$route.query.trainingId;
},
- skinCode() {
- return this.$route.query.skinCode;
- },
mapId() {
return this.$route.query.mapId;
},
prdType() {
return this.$route.query.prdType;
},
+ skinCode() {
+ return this.$route.query.skinCode;
+ },
isLesson() {
return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage';
},
diff --git a/src/views/jointTraining/index.vue b/src/views/jointTraining/index.vue
index 621935079..32873365d 100644
--- a/src/views/jointTraining/index.vue
+++ b/src/views/jointTraining/index.vue
@@ -72,6 +72,7 @@ export default {
userRole: '',
group: '',
mapId: '',
+ skinCode: '',
simulationShow: false,
drivingShow: false
};
@@ -90,10 +91,7 @@ export default {
]),
...mapGetters('config', [
'canvasId'
- ]),
- skinCode() {
- return this.$route.query.skinCode;
- }
+ ])
},
watch: {
'$store.state.config.menuBarLoadedCount': function (val) {
@@ -135,6 +133,7 @@ export default {
async created() {
this.group = this.$route.query.group;
this.mapId = this.$route.query.mapId;
+ this.skinCode = this.$route.query.skinCode;
},
async mounted() {
await this.initLoadData();
@@ -283,6 +282,8 @@ export default {
this.$store.dispatch('training/end', TrainingMode.NORMAL);
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
+ console.log(this.skinCode);
+
if (this.skinCode) {
// 01 现地 02 行调 '' 观众
const resp = await this.getUserRole();
diff --git a/src/views/jointTraining/menuDemon.vue b/src/views/jointTraining/menuDemon.vue
index 2a1b65e0e..b17b0dcc7 100644
--- a/src/views/jointTraining/menuDemon.vue
+++ b/src/views/jointTraining/menuDemon.vue
@@ -122,13 +122,13 @@ export default {
this.setPosition();
},
'$store.state.map.map.stationList': function (val) { // 执行一次 以后不会有变化
- if (val.length) {
+ if (val && val.length) {
this.stationList = val;
this.stationLists = val;
}
},
'$store.state.socket.roleInfo': function (val) {
- if (val.length) {
+ if (val && val.length) {
this.addrolesList(val);
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
diff --git a/src/views/trainRoom/index.vue b/src/views/trainRoom/index.vue
index 459539f36..f4357bcd6 100644
--- a/src/views/trainRoom/index.vue
+++ b/src/views/trainRoom/index.vue
@@ -132,8 +132,8 @@
v-if="userId == roomInfo.creatorId"
type="primary"
style="float: right;"
- @click="start"
:loading="loading"
+ @click="start"
>
开始仿真
@@ -141,16 +141,16 @@
进入仿真
结束仿真
@@ -158,8 +158,8 @@
v-if="userId == roomInfo.creatorId"
type=""
style="float: right; margin-right: 0px;"
- @click="postCode"
:loading="loading"
+ @click="postCode"
>生成二维码
返回
@@ -168,8 +168,8 @@
v-if="userId == roomInfo.creatorId"
type="danger"
style="float: right; margin-right: 0px;"
- @click="exit"
:loading="loading"
+ @click="exit"
>销毁房间
@@ -263,7 +263,7 @@ export default {
starting: false,
mapId: '',
num: 0,
- loading: false
+ loading: false
};
},
watch: {
@@ -372,7 +372,7 @@ export default {
},
async joinJointTrain() {
// launchFullscreen();
- this.loading = true;
+ this.loading = true;
await putJointTrainingSimulationEntrance(this.$route.query.group);
const rest = await getPublishMapInfo(this.mapId);
const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.$route.query.group };
@@ -553,11 +553,11 @@ export default {
this.$refs.qrCode.doShow(param);
}
}
- this.loading = false;
+ this.loading = false;
},
async start() {
let flag = true;
- this.loading = true;
+ this.loading = true;
this.equipmentList.forEach(item => {
if (!item.deviceCode) {
flag = false;
@@ -567,14 +567,14 @@ export default {
if (flag) {
try {
await startJointTraining(this.$route.query.group);
- this.loading = false;
+ this.loading = false;
} catch (error) {
this.messageInfo('开始综合演练失败。', 'error');
- this.loading = false;
+ this.loading = false;
}
} else {
this.messageInfo('车站值班员所属车站不能为空', 'error');
- this.loading = false;
+ this.loading = false;
}
},
async stop() {