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')