Преглед на файлове

Merge branch 'master' of https://git.agilestar.cn/spfm-group/spfm-market-front

daiqisheng преди 3 години
родител
ревизия
64b2e006c1
променени са 3 файла, в които са добавени 491 реда и са изтрити 353 реда
  1. 169 93
      src/pages/main/gridDivision/approvalExamination.vue
  2. 145 105
      src/pages/main/gridDivision/workersList.vue
  3. 177 155
      src/pages/main/performance/components/table.vue

+ 169 - 93
src/pages/main/gridDivision/approvalExamination.vue

@@ -1,77 +1,67 @@
 <template>
-    <div class="approvalExamination-container">
-      <simple-form
-        :form="table_form"
-        :handle="table_handle"
-        @search="handleSearch"
-        @track="handleVisible('track')"
-        @batch="handleVisible('batch')"
-      >
-      </simple-form>
+  <div class="approvalExamination-container">
+    <simple-form
+      :form="table_form"
+      :handle="table_handle"
+      @search="handleSearch"
+      @track="handleQueryTrack"
+      @batch="handleBatch"
+    >
+    </simple-form>
+    <simple-table
+      :list="table_list"
+      :config="table_config"
+      :loading="table_loading"
+      :multiple="true"
+      :handle-row="table_handle_row"
+      @selection="handleSelect"
+      @back="handleBack"
+    ></simple-table>
+    <simple-dialog
+      title="审批"
+      width="40%"
+      @cancel="handleVisible('opinion')"
+      :visible="opinion_visible"
+    >
+      <el-form label-width="80px" :model="opinion_form" ref="opinion_ref">
+        <el-form-item label="审批意见" prop="opinion">
+          <el-input
+            :rows="8"
+            type="textarea"
+            v-model="opinion_form.opinion"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <template v-slot:footer>
+        <div>
+          <el-button v-if="!isAgree" @click="handleOpinion('1')" type="default"
+            >退回修改</el-button
+          >
+          <el-button v-else @click="handleOpinion('0')" type="primary">同意</el-button>
+        </div>
+      </template>
+    </simple-dialog>
+    <simple-dialog
+      title="审批轨迹"
+      :fullscreen="true"
+      @cancel="handleVisible('track')"
+      :visible="track_visible"
+    >
       <simple-table
-        :list="table_list"
-        :config="table_config"
-        :loading="table_loading"
-        :multiple="true"
-        :handle-row="table_handle_row"
-        @selection="handleaaa"
-        @approve="handleApprove"
+        :list="table_list_track"
+        :config="table_config_track"
+        :loading="table_loading_track"
       ></simple-table>
-      <simple-dialog
-        title="审批"
-        width="40%"
-        @cancel="handleVisible('opinion')"
-        @confirm="handleOpinion"
-        :visible="opinion_visible"
-      >
-        <el-form
-          label-width="80px"
-          :model="opinion_form"
-          ref="opinion_ref"
-        >
-          <el-form-item
-            label="审批意见"
-            prop="opinion"
-            :rules="{
-                        required: true,
-                        message: '审批意见不能为空',
-                        trigger: 'blur',
-                    }"
+      <template v-slot:footer>
+        <div>
+          <el-button @click="handleVisible('track')" type="default"
+            >退回修改</el-button
           >
-            <el-input
-              :rows="8"
-              type="textarea"
-              v-model="opinion_form.opinion"
-            ></el-input>
-          </el-form-item>
-        </el-form>
-        <template v-slot:footer>
-          <div>
-            <el-button @click="handleVisible('opinion')" type="default">退回修改</el-button>
-            <el-button @click="handleOpinion" type="primary">同意</el-button>
-          </div>
-        </template>
-      </simple-dialog>
-      <simple-dialog
-        title="审批轨迹"
-        :fullscreen="true"
-        @cancel="handleVisible('track')"
-        @confirm="handleConsent"
-        :visible="track_visible"
-      >
-        <simple-table
-          :list="table_list_track"
-          :config="table_config_track"
-          :loading="table_loading_track"
-        ></simple-table>
-        <template v-slot:footer>
-          <div>
-            <el-button @click="handleVisible('track')" type="default">退回修改</el-button>
-            <el-button @click="handleConsent" type="primary">同意</el-button>
-          </div>
-        </template>
-      </simple-dialog>
-    </div>
+          <el-button @click="handleConsent" type="primary">同意</el-button>
+        </div>
+      </template>
+    </simple-dialog>
+  </div>
 </template>
 
 <script>
@@ -92,6 +82,13 @@ export default {
       opinion_visible: false,
       track_visible: false,
       opinion_form: {},
+      isAgree: false,
+      // 单条审批id
+      ids: [],
+      parentId: "",
+      page: 1,
+      rows: 10,
+      total: 0,
       table_form: [
         {
           label: "公司名称",
@@ -142,31 +139,31 @@ export default {
       table_config: [
         {
           label: "序号",
-          props: "number",
+          props: "id",
         },
         {
           label: "公司名称",
-          props: "cpmName",
+          props: "companyName",
         },
         {
           label: "提出人",
-          props: "person",
+          props: "proposer",
         },
         {
           label: "联系电话",
-          props: "phone",
+          props: "telephone",
         },
         {
           label: "网格划分需求",
-          props: "need",
+          props: "wanggeText",
         },
         {
           label: "附件",
-          props: "file",
+          props: "fileNames",
         },
         {
           label: "状态",
-          props: "status",
+          props: "sts",
           type: "dictionary",
           dictionary: { 0: "待办", 1: "已办" },
         },
@@ -174,15 +171,15 @@ export default {
       //   表格里的操作按钮
       table_handle_row: [
         {
-          label: "审批",
-          props: "approve",
+          label: "不通过",
+          props: "back",
         },
         {},
         {},
       ],
-      table_loading_track:false,
+      table_loading_track: false,
       // 审批轨迹内表数据
-      table_list_track:[],
+      table_list_track: [],
       // 审批轨迹内表头配置
       table_config_track: [
         {
@@ -191,31 +188,61 @@ export default {
         },
         {
           label: "流程环节",
-          props: "cpmName",
+          props: "procName",
         },
         {
           label: "处理人",
-          props: "person",
+          props: "opName",
         },
         {
           label: "处理工号",
-          props: "number",
+          props: "opNo",
         },
         {
           label: "处理时间",
-          props: "createTime",
+          props: "opTime",
           type: "date",
         },
         {
           label: "审批意见",
-          props: "status",
-          type: "dictionary",
-          dictionary: { 0: "同意", 1: "不同意" },
+          props: "remark",
+          // type: "dictionary",
+          // dictionary: { 0: "同意", 1: "不同意" },
         },
       ],
     };
   },
+  mounted() {
+    this.parentId = this.$route.query.parentId;
+    this.handleInit();
+  },
   methods: {
+    // 表格数据初始化
+    handleInit() {
+      let reqdata = {
+        ...this.table_search,
+        type: "2",
+        page: this.page,
+        parentId: this.parentId,
+        pageSize: this.rows,
+      };
+      this.$http({
+        url: "/mkWangge/queryPage",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: reqdata,
+      }).then(({ data: { count, data } }) => {
+        this.table_loading = false;
+        this.total = count;
+        this.table_list = data.map((element) => ({
+          ...element,
+        }));
+        console.log(this.table_list);
+      });
+    },
+    // 搜索事件
     handleSearch() {},
     handleVisible(props) {
       switch (props) {
@@ -230,17 +257,66 @@ export default {
           break;
       }
     },
-    handleaaa(val) {
+    // 查询审批轨迹
+    handleQueryTrack() {
+      // let type = this.parentId === null ? "1" : "0";
+      this.$http({
+        url: "/mkWangge/getMkWanggeById",
+        method: "get",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        params: {
+          id: this.parentId,
+          type: 0,
+        },
+      }).then(({ data }) => {
+        let body = data.body;
+        console.log(body, "body");
+        // this.ids = [body.id.toString()];
+        this.table_list_track = body.bpmTaskList;
+      });
+      this.handleVisible("track");
+    },
+    // 批量审批
+    handleBatch() {
+      this.handleVisible("batch");
+    },
+    handleSelect(val) {
       console.log(val);
     },
-    handleApprove() {
+    // 获取审批轨迹
+    getTrackList() {},
+    // 审批
+    handleBack(row) {
+      // console.log(row);
+      this.ids = [row.id.toString()];
       this.handleVisible("opinion");
     },
-    handleOpinion() {
-      this.handleVisible('opinion')
+    handleOpinion(type) {
+      let reqdata = {
+        ids: this.ids,
+        remark: this.opinion_form.opinion,
+        type: type,
+      };
+      // console.log(reqdata);
+      this.$http({
+        url: "/mkWangge/review",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          ...reqdata,
+        },
+      }).then((res) => {
+        console.log(res);
+        this.handleInit();
+      })
+      this.handleVisible("opinion");
     },
     handleConsent() {
-      this.handleVisible('track')
+      this.handleVisible("track");
     },
   },
 };

+ 145 - 105
src/pages/main/gridDivision/workersList.vue

@@ -14,7 +14,8 @@
       :loading="table_loading"
       :multiple="true"
       :handle-row="table_handle_row"
-      @selection="handleaaa"
+      @selection="handleSelect"
+      :selectable="handleSelectFilter"
       @check="handleCheck"
       @edit="handleEdit"
       @approve="handleApprove"
@@ -87,14 +88,39 @@
         </el-form-item>
       </el-form>
       <template v-slot:footer>
-        <div v-if="!isCheck">
-          <el-button @click="handleSubmit" type="primary">保存</el-button>
-          <el-button type="primary">重新提交</el-button>
+        <div v-if="title === '新建'">
+          <el-button @click="handleSubmit('save')" type="primary"
+            >保存</el-button
+          >
+          <el-button @click="handleSubmit('add')" type="primary"
+            >提交</el-button
+          >
+          <el-button @click="handleVisible('add')" type="default"
+            >取消</el-button
+          >
+        </div>
+        <div v-else-if="title === '查看'">
+          <div></div>
+        </div>
+        <div v-else-if="title === '发起人处理'">
+          <el-button @click="handleSubmit('save')" type="primary"
+            >保存</el-button
+          >
+          <el-button @click="handleSubmit('add')" type="primary"
+            >重新提交</el-button
+          >
           <el-button @click="handleVisible('add')" type="default"
             >取消</el-button
           >
         </div>
-        <div v-else></div>
+        <div v-else>
+          <el-button @click="handleSubmit('adopt')" type="primary"
+            >保存</el-button
+          >
+          <el-button @click="handleSubmit('failed')" type="default"
+            >退回修改</el-button
+          >
+        </div>
       </template>
     </simple-dialog>
     <simple-dialog
@@ -152,7 +178,7 @@ export default {
       summary_visible: false,
       edit_visible: false,
       approve_visible: false,
-      ids:[],
+      ids: [],
       add_form: {},
       table_handle: [
         {
@@ -172,7 +198,7 @@ export default {
         },
         {
           label: "状态",
-          props: "approve",
+          props: "sts",
           type: "select",
           // 0.待办  1.已办
           dictionary: [
@@ -215,14 +241,14 @@ export default {
           label: "编辑",
           props: "edit",
           visible: {
-            sts: ["0"],
+            draft: ["0"],
           },
         },
         {
           label: "处理",
           props: "approve",
           visible: {
-            sts: ["0"],
+            deal: ["1"],
           },
         },
       ],
@@ -230,7 +256,7 @@ export default {
       table_config: [
         {
           label: "序号",
-          props: "id",
+          props: "No",
         },
         {
           label: "公司名称",
@@ -258,11 +284,11 @@ export default {
       table_config_approve: [
         {
           label: "编号",
-          props: "number",
+          props: "No",
         },
         {
           label: "流程环节",
-          props: "procName",
+          props: "taskName",
         },
         {
           label: "处理人",
@@ -287,42 +313,42 @@ export default {
     };
   },
   mounted() {
-    this.handleInit({
-      ...this.table_search,
-      type: "1",
-      page: this.page,
-      pageSize: this.rows,
-    });
+    this.handleInit();
   },
   methods: {
     // 表格数据初始化
-    handleInit(data) {
+    handleInit() {
       // this.table_loading = true;
       // console.log(data);
+      let reqdata = {
+        ...this.table_search,
+        type: "1",
+        page: this.page,
+        pageSize: this.rows,
+      };
       this.$http({
         url: "/mkWangge/queryPage",
         method: "post",
         headers: {
           "Content-Type": "application/json",
         },
-        data: data,
+        data: reqdata,
       }).then(({ data: { count, data } }) => {
         this.table_loading = false;
         this.total = count;
-        this.table_list = data || [];
-        console.log(data);
+        this.table_list = data.map((element,index) => ({
+          ...element,
+          deal: element.draft === "1" && element.sts === "0" ? "1" : "0",
+          No: index + 1
+        }));
+        console.log(this.table_list);
       });
     },
     // 搜索事件
     handleSearch(data) {
       this.table_search = data;
       this.page = 1;
-      this.handleInit({
-        ...data,
-        type: "0",
-        page: this.page,
-        pageSize: this.rows,
-      });
+      this.handleInit();
     },
     handleVisible(props) {
       this.approve_visible = false;
@@ -330,9 +356,11 @@ export default {
         case "add":
           this.add_visible = !this.add_visible;
           this.edit_visible = false;
+          this.approve_visible = false;
           this.title = "新建";
           this.isCheck = false;
           this.add_form = {};
+          this.fileInfo.fileList = []
           break;
         case "summary":
           this.summary_visible = !this.summary_visible;
@@ -350,9 +378,16 @@ export default {
           this.title = "查看";
           this.isCheck = true;
           break;
+        case "approve":
+          this.edit_visible = !this.edit_visible;
+          this.add_visible = !this.add_visible;
+          this.title = "审批";
+          this.isCheck = false;
+          this.approve_visible = !this.approve_visible;
+          break;
       }
     },
-    handleaaa(val) {
+    handleSelect(val) {
       this.summaryIds = val.map((item) => {
         return item.id.toString();
       });
@@ -360,11 +395,21 @@ export default {
     },
     //文件返回值
     uploadBack(v) {
-      console.log(v);
-      this.attList = v;
+      const fileName = [];
+      const fileIds = [];
+      v.forEach((element) => {
+        fileName.push(element.fileName);
+        fileIds.push(element.fileCode);
+      });
+      // this.add_form = {
+      //   fileNames: fileName.join(","),
+      //   fileIds: fileIds.join(","),
+      // };
+      this.add_form.fileNames = fileName.join(",")
+      this.add_form.fileIds = fileIds.join(",")
     },
-    // 查看按钮
-    handleCheck(row) {
+    // 获取模态框信息
+    getDialogData(row) {
       let id = row.id;
       let type = row.parentId === null ? "1" : "0";
       this.$http({
@@ -380,87 +425,80 @@ export default {
       }).then(({ data }) => {
         let body = data.body;
         console.log(body, "body");
+        this.ids = [body.id.toString()];
         this.add_form = {
           id: body.id,
-          proposer: body.createName,
+          proposer: body.proposer,
           telephone: body.telephone,
           wanggeText: body.wanggeText,
+          fileNames: body.fileNames,
+          fileIds: body.fileIds,
         };
-        this.table_list_approve = body.bpmTaskList;
+        // this.fileInfo.fileList = body.fileNames.split(',')
+        this.table_list_approve = body.bpmTaskList.map((item,index) => ({
+          ...item,
+          No: index + 1
+        }));
       });
-      this.handleVisible("check");
+    },
+    // 查看按钮
+    handleCheck(row) {
+      if (row.parentLevel === "1") {
+        this.$router.push({
+          path: "/approvalExamination",
+          query: row,
+        });
+      } else {
+        this.getDialogData(row);
+        this.handleVisible("check");
+      }
     },
     // 编辑按钮
     handleEdit(row) {
-      let id = row.id;
-      let type = row.parentId === null ? "1" : "0";
-      this.$http({
-        url: "/mkWangge/getMkWanggeById",
-        method: "get",
-        headers: {
-          "Content-Type": "application/json",
-        },
-        params: {
-          id,
-          type,
-        },
-      }).then(({ data }) => {
-        let body = data.body;
-        console.log(body, "body");
-        this.add_form = {
-          id: body.id,
-          proposer: body.proposer,
-          telephone: body.telephone,
-          wanggeText: body.wanggeText,
-        };
-        this.table_list_approve = body.bpmTaskList;
-      });
+      this.getDialogData(row);
       this.handleVisible("edit");
     },
     // 处理按钮
     handleApprove(row) {
-      let id = row.id;
-      let type = row.parentId === null ? "1" : "0";
-      this.$http({
-        url: "/mkWangge/getMkWanggeById",
-        method: "get",
-        headers: {
-          "Content-Type": "application/json",
-        },
-        params: {
-          id,
-          type,
-        },
-      }).then(({ data }) => {
-        let body = data.body;
-        console.log(body, "body");
-        this.ids = [body.id.toString()]
-        this.add_form = {
-          id: body.id,
-          proposer: body.proposer,
-          telephone: body.telephone,
-          wanggeText: body.wanggeText,
-        };
-        this.table_list_approve = body.bpmTaskList;
-      });
-      this.handleVisible("edit");
-      this.approve_visible = true;
+      if (row.parentLevel === "1") {
+        this.$router.push({
+          path: "/approvalExamination",
+          query: {
+            parentId: row.id.toString(),
+          },
+        });
+      } else {
+        this.getDialogData(row);
+        this.handleVisible("approve");
+      }
     },
-    handleSubmit() {
+    handleSubmit(type) {
       // console.log(this.add_form);
       // let _this = this;
+      let draft = "";
+      if (type === "add") {
+        draft = "1";
+      } else if (type === "save") {
+        draft = "0";
+      }
+      let isAdopt = "";
+      if (type === "adopt") {
+        isAdopt = "0";
+      } else if (type === "failed") {
+        isAdopt = "1";
+      }
       this.$refs.add_ref.validate((valid) => {
         if (valid) {
           let reqdata = [
             {
               ...this.add_form,
               procId: "729294602773110788",
-              draft: "1",
+              draft: draft,
               num: "1",
             },
           ];
           if (!this.approve_visible) {
-            // 编辑
+            // 编辑/新增
             this.$http({
               url: "/mkWangge/saveOrUpdateList",
               method: "post",
@@ -470,21 +508,16 @@ export default {
               data: reqdata,
             }).then((res) => {
               console.log(res);
-            });
-            this.handleInit({
-              ...this.table_search,
-              type: "0",
-              page: this.page,
-              pageSize: this.rows,
+              this.handleInit();
             });
           } else {
             // 审批
             let reqdata = {
               ids: this.ids,
               remark: this.add_form.remark,
-              type: '0'
-            }
-            console.log(reqdata,'reqdata');
+              type: isAdopt,
+            };
+            console.log(reqdata, "reqdata");
             this.$http({
               url: "/mkWangge/review",
               method: "post",
@@ -492,13 +525,16 @@ export default {
                 "Content-Type": "application/json",
               },
               data: {
-                ...reqdata
+                ...reqdata,
               },
+            }).then((res) => {
+              console.log(res);
+              this.handleInit();
             });
           }
-
           this.edit_visible = false;
           this.add_visible = false;
+          this.fileInfo.fileList = []
         }
       });
     },
@@ -531,18 +567,22 @@ export default {
               type: "success",
             });
           }
+          this.handleInit();
         });
         this.handleVisible("summary");
       }
     },
     handleChange(page) {
       this.page = page;
-      this.handleInit({
-        ...this.table_search,
-        type: "0",
-        page: this.page,
-        pageSize: this.rows,
-      });
+      this.handleInit();
+    },
+    handleSelectFilter(row) {
+      // 过滤可被选中的数组
+      if (row.parentLevel === "1") {
+        return false;
+      } else {
+        return true;
+      }
     },
   },
 };

+ 177 - 155
src/pages/main/performance/components/table.vue

@@ -2,173 +2,195 @@
  * @Author       : yuanrunwei
  * @Date         : 2021-11-01 18:02:58
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-01-11 18:29:51
- * @FilePath     : \spfm-market-front\src\pages\main\performance\components\table.vue
+ * @LastEditTime: 2022-01-11 18:39:32
+ * @FilePath     : /spfm-market-front/src/pages/main/performance/components/table.vue
 -->
 <template>
-  <el-table class="simple-table" :data="computed_list" v-loading="loading" @selection-change="handleSelectionChange">
-    <el-table-column type="selection" width="55" v-if="multiple" />
-    <el-table-column
-      v-for="(
-        { props, label, type, width, align, children, dictionary, variable }, index
-      ) in config"
-      :key="index"
-      :prop="props"
-      :width="width"
-      :label="label"
-      :align="align || 'center'"
+    <el-table
+        class="simple-table"
+        :data="computed_list"
+        v-loading="loading"
+        @selection-change="handleSelectionChange"
     >
-      <template #default="scope">
-        <div v-if="type === 'edit'">
-          <el-input
-            v-if="scope.row[`edit`]"
-            v-model="scope.row[props]"
-            autosize
-            type="textarea"
-            @change="handleModify"
-          />
-        </div>
-        <div v-if="type === 'number'">{{ scope.$index + 1 }}</div>
-        <div v-else-if="type === 'textarea'">
-          <pre class="simple-table-break">{{ scope.row[props] }}</pre>
-        </div>
-        <div v-else-if="type === 'date'">
-          <div>{{ $formatDate(scope.row[props], "YYYY-MM-DD") }}</div>
-        </div>
-        <div v-else-if="type === 'time'">
-          <div>{{ $formatDate(scope.row[props], "YYYY-MM-DD HH:00:00") }}</div>
-        </div>
-        <div v-else-if="type === 'click'">
-          <div
-            class="simple-table-click cursor-pointer"
-            @click="handleClick(props, scope.row)"
-          >
-            {{ scope.row[props] }}
-          </div>
-        </div>
-        <div v-else-if="type === 'dictionary'">
-          {{ dictionary[scope.row[props]] }}
-        </div>
-        <div v-else>{{ scope.row[props] }}</div>
-      </template>
-      <template v-if="children">
         <el-table-column
-          v-for="({ props, label, width, align, type }, index) in children"
-          :key="index"
-          :prop="props"
-          :width="width"
-          :label="label"
-          :align="align || 'center'"
+            type="selection"
+            width="55"
+            :selectable="selectable"
+            v-if="multiple"
+        />
+        <el-table-column
+            v-for="(
+                { props, label, type, width, align, children, dictionary },
+                index
+            ) in config"
+            :key="index"
+            :prop="props"
+            :width="width"
+            :label="label"
+            :align="align || 'center'"
         >
-          <template #default="scope">
-            <div v-if="type === 'edit'">
-              <el-input
-                v-model="scope.row[props]"
-                @change="handleModify"
-                autosize
-                type="textarea"
-              />
-            </div>
-            <div v-else>{{ scope.row[props] }}</div>
-          </template>
+            <template #default="scope">
+                <div v-if="type === 'edit'">
+                    <el-input
+                        v-if="scope.row[`edit`]"
+                        v-model="scope.row[props]"
+                        autosize
+                        type="textarea"
+                        @change="handleModify"
+                    />
+                </div>
+                <div v-if="type === 'number'">{{ scope.$index + 1 }}</div>
+                <div v-else-if="type === 'textarea'">
+                    <pre class="simple-table-break">{{ scope.row[props] }}</pre>
+                </div>
+                <div v-else-if="type === 'date'">
+                    <div>{{ $formatDate(scope.row[props], "YYYY-MM-DD") }}</div>
+                </div>
+                <div v-else-if="type === 'time'">
+                    <div>
+                        {{
+                            $formatDate(scope.row[props], "YYYY-MM-DD HH:00:00")
+                        }}
+                    </div>
+                </div>
+                <div v-else-if="type === 'click'">
+                    <div
+                        class="simple-table-click cursor-pointer"
+                        @click="handleClick(props, scope.row)"
+                    >
+                        {{ scope.row[props] }}
+                    </div>
+                </div>
+                <div v-else-if="type === 'dictionary'">
+                    {{ dictionary[scope.row[props]] }}
+                </div>
+                <div v-else>{{ scope.row[props] }}</div>
+            </template>
+            <template v-if="children">
+                <el-table-column
+                    v-for="(
+                        { props, label, width, align, type }, index
+                    ) in children"
+                    :key="index"
+                    :prop="props"
+                    :width="width"
+                    :label="label"
+                    :align="align || 'center'"
+                >
+                    <template #default="scope">
+                        <div v-if="type === 'edit'">
+                            <el-input
+                                v-model="scope.row[props]"
+                                @change="handleModify"
+                                autosize
+                                type="textarea"
+                            />
+                        </div>
+                        <div v-else>{{ scope.row[props] }}</div>
+                    </template>
+                </el-table-column>
+            </template>
         </el-table-column>
-      </template>
-      <template v-if="variable">
-        <div>{{ scope.row[props] }}</div>
-      </template>
-    </el-table-column>
-    <el-table-column
-      v-if="handleRow.length"
-      label="操作"
-      :align="'center'"
-      :width="handleRow.length * 50"
-    >
-      <template slot-scope="scope">
-        <span
-          v-for="({ label, props, popconfirm, visible }, index) in handleRow"
-          :key="index"
-          class="padding-right-5"
+        <el-table-column
+            v-if="handleRow.length"
+            label="操作"
+            :align="'center'"
+            :width="handleRow.length * 50"
         >
-          <span v-if="handleFormat(visible, scope.row)">
-            <el-popconfirm
-              v-if="popconfirm"
-              :title="`确定要${label}吗?`"
-              @onConfirm="handleClick(props, scope.row)"
-              @cancel="handleCancel"
-            >
-              <el-button slot="reference" type="text" size="small">{{
-                label
-              }}</el-button>
-            </el-popconfirm>
-            <el-button
-              v-else
-              @click="handleClick(props, scope.row)"
-              type="text"
-              size="small"
-              >{{ label }}</el-button
-            >
-          </span>
-        </span>
-      </template>
-    </el-table-column>
-  </el-table>
+            <template slot-scope="scope">
+                <span
+                    v-for="(
+                        { label, props, popconfirm, visible }, index
+                    ) in handleRow"
+                    :key="index"
+                    class="padding-right-5"
+                >
+                    <span v-if="handleFormat(visible, scope.row)">
+                        <el-popconfirm
+                            v-if="popconfirm"
+                            :title="`确定要${label}吗?`"
+                            @onConfirm="handleClick(props, scope.row)"
+                            @cancel="handleCancel"
+                        >
+                            <el-button
+                                slot="reference"
+                                type="text"
+                                size="small"
+                                >{{ label }}</el-button
+                            >
+                        </el-popconfirm>
+                        <el-button
+                            v-else
+                            @click="handleClick(props, scope.row)"
+                            type="text"
+                            size="small"
+                            >{{ label }}</el-button
+                        >
+                    </span>
+                </span>
+            </template>
+        </el-table-column>
+    </el-table>
 </template>
 <script>
 export default {
-  props: {
-    list: {
-      type: Array,
-      default: () => [],
-    },
-    config: {
-      type: Array,
-      default: () => [],
-    },
-    multiple: {
-      type: Boolean,
-      default: false,
-    },
-    loading: {
-      type: Boolean,
-      default: false,
-    },
-    handleRow: {
-      type: Array,
-      default: () => [],
-    },
-  },
-  computed: {
-    computed_list() {
-      return this.list.map((element) => ({
-        ...element,
-      }));
-    },
-  },
-  methods: {
-    handleFormat(params, data) {
-      let visible = true;
-      if (params) {
-        visible = false;
-        Object.keys(params).forEach((element) => {
-          if (params[element].includes(data[element])) {
-            visible = true;
-          }
-        });
-      }
-      return visible;
-    },
-    handleClick(props, row) {
-      this.$emit(props, row);
-    },
-    handleCancel() {
-      console.log("我被关闭了");
+    props: {
+        list: {
+            type: Array,
+            default: () => [],
+        },
+        config: {
+            type: Array,
+            default: () => [],
+        },
+        multiple: {
+            type: Boolean,
+            default: false,
+        },
+        selectable: {
+            type: Function,
+        },
+        loading: {
+            type: Boolean,
+            default: false,
+        },
+        handleRow: {
+            type: Array,
+            default: () => [],
+        },
     },
-    handleSelectionChange(val) {
-      this.$emit("selection", val);
+    computed: {
+        computed_list() {
+            return this.list.map((element) => ({
+                ...element,
+            }));
+        },
     },
-    handleModify() {
-      this.$emit("modify", this.computed_list);
+    methods: {
+        handleFormat(params, data) {
+            let visible = true;
+            if (params) {
+                visible = false;
+                Object.keys(params).forEach((element) => {
+                    if (params[element].includes(data[element])) {
+                        visible = true;
+                    }
+                });
+            }
+            return visible;
+        },
+        handleClick(props, row) {
+            this.$emit(props, row);
+        },
+        handleCancel() {
+            console.log("我被关闭了");
+        },
+        handleSelectionChange(val) {
+            this.$emit("selection", val);
+        },
+        handleModify() {
+            this.$emit("modify", this.computed_list);
+        },
     },
-  },
 };
 </script>