| | |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="营业执照:" prop="filePath"> |
| | | <el-form-item label="营业执照:" prop="filePath" v-if="showEditor"> |
| | | <el-upload accept=".jpg,.jpeg,.png,.pdf" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" > |
| | | <el-button type="primary">点击上传</el-button> |
| | | <template #tip> |
| | |
| | | </template> |
| | | </el-upload> |
| | | </el-form-item> |
| | | <el-form-item label="营业执照:" prop="filePath" v-else> |
| | | <div v-if="state.fileType === 'pdf'" class="pdf-preview"> |
| | | <iframe |
| | | :src="state.fileUrl" |
| | | width="650px" |
| | | height="800px" |
| | | ></iframe> |
| | | </div> |
| | | <div v-else class="image-preview"> |
| | | <img :src="state.fileUrl" style="width:650px" alt="预览图片" class="preview-image" /> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer v-if="!isReview"> |
| | | <span class="dialog-footer"> |
| | |
| | | Authorization: getToken() |
| | | }, |
| | | fileLimit: 1, |
| | | fileList: [] |
| | | fileList: [], |
| | | fileType: '', |
| | | fileUrl: '' |
| | | |
| | | }) |
| | | |
| | |
| | | url: value.filePath, |
| | | name: value.fileName |
| | | } |
| | | state.fileType = value.fileName.split('.')[1] |
| | | state.fileUrl = import.meta.env.VITE_APP_BASE_API + '/' + value.filePath |
| | | state.fileList = [obj] |
| | | } |
| | | } |