From 45b0c23655abe2b1f82e3e5ca7d07d9f0c4cc6e1 Mon Sep 17 00:00:00 2001 From: linwenling <3256558519@qq.com> Date: 星期三, 09 八月 2023 20:32:45 +0800 Subject: [PATCH] 修改 行锯齿bug --- ruoyi-ui/src/views/note/index.vue | 77 +++++++++++++++++++++++--------------- 1 files changed, 46 insertions(+), 31 deletions(-) diff --git a/ruoyi-ui/src/views/note/index.vue b/ruoyi-ui/src/views/note/index.vue index 1a40ef3..1bf1c04 100644 --- a/ruoyi-ui/src/views/note/index.vue +++ b/ruoyi-ui/src/views/note/index.vue @@ -48,11 +48,11 @@ /> </el-form-item> <!-- </el-form-item> --> - <el-form-item label="鍙戠敓鏃堕棿"> + <el-form-item label="鍙戠敓鏃堕棿" prop="happenTime"> <el-date-picker v-model="dateRange" style="width: 240px" - value-format="yyyy-MM-dd HH-MM-SS" + value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="寮�濮嬫棩鏈�" @@ -128,41 +128,43 @@ <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"/> <el-table-column label="绫诲瀷" prop="type" sortable :show-overflow-tooltip="true" width="150" /> <el-table-column label="鏍囬" prop="title" sortable :show-overflow-tooltip="true" width="150" /> - <el-table-column label="瀛樺偍鍦板潃" prop="location" sortable width="100" /> - <el-table-column label="鎸佹湁浜�" prop="holder" sortable width="100" /> - <el-table-column label="鍏蜂綋浣嶇疆" prop="address" sortable width="100" /> - <el-table-column label="澶囨敞" prop="remark" sortable width="100" > + <el-table-column label="瀛樺偍鍦板潃" prop="location" sortable width="120" /> + <el-table-column label="鎸佹湁浜�" prop="holder" sortable width="120" /> + <el-table-column label="鍏蜂綋浣嶇疆" prop="address" sortable width="120" /> + <el-table-column label="澶囨敞" prop="remark" sortable width="130" > <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '鈥斺�斺�斺��'}}</template> </el-table-column> <!-- <el-table-column label="瀹跺涵鍙�" prop="familyId" sortable width="100" /> --> - <el-table-column label="鍙戠敓鏃堕棿" prop="happenTime" sortable width="100" align="center"> + <el-table-column label="鍙戠敓鏃堕棿" prop="happenTime" sortable width="130" align="center"> <template slot-scope="scope">{{scope.row.happenTime? scope.row.happenTime: '鈥斺�斺�斺��'}}</template> </el-table-column> - <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="160" > + <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="130" > <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 === ','" - > + <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 === '' || 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> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> @@ -226,11 +228,11 @@ </el-input> </el-form-item> <el-form-item label="鍙戠敓鏃堕棿" prop="happenTime"> - <el-date-picker + <el-input v-model='formDat.happenTime' type='date' placeholder='閫夋嫨鏃ユ湡' - ></el-date-picker> + ></el-input> </el-form-item> <el-form-item label="澶囨敞" prop="remark"> <el-input v-model="formDat.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" ></el-input> @@ -281,7 +283,7 @@ class="upload-demo" multiple - :on-remove="handleRemove" + :on-remove="handleRemoveFile" :http-request="requestUpload" :show-file-list="true" > @@ -385,7 +387,8 @@ holder:undefined, address:undefined, happenStartTime:undefined, - happenEndTime:undefined + happenEndTime:undefined, + happenTime:undefined }, // 琛ㄥ崟鍙傛暟 form: {}, @@ -450,7 +453,10 @@ return "statistics-warning-row"; } }, - + getRowId(row) + { + return row.id + }, /** 鏌ヨ瑙掕壊鍒楄〃 */ getList() { this.loading = true; @@ -482,6 +488,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) @@ -593,6 +606,8 @@ Object.keys(this.formDat).forEach(key => { this.formDat[key] = ''; }); + this.handleRemove(this.fileList[0]); + this.handleRemoveFile(this.fileListOther[0]); }, requestUpload(params) { @@ -620,7 +635,7 @@ /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const Ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎璧勪骇缂栧彿涓�"' + Ids + '"鐨勬暟鎹」锛�').then(function() { + this.$modal.confirm('鏄惁纭鍒犻櫎鎵�閫夋暟鎹」锛�').then(function() { return delProperty(Ids); }).then(() => { this.getList(); -- Gitblit v1.9.1