From 1a55d5008d2484e4730a5e8919cdb95e14da98d5 Mon Sep 17 00:00:00 2001 From: Tcsm <1377977403@qq.com> Date: 星期三, 09 八月 2023 23:51:37 +0800 Subject: [PATCH] 完善各模块的视频上传功能,显示正在上传和上传完成提示 --- ruoyi-ui/src/views/economy/index.vue | 59 +++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 37 insertions(+), 22 deletions(-) diff --git a/ruoyi-ui/src/views/economy/index.vue b/ruoyi-ui/src/views/economy/index.vue index cfc9b16..d9e3c65 100644 --- a/ruoyi-ui/src/views/economy/index.vue +++ b/ruoyi-ui/src/views/economy/index.vue @@ -6,7 +6,7 @@ <el-date-picker v-model="dateRange" style="width: 240px;" - value-format="yyyy-MM-dd HH-MM" + value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="寮�濮嬫棩鏈�" @@ -120,22 +120,24 @@ <el-table-column label="鐢靛瓙鏂囦欢" prop="url" align="center" sortable width="110" > <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="澶囨敞" prop="remark" sortable width="100" > @@ -183,11 +185,11 @@ </el-form-item> <el-form-item label="鏃堕棿" prop="createTime"> - <el-date-picker + <el-input v-model='formDat.createTime' type='date' placeholder='閫夋嫨鏃ユ湡' - ></el-date-picker> + ></el-input> </el-form-item> <el-form-item label="鏀跺叆/鏀嚭" prop="price"> <el-select v-model="formDat.price" placeholder="璇烽�夋嫨鏀跺叆/鏀嚭" clearable :style="{width: '100%'}" > @@ -196,7 +198,7 @@ </el-select> </el-form-item> <el-form-item label="閲戦" prop="balance"> - <el-input v-model="formDat.balance" placeholder="璇疯緭鍏ヤ綑棰�" clearable :style="{width: '100%'}" > + <el-input v-model="formDat.balance" placeholder="璇疯緭鍏ラ噾棰�" clearable :style="{width: '100%'}" > </el-input> </el-form-item> <el-form-item label="鐢ㄩ��" prop="useFor"> @@ -262,7 +264,7 @@ class="upload-demo" multiple - :on-remove="handleRemove" + :on-remove="handleRemoveFile" :http-request="requestUpload" :show-file-list="true" > @@ -343,7 +345,7 @@ btn:false, formDat: { type: undefined, - happenTime: undefined, + createTime: undefined, useFor: undefined, usePeople: undefined, kind:undefined, @@ -493,6 +495,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) @@ -612,6 +621,12 @@ }); } }); + // 娓呯┖formDat瀵硅薄鐨勬暟鎹� + 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