diff --git a/src/api/contest.js b/src/api/contest.js new file mode 100644 index 000000000..78424957e --- /dev/null +++ b/src/api/contest.js @@ -0,0 +1,391 @@ +import request from '@/utils/request'; + +/** + * 获取竞赛试卷分页列表 + * @param {Object} params + * @param {String} params.name 试卷名称 + */ +export function getPaperList(params) { + return request({ + url: '/api/exercise/race/paper/page', + method: 'GET', + params + }); +} + +/** + * 创建试卷 + * @param {Object} data + * @param {String} data.name 试卷名称 + * @param {String} data.desc 基础描述 + * @param {Number} data.seasonId 所属赛季id + * @param {Boolean} data.supportCopy 是否支持拷贝 + */ +export function createPaper(data) { + return request({ + url: '/api/exercise/race/paper', + method: 'POST', + data + }); +} + +/** 修改试卷 + * @param {Object} data 同创建试卷 + * @param {Number} id 试卷id + */ +export function editPaper(id, data) { + return request({ + url: `/api/exercise/race/paper/${id}`, + method: 'POST', + data + }); +} + +/** 删除指定试卷 + * @param {Number} id 任务id + */ +export function deletePaper(id) { + return request({ + url: `/api/exercise/race/paper/${id}`, + method: 'DELETE' + }); +} + +/** + * 获取竞赛试卷菜单 + * @param {Object} params + * @param {String} params.group 分组ZZ=中职;GZ=高职 + */ +export function getPaperMenu(params) { + return request({ + url: '/api/exercise/race/paper/menu', + method: 'GET', + params + }); +} + +/** 模块修改任务设置 + * @param {Object} data + * @param {Array} data.modules 所有模块 + * @param {Number} data.modules[i].module_name 模块名字 + * @param {Number} data.modules[i].duration 考试总时间 + * @param {Number} data.modules[i].group 任务分组 + * @param {Number} data.modules[i].group.taskIds 此分组中的任务id + * @param {Number} data.modules[i].group.name 此组的名字 + * @param {Number} data.modules[i].group.group 此分组的子分组 + */ +export function paperModuleTaskSetting(paperId, data) { + return request({ + url: `/api/exercise/race/paper/${paperId}/config`, + method: 'POST', + data + }); +} + +/** 查看试卷明细 + * @param {Number} id 模块id + */ +export function getPaperDetail(id) { + return request({ + url: `/api/exercise/race/paper/${id}`, + method: 'GET' + }); +} + +/** 试卷拷贝 + * @param {Number} id 模块id + */ +export function copyPaper(id) { + console.log(id); + return request({ + url: `/api/exercise/race/paper/${id}/copy`, + method: 'PUT' + }); +} + +/** 查看所有任务数据 */ +export function getTaskTreeDatas() { + return request({ + url: '/api/exercise/race/task/tree', + method: 'GET' + }); +} + +/** + * 创建任务 + * @param {Object} data + * @param {String} data.name 任务名称 + * @param {String} data.desc 基础描述 + * @param {String} data.content 考核内容 + * @param {String} data.standards 评价标准 + * @param {Number} data.parentId 如果是子任务,需要父任务的id + */ +export function createTask(data) { + return request({ + url: '/api/exercise/race/task', + method: 'POST', + data + }); +} + +/** 修改指定任务 + * @param {Object} data 同创建任务 + * @param {Number} id 任务id + */ +export function editTask(id, data) { + return request({ + url: `/api/exercise/race/task/${id}`, + method: 'POST', + data + }); +} + +/** 删除指定任务 + * @param {Number} id 任务id + */ +export function deleteTask(id) { + return request({ + url: `/api/exercise/race/task/${id}`, + method: 'DELETE' + }); +} + +/** 查看任务详情 + * @param {Number} id 任务id + */ +export function getTaskDetail(id) { + return request({ + url: `/api/exercise/race/task/${id}`, + method: 'GET' + }); +} + +/** 查看指定子任务 + * @param {Number} id 任务id + */ +export function getchildrenTaskDatas(id) { + return request({ + url: `/api/exercise/race/task/${id}/children`, + method: 'GET' + }); +} + +/** 任务绑定 + * @param {Array} data + * @param {Number} taskId 任务id + * @param {Number} data[i].bindId 绑定id,根据bindtype来区分对应的id + * @param {String} data[i].bindType rule =0评分规则;scene=1场景 + * @param {Number} data[i].status 0=绑定 ;1=解绑 + */ +export function bindTask(taskId, data) { + return request({ + url: `/api/exercise/race/task/${taskId}/bind`, + method: 'POST', + data + }); +} +/** 竞赛赛季添加 + * @param {Object} data + * @param {Number} data.group 分组 1-高职 2中职 + * @param {String} data.term 赛季 + * @param {String} data.code 编号 + */ +export function addContestSeason(data) { + return request({ + url: '/api/exercise/race/season', + method: 'post', + data + }); +} +/** 竞赛赛季分页查询 + * @param {Object} params + * @param {Number} params.group 分组 1-高职 2中职 + * @param {String} params.term 赛季 + * @param {String} params.code 编号 + */ +export function queryContestSeasonPaged(params) { + return request({ + url: '/api/exercise/race/season/page', + method: 'get', + params + }); +} +/** 竞赛赛季修改 + * @param {Object} data + * @param {Number} id 赛季id + * @param {String} data.group 分组 ZZ=中职;GZ=高职 + * @param {String} data.term 赛季 + * @param {String} data.code 编号 + */ +export function updateContestSeason(id, data) { + return request({ + url: `/api/exercise/race/season/${id}`, + method: 'post', + data + }); +} +/** 竞赛赛季删除 + * @param {Number} id 赛季id + */ +export function deleteContestSeason(id) { + return request({ + url: `/api/exercise/race/season/${id}`, + method: 'delete' + }); +} +/** 竞赛评分创建基本信息 + * @param {Object} data + * @param {String} data.name 名称 + */ +export function createContextScore(data) { + return request({ + url: '/api/exercise/race/score', + method: 'post', + data + }); +} +/** 竞赛评分列表分页 + * @param {Object} params + * @param {String} params.name 名称 + */ +export function queryContextScorePaged(params) { + return request({ + url: '/api/exercise/race/score/page', + method: 'get', + params + }); +} +/** 竞赛评分删除 + * @param {Number} id 评分id + */ +export function deleteContextScore(id) { + return request({ + url: `/api/exercise/race/score/${id}`, + method: 'delete' + }); +} +/** 竞赛评分修改评分详情内容 + * @param {Number} id 评分id + * @param {Object} data + * @param {Array [object]} data.units 评分单元 + * @param {String} data.units[0].text 文字描述 + * @param {Number} data.units[0].sceneStepId 场景步骤ID + * @param {Number} data.units[0].score 分值 + * @param {String} data.units[0].worker 作业程序 + * @param {String} data.units[0].criteria 评分标准 + */ +export function updateContextScoreDetail(id, data) { + return request({ + url: `/api/exercise/race/score/edit/rule/${id}`, + method: 'post', + data + }); +} +/** 竞赛评分详情 + * @param {Number} id 评分id + */ +export function getContextScoreDetail(id) { + return request({ + url: `/api/exercise/race/score/${id}`, + method: 'get' + }); +} +/** 竞赛场景分页查询 + * @param {Object} params + * @param {String} params.type 竞赛类型 local=场景;link=3D + */ +export function queryContestSencePaged(params) { + return request({ + url: '/api/exercise/race/scene/page', + method: 'get', + params + }); +} +/** 竞赛场景删除 + * @param {Number} id 场景id + */ +export function deleteContestSence(id) { + return request({ + url: `/api/exercise/race/scene/${id}`, + method: 'delete' + }); +} +/** 竞赛场景详情 + * @param {Number} id 场景id + */ +export function getContextSenceDetail(id) { + return request({ + url: `/api/exercise/race/scene/${id}`, + method: 'get' + }); +} +/** 实训场景发布到大赛场景 + * @param {Object} data + * @param {Number} data.traningPublishId 草稿实训场景id + * @param {String} data.name 大赛场景名称 + */ +export function publishContextSence(data) { + return request({ + url: `/api/exercise/race/scene/publish/training`, + method: 'post', + data + }); +} + +/** 竞赛试卷测试模块任务集合 + * @param {String} paperId 试卷id + * @param {String} moduleId 模块id + */ +export function getTaskTree(paperId, moduleId) { + return request({ + url: `/api/exercise/race/paper/${paperId}/module/${moduleId}/task`, + method: 'get' + }); +} + +/** 竞赛开始训练 + * @param {String} paperId 试卷id + * @param {String} moduleId 模块id + */ +export function beginContestExercise(paperId, moduleId) { + return request({ + url: `/api/race/${paperId}/${moduleId}`, + method: 'POST' + }); +} + +/** 竞赛完成训练 */ +export function finishContestExercise() { + return request({ + url: '/api/race/finish', + method: 'PUT' + }); +} + +/** 竞赛赛季html内容编辑 +* @param {String} id 赛季id +* @param {String} data.htmlContent 内容 +*/ +export function editSeasonContent(id, data) { + return request({ + url: `/api/exercise/race/season/${id}/html`, + method: 'post', + data + }); +} +/** 竞赛赛季html内容获取 + * @param {String} id 赛季id +*/ +export function getSeasonContent(id) { + return request({ + url: `/api/exercise/race/season/${id}/html`, + method: 'get' + }); +} + +export function getTheoryList() { + return request({ + url: '/api/exercise/race/paper/questions', + method: 'get' + }); +} diff --git a/src/api/race.js b/src/api/race.js index c5f6bc3ef..43e444dd8 100644 --- a/src/api/race.js +++ b/src/api/race.js @@ -15,3 +15,20 @@ export function selectQuestionTypeNum(companyId) { method: 'get' }); } + +/** 加载场景 */ +export function loadRace(simulationId, sceneId) { + return request({ + url: `/api/race/${simulationId}/load/${sceneId}`, + method: 'put' + }); + +} +/** 完成任务 */ +export function overTask(taskId, data) { + return request({ + url: `/api/race/${taskId}/finish`, + method: 'put', + data + }); +} diff --git a/src/api/simulation.js b/src/api/simulation.js index 00973172e..afead9ca8 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -599,3 +599,11 @@ export function controlYjTrain(simulationId, right) { params: { right } }); } +/** 创建仿真(不通过功能id) */ +export function createSimulationNoFunction(mapId, data) { + return request({ + url: `/simulation/new/${mapId}`, + method: 'post', + data + }); +} diff --git a/src/i18n/langs/en/newRouter.js b/src/i18n/langs/en/newRouter.js index 6f3fc4e2c..98c457412 100644 --- a/src/i18n/langs/en/newRouter.js +++ b/src/i18n/langs/en/newRouter.js @@ -40,11 +40,10 @@ export default { userRulesManage: 'User Rights Statistics', contestDataManage:'Contest data management', contestSubjectManage:'contest subject management', - contestModuleManage:'contest module management', contestTaskManage:'contest task management', contestSceneManage:'contest scene management', contestTaskScoreManage:'contest task score management', - contestSceneDraftManage:'contest scene draft management', + contestSeasonManage:'contest season management', fileManage: 'File Manage', frontResourceManage: 'Front-End Resource Management', iscsPrerecordManage: 'ISCS Advance record management', diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js index 2cc718eb0..6684b44c2 100644 --- a/src/i18n/langs/en/router.js +++ b/src/i18n/langs/en/router.js @@ -1,110 +1,112 @@ export default { - homePage: 'Home', + homePage: 'Home', - mapManage: 'Map', - skinManage: 'Skin management', - mapDraw: 'Map draw', - runPlanManage: 'Run plan', - productEdit: 'Product editor', + mapManage: 'Map', + skinManage: 'Skin management', + mapDraw: 'Map draw', + runPlanManage: 'Run plan', + productEdit: 'Product editor', - newDesignEditor: 'Editor', - newDesignEditorList: 'Editor List', - newDesignDraftEditorList: 'Draft Editor List', - uploadPdf: 'Upload Pdf', - fileManage: 'File Manage', + newDesignEditor: 'Editor', + newDesignEditorList: 'Editor List', + newDesignDraftEditorList: 'Draft Editor List', + uploadPdf: 'Upload Pdf', + fileManage: 'File Manage', - designhomePage: 'Public map', - designUserPage: 'Personal map', - newDesignUserPage: 'Personal map', + designhomePage: 'Public map', + designUserPage: 'Personal map', + newDesignUserPage: 'Personal map', - lessaonManage: 'Lesson', - lessonEdit: 'Lesson editor', - trainingRecord: 'Trainning recording', - trainingRule: 'Training rules', - trainingManage: 'Training management', - taskManage: 'Task management', - scriptManage: 'Script', + lessaonManage: 'Lesson', + lessonEdit: 'Lesson editor', + trainingRecord: 'Trainning recording', + trainingRule: 'Training rules', + trainingManage: 'Training management', + taskManage: 'Task management', + scriptManage: 'Script', - teachSystem: 'Teaching', + teachSystem: 'Teaching', - examSystem: 'Examination', + examSystem: 'Examination', - demonstrationSystem: 'Simulation', + demonstrationSystem: 'Simulation', - dpSystem: 'Large screen', + dpSystem: 'Large screen', - planSystem: 'Lian plan', + planSystem: 'Lian plan', - replayManage: 'Playback', + replayManage: 'Playback', - permissionManage: 'Permission', - selfPermission: 'My Permission', + permissionManage: 'Permission', + selfPermission: 'My Permission', - pulishManage: 'Publication', - publishMapManage: 'Publishing map management', - productStateManage: 'Product state management', - publishLessonManage: 'Publishing lesson management', - runPlanTemplateManage: 'Template plan management', - runPlanCommonManage: 'Loading Plan Managemen', - runPlanEveryDayManage: 'Daily plan Management', - examRuleManage: 'Management of examination rules', + pulishManage: 'Publication', + publishMapManage: 'Publishing map management', + productStateManage: 'Product state management', + publishLessonManage: 'Publishing lesson management', + runPlanTemplateManage: 'Template plan management', + runPlanCommonManage: 'Loading Plan Managemen', + runPlanEveryDayManage: 'Daily plan Management', + examRuleManage: 'Management of examination rules', - orderAuthorityManage: 'Order&Authority', - commodityManage: 'Commodity management', - orderManage: 'Order management', - authorityManage: 'authority management', - authorityTransferManage: 'Privilege distribution management', - userRulesManage: 'User Rights Statistics', - addCommodity: 'Adding goods', - addOrder: 'Adding orders', - addCoursePermissions: 'Adding course permissions', + orderAuthorityManage: 'Order&Authority', + commodityManage: 'Commodity management', + orderManage: 'Order management', + authorityManage: 'authority management', + authorityTransferManage: 'Privilege distribution management', + userRulesManage: 'User Rights Statistics', + addCommodity: 'Adding goods', + addOrder: 'Adding orders', + addCoursePermissions: 'Adding course permissions', - systemManage: 'System', - dataDictionary: 'Data dictionary', - dataDictionaryDetails: 'Data dictionary details', - userManage: 'user management', - loginUserManage: 'login user Manage', - cacheManage: 'cache management', - userTrainingManage: 'User training management', - userExamManage: 'User examination management', - userSimulationManage: 'User simulation management', - existingSimulation: 'Existence simulation management', - ibpDraw: 'Ibp Draw', - trainingPlatform: 'trainingPlatform', - releaseApplication: 'Release application', - courseApplication: 'Course release application', - scriptReleaseApplication: 'Script release application', - runGraphReleaseApplication: 'Run graph release application', - subsystemGeneration: 'Subsystem generation', - newsBulletin: 'New bulletin', - notificationBulletin: 'Systematic notification', - commandDictionary: 'Command dictionary', - configLine: 'Line management', - deviceManage: 'Device management', - iscsDraw: 'Iscs Draw', - iscsSystem: 'Iscs System', - studentManage: 'Student manage', - examDetail: 'Exam detail', - raceManage: 'Race manage', - practiceManage: 'Practice manage', - bankManage: 'Bank manage', - sceneManage: 'Scene manage', - companyManage: 'Company manage', - authorApply: 'Grant application', - AuthorList: 'Authorization code list', - questionsRuleManage: 'Question rule manage', - preTheoryData: 'Pre Theory Data', - boardManage: 'Message Board Manage', - publishIBPManage: 'publish IBP Manage', - publishISCSManage: 'publish ISCS Manage', - publishTrainingManage: 'publish Training Manage', - voiceTraining: 'Voice Training', - mapGroup: 'Map Group', - drawingMange: 'Drawing Mange', - projectServer: 'Project Server', - audioResourcesManage: 'Audio Resources Manage', - iscsDeviceManage: 'ISCS Device Manage', - iscsResourcesManage: 'ISCS Resources Manage', - projectManage: 'Project Manage', - frontProjectConfigManage: 'Front Project Config Manage', -} + systemManage: 'System', + dataDictionary: 'Data dictionary', + dataDictionaryDetails: 'Data dictionary details', + userManage: 'user management', + loginUserManage: 'login user Manage', + cacheManage: 'cache management', + userTrainingManage: 'User training management', + userExamManage: 'User examination management', + userSimulationManage: 'User simulation management', + existingSimulation: 'Existence simulation management', + ibpDraw: 'Ibp Draw', + trainingPlatform: 'trainingPlatform', + releaseApplication: 'Release application', + courseApplication: 'Course release application', + scriptReleaseApplication: 'Script release application', + runGraphReleaseApplication: 'Run graph release application', + subsystemGeneration: 'Subsystem generation', + newsBulletin: 'New bulletin', + notificationBulletin: 'Systematic notification', + commandDictionary: 'Command dictionary', + configLine: 'Line management', + deviceManage: 'Device management', + iscsDraw: 'Iscs Draw', + iscsSystem: 'Iscs System', + studentManage: 'Student manage', + examDetail: 'Exam detail', + raceManage: 'Race manage', + practiceManage: 'Practice manage', + bankManage: 'Bank manage', + sceneManage: 'Scene manage', + companyManage: 'Company manage', + authorApply: 'Grant application', + AuthorList: 'Authorization code list', + questionsRuleManage: 'Question rule manage', + preTheoryData: 'Pre Theory Data', + boardManage: 'Message Board Manage', + publishIBPManage: 'publish IBP Manage', + publishISCSManage: 'publish ISCS Manage', + publishTrainingManage: 'publish Training Manage', + voiceTraining: 'Voice Training', + mapGroup: 'Map Group', + drawingMange: 'Drawing Mange', + projectServer: 'Project Server', + audioResourcesManage: 'Audio Resources Manage', + iscsDeviceManage: 'ISCS Device Manage', + iscsResourcesManage: 'ISCS Resources Manage', + projectManage: 'Project Manage', + frontProjectConfigManage: 'Front Project Config Manage', + training: 'Training', + theory: 'Theory' +}; diff --git a/src/i18n/langs/zh/newRouter.js b/src/i18n/langs/zh/newRouter.js index fa84bd66b..392714626 100644 --- a/src/i18n/langs/zh/newRouter.js +++ b/src/i18n/langs/zh/newRouter.js @@ -40,11 +40,10 @@ export default { userRulesManage: '用户权限管理', contestDataManage:'竞赛数据管理', contestSubjectManage:'竞赛题目管理', - contestModuleManage:'竞赛模块管理', contestTaskManage:'竞赛任务管理', contestSceneManage:'竞赛场景管理', contestTaskScoreManage:'竞赛任务评分管理', - contestSceneDraftManage:'竞赛场景草稿管理', + contestSeasonManage:'竞赛赛季管理', fileManage: '文件管理', frontResourceManage: '前端资源管理', iscsPrerecordManage: 'ISCS预录管理', diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js index 5ec3d2e6e..17afe3355 100644 --- a/src/i18n/langs/zh/router.js +++ b/src/i18n/langs/zh/router.js @@ -1,114 +1,116 @@ export default { - homePage: '首页', + homePage: '首页', - designhomePage: '公共地图', - designUserPage: '个人地图', - newDesignUserPage: '地图绘制', - newDesignEditor: '编辑器', - newDesignEditorList: '图文列表', - newDesignDraftEditorList: '文章草稿', - uploadPdf: 'PDF上传', - fileManage: '文件管理', + designhomePage: '公共地图', + designUserPage: '个人地图', + newDesignUserPage: '地图绘制', + newDesignEditor: '编辑器', + newDesignEditorList: '图文列表', + newDesignDraftEditorList: '文章草稿', + uploadPdf: 'PDF上传', + fileManage: '文件管理', - mapManage: '地图管理', - skinManage: '皮肤管理', - mapDraw: '地图绘制', - runPlanManage: '运行图管理', - productEdit: '产品编辑', + mapManage: '地图管理', + skinManage: '皮肤管理', + mapDraw: '地图绘制', + runPlanManage: '运行图管理', + productEdit: '产品编辑', - lessaonManage: '课程管理', - trainingRecord: '实训录制', - taskManage: '任务管理', - trainingRule: '操作定义', - trainingManage: '实训管理', - lessonEdit: '课程编辑', - scriptManage: '剧本管理', + lessaonManage: '课程管理', + trainingRecord: '实训录制', + taskManage: '任务管理', + trainingRule: '操作定义', + trainingManage: '实训管理', + lessonEdit: '课程编辑', + scriptManage: '剧本管理', - teachSystem: '教学系统', + teachSystem: '教学系统', - examSystem: '考试系统', + examSystem: '考试系统', - demonstrationSystem: '仿真系统', + demonstrationSystem: '仿真系统', - dpSystem: '大屏系统', + dpSystem: '大屏系统', - planSystem: '琏计划', + planSystem: '琏计划', - replayManage: '回放管理', + replayManage: '回放管理', - permissionManage: '权限管理', - selfPermission: '我的权限', + permissionManage: '权限管理', + selfPermission: '我的权限', - pulishManage: '发布内容管理', - publishMapManage: '发布地图管理', - productStateManage: '产品状态管理', - publishLessonManage: '发布课程管理', - runPlanTemplateManage: '模板运行图管理', - runPlanCommonManage: '加载计划运行图管理', - runPlanEveryDayManage: '每日运行图管理', - examRuleManage: '试卷规则管理', + pulishManage: '发布内容管理', + publishMapManage: '发布地图管理', + productStateManage: '产品状态管理', + publishLessonManage: '发布课程管理', + runPlanTemplateManage: '模板运行图管理', + runPlanCommonManage: '加载计划运行图管理', + runPlanEveryDayManage: '每日运行图管理', + examRuleManage: '试卷规则管理', - orderAuthorityManage: '订单权限管理', - commodityManage: '商品管理', - orderManage: '订单管理', - authorityManage: '权限管理', - authorityTransferManage: '权限分发管理', - userRulesManage: '用户权限统计', - addCommodity: '添加商品', - addOrder: '添加订单', - addCoursePermissions: '添加课程权限', + orderAuthorityManage: '订单权限管理', + commodityManage: '商品管理', + orderManage: '订单管理', + authorityManage: '权限管理', + authorityTransferManage: '权限分发管理', + userRulesManage: '用户权限统计', + addCommodity: '添加商品', + addOrder: '添加订单', + addCoursePermissions: '添加课程权限', - systemManage: '系统管理', - dataDictionary: '数据字典', - dataDictionaryDetails: '数据字典明细', - userManage: '用户管理', - loginUserManage: '在线用户管理', - cacheManage: '缓存管理', - userTrainingManage: '用户实训统计', - userExamManage: '用户考试统计', - userSimulationManage: '用户仿真统计', - existingSimulation: '存在仿真管理', + systemManage: '系统管理', + dataDictionary: '数据字典', + dataDictionaryDetails: '数据字典明细', + userManage: '用户管理', + loginUserManage: '在线用户管理', + cacheManage: '缓存管理', + userTrainingManage: '用户实训统计', + userExamManage: '用户考试统计', + userSimulationManage: '用户仿真统计', + existingSimulation: '存在仿真管理', - ibpDraw: 'Ibp盘绘制', - trainingPlatform: '实训平台', - releaseApplication: '发布申请', - courseApplication: '课程发布申请', - scriptReleaseApplication: '剧本发布申请', - runGraphReleaseApplication: '运行图发布申请', - subsystemGeneration: '子系统生成', - newsBulletin: '消息公告', - notificationBulletin: '系统通知', - commandDictionary: '指令字典', - configLine: '线路管理', - deviceManage: '设备管理', - iscsDraw: 'Iscs绘制', - iscsSystem: 'Iscs系统', - studentManage: '学生管理', - competitionManage: '竞赛管理', - refereeJManage: '仿真管理', - homeJsxt: '首页', - examDetail: '考试详情', - raceManage: '竞赛管理', - recaList: '报名列表', - bankManage: '题库列表', - practiceManage: '实操列表', - sceneManage: '场景列表', - companyManage: '组织管理', - authorApply: '授权申请', - AuthorList: '授权列表', - questionsRuleManage: '出题规则管理', - preTheoryData: '理论导入预处理', - boardManage: '留言板管理', - publishIBPManage: '发布IBP盘管理', - publishISCSManage: '发布ISCS管理', - publishTrainingManage: '发布实训管理', - voiceTraining: '语音训练', - mapGroup: '地图分组', - drawingMange: '图纸管理', - projectServer: '项目域名', - audioResourcesManage: '音频资源管理', - iscsDeviceManage: 'ISCS设备管理', - iscsResourcesManage: 'ISCS资源管理', - projectManage: '项目管理', - frontProjectConfigManage: '前端项目配置管理', -} + ibpDraw: 'Ibp盘绘制', + trainingPlatform: '实训平台', + releaseApplication: '发布申请', + courseApplication: '课程发布申请', + scriptReleaseApplication: '剧本发布申请', + runGraphReleaseApplication: '运行图发布申请', + subsystemGeneration: '子系统生成', + newsBulletin: '消息公告', + notificationBulletin: '系统通知', + commandDictionary: '指令字典', + configLine: '线路管理', + deviceManage: '设备管理', + iscsDraw: 'Iscs绘制', + iscsSystem: 'Iscs系统', + studentManage: '学生管理', + competitionManage: '竞赛管理', + refereeJManage: '仿真管理', + homeJsxt: '首页', + examDetail: '考试详情', + raceManage: '竞赛管理', + recaList: '报名列表', + bankManage: '题库列表', + practiceManage: '实操列表', + sceneManage: '场景列表', + companyManage: '组织管理', + authorApply: '授权申请', + AuthorList: '授权列表', + questionsRuleManage: '出题规则管理', + preTheoryData: '理论导入预处理', + boardManage: '留言板管理', + publishIBPManage: '发布IBP盘管理', + publishISCSManage: '发布ISCS管理', + publishTrainingManage: '发布实训管理', + voiceTraining: '语音训练', + mapGroup: '地图分组', + drawingMange: '图纸管理', + projectServer: '项目域名', + audioResourcesManage: '音频资源管理', + iscsDeviceManage: 'ISCS设备管理', + iscsResourcesManage: 'ISCS资源管理', + projectManage: '项目管理', + frontProjectConfigManage: '前端项目配置管理', + training: '实训', + theory: '理论' +}; diff --git a/src/router/index.js b/src/router/index.js index 1084dab8c..f24a40d53 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -223,11 +223,15 @@ const ThirdJumpSim = () => import('@/views/newMap/display/thirdJump'); const TmsPage = () => import('@/views/jlmap3d/drive/sceneview/tmsPage'); const ContestSubjectManage = () => import('@/views/contestDataManage/contestSubjectManage/ContestSubjectManage'); -const ContestModuleManage = () => import('@/views/contestDataManage/contestModuleManage/ContestModuleManage'); const ContestTaskManage = () => import('@/views/contestDataManage/contestTaskManage/ContestTaskManage'); const ContestSceneManage = () => import('@/views/contestDataManage/contestSceneManage/ContestSceneManage'); const ContestTaskScoreManage = () => import('@/views/contestDataManage/contestTaskScoreManage/ContestTaskScoreManage'); -const ContestSceneDraftManage = () => import('@/views/contestDataManage/contestSceneDraftManage/ContestSceneDraftManage'); +const ContestSeasonManage = () => import('@/views/contestDataManage/contestSeasonManage/ContestSeasonManage'); +const ContestScoreEdit = () => import('@/views/contestDataManage/contestTaskScoreManage/edit'); +const ContestList = () => import('@/views/contest/contestList'); +const ContestDetail = () => import('@/views/contest/contestDetail'); +const ScoringSettlement = () => import('@/views/contest/ScoringSettlement'); +const TheoryPage = () => import('@/views/contest/theory'); // import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; // import { getSessionStorage } from '@/utils/auth'; @@ -674,7 +678,6 @@ export const publicAsyncRoute = [ component: PisScreen, hidden: true } - ]; // 城市轨道项目 export const asyncRouter = [ @@ -2039,14 +2042,6 @@ export const asyncRouter = [ i18n: 'newRouter.contestSubjectManage' } }, - { - // 竞赛模块管理 - path: 'contestModuleManage', - component: ContestModuleManage, - meta: { - i18n: 'newRouter.contestModuleManage' - } - }, { // 竞赛任务管理 path: 'contestTaskManage', @@ -2072,11 +2067,16 @@ export const asyncRouter = [ } }, { - // 竞赛场景草稿管理 - path: 'contestSceneDraftManage', - component: ContestSceneDraftManage, + path: 'contestTaskScoreEdit', + component: ContestScoreEdit, + hidden: true + }, + { + // 竞赛赛季管理 + path: 'contestSeasonManage', + component: ContestSeasonManage, meta: { - i18n: 'newRouter.contestSceneDraftManage' + i18n: 'newRouter.contestSeasonManage' } } ] @@ -2191,6 +2191,54 @@ export const asyncRouter = [ ] } ]; +export const dsxlRouter = [ + { + path: '/contest', + component: Layout, + redirect: '/contest/list', + meta: { + i18n: 'router.training', + roles: [user] + }, + children: [ + { + path: 'list', + component: ContestList, + meta: { + i18n: 'router.training' + } + }, + { + path: 'detail', + component: ContestDetail, + hidden: true + }, + { + path: 'scoringSettlement', + component: ScoringSettlement, + hidden: true + } + ] + }, + { + path: '/theory', + component: Layout, + redirect: '/theory/list', + meta: { + i18n: 'router.theory', + roles: [user] + }, + children: [ + { + path: 'list', + component: TheoryPage, + meta: { + i18n: 'router.theory' + } + } + ] + } +]; const createRouter = () => new Router({ base: process.env.VUE_APP_PRO == 'local' ? '/' : '/cbtc/', mode: 'history', // require service support diff --git a/src/scripts/cmdPlugin/newValidateHandler.js b/src/scripts/cmdPlugin/newValidateHandler.js index 11435304f..c4ce288c8 100644 --- a/src/scripts/cmdPlugin/newValidateHandler.js +++ b/src/scripts/cmdPlugin/newValidateHandler.js @@ -84,8 +84,9 @@ class ValidateHandler { valid = ((operate.val).toString() === stepOperation.val.toString()) && valid; } const opParam = operate.param === undefined ? {} : operate.param; + const stepParam = stepOperation.params === undefined ? {} : stepOperation.params; if ((opParam || stepOperation.params) && !opParam.hasOwnProperty('fileBase64Str')) { - valid = this.checkParamConsistent(opParam, stepOperation.params, operate.operation) && valid; + valid = this.checkParamConsistent(opParam, stepParam, operate.operation) && valid; } if (valid && store.state.trainingNew.voiceStepIndex > -1) { diff --git a/src/store/modules/map.js b/src/store/modules/map.js index c9f352ae6..fb6ec028a 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -263,7 +263,8 @@ const map = { picture:'', // 当前的客户端 domConfig: null, // 仿真配置 initClient: '', // 仿真初始客户端 - linkSwitchMap: {} // 联动道岔数据 + linkSwitchMap: {}, // 联动道岔数据 + simulationCreatorId: '' }, getters: { @@ -1209,6 +1210,9 @@ const map = { }, setLinkSwitchMap: (state, linkSwitchMap) => { state.linkSwitchMap = linkSwitchMap; + }, + setSimulationCreatorId: (state, creatorId) => { + state.simulationCreatorId = creatorId; } }, @@ -1499,6 +1503,9 @@ const map = { }, updateNccDisplayConfig: ({ commit }, displayConfig) => { commit('updateNccDisplayConfig', displayConfig); + }, + setSimulationCreatorId:({ commit }, creatorId) => { + commit('setSimulationCreatorId', creatorId); } } }; diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 5b771ceb4..a1e577e9a 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -1,5 +1,5 @@ // import { loginInfo } from '@/scripts/ProjectConfig'; -import { userTrainingPlatform, admin, publicAsyncRoute, asyncRouter, constantRoutes, superAdmin, user } from '@/router/index'; +import { userTrainingPlatform, admin, publicAsyncRoute, asyncRouter, constantRoutes, superAdmin, user, dsxlRouter } from '@/router/index'; import { getSessionStorage } from '@/utils/auth'; import store from '@/store/index'; @@ -40,7 +40,11 @@ function hasPermission(roles, route, parentsRoles) { */ function resetAsyncRouter() { let list = publicAsyncRoute; - list = [...list, ...asyncRouter]; + if (getSessionStorage('project') !== 'dsxl') { + list = [...list, ...asyncRouter]; + } else { + list = [...list, ...dsxlRouter]; + } return list; } diff --git a/src/store/modules/trainingNew.js b/src/store/modules/trainingNew.js index 6301a8d56..8f0dec7b1 100644 --- a/src/store/modules/trainingNew.js +++ b/src/store/modules/trainingNew.js @@ -21,7 +21,8 @@ const training = { voiceStepIndex: -1, examSwitch: false, // 考试开始结束标注 stepRecord: [], // 操作记录 - joinTrainingInfo: null + joinTrainingInfo: null, + isRecord: false }, getters: { teachMode: (state) => { @@ -131,6 +132,9 @@ const training = { }, setJoinTrainingInfo: (state, joinTrainingInfo) => { state.joinTrainingInfo = joinTrainingInfo; + }, + setIsRecord: (state, flag) => { + state.isRecord = flag; } }, actions: { @@ -234,6 +238,9 @@ const training = { }, setJoinTrainingInfo: ({ commit }, joinTrainingInfo ) => { commit('setJoinTrainingInfo', joinTrainingInfo); + }, + setIsRecord: ({ commit }, flag) => { + commit('setIsRecord', flag); } } }; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 5bd10cd8d..b1a97e917 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -27,21 +27,21 @@ export function handlerUrl() { // BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://114.116.51.125/jlcloud'; - // BASE_API = 'http://192.168.3.47:9000'; // 周寅 + // BASE_API = 'http://192.168.33.93:9000'; // 周寅 // BASE_API = 'http://192.168.3.94:9000'; // 旭强 - // BASE_API = 'http://192.168.3.15:9000'; // 张赛 + // BASE_API = 'http://192.168.33.207:9000'; // 张赛 // BASE_API = 'http://192.168.3.5:9000'; // 夏增彬 // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 BASE_SITE = 'https://test.joylink.club/cbtc'; - OSS_URL = 'https://192.168.33.233/oss-rtss'; + OSS_URL = 'http://192.168.33.233/oss-rtss'; } else if (process.env.NODE_ENV === 'test' && process.env.VUE_APP_PRO === 'local-test') { // 本地打包测试分支 - BASE_API = 'https://192.168.33.233/rtss-server'; // api地址 - BASE_SITE = 'https://192.168.33.233/cbtc'; // 前端项目地址 - OSS_URL = 'https://192.168.33.233/oss-rtss'; // 资源地址 + BASE_API = 'http://192.168.33.233/rtss-server'; // api地址 + BASE_SITE = 'http://192.168.33.233/cbtc'; // 前端项目地址 + OSS_URL = 'http://192.168.33.233/oss-rtss'; // 资源地址 } else if (process.env.NODE_ENV === 'test') { // 测试分支 BASE_API = 'https://test.joylink.club/jlcloud'; diff --git a/src/views/contest/ScoringSettlement.vue b/src/views/contest/ScoringSettlement.vue new file mode 100644 index 000000000..cca4f284d --- /dev/null +++ b/src/views/contest/ScoringSettlement.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/views/contest/contestDetail.vue b/src/views/contest/contestDetail.vue new file mode 100644 index 000000000..5e3474b98 --- /dev/null +++ b/src/views/contest/contestDetail.vue @@ -0,0 +1,240 @@ + + + + + diff --git a/src/views/contest/contestList.vue b/src/views/contest/contestList.vue new file mode 100644 index 000000000..c35f5a690 --- /dev/null +++ b/src/views/contest/contestList.vue @@ -0,0 +1,262 @@ + + + + diff --git a/src/views/contest/paperList.vue b/src/views/contest/paperList.vue new file mode 100644 index 000000000..79e7bab3c --- /dev/null +++ b/src/views/contest/paperList.vue @@ -0,0 +1,161 @@ + + + diff --git a/src/views/contest/scoreRule.vue b/src/views/contest/scoreRule.vue new file mode 100644 index 000000000..db887c0f6 --- /dev/null +++ b/src/views/contest/scoreRule.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/views/contest/theory.vue b/src/views/contest/theory.vue new file mode 100644 index 000000000..84d5935a0 --- /dev/null +++ b/src/views/contest/theory.vue @@ -0,0 +1,281 @@ + + + + + diff --git a/src/views/contestDataManage/contestModuleManage/ContestModuleManage.vue b/src/views/contestDataManage/contestModuleManage/ContestModuleManage.vue deleted file mode 100644 index ac05e2727..000000000 --- a/src/views/contestDataManage/contestModuleManage/ContestModuleManage.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/src/views/contestDataManage/contestSceneDraftManage/ContestSceneDraftManage.vue b/src/views/contestDataManage/contestSceneDraftManage/ContestSceneDraftManage.vue deleted file mode 100644 index 8972f0fb0..000000000 --- a/src/views/contestDataManage/contestSceneDraftManage/ContestSceneDraftManage.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/src/views/contestDataManage/contestSceneManage/ContestSceneManage.vue b/src/views/contestDataManage/contestSceneManage/ContestSceneManage.vue index d4073f7d6..61e26e7d3 100644 --- a/src/views/contestDataManage/contestSceneManage/ContestSceneManage.vue +++ b/src/views/contestDataManage/contestSceneManage/ContestSceneManage.vue @@ -1,3 +1,122 @@ + + + + diff --git a/src/views/contestDataManage/contestSeasonManage/ContestSeasonManage.vue b/src/views/contestDataManage/contestSeasonManage/ContestSeasonManage.vue new file mode 100644 index 000000000..448a5616d --- /dev/null +++ b/src/views/contestDataManage/contestSeasonManage/ContestSeasonManage.vue @@ -0,0 +1,140 @@ + + + + + diff --git a/src/views/contestDataManage/contestSeasonManage/add.vue b/src/views/contestDataManage/contestSeasonManage/add.vue new file mode 100644 index 000000000..d0d1f4ec3 --- /dev/null +++ b/src/views/contestDataManage/contestSeasonManage/add.vue @@ -0,0 +1,107 @@ + + + diff --git a/src/views/contestDataManage/contestSeasonManage/editContent.vue b/src/views/contestDataManage/contestSeasonManage/editContent.vue new file mode 100644 index 000000000..8fda96b5c --- /dev/null +++ b/src/views/contestDataManage/contestSeasonManage/editContent.vue @@ -0,0 +1,67 @@ + + + diff --git a/src/views/contestDataManage/contestSubjectManage/AddEditPaper.vue b/src/views/contestDataManage/contestSubjectManage/AddEditPaper.vue new file mode 100644 index 000000000..d7ef590da --- /dev/null +++ b/src/views/contestDataManage/contestSubjectManage/AddEditPaper.vue @@ -0,0 +1,124 @@ + + + diff --git a/src/views/contestDataManage/contestSubjectManage/ContestSubjectManage.vue b/src/views/contestDataManage/contestSubjectManage/ContestSubjectManage.vue index 574ebbc09..191ca2009 100644 --- a/src/views/contestDataManage/contestSubjectManage/ContestSubjectManage.vue +++ b/src/views/contestDataManage/contestSubjectManage/ContestSubjectManage.vue @@ -1,3 +1,181 @@ + + + + diff --git a/src/views/contestDataManage/contestSubjectManage/EditModule.vue b/src/views/contestDataManage/contestSubjectManage/EditModule.vue new file mode 100644 index 000000000..fe31ad71b --- /dev/null +++ b/src/views/contestDataManage/contestSubjectManage/EditModule.vue @@ -0,0 +1,354 @@ + + + + + diff --git a/src/views/contestDataManage/contestSubjectManage/EditModuleTask.vue b/src/views/contestDataManage/contestSubjectManage/EditModuleTask.vue new file mode 100644 index 000000000..b466057c0 --- /dev/null +++ b/src/views/contestDataManage/contestSubjectManage/EditModuleTask.vue @@ -0,0 +1,163 @@ + + + diff --git a/src/views/contestDataManage/contestTaskManage/AddEditTask.vue b/src/views/contestDataManage/contestTaskManage/AddEditTask.vue new file mode 100644 index 000000000..cd0db49d9 --- /dev/null +++ b/src/views/contestDataManage/contestTaskManage/AddEditTask.vue @@ -0,0 +1,133 @@ + + + diff --git a/src/views/contestDataManage/contestTaskManage/BindTask.vue b/src/views/contestDataManage/contestTaskManage/BindTask.vue new file mode 100644 index 000000000..55aac91ef --- /dev/null +++ b/src/views/contestDataManage/contestTaskManage/BindTask.vue @@ -0,0 +1,103 @@ + + + diff --git a/src/views/contestDataManage/contestTaskManage/ContestTaskManage.vue b/src/views/contestDataManage/contestTaskManage/ContestTaskManage.vue index 0c78e8bc3..35648d2c7 100644 --- a/src/views/contestDataManage/contestTaskManage/ContestTaskManage.vue +++ b/src/views/contestDataManage/contestTaskManage/ContestTaskManage.vue @@ -1,3 +1,174 @@ + + + + diff --git a/src/views/contestDataManage/contestTaskScoreManage/ContestTaskScoreManage.vue b/src/views/contestDataManage/contestTaskScoreManage/ContestTaskScoreManage.vue index 333be95c2..2e556f22d 100644 --- a/src/views/contestDataManage/contestTaskScoreManage/ContestTaskScoreManage.vue +++ b/src/views/contestDataManage/contestTaskScoreManage/ContestTaskScoreManage.vue @@ -1,3 +1,108 @@ + + + + diff --git a/src/views/contestDataManage/contestTaskScoreManage/add.vue b/src/views/contestDataManage/contestTaskScoreManage/add.vue new file mode 100644 index 000000000..5d4d19144 --- /dev/null +++ b/src/views/contestDataManage/contestTaskScoreManage/add.vue @@ -0,0 +1,71 @@ + + + diff --git a/src/views/contestDataManage/contestTaskScoreManage/detailAdd.vue b/src/views/contestDataManage/contestTaskScoreManage/detailAdd.vue new file mode 100644 index 000000000..e2cf1025f --- /dev/null +++ b/src/views/contestDataManage/contestTaskScoreManage/detailAdd.vue @@ -0,0 +1,102 @@ + + + diff --git a/src/views/contestDataManage/contestTaskScoreManage/edit.vue b/src/views/contestDataManage/contestTaskScoreManage/edit.vue new file mode 100644 index 000000000..b2e526075 --- /dev/null +++ b/src/views/contestDataManage/contestTaskScoreManage/edit.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/src/views/contestDataManage/contestTaskScoreManage/importScene.vue b/src/views/contestDataManage/contestTaskScoreManage/importScene.vue new file mode 100644 index 000000000..34732c424 --- /dev/null +++ b/src/views/contestDataManage/contestTaskScoreManage/importScene.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/src/views/contestDataManage/contestTaskScoreManage/selectScene.vue b/src/views/contestDataManage/contestTaskScoreManage/selectScene.vue new file mode 100644 index 000000000..107f7b428 --- /dev/null +++ b/src/views/contestDataManage/contestTaskScoreManage/selectScene.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/src/views/login/normalLogin.vue b/src/views/login/normalLogin.vue index 51fcde7f5..be5575642 100644 --- a/src/views/login/normalLogin.vue +++ b/src/views/login/normalLogin.vue @@ -242,6 +242,10 @@ export default { type: this.$route.query.type }; this.judgeOtherPage(params); + } else if (this.$store.state.projectConfig.projectCode === 'DSXL') { + this.loading = false; + path = '/contest/list'; + this.$router.push({ path: path }); } else { this.loading = false; path = '/simulation/simulationIndex'; diff --git a/src/views/newMap/chatView/chatBox.vue b/src/views/newMap/chatView/chatBox.vue index 8227cd99c..f3fbccbc0 100644 --- a/src/views/newMap/chatView/chatBox.vue +++ b/src/views/newMap/chatView/chatBox.vue @@ -247,7 +247,7 @@ export default { } }, isRecord() { - return !!this.$route.query.record; + return !!this.$store.state.trainingNew.record; } }, watch:{ diff --git a/src/views/newMap/chatView/voiceChatBox.vue b/src/views/newMap/chatView/voiceChatBox.vue index 398ff7461..04663d4c2 100644 --- a/src/views/newMap/chatView/voiceChatBox.vue +++ b/src/views/newMap/chatView/voiceChatBox.vue @@ -31,7 +31,7 @@ - + @@ -88,8 +88,6 @@ export default { label: 'labelName' }, simulationUserList: [], - stationList: [], - availableStationList:[], activeTrains: [], standList: [], doorList: [], diff --git a/src/views/newMap/display/newChat/chatContent.vue b/src/views/newMap/display/newChat/chatContent.vue index 128705f66..b7091254b 100644 --- a/src/views/newMap/display/newChat/chatContent.vue +++ b/src/views/newMap/display/newChat/chatContent.vue @@ -272,6 +272,9 @@ export default { this.microphone = null; this.recordSending = false; this.recorders = null; + if (this.$store.state.trainingNew.trainingSwitch) { + this.$store.dispatch('trainingNew/handleMatchVoice', {content: 'false'}); + } } }, // 停止录制 发送语音 diff --git a/src/views/newMap/display/simulationMenu/simulationMenu.vue b/src/views/newMap/display/simulationMenu/simulationMenu.vue index bee7c1c9b..1f1704596 100644 --- a/src/views/newMap/display/simulationMenu/simulationMenu.vue +++ b/src/views/newMap/display/simulationMenu/simulationMenu.vue @@ -98,17 +98,19 @@ export default { }, watch: { '$store.state.socket.simulationOver':function(val) { - this.$alert('您所在仿真已被销毁', '提示', { - confirmButtonText: '确定', - showClose: false, - callback: action => { - if (this.$route.query.newOpen) { - window.close(); - } else { - this.back(); + if (this.$store.state.map.simulationCreatorId !== this.$store.state.user.id) { + this.$alert('您所在仿真已被销毁', '提示', { + confirmButtonText: '确定', + showClose: false, + callback: action => { + if (this.$route.query.newOpen) { + window.close(); + } else { + this.back(); + } } - } - }); + }); + } }, '$store.state.socket.simulationRoleList':function(val) { (val || []).forEach(item => { @@ -232,6 +234,9 @@ export default { } } else if (this.projectDevice) { this.logout(); + } else if (this.$route.query.nowKey) { + const query = { paperId: this.$route.query.paperId, moduleId: this.$route.query.moduleId, nowKey: +this.$route.query.nowKey + 1 }; + this.$router.replace({ path:'/contest/detail', query }); } else { this.$router.go(-1); } diff --git a/src/views/newMap/display/trainingDesign/designPane.vue b/src/views/newMap/display/trainingDesign/designPane.vue index 3154a93cc..88b86dba8 100644 --- a/src/views/newMap/display/trainingDesign/designPane.vue +++ b/src/views/newMap/display/trainingDesign/designPane.vue @@ -130,7 +130,6 @@ import EditOperate from './editOperate'; import CreateDraftTraining from './createDraftTraining'; import GradeRules from './gradeRules'; import TrackList from './trackList'; -import { EventBus } from '@/scripts/event-bus'; export default { name: 'DesignIndex', @@ -217,15 +216,13 @@ export default { e.stopPropagation(); }); }, + beforeDestroy() { + this.$store.dispatch('trainingNew/setIsRecord', false); + }, methods: { goBackList() { - const qObj = {...this.$route.query}; - qObj.record = false; - this.$router.replace({ query:{...qObj}}); + this.$store.dispatch('trainingNew/setIsRecord', false); this.showMode = 'draftTrainingList'; - this.$nextTick(() => { - EventBus.$emit('viewLoading', false); - }); }, computedRoleDisabled(role) { if (!this.editData.client) { diff --git a/src/views/newMap/display/trainingDesign/draftTrainingList.vue b/src/views/newMap/display/trainingDesign/draftTrainingList.vue index ff54eb823..e3e46889f 100644 --- a/src/views/newMap/display/trainingDesign/draftTrainingList.vue +++ b/src/views/newMap/display/trainingDesign/draftTrainingList.vue @@ -26,6 +26,7 @@ import ConstConfig from '@/scripts/ConstConfig'; import { loadDraftTraining } from '@/api/jmap/training'; import { deleteTraining, publishTraining, jumpToTraining } from '@/api/trainingManage'; import { OperateMode } from '@/scripts/ConstDic'; +import { publishContextSence } from '@/api/contest'; export default { name: 'List', @@ -84,7 +85,7 @@ export default { { type: 'button', title: this.$t('trainingManage.operate'), - width: '300', + width: '250', buttons: [ { name: this.$t('trainingManage.record'), @@ -110,6 +111,12 @@ export default { type: 'text', showControl:(row) => { return row.id; } }, + { + name: '发布至竞赛', + handleClick: this.publishToContest, + type: 'text', + showControl:(row) => { return row.id; } + }, { name: this.$t('trainingManage.preview'), handleClick: this.previewScript, @@ -196,7 +203,7 @@ export default { return; } const qObj = {...this.$route.query}; - qObj.record = true; + this.$store.dispatch('trainingNew/setIsRecord', true); this.$router.replace({ query:{...qObj}}); this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式 getTrainingAll(row.id).then(resp => { @@ -247,6 +254,43 @@ export default { }); }).catch(e => {}); }, + publishToContest(index, row) { + this.$prompt('请输入发布后名称', '提示', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + inputValue: row.name, + inputErrorMessage: '输入不能为空', + inputValidator: (value) => { + if (!value) { + return '输入不能为空'; + } + } + + }).then(suc => { + if (!row.id || !suc.value) { return; } + publishContextSence({dafitid: +row.id, name: suc.value, forcePublish: false}).then(res => { + this.$message.success('发布至竞赛成功!'); + }).catch(err => { + if (err.code == 12000) { + this.$confirm('已有名称重复场景,是否继续发布,继续发布将强行覆盖重复实训?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + publishContextSence({dafitid: +row.id, name: suc.value, forcePublish: true}).then(res => { + this.$message.success('发布至竞赛成功!'); + }).catch(() => { + this.$message.error(`发布至竞赛失败!,${err.message}`); + }); + }).catch(e => {}); + } else { + this.$message.error(`发布至竞赛失败!,${err.message}`); + } + }); + }); + }, publishScript(index, row) { this.$prompt('请输入发布后名称', '提示', { diff --git a/src/views/newMap/display/trainingDesign/editOperate.vue b/src/views/newMap/display/trainingDesign/editOperate.vue index d2358876f..683040b8f 100644 --- a/src/views/newMap/display/trainingDesign/editOperate.vue +++ b/src/views/newMap/display/trainingDesign/editOperate.vue @@ -126,6 +126,15 @@ export default { this.stepIndex = data.index; this.stepDetail = data.data; this.trainingType = data.type; + if (!this.stepDetail.operations) { + this.$set(this.stepDetail, 'operations', []); + } + if (!this.stepDetail.simCommands) { + this.$set(this.stepDetail, 'simCommands', []); + } + if (!this.stepDetail.tipPosition) { + this.$set(this.stepDetail, 'tipPosition', {}); + } }, clearOperation() { this.$confirm('清除操作将清除所有关联操作', '提示', { diff --git a/src/views/newMap/display/trainingList/scenePlayRole.vue b/src/views/newMap/display/trainingList/scenePlayRole.vue index 9b4df792f..b5f00098f 100644 --- a/src/views/newMap/display/trainingList/scenePlayRole.vue +++ b/src/views/newMap/display/trainingList/scenePlayRole.vue @@ -65,7 +65,13 @@ export default { this.dialogVisible = false; }, doShow() { - const playerList = JSON.parse(this.trainingDetail.playerIdJson); + let playerList = []; + if (this.$route.query.paperId) { + playerList = this.trainingDetail.playerIds; + } else { + playerList = JSON.parse(this.trainingDetail.playerIdJson); + + } const memberData = this.$store.state.training.memberData; const newMemberData = {}; playerList.forEach(playerId => { diff --git a/src/views/newMap/display/trainingList/trainingMenu.vue b/src/views/newMap/display/trainingList/trainingMenu.vue index cce2d1a30..66d04f116 100644 --- a/src/views/newMap/display/trainingList/trainingMenu.vue +++ b/src/views/newMap/display/trainingList/trainingMenu.vue @@ -4,7 +4,7 @@
- + @@ -33,7 +33,7 @@

-

+

{{ $t('display.training.trainingInstructions') }} {{ trainingDetail ?trainingDetail.description:'' }}

@@ -44,11 +44,11 @@ 结束

-

+

上 一 题: {{ previousTraining? previousTraining.name: '' }}

-

+

下 一 题: {{ nextTraining? nextTraining.name:'' }}

@@ -69,6 +69,8 @@