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/evidence/index.vue | 133 ++++++++++--------------------------------- 1 files changed, 32 insertions(+), 101 deletions(-) diff --git a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue index 8e3c37d..102aeaf 100644 --- a/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue +++ b/src/views/operate/disposal/casepool/dispatch/updateUser/uploadResult/components/evidence/index.vue @@ -2,88 +2,45 @@ <div class="evidence"> <div class="evidence-title">璋冩煡鍙栬瘉</div> <div class="evidence-form"> - <el-form - ref="evidenceForm" - label-width="160px" - :model="evidence" - :rules="evidenceRules" - autoComplete="on" - > + <el-form ref="evidenceForm" label-width="160px" :model="evidence" :rules="evidenceRules" autoComplete="on"> <div class="evidence-item"> <!-- 鎵垮姙闃熷憳 --> <el-form-item label="鎵垮姙闃熷憳:" prop="undertaker"> - <el-input - v-model="evidence.undertaker" - placeholder="璇疯緭鍏ュ鍚�" - ></el-input> + <el-input v-model="evidence.undertaker" placeholder="璇疯緭鍏ュ鍚�"></el-input> </el-form-item> <!-- 鍗忓姙闃熷憳 --> - <el-form-item - label="鍗忓姙闃熷憳:" - label-width="100px" - prop="assistant" - > - <el-input - v-model="evidence.assistant" - placeholder="璇疯緭鍏ュ鍚�" - ></el-input> + <el-form-item label="鍗忓姙闃熷憳:" label-width="100px" prop="assistant"> + <el-input v-model="evidence.assistant" placeholder="璇疯緭鍏ュ鍚�"></el-input> </el-form-item> </div> <!-- 鏃堕棿 --> <el-form-item label="鏃堕棿:" prop="investigationTime"> - <el-date-picker - v-model="evidence.investigationTime" - value-format="yyyy-MM-dd HH:mm:ss" - type="datetime" - placeholder="閫夋嫨鏃堕棿" - > + <el-date-picker v-model="evidence.investigationTime" value-format="yyyy-MM-dd HH:mm:ss" + type="datetime" placeholder="閫夋嫨鏃堕棿"> </el-date-picker> </el-form-item> <!-- 鍦板潃 --> <el-form-item label="鍦板潃:" prop="address"> - <el-input - v-model="evidence.address" - placeholder="璇疯緭鍏ュ湴鍧�" - ></el-input> + <el-input v-model="evidence.address" placeholder="璇疯緭鍏ュ湴鍧�"></el-input> </el-form-item> <!-- 妗堢敱 --> <el-form-item label="妗堢敱:" prop="caseAction"> - <el-input - v-model="evidence.caseAction" - placeholder="璇疯緭鍏ユ鐢�" - ></el-input> + <el-input v-model="evidence.caseAction" placeholder="璇疯緭鍏ユ鐢�"></el-input> </el-form-item> <!-- 褰撲簨浜轰俊鎭� --> - <el-form-item - label="褰撲簨浜轰俊鎭�:" - prop="userInfo" - class="sp-user-info" - > - <el-input - suffix-icon="el-icon-s-order" - v-model="evidence.userInfo" - @focus="openDialog" - ></el-input> + <el-form-item label="褰撲簨浜轰俊鎭�:" prop="userInfo" class="sp-user-info"> + <el-input suffix-icon="el-icon-s-order" v-model="evidence.userInfo" @focus="openDialog"></el-input> </el-form-item> <!-- 鎯呭喌鎻忚堪 --> <el-form-item label="澶勭疆缁撴灉:" prop="description"> - <el-input - type="textarea" - :autosize="{ minRows: 2, maxRows: 4 }" - maxlength="200" - show-word-limit - v-model="evidence.description" - placeholder="璇疯緭鍏ュ缃粨鏋�,闄愬埗200瀛椾互鍐�" - ></el-input> + <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" show-word-limit + v-model="evidence.description" placeholder="璇疯緭鍏ュ缃粨鏋�,闄愬埗200瀛椾互鍐�"></el-input> </el-form-item> <!-- 鐓х墖闄勪欢 --> <el-form-item label="鐓х墖闄勪欢:" prop="pic"> <div class="upImg"> - <MyUpload - :picture-list="evidence.pic" - @setPictureUrl="setPicUrl" - @delPictureUrl="delPicUrl" - ></MyUpload> + <MyUpload :picture-list="evidence.pic" @setPictureUrl="setPicUrl" @delPictureUrl="delPicUrl"> + </MyUpload> <div class="tip">{{ evidence.pic.length }} / 4</div> </div> </el-form-item> @@ -95,19 +52,9 @@ <i class="el-icon-close" @click="closeUserForm"></i> </div> <div class="user-form-content"> - <el-form - ref="userForm" - label-width="120px" - :model="user" - :rules="userRules" - autoComplete="on" - > + <el-form ref="userForm" label-width="120px" :model="user" :rules="userRules" autoComplete="on"> <!-- 绫诲瀷 --> - <el-form-item - label="绫诲瀷:" - prop="illegalType" - :disabled="true" - > + <el-form-item label="绫诲瀷:" prop="illegalType" :disabled="true"> <el-input v-model="user.illegalType"></el-input> </el-form-item> <!-- 濮撳悕銆佹墜鏈哄彿 --> @@ -124,16 +71,9 @@ <!-- 璇佷欢 --> <div class="user-item"> <el-form-item label="璇佷欢绫诲瀷:" prop="certificateType"> - <el-select - v-model="user.certificateType" - placeholder="璇烽�夋嫨" - > - <el-option - v-for="item in cardOptions" - :key="item.id" - :label="item.name" - :value="item.id" - > + <el-select v-model="user.certificateType" placeholder="璇烽�夋嫨"> + <el-option v-for="item in cardOptions" :key="item.id" :label="item.name" + :value="item.id"> </el-option> </el-select> </el-form-item> @@ -145,16 +85,9 @@ <div class="user-item"> <!-- 鏂囧寲绋嬪害 --> <el-form-item label="鏂囧寲绋嬪害:" prop="educationDegree"> - <el-select - v-model="user.educationDegree" - placeholder="璇烽�夋嫨" - > - <el-option - v-for="item in degreeOptions" - :key="item.id" - :label="item.name" - :value="item.id" - > + <el-select v-model="user.educationDegree" placeholder="璇烽�夋嫨"> + <el-option v-for="item in degreeOptions" :key="item.id" :label="item.name" + :value="item.id"> </el-option> </el-select> </el-form-item> @@ -171,16 +104,9 @@ <div class="user-item"> <!-- 姘戞棌 --> <el-form-item label="姘戞棌:" prop="nation"> - <el-select - v-model="user.nation" - placeholder="璇烽�夋嫨" - > - <el-option - v-for="item in nationOptions" - :key="item.id" - :label="item.name" - :value="item.id" - > + <el-select v-model="user.nation" placeholder="璇烽�夋嫨"> + <el-option v-for="item in nationOptions" :key="item.id" :label="item.name" + :value="item.id"> </el-option> </el-select> </el-form-item> @@ -354,6 +280,8 @@ this.$set(this.user, 'illegalType', this.illegalType); if (this.evidenceData) { this.evidence = deepClone(this.evidenceData); + console.log(this.evidenceData.pic); + this.evidence.pic = this.evidenceData.pic.split(','); this.user = this.evidence.partyInfo; this.evidence.userInfo = this.evidence.partyInfo.name; @@ -420,8 +348,7 @@ setPicUrl({ url }) { const baseUrl = ''; if (this.evidence.pic.length < 4) { - - this.evidence.pic.push(FILE_ORIGINAL_PATH + url) + this.evidence.pic.push(url) } }, //鍒犻櫎鍥剧墖 @@ -437,9 +364,11 @@ .evidence { line-height: 60px; position: relative; + .evidence-item { display: flex; } + .evidence-title { line-height: 60px; font-weight: 650; @@ -512,11 +441,13 @@ padding-bottom: 60px; } + .sp-user-info { ::v-deep .el-input { width: 200px; } } + .user-form-content { padding-top: 20px; -- Gitblit v1.8.0