diff --git a/src/i18n/langs/en/lesson.js b/src/i18n/langs/en/lesson.js index ba2108a93..54dc77d95 100644 --- a/src/i18n/langs/en/lesson.js +++ b/src/i18n/langs/en/lesson.js @@ -56,7 +56,7 @@ export default { createChapter: 'Create chapter', contentSorting: 'Content sorting', courseList: 'Course list', - countSkinCode: 'Duplicate skin cannot be the same type as the copied skin', + countSkinCode: 'Duplicate map cannot be the same type as the copied map', createNewCoursesFromRelease: 'Create new courses from release', courseName: 'Course name', parentChapter: 'Parent chapter:', diff --git a/src/i18n/langs/zh/lesson.js b/src/i18n/langs/zh/lesson.js index e3045d526..d699a727b 100644 --- a/src/i18n/langs/zh/lesson.js +++ b/src/i18n/langs/zh/lesson.js @@ -101,7 +101,7 @@ export default { train: '列车', station: '车站', trainWindow: '车次窗', - countSkinCode: '复制皮肤与被复制皮肤类型不能一样', + countSkinCode: '复制地图与被复制地图类型不能一样', trainingRecord: '实训录制', lesson: '课程', taskManage: '任务管理', diff --git a/src/router/index.js b/src/router/index.js index 994aed854..29dd3bb35 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -564,59 +564,64 @@ export const asyncRouter = [ roles: [admin, userDesign] }, children: [ - { + { // 发布地图 path: 'map', component: PublishMap, meta: { i18n: 'router.publishMapManage' } }, - { + { // 发布历史 path: 'map/detail', hidden: true, component: PublishMapDetail }, - { + { // 产品状态 path: 'product', component: ProductStatus, meta: { i18n: 'router.productStateManage' } }, - { + { // 发布课程 path: 'lesson', component: PublishLesson, meta: { i18n: 'router.publishLessonManage' } }, - { + { // 模板运行图 path: 'runPlan/template', component: RunPlanTemplate, meta: { i18n: 'router.runPlanTemplateManage' } }, - { + { // 加载运行图管理 path: 'runPlan/common', component: RunPlanCommon, meta: { i18n: 'router.runPlanCommonManage' } }, - { + { // 新增加载运行图 + path: 'runPlan/common/:mode', + component: RunPlanCommonDraft, + hidden: true + }, + { // 运行图预览 + path: 'runPlan/view/:mode', + component: RunplanView, + hidden: true + }, + { // 每日运行图 path: 'runPlan/everyDay', component: RunPlanEveryDay, meta: { i18n: 'router.runPlanEveryDayManage' } }, - { - path: 'runPlan/view/:mode', - component: RunplanView, - hidden: true - }, - { + { // 考试规则列表 path: 'examRule/manage', component: PublishExamRule, meta: { @@ -627,11 +632,6 @@ export const asyncRouter = [ path: 'examRule/draft/:mode/:ruleId/:lessonId', component: PublishExamRuleDraft, hidden: true - }, - { - path: 'runPlan/common/:mode', - component: RunPlanCommonDraft, - hidden: true } ] }, diff --git a/src/views/lesson/details.vue b/src/views/lesson/details.vue index 479f60894..974dfbf9e 100644 --- a/src/views/lesson/details.vue +++ b/src/views/lesson/details.vue @@ -87,13 +87,13 @@ export default { return data.name.indexOf(value) !== -1; }, editLesson() { - this.$router.push( {path: `/design/lesson/details/edit/lessonEdit`, query: {id: this.lessonId, skinCode: this.$route.query.skinCode, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}} ); + this.$router.push( {path: `/design/lesson/details/edit/lessonEdit`, query: {id: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}} ); }, createChapte(node) { - this.$router.push({path: `/design/lesson/details/edit/chapterCreate`, query: {id: node.data.id, lessonId: this.lessonId, skinCode: this.$route.query.skinCode, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}}); + this.$router.push({path: `/design/lesson/details/edit/chapterCreate`, query: {id: node.data.id, type:node.data.type, lessonId: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}}); }, updateChapte(node) { - this.$router.push( {path: `/design/lesson/details/edit/chapterEdit`, query: {id: node.data.id, skinCode: this.$route.query.skinCode, lessonId: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}}); + this.$router.push( {path: `/design/lesson/details/edit/chapterEdit`, query: {id: node.data.id, type:node.data.type, lessonId: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}}); }, showContextMenu(e, obj, node, vueElem) { if (obj && obj.type === 'Lesson' || obj.type === 'Chapter') { diff --git a/src/views/lesson/home.vue b/src/views/lesson/home.vue index 7b0097233..5bcbe7496 100644 --- a/src/views/lesson/home.vue +++ b/src/views/lesson/home.vue @@ -181,7 +181,7 @@ export default { this.$refs.queryListPage.refresh(true); }, lessonCreate() { - this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {skinCode: this.$route.params.skinCode, mapId: this.$route.params.mapId, cityCode: this.$route.query.cityCode} }); + this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {mapId: this.$route.params.mapId, cityCode: this.$route.query.cityCode} }); }, lessonCreateByPublish() { this.$nextTick(() => { @@ -189,8 +189,9 @@ export default { }); }, publish(index, row) { - row.skinCode = this.$route.params.skinCode; + row.mapId = this.$route.params.mapId; row.cityCode = this.$route.query.cityCode; + debugger; this.$refs.publishLesson.doShow(row); }, deleteLesson(index, row) { @@ -236,7 +237,7 @@ export default { this.$refs.lessonDetail.show(row.id); }, goDetail(index, row) { - this.$router.push({path: `/design/lesson/details`, query: {lessonId: row.id, skinCode: this.$route.params.skinCode, cityCode: this.$route.query.cityCode, mapId: this.$route.params.mapId}}); + this.$router.push({path: `/design/lesson/details`, query: {lessonId: row.id, cityCode: this.$route.query.cityCode, mapId: this.$route.params.mapId}}); } } }; diff --git a/src/views/lesson/lessoncategory/edit/chapter/index.vue b/src/views/lesson/lessoncategory/edit/chapter/index.vue index 729eb5b12..7753437d0 100644 --- a/src/views/lesson/lessoncategory/edit/chapter/index.vue +++ b/src/views/lesson/lessoncategory/edit/chapter/index.vue @@ -178,7 +178,7 @@ export default { this.detail.prdCode = resp.data.prdCode; this.chapterModel.lessonId = resp.data.id; this.chapterModel.lessonName = resp.data.name; - if (data.id !== data.lessonId) { + if (data.type === 'Chapter') { this.getChapter(data); } }).catch(() => { @@ -210,7 +210,7 @@ export default { }); }, back() { - this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}/${this.$route.query.skinCode}`, query: {cityCode: this.$route.query.cityCode} }); + this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}`, query: {cityCode: this.$route.query.cityCode} }); } } }; diff --git a/src/views/lesson/trainingRule/saveAs.vue b/src/views/lesson/trainingRule/saveAs.vue index bc53f1d4a..01065ef4d 100644 --- a/src/views/lesson/trainingRule/saveAs.vue +++ b/src/views/lesson/trainingRule/saveAs.vue @@ -26,8 +26,8 @@ export default { loading: false, dialogVisible: false, formModel: { - skinCodeFrom: '', - skinCodeTo: '' + mapIdFrom: '', + mapIdTo: '' }, mapIdList: [] }; @@ -39,14 +39,14 @@ export default { labelWidth: '120px', items: [ { - prop: 'skinCodeFrom', + prop: 'mapIdFrom', label: this.$t('lesson.skinTypeFrom'), type: 'select', required: true, options: this.mapIdList }, { - prop: 'skinCodeTo', + prop: 'mapIdTo', label: this.$t('lesson.skinTypeTo'), type: 'select', required: true, @@ -58,14 +58,14 @@ export default { }, rules() { const crules = { - skinCodeFrom: [ + mapIdFrom: [ { required: true, message: this.$t('rules.inputSkinType'), trigger: 'change' } ], - skinCodeTo: [ + mapIdTo: [ { required: true, message: this.$t('rules.inputSkinType'), @@ -101,7 +101,7 @@ export default { doSave() { const self = this; this.$refs.dataform.validateForm(() => { - if (this.formModel.skinCodeFrom != this.formModel.skinCodeTo) { + if (this.formModel.mapIdFrom != this.formModel.mapIdTo) { self.create(); } else { this.$alert(this.$t('lesson.countSkinCode'), this.$t('global.tips'), { @@ -114,7 +114,7 @@ export default { create() { const self = this; this.loading = true; - postOperateSaveAs(this.formModel.skinCodeFrom, this.formModel.skinCodeTo) + postOperateSaveAs(this.formModel.mapIdFrom, this.formModel.mapIdTo) .then(response => { self.loading = false; self.$message.success(this.$t('lesson.batchCreateSuccess')); diff --git a/src/views/system/product/edit.vue b/src/views/system/product/edit.vue index 16eff2fe1..e5d6f2a4d 100644 --- a/src/views/system/product/edit.vue +++ b/src/views/system/product/edit.vue @@ -19,7 +19,7 @@ @@ -87,7 +87,7 @@ export default { computed: { title() { if (this.node && this.node.data) { - if (this.node.data.type === 'Skin') { + if (this.node.data.type === 'Map') { return this.$t('map.createProductCategories'); } else if (this.node.data.type === 'Prd' || this.node.data.type === 'Prd') { @@ -97,7 +97,7 @@ export default { return this.$t('map.selectOperation'); }, isCreate() { - return this.node && this.node.data.type === 'Skin'; + return this.node && this.node.data.type === 'Map'; }, isUpdate() { return this.node && this.node.data.type === 'Prd'; @@ -141,10 +141,11 @@ export default { this.initTrainTypes = []; this.$refs.form.resetFields(); this.loading = true; - if (node.data.type === 'Skin') { + if (node.data.type === 'Map') { this.codeDisabled = false; this.addModel.mapName = node.data.name; this.addModel.skinCode = node.data.id; + this.addModel.mapId = node.data.id; this.loading = false; } else if (node.data.type === 'Prd') { this.codeDisabled = true; @@ -180,6 +181,7 @@ export default { const data = { skinCode: this.addModel.skinCode, mapName: this.addModel.mapName, + mapId: this.addModel.mapId, name: this.addModel.name, remarks: this.addModel.remarks, prdType: this.addModel.prdType, diff --git a/src/views/system/product/tree.vue b/src/views/system/product/tree.vue index 3bd47b62c..90436767f 100644 --- a/src/views/system/product/tree.vue +++ b/src/views/system/product/tree.vue @@ -53,7 +53,8 @@ export default { x: 0, y: 0 }, - localParamName: 'product_cityCode' + localParamName: 'product_cityCode', + cityCode: '' }; }, watch: { @@ -97,7 +98,10 @@ export default { async refresh(filterSelect) { this.loading = true; try { - const res = await getPublishMapTree(filterSelect); + if (filterSelect) { + this.cityCode = filterSelect; + } + const res = await getPublishMapTree(this.cityCode); this.treeData = this.convertTreeData(res.data); this.$nextTick(() => { this.loading = false;