diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js index d73f59f5a..774d09a4e 100644 --- a/src/i18n/langs/en/router.js +++ b/src/i18n/langs/en/router.js @@ -7,6 +7,12 @@ export default { runPlanManage: 'Run plan', productEdit: 'Product editor', + newDesignEditor: 'Editor', + newDesignEditorList: 'Editor List', + newDesignDraftEditorList: 'Draft Editor List', + uploadPdf: 'Upload Pdf', + fileManage:'File Manage', + designhomePage: 'Public map', designUserPage: 'Personal map', newDesignUserPage: 'Personal map', diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js index ab77c2c56..a739f53d5 100644 --- a/src/i18n/langs/zh/router.js +++ b/src/i18n/langs/zh/router.js @@ -8,6 +8,7 @@ export default { newDesignEditorList: '图文列表', newDesignDraftEditorList: '文章草稿', uploadPdf: 'PDF上传', + fileManage:'文件管理', mapManage: '地图管理', skinManage: '皮肤管理', diff --git a/src/router/index.js b/src/router/index.js index c5f947fc7..1230fb661 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1143,7 +1143,7 @@ export const asyncRouter = [ path: '/editor', component: Layout, meta: { - i18n: 'router.newDesignEditor', + i18n: 'router.fileManage', roles: [admin, user] }, children: [ @@ -1162,24 +1162,14 @@ export const asyncRouter = [ } }, { - path: '', + path: 'draft', component: Ueditor, meta: { i18n: 'router.newDesignEditor' } - } - ] - }, - { - path: '/uploading', - component: Layout, - meta: { - i18n: 'router.uploadPdf', - roles: [admin, user] - }, - children: [ + }, { - path: 'list', + path: 'uploading/list', component: UploadPdfList, meta: { i18n: 'router.uploadPdf' @@ -1187,6 +1177,23 @@ export const asyncRouter = [ } ] }, + // { + // path: '/uploading', + // component: Layout, + // meta: { + // i18n: 'router.uploadPdf', + // roles: [admin, user] + // }, + // children: [ + // { + // path: 'list', + // component: UploadPdfList, + // meta: { + // i18n: 'router.uploadPdf' + // } + // } + // ] + // }, { // 新个人地图 path: '/design', component: Layout, diff --git a/src/views/editor/index.vue b/src/views/editor/index.vue index 4977cfd24..abf11f9dc 100644 --- a/src/views/editor/index.vue +++ b/src/views/editor/index.vue @@ -89,7 +89,8 @@ export default { this.editor.create(); // 创建富文本实例 - this.handleEdit(); + if (this.draft) { this.handleEdit(); } + }, beforeDestroy() { // 调用销毁 API 对当前编辑器实例进行销毁