From 829f5116884f98643ffc5b2a548a600d40c0cedb Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期一, 14 四月 2025 23:09:32 +0800 Subject: [PATCH] 处理图片显示问题 --- src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/arrive/index.vue | 59 +++++++++++++++++------------------------------------------ 1 files changed, 17 insertions(+), 42 deletions(-) diff --git a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/arrive/index.vue b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/arrive/index.vue index 9feebe2..2cc2cf0 100644 --- a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/arrive/index.vue +++ b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/arrive/index.vue @@ -2,60 +2,32 @@ <div class="arrive"> <div class="arrive-title">鍒拌揪鐜板満鎯呭喌</div> <div class="arrive-form"> - <el-form - ref="arriveForm" - label-width="160px" - :model="arrive" - :rules="arriveRules" - autoComplete="on" - > + <el-form ref="arriveForm" label-width="160px" :model="arrive" :rules="arriveRules" autoComplete="on"> <!-- 鍒拌揪鏃堕棿 --> <el-form-item label="鍒拌揪鏃堕棿:" prop="arrivalTime"> - <el-date-picker - v-model="arrive.arrivalTime" - value-format="yyyy-MM-dd HH:mm:ss" - type="datetime" - placeholder="閫夋嫨鍒拌揪鏃堕棿" - > + <el-date-picker v-model="arrive.arrivalTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" + placeholder="閫夋嫨鍒拌揪鏃堕棿"> </el-date-picker> </el-form-item> <!-- 鍒拌揪鍦板潃 --> <el-form-item label="鍒拌揪鍦板潃:" prop="arrivalAddress"> - <el-input - v-model="arrive.arrivalAddress" - placeholder="璇疯緭鍏ュ湴鍧�" - ></el-input> + <el-input v-model="arrive.arrivalAddress" placeholder="璇疯緭鍏ュ湴鍧�"></el-input> </el-form-item> <!-- 鐜板満鎯呭喌璇存槑 --> <el-form-item label="鐜板満鎯呭喌璇存槑:" prop="situationExplain"> - <el-input - type="textarea" - :autosize="{ minRows: 2, maxRows: 4 }" - maxlength="200" - show-word-limit - v-model="arrive.situationExplain" - placeholder="璇疯緭鍏ユ儏鍐佃鏄�,闄愬埗200瀛椾互鍐�" - ></el-input> + <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" show-word-limit + v-model="arrive.situationExplain" placeholder="璇疯緭鍏ユ儏鍐佃鏄�,闄愬埗200瀛椾互鍐�"></el-input> </el-form-item> <!-- 淇¤鍥炲璇存槑 --> <el-form-item label="淇¤鍥炲璇存槑:" prop="replyExplain"> - <el-input - type="textarea" - :autosize="{ minRows: 2, maxRows: 4 }" - maxlength="200" - show-word-limit - v-model="arrive.replyExplain" - placeholder="璇疯緭鍏ュ洖璁胯鏄�,闄愬埗200瀛椾互鍐�" - ></el-input> + <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" show-word-limit + v-model="arrive.replyExplain" placeholder="璇疯緭鍏ュ洖璁胯鏄�,闄愬埗200瀛椾互鍐�"></el-input> </el-form-item> <!-- 鐜板満鎯呭喌鐓х墖 --> <el-form-item label="鐜板満鎯呭喌鐓х墖:" prop="situationPic"> <div class="upImg"> - <MyUpload - :picture-list="arrive.situationPic" - @setPictureUrl="setPicUrl" - @delPictureUrl="delPicUrl" - ></MyUpload> + <MyUpload :picture-list="arrive.situationPic" @setPictureUrl="setPicUrl" + @delPictureUrl="delPicUrl"></MyUpload> <div class="tip"> {{ arrive.situationPic.length }} / 4 </div> @@ -133,6 +105,10 @@ if (this.arriveData) { this.arrive = deepClone(this.arriveData); this.arrive.situationPic = this.arriveData.situationPic.split(','); + this.arrive.situationPic.forEach(item => { + item = FILE_ORIGINAL_PATH + item + }); + } }, methods: { @@ -162,8 +138,7 @@ setPicUrl({ url }) { const baseUrl = ''; if (this.arrive.situationPic.length < 4) { - - this.arrive.situationPic.push(FILE_ORIGINAL_PATH + url) + this.arrive.situationPic.push(url) } }, //鍒犻櫎鍥剧墖 @@ -188,6 +163,7 @@ .upImg { display: flex; overflow: auto; + .tip { position: absolute; bottom: 0; @@ -241,5 +217,4 @@ // ::v-deep .el-form-item__label { // color: #4b9bb7; -// } -</style> +// }</style> -- Gitblit v1.8.0