From 7de835dea145fe8229f5f0100e2a90094e6d5b22 Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期五, 07 二月 2025 18:49:38 +0800 Subject: [PATCH] 改bug --- admin/src/views/finance/collectionSettings.vue | 58 +++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 37 insertions(+), 21 deletions(-) diff --git a/admin/src/views/finance/collectionSettings.vue b/admin/src/views/finance/collectionSettings.vue index 9a1ec04..fce513d 100644 --- a/admin/src/views/finance/collectionSettings.vue +++ b/admin/src/views/finance/collectionSettings.vue @@ -20,28 +20,41 @@ <el-tooltip style="margin-right: 10px; margin-top: 10px; flex-shrink: 0;" effect="dark" content="鍖呭惈绉熻祦璐广�佺墿涓氳垂銆佺璧佹娂閲戙�佺墿涓氭娂閲�" placement="bottom-start"> <i class="el-icon-question"></i> </el-tooltip> - <el-upload - style="flex: 1;" - class="upload-demo" - :action="uploadImgUrl" - :data="uploadData" - :on-success="uploadAvatarSuccess" - :on-remove="handleRemove" - :file-list="form.leaseTemp"> - <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button> - </el-upload> + <div style="display: flex; align-items: center;"> + <el-button type="text" v-for="(item, index) in form.leaseTemp" :key="index" style="margin-right: 10px;" @click="openFile(item.url)">{{item.name}}</el-button> + <el-upload + class="upload-demo" + :action="uploadImgUrl" + :data="uploadData" + :on-success="uploadAvatarSuccess" + :on-remove="handleRemove"> + <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button> + </el-upload> + </div> +<!-- <el-upload--> +<!-- style="flex: 1;"--> +<!-- class="upload-demo"--> +<!-- :action="uploadImgUrl"--> +<!-- :data="uploadData"--> +<!-- :on-success="uploadAvatarSuccess"--> +<!-- :on-remove="handleRemove"--> +<!-- :file-list="form.leaseTemp">--> +<!-- <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>--> +<!-- </el-upload>--> </div> </el-form-item> <el-form-item label="鍏朵粬閫氱煡鍗曟ā鏉�"> - <el-upload - class="upload-demo" - :action="uploadImgUrl" - :data="uploadData" - :on-success="uploadAvatarSuccess1" - :on-remove="handleRemove1" - :file-list="form.otherTemp"> - <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button> - </el-upload> + <div style="display: flex; align-items: center;"> + <el-button type="text" v-for="(item, index) in form.otherTemp" :key="index" style="margin-right: 10px;" @click="openFile(item.url)">{{item.name}}</el-button> + <el-upload + class="upload-demo" + :action="uploadImgUrl" + :data="uploadData" + :on-success="uploadAvatarSuccess1" + :on-remove="handleRemove1"> + <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button> + </el-upload> + </div> </el-form-item> <el-form-item> <el-button type="primary" @click="submit" :disabled="loading" :loading="loading">淇濆瓨</el-button> @@ -93,6 +106,9 @@ this.loading = false }) }, + openFile(url) { + window.open(url) + }, handleRemove(e) { this.form.leaseTemp = [] }, @@ -112,8 +128,8 @@ .then(res => { this.form.smsTemp = res.smsTemp this.form.emailTemp = res.emailTemp - this.form.leaseTemp = [{ url: res.leaseTemp.url, name: res.leaseTemp.title }] - this.form.otherTemp = [{ url: res.otherTemp.url, name: res.otherTemp.title }] + this.form.leaseTemp = [{ url: res.leaseTemp.url, ...res.leaseTemp, name: res.leaseTemp.title }] + this.form.otherTemp = [{ url: res.otherTemp.url, ...res.otherTemp, name: res.otherTemp.title }] }) } } -- Gitblit v1.9.3