实训平台教学 和 设计平台教学管理 prdtype对应接口调整
This commit is contained in:
parent
59f4a8d253
commit
eefaf8aad9
@ -1,13 +1,5 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** 清除实训数据*/
|
||||
export function clearTraining(args) {
|
||||
return request({
|
||||
url: `/api/training/${args.id}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
/** 开始实训*/
|
||||
export function startTraining(args, group) {
|
||||
return request({
|
||||
@ -61,33 +53,6 @@ export function addTraining(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 更新实训*/
|
||||
export function updateTraining(data) {
|
||||
return request({
|
||||
url: `/api/training/${data.id}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 保存实训初始状态*/
|
||||
export function saveTrainingInitStatus(data, group) {
|
||||
return request({
|
||||
url: `/api/training/${data.id}/detailSave?group=${group}`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 保存实训步骤数据*/
|
||||
export function saveTrainingStepsData(data) {
|
||||
return request({
|
||||
url: `/api/training/${data.id}/stepsSave`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取实训步骤数据*/
|
||||
export function getTrainingStepsDetail(trainingId, params) {
|
||||
return request({
|
||||
|
@ -121,7 +121,7 @@ export default {
|
||||
id: resp.data.id,
|
||||
name: resp.data.name,
|
||||
pmsList: resp.data.permissionList || [],
|
||||
prdId: resp.data.prdId,
|
||||
prdType: resp.data.prdType,
|
||||
mapId: resp.data.mapId,
|
||||
PermissionType: PermissionType.EXAM,
|
||||
treeList: resp.data.examDefinitionList
|
||||
@ -140,7 +140,7 @@ export default {
|
||||
// setTimeout(() => {
|
||||
// this.$router.push({
|
||||
// path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
||||
// query: { permissionType: PermissionType.EXAM, lessonId: this.courseModel.id, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
// query: { permissionType: PermissionType.EXAM, lessonId: this.courseModel.id, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
// });
|
||||
// }, 100);
|
||||
this.$messageBox(this.$t('global.buyingTips'));
|
||||
|
@ -182,7 +182,7 @@ export default {
|
||||
getPublishLessonDetail({ id: this.examDetails.lessonId }).then((res) => {
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.trainingPlatform.pay}/${this.examDetails.lessonId}`,
|
||||
query: { permissionType: PermissionType.EXAM, lessonId: this.examDetails.lessonId, prdId: res.data.prdId, mapId: res.data.mapId }
|
||||
query: { permissionType: PermissionType.EXAM, lessonId: this.examDetails.lessonId, prdType: res.data.prdType, mapId: res.data.mapId }
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.obtainCourseDetailsFailed'));
|
||||
|
@ -231,8 +231,8 @@ export default {
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.startDate=this.getDate(this.form.startDate);
|
||||
this.form.endDate=this.getDate(this.form.endDate);
|
||||
this.form.startDate = this.getDate(this.form.startDate);
|
||||
this.form.endDate = this.getDate(this.form.endDate);
|
||||
this.form['trial'] = this.trial;
|
||||
this.$store.dispatch('exam/setCourseDetail', this.form);
|
||||
this.$emit('definition', this.form);
|
||||
@ -240,12 +240,12 @@ export default {
|
||||
});
|
||||
},
|
||||
getDate(date) {
|
||||
let now = new Date(date),
|
||||
y = now.getFullYear(),
|
||||
m = now.getMonth() + 1,
|
||||
d = now.getDate();
|
||||
return y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d) + " " + now.toTimeString().substr(0, 8);
|
||||
},
|
||||
const now = new Date(date);
|
||||
const y = now.getFullYear();
|
||||
const m = now.getMonth() + 1;
|
||||
const d = now.getDate();
|
||||
return y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d) + ' ' + now.toTimeString().substr(0, 8);
|
||||
},
|
||||
updateForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
|
@ -103,7 +103,7 @@ export default {
|
||||
name: response.data.tree[0].name,
|
||||
pmsList: response.data.permissionList || [],
|
||||
treeList: response.data.tree,
|
||||
prdId: this.$route.query.prdId,
|
||||
prdType: this.$route.query.prdType,
|
||||
mapId: this.$route.query.mapId,
|
||||
PermissionType: PermissionType.LESSON
|
||||
};
|
||||
|
@ -57,8 +57,8 @@ export default {
|
||||
}
|
||||
},
|
||||
goLesson(row) {
|
||||
localStore.set('teachDetail' + this.$route.params.subSystem, `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}?lessonId=${row.id}&mapId=${row.mapId}&prdId=${row.prdId}`);
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdId: row.prdId}});
|
||||
localStore.set('teachDetail' + this.$route.params.subSystem, `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}?lessonId=${row.id}&mapId=${row.mapId}&prdType=${row.prdType}`);
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdType: row.prdType}});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user