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