From b3652b84b06ca5007ff87d0fc726e15ab11a433d Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Thu, 18 Aug 2022 15:35:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=AE=BE=E8=AE=A1=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/trainingManage.js | 58 +++++++ src/scripts/ConstConfig.js | 4 + src/views/designPlatform/trainingDesign.vue | 4 +- src/views/trainingManage/create.vue | 122 +++++++++++++ src/views/trainingManage/demonMenu.vue | 86 +++++++++ src/views/trainingManage/trainingList.vue | 183 ++++++++++++++++++++ 6 files changed, 456 insertions(+), 1 deletion(-) create mode 100644 src/api/trainingManage.js create mode 100644 src/views/trainingManage/create.vue create mode 100644 src/views/trainingManage/demonMenu.vue create mode 100644 src/views/trainingManage/trainingList.vue diff --git a/src/api/trainingManage.js b/src/api/trainingManage.js new file mode 100644 index 000000000..6c9647bff --- /dev/null +++ b/src/api/trainingManage.js @@ -0,0 +1,58 @@ +import request from '@/utils/request'; + +/** 获取当前用户的所有实训草稿数据 */ +export function getAllTrainingList(params) { + return request({ + url: `/api/v2/draft/training/all`, + method: 'get', + params + }); +} +/** 分页获取当前用户的实训草稿数据 */ +export function getTrainingList(data) { + return request({ + url: `/api/v2/draft/training/info/page`, + method: 'post', + data + }); +} +/** 创建实训草稿 */ +export function createTraining(data) { + return request({ + url: `/api/v2/draft/training/create`, + method: 'post', + data + }); +} +/** 更新当前用户的某个实训草稿 */ +export function updateTraining(data) { + return request({ + url: `/api/v2/draft/training`, + method: 'post', + data + }); +} +/** 修改实训所有步骤 */ +export function updateTrainingStep(id, data) { + return request({ + url: ` /api/v2/draft/training/${id}/step/update`, + method: 'put', + data: data + }); +} +/** 删除当前用户的实训草稿 */ +export function deleteTraining(data) { + return request({ + url: `/api/v2/draft/training`, + method: 'delete', + data: {trainingDraftIds: data} + }); +} +/** 当前用户发布自己的实训草稿 */ +export function publishTraining(data) { + return request({ + url: `/api/v2/draft/training/publish`, + method: 'post', + data + }); +} diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index 2459fa196..d4c4be54c 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -253,6 +253,10 @@ export default { { label: 'S', value: 'S' }, { label: 'SF', value: 'SF' }, { label: 'SD', value: 'SD' } + ], + trainingType: [ // 实训类型 + { enlabel: 'single operation', label: '单操', value: 'single'}, + { enlabel: 'scene operation', label: '场景', value: 'scene'} ] } }; diff --git a/src/views/designPlatform/trainingDesign.vue b/src/views/designPlatform/trainingDesign.vue index 4f7904ca8..a11058c73 100644 --- a/src/views/designPlatform/trainingDesign.vue +++ b/src/views/designPlatform/trainingDesign.vue @@ -2,6 +2,7 @@
+
@@ -19,11 +20,12 @@ import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp'; import { getToken } from '@/utils/auth'; import chatBox from '@/views/newMap/chatView/chatBox.vue'; import VoiceChatBox from '@/views/newMap/chatView/voiceChatBox.vue'; - +import MenuDemon from '@/views/trainingManage/demonMenu.vue'; export default { name: 'TrainingDesign', components: { JlmapVisual, + MenuDemon, chatBox, VoiceChatBox }, diff --git a/src/views/trainingManage/create.vue b/src/views/trainingManage/create.vue new file mode 100644 index 000000000..2d2cdebc6 --- /dev/null +++ b/src/views/trainingManage/create.vue @@ -0,0 +1,122 @@ + + + + diff --git a/src/views/trainingManage/demonMenu.vue b/src/views/trainingManage/demonMenu.vue new file mode 100644 index 000000000..83709498b --- /dev/null +++ b/src/views/trainingManage/demonMenu.vue @@ -0,0 +1,86 @@ + + + diff --git a/src/views/trainingManage/trainingList.vue b/src/views/trainingManage/trainingList.vue new file mode 100644 index 000000000..641d416fc --- /dev/null +++ b/src/views/trainingManage/trainingList.vue @@ -0,0 +1,183 @@ + + + +