From ebf10826d6bba0d3b542dce64531aa71bc2fd77e Mon Sep 17 00:00:00 2001 From: quanyawei <401863037@qq.com> Date: Thu, 23 Nov 2023 11:00:29 +0800 Subject: [PATCH] fix:导出修改 --- .eslintrc.js | 65 ++++++++++++++++++++++++-------- src/views/toCarryOutLegislativeReforms/reform/index.vue | 11 ++++- src/views/toCarryOutLegislativeReforms/summaryPage/index.vue | 2 3 files changed, 57 insertions(+), 21 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index a949ef5..65034b5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,23 +1,54 @@ module.exports = { + root: true, env: { browser: true, - node: true + node: true, + es6: true }, - extends: [ - // ������vuejs���������eslint��������� https://eslint.vuejs.org/user-guide/#usage - 'plugin:vue/recommended', - // ������ ESLint ��������������� prettier ������������ - 'eslint:recommended' - ], - parserOptions: { - ecmaVersion: 10, - sourceType: 'module' - }, - plugins: ['vue'], + extends: ['plugin:vue/essential', '@vue/standard'], rules: { - 'space-before-function-paren': 0, - 'no-console': 'off', - 'no-unused-vars': 'off', - 'vue/attribute-hyphenation': 0 // ������������������ - } + eqeqeq: ['error', 'always'], // ��������������������������� + semi: 2, // ��������������������������������� + 'no-use-before-define': [1, 'nofunc'], // ������������������������ + 'max-lines': ['error', { max: 2000, skipBlankLines: true }], + 'no-mixed-spaces-and-tabs': 'warn', // ���������������������tab������������ + 'newline-per-chained-call': ['error', { ignoreChainWithDepth: 1 }], // promise ������ ��������������������������������������� + 'vue/attribute-hyphenation': ['error', 'always'], // prop������������������������������������������������������������������������������������prop��������������������������������������� + 'vue/html-indent': [ + 'warn', + 2, + { + attribute: 1, + baseIndent: 1, + closeBracket: 0, + alignAttributesVertically: true + } + ], + curly: 2, // ������������ if(){} ������{} + 'vue/prop-name-casing': ['warn', 'camelCase'], //������������������������ + 'vue/this-in-template': ['error', 'never'], //������������template������������this + 'no-trailing-spaces': 1, //��������������������������������� + 'vue/max-attributes-per-line': [ + // template���������������������������prop������,������3������������3���������������������������prop��������������������� + 'warn', + { + singleline: 3, + multiline: { + max: 1, + allowFirstLine: false + } + } + ], + 'no-catch-shadow': 'error', //������catch������������������������������������������ + 'vue/v-bind-style': ['error', 'shorthand'], // ������������:��������� + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', // ���������������������������������debugger + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-unused-vars': 0, // ��������������������������������� + 'spaced-comment': 0 // ������������������ // ��� /* ��������������������� + }, + parserOptions: { + ecmaVersion: 6, + parser: 'babel-eslint' + }, + plugins: ['vue'] } diff --git a/src/views/toCarryOutLegislativeReforms/reform/index.vue b/src/views/toCarryOutLegislativeReforms/reform/index.vue index cdeb5b5..3451f89 100644 --- a/src/views/toCarryOutLegislativeReforms/reform/index.vue +++ b/src/views/toCarryOutLegislativeReforms/reform/index.vue @@ -332,15 +332,20 @@ this.$confirm('������������������������������?', '������', { confirmButtonText: '������������', cancelButtonText: '������������', + distinguishCancelAndClose: true, type: 'warning' }) .then(() => { this.loading = true this.exportData() }) - .catch(() => { - this.loading = false - this.exportData() + .catch(action => { + if (action === 'cancel') { + this.loading = false + this.exportData() + } else { + this.loading = false + } }) }, exportData() { diff --git a/src/views/toCarryOutLegislativeReforms/summaryPage/index.vue b/src/views/toCarryOutLegislativeReforms/summaryPage/index.vue index bc4adb2..31f4d67 100644 --- a/src/views/toCarryOutLegislativeReforms/summaryPage/index.vue +++ b/src/views/toCarryOutLegislativeReforms/summaryPage/index.vue @@ -66,7 +66,7 @@ <el-table-column align="center" prop="totalPoints" label="���������" /> </el-table> <vueSeamless v-if="tableData.length>5" ref="scroll3" :data="tableData" :pause="true" class="seamless-warp" style="width: 100%;" :class-option="classOption"> - <el-table v-if="tableData.length>0" :data="tableData" class="bottom" border style="width: 100%;margin-bottom:50px"> + <el-table v-if="tableData.length>0" :data="tableData" class="bottomTable" border style="width: 100%;margin-bottom:50px"> <el-table-column align="center" type="index" width="60" /> <el-table-column align="center" prop="unitName" label="������������" /> <el-table-column align="center" prop="total" label="���������" /> -- Gitblit v1.8.0