This commit is contained in:
zyy 2019-08-09 17:41:20 +08:00
commit ff44562b2c
7 changed files with 71 additions and 37 deletions

View File

@ -750,7 +750,9 @@ export default {
},
initMenu(menu) {
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
this.menu[2].children = this.initStationList();
if (this.menu[2]){
this.menu[2].children = this.initStationList();
}
this.clickEvent();
this.closeMenu(true);
},

View File

@ -74,41 +74,41 @@ export default {
};
},
initMenu() {
// this.menuNormal = [];
// this.stationList.forEach(station => {
// if (station.code === station.concentrateStationCode) {
// let node = {
// label: station.name,
// children: []
// }
this.menuNormal = [];
this.stationList.forEach(station => {
if (station.code === station.concentrateStationCode) {
let node = {
label: station.name,
children: []
}
// this.stationList.forEach(elem => {
// if (elem.visible) {
// let next = elem;
// while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
// next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
// }
this.stationList.forEach(elem => {
if (elem.visible) {
let next = elem;
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
}
// if (station.code == next.code) {
// node.children.push({
// code: elem.code,
// label: elem.name,
// handler: this.mapLocation,
// });
// }
// }
// })
if (station.code == next.code) {
node.children.push({
code: elem.code,
label: elem.name,
handler: this.mapLocation,
});
}
}
})
// this.menuNormal.push(node);
// }
// });
this.menuNormal.push(node);
}
});
if (this.isScreen) {
this.menu = [...this.menuScreen];
}
// else {
// this.menu = [...this.menuNormal];
// }
else {
this.menu = [...this.menuNormal];
}
},
doShow(point) {
this.clickEvent();

View File

@ -255,10 +255,17 @@
}
};
} else {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
if (this.courseModel.pmsList.length) {
this.jump();
} else {
if (this.tryTime <= 1) {
this.loading.close();
this.$confirm('您没有权限,请前往购买产品', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -355,4 +362,4 @@
.el-tabs--border-card>.el-tabs__header .el-tabs__item {
font-weight: bold !important;
}
</style>
</style>

View File

@ -196,6 +196,13 @@ export default {
},
async created() {
this.group = this.$route.query.group || '';
const loading = this.$loading({
lock: true ,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
loading.close();
},
async mounted() {
this.mode = this.$route.params.mode;

View File

@ -181,6 +181,7 @@
await this.$store.dispatch('exam/setTotalTime', this.userExam.duration);
await this.$store.dispatch('trainingList/setTrainingList', list);
} catch (error) {
this.loading.close();
//
if (error.code === 500004) {
this.$confirm('无此课程的考试权限,请前往购买!', '提示', {
@ -195,11 +196,16 @@
this.$messageBox('不在考试范围之内');
} else {
this.$messageBox(`${error.message}`);
}
}
},
exmaStart() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.examDetail();
if (this.examList.length) {
examNotify({ examId: this.$route.params.examId }).then(resp => {
@ -208,12 +214,12 @@
trainingId: this.examList[0].trainingId,
userExamId: this.userExam.id,
examQuestionId: this.examList[0].id
}
};
this.$router.push({ path: `${UrlConfig.display}/exam`, query: query });
launchFullscreen();
}).catch(error => {
this.$messageBox(`创建仿真失败: ${error.message}`);
this.loading.close();
})
}
}
@ -291,4 +297,4 @@
justify-content: center;
transform: translateY(-20px);
}
</style>
</style>

View File

@ -271,14 +271,20 @@ export default {
this.$refs.draftTrain.show({ event: '03', title: '删除自动生成实训' });
},
demoDisplay(index, node) {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
trainingNotify({ trainingId: node.id }).then(resp => {
/** 区分演示和正式需要在演示时设置lessonId为0*/
const query = { group: resp.data, trainingId: node.id, lessonId: 0 };
this.$router.push({ path: `${UrlConfig.display}/manage`, query: query });
launchFullscreen();
}).catch(error => {
this.$messageBox(`创建仿真失败: ${error.message}`);
this.loading.close();
});
},

View File

@ -88,15 +88,21 @@
}
},
start() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
trainingNotify({ trainingId: this.$route.params.trainingId }).then(resp => {
let query = {
group: resp.data, trainingId: this.$route.params.trainingId, lessonId: this.$route.params.lessonId
};
this.$router.push({ path: `${UrlConfig.display}/teach`, query: query });
launchFullscreen();
}).catch(error => {
this.$messageBox(`创建仿真失败: ${error.message}`);
loading.close();
});
}
}
@ -126,4 +132,4 @@
justify-content: center;
transform: translateY(-20px);
}
</style>
</style>