From f6316c7663903ef495bb1dfa8f8395f75fcf7f04 Mon Sep 17 00:00:00 2001 From: linwenling <3256558519@qq.com> Date: 星期四, 25 五月 2023 17:10:04 +0800 Subject: [PATCH] 修改家庭收支 --- ruoyi-ui/src/views/doctor/index.vue | 33 +++++++++++++++++++++++++++------ 1 files changed, 27 insertions(+), 6 deletions(-) diff --git a/ruoyi-ui/src/views/doctor/index.vue b/ruoyi-ui/src/views/doctor/index.vue index 42e32df..1c34e64 100644 --- a/ruoyi-ui/src/views/doctor/index.vue +++ b/ruoyi-ui/src/views/doctor/index.vue @@ -163,7 +163,7 @@ plain icon="el-icon-download" size="mini" - @click="handleExport" + @click="handleExportTemplate" v-hasPermi="['family:note:export']" >瀵煎叆妯℃澘涓嬭浇</el-button> </el-col> @@ -185,10 +185,12 @@ <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-column label="搴忓彿" sortable type="index" align="center" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="60"/> - <el-table-column label="绫诲瀷" prop="type" sortable width="120" 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 fixed 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> </el-table-column> <el-table-column label="鐥囩姸" prop="symptom" sortable :show-overflow-tooltip="true" width="120" align="center" > @@ -579,6 +581,10 @@ this.open = false; this.reset(); }, + getRowId(row) + { + return row.id + }, // 鍙栨秷鎸夐挳锛堟暟鎹潈闄愶級 cancelDataScope() { this.openDataScope = false; @@ -719,9 +725,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){ -- Gitblit v1.9.1