diff --git a/src/api/designPlatform.js b/src/api/designPlatform.js index 5aa8a2e89..ac86826f4 100644 --- a/src/api/designPlatform.js +++ b/src/api/designPlatform.js @@ -82,13 +82,13 @@ export function rejectedLessonRelease(data, id) { }); } -// /** 普通用户申请课程发布和撤销申请 */ -// export function releaseOrCancel(id, status) { -// return request({ -// url: `/api/review/lesson/releaseOrCancel/${id}/${status}`, -// method: 'get' -// }); -// } +/** 普通用户申请课程发布和撤销申请 */ +export function releaseOrCancel(id, status) { + return request({ + url: `/api/review/lesson/releaseOrCancel/${id}/${status}`, + method: 'get' + }); +} /** 管理员获取需审核的剧本列表 ok */ export function reviewScriptList(params) { diff --git a/src/api/jmap/lesson.js b/src/api/jmap/lesson.js index fbb3187b4..dcb7a1f23 100644 --- a/src/api/jmap/lesson.js +++ b/src/api/jmap/lesson.js @@ -8,11 +8,10 @@ export function getPublishLessonList() { }); } /** 获取发布列表树*/ -export function getPublishLessonTree(params) { +export function getPublishLessonTree(id) { return request({ - url: '/api/lesson/tree', - method: 'get', - params: params || {} + url: `/api/lesson/${id}/tree`, + method: 'get' }); } diff --git a/src/api/jmap/lessondraft.js b/src/api/jmap/lessondraft.js index e78d816f8..23b7c3322 100644 --- a/src/api/jmap/lessondraft.js +++ b/src/api/jmap/lessondraft.js @@ -102,3 +102,11 @@ export function getLessonNameByMapIdAndLessonId(model) { method: 'get' }); } + +export function getLessonDrftList(params) { + return request({ + url: `/api/lessonDraft`, + method: 'get', + params: params + }); +} diff --git a/src/api/management/exam.js b/src/api/management/exam.js index 93f5a801b..b22839e9d 100644 --- a/src/api/management/exam.js +++ b/src/api/management/exam.js @@ -1,14 +1,5 @@ import request from '@/utils/request'; -/** 获取考试列表树*/ -export function getCourseLessonTree(params) { - return request({ - url: '/api/exam/tree', - method: 'get', - params: params - }); -} - /** 创建对应课程考题 */ export function setCourseList(data) { return request({ diff --git a/src/api/trainingPlatform.js b/src/api/trainingPlatform.js index d3cde2894..1dd8282b3 100644 --- a/src/api/trainingPlatform.js +++ b/src/api/trainingPlatform.js @@ -1,10 +1,11 @@ import request from '@/utils/request'; -export function getTrainingSystemList(cityCode) { +export function getTrainingSystemList(cityCode, params) { /** 根据cityCode后去对应地图及其子系统 */ return request({ url: `/api/mapSystem/city/${cityCode}`, - method: 'get' + method: 'get', + params }); } @@ -57,3 +58,30 @@ export function getMapSystemPageList(params) { params }); } + +export function createMapSubSystem(data) { + /** 创建地图系统 */ + return request({ + url: `/api/mapSystem`, + method: 'post', + data: data + }); +} + +export function updateSubSystem(id, data) { + /** 查询子系统信息 */ + return request({ + url: `/api/mapSystem/${id}`, + method: 'put', + data: data + }); +} + +export function deleteSubSystem(id) { + /** 删除地图系统 */ + return request({ + url: `/api/mapSystem/${id}`, + method: 'delete' + }); +} + diff --git a/src/components/QueryListPage/QueryListPage.vue b/src/components/QueryListPage/QueryListPage.vue index c0e6daf79..74dcf9d36 100644 --- a/src/components/QueryListPage/QueryListPage.vue +++ b/src/components/QueryListPage/QueryListPage.vue @@ -454,9 +454,9 @@ export default { return this.choose; }, refresh(flag) { - if (flag){ - this.commitQuery(); - } + if (flag) { + this.commitQuery(); + } this.queryList.data = [...this.queryList.data]; } } diff --git a/src/i18n/langs/en/scriptRecord.js b/src/i18n/langs/en/scriptRecord.js index cb2897a0e..165e3dd22 100644 --- a/src/i18n/langs/en/scriptRecord.js +++ b/src/i18n/langs/en/scriptRecord.js @@ -4,7 +4,7 @@ export default { saveData: 'Save Data', mapList: 'Map List', createScript: 'Create Script', - modifyScript: 'Modify Script', + modifyScript: 'Modify Script', scriptName: 'Script Name', addScript: 'Add Script', map: 'Map', @@ -16,7 +16,7 @@ export default { createScriptFail: 'Create script failure', scriptDetail: 'Script Detail', scriptRecord: 'Edit', - scriptCreate: 'Create', + scriptCreate: 'Create', scriptModify: 'Modify', scriptDelete: 'Delete', getScriptFail: 'Get script information failure', @@ -83,14 +83,14 @@ export default { scriptBack: 'Back', speakTo: 'to', executeCommandTips: 'execute command: ', - operate: 'Operate', - scriptList: 'Script List', - applyPublish: 'Apply for release', - preview: 'Preview', - status: 'Status', - applyRevoke: 'Revoke', - publish: 'Publish', - revokeReason: 'Revoke explanation', + operate: 'Operate', + scriptList: 'Script List', + applyPublish: 'Apply for release', + preview: 'Preview', + status: 'Status', + applyRevoke: 'Revoke', + publish: 'Publish', + revokeReason: 'Revoke explanation', language: 'language', chinese: 'Chinese Simplified', english: 'English', @@ -100,5 +100,8 @@ export default { publishScriptSuccess: 'Publish Script Success', publishScriptFailed: 'Publish Script Failed', releaseScriptTip: 'This action will apply to release script, whether to continue?', - revokeScriptTip: 'This action will undo release script, whether to continue?' + revokeScriptTip: 'This action will undo release script, whether to continue?', + inputScriptName: 'Please input script name', + selectMap: 'Please select map', + inputScriptDescription: 'Please input script description' }; diff --git a/src/i18n/langs/en/systemGenerate.js b/src/i18n/langs/en/systemGenerate.js index cd34967aa..c47b10e42 100644 --- a/src/i18n/langs/en/systemGenerate.js +++ b/src/i18n/langs/en/systemGenerate.js @@ -5,5 +5,26 @@ export default { name: 'Name', type: 'Type', updateData: 'Modify', - generate: 'Generate' + generate: 'Generate', + selectMap: 'Please select map', + generateSuccess: 'The subsystem under the map is generated successfully!', + generateFail: 'The subsystem under the map failed to generate!', + inputName: 'Please input subsystem name', + selectType: 'Please select type', + selectPrdName: 'Please select product name', + createSubSystem: 'Commission SubSystem', + modifySubSystem: 'Modify SubSystem', + commission: 'Commission', + customized: 'Project', + selectProject: 'Please select project', + createMapSystemSuccess: 'Create map system success', + createMapSystemFail: 'Create map system failed', + getSubSystemInfoFail: 'Get subsystem infomation failed', + updateMapSystemSuccess: 'Update map system success', + updateMapSystemFail: 'Update map system failed', + generation: 'One-click Generation', + deleteData: 'Delete', + deleteMapSystemSuccess: 'Delete map system success', + deleteMapSystemFail: 'Delete map system fail', + deleteMapSystemTip: 'This action will apply to delete map system, whether to continue?' }; diff --git a/src/i18n/langs/zh/scriptRecord.js b/src/i18n/langs/zh/scriptRecord.js index e8a19d453..5f93c5a3e 100644 --- a/src/i18n/langs/zh/scriptRecord.js +++ b/src/i18n/langs/zh/scriptRecord.js @@ -84,14 +84,14 @@ export default { scriptBack: '返回', speakTo: '对', executeCommandTips: '执行指令: ', - operate: '操作', - scriptList: '剧本列表', - applyPublish: '申请发布', - preview: '预览', - status: '状态', - applyRevoke: '撤回', - publish: '发布', - revokeReason: '驳回原因', + operate: '操作', + scriptList: '剧本列表', + applyPublish: '申请发布', + preview: '预览', + status: '状态', + applyRevoke: '撤回', + publish: '发布', + revokeReason: '驳回原因', language: '语言', chinese: '中文', english: '英文', @@ -101,5 +101,8 @@ export default { publishScriptSuccess: '发布成功', publishScriptFailed: '发布失败', releaseScriptTip: '此操作将申请发布剧本, 是否继续?', - revokeScriptTip: '此操作将撤销发布剧本申请, 是否继续?' + revokeScriptTip: '此操作将撤销发布剧本申请, 是否继续?', + inputScriptName: '请输入剧本', + selectMap: '请选择地图', + inputScriptDescription: '请输入剧本描述' }; diff --git a/src/i18n/langs/zh/systemGenerate.js b/src/i18n/langs/zh/systemGenerate.js index 158981019..059145485 100644 --- a/src/i18n/langs/zh/systemGenerate.js +++ b/src/i18n/langs/zh/systemGenerate.js @@ -5,5 +5,27 @@ export default { name: '名称', type: '类型', updateData: '更新', - generate: '生成' + generate: '生成', + selectMap: '请选择地图', + generateSuccess: '生成该地图下子系统成功!', + generateFail: '生成该地图下子系统失败!', + inputName: '请输入子系统名称', + selectType: '请选择类型', + selectPrdName: '请选择产品名称', + createSubSystem: '定制子系统', + modifySubSystem: '修改子系统', + commission: '定制', + customized: '项目', + selectProject: '请选择项目', + createMapSystemSuccess: '创建地图系统成功', + createMapSystemFail: '创建地图系统失败', + getSubSystemInfoFail: '获取子系统信息失败', + updateMapSystemSuccess: '更新地图系统成功', + updateMapSystemFail: '更新地图系统失败', + generation: '一键生成', + deleteData: '删除', + deleteMapSystemSuccess: '删除地图系统成功', + deleteMapSystemFail: '删除地图系统失败', + deleteMapSystemTip: '此操作将删除地图系统, 是否继续?' + }; diff --git a/src/jmap/shape/StationStand/index.js b/src/jmap/shape/StationStand/index.js index 732860278..4331c55bd 100644 --- a/src/jmap/shape/StationStand/index.js +++ b/src/jmap/shape/StationStand/index.js @@ -250,6 +250,7 @@ class StationStand extends Group { /** 中心+车站扣车*/ standAndCenterDetainTrain() { this.detain && this.detain.show(); + this.detain && this.detain.setColor(this.style.StationStand.detainCar.andCenterTrainColor); } /** 人工设置停战时间*/ diff --git a/src/jmap/theme/chengdu_03/menus/dialog/childDialog/passwordInputBox.vue b/src/jmap/theme/chengdu_03/menus/dialog/childDialog/passwordInputBox.vue index 68a8db975..b706da32d 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/childDialog/passwordInputBox.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/childDialog/passwordInputBox.vue @@ -107,11 +107,7 @@ export default { } }, domIdConfirm() { - if (this.operate && this.operate.operateCode) { - return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : ''; - } else { - return this.dialogShow ? OperationEvent.Command.close.confirm.domId : ''; - } + return this.dialogShow ? getDomIdByOperation(this.operate.operateNext) : ''; } }, mounted() { @@ -135,29 +131,10 @@ export default { this.$store.dispatch('training/emitTipFresh'); }, commit() { - const operate = { - send: this.operate.operateCode != null, - type: this.operate.type, - operation: this.operate.operateCode != null ? this.operate.operateCode : OperationEvent.Command.close.confirm.operation - }; - if (this.operate.val) { - operate['val'] = this.operate.val; - } - if (this.passwordCheck === this.correctPassword) { - this.$store.dispatch('training/next', operate).then(({ valid }) => { - this.loading = false; - - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$emit('checkOver'); - this.doClose(); - this.inputClear(); - } - }).catch(() => { - this.loading = false; - this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate); - }); + this.$emit('checkOver', this.operate); + this.doClose(); + this.inputClear(); } else { this.showMistake = true; } diff --git a/src/jmap/theme/chengdu_03/menus/dialog/routeControl.vue b/src/jmap/theme/chengdu_03/menus/dialog/routeControl.vue index d959ba7e3..6af5a13b5 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/routeControl.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/routeControl.vue @@ -27,7 +27,7 @@ - + @@ -79,10 +79,6 @@ export default { return '信号封锁'; } else if (this.operation == OperationEvent.Signal.unlock.menu.operation) { return '信号解封'; - } else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) { - return '进路收人工控'; - } else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) { - return '进路交自动控'; } else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) { return '信号关灯'; } @@ -138,17 +134,26 @@ export default { } else if (this.operation == OperationEvent.Signal.unlock.menu.operation) { /** 信号解封*/ this.unlock(); - } else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) { - /** 进路收人工控*/ - this.humanControl(); - } else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) { - /** 进路交自动控*/ - this.atsAutoControl(); } else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) { /** 信号关灯*/ this.signalClose(); } }, + passWordCommit(data) { + const operate = { + send: true, + type: data.type, + operation: data.operateNext + }; + + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { this.doClose(); } + }).catch(() => { + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + + }, // 取消列车进路 cancelTrainRoute() { if (this.$store.state.training.prdType == '01') { @@ -174,7 +179,6 @@ export default { this.doClose(); } }).catch(() => { - this.loading = false; this.doClose(); this.$refs.noticeInfo.doShow(operate); }); @@ -194,7 +198,6 @@ export default { this.doClose(); } }).catch(() => { - this.loading = false; this.doClose(); this.$refs.noticeInfo.doShow(operate); }); @@ -204,7 +207,7 @@ export default { const operate = { type: MapDeviceType.Signal.type, operation: OperationEvent.Signal.humanTrainRoute.menu.operation, - operateCode: OperationEvent.Signal.humanTrainRoute.confirm.operation + operateNext: OperationEvent.Signal.humanTrainRoute.confirm.operation }; this.$store.dispatch('training/next', operate).then(({ valid }) => { @@ -213,7 +216,6 @@ export default { this.$refs.password.doShow(operate); } }).catch(() => { - this.loading = false; this.doClose(); this.$refs.noticeInfo.doShow(operate); }); @@ -233,7 +235,6 @@ export default { this.doClose(); } }).catch(() => { - this.loading = false; this.doClose(); this.$refs.noticeInfo.doShow(operate); }); @@ -243,7 +244,7 @@ export default { const operate = { type: MapDeviceType.Signal.type, operation: OperationEvent.Signal.lock.menu.operation, - operateCode: OperationEvent.Signal.lock.confirm.operation + operateNext: OperationEvent.Signal.lock.confirm.operation }; this.$store.dispatch('training/next', operate).then(({ valid }) => { @@ -259,7 +260,7 @@ export default { const operate = { type: MapDeviceType.Signal.type, operation: OperationEvent.Signal.unlock.menu.operation, - operateCode: OperationEvent.Signal.unlock.confirm.operation + operateNext: OperationEvent.Signal.unlock.confirm.operation }; this.$store.dispatch('training/next', operate).then(({ valid }) => { @@ -270,51 +271,6 @@ export default { }).catch(() => { }); }, - // 进路收人工控 - humanControl() { - const operate = { - type: MapDeviceType.Signal.type, - operation: OperationEvent.Signal.humanControl.menu.operation, - operateCode: OperationEvent.Signal.humanControl.confirm.operation, - val: this.operateCode - }; - - this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - this.loading = false; - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.password.doShow(operate); - } - }).catch(() => { - this.loading = false; - // this.doClose(); - // this.$refs.noticeInfo.doShow(operate); - }); - }, - // 进路交自动控 - atsAutoControl() { - const operate = { - // send: true, - type: MapDeviceType.Signal.type, - operation: OperationEvent.Signal.atsAutoControl.menu.operation, - operateCode: OperationEvent.Signal.atsAutoControl.confirm.operation, - val: this.operateCode - }; - - this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - this.loading = false; - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.password.doShow(operate); - } - }).catch(() => { - this.loading = false; - // this.doClose(); - // this.$refs.noticeInfo.doShow(operate); - }); - }, // 信号关灯 signalClose() { const operate = { diff --git a/src/jmap/theme/chengdu_03/menus/dialog/routeGuide.vue b/src/jmap/theme/chengdu_03/menus/dialog/routeGuide.vue index a17a5c0a5..847ab9fd2 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/routeGuide.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/routeGuide.vue @@ -45,7 +45,7 @@ - + @@ -149,6 +149,25 @@ export default { this.$store.dispatch('training/emitTipFresh'); }); }, + passWordCommit(data) { + const operate = { + send: true, + type: data.type, + operation: data.operateNext + }; + + this.loading = true; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.loading = false; + if (valid) { + this.doClose(); + } + }).catch(() => { + this.loading = false; + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + }, doClose() { this.loading = false; this.dialogShow = false; @@ -179,7 +198,7 @@ export default { const operate = { type: MapDeviceType.Signal.type, operation: OperationEvent.Signal.guide.menu.operation, - operateCode: OperationEvent.Signal.guide.confirm.operation + operateNext: OperationEvent.Signal.guide.confirm.operation }; this.loading = true; diff --git a/src/jmap/theme/chengdu_03/menus/dialog/sectionControl.vue b/src/jmap/theme/chengdu_03/menus/dialog/sectionControl.vue index 3b262fa86..ddf690e1e 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/sectionControl.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/sectionControl.vue @@ -27,7 +27,7 @@ - + @@ -129,6 +129,22 @@ export default { this.fault(); } }, + passWordCommit(data) { + const operate = { + send: true, + type: data.type, + operation: data.operateNext + }; + + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + } + }).catch(() => { + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + }, // 道岔单锁 lock() { const operate = { @@ -192,10 +208,9 @@ export default { // 区故解 fault() { const operate = { - // send: true, type: MapDeviceType.Section.type, operation: OperationEvent.Section.fault.menu.operation, - operateCode: OperationEvent.Section.fault.confirm.operation + operateNext: OperationEvent.Section.fault.confirm.operation }; this.loading = true; diff --git a/src/jmap/theme/chengdu_03/menus/dialog/switchControl.vue b/src/jmap/theme/chengdu_03/menus/dialog/switchControl.vue index 4de269dad..911e471b5 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/switchControl.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/switchControl.vue @@ -31,7 +31,7 @@ - + @@ -153,6 +153,22 @@ export default { this.openPasswordBox(this.operation, OperationEvent.Switch.fault.confirm.operation); } }, + passWordCommit(data) { + const operate = { + send: true, + type: data.type, + operation: data.operateNext + }; + + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + } + }).catch(() => { + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + }, // 道岔单锁 lock() { const operate = { @@ -311,11 +327,11 @@ export default { }); }, // 打开密码输入框 - openPasswordBox(operation, code) { + openPasswordBox(operation, operateNext) { const operate = { type: MapDeviceType.Switch.type, operation: operation, - operateCode: code + operateNext: operateNext }; this.loading = true; this.$store.dispatch('training/next', operate).then(({ valid }) => { diff --git a/src/jmap/theme/chengdu_03/menus/dialog/trainCreate.vue b/src/jmap/theme/chengdu_03/menus/dialog/trainCreate.vue index c778ce917..210adccf0 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/trainCreate.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/trainCreate.vue @@ -1,158 +1,153 @@ \ No newline at end of file + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + } + }).catch(() => { + this.doClose(); + }); + } + } +}; + diff --git a/src/jmap/theme/chengdu_03/menus/dialog/trainEditNumber.vue b/src/jmap/theme/chengdu_03/menus/dialog/trainEditNumber.vue index 2cf5460f1..f13e64a16 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/trainEditNumber.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/trainEditNumber.vue @@ -1,180 +1,174 @@ diff --git a/src/views/scriptManage/create.vue b/src/views/scriptManage/create.vue index e3dd3c66b..759fdb286 100644 --- a/src/views/scriptManage/create.vue +++ b/src/views/scriptManage/create.vue @@ -25,8 +25,7 @@ name: '', mapId: '', description:'' - }, - isShow: false, + } } }, props: { @@ -48,20 +47,17 @@ rules() { let crules = { name: [ - { required: true, message: '请输入剧本', trigger: 'blur' }, + { required: true, message: this.$t('scriptRecord.inputScriptName'), trigger: 'blur' }, ], mapId: [ - { required: true, message: '请选择地图', trigger: 'change' }, + { required: true, message: this.$t('scriptRecord.selectMap'), trigger: 'change' }, ], description:[ - { required: true, message: '请输入剧本描述', trigger: 'blur' }, + { required: true, message: this.$t('scriptRecord.inputScriptDescription'), trigger: 'blur' }, ] } return crules }, - // title() { - // return '创建剧本' - // } }, mounted() { this.loadInitData(); @@ -101,7 +97,6 @@ }, doClose() { this.$refs.dataform.resetForm(); - this.isShow = false; this.dialogVisible = false } } diff --git a/src/views/scriptManage/home.vue b/src/views/scriptManage/home.vue index e990827cb..661db766e 100644 --- a/src/views/scriptManage/home.vue +++ b/src/views/scriptManage/home.vue @@ -1,56 +1,10 @@