From 4efd39b4696db81789d3d92a54d197f1e85ecdf2 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期三, 17 五月 2023 17:01:43 +0800
Subject: [PATCH] 把所有模块的导入模板和导出问题都解决了

---
 ruoyi-ui/src/views/device/index.vue     |   29 +++
 ruoyi-ui/src/views/bignote/index.vue    |   32 +++
 ruoyi-ui/src/views/contacts/index.vue   |   24 ++
 ruoyi-ui/src/views/clean/index.vue      |  134 ++++++++++--------
 ruoyi-ui/src/views/economy/index.vue    |   29 +++
 ruoyi-ui/src/views/pet/index.vue        |   36 +++-
 ruoyi-ui/src/views/note/index.vue       |   27 +++
 ruoyi-ui/src/views/collection/index.vue |   36 +++-
 ruoyi-ui/src/views/doctor/index.vue     |   27 +++
 9 files changed, 265 insertions(+), 109 deletions(-)

diff --git a/ruoyi-ui/src/views/bignote/index.vue b/ruoyi-ui/src/views/bignote/index.vue
index 7705a6e..d52b55f 100644
--- a/ruoyi-ui/src/views/bignote/index.vue
+++ b/ruoyi-ui/src/views/bignote/index.vue
@@ -120,7 +120,7 @@
           plain
           icon="el-icon-download"
           size="mini"
-          @click="handleExport"
+          @click="handleExportTemplate"
           v-hasPermi="['family:note:export']"
         >瀵煎叆妯℃澘涓嬭浇</el-button>
       </el-col>
@@ -144,8 +144,8 @@
     </el-row>
     <!-- 搴忓彿銆佹椂闂淬�佷汉鐗┿�佸湴鐐广�佸ぇ浜嬫爣棰樸�佺數瀛愭枃浠躲�佸娉� -->
     <!-- 杩欓噷鏈変釜familyList鏁扮粍 鏄湪data()涓畾涔夌殑 -->
-    <el-table v-loading="loading"  :data="familyList" @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName">
-      <el-table-column type="selection" width="55"  align="center" />
+    <el-table v-loading="loading"  :data="familyList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName">
+      <el-table-column type="selection"  :reserve-selection="true" width="55"  align="center" />
 
       <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
       <el-table-column label="鍙戠敓鏃堕棿" prop="happenTime" sortable width="100" align="center">
@@ -443,7 +443,10 @@
       this.open = false;
       this.reset();
     },
-
+    getRowId(row)
+    {
+      return row.id
+    },
     //闅旇鍙樿壊
     tableRowClassName({ row, rowIndex }) {
       if (rowIndex % 2 == 0) {
@@ -523,7 +526,7 @@
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      console.log(this.ids)
+    //  alert(this.ids)
       this.single = selection.length!=1
       this.multiple = !selection.length
     },
@@ -606,17 +609,35 @@
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete(row) {
       const Ids = row.id || this.ids;
+
       this.$modal.confirm('鏄惁纭鍒犻櫎鎵�閫変腑鏁版嵁椤癸紵').then(function() {
         return delFamilyevent(Ids);
       }).then(() => {
         this.getList();
+        this.ids = []
         this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
       }).catch(() => {});
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
+        const Ids = this.ids;
+
+      if(Ids.length==0)
+      {
       this.download('/family/zfEvent/export', {
         ...this.queryParams
+      }, `zfEvent_${new Date().getTime()}.xlsx`)
+      }
+      else{
+        this.download('/family/zfEvent/export1/'+Ids, {
+        }, `zfEvent_${new Date().getTime()}.xlsx`)
+      }
+      },
+        /** 瀵煎叆妯℃澘涓嬭浇鎿嶄綔*/
+    handleExportTemplate()
+    {
+     this.download('/family/zfEvent/model', {
+
       }, `zfEvent_${new Date().getTime()}.xlsx`)
     },
     /** 瀵煎叆鎿嶄綔*/
@@ -635,6 +656,7 @@
       }
 
     }
+
   }
 };
 </script>
diff --git a/ruoyi-ui/src/views/clean/index.vue b/ruoyi-ui/src/views/clean/index.vue
index 2bd5233..83e2ead 100644
--- a/ruoyi-ui/src/views/clean/index.vue
+++ b/ruoyi-ui/src/views/clean/index.vue
@@ -52,7 +52,7 @@
             border-radius: 6px 6px 6px 6px;opacity:1;">閲嶇疆</el-button>
         </el-form-item>
       </el-form>
-  
+
       <el-row :gutter="10" class="mb8">
         <el-col :span="1.5">
           <el-button
@@ -64,7 +64,7 @@
             v-hasPermi="['system:role:add']"
           >鏂板</el-button>
         </el-col>
-  
+
         <el-col :span="1.5">
           <el-button
             type="danger"
@@ -86,14 +86,14 @@
             v-hasPermi="['family:note:export']"
           >瀵煎嚭</el-button>
      </el-col>
-  
+
           <el-col :span="1.5">
             <el-button
               type="warning"
               plain
               icon="el-icon-download"
               size="mini"
-              @click="handleExport"
+              @click="handleExportTemplate"
               v-hasPermi="['family:note:export']"
             >瀵煎叆妯℃澘涓嬭浇</el-button>
           </el-col>
@@ -107,22 +107,23 @@
               <el-button size="mini"   type="primary"
               plain
               icon="el-icon-plus" >瀵煎叆</el-button>
-  
+
             </el-upload>
           </el-col>
-  
+
         <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
       </el-row>
-  
-      <el-table v-loading="loading" :data="cleanList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
-        <el-table-column type="selection" width="55"  align="center" />
+
+      <el-table v-loading="loading" :data="cleanList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
+        <el-table-column type="selection" :reserve-selection="true"  width="55"  align="center" />
+        <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
+
         <el-table-column label="绫诲瀷" prop="kind" sortable width="120" >
           <template slot-scope="scope">
           {{ getSrc1(scope.row.kind) }}
            </template>
           </el-table-column>
-        <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
-        <el-table-column label="閫傜敤浜�" prop="suitable" sortable :show-overflow-tooltip="true" width="150" />
+       <el-table-column label="閫傜敤浜�" prop="suitable" sortable :show-overflow-tooltip="true" width="150" />
         <el-table-column label="绫诲埆" prop="type" sortable width="100" />
         <el-table-column label="淇濇磥鏂规硶" prop="method" sortable width="100" />
         <el-table-column label="鏉愭枡瀛樻斁鍦�" prop="location" sortable width="120" />
@@ -176,7 +177,7 @@
         </template>
       </el-table-column>
       </el-table>
-  
+
       <pagination
         v-show="total>0"
         :total="total"
@@ -185,11 +186,11 @@
         @pagination="getList"
         style="background: #FEF7FC;"
       />
-  
+
       <!-- 娣诲姞鎴栦慨鏀硅祫浜т俊鎭厤缃璇濇 -->
       <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
         <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px">
-  
+
             <el-form-item label="绫诲瀷" prop="kind">
         <el-select v-model="formDat.kind" placeholder="璇烽�夋嫨绫诲瀷" clearable :style="{width: '100%'}"  >
           <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"
@@ -221,11 +222,11 @@
             <el-input v-model="formDat.location" placeholder="璇疯緭鍏ユ斁缃湴鐐�" clearable :style="{width: '100%'}" >
             </el-input>
           </el-form-item>
-  
+
           <el-form-item label="澶囨敞" prop="remark">
             <el-input v-model="formDat.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" ></el-input>
           </el-form-item>
-  
+
           <h4 class="form-header">鐩稿叧鍥剧墖 </h4>
           <el-upload
             action="#"
@@ -251,7 +252,7 @@
           >
             <i class="el-icon-zoom-in"></i>
           </span>
-  
+
           <span
             v-if="!disabled"
             class="el-upload-list__item-delete"
@@ -260,8 +261,8 @@
             <i class="el-icon-delete"></i>
           </span>
         </span>
-  
-  
+
+
             </div>
           </el-upload>
           <h4 class="form-header">鍏朵粬闄勪欢 </h4>
@@ -270,7 +271,7 @@
             :file-list="fileListOther"
             class="upload-demo"
             multiple
-  
+
             :on-remove="handleRemove"
             :http-request="requestUpload"
             :show-file-list="true"
@@ -281,30 +282,30 @@
               </div>
             </template>
           </el-upload>
-  
+
         </el-form>
         <h4 class="form-header"> </h4>
-  
+
         <div slot="footer" class="dialog-footer">
           <el-button type="primary" @click="submitDataScope">纭� 瀹�</el-button>
           <el-button @click="cancelData">鍙� 娑�</el-button>
         </div>
       </el-dialog>
-  
+
       <!-- 鍒嗛厤瑙掕壊鏁版嵁鏉冮檺瀵硅瘽妗� -->
       <el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body>
-  
+
       </el-dialog>
-  
+
     </div>
   </template>
-  
+
   <script>
   import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
   import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
-  
-  
-  
+
+
+
   //鍦╯ystem/note/index.js涓鍏ユ帴鍙e嚱鏁�
   import {listClean,enload,delClean, addClean, uploadPic} from "@/api/clean/index";
   export default {
@@ -314,7 +315,7 @@
       return {
         // 閬僵灞�
         disabled: false,
-  
+
         loading: true,
         formData:[],
         // 閫変腑鏁扮粍
@@ -346,7 +347,7 @@
         fileList:[
         ],
         fileListOther:[
-  
+
         ],
         dsb:true,
         btn:false,
@@ -360,7 +361,7 @@
           remark: undefined,
           happenTime: undefined,
           url: undefined,
-  
+
         },
         // 鑿滃崟鍒楄〃
         menuOptions: [],
@@ -429,7 +430,7 @@
     created() {
       this.getList();
       this.getCateInfor()
-  
+
     },
     methods: {
     //
@@ -445,7 +446,10 @@
         this.open = false;
         this.reset();
       },
-  
+    getRowId(row)
+    {
+      return row.id
+    },
       //闅旇鍙樿壊
       tableRowClassName({ row, rowIndex }) {
         if (rowIndex % 2 == 0) {
@@ -454,20 +458,20 @@
           return "statistics-warning-row";
         }
       },
-  
+
       /** 鏌ヨ瑙掕壊鍒楄〃 */
       getList() {
         this.loading = true;
         this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
         this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
-  
+
         // console.log(this.queryParams)
         //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
         listClean(this.queryParams).then(response => {
             //  alert(123)
             //   console.log(response.data)
             this.cleanList = response.data.data;
-  
+
             this.total = response.data.total;
             this.loading = false;
           }
@@ -478,13 +482,13 @@
       {
         let _this = this
         getCategory().then(response=>{
-  
+
           response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{
             _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]})
           })
         })
       },
-  
+
       handleRemove(file) {
         for(let i = 0; i < this.fileListOther.length; i++)
         {
@@ -543,7 +547,7 @@
         this.single = selection.length!=1
         this.multiple = !selection.length
       },
-  
+
       /** 鏂板鎸夐挳鎿嶄綔 */
       handleAdd() {
         this.reset();
@@ -559,7 +563,7 @@
       handleUpdate(row) {
         const id = row.id;
         let jd = true
-  
+
         this.$router.push({
           path:"/familymodel/clean/cleanInfo/" + id,
           query:{
@@ -567,14 +571,14 @@
           }
         });
       },
-  
-  
+
+
       handlePictureCardPreview(file) {
         this.dialogImageUrl = file.url;
         this.dialogVisible = true;
       },
       handleRemoveFile(file,) {
-  
+
   for(let i = 0; i < this.fileListOther.length; i++)
   {
     if(this.fileListOther[i].url==file.url)
@@ -583,7 +587,7 @@
 },
       /** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */
       submitDataScope: function() {
-  
+
         let ul = this.fileList.map(function (elem){
           return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
         }).join(",")
@@ -593,7 +597,7 @@
         this.formDat.url = ul+","+uls
         this.$refs["elForm"].validate(valid => {
           if (valid) {
-  
+
             addClean(this.formDat).then(response => {
               this.$modal.msgSuccess("鏂板鎴愬姛");
               this.open = false;
@@ -608,22 +612,22 @@
         var formData = new FormData();
         formData.append('uploadFile', file);
         let _this = this
-  
+
         uploadPic(formData).then(response => {
           let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
-  
+
           if(_this.fot.includes(pth) === true)
           {
             _this.fileList.push({name:response.data.fileName, "url":response.data.url})
-  
+
           }
-  
+
           else{
             _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
-  
+
           }
         })
-  
+
       },
       /** 鍒犻櫎鎸夐挳鎿嶄綔 */
       handleDelete(row) {
@@ -637,10 +641,25 @@
       },
       /** 瀵煎嚭鎸夐挳鎿嶄綔 */
       handleExport() {
-        this.download('/zfEconomy/export', {
+        const Ids = this.ids;
+
+        if(Ids.length==0)
+        {
+        this.download('/zfClean/export', {
           ...this.queryParams
         }, `clean_${new Date().getTime()}.xlsx`)
+        }else{
+          this.download('/zfClean/export1/'+Ids, {
+
+          }, `clean_${new Date().getTime()}.xlsx`)
+        }
       },
+      handleExportTemplate() {
+        this.download('/zfClean/model', {
+
+        }, `clean_${new Date().getTime()}.xlsx`)
+      },
+
       /** 瀵煎叆鎿嶄綔*/
       handleEnport(params){
       var file = params.file;
@@ -651,12 +670,12 @@
       enload(formData).then(response => {
          _this.getList();
         Message({ message: "瀵煎叆鎴愬姛", type: 'warning' })
-  
+
       }).catch(err)
       {
         Message({ message: "瀵煎叆澶辫触", type: 'error' })
       }
-  
+
       }
     }
   };
@@ -664,11 +683,10 @@
   <style>
   .el-table__row.statistics-warning-row {
     background: #E0EEFE;
-  
+
   }
   .el-table__row.statistics-warning-row1 {
     background: #FFEFF2;
-  
+
   }
   </style>
-  
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/collection/index.vue b/ruoyi-ui/src/views/collection/index.vue
index fe7572f..0b53229 100644
--- a/ruoyi-ui/src/views/collection/index.vue
+++ b/ruoyi-ui/src/views/collection/index.vue
@@ -196,8 +196,8 @@
         <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
       </el-row>
     </div>
-    <el-table v-loading="loading" :data="collectionList" @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 v-loading="loading" :data="collectionList" :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  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="60"/>
       <el-table-column label="鑾峰緱鏃堕棿" prop="happenTime" sortable width="100" align="center">
         <template slot-scope="scope">{{scope.row.happenTime? scope.row.happenTime: '鈥斺�斺�斺��'}}</template>
@@ -214,7 +214,7 @@
       <el-table-column label="鏉ユ簮" prop="source" sortable width="90" align="center" >
         <template slot-scope="scope">{{scope.row.source? scope.row.source: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
-      <el-table-column label="鎸佹湁鑰�" prop="owner" sortable width="110" align="center">
+      <el-table-column label="鎷ユ湁鑰�" prop="owner" sortable width="110" align="center">
         <template slot-scope="scope">{{scope.row.owner? scope.row.owner: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
       <el-table-column label="浠峰��" prop="price" sortable width="90" align="center">
@@ -223,7 +223,10 @@
       <el-table-column label="瀛樻斁浣嶇疆" prop="location" sortable width="130" align="center">
         <template slot-scope="scope">{{scope.row.location? scope.row.location: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
-      <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="80" >
+      <el-table-column label="澶囨敞" prop="remark" sortable width="90" align="center">
+        <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '鈥斺�斺�斺��'}}</template>
+      </el-table-column>
+      <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="180" >
         <template slot-scope="scope" >
           <img
             class="el-upload-list__item-thumbnail"
@@ -244,9 +247,7 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="澶囨敞" prop="remark" sortable width="90" align="center">
-        <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '鈥斺�斺�斺��'}}</template>
-      </el-table-column>
+
       <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" >
         <template slot-scope="scope" v-if="scope.row.roleId !== 1">
           <el-button
@@ -307,8 +308,8 @@
           <el-input v-model="formDat.source" placeholder="璇疯緭鍏ユ潵婧�" clearable :style="{width: '100%'}" >
           </el-input>
         </el-form-item>
-        <el-form-item label="鎸佹湁鑰�" prop="owner">
-          <el-input v-model="formDat.owner" placeholder="璇疯緭鍏ユ寔鏈夎��" clearable :style="{width: '100%'}" >
+        <el-form-item label="鎷ユ湁鑰�" prop="owner">
+          <el-input v-model="formDat.owner" placeholder="璇疯緭鍏ユ嫢鏈夎��" clearable :style="{width: '100%'}" >
           </el-input>
         </el-form-item>
         <el-form-item label="浠锋牸" prop="price">
@@ -567,7 +568,10 @@
       this.open = false;
       this.reset();
     },
-
+    getRowId(row)
+    {
+      return row.id
+    },
     //闅旇鍙樿壊
     tableRowClassName({ row, rowIndex }) {
       if (rowIndex % 2 == 0) {
@@ -752,15 +756,23 @@
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
+      const Ids = this.ids;
+
+      if(Ids.length==0)
+      {
       this.download('zfCollection/export', {
         ...this.queryParams
       }, `zfCollection_${new Date().getTime()}.xlsx`)
+      }else{
+        this.download('zfCollection/export1/'+Ids, {
+        }, `zfCollection_${new Date().getTime()}.xlsx`)
+      }
     },
 
     /** 瀵煎叆妯℃澘涓嬭浇鎸夐挳鎿嶄綔 */
     handleExportModel() {
-      this.downloadModel('zfCollection/model', {
-        ...this.queryParams
+
+      this.download('/zfCollection/model', {
       }, `zfCollection_model_${new Date().getTime()}.xlsx`)
     },
 
diff --git a/ruoyi-ui/src/views/contacts/index.vue b/ruoyi-ui/src/views/contacts/index.vue
index 31d9577..d40a383 100644
--- a/ruoyi-ui/src/views/contacts/index.vue
+++ b/ruoyi-ui/src/views/contacts/index.vue
@@ -120,7 +120,7 @@
             plain
             icon="el-icon-download"
             size="mini"
-            @click="handleExport"
+            @click="handleExportTemplate"
             v-hasPermi="['family:note:export']"
           >瀵煎叆妯℃澘涓嬭浇</el-button>
         </el-col>
@@ -144,8 +144,8 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </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 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  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
 
       <el-table-column label="鎴愬憳濮撳悕" prop="myName" sortable width="100" >
@@ -549,7 +549,10 @@
       this.open = false;
       this.reset();
     },
-
+    getRowId(row)
+    {
+      return row.id
+    },
     //闅旇鍙樿壊
     tableRowClassName({ row, rowIndex }) {
       if (rowIndex % 2 == 0) {
@@ -734,9 +737,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){
diff --git a/ruoyi-ui/src/views/device/index.vue b/ruoyi-ui/src/views/device/index.vue
index 2b64e80..1002cd0 100644
--- a/ruoyi-ui/src/views/device/index.vue
+++ b/ruoyi-ui/src/views/device/index.vue
@@ -99,7 +99,7 @@
           plain
           icon="el-icon-download"
           size="mini"
-          @click="handleExport"
+          @click="handleExportTemplate"
           v-hasPermi="['family:note:export']"
         >瀵煎叆妯℃澘涓嬭浇</el-button>
       </el-col>
@@ -123,8 +123,8 @@
     </el-row>
     <!-- 搴忓彿銆佽澶囧悕绉般�佹椂闂淬�佽喘涔颁汉銆佷簨椤瑰唴瀹广�佸瓨鏀惧湴鐐广�佺數瀛愭枃浠躲�佸娉� 鎿嶄綔-->
     <!-- 杩欓噷鏈変釜familyList鏁扮粍 鏄湪data()涓畾涔夌殑 -->
-    <el-table v-loading="loading" :data="equipmentList"  @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
-      <el-table-column type="selection" width="55"  align="center" />
+    <el-table v-loading="loading" :data="equipmentList"  :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="55"  align="center" />
       <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
       <el-table-column label="璁惧鍚嶇О" prop="name" sortable width="120" />
 
@@ -137,7 +137,7 @@
         </template>
       </el-table-column>
       <el-table-column label="璐拱浜�" prop="buyer" sortable width="100" />
-      <el-table-column label="鏍囬" prop="content" sortable :show-overflow-tooltip="true" width="150" />
+      <el-table-column label="浜嬮」鍐呭" prop="content" sortable :show-overflow-tooltip="true" width="150" />
       <el-table-column label="瀛樻斁鍦扮偣" prop="location" sortable width="100" />
 
       <el-table-column label="澶囨敞" prop="remark" sortable width="100" >
@@ -221,7 +221,7 @@
           <el-input v-model="formDat.buyer" placeholder="璇疯緭鍏ヨ喘涔颁汉" clearable :style="{width: '100%'}" >
           </el-input>
         </el-form-item>
-        <el-form-item label="鏍囬" prop="content">
+        <el-form-item label="浜嬮」鍐呭" prop="content">
           <el-input v-model="formDat.content" placeholder="璇疯緭鍏ヤ簨椤瑰唴瀹�" clearable :style="{width: '100%'}" ></el-input>
         </el-form-item>
         <el-form-item label="瀛樻斁鍦扮偣" prop="location">
@@ -569,7 +569,10 @@
         }
       });
     },
-
+getRowId(row)
+    {
+      return row.id
+    },
 
     handlePictureCardPreview(file) {
       this.dialogImageUrl = file.url;
@@ -631,9 +634,23 @@
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
+      const Ids = this.ids;
+      
+      if(Ids.length==0)
+      {
       this.download('/zfEquipment/export', {
         ...this.queryParams
       }, `zfEquiment_${new Date().getTime()}.xlsx`)
+      }
+      else{
+        this.download('/zfEquipment/export1/'+Ids, {
+        }, `zfEquiment_${new Date().getTime()}.xlsx`)
+      }
+    },
+    handleExportTemplate(){
+      this.download('/zfEquipment/model', {
+
+      }, `zfEquiment_${new Date().getTime()}.xlsx`)
     },
     /** 瀵煎叆鎿嶄綔*/
     handleEnport(params){
diff --git a/ruoyi-ui/src/views/doctor/index.vue b/ruoyi-ui/src/views/doctor/index.vue
index 14420ea..0dd8e12 100644
--- a/ruoyi-ui/src/views/doctor/index.vue
+++ b/ruoyi-ui/src/views/doctor/index.vue
@@ -164,7 +164,7 @@
             plain
             icon="el-icon-download"
             size="mini"
-            @click="handleExport"
+            @click="handleExportTemplate"
             v-hasPermi="['family:note:export']"
           >瀵煎叆妯℃澘涓嬭浇</el-button>
         </el-col>
@@ -186,8 +186,8 @@
         <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
       </el-row>
     </div>
-    <el-table v-loading="loading" :data="doctorList" @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 v-loading="loading" :data="doctorList" :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  label="搴忓彿" sortable type="index" align="center" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="60"/>
       <el-table-column label="绫诲瀷" prop="type" sortable width="80" align="center">
         <template slot-scope="scope">{{scope.row.type? scope.row.type: '鈥斺�斺�斺��'}}</template>
@@ -580,6 +580,10 @@
       this.open = false;
       this.reset();
     },
+    getRowId(row)
+    {
+      return row.id
+    },
     // 鍙栨秷鎸夐挳锛堟暟鎹潈闄愶級
     cancelDataScope() {
       this.openDataScope = false;
@@ -720,9 +724,24 @@
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
-      this.download('zfDoctor/export', {
+      const Ids = this.ids;
+      
+      if(Ids.length==0)
+      {
+      this.download('/zfDoctor/export', {
         ...this.queryParams
       }, `zfDoctor_${new Date().getTime()}.xlsx`)
+      }else{
+        this.download('/zfDoctor/export1/'+Ids, {
+ 
+        }, `zfDoctor_${new Date().getTime()}.xlsx`)
+      }
+    },
+
+    handleExportTemplate(){
+      this.download('/zfDoctor/model', {
+
+      }, `zfDoctor_${new Date().getTime()}.xlsx`)
     },
     /** 瀵煎叆鎿嶄綔*/
     handleEnport(params){
diff --git a/ruoyi-ui/src/views/economy/index.vue b/ruoyi-ui/src/views/economy/index.vue
index 5c818e4..5a00a83 100644
--- a/ruoyi-ui/src/views/economy/index.vue
+++ b/ruoyi-ui/src/views/economy/index.vue
@@ -86,7 +86,7 @@
           plain
           icon="el-icon-download"
           size="mini"
-          @click="handleExport"
+          @click="handleExportTemplate"
           v-hasPermi="['family:note:export']"
         >瀵煎叆妯℃澘涓嬭浇</el-button>
       </el-col>
@@ -107,8 +107,8 @@
     </el-row>
     <!-- 搴忓彿銆佸熀閲�/鍙拌处銆佹椂闂淬�佹敹鍏�/鏀嚭銆佺敤閫斻�佷娇鐢ㄤ汉銆佺幇閲�/鑷姩鎵e垝銆佷綑棰濄�佺數瀛愭枃浠躲�佸娉� 鎿嶄綔-->
     <!-- 杩欓噷鏈変釜familyList鏁扮粍 鏄湪data()涓畾涔夌殑 -->
-    <el-table v-loading="loading" :data="economyList"  @selection-change="handleSelectionChange" @row-click="handleCheck" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
-      <el-table-column type="selection" width="55"  align="center" />
+    <el-table v-loading="loading" :data="economyList"  :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" @row-click="handleCheck" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
+      <el-table-column type="selection"  :reserve-selection="true" width="55"  align="center" />
       <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
       <el-table-column label="鍩洪噾/鍙拌处" prop="type" sortable width="120" >
         <template slot-scope="scope">
@@ -118,7 +118,6 @@
       <el-table-column label="鍙戠敓鏃堕棿" prop="createTime" sortable width="100" align="center">
         <template slot-scope="scope">{{scope.row.createTime? scope.row.createTime: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
-      <el-table-column label="鍙拌处" prop="type" sortable width="100" />
       <el-table-column label="鏀跺叆/鏀嚭" prop="price" sortable width="100" />
       <el-table-column label="鐢ㄩ��" prop="useFor" sortable width="100" />
 
@@ -129,6 +128,7 @@
         </template>
       </el-table-column>
       <el-table-column label="浣欓" prop="balance" sortable width="100" />
+            <el-table-column label="澶囨敞" prop="remark" sortable width="100" />
       <el-table-column label="鐢靛瓙鏂囦欢" prop="url" align="center" sortable  width="110" >
         <template slot-scope="scope" >
           <img
@@ -149,7 +149,7 @@
           >
         </template>
       </el-table-column>
-      <el-table-column label="澶囨敞" prop="remark" sortable width="100" />
+
       <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope" v-if="scope.row.roleId !== 1">
           <el-button
@@ -522,6 +522,10 @@
       this.open = false;
       this.reset();
     },
+    getRowId(row)
+    {
+      return row.id
+    },
     // 鍙栨秷鎸夐挳锛堟暟鎹潈闄愶級
     cancelDataScope() {
       this.openDataScope = false;
@@ -656,10 +660,24 @@
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
+      const Ids = this.ids;
+
+      if(Ids.length==0)
+      {
       this.download('/zfEconomy/export', {
         ...this.queryParams
       }, `zfEconomy_${new Date().getTime()}.xlsx`)
+      }else
+      {
+        this.download('/zfEconomy/export1/'+Ids, {
+        }, `zfEconomy_${new Date().getTime()}.xlsx`)
+      }
     }
+  ,
+  handleExportTemplate(){
+      this.download('/zfEconomy/model', {
+
+      }, `zfEconomy_${new Date().getTime()}.xlsx`)
   },
   /** 瀵煎叆鎿嶄綔*/
   handleEnport(params){
@@ -678,6 +696,7 @@
     }
 
   }
+  }
 
 };
 </script>
diff --git a/ruoyi-ui/src/views/note/index.vue b/ruoyi-ui/src/views/note/index.vue
index 0697987..a8eab94 100644
--- a/ruoyi-ui/src/views/note/index.vue
+++ b/ruoyi-ui/src/views/note/index.vue
@@ -106,7 +106,7 @@
 		    plain
 		    icon="el-icon-download"
 		    size="mini"
-		    @click="handleExport"
+		    @click="handleExportTemplate"
 		    v-hasPermi="['family:note:export']"
 		  >瀵煎叆妯℃澘涓嬭浇</el-button>
 		</el-col>
@@ -127,8 +127,8 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="propertyList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
-      <el-table-column type="selection" width="55"  align="center" />
+    <el-table v-loading="loading" :data="propertyList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
+      <el-table-column type="selection" :reserve-selection="true" width="55"  align="center" />
 
       <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
 
@@ -432,7 +432,10 @@
       this.open = false;
       this.reset();
     },
-
+    getRowId(row)
+    {
+      return row.id
+    },
     //闅旇鍙樿壊
     tableRowClassName({ row, rowIndex }) {
       if (rowIndex % 2 == 0) {
@@ -612,8 +615,22 @@
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
+      const Ids = this.ids;
+
+      if(Ids.length==0)
+      {
       this.download('family/property/export', {
         ...this.queryParams
+      }, `property_${new Date().getTime()}.xlsx`)
+      }else{
+        this.download('family/property/export1/'+Ids, {
+          ...this.queryParams
+        }, `property_${new Date().getTime()}.xlsx`)
+      }
+    },
+    handleExportTemplate(){
+      this.download('family/property/model', {
+
       }, `property_${new Date().getTime()}.xlsx`)
     },
     /** 瀵煎叆鎿嶄綔*/
@@ -622,7 +639,7 @@
     var formData = new FormData();
     formData.append('excelImport', file);
     let _this = this
-    alert(file)
+
     enload(formData).then(response => {
        _this.getList();
       Message({ message: "瀵煎叆鎴愬姛", type: 'warning' })
diff --git a/ruoyi-ui/src/views/pet/index.vue b/ruoyi-ui/src/views/pet/index.vue
index cec544d..6719690 100644
--- a/ruoyi-ui/src/views/pet/index.vue
+++ b/ruoyi-ui/src/views/pet/index.vue
@@ -111,7 +111,7 @@
 		    plain
 		    icon="el-icon-download"
 		    size="mini"
-		    @click="handleExport"
+		    @click="handleExportTemplate"
 		    v-hasPermi="['family:note:export']"
 		  >瀵煎叆妯℃澘涓嬭浇</el-button>
 		</el-col>
@@ -132,8 +132,8 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="petList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
-      <el-table-column type="selection" width="55"  align="center" />
+    <el-table v-loading="loading" :data="petList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
+      <el-table-column type="selection" :reserve-selection="true" width="55"  align="center" />
 
       <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
 
@@ -156,7 +156,7 @@
           <span>{{ parseTime(scope.row.birth) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="瀹犵墿id" prop="id" sortable width="100" />
+
       <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope" v-if="scope.row.roleId !== 1">
           <el-button
@@ -423,7 +423,7 @@
   },
   created() {
     this.getList();
-    this.getCateInfor()
+  //  this.getCateInfor()
 
   },
   methods: {
@@ -456,12 +456,9 @@
       this.loading = true;
       this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
       this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
-
       // console.log(this.queryParams)
       //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
       listPet(this.queryParams).then(response => {
-          //  alert(123)
-          //   console.log(response.data)
           this.petList = response.data.data;
 
           this.total = response.data.total;
@@ -487,6 +484,10 @@
         if(this.fileListOther[i].url==file.url)
           this.$delete(this.fileListOther,i);
       }
+    },
+    getRowId(row)
+    {
+      return row.id
     },
     // 鍙栨秷鎸夐挳
     cancel() {
@@ -625,10 +626,25 @@
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
-      this.download('family/property/export', {
+      const Ids = this.ids;
+      
+      if(Ids.length==0)
+      {
+      this.download('/family/property/export', {
         ...this.queryParams
-      }, `property_${new Date().getTime()}.xlsx`)
+      }, `pet_${new Date().getTime()}.xlsx`)
+      }else{
+        this.download('/family/property/export1/'+Ids, {
+          
+        }, `pet_${new Date().getTime()}.xlsx`)
+      }
     },
+	handleExportTemplate()
+	{
+		this.download('/family/property/model', {
+		  ...this.queryParams
+		}, `pet_${new Date().getTime()}.xlsx`)
+	},
     /** 瀵煎叆鎿嶄綔*/
     handleEnport(params){
     var file = params.file;

--
Gitblit v1.9.1