From 19b90ab854ce16cc660cd6f8785de553cfc974b3 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 28 Nov 2022 13:31:06 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BB=A3=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/views/organization/trainingManage/index.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/views/organization/trainingManage/index.vue b/src/views/organization/trainingManage/index.vue index 8749ff71b..9682d4b72 100644 --- a/src/views/organization/trainingManage/index.vue +++ b/src/views/organization/trainingManage/index.vue @@ -73,7 +73,10 @@ export default { }, { title: this.$t('trainingManage.labelJson'), - prop: 'labelJson' + prop: 'labelJson', + type: 'tagMore', + columnValue: (row) => { return this.getLabelJson(row); }, + tagType: (row) => { return ''; } }, { type: 'button', @@ -131,6 +134,10 @@ export default { }); } }, + getLabelJson(row) { + const label = JSON.parse(row.labelJson); + return label; + }, covertData(row) { const releaseReview = ConstConfig.ConstSelect.trainingType; const lastData = Object.assign({}, row); From dc9e7972e2279931ad99495e2e63046c6a8bc3a2 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 28 Nov 2022 13:37:04 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BB=A3=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/views/organization/trainingManage/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/organization/trainingManage/index.vue b/src/views/organization/trainingManage/index.vue index 9682d4b72..2d66b08b4 100644 --- a/src/views/organization/trainingManage/index.vue +++ b/src/views/organization/trainingManage/index.vue @@ -135,7 +135,7 @@ export default { } }, getLabelJson(row) { - const label = JSON.parse(row.labelJson); + const label = JSON.parse(row.labelJson || '[]'); return label; }, covertData(row) { From 98ed313a1d8498b04edd38b75d9579d413c1b4b6 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 28 Nov 2022 15:17:43 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BB=A3=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/projectConfig.js | 2 +- src/views/login/index.vue | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/api/projectConfig.js b/src/api/projectConfig.js index 47aabe853..edf17857f 100644 --- a/src/api/projectConfig.js +++ b/src/api/projectConfig.js @@ -28,7 +28,7 @@ export function getBackProjectConfigById(id) { /** 通过code获取后端项目配置 */ export function getBackProjectConfigByCode(code) { return request({ - url: `/api/project/code/{code}`, + url: `/api/project/code/${code}`, method: 'get' }); } diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 8b85c2434..cc3787528 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -91,7 +91,6 @@ export default { this.backProject = response.data.project; // loginProLogoHeight const {showBackPic, wechatLogin, aboutSystem, baseDevelopment, browserTitle, homeTitle, caseShow, - containDevice, deviceRelatedMap, deviceRelatedFunction, loginProtitle, loginProLogoWidth, loginOrgTitle, localProject, homeProLogoWidth, loginProLogo} = response.data.viewSetting; this.showBackPic = showBackPic; this.wechatLogin = wechatLogin; @@ -109,12 +108,14 @@ export default { this.$store.dispatch('setLoginProLogo', this.loginProLogo); this.$store.dispatch('setHomeTitle', homeTitle); this.$store.dispatch('setCaseShow', caseShow); - this.$store.dispatch('setDeviceRelated', {containDevice:containDevice, deviceRelatedMap:deviceRelatedMap, deviceRelatedFunction:deviceRelatedFunction}); // this.$store.dispatch('setCaseShow', caseShow); this.loadedConfig = true; // helpShow // 登录页 是否显示联系方式 loginContectInformation false setSessionStorage('project', this.project); + if (this.syncLogin) { + this.deviceRelatedLogin(); + } } }).catch(() => { this.$messageBox('无效的登录路径,请查证路径后重试!'); @@ -133,6 +134,9 @@ export default { }, selectOrgnization(orgId) { this.$refs.normalLogin.selectOrg(orgId); + }, + deviceRelatedLogin() { + } } }; From 6a1bf4018302e65a999aeb54161d49011d9e8f1b Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 28 Nov 2022 15:57:36 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BB=A3=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/views/login/normalLogin.vue | 83 +++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 35 deletions(-) diff --git a/src/views/login/normalLogin.vue b/src/views/login/normalLogin.vue index 87db89f1b..738e8d892 100644 --- a/src/views/login/normalLogin.vue +++ b/src/views/login/normalLogin.vue @@ -83,6 +83,8 @@ import Cookies from 'js-cookie'; // getLoginWmurl, checkLoginStatus, import { getOrgList, selectOrgnization } from '@/api/login'; import { createSimulation, getSimulationInfoNew } from '@/api/simulation'; +import { getBackProjectConfigByCode } from '@/api/projectConfig'; +import { assignUsersPlayRoles } from '@/api/jointSimulation'; export default { name:'NormalLogin', props: { @@ -140,6 +142,9 @@ export default { }, projectDevice() { return this.$route.query.projectDevice; + }, + role() { + return this.$route.query.role; } }, watch: { @@ -175,6 +180,7 @@ export default { this.checkOrgnizationInfo(); }) .catch(error => { + debugger; console.log(error); // if (error.code === '30001') { // this.tipsMsg = this.$t('login.accountOrPasswordIsIncorrect'); @@ -233,44 +239,51 @@ export default { } }, judgeOtherPage(params) { - // containDevice:false, // 是否包含设备 - // deviceRelatedMap:'', // 设备关联地图 - // deviceRelatedFunction:'' // 设备关联功能 // itemMap: {DEFAULT_MEMBER: '1'}type: "METRO" - const {containDevice, deviceRelatedMap, deviceRelatedFunction} = this.$store.state.projectConfig.deviceRelated; - if (containDevice && deviceRelatedMap && deviceRelatedFunction) { - createSimulation(deviceRelatedFunction).then(res => { - getSimulationInfoNew(res.data).then(resp => { - const paramVO = resp.data.paramVO; - const query = { - lineCode: resp.data.map.lineCode, - group: res.data, - mapId: resp.data.map.id, - project: this.project, - projectDevice:params.projectDevice, - type:params.type - }; - if (paramVO && paramVO.domConfig && paramVO.domConfig.client) { - query.client = paramVO.domConfig.client; - } - if (paramVO && paramVO.domConfig && paramVO.domConfig.singleClient) { - query.singleClient = paramVO.domConfig.singleClient; - } - // if (this.loadingProjectList.includes(this.project)) { - // this.$store.dispatch('app/transitionAnimations'); - // } - this.$router.push({ path: `/display/demon`, query: query }); - }); - }).catch(error=>{ - if (error.code == 10003) { - this.$messageBox(this.$t('error.createSimulationFailed') + ':您的仿真权限不足!'); + getBackProjectConfigByCode(this.project).then(res=>{ + if (res.data) { + const {mapId, functionId} = res.data; + if (functionId && mapId) { + createSimulation(functionId).then(resp => { + const group = resp.data; + if (this.role) { + assignUsersPlayRoles(this.role, group).then(() => { + this.enterSimulation(group, mapId); + }); + } else { + this.enterSimulation(group, mapId); + } + }).catch(error=>{ + if (error.code == 10003) { + this.$messageBox(this.$t('error.createSimulationFailed') + ':您的仿真权限不足!'); + } else { + this.$messageBox(this.$t('error.createSimulationFailed') + error.message); + } + }); } else { - this.$messageBox(this.$t('error.createSimulationFailed') + error.message); + this.$message.error('请先配置项目信息'); } - }); - } else { - this.$message.error('请先配置项目设备登录信息'); - } + } + }); + }, + enterSimulation(group, mapId) { + getSimulationInfoNew(group).then(response=>{ + debugger; + const paramVO = response.data.paramVO; + const query = { + lineCode: response.data.map.lineCode, + group: group, + mapId: mapId, + project: this.project + }; + if (paramVO && paramVO.domConfig && paramVO.domConfig.client) { + query.client = paramVO.domConfig.client; + } + if (paramVO && paramVO.domConfig && paramVO.domConfig.singleClient) { + query.singleClient = paramVO.domConfig.singleClient; + } + this.$router.push({ path: `/display/demon`, query: query }); + }); }, // 登陆 handleLogin() { From e7db5f7173f537e6681c7f69aa85762ef4e2a0ad Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 28 Nov 2022 16:41:36 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BB=A3=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/jmap/training.js | 8 +++++ src/api/management/exam.js | 8 +++++ src/api/questionBank.js | 9 ++++++ src/router/index.js | 6 ++-- .../competitionManage/bankList/index.vue | 16 ++++++++-- src/views/organization/examManage/index.vue | 14 +++++++-- .../organization/trainingManage/index.vue | 31 ++++++++++++++----- 7 files changed, 76 insertions(+), 16 deletions(-) diff --git a/src/api/jmap/training.js b/src/api/jmap/training.js index e8e806ba9..b22d67ce5 100644 --- a/src/api/jmap/training.js +++ b/src/api/jmap/training.js @@ -190,6 +190,14 @@ export function publishTrainingDelete(data) { data }); } +/** 查全部组织已发布实训的基础信息 */ +export function getAllPublishTrainingList(params) { + return request({ + url: `/api/v2/training/published/list`, + method: 'get', + params + }); +} /** 根据mapId查所有的已发布单操实训的基础信息 */ export function getPublishSingleList(mapId) { return request({ diff --git a/src/api/management/exam.js b/src/api/management/exam.js index 2fe57f01d..c068bff23 100644 --- a/src/api/management/exam.js +++ b/src/api/management/exam.js @@ -139,6 +139,14 @@ export function getPapaerListOfOrg({ orgId, ...data }) { }); } +export function getAllPapaerListOfOrg({ ...data }) { // 全部组织 + return request({ + url: `/api/v2/paper/composition/manage/paging`, + method: 'POST', + data + }); +} + /** * 创建试卷蓝图 * @param {Object} data diff --git a/src/api/questionBank.js b/src/api/questionBank.js index 096484cbc..e9a73d248 100644 --- a/src/api/questionBank.js +++ b/src/api/questionBank.js @@ -1,5 +1,14 @@ import request from '@/utils/request'; +// 查询理论试题(全部组织) +export function listAllQuestionPage(params) { + return request({ + url: `/api/question/paging`, + method: 'get', + params + }); +} + // 分页查询理论试题 export function listQuestionPage(params) { return request({ diff --git a/src/router/index.js b/src/router/index.js index 5e3d39d2f..407910b4c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2026,7 +2026,7 @@ export const asyncRouter = [ { // 理论题数据管理 path: 'theoryData', - component: Temporary, + component: BankManage, meta: { i18n: 'newRouter.theoryData' } @@ -2034,7 +2034,7 @@ export const asyncRouter = [ { // 实训数据管理 path: 'trainingDataManage', - component: Temporary, + component: TrainingManage, meta: { i18n: 'newRouter.trainingDataManage' } @@ -2042,7 +2042,7 @@ export const asyncRouter = [ { // 考试数据管理 path: 'examData', - component: BankManage, + component: OrgExamManage, meta: { i18n: 'newRouter.examData' } diff --git a/src/views/competitionManage/bankList/index.vue b/src/views/competitionManage/bankList/index.vue index 0f716e11d..e2072484c 100644 --- a/src/views/competitionManage/bankList/index.vue +++ b/src/views/competitionManage/bankList/index.vue @@ -8,7 +8,7 @@