diff --git a/src/api/jmap/lessondraft.js b/src/api/jmap/lessondraft.js index 23b7c3322..a199cbb53 100644 --- a/src/api/jmap/lessondraft.js +++ b/src/api/jmap/lessondraft.js @@ -2,111 +2,103 @@ import request from '@/utils/request'; /** 获取课程树*/ export function getLessonTree(skinCode) { - return request({ - url: `/api/lessonDraft/${skinCode}/tree`, - method: 'get' - }); + return request({ + url: `/api/lessonDraft/${skinCode}/tree`, + method: 'get' + }); } /** 获取课程详细内容*/ export function getLessonDetail(data) { - return request({ - url: `/api/lessonDraft/${data.id}`, - method: 'get' - }); + return request({ + url: `/api/lessonDraft/${data.id}`, + method: 'get' + }); } /** 创建课程*/ export function createLesson(data) { - return request({ - url: '/api/lessonDraft', - method: 'post', - data: data - }); + return request({ + url: '/api/lessonDraft', + method: 'post', + data: data + }); } /** 从发布课程创建*/ export function createLessonFromPublish(data) { - return request({ - url: '/api/lessonDraft/createForm', - method: 'post', - data: data - }); + return request({ + url: '/api/lessonDraft/createForm', + method: 'post', + data: data + }); } /** 更新课程*/ export function updateLesson(data) { - return request({ - url: `/api/lessonDraft/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/lessonDraft/${data.id}`, + method: 'put', + data: data + }); } /** 删除课程*/ export function delLesson(data) { - return request({ - url: `/api/lessonDraft/${data.id}`, - method: 'delete', - data: data - }); + return request({ + url: `/api/lessonDraft/${data.id}`, + method: 'delete', + data: data + }); } /** 创建课程章节*/ export function createLessonChapter(data) { - return request({ - url: `/api/lessonDraft/${data.lessonId}/chapter`, - method: 'post', - data: data - }); + return request({ + url: `/api/lessonDraft/${data.lessonId}/chapter`, + method: 'post', + data: data + }); } /** 更新课程章节*/ export function updateLessonChapter(data) { - return request({ - url: `/api/lessonDraft/chapter/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/lessonDraft/chapter/${data.id}`, + method: 'put', + data: data + }); } /** 创建课程章节详细内容*/ export function getLessonChapterDetail(data) { - return request({ - url: `/api/lessonDraft/chapter/${data.id}`, - method: 'get' - }); + return request({ + url: `/api/lessonDraft/chapter/${data.id}`, + method: 'get' + }); } /** 发布课程*/ export function publishLesson(data) { - return request({ - url: `/api/lessonDraft/${data.id}/publish`, - method: 'post', - data: data - }); + return request({ + url: `/api/lessonDraft/${data.id}/publish`, + method: 'post', + data: data + }); } /** 课程章节拖拽排序*/ export function dragSortLessonChapter(data) { - return request({ - url: '/api/lessonDraft/dragSort', - method: 'put', - data: data - }); -} - -/** 根据lessonId获取课程名称*/ -export function getLessonNameByMapIdAndLessonId(model) { - return request({ - url: `/api/lessonDraft/${model.mapId}/${model.lessonId}`, - method: 'get' - }); + return request({ + url: '/api/lessonDraft/dragSort', + method: 'put', + data: data + }); } export function getLessonDrftList(params) { - return request({ - url: `/api/lessonDraft`, - method: 'get', - params: params - }); + return request({ + url: `/api/lessonDraft`, + method: 'get', + params: params + }); } diff --git a/src/api/jmap/map.js b/src/api/jmap/map.js index d119c6220..fea5707e3 100644 --- a/src/api/jmap/map.js +++ b/src/api/jmap/map.js @@ -17,22 +17,6 @@ export function getPublishMapListBySkinCode(skinCode) { }); } -/** 根据皮肤获取地图版本信息*/ -export function getPublishMapVersion(skinCode) { - return request({ - url: `/api/map/skin/${skinCode}/version`, - method: 'get' - }); -} - -/** 根据皮肤获取发布地图详细内容*/ -export function getPublishMapDetail(skinCode) { - return request({ - url: `/api/map/skin/${skinCode}/details`, - method: 'get' - }); -} - /** 根据地图id获取地图版本信息*/ export function getPublishMapVersionById(id) { return request({ @@ -49,14 +33,6 @@ export function getPublishMapDetailById(id) { }); } -/** 获取发布地图列车列表*/ -export function getPublishTrainList(skinCode) { - return request({ - url: `/api/map/${skinCode}/train`, - method: 'get' - }); -} - /** 获取发布地图列表*/ export function listPublishMap(params) { return request({ diff --git a/src/api/management/mapprd.js b/src/api/management/mapprd.js index 427d858ae..f47c6c664 100644 --- a/src/api/management/mapprd.js +++ b/src/api/management/mapprd.js @@ -62,9 +62,9 @@ export function deleteTrainingCategory(data) { /** * 获取地图下的产品列表 */ -export function getCommodityMapProduct(skinCode) { +export function getCommodityMapProduct(mapId) { return request({ - url: `/api/mapPrd/${skinCode}/list`, + url: `/api/mapPrd/${mapId}/list`, method: 'get' }); } diff --git a/src/api/management/mapskin.js b/src/api/management/mapskin.js index 7ca93831d..1eba6fd9a 100644 --- a/src/api/management/mapskin.js +++ b/src/api/management/mapskin.js @@ -2,68 +2,68 @@ import request from '@/utils/request'; /** 分页查询皮肤*/ export function getSkinCodePageList(params) { - return request({ - url: `/api/mapSkin`, - method: 'get', - params: params - }); + return request({ + url: `/api/realLine`, + method: 'get', + params: params + }); } /** 添加皮肤*/ export function addSkinCode(data) { - return request({ - url: `/api/mapSkin`, - method: 'post', - data: data - }); + return request({ + url: `/api/realLine`, + method: 'post', + data: data + }); } /** 删除皮肤*/ export function delSkinCode(id) { - return request({ - url: `/api/mapSkin/${id}`, - method: 'delete' - }); + return request({ + url: `/api/realLine/${id}`, + method: 'delete' + }); } /** 查询地图皮肤 */ export function querySkinCode(id) { - return request({ - url: `/api/mapSkin/${id}`, - method: 'get' - }); + return request({ + url: `/api/realLine/${id}`, + method: 'get' + }); } /** 修改地图皮肤*/ export function updateSkinCode(data) { - return request({ - url: `/api/mapSkin/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/realLine/${data.id}`, + method: 'put', + data: data + }); } /** 通过皮肤Code更新地图皮肤*/ export function updateSkinCodeByCode(data) { - return request({ - url: `/api/mapSkin/${data.code}/update`, - method: 'put', - data: data - }); + return request({ + url: `/api/realLine/${data.code}/update`, + method: 'put', + data: data + }); } /** 查询皮肤是否存在*/ export function querySkinCodeExistByCode(code) { - return request({ - url: `/api/mapSkin/${code}/exist`, - method: 'get' - }); + return request({ + url: `/api/realLine/${code}/exist`, + method: 'get' + }); } /** 获取皮肤列表*/ export function getSkinCodeList() { - return request({ - url: `/api/mapSkin/list`, - method: 'get' - }); + return request({ + url: `/api/realLine/list`, + method: 'get' + }); } diff --git a/src/api/management/operation.js b/src/api/management/operation.js index 9bee8d558..06645e275 100644 --- a/src/api/management/operation.js +++ b/src/api/management/operation.js @@ -5,131 +5,131 @@ import request from '@/utils/request'; * 获取实训规则列表 */ export function getTrainingRulesList(params) { - return request({ - url: `/api/operate`, - method: 'get', - params: params - }); + return request({ + url: `/api/operate`, + method: 'get', + params: params + }); } /** * 生成考试定义规则 */ export function postTrainingRulesData(data) { - return request({ - url: `/api/operate`, - method: 'post', - data: data - }); + return request({ + url: `/api/operate`, + method: 'post', + data: data + }); } /** * 修改考试定义规则 */ export function putTrainingRulesData(data) { - return request({ - url: `/api/operate/${data.id}`, - method: 'put', - data: data - }); + return request({ + url: `/api/operate/${data.id}`, + method: 'put', + data: data + }); } /** * 删除考试定义规则 */ export function deleteTrainingRulesData(id) { - return request({ - url: `/api/operate/${id}`, - method: 'DELETE' - }); + return request({ + url: `/api/operate/${id}`, + method: 'DELETE' + }); } /** * 获取实训规则步骤详情列表 */ export function getOperateStepDataList(id, params) { - return request({ - url: `/api/operate/${id}/step`, - method: 'get', - params: params - }); + return request({ + url: `/api/operate/${id}/step`, + method: 'get', + params: params + }); } /** * 创建操作步骤 */ export function postOperateStepData(params) { - return request({ - url: `/api/operate/${params.definitionId}/step`, - method: 'post', - data: params - }); + return request({ + url: `/api/operate/${params.definitionId}/step`, + method: 'post', + data: params + }); } /** * 修改操作步骤 */ export function putOperateStepData(params) { - return request({ - url: `/api/operate/step/${params.id}`, - method: 'put', - data: params - }); + return request({ + url: `/api/operate/step/${params.id}`, + method: 'put', + data: params + }); } /** * 修改操作步骤 */ export function deleteOperateStepData(id) { - return request({ - url: `/api/operate/step/${id}`, - method: 'delete' - }); + return request({ + url: `/api/operate/step/${id}`, + method: 'delete' + }); } /** * 批量生成操作列表 */ export function addTrainingRulesList(skinCode, data) { - return request({ - url: `/api/operate/${skinCode}/generate`, - method: 'post', - data: data - }); + return request({ + url: `/api/operate/${skinCode}/generate`, + method: 'post', + data: data + }); } /** * 获取操作占位列表 */ export function getPlaceholderList(data) { - return request({ - url: `/api/operate/placeholder`, - method: 'get', - params: { - trainingType: data.trainingType, - skinCode: data.skinCode - } - }); + return request({ + url: `/api/operate/placeholder`, + method: 'get', + params: { + trainingType: data.trainingType, + skinCode: data.skinCode + } + }); } /** * 获取产品下实训操作列表 */ export function getOperateTrainingList(data) { - return request({ - url: `/api/operate/type`, - method: 'get', - params: { - productType: data.productType, - skinCode: data.skinCode - } - }); + return request({ + url: `/api/operate/type`, + method: 'get', + params: { + productType: data.productType, + mapId: data.mapId + } + }); } // 另存为 操作定义 -export function postOperateSaveAs(skinCode, other) { - return request({ - url: `/api/operate/${skinCode}/saveAs/${other}`, - method: 'post' - }); +export function postOperateSaveAs(mapId, other) { + return request({ + url: `/api/operate/${mapId}/saveAs/${other}`, + method: 'post' + }); } diff --git a/src/api/runplan.js b/src/api/runplan.js index fbf4252cf..5f5ab6eb0 100644 --- a/src/api/runplan.js +++ b/src/api/runplan.js @@ -1,15 +1,5 @@ import request from '@/utils/request'; -/** - * 获取运行图列表 - */ -export function getRunPlanList() { - return request({ - url: '/api/runPlan/draft/tree', - method: 'get' - }); -} - /** * 获取地图速度等级列表 */ @@ -41,16 +31,6 @@ export function getStationList(mapId) { }); } -/** - * 通过皮肤获取运行图车站列表 - */ -export function getStationListBySkinCode(skinCode) { - return request({ - url: `/api/runPlan/draft/station/${skinCode}/bySkin`, - method: 'get' - }); -} - /** * 创建运行图 */ @@ -73,9 +53,9 @@ export function queryRunPlan(planId) { } // 根据skinCode查询发布运行图列表 -export function queryRunPlanList(skinCode) { +export function queryRunPlanList(mapId) { return request({ - url: `/api/runPlan/template/skin/${skinCode}`, + url: `/api/runPlan/template/${mapId}/list`, method: 'get' }); } @@ -411,7 +391,7 @@ export function postSchedulingCommonGenerate(mapId) { // 从加载计划创建每日计划 export function postRunPlanTemplate(data) { return request({ - url: `/api/runPlan/template/${data.id}/copyAs/${data.skinCode}?name=${data.name}`, + url: `/api/runPlan/template/${data.id}/copyAs/${data.mapId}?name=${data.name}`, method: 'post' }); } diff --git a/src/i18n/langs/en/lesson.js b/src/i18n/langs/en/lesson.js index 3a0b71073..ba2108a93 100644 --- a/src/i18n/langs/en/lesson.js +++ b/src/i18n/langs/en/lesson.js @@ -1,123 +1,124 @@ export default { - trainingList: 'Training list', - filterPlaceholder: 'Input key for filtering', - addTraining: 'Add training', - editTraining: 'Edit training', - demonstration: 'Demonstration', - hasCalcelDelete: 'Canceled deletion', - isConfirmDelete: 'Whether to confirm deletion?', - trainingName: 'Training Name', - trainingType: 'Training Type', - stationList: 'Station List', - stepInfo: 'Step Information', - selectMap: 'Please select the map', - selectTraining: 'Please select the training', - findStationPlaceholder: 'Input keywords to inquire station', - stepNo: 'Step No', - deviceNumber: 'Device Number', - deviceType: 'Device Type', - operationType: 'Operation Type', - returnValue: 'Return Value', - tips: 'Tips', - startRecording: 'Start Recording', - endRecording: 'End Recording', - nextStep: 'Next Step', - selectMode: 'Mode', - deleteSuccess: 'Delete successfully', - wellDelTrainingRule: 'This action will delete the training rule. Do you want to continue?', - stepDetail: 'Detail', - generation: 'Generation', - skinType: 'Skin Type', - saveAs: 'Save As', - skinTypeFrom: 'from', - skinTypeTo: 'to', - copyLesson: 'Duplicate course definition', - minDuration: 'The Best Available', - maxDuration: 'The Largest Available', - trainingRemark: 'Explain', - createOperateRule: 'Create Action Rules', - editOperateRule: 'Edit Action Rules', - tipNamePlaceholderInfo: "Select the placeholder '{}' not to be deleted, otherwise the name will display incorrectly!", - tipExplainPlaceholderInfo: "Select placeholder '{}' not to be deleted, otherwise the display will be problematic!", - generationOperation: 'Automatic Generation Operation', - wellClearOperate: 'This operation clears all operation definitions under the skin. Do you want to continue?', - batchCreateSuccess: 'Batch build operation definition successful', - createOperateSuccess: 'The operation definition was created successfully', - updateOperateSuccess: 'The update steps were successful', - wellDelOperate: 'This action will delete the training step. Do you want to continue?', - operateCode: 'Opcode', - stepReturn: 'Return Value', - stepTips: 'Tips', - createStepInfo: 'Create Step Information', - eidtStepInfo: 'Edit Step Information', - product: 'Product', - remarks: 'Remarks', - operateSuccess: 'Operation successfully', - createChapter: 'Create chapter', - contentSorting: 'Content sorting', - courseList: 'Course list', - countSkinCode: 'Duplicate skin cannot be the same type as the copied skin', - createNewCoursesFromRelease: 'Create new courses from release', - courseName: 'Course name', - parentChapter: 'Parent chapter:', - chapterName: 'Chapter name:', - chapterInstructions: 'Chapter instructions:', - associatedTraining: 'Associated training:', - updateChapter: 'Update chapter', - automaticOrManual: 'Auto/Manual', - automatic: 'Automatic', - manual: 'Manual', - publishCourseName: 'Publish course name:', - draftCourseName: 'Draft course name:', - associatedSkin: 'Associated skin:', - associatedProducts: 'Associated products:', - courseDescription: 'Course description', - editCourse: 'Edit course', - createCourse: 'Create course', - courseRelease: 'Course release', - releaseAssociatedCity: 'Release associated city:', - releaseAssociatedMap: 'Release associated map:', - trainingSequence: 'Training sequence', - creationTime: 'Creation time', - finishTime: 'Finish time', - createResults: 'Create results', - start: 'start', - toPerform: 'To perform', - productType: 'Product type:', - minTime: 'Minimum time:', - maxTime: 'Largest time:', - trainingDescription: 'Training description:', - generateTraining: 'Generate training', - updateTraining: 'Update training', - deleteTraining: 'Delete training', - automaticGenerationOfTraining: 'Automatic generation of training', - modifyTrainingByCategory: 'Modify training by category', - deleteAutoGeneratedTraining: 'Delete auto-generated training', - menu: 'Menu', - turnout: 'Turnout', - section: 'Section', - signaler: 'Signaler', - controlMode: 'Control mode', - platform: 'Platform', - train: 'Train', - station: 'Station', - trainWindow: 'Train window', - editStepInfo: 'Edit step information', - trainingRecord: 'Training recording', - lesson: 'Lesson', - taskManage: 'Task manage', - trainingRule: 'Training rule', - trainingManage: 'Training manage', - newConstruction: 'New', - applicationForRelease: 'Application for release', - rejectReason: 'Reason for rejection', - withdraw: 'Withdraw', - notRelease: 'Not release', - pendingReview: 'Pending review', - published: 'Published', - rejected: 'Rejected', - review: 'Review', - explanation: 'Explanation', - courseDetails: 'Course details', - courseTree: 'Course tree:' + trainingList: 'Training list', + filterPlaceholder: 'Input key for filtering', + addTraining: 'Add training', + editTraining: 'Edit training', + demonstration: 'Demonstration', + hasCalcelDelete: 'Canceled deletion', + isConfirmDelete: 'Whether to confirm deletion?', + trainingName: 'Training Name', + trainingType: 'Training Type', + stationList: 'Station List', + stepInfo: 'Step Information', + selectMap: 'Please select the map', + selectTraining: 'Please select the training', + findStationPlaceholder: 'Input keywords to inquire station', + stepNo: 'Step No', + deviceNumber: 'Device Number', + deviceType: 'Device Type', + operationType: 'Operation Type', + returnValue: 'Return Value', + tips: 'Tips', + startRecording: 'Start Recording', + endRecording: 'End Recording', + nextStep: 'Next Step', + selectMode: 'Mode', + deleteSuccess: 'Delete successfully', + wellDelTrainingRule: 'This action will delete the training rule. Do you want to continue?', + stepDetail: 'Detail', + generation: 'Generation', + skinType: 'Skin Type', + saveAs: 'Save As', + skinTypeFrom: 'from', + skinTypeTo: 'to', + copyLesson: 'Duplicate course definition', + minDuration: 'The Best Available', + maxDuration: 'The Largest Available', + trainingRemark: 'Explain', + createOperateRule: 'Create Action Rules', + editOperateRule: 'Edit Action Rules', + tipNamePlaceholderInfo: "Select the placeholder '{}' not to be deleted, otherwise the name will display incorrectly!", + tipExplainPlaceholderInfo: "Select placeholder '{}' not to be deleted, otherwise the display will be problematic!", + generationOperation: 'Automatic Generation Operation', + wellClearOperate: 'This operation clears all operation definitions under the skin. Do you want to continue?', + batchCreateSuccess: 'Batch build operation definition successful', + createOperateSuccess: 'The operation definition was created successfully', + updateOperateSuccess: 'The update steps were successful', + wellDelOperate: 'This action will delete the training step. Do you want to continue?', + operateCode: 'Opcode', + stepReturn: 'Return Value', + stepTips: 'Tips', + createStepInfo: 'Create Step Information', + eidtStepInfo: 'Edit Step Information', + product: 'Product', + remarks: 'Remarks', + operateSuccess: 'Operation successfully', + createChapter: 'Create chapter', + contentSorting: 'Content sorting', + courseList: 'Course list', + countSkinCode: 'Duplicate skin cannot be the same type as the copied skin', + createNewCoursesFromRelease: 'Create new courses from release', + courseName: 'Course name', + parentChapter: 'Parent chapter:', + chapterName: 'Chapter name:', + chapterInstructions: 'Chapter instructions:', + associatedTraining: 'Associated training:', + updateChapter: 'Update chapter', + automaticOrManual: 'Auto/Manual', + automatic: 'Automatic', + manual: 'Manual', + publishCourseName: 'Publish course name:', + draftCourseName: 'Draft course name:', + associatedSkin: 'Associated skin:', + associatedProducts: 'Associated products:', + courseDescription: 'Course description', + editCourse: 'Edit course', + createCourse: 'Create course', + courseRelease: 'Course release', + releaseAssociatedCity: 'Release associated city:', + releaseAssociatedMap: 'Release associated map:', + trainingSequence: 'Training sequence', + creationTime: 'Creation time', + finishTime: 'Finish time', + createResults: 'Create results', + start: 'start', + toPerform: 'To perform', + productType: 'Product type:', + minTime: 'Minimum time:', + maxTime: 'Largest time:', + trainingDescription: 'Training description:', + generateTraining: 'Generate training', + updateTraining: 'Update training', + deleteTraining: 'Delete training', + automaticGenerationOfTraining: 'Automatic generation of training', + modifyTrainingByCategory: 'Modify training by category', + deleteAutoGeneratedTraining: 'Delete auto-generated training', + menu: 'Menu', + turnout: 'Turnout', + section: 'Section', + signaler: 'Signaler', + controlMode: 'Control mode', + platform: 'Platform', + train: 'Train', + station: 'Station', + trainWindow: 'Train window', + editStepInfo: 'Edit step information', + trainingRecord: 'Training recording', + lesson: 'Lesson', + taskManage: 'Task manage', + trainingRule: 'Training rule', + trainingManage: 'Training manage', + newConstruction: 'New', + applicationForRelease: 'Application for release', + rejectReason: 'Reason for rejection', + withdraw: 'Withdraw', + notRelease: 'Not release', + pendingReview: 'Pending review', + published: 'Published', + rejected: 'Rejected', + review: 'Review', + explanation: 'Explanation', + courseDetails: 'Course details', + courseTree: 'Course tree:', + mapName:'Map Name' }; diff --git a/src/i18n/langs/zh/lesson.js b/src/i18n/langs/zh/lesson.js index 72ede12fb..6d5ed7d1f 100644 --- a/src/i18n/langs/zh/lesson.js +++ b/src/i18n/langs/zh/lesson.js @@ -1,123 +1,124 @@ export default { - trainingList: '实训列表', - filterPlaceholder: '输入关键字进行过滤', - addTraining: '添加实训', - editTraining: '修改实训', - demonstration: '演示', - hasCalcelDelete: '已取消删除', - isConfirmDelete: '是否确认删除?', - trainingName: '实训名称', - trainingType: '实训类型', - stationList: '车站列表', - stepInfo: '步骤信息', - selectMap: '请选择地图', - selectTraining: '请选择实训', - findStationPlaceholder: '输入关键字查询车站', - stepNo: '步骤序号', - deviceNumber: '设备编号', - deviceType: '设备类型', - operationType: '操作类型', - returnValue: '返回值', - tips: '提示语', - startRecording: '开始录制', - endRecording: '结束录制', - nextStep: '下一步', - selectMode: '模式选择', - deleteSuccess: '删除成功', - wellDelTrainingRule: '此操作将删除此实训规则, 是否继续?', - stepDetail: '步骤明细', - generation: '自动生成', - saveAs: '另存为', - skinTypeFrom: '从', - skinTypeTo: '到', - copyLesson: '复制课程定义', - skinType: '皮肤类型', - minDuration: '最佳用时', - maxDuration: '最大用时', - trainingRemark: '实训说明', - createOperateRule: '创建操作规则', - editOperateRule: '编辑操作规则', - tipNamePlaceholderInfo: '选择占位符 ‘{}’ 不可删除,否则名称显示会有问题!', - tipExplainPlaceholderInfo: '选择占位符 ‘{}’ 不可删除,否则说明显示会有问题!', - generationOperation: '自动生成操作', - wellClearOperate: '此操作将清空改皮肤下所有操作定义, 是否继续?', - batchCreateSuccess: '批量生成操作定义成功', - createOperateSuccess: '创建操作定义成功', - updateOperateSuccess: '更新操作步骤成功', - wellDelOperate: '此操作将删除此实训步骤, 是否继续?', - operateCode: '操作码', - stepReturn: '步骤返回值', - stepTips: '步骤提示信息', - createStepInfo: '创建步骤信息', - editStepInfo: '编辑步骤信息', - product: '产品', - remarks: '描述', - operateSuccess: '操作成功', - createChapter: '创建章节', - contentSorting: '内容排序', - courseList: '课程列表', - createNewCoursesFromRelease: '从发布课程新建', - courseName: '课程名称', - parentChapter: '父级章节:', - chapterName: '章节名称:', - chapterInstructions: '章节说明:', - associatedTraining: '关联实训:', - updateChapter: '更新章节', - automaticOrManual: '自动/人工', - automatic: '自动', - manual: '人工', - publishCourseName: '发布课程名称:', - draftCourseName: '草稿课程名称:', - associatedSkin: '关联皮肤:', - associatedProducts: '关联产品:', - courseDescription: '课程说明', - editCourse: '编辑课程', - createCourse: '创建课程', - courseRelease: '课程发布', - releaseAssociatedCity: '发布关联城市:', - releaseAssociatedMap: '发布关联地图:', - trainingSequence: '实训排序', - creationTime: '创建时间', - finishTime: '完成时间', - createResults: '创建结果', - start: '开始', - toPerform: '重新执行', - productType: '产品类型:', - minTime: '最小用时:', - maxTime: '最大用时:', - trainingDescription: '实训描述:', - generateTraining: '生成实训', - updateTraining: '修改实训', - deleteTraining: '删除实训', - automaticGenerationOfTraining: '自动生成实训', - modifyTrainingByCategory: '按类别修改实训', - deleteAutoGeneratedTraining: '删除自动生成实训', - menu: '菜单', - turnout: '道岔', - section: '区段', - signaler: '信号机', - controlMode: '控制模式', - platform: '站台', - train: '列车', - station: '车站', - trainWindow: '车次窗', - countSkinCode: '复制皮肤与被复制皮肤类型不能一样', - trainingRecord: '实训录制', - lesson: '课程', - taskManage: '任务管理', - trainingRule: '操作定义', - trainingManage: '实训管理', - newConstruction: '新建', - applicationForRelease: '申请发布', - rejectReason: '驳回原因', - withdraw: '撤销', - notRelease: '未发布', - pendingReview: '待审核', - published: '已发布', - rejected: '已驳回', - review: '查看', - explanation: '驳回说明', - courseDetails: '课程详情', - courseTree: '课程树:' + trainingList: '实训列表', + filterPlaceholder: '输入关键字进行过滤', + addTraining: '添加实训', + editTraining: '修改实训', + demonstration: '演示', + hasCalcelDelete: '已取消删除', + isConfirmDelete: '是否确认删除?', + trainingName: '实训名称', + trainingType: '实训类型', + stationList: '车站列表', + stepInfo: '步骤信息', + selectMap: '请选择地图', + selectTraining: '请选择实训', + findStationPlaceholder: '输入关键字查询车站', + stepNo: '步骤序号', + deviceNumber: '设备编号', + deviceType: '设备类型', + operationType: '操作类型', + returnValue: '返回值', + tips: '提示语', + startRecording: '开始录制', + endRecording: '结束录制', + nextStep: '下一步', + selectMode: '模式选择', + deleteSuccess: '删除成功', + wellDelTrainingRule: '此操作将删除此实训规则, 是否继续?', + stepDetail: '步骤明细', + generation: '自动生成', + saveAs: '另存为', + skinTypeFrom: '从', + skinTypeTo: '到', + copyLesson: '复制课程定义', + skinType: '皮肤类型', + minDuration: '最佳用时', + maxDuration: '最大用时', + trainingRemark: '实训说明', + createOperateRule: '创建操作规则', + editOperateRule: '编辑操作规则', + tipNamePlaceholderInfo: '选择占位符 ‘{}’ 不可删除,否则名称显示会有问题!', + tipExplainPlaceholderInfo: '选择占位符 ‘{}’ 不可删除,否则说明显示会有问题!', + generationOperation: '自动生成操作', + wellClearOperate: '此操作将清空改皮肤下所有操作定义, 是否继续?', + batchCreateSuccess: '批量生成操作定义成功', + createOperateSuccess: '创建操作定义成功', + updateOperateSuccess: '更新操作步骤成功', + wellDelOperate: '此操作将删除此实训步骤, 是否继续?', + operateCode: '操作码', + stepReturn: '步骤返回值', + stepTips: '步骤提示信息', + createStepInfo: '创建步骤信息', + editStepInfo: '编辑步骤信息', + product: '产品', + remarks: '描述', + operateSuccess: '操作成功', + createChapter: '创建章节', + contentSorting: '内容排序', + courseList: '课程列表', + createNewCoursesFromRelease: '从发布课程新建', + courseName: '课程名称', + parentChapter: '父级章节:', + chapterName: '章节名称:', + chapterInstructions: '章节说明:', + associatedTraining: '关联实训:', + updateChapter: '更新章节', + automaticOrManual: '自动/人工', + automatic: '自动', + manual: '人工', + publishCourseName: '发布课程名称:', + draftCourseName: '草稿课程名称:', + associatedSkin: '关联皮肤:', + associatedProducts: '关联产品:', + courseDescription: '课程说明', + editCourse: '编辑课程', + createCourse: '创建课程', + courseRelease: '课程发布', + releaseAssociatedCity: '发布关联城市:', + releaseAssociatedMap: '发布关联地图:', + trainingSequence: '实训排序', + creationTime: '创建时间', + finishTime: '完成时间', + createResults: '创建结果', + start: '开始', + toPerform: '重新执行', + productType: '产品类型:', + minTime: '最小用时:', + maxTime: '最大用时:', + trainingDescription: '实训描述:', + generateTraining: '生成实训', + updateTraining: '修改实训', + deleteTraining: '删除实训', + automaticGenerationOfTraining: '自动生成实训', + modifyTrainingByCategory: '按类别修改实训', + deleteAutoGeneratedTraining: '删除自动生成实训', + menu: '菜单', + turnout: '道岔', + section: '区段', + signaler: '信号机', + controlMode: '控制模式', + platform: '站台', + train: '列车', + station: '车站', + trainWindow: '车次窗', + countSkinCode: '复制皮肤与被复制皮肤类型不能一样', + trainingRecord: '实训录制', + lesson: '课程', + taskManage: '任务管理', + trainingRule: '操作定义', + trainingManage: '实训管理', + newConstruction: '新建', + applicationForRelease: '申请发布', + rejectReason: '驳回原因', + withdraw: '撤销', + notRelease: '未发布', + pendingReview: '待审核', + published: '已发布', + rejected: '已驳回', + review: '查看', + explanation: '驳回说明', + courseDetails: '课程详情', + courseTree: '课程树:', + mapName:'地图名称' }; diff --git a/src/jmap/theme/batong_01/menus/dialog/trainControl.vue b/src/jmap/theme/batong_01/menus/dialog/trainControl.vue index 14842059e..4337f3708 100644 --- a/src/jmap/theme/batong_01/menus/dialog/trainControl.vue +++ b/src/jmap/theme/batong_01/menus/dialog/trainControl.vue @@ -82,383 +82,375 @@ diff --git a/src/jmap/theme/batong_01/menus/dialog/trainCreate.vue b/src/jmap/theme/batong_01/menus/dialog/trainCreate.vue index 755bc5736..b21f55dc9 100644 --- a/src/jmap/theme/batong_01/menus/dialog/trainCreate.vue +++ b/src/jmap/theme/batong_01/menus/dialog/trainCreate.vue @@ -1,155 +1,160 @@ - - - - - - - - - - - - - - - - - - - - 确定 - 取 消 - - - - - + + + + + + + + + + 确定 + 取 消 + + + + + \ No newline at end of file +}; + diff --git a/src/jmap/theme/beijing_01/menus/dialog/trainCreate.vue b/src/jmap/theme/beijing_01/menus/dialog/trainCreate.vue index 8d1c70e2d..c201c17f7 100644 --- a/src/jmap/theme/beijing_01/menus/dialog/trainCreate.vue +++ b/src/jmap/theme/beijing_01/menus/dialog/trainCreate.vue @@ -1,151 +1,155 @@ - - - - - - - - - - - - - - - - - - 确定 - 取 消 - - - - - + + + + + + + + + + + + + + + + + 确定 + 取 消 + + + + + \ No newline at end of file +}; + diff --git a/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue b/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue index f9b4ff067..f43d889ec 100644 --- a/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue +++ b/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue @@ -19,127 +19,128 @@ diff --git a/src/views/demonstration/list/demonList.vue b/src/views/demonstration/list/demonList.vue index 58c9f016b..c60d45d40 100644 --- a/src/views/demonstration/list/demonList.vue +++ b/src/views/demonstration/list/demonList.vue @@ -21,7 +21,7 @@ + /> {{ tnode.label }} @@ -35,94 +35,94 @@ import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/ut import FilterCity from '@/views/components/filterCity'; export default { - name: 'ExamDetailList', - components: { - FilterCity - }, - props: { - height: { - type: Number, - required: true - } - }, - data() { - return { - loading: true, - defaultShowKeys: [], - queryFunction: getPublishMapTree, - filterText: '', - treeData: [], - treeList: [], - selected: {}, - defaultProps: { - children: 'children', - label: 'name' - }, - node: { - } - }; - }, - computed: { - role() { - return this.$store.state.user.roles.includes('04') || + name: 'ExamDetailList', + components: { + FilterCity + }, + props: { + height: { + type: Number, + required: true + } + }, + data() { + return { + loading: true, + defaultShowKeys: [], + queryFunction: getPublishMapTree, + filterText: '', + treeData: [], + treeList: [], + selected: {}, + defaultProps: { + children: 'children', + label: 'name' + }, + node: { + } + }; + }, + computed: { + role() { + return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05') || this.$store.state.user.roles.includes('01'); - } - }, - watch: { - filterText(val) { - this.treeList = this.treeData.filter((res) => { - return res.name.includes(val); - }); - } - }, - beforeDestroy () { - removeSessionStorage('demonList'); - }, - methods: { - filterNode(value, data) { - if (!value) return true; - return data.name.indexOf(value) !== -1; - }, - showContextMenu(e, obj, node, vueElem) { - if (obj) { - this.node = node; - this.selected = obj; - } - }, - clickEvent(obj, data, ele) { - if (obj.type == 'Map') { - setSessionStorage('demonList', obj.id); - this.$router.push({ path: `${UrlConfig.demonstration.detail}/${obj.id}` }); - } - }, - async refresh(filterSelect) { - this.loading = true; - this.treeData = this.treeList = []; - try { - const res = await getPublishMapTree(filterSelect); - this.treeData = res.data; - this.treeList = this.filterText - ? res.data.filter(elem => { return elem.name.includes(this.filterText); }) - : res.data; + } + }, + watch: { + filterText(val) { + this.treeList = this.treeData.filter((res) => { + return res.name.includes(val); + }); + } + }, + beforeDestroy () { + removeSessionStorage('demonList'); + }, + methods: { + filterNode(value, data) { + if (!value) return true; + return data.name.indexOf(value) !== -1; + }, + showContextMenu(e, obj, node, vueElem) { + if (obj) { + this.node = node; + this.selected = obj; + } + }, + clickEvent(obj, data, ele) { + if (obj.type == 'Map') { + setSessionStorage('demonList', obj.id); + this.$router.push({ path: `${UrlConfig.demonstration.detail}/${obj.id}` }); + } + }, + async refresh(filterSelect) { + this.loading = true; + this.treeData = this.treeList = []; + try { + const res = await getPublishMapTree(filterSelect); + this.treeData = res.data; + this.treeList = this.filterText + ? res.data.filter(elem => { return elem.name.includes(this.filterText); }) + : res.data; - if (this.treeData.length > 0) { - this.treeData.forEach(v => { - v.children = []; - }); + if (this.treeData.length > 0) { + this.treeData.forEach(v => { + v.children = []; + }); - } - this.$nextTick(() => { - const mapId = getSessionStorage('demonList') || null; - this.$refs.tree.setCurrentKey(mapId); - this.loading = false; - }); - } catch (error) { - this.loading = false; - this.$messageBox(this.$t('error.refreshFailed')); - } - } - } + } + this.$nextTick(() => { + const mapId = getSessionStorage('demonList') || null; + this.$refs.tree.setCurrentKey(mapId); + this.loading = false; + }); + } catch (error) { + this.loading = false; + this.$messageBox(this.$t('error.refreshFailed')); + } + } + } }; diff --git a/src/views/jointTraining/index.vue b/src/views/jointTraining/index.vue index 81fee4a96..8d8a2aef2 100644 --- a/src/views/jointTraining/index.vue +++ b/src/views/jointTraining/index.vue @@ -37,7 +37,7 @@ import IbpPlate from '@/views/ibp/index'; import { mapGetters } from 'vuex'; import { OperateMode, TrainingMode } from '@/scripts/ConstDic'; import { checkLoginLine } from '@/api/login'; -import { loadMapData } from '@/utils/loaddata'; +import { loadMapDataById } from '@/utils/loaddata'; import { getUserRoles, deljointTrainRoom } from '@/api/chat'; import { runDiagramOver, getSimulationInfo } from '@/api/simulation'; import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive'; @@ -46,345 +46,345 @@ import ibpData from '@/ibp/constant/ibpData'; import { Message } from 'element-ui'; export default { - name: 'JointTrainingDraft', - components: { - MapSystemDraft, - MenuDemonJoint, - MenuDemonSchema, - JoinFaultChoose, - JoinRunPlanLoad, - JoinRunPlanView, - menuSystemTime, - Jl3dDrive, - IbpPlate - }, - data() { - return { - trainingObj: {}, - checkLine: null, - timeDemonNum: 0, - offset: 10, - mouseNum: 1, - ierval: null, - mouseNumTime: 0, - mapBox: null, - mapBoxP: null, - userRole: '', - deviceCode: '', - group: '', - mapId: '', - skinCode: '', - simulationShow: false, - drivingShow: false, - ibpShow: false, - panelShow: true, - ibpPart: '' - }; - }, - computed: { - ...mapGetters([ - 'canvasWidth', - 'canvasHeight' - ]), - ...mapGetters('map', [ - 'map' - ]), - ...mapGetters('training', [ - 'offsetStationCode' - ]), - ...mapGetters('config', [ - 'canvasId' - ]), - width() { - return this.$store.state.app.width; - }, - height() { - return this.$store.state.app.height; - }, - right() { - return this.$store.state.config.width / 2 - 55; - } - }, - watch: { - '$store.state.config.menuBarLoadedCount': function (val) { - this.setPosition(); - }, - '$store.state.map.mapViewLoadedCount': function (val) { - this.mapBoxP = document.getElementById(this.canvasId).children[0]; - this.mapBox = document.getElementsByTagName('canvas'); - }, - '$store.state.socket.permissionOver': function () { - this.$alert(this.$t('tip.userRightsHaveBeenReclaimed'), this.$t('tip.hint'), { - confirmButtonText: this.$t('global.confirm'), - showClose: false, - callback: async (action) => { - await this.$store.dispatch('training/over'); - await runDiagramOver(this.group); - await deljointTrainRoom(this.group); - await this.$router.push({ path: `/trainingPlatform/detail/${this.subSystem}`, query: {mapId: this.mapId} }); - } - }); - }, - '$store.state.socket.jointRoomInfo': function (val) { // 综合演练房间信息 - if (val.creatorId) { - this.handleRoomInfo(val); - } - }, - '$store.state.socket.chatContentList': function (val) { // 综合演练被踢出房间 - if (val.type === 'userRoomKickOut'&&val.oneself) { - this.$router.push({ path: `/` }); - this.messageInfo(this.$t('tip.beKickedOut'), 'warning'); - } - }, - '$store.state.app.windowSizeCount': function() { - this.setWindowSize(); - }, - $route() { - this.$nextTick(() => { - this.initLoadData(); - }); - } - }, - async created() { - this.group = this.$route.query.group; - this.mapId = this.$route.query.mapId; - this.skinCode = this.$route.query.skinCode; - this.subSystem = this.$route.query.subSystem; - Message.closeAll(); - }, - async mounted() { - await this.setWindowSize(); - await this.initLoadData(); - }, - async beforeDestroy() { - await this.clearAllTimer(); - await this.$store.dispatch('training/end', null); - await this.$store.dispatch('training/reset'); - await this.$store.dispatch('map/mapClear'); - await this.$store.dispatch('training/setGroup', ''); - Message.closeAll(); - }, - methods: { - mousemove(e) { - this.mouseNum = 1; - }, - handleRoomInfo(data) { - if (data.state == '03') { // 退出房间 - this.$router.push({ path: `/` }); - // this.clearSubscribe(); - } else if (data.state == '01') { // 进入准备中 - const query = { group: this.group }; - this.$router.push({ path: `/trainroom`, query: query }); - // this.clearSubscribe(); - } - this.$store.dispatch('socket/setJointRoomInfo'); // 清空房间信息 - }, - // 清除检查在线定时器 - clearAllTimer() { - if (this.ierval) { - clearTimeout(this.ierval); - this.ierval = null; - } + name: 'JointTrainingDraft', + components: { + MapSystemDraft, + MenuDemonJoint, + MenuDemonSchema, + JoinFaultChoose, + JoinRunPlanLoad, + JoinRunPlanView, + menuSystemTime, + Jl3dDrive, + IbpPlate + }, + data() { + return { + trainingObj: {}, + checkLine: null, + timeDemonNum: 0, + offset: 10, + mouseNum: 1, + ierval: null, + mouseNumTime: 0, + mapBox: null, + mapBoxP: null, + userRole: '', + deviceCode: '', + group: '', + mapId: '', + skinCode: '', + simulationShow: false, + drivingShow: false, + ibpShow: false, + panelShow: true, + ibpPart: '' + }; + }, + computed: { + ...mapGetters([ + 'canvasWidth', + 'canvasHeight' + ]), + ...mapGetters('map', [ + 'map' + ]), + ...mapGetters('training', [ + 'offsetStationCode' + ]), + ...mapGetters('config', [ + 'canvasId' + ]), + width() { + return this.$store.state.app.width; + }, + height() { + return this.$store.state.app.height; + }, + right() { + return this.$store.state.config.width / 2 - 55; + } + }, + watch: { + '$store.state.config.menuBarLoadedCount': function (val) { + this.setPosition(); + }, + '$store.state.map.mapViewLoadedCount': function (val) { + this.mapBoxP = document.getElementById(this.canvasId).children[0]; + this.mapBox = document.getElementsByTagName('canvas'); + }, + '$store.state.socket.permissionOver': function () { + this.$alert(this.$t('tip.userRightsHaveBeenReclaimed'), this.$t('tip.hint'), { + confirmButtonText: this.$t('global.confirm'), + showClose: false, + callback: async (action) => { + await this.$store.dispatch('training/over'); + await runDiagramOver(this.group); + await deljointTrainRoom(this.group); + await this.$router.push({ path: `/trainingPlatform/detail/${this.subSystem}`, query: {mapId: this.mapId} }); + } + }); + }, + '$store.state.socket.jointRoomInfo': function (val) { // 综合演练房间信息 + if (val.creatorId) { + this.handleRoomInfo(val); + } + }, + '$store.state.socket.chatContentList': function (val) { // 综合演练被踢出房间 + if (val.type === 'userRoomKickOut' && val.oneself) { + this.$router.push({ path: `/` }); + this.messageInfo(this.$t('tip.beKickedOut'), 'warning'); + } + }, + '$store.state.app.windowSizeCount': function() { + this.setWindowSize(); + }, + $route() { + this.$nextTick(() => { + this.initLoadData(); + }); + } + }, + async created() { + this.group = this.$route.query.group; + this.mapId = this.$route.query.mapId; + this.skinCode = this.$route.query.skinCode; + this.subSystem = this.$route.query.subSystem; + Message.closeAll(); + }, + async mounted() { + await this.setWindowSize(); + await this.initLoadData(); + }, + async beforeDestroy() { + await this.clearAllTimer(); + await this.$store.dispatch('training/end', null); + await this.$store.dispatch('training/reset'); + await this.$store.dispatch('map/mapClear'); + await this.$store.dispatch('training/setGroup', ''); + Message.closeAll(); + }, + methods: { + mousemove(e) { + this.mouseNum = 1; + }, + handleRoomInfo(data) { + if (data.state == '03') { // 退出房间 + this.$router.push({ path: `/` }); + // this.clearSubscribe(); + } else if (data.state == '01') { // 进入准备中 + const query = { group: this.group }; + this.$router.push({ path: `/trainroom`, query: query }); + // this.clearSubscribe(); + } + this.$store.dispatch('socket/setJointRoomInfo'); // 清空房间信息 + }, + // 清除检查在线定时器 + clearAllTimer() { + if (this.ierval) { + clearTimeout(this.ierval); + this.ierval = null; + } - if (this.checkLine) { - clearTimeout(this.checkLine); - this.checkLine = null; - } - }, - // 设置检查在线定时器 - checkLoginLineTimer() { - if (this.checkLine) { - clearTimeout(this.checkLine); - } + if (this.checkLine) { + clearTimeout(this.checkLine); + this.checkLine = null; + } + }, + // 设置检查在线定时器 + checkLoginLineTimer() { + if (this.checkLine) { + clearTimeout(this.checkLine); + } - this.checkLine = setInterval(() => { - checkLoginLine(); - }, 5000 * 60); - }, - // 设置手标显示状态 - checkMouseStatusTimer() { - if (this.ierval) { - clearTimeout(this.ierval); - } + this.checkLine = setInterval(() => { + checkLoginLine(); + }, 5000 * 60); + }, + // 设置手标显示状态 + checkMouseStatusTimer() { + if (this.ierval) { + clearTimeout(this.ierval); + } - this.ierval = setInterval(() => { - if (this.mouseNum) { - this.mouseNum = 0; - this.mouseNumTime = 0; - } else { - this.mouseNumTime += 1; - } - if (this.mapBox) { - if (this.mouseNumTime >= 15) { - for (let i = 0; i < this.mapBox.length; i++) { - this.mapBox[i].style.cursor = 'none'; - } - } else { - for (let i = 0; i < this.mapBox.length; i++) { - this.mapBox[i].style.cursor = ''; - } - } - } - }, 1000); - }, - // 设置菜单和工具栏位置 - setPosition() { - this.$nextTick(() => { - let offset = 10; - const menuBar = document.getElementById('menuBar'); - const menuTool = document.getElementById('menuTool'); + this.ierval = setInterval(() => { + if (this.mouseNum) { + this.mouseNum = 0; + this.mouseNumTime = 0; + } else { + this.mouseNumTime += 1; + } + if (this.mapBox) { + if (this.mouseNumTime >= 15) { + for (let i = 0; i < this.mapBox.length; i++) { + this.mapBox[i].style.cursor = 'none'; + } + } else { + for (let i = 0; i < this.mapBox.length; i++) { + this.mapBox[i].style.cursor = ''; + } + } + } + }, 1000); + }, + // 设置菜单和工具栏位置 + setPosition() { + this.$nextTick(() => { + let offset = 10; + const menuBar = document.getElementById('menuBar'); + const menuTool = document.getElementById('menuTool'); - if (menuBar) { - offset += (menuBar.offsetHeight || 0); - } + if (menuBar) { + offset += (menuBar.offsetHeight || 0); + } - if (menuTool) { - offset += (menuTool.offsetHeight || 0); - } + if (menuTool) { + offset += (menuTool.offsetHeight || 0); + } - if (this.offset != offset) { - this.offset = offset; - } - }); - }, - // 结束加载状态 - endViewLoading(isSuccess) { - if (!isSuccess) { - this.$store.dispatch('map/mapClear'); - } + if (this.offset != offset) { + this.offset = offset; + } + }); + }, + // 结束加载状态 + endViewLoading(isSuccess) { + if (!isSuccess) { + this.$store.dispatch('map/mapClear'); + } - this.$nextTick(() => { - EventBus.$emit('viewLoading', false); - }); - }, - // 加载地图数据 - initLoadData() { - const width = document.documentElement.clientWidth; - const height = document.documentElement.clientHeight + 200; - this.$store.dispatch('config/resize', { width, height }); + this.$nextTick(() => { + EventBus.$emit('viewLoading', false); + }); + }, + // 加载地图数据 + initLoadData() { + const width = document.documentElement.clientWidth; + const height = document.documentElement.clientHeight + 200; + this.$store.dispatch('config/resize', { width, height }); - try { - this.loadSimulationInfo(); - this.initLoadDemonData(); - this.checkLoginLineTimer(); - this.checkMouseStatusTimer(); - } catch (error) { - this.$messageBox( this.$t('error.initializationFailed') + error.message); - this.endViewLoading(); - } - }, - async loadSimulationInfo() { - const resp = await getSimulationInfo(this.group); - if (resp && resp.code == 200) { - this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); - this.questId = Number(resp.data.questId) || 0; - } - }, - async getUserRole() { - const res = await getUserRoles(this.group); - this.userRole = res.data.userRole; - this.deviceCode = res.data.deviceCode; - this.ibpPart = res.data.ibpPart; - if (this.userRole === 'IBP') { - this.showIbp(this.deviceCode); - } else { - this.hideIbp(); - } - return res; - }, - // 仿真系统 - async initLoadDemonData() { - this.$store.dispatch('training/end', TrainingMode.NORMAL); - this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式 + try { + this.loadSimulationInfo(); + this.initLoadDemonData(); + this.checkLoginLineTimer(); + this.checkMouseStatusTimer(); + } catch (error) { + this.$messageBox( this.$t('error.initializationFailed') + error.message); + this.endViewLoading(); + } + }, + async loadSimulationInfo() { + const resp = await getSimulationInfo(this.group); + if (resp && resp.code == 200) { + this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); + this.questId = Number(resp.data.questId) || 0; + } + }, + async getUserRole() { + const res = await getUserRoles(this.group); + this.userRole = res.data.userRole; + this.deviceCode = res.data.deviceCode; + this.ibpPart = res.data.ibpPart; + if (this.userRole === 'IBP') { + this.showIbp(this.deviceCode); + } else { + this.hideIbp(); + } + return res; + }, + // 仿真系统 + async initLoadDemonData() { + this.$store.dispatch('training/end', TrainingMode.NORMAL); + this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式 - if (this.skinCode) { - // 01 现地 02 行调 '' 观众 - const resp = await this.getUserRole(); - if (resp && resp.code == 200) { - // Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 Repair 通号 IBP:IBP盘 - this.userRole = resp.data.userRole; - switch (this.userRole) { - case 'Admin': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Admin'); this.hideIbp(); break; - case 'Instructor': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Instructor'); this.hideIbp(); break; - case 'Dispatcher': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Dispatcher'); this.hideIbp(); break; - case 'Attendant': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'Attendant'); this.hideIbp(); break; - case 'Audience': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Audience'); this.hideIbp(); break; - case 'Driver': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Driver'); this.hideIbp(); break; - case 'Repair': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Repair'); this.hideIbp(); break; - case 'IBP': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'IBP'); this.showIbp(resp.data.deviceCode); break; - case 'BigScreen': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'BigScreen'); this.hideIbp(); break; - } - } - await this.getTrainDetail(this.skinCode); - } else { - this.endViewLoading(); - } - }, - async getTrainDetail(skinCode) { - try { - await loadMapData(skinCode); - await this.$store.dispatch('training/setMapDefaultState'); - } catch (error) { - this.$messageBox(this.$t('error.getMapDataFailed')); - this.endViewLoading(); - } - }, - back() { - this.$refs.demonMenu.back(); - }, - runPlanViewShow() { - this.$refs.runPlanView.doShow(); - }, - runPlanLoadShow() { - this.$refs.runPlanLoad.doShow(); - }, - faultChooseShow() { - this.$refs.faultChoose.doShow(); - }, - showdriving() { - this.panelShow = true; - this.drivingShow = false; - this.ibpShow =false; - }, - showIbp(deviceCode) { - this.drivingShow = false; - this.panelShow = false; - this.ibpShow = true; - if (!deviceCode || !ibpData[deviceCode]) { - Message.warning({message: this.$t('error.ibpNoDraw'), duration: 0, showClose: true, type: 'error'}); - return; - } else { - Message.closeAll(); - } - this.$refs.ibpPlate.show(deviceCode, this.ibpPart); - }, - hidepanel() { - this.panelShow = false; - this.drivingShow = true; - this.ibpShow = false; - this.$refs.Jl3dDrive.show(this.skinCode); - }, - hideIbp() { - Message.closeAll(); - this.drivingShow = false; - this.panelShow = true; - this.ibpShow = false; - this.$refs.ibpPlate.ibpDestroy(); - }, - messageInfo(message, type) { - this.$message({ - showClose: true, - message: message, - type: type - }); - }, - setWindowSize() { - this.$nextTick(() => { - this.$store.dispatch('config/resize', { width: this.width, height: this.height }); - this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode }); - }); - } - } + if (this.skinCode) { + // 01 现地 02 行调 '' 观众 + const resp = await this.getUserRole(); + if (resp && resp.code == 200) { + // Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 Repair 通号 IBP:IBP盘 + this.userRole = resp.data.userRole; + switch (this.userRole) { + case 'Admin': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Admin'); this.hideIbp(); break; + case 'Instructor': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Instructor'); this.hideIbp(); break; + case 'Dispatcher': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Dispatcher'); this.hideIbp(); break; + case 'Attendant': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'Attendant'); this.hideIbp(); break; + case 'Audience': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Audience'); this.hideIbp(); break; + case 'Driver': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Driver'); this.hideIbp(); break; + case 'Repair': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Repair'); this.hideIbp(); break; + case 'IBP': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'IBP'); this.showIbp(resp.data.deviceCode); break; + case 'BigScreen': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'BigScreen'); this.hideIbp(); break; + } + } + await this.getTrainDetail(); + } else { + this.endViewLoading(); + } + }, + async getTrainDetail() { + try { + await loadMapDataById(this.mapId); + await this.$store.dispatch('training/setMapDefaultState'); + } catch (error) { + this.$messageBox(this.$t('error.getMapDataFailed')); + this.endViewLoading(); + } + }, + back() { + this.$refs.demonMenu.back(); + }, + runPlanViewShow() { + this.$refs.runPlanView.doShow(); + }, + runPlanLoadShow() { + this.$refs.runPlanLoad.doShow(); + }, + faultChooseShow() { + this.$refs.faultChoose.doShow(); + }, + showdriving() { + this.panelShow = true; + this.drivingShow = false; + this.ibpShow = false; + }, + showIbp(deviceCode) { + this.drivingShow = false; + this.panelShow = false; + this.ibpShow = true; + if (!deviceCode || !ibpData[deviceCode]) { + Message.warning({message: this.$t('error.ibpNoDraw'), duration: 0, showClose: true, type: 'error'}); + return; + } else { + Message.closeAll(); + } + this.$refs.ibpPlate.show(deviceCode, this.ibpPart); + }, + hidepanel() { + this.panelShow = false; + this.drivingShow = true; + this.ibpShow = false; + this.$refs.Jl3dDrive.show(this.skinCode); + }, + hideIbp() { + Message.closeAll(); + this.drivingShow = false; + this.panelShow = true; + this.ibpShow = false; + this.$refs.ibpPlate.ibpDestroy(); + }, + messageInfo(message, type) { + this.$message({ + showClose: true, + message: message, + type: type + }); + }, + setWindowSize() { + this.$nextTick(() => { + this.$store.dispatch('config/resize', { width: this.width, height: this.height }); + this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode }); + }); + } + } }; diff --git a/src/views/map/runplan/index.vue b/src/views/map/runplan/index.vue deleted file mode 100644 index 90b13c422..000000000 --- a/src/views/map/runplan/index.vue +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/package/draft/editRule.vue b/src/views/package/draft/editRule.vue index 8db0fc8f2..6742d8a69 100644 --- a/src/views/package/draft/editRule.vue +++ b/src/views/package/draft/editRule.vue @@ -10,7 +10,6 @@ diff --git a/src/views/package/draft/ruleForm.vue b/src/views/package/draft/ruleForm.vue index 2aef00498..c210cdbf2 100644 --- a/src/views/package/draft/ruleForm.vue +++ b/src/views/package/draft/ruleForm.vue @@ -70,7 +70,7 @@