From 158f3aec9eaef7f99db2cfa2640ecf65d3368fe0 Mon Sep 17 00:00:00 2001 From: Jo <479214531@qq.com> Date: Tue, 25 Jan 2022 11:46:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E6=8A=8A=E5=85=B3=E9=94=AE=E5=AD=97=E5=8A=A0?= =?UTF-8?q?=E4=B8=8A=E5=BC=95=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/data/list/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/data/list/index.vue b/src/pages/data/list/index.vue index cf8c206..e79b63c 100644 --- a/src/pages/data/list/index.vue +++ b/src/pages/data/list/index.vue @@ -162,6 +162,7 @@ export default { name: '年频' }, ], + keywordField: ['dec', 'desc'], // 下载数据的时候要把这些数据库的关键字加个引号,不然会下载失败,如果后续还要加其他关键字,直接在这里添加即可 currentRow: null, searchTimer: null } @@ -436,9 +437,10 @@ export default { let newFields = [] let fieldsList = this.fieldsList + const keywordField = this.keywordField fieldsList.map(n => { const field = fields.find(e => n.comment == e) - field && newFields.push(n.field) + field && newFields.push(keywordField.includes(n.field.toLowerCase()) ? `'${n.field}'` : n.field) // 如果是关键字,则加引号 }) let msgObj = util.successMsg('数据正在生成中,请稍等片刻,生成后会自动下载,您可以先访问其他页面。', 5000) this.downloadVisible = false