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/learn/updateUser/uploadResult/components/arrive/index.vue | 70 ++++++++--------------------------- 1 files changed, 16 insertions(+), 54 deletions(-) diff --git a/src/views/operate/disposal/casepool/learn/updateUser/uploadResult/components/arrive/index.vue b/src/views/operate/disposal/casepool/learn/updateUser/uploadResult/components/arrive/index.vue index 854a9ec..70a1ff5 100644 --- a/src/views/operate/disposal/casepool/learn/updateUser/uploadResult/components/arrive/index.vue +++ b/src/views/operate/disposal/casepool/learn/updateUser/uploadResult/components/arrive/index.vue @@ -2,76 +2,35 @@ <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" - type="datetime" - placeholder="閫夋嫨鍒拌揪鏃堕棿" - > + <el-date-picker v-model="arrive.arrivalTime" 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"> <div class="img-list"> - <img - :src="item" - alt="" - v-for="(item, index) in arrive.situationPic" - :key="index" - /> + <img :src="item" alt="" v-for="(item, index) in arrive.situationPic" :key="index" /> </div> - <div - class="upload" - v-if="arrive.situationPic.length < 4" - > - <el-upload - :file-list="fileList" - class="upload-demo" - action="/sccg/file/medias" - multiple - :show-file-list="false" - :limit="4" - :on-success="handleSuccess" - :headers="getToken()" - > + <div class="upload" v-if="arrive.situationPic.length < 4"> + <el-upload :file-list="fileList" class="upload-demo" action="/sccg/file/medias" multiple + :show-file-list="false" :limit="4" :on-success="handleSuccess" :headers="getToken()"> <i class="el-icon-plus"></i> </el-upload> </div> @@ -166,6 +125,10 @@ }, // 鑾峰彇arrive瀵硅薄 backData() { + this.arrive.situationPic.forEach(item => { + item = item.replace(FILE_ORIGINAL_PATH, '') + }) + const { arrive } = this; this.$emit('getArrive', { arrive }); } @@ -225,5 +188,4 @@ // ::v-deep .el-form-item__label { // color: #4b9bb7; -// } -</style> \ No newline at end of file +// }</style> \ No newline at end of file -- Gitblit v1.8.0