From 4b0a2b3cdfb99bc4ecc9fce6390b9ec6f4c4a2e5 Mon Sep 17 00:00:00 2001
From: Tcsm <1377977403@qq.com>
Date: 星期四, 18 五月 2023 22:58:21 +0800
Subject: [PATCH] 接上了个人自传的内容

---
 ruoyi-ui/src/views/contacts/index.vue |   33 +++++++++++++++++++++------------
 1 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/ruoyi-ui/src/views/contacts/index.vue b/ruoyi-ui/src/views/contacts/index.vue
index 8662717..fcdbe5f 100644
--- a/ruoyi-ui/src/views/contacts/index.vue
+++ b/ruoyi-ui/src/views/contacts/index.vue
@@ -117,7 +117,7 @@
             plain
             icon="el-icon-download"
             size="mini"
-            @click="handleExport"
+            @click="handleExportTemplate"
             v-hasPermi="['family:note:export']"
           >瀵煎叆妯℃澘涓嬭浇</el-button>
         </el-col>
@@ -140,9 +140,9 @@
     </el-row>
 
   </div>
-    <el-table v-loading="loading" :data="contactList"  @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
-      <el-table-column type="selection" width="25"  align="center" />
-      <el-table-column  fixed label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
+    <el-table v-loading="loading" :data="contactList"  :row-key="getRowId" ref="multipleTable"  @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
+      <el-table-column type="selection" :reserve-selection="true" width="25"  align="center" />
+      <el-table-column fixed label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
 
       <el-table-column label="鎴愬憳濮撳悕" prop="myName" sortable width="160" >
         <template slot-scope="scope">
@@ -220,19 +220,12 @@
             @click="handleDelete(scope.row)"
             v-hasPermi="['system:role:remove']"
           >鍒犻櫎</el-button>
-
            <el-button
              size="mini"
              type="text"
              icon="el-icon-d-arrow-right"
              @click="handleCheck(scope.row)">
 鏌ョ湅璇︽儏</el-button>
-
-
-
-
-
-
         </template>
       </el-table-column>
     </el-table>
@@ -543,7 +536,10 @@
       this.open = false;
       this.reset();
     },
-
+    getRowId(row)
+    {
+      return row.id
+    },
     //闅旇鍙樿壊
     tableRowClassName({ row, rowIndex }) {
       if (rowIndex % 2 == 0) {
@@ -728,9 +724,22 @@
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
+      const Ids = this.ids;
+
+      if(Ids.length==0)
+      {
       this.download('zfContact/export', {
         ...this.queryParams
       }, `zfContact_${new Date().getTime()}.xlsx`)
+      }else{
+        this.download('zfContact/export1/'+Ids, {
+        }, `zfContact_${new Date().getTime()}.xlsx`)
+      }
+    },
+    handleExportTemplate(){
+      this.download('zfContact/model', {
+        ...this.queryParams
+      }, `zfContact_${new Date().getTime()}.xlsx`)
     },
     /** 瀵煎叆鎿嶄綔*/
     handleEnport(params){

--
Gitblit v1.9.1