From 780f5c62e7435b80447b522505aa993ee2bd4547 Mon Sep 17 00:00:00 2001 From: Jo <479214531@qq.com> Date: Tue, 7 Dec 2021 01:54:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=8B=E8=BD=BD=E7=AD=89?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/data/list/index.vue | 5 +++-- src/pages/index/list/index.vue | 5 +++-- src/router/permission.js | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/data/list/index.vue b/src/pages/data/list/index.vue index 1fff713..a8c279b 100644 --- a/src/pages/data/list/index.vue +++ b/src/pages/data/list/index.vue @@ -434,8 +434,9 @@ export default { let newFields = [] let fieldsList = this.fieldsList - fields.map(n => { - newFields.push(fieldsList.find(e => e.comment == n).field) + fieldsList.map(n => { + const field = fields.find(e => n.comment == e) + field && newFields.push(n.field) }) let msgObj = util.successMsg('数据正在生成中,请稍等片刻,生成后会自动下载,您可以先访问其他页面。', 5000) this.downloadVisible = false diff --git a/src/pages/index/list/index.vue b/src/pages/index/list/index.vue index fb03a5f..347ebf2 100644 --- a/src/pages/index/list/index.vue +++ b/src/pages/index/list/index.vue @@ -492,8 +492,9 @@ export default { let newFields = [] let fieldsList = this.fieldsList - fields.map(n => { - newFields.push(fieldsList.find(e => e.comment == n).field) + fieldsList.map(n => { + const field = fields.find(e => n.comment == e) + field && newFields.push(n.field) }) let msgObj = util.successMsg('数据正在生成中,请稍等片刻,生成后会自动下载,您可以先访问其他页面。', 5000) this.downloadVisible = false diff --git a/src/router/permission.js b/src/router/permission.js index 77c3ef0..3ce21be 100644 --- a/src/router/permission.js +++ b/src/router/permission.js @@ -6,6 +6,8 @@ const managerPath = ['/stat/list','/user/list','/role/list'] // 管理员才能 router.beforeEach((to, from, next) => { document.title = Setting.titleSuffix + const user = store.state.user + JSON.stringify(user) == '{}' && util.local.clear() const role = util.local.get(Setting.tokenKey) if (!role && to.path !== '/login' && to.path !== '/index/list') { next('/index/list')