From 6f6e804a48c822f339e1974cfe482bc2f60227a3 Mon Sep 17 00:00:00 2001 From: linwenling <3256558519@qq.com> Date: 星期一, 25 九月 2023 12:42:08 +0800 Subject: [PATCH] 修改健康保健 --- ruoyi-ui/src/views/secret/index.vue | 61 +++++++++++++++++------------- 1 files changed, 35 insertions(+), 26 deletions(-) diff --git a/ruoyi-ui/src/views/secret/index.vue b/ruoyi-ui/src/views/secret/index.vue index b5a593e..492ba2b 100644 --- a/ruoyi-ui/src/views/secret/index.vue +++ b/ruoyi-ui/src/views/secret/index.vue @@ -100,13 +100,13 @@ <el-table v-loading="loading" :data="secretList" :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="happenTime" sortable width="100" align="center"> + <el-table-column label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/> + <el-table-column label="鍙戠敓鏃堕棿" prop="happenTime" sortable width="150" align="center"> <template slot-scope="scope">{{scope.row.happenTime? scope.row.happenTime: '鈥斺�斺�斺��'}}</template> </el-table-column> <el-table-column label="绫诲埆" prop="type" sortable width="100" /> <el-table-column label="璐﹀彿" prop="accNo" sortable width="100" /> - <el-table-column label="鏈夋晥鏈�" prop="validityDate" sortable width="100" align="center"> + <el-table-column label="鏈夋晥鏈�" prop="validityDate" sortable width="150" align="center"> <template slot-scope="scope">{{scope.row.validityDate? scope.row.validityDate: '鈥斺�斺�斺��'}}</template> </el-table-column> <el-table-column label="瀵嗙爜" prop="password" sortable width="100" /> @@ -128,22 +128,23 @@ <el-table-column label="鐢靛瓙鏂囦欢" prop="url" align="center" sortable width="110" > <template slot-scope="scope" > <div @click="handleCheck(scope.row)"> - <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 === ','" - ></div> + <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 === '' || scope.row.url === ',' || scope.row.url === null)" + > + <img + v-else + class="el-upload-list__item-thumbnail" + src="../../assets/images/deviceA.png" + alt="" + style="width: 35px; height: 35px;" + fit="cover" + + ></div> </template> </el-table-column> @@ -238,7 +239,7 @@ <el-input v-model="formDat.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" ></el-input> </el-form-item> - <h4 class="form-header">鐩稿叧鍥剧墖 </h4> + <h4 class="form-header">鐩稿叧鍥剧墖</h4> <el-upload action="#" list-type="picture-card" @@ -246,7 +247,7 @@ :http-request="requestUpload" :file-list="fileList" > - <i slot="default" class="el-icon-plus"></i> + <i slot="default" class="el-icon-plus"></i> <div slot="file" slot-scope="{file}"> <img class="el-upload-list__item-thumbnail" @@ -287,7 +288,8 @@ :http-request="requestUpload" :show-file-list="true" > - <el-button type="primary">涓婁紶</el-button> + <el-button type="primary">鐐瑰嚮涓婁紶</el-button> + <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div> <template #tip> <div class="el-upload__tip"> </div> @@ -362,6 +364,7 @@ ], dsb:true, btn:false, + uploading: false, formDat: { type: undefined, happenTime: undefined, @@ -650,8 +653,13 @@ Object.keys(this.formDat).forEach(key => { this.formDat[key] = ''; }); - this.handleRemove(this.fileList[0]); - this.handleRemoveFile(this.fileListOther[0]); + for(let i = 0; i <= this.fileList.length; i++) + { + this.handleRemove(this.fileList[0]); + } + for(let i = 0; i < this.fileListOther.length; i++){ + this.handleRemoveFile(this.fileListOther[0]); + } }, requestUpload(params) { @@ -659,10 +667,11 @@ var formData = new FormData(); formData.append('uploadFile', file); let _this = this - + this.uploading = true; uploadPic(formData).then(response => { let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) - + this.uploading = false; + this.$modal.msgSuccess("涓婁紶鎴愬姛"); if(_this.fot.includes(pth) === true) { _this.fileList.push({name:response.data.fileName, "url":response.data.url}) -- Gitblit v1.9.1