|
- import{_ as q}from"./index-4950cfb0.js";import{E as S,r as m,a as E,B as $,o as I,V as R,b as i,c as f,d as _,f as e,h as t,F as v,H as j,u as B,L as D,k as T}from"./index-dd5fae99.js";import{a as A}from"./getIsShowRegionTree-21a24141.js";import"./unitManage-104cfe86.js";const G=T({name:"projectCollectionEnterManageInfo"}),K=Object.assign(G,{props:{detail:{type:Object}},setup(C,{expose:h}){const M=C,{baseProjConsClassOptions:y}=S.dictStore.globalDicts||{},b=m([]),c=m(),r=m({}),O=(o,l,p)=>{if(l==="")return p(new Error("请输入正确的手机号"));if(/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(l))p();else return p(new Error("请输入正确的手机号"))},U={areaCode:[{required:!0,message:"请选择行政区划",trigger:"change"}],buildOrg:[{required:!0,message:"请选择建设单位",trigger:"change"}],responsibleMan:[{required:!0,message:"请填写项目负责人",trigger:"blur"}],responsibleManMobile:[{required:!0,message:"请填写项目负责人手机号",trigger:"blur"},{validator:O,trigger:"blur"}],contactName:[{required:!0,message:"请填写项目联系人",trigger:"blur"}],contactPhone:[{required:!0,message:"请填写项目联系人手机号",trigger:"blur"},{validator:O,trigger:"blur"}],higherSuperOrg:[{required:!0,message:"请选择上级业务主管部门",trigger:"change"}],superOrg:[{required:!0,message:"请选择本级业务主管部门",trigger:"change"}],constructionOrg:[{required:!0,message:"请选择建设单位",trigger:"change"}],buildLevel:[{required:!0,message:"请选择建设层级",trigger:"change"}]},n=E({field:void 0,unitVisible:!1,data:void 0,title:void 0,type:void 0,params:void 0}),g=o=>{n.field=o,n.unitVisible=!0,n.title="选择单位",n.type="UNIT",n.showCheckbox=!0,n.defaultProps={children:"children",label:"title",value:"key",isLeaf:"isLeaf"},n.params={onlyUnit:!0},n.data=r.value[`${o}Code`]?[{key:r.value[`${o}Code`],title:r.value[o]}]:[]},P=()=>{n.unitVisible=!1},k=o=>{r.value[`${n.field}Code`]=(o==null?void 0:o[0].key)||void 0,r.value[n.field]=(o==null?void 0:o[0].title)||void 0};return h({formRef:c,formData:r}),$(()=>M.detail,o=>{o&&(r.value={areaCode:["330500",o.areaCode],responsibleMan:o.responsibleMan,responsibleManMobile:o.responsibleManMobile,contactName:o.contactName,contactPhone:o.contactPhone,higherSuperOrg:o.higherSuperOrg,superOrg:o.superOrg,constructionOrg:o.constructionOrg,constructionOrgCreditCode:o.constructionOrgCreditCode,buildLevel:o.buildLevel,buildOrg:o.buildOrg,buildOrgCode:o.buildOrgCode})}),I(async()=>{b.value=[(await R(A({SUPER_ADMIN:!1,REGION_MANAGER:!1}))).data]}),(o,l)=>{const p=i("el-cascader"),u=i("el-form-item"),s=i("el-col"),d=i("el-input"),w=i("el-option"),x=i("el-select"),L=i("el-row"),N=i("el-form");return f(),_(v,null,[e(N,{ref_key:"formRef",ref:c,model:r.value,rules:U,"label-position":"top","label-suffix":":","scroll-to-error":""},{default:t(()=>[e(L,{gutter:40},{default:t(()=>[e(s,{span:8},{default:t(()=>[e(u,{label:"行政区划",prop:"areaCode"},{default:t(()=>[e(p,{modelValue:r.value.areaCode,"onUpdate:modelValue":l[0]||(l[0]=a=>r.value.areaCode=a),class:"w-full",props:{label:"name",value:"regionCode"},options:b.value},null,8,["modelValue","options"])]),_:1})]),_:1}),e(s,{span:8},{default:t(()=>[e(u,{label:"项目负责人",prop:"responsibleMan"},{default:t(()=>[e(d,{modelValue:r.value.responsibleMan,"onUpdate:modelValue":l[1]||(l[1]=a=>r.value.responsibleMan=a),maxlength:"50",placeholder:"请填写"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:t(()=>[e(u,{label:"项目负责人手机号",prop:"responsibleManMobile"},{default:t(()=>[e(d,{modelValue:r.value.responsibleManMobile,"onUpdate:modelValue":l[2]||(l[2]=a=>r.value.responsibleManMobile=a),maxlength:"11",placeholder:"请填写"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:6},{default:t(()=>[e(u,{label:"项目联系人",prop:"contactName"},{default:t(()=>[e(d,{modelValue:r.value.contactName,"onUpdate:modelValue":l[3]||(l[3]=a=>r.value.contactName=a),maxlength:"50",placeholder:"请填写"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:6},{default:t(()=>[e(u,{label:"项目联系人手机号",prop:"contactPhone"},{default:t(()=>[e(d,{modelValue:r.value.contactPhone,"onUpdate:modelValue":l[4]||(l[4]=a=>r.value.contactPhone=a),maxlength:"11",placeholder:"请填写"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:6},{default:t(()=>[e(u,{label:"上级业务主管部门",prop:"higherSuperOrg"},{default:t(()=>[e(d,{modelValue:r.value.higherSuperOrg,"onUpdate:modelValue":l[5]||(l[5]=a=>r.value.higherSuperOrg=a),placeholder:"请选择",readonly:"",onClick:l[6]||(l[6]=a=>g("higherSuperOrg"))},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:6},{default:t(()=>[e(u,{label:"本级业务主管部门",prop:"superOrg"},{default:t(()=>[e(d,{modelValue:r.value.superOrg,"onUpdate:modelValue":l[7]||(l[7]=a=>r.value.superOrg=a),placeholder:"请选择",readonly:"",onClick:l[8]||(l[8]=a=>g("superOrg"))},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:t(()=>[e(u,{label:"建设单位",prop:"buildOrg"},{default:t(()=>[e(d,{modelValue:r.value.buildOrg,"onUpdate:modelValue":l[9]||(l[9]=a=>r.value.buildOrg=a),placeholder:"请选择",readonly:"",onClick:l[10]||(l[10]=a=>g("buildOrg"))},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:t(()=>[e(u,{label:"建设单位统一信用代码",prop:"constructionOrgCreditCode"},{default:t(()=>[e(d,{modelValue:r.value.constructionOrgCreditCode,"onUpdate:modelValue":l[11]||(l[11]=a=>r.value.constructionOrgCreditCode=a),maxlength:"50",placeholder:"请填写"},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:t(()=>[e(u,{label:"建设层级",prop:"buildLevel"},{default:t(()=>[e(x,{modelValue:r.value.buildLevel,"onUpdate:modelValue":l[12]||(l[12]=a=>r.value.buildLevel=a),placeholder:"请选择",class:"w-full"},{default:t(()=>[(f(!0),_(v,null,j(B(y),(a,V)=>(f(),D(w,{key:V,label:a,value:V*1},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),e(q,{visible:n.unitVisible,"show-checkbox":!1,"default-data":n.data,title:n.title,type:n.type,"default-props":n.defaultProps,params:n.params,onClose:P,onGetSelectUnit:k},null,8,["visible","default-data","title","type","default-props","params"])],64)}}});export{K as default};
|