From b2f9340443b60b9f3912bdab6a1daa8f61471c02 Mon Sep 17 00:00:00 2001 From: linwenling <3256558519@qq.com> Date: 星期二, 16 五月 2023 03:24:16 +0800 Subject: [PATCH] 修改家庭收支台账bug --- ruoyi-ui/src/views/collection/index.vue | 85 +++++++++++++++++++++++++++++++++++------- 1 files changed, 70 insertions(+), 15 deletions(-) diff --git a/ruoyi-ui/src/views/collection/index.vue b/ruoyi-ui/src/views/collection/index.vue index aa06d9f..13760c7 100644 --- a/ruoyi-ui/src/views/collection/index.vue +++ b/ruoyi-ui/src/views/collection/index.vue @@ -85,10 +85,10 @@ </el-form-item> </el-col> </el-cntainer> - <el-form-item label="鎸佹湁鑰�" prop="owner" > + <el-form-item label="鎷ユ湁鑰�" prop="owner" > <el-input v-model="queryParams.owner" - placeholder="璇疯緭鍏ユ寔鏈夎��" + placeholder="璇疯緭鍏ユ嫢鏈夎��" clearable style="width: 240px" @keyup.enter.native="handleQuery"> @@ -151,12 +151,37 @@ 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" + v-hasPermi="['family:note:export']" + >瀵煎叆妯℃澘涓嬭浇</el-button> + </el-col> + <el-col :span="1.2"> + + <el-upload + action="" + + class="upload-demo" + :show-file-list="false" + :http-request="handleEnport" + > + <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> </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 v-loading="loading" :data="collectionList" @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="25" align="center" /> -<!-- <el-table-column label="搴忓彿" prop="id" sortable width="80" />--> + <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> </el-table-column> @@ -178,18 +203,28 @@ <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" align="center" sortable width="110" > - <template slot-scope="scope"> -<!-- <el-image style="width: 100px; height: 100px" :src="'http://47.93.189.255:8080/'+ scope.row.url" fit="cover"></el-image>--> - <span v-if= "scope.row.url ==null" ><img src="../../assets/images/鏂囦欢澶�-0.png" /></span> - - <span v-else><img src="../../assets/images/鏂囦欢澶�-1.png" /></span> - + <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="80" > + <template slot-scope="scope" > + <img + class="el-upload-list__item-thumbnail" + src="../../assets/images/deviceLis.png" + alt="" + style="width: 35px; height: 35px;" + fit="cover" + v-if="scope.row.url !== ','" + > + <img + class="el-upload-list__item-thumbnail" + src="../../assets/images/deviceA.png" + alt="" + style="width: 35px; height: 35px;" + fit="cover" + v-if="scope.row.url === ','" + > </template> </el-table-column> - - <el-table-column label="澶囨敞" prop="remark" sortable width="140" align="center"> + <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" > @@ -217,6 +252,7 @@ type="text" icon="el-icon-d-arrow-right" @click="handleCheck(scope.row)" + >鏌ョ湅璇︽儏</el-button> </el-dropdown> @@ -229,6 +265,7 @@ :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" + style="background: #FEF7FC;" @pagination="getList" /> @@ -242,8 +279,6 @@ <el-input v-model="formDat.type" placeholder="璇疯緭鍏ョ被鍒�" clearable :style="{width: '100%'}" > </el-input> </el-form-item> - - <el-form-item label="鍚嶇О" prop="name"> <el-input v-model="formDat.name" placeholder="璇疯緭鍏ュ悕绉�" clearable :style="{width: '100%'}" > </el-input> @@ -350,6 +385,8 @@ //瀵煎叆鎺ュ彛鍑芥暟 import {listCollection, getCollection, addCollection,updateCollection, delCollection,uploadPic} from "@/api/collection/index"; +import {enload} from "@/api/doctor"; +import {Message} from "element-ui"; export default { @@ -602,6 +639,7 @@ handleCheck(row){ const id = row.id; this.$router.push("/familymodel/collection/collectionInfo/" + id); + }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { @@ -680,11 +718,28 @@ this.download('zfCollection/export', { ...this.queryParams }, `zfCollection_${new Date().getTime()}.xlsx`) + }, + /** 瀵煎叆鎿嶄綔*/ + handleEnport(params){ + var file = params.file; + var formData = new FormData(); + formData.append('excelImport', file); + let _this = this + + enload(formData).then(response => { + _this.getList(); + Message({ message: "瀵煎叆鎴愬姛", type: 'warning' }) + + }).catch(() => { Message({ message: "瀵煎叆澶辫触", type: 'error' })}); + } } }; </script> <style> +.app-container{ + background-color: #FEF7FC; +} .el-table__row.statistics-warning-row { background: #E0EEFE; -- Gitblit v1.9.1