| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="8"> |
| | | <el-form-item prop="agency.certPath" label="资质证书"> |
| | | <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> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="8"> |
| | | <el-form-item prop="agency.assetValue" label="固定资产总值"> |
| | |
| | | import {getDict} from "@/api/login"; |
| | | import {getRegionTree} from "@/api/area"; |
| | | const imageUrl = ref(""); |
| | | const certImageUrl = ref(""); |
| | | const srcList = ref([]); |
| | | const certList = ref([]); |
| | | const registerForm = ref({ |
| | | agency:{ |
| | | name: "", |
| | |
| | | areaList: [], |
| | | busList: [], |
| | | fileList: [], |
| | | imgLimit: 1, |
| | | imgLimit: 5, |
| | | uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile', |
| | | header: { |
| | | Authorization: 'Bearer ' + getToken() |
| | |
| | | imageUrl.value = import.meta.env.VITE_APP_BASE_API + "/" + res.data.reportPath |
| | | srcList.value.push(imageUrl.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{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | dialogVisible.value = false; |
| | | state.fileList = [] |
| | | srcList.value = [] |
| | | certList.value = [] |
| | | } |
| | | const handlePictureCardPreview = (uploadFile) => { |
| | | state.dialogImageUrl = uploadFile.url |
| | | state.dialogImg = true |
| | | } |
| | | |
| | | defineExpose({ |
| | |
| | | margin-top: 500px !important; |
| | | } |
| | | } |
| | | |
| | | |
| | | </style> |
| | | <style lang='scss' scoped> |
| | | .register-form { |
| | | ::v-deep(.el-upload--picture-card){display: none} |
| | | .el-input { |
| | | height: 40px; |
| | | input { |