Merge branch 'master' of https://git.qcloud.com/joylink/jl-nclient
This commit is contained in:
commit
ff44562b2c
@ -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);
|
||||
},
|
||||
|
@ -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();
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
@ -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();
|
||||
});
|
||||
|
||||
},
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user