Merge remote-tracking branch 'remotes/origin/dev' into test

This commit is contained in:
ival 2019-11-15 19:23:08 +08:00
commit 819305bc37
6 changed files with 12 additions and 16 deletions

View File

@ -224,5 +224,6 @@ export default {
copyMapFail: 'Copy map fail!', copyMapFail: 'Copy map fail!',
pushNewsSuccess: 'Push news success!', pushNewsSuccess: 'Push news success!',
pushNewsFailed: 'Push news failed!', pushNewsFailed: 'Push news failed!',
notViewTheCoursePaper: 'When the number of permissions is less than 10, no issue to view the course paper!' notViewTheCoursePaper: 'When the number of permissions is less than 10, no issue to view the course paper!',
createUniversalPermissionsTip: 'Universal permissions need to add more than one permission!'
}; };

View File

@ -224,5 +224,6 @@ export default {
copyMapFail: '复制地图失败!', copyMapFail: '复制地图失败!',
pushNewsSuccess: '推送消息成功!', pushNewsSuccess: '推送消息成功!',
pushNewsFailed: '推送消息失败!', pushNewsFailed: '推送消息失败!',
notViewTheCoursePaper: '权限数量小于10时无发查看课程试卷' notViewTheCoursePaper: '权限数量小于10时无发查看课程试卷',
createUniversalPermissionsTip: '万能权限需添加一个以上权限!'
}; };

View File

@ -46,13 +46,10 @@ export default {
}, },
'$store.state.app.windowSizeCount': function() { '$store.state.app.windowSizeCount': function() {
this.setWindowSize(); this.setWindowSize();
},
'$store.state.map.mapViewLoadedCount':function() {
this.$store.dispatch('map/setTrainWindowShow', false);
} }
// '$store.state.socket.simulationReset': function (val) {
// debugger;
// // if (val) {
// // this.simulationReset(val);
// // }
// }
}, },
async beforeDestroy() { async beforeDestroy() {
await this.$store.dispatch('map/mapClear'); await this.$store.dispatch('map/mapClear');
@ -77,7 +74,6 @@ export default {
this.$store.dispatch('training/over'); this.$store.dispatch('training/over');
this.$store.dispatch('training/setMapDefaultState'); this.$store.dispatch('training/setMapDefaultState');
this.$store.dispatch('map/clearJlmapTrainView'); this.$store.dispatch('map/clearJlmapTrainView');
this.$store.dispatch('map/setTrainWindowShow', false);
}); });
} catch (error) { } catch (error) {
this.$messageBox(`获取地图数据失败: ${error.message}`); this.$messageBox(`获取地图数据失败: ${error.message}`);

View File

@ -294,7 +294,7 @@ export default {
return model; return model;
}, },
async permissionNext() { async permissionNext() {
if (this.ruleList.length) { if ((this.addModel.type === '01' && this.ruleList.length) || (this.addModel.type === '02' && this.ruleList.length > 1) ) {
const arr = this.ruleList.map(item => { return item.id; }); const arr = this.ruleList.map(item => { return item.id; });
if (this.addModel.type == '01') { if (this.addModel.type == '01') {
const list = []; // const list = []; //
@ -385,6 +385,8 @@ export default {
} }
}); });
} }
} else if (this.addModel.type === '02') {
this.$messageBox(this.$t('tip.createUniversalPermissionsTip'));
} else { } else {
this.$messageBox(this.$t('tip.addPackage')); this.$messageBox(this.$t('tip.addPackage'));
} }

View File

@ -365,11 +365,7 @@ export default {
this.loading = true; this.loading = true;
await putJointTrainingExit(this.group); await putJointTrainingExit(this.group);
this.loading = false; this.loading = false;
if (this.$route.query.subSystem) {
this.$router.push({ path: `/trainingPlatform/detail/${this.$route.query.subSystem}`, query: {mapId: this.room.mapId}}); this.$router.push({ path: `/trainingPlatform/detail/${this.$route.query.subSystem}`, query: {mapId: this.room.mapId}});
} else {
this.$router.go(-1);
}
} catch (error) { } catch (error) {
this.$emit('message', {type:'error', message: this.$t('error.operationFailure')}); this.$emit('message', {type:'error', message: this.$t('error.operationFailure')});
} }

View File

@ -179,7 +179,7 @@ export default {
Object.assign(this.room, room); Object.assign(this.room, room);
switch (room.state) { switch (room.state) {
case '03': // case '03': //
this.$router.go(-1); this.$router.push({ path: `/trainingPlatform/detail/${this.$route.query.subSystem}`, query: {mapId: this.room.mapId}});
break; break;
case '02': // 仿 case '02': // 仿
this.jumpInSimulation(); this.jumpInSimulation();