| | |
| | | <el-row :gutter="30"> |
| | | <el-col :span="8"> |
| | | <el-form-item prop="agency.certPath" label="资质证书"> |
| | | <el-upload disabled :limit='state.imgLimit' :show-file-list="false" list-type="picture-card" > |
| | | <el-image v-if="certImageUrl" :src="certImageUrl" :preview-src-list="certList" style="width: 100%;max-height: 146px;" /> |
| | | <el-upload disabled v-model:file-list="certList" :limit='state.imgLimit' :on-preview="handlePictureCardPreview" list-type="picture-card" > |
| | | |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | areaList: [], |
| | | busList: [], |
| | | fileList: [], |
| | | imgLimit: 1, |
| | | imgLimit: 5, |
| | | uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile', |
| | | header: { |
| | | Authorization: 'Bearer ' + getToken() |
| | |
| | | registerForm.value.agency.business = res.data.business.split(",").map(Number) |
| | | imageUrl.value = import.meta.env.VITE_APP_BASE_API + "/" + res.data.reportPath |
| | | srcList.value.push(imageUrl.value) |
| | | certImageUrl.value = import.meta.env.VITE_APP_BASE_API + "/" + res.data.certPath |
| | | certList.value.push(certImageUrl.value) |
| | | |
| | | if(res.data.certPath) { |
| | | const imgList = res.data.certPath.split(',') |
| | | imgList.forEach((item,index) => { |
| | | if(item.includes(import.meta.env.VITE_APP_BASE_API)){ |
| | | |
| | | }else{ |
| | | imgList[index] = import.meta.env.VITE_APP_BASE_API + "/" + item |
| | | } |
| | | }) |
| | | const imgUrl = imgList.join(',') |
| | | certList.value = imgUrl ? imgUrl.split(',').map(url => {return {url} }) : [] |
| | | } |
| | | // certImageUrl.value = import.meta.env.VITE_APP_BASE_API + "/" + res.data.certPath |
| | | |
| | | |
| | | |
| | | }else{ |
| | |
| | | srcList.value = [] |
| | | certList.value = [] |
| | | } |
| | | const handlePictureCardPreview = (uploadFile) => { |
| | | state.dialogImageUrl = uploadFile.url |
| | | state.dialogImg = true |
| | | } |
| | | |
| | | defineExpose({ |
| | | openDialog, |
| | |
| | | margin-top: 500px !important; |
| | | } |
| | | } |
| | | |
| | | |
| | | </style> |
| | | <style lang='scss' scoped> |
| | | .register-form { |
| | | ::v-deep(.el-upload--picture-card){display: none} |
| | | .el-input { |
| | | height: 40px; |
| | | input { |