From b1cec0839d2e3b1898685d3b4fa5b288e9d3c104 Mon Sep 17 00:00:00 2001 From: fan Date: Wed, 4 Jan 2023 16:45:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=88=97=E8=A1=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/jmap/training.js | 8 + .../organization/trainingManage/index.vue | 15 +- src/views/publish/examRule/draft/editRule.vue | 15 +- src/views/publish/examRule/draft/index.vue | 286 ++++++++-------- src/views/publish/examRule/draft/rule.vue | 316 +++++++++--------- 5 files changed, 318 insertions(+), 322 deletions(-) diff --git a/src/api/jmap/training.js b/src/api/jmap/training.js index 16e9a5192..8d2c8339d 100644 --- a/src/api/jmap/training.js +++ b/src/api/jmap/training.js @@ -206,6 +206,14 @@ export function getPublishTrainingListInOrg(data) { data }); } +/** 查询组织已发布的实训列表 */ +export function getManageTrainingListInOrg(data) { + return request({ + url: `/api/v2/training/published/manage/infos`, + method: 'post', + data + }); +} /** 根据实训id查该已发布实训的所有信息 */ export function getPublishTrainingDetail(trainingId) { return request({ diff --git a/src/views/organization/trainingManage/index.vue b/src/views/organization/trainingManage/index.vue index 32ee71fed..a54b81fb0 100644 --- a/src/views/organization/trainingManage/index.vue +++ b/src/views/organization/trainingManage/index.vue @@ -10,7 +10,7 @@ import { createSimulation } from '@/api/simulation'; import ConstConfig from '@/scripts/ConstConfig'; import { getSessionStorage } from '@/utils/auth'; import { launchFullscreen } from '@/utils/screen'; -import { getAllPublishTrainingList, getPublishTrainingListInOrg, publishTrainingPutOn, publishTrainingPutOff, publishTrainingDelete } from '@/api/jmap/training'; +import { getAllPublishTrainingList, getManageTrainingListInOrg, publishTrainingPutOn, publishTrainingPutOff, publishTrainingDelete } from '@/api/jmap/training'; export default { name:'TrainingManage', data() { @@ -173,7 +173,8 @@ export default { if (this.hasTeachingDataManage()) { return getAllPublishTrainingList(param); } else { - return getPublishTrainingListInOrg(param); + if (!param.type) { delete param.type; } + return getManageTrainingListInOrg(param); } }, getLabelJson(row) { @@ -203,11 +204,11 @@ export default { loadScript(index, row) { // 子系统: mapSystem 客户端: terminal // row.mapSystem - let memberId = '1'; - if (row.playerIdJson) { - memberId = JSON.parse(row.playerIdJson)[0]; - } - const data = {mapId: row.mapId, type:row.mapSystem || 'METRO', itemMap:{DEFAULT_MEMBER:memberId} }; + // let memberId = '1'; + // if (row.playerIdJson) { + // memberId = JSON.parse(row.playerIdJson)[0]; + // } + // const data = {mapId: row.mapId, type:row.mapSystem || 'METRO', itemMap:{DEFAULT_MEMBER:memberId} }; // domConfig: Object // hasExam: false // hasTraining: false diff --git a/src/views/publish/examRule/draft/editRule.vue b/src/views/publish/examRule/draft/editRule.vue index e409ad27e..1bd32eef1 100644 --- a/src/views/publish/examRule/draft/editRule.vue +++ b/src/views/publish/examRule/draft/editRule.vue @@ -139,12 +139,6 @@ export default { return this.isEditMode ? this.$t('publish.modifyRules') : this.$t('publish.addRules'); } }, - created() { - // getLabelList().then(resp => { - // this.labels = [{ label: '无', value: '' }, ...resp.data.map(item => ({ label: item, value: item }))]; - // }); - }, - mounted() {}, methods: { show(detail) { this.dialogShow = true; @@ -170,14 +164,7 @@ export default { isDuplicated() { const isDuplicated = this.ruleList.length > 0 && - this.ruleList.some( - rule => - rule.type === this.form.type && - rule.subtype === this.form.subtype && - rule.tags && - this.form.tags && - rule.tags.includes(this.form.tags) - ); + this.ruleList.some(rule => rule.type === this.form.type && rule.subtype === this.form.subtype && rule.tags && this.form.tags && rule.tags.includes(this.form.tags)); return isDuplicated; }, subTypesChange(val) { diff --git a/src/views/publish/examRule/draft/index.vue b/src/views/publish/examRule/draft/index.vue index a4c0f70f4..848320b52 100644 --- a/src/views/publish/examRule/draft/index.vue +++ b/src/views/publish/examRule/draft/index.vue @@ -1,154 +1,154 @@