From cb5179fafb6a363a83fe2facac7e4575b8126942 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 5 Sep 2022 14:23:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=AE=BE=E8=AE=A1=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/trainingManage.js | 7 ++++ src/views/trainingManage/demonMenu.vue | 8 ++++- src/views/trainingManage/editDetails.vue | 41 ++++++++++++++++++++--- src/views/trainingManage/trainingList.vue | 29 ++++++++++++---- 4 files changed, 72 insertions(+), 13 deletions(-) diff --git a/src/api/trainingManage.js b/src/api/trainingManage.js index ca86bc0a5..978d94636 100644 --- a/src/api/trainingManage.js +++ b/src/api/trainingManage.js @@ -128,3 +128,10 @@ export function getTrainingGradeRules(trainingId) { method: 'get' }); } +/** 清空步骤 */ +export function clearTrainingStep(trainingId) { + return request({ + url: `/api/v2/draft/training/${trainingId}/step/clear`, + method: 'delete' + }); +} diff --git a/src/views/trainingManage/demonMenu.vue b/src/views/trainingManage/demonMenu.vue index 95cb1adc9..ee8450c78 100644 --- a/src/views/trainingManage/demonMenu.vue +++ b/src/views/trainingManage/demonMenu.vue @@ -7,7 +7,7 @@ - + @@ -55,6 +55,12 @@ export default { this.getMaterials(); }, methods:{ + publish(data) { + this.$refs.trainingList.publishScript(null, data); + }, + preview(data) { + this.$refs.trainingList.previewScript(null, data); + }, editConditionFn(data, index, key) { this.$refs.editDetails.editConditionFn(data, index, key); }, diff --git a/src/views/trainingManage/editDetails.vue b/src/views/trainingManage/editDetails.vue index fef291393..3cf7688f8 100644 --- a/src/views/trainingManage/editDetails.vue +++ b/src/views/trainingManage/editDetails.vue @@ -6,7 +6,14 @@
- 实训名称:{{ editData.name || '' }} +
+ 实训名称:{{ editData.name || '' }} +
+
+ 预览 + 发布 + 清空步骤 +
@@ -105,7 +112,7 @@