From c003a5fb28554e2f37c431214dabf6f75f27cc29 Mon Sep 17 00:00:00 2001 From: Tcsm <1377977403@qq.com> Date: 星期三, 26 七月 2023 16:52:06 +0800 Subject: [PATCH] 除魅宠外其它模块的图片删除均已完善 --- ruoyi-ui/src/views/note/index.vue | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/views/note/index.vue b/ruoyi-ui/src/views/note/index.vue index 22230c4..4af6735 100644 --- a/ruoyi-ui/src/views/note/index.vue +++ b/ruoyi-ui/src/views/note/index.vue @@ -128,7 +128,7 @@ <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 v-loading="loading" :data="propertyList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"> <el-table-column type="selection" width="55" align="center" /> <el-table-column fixed label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/> @@ -147,6 +147,7 @@ </el-table-column> <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="160" > <template slot-scope="scope" > + <div @click="handleCheck(scope.row)"> <img class="el-upload-list__item-thumbnail" src="../../assets/images/deviceLis.png" @@ -162,7 +163,7 @@ style="width: 35px; height: 35px;" fit="cover" v-if="scope.row.url === ','" - > + ></div> </template> </el-table-column> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> @@ -281,7 +282,7 @@ class="upload-demo" multiple - :on-remove="handleRemove" + :on-remove="handleRemoveFile" :http-request="requestUpload" :show-file-list="true" > @@ -451,7 +452,10 @@ return "statistics-warning-row"; } }, - + getRowId(row) + { + return row.id + }, /** 鏌ヨ瑙掕壊鍒楄〃 */ getList() { this.loading = true; @@ -483,6 +487,13 @@ }, handleRemove(file) { + for(let i = 0; i < this.fileList.length; i++) + { + if(this.fileList[i].url==file.url) + this.$delete(this.fileList,i); + } + }, + handleRemoveFile(file) { for(let i = 0; i < this.fileListOther.length; i++) { if(this.fileListOther[i].url==file.url) @@ -594,6 +605,8 @@ Object.keys(this.formDat).forEach(key => { this.formDat[key] = ''; }); + this.handleRemove(this.fileList[0]); + this.handleRemoveFile(this.fileListOther[0]); }, requestUpload(params) { -- Gitblit v1.9.1