| | |
| | | <el-dialog v-model="dialogVisible" width="75%" top="50vh" align-center @close="closeDialog"> |
| | | <el-form ref="registerRef" :model="registerForm" class="register-form" label-position="top"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="8"> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="agency.name" label="机构名称"> |
| | | <el-input |
| | | disabled |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="agency.creditCode" label="社会信用代码"> |
| | | <el-input |
| | | disabled |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="agency.attribute" label="机构属性"> |
| | | <el-radio-group v-model="registerForm.agency.attribute" style="width: 50%" disabled> |
| | | <el-radio :label="0" size="large">疆内</el-radio> |
| | |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="agency.businessType" label="业务类别"> |
| | | <el-checkbox-group v-model="registerForm.agency.businessType" disabled> |
| | | <el-checkbox v-for="item in registerForm.businessTypeList" :label="item.value" :key="item.value">{{ item.label }}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item prop="agency.area" label="实际经营地址所属区域"> |
| | | <el-input v-model="registerForm.agency.area" disabled></el-input> |
| | | <!-- <el-cascader--> |
| | | <!-- v-model="registerForm.agency.area"--> |
| | | <!-- :options="state.areaList"--> |
| | | <!-- :props="props"--> |
| | | <!-- style="width: 100%"--> |
| | | <!-- size="large"--> |
| | | <!-- />--> |
| | | <!-- <el-input v-model="registerForm.agency.area" disabled></el-input>--> |
| | | <el-cascader |
| | | disabled |
| | | v-model="registerForm.agency.area" |
| | | :options="state.areaList" |
| | | :props="props" |
| | | style="width: 100%" |
| | | size="large" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | </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="固定资产总值"> |
| | |
| | | <el-col :span="8"> |
| | | <el-form-item prop="agency.reportPath" label="加盖公章的《机构信息上报表》"> |
| | | <el-upload disabled :limit='state.imgLimit' :show-file-list="false" list-type="picture-card" > |
| | | <el-image v-if="imageUrl" style="width: 150px;height: 150px" :src="imageUrl" :preview-src-list="srcList"/> |
| | | <el-image v-if="imageUrl" :src="imageUrl" :preview-src-list="srcList" style="width: 100%;max-height: 146px;" /> |
| | | <!-- <template #tip>--> |
| | | <!-- <div class="el-upload__tip">上传jpg/png图片尺寸小于5M,最多可上传1张</div>--> |
| | | <!-- </template>--> |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item prop="username" label="登录用户名(字母+数字,长度在5-16之间)"> |
| | | <el-form-item prop="username" label="用户名"> |
| | | <el-input |
| | | disabled |
| | | v-model="registerForm.username" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row :gutter="30">--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item prop="password" label="密码">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="registerForm.password"--> |
| | | <!-- type="password"--> |
| | | <!-- size="large"--> |
| | | <!-- placeholder="请输入密码"--> |
| | | <!-- show-password--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item prop="confirmPassword" label="确认密码">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="registerForm.confirmPassword"--> |
| | | <!-- type="password"--> |
| | | <!-- size="large"--> |
| | | <!-- auto-complete="off"--> |
| | | <!-- placeholder="确认密码"--> |
| | | <!-- show-password--> |
| | | <!-- >--> |
| | | <!-- </el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | </el-form> |
| | | <el-dialog v-model="state.dialogImg"> |
| | | <el-image style="width: 100%; height: 100%" :src="state.dialogImageUrl"/> |
| | |
| | | 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: "", |
| | |
| | | regAddress: '', |
| | | business: '', |
| | | reportPath: '', |
| | | businessType: [] |
| | | }, |
| | | username: '', |
| | | phone: '', |
| | | password: '', |
| | | confirmPassword: '' |
| | | confirmPassword: '', |
| | | businessTypeList: [ |
| | | { |
| | | value: 1, |
| | | label: '安全评价' |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: '检验检测' |
| | | }, |
| | | ] |
| | | }); |
| | | |
| | | |
| | |
| | | areaList: [], |
| | | busList: [], |
| | | fileList: [], |
| | | imgLimit: 1, |
| | | imgLimit: 5, |
| | | uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile', |
| | | header: { |
| | | Authorization: 'Bearer ' + getToken() |
| | |
| | | const loading = ref(false) |
| | | const dialogVisible = ref(false) |
| | | const registerRef = ref(null) |
| | | onMounted(()=>{ |
| | | getBusiness() |
| | | getArea() |
| | | }) |
| | | |
| | | const getBusiness = async ()=>{ |
| | | const res = await getDict({dictType: 'sys_business_scope'}) |
| | |
| | | } |
| | | } |
| | | |
| | | const openDialog = async (val) => { |
| | | const openDialog = async (val,type) => { |
| | | let id = ""; |
| | | if(type === 'view'){ |
| | | id = val.agencyId |
| | | }else { |
| | | id = val.id |
| | | } |
| | | const param = { |
| | | agencyId: val.id |
| | | agencyId: id |
| | | } |
| | | const res = await getInstitutionDetail(param); |
| | | if(res.code === 200){ |
| | | registerForm.value.agency = res.data |
| | | registerForm.value.agency.area = res.data.province+ " " +res.data.city + " " + res.data.district |
| | | await getBusiness() |
| | | await getArea() |
| | | registerForm.value.username = res.data.user?.username |
| | | registerForm.value.phone = res.data.user?.phone |
| | | if(registerForm.value.agency.attribute === 0){ |
| | | registerForm.value.agency.area = [res.data.city,res.data.district].filter(item => { return item && item.trim() }) |
| | | }else { |
| | | registerForm.value.agency.area = [res.data.province,res.data.city,res.data.district].filter(item => { return item && item.trim() }) |
| | | } |
| | | registerForm.value.agency.business = res.data.business.split(",").map(Number) |
| | | registerForm.value.agency.businessType = res.data.businessType ? res.data.businessType.split(',').map(Number): [] |
| | | imageUrl.value = import.meta.env.VITE_APP_BASE_API + "/" + res.data.reportPath |
| | | srcList.value.push(imageUrl.value) |
| | | // state.fileList.push({ |
| | | // 'url': imgUrl |
| | | // }) |
| | | |
| | | 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) |
| | | } |
| | |
| | | const closeDialog = ()=>{ |
| | | 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 { |