linan 4 年之前
父节点
当前提交
747c9f691d
共有 2 个文件被更改,包括 22 次插入21 次删除
  1. 18 18
      .eslintrc.js
  2. 4 3
      src/views/slaughterManagment/slaughterBatch.vue

+ 18 - 18
.eslintrc.js

@@ -1,18 +1,18 @@
-// module.exports = {
-//   root: true,
-//   env: {
-//     node: true
-//   },
-//   extends: ['plugin:vue/essential'],
-//   rules: {
-//     'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
-//     'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
-//   },
-//   parserOptions: {
-//     parser: 'babel-eslint'
-//   },
-//   globals: {
-//     'AMap': false,
-//     'AMapUI': false
-//   }
-// }
+module.exports = {
+  root: true,
+  env: {
+    node: true
+  },
+  extends: ['plugin:vue/essential'],
+  rules: {
+    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
+    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
+  },
+  parserOptions: {
+    parser: 'babel-eslint'
+  },
+  globals: {
+    'AMap': false,
+    'AMapUI': false
+  }
+}

+ 4 - 3
src/views/slaughterManagment/slaughterBatch.vue

@@ -14,7 +14,7 @@
         <section>
             <article class="table">
                 <el-table
-                    ref="multipleTable"
+                    ref="SlaughterBatch"
                     :data="tableData"
                     tooltip-effect="dark"
                     style="width: 30%"
@@ -102,10 +102,10 @@ export default {
         toggleSelection(rows) {
             if (rows) {
                 rows.forEach(row => {
-                    this.$refs.multipleTableCreateBatch.toggleRowSelection(row);
+                    this.$refs['SlaughterBatch'].toggleRowSelection(row);
                 });
             } else {
-                this.$refs.multipleTableCreateBatch.clearSelection();
+                this.$refs['SlaughterBatch'].clearSelection();
             }
         },
         create() {
@@ -117,6 +117,7 @@ export default {
                     this.$message.error(res.errMsg);
                 } else {
                     this.$message.success("成功");
+                    this.toggleSelection()
                 }
             });
         },