quanyawei
2023-11-23 ebf10826d6bba0d3b542dce64531aa71bc2fd77e
fix:导出修改
3 files modified
78 ■■■■ changed files
.eslintrc.js 65 ●●●● patch | view | raw | blame | history
src/views/toCarryOutLegislativeReforms/reform/index.vue 11 ●●●● patch | view | raw | blame | history
src/views/toCarryOutLegislativeReforms/summaryPage/index.vue 2 ●●● patch | view | raw | blame | history
.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']
}
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() {
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="总工单" />