zs 3 anni fa
parent
commit
19a061d059
1 ha cambiato i file con 23 aggiunte e 7 eliminazioni
  1. 23 7
      src/views/menu/apply_examine/index.vue

+ 23 - 7
src/views/menu/apply_examine/index.vue

@@ -3,7 +3,20 @@
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight">
         <el-col :span="24" class="one">
-          <data-table @query="search" :fields="fields" :opera="opera" :data="list" :total="total" @view="toView" @export="toExport">
+          <data-table
+            @query="search"
+            :fields="fields"
+            :opera="opera"
+            :data="list"
+            :total="total"
+            @view="toView"
+            :select="true"
+            :selected="selected"
+            @handleSelect="handleSelect"
+          >
+            <template #selfbtn>
+              <el-button type="primary" size="mini" @click="toExport()">导出</el-button>
+            </template>
             <template #options="{ item }">
               <template v-if="item.prop == 'status_name'">
                 <el-option v-for="item in statusList" :key="item.label" :label="item.label" :value="item.label"></el-option>
@@ -42,10 +55,7 @@ export default {
         { label: '审核状态', prop: 'status_name', filter: 'select' },
       ],
       //操作项
-      opera: [
-        { label: '详细信息', method: 'view' },
-        { label: '导出数据', method: 'export', type: 'success' },
-      ],
+      opera: [{ label: '详情', method: 'view' }],
       //表格数据
       list: [
         {
@@ -61,6 +71,8 @@ export default {
       ],
       // 列表数据总数
       total: 0,
+      // 多选值
+      selected: [],
       //弹框
       dialog: { title: '详细信息', show: false, type: '1' },
       form: { order: [] },
@@ -80,8 +92,12 @@ export default {
       this.dialog = { title: '详细信息', show: true, type: '2', widths: '40%' };
     },
     //导出数据
-    async toExport({ data }) {
-      this.dialog = { title: '导出条件', show: true, type: '1', widths: '40%' };
+    async toExport() {
+      console.log(this.selected);
+    },
+    // 多选
+    handleSelect(data) {
+      this.$set(this, `selected`, data);
     },
     // 提交保存,创建/修改
     async toSave({ data }) {