|
- import{E as O,G as de,r as f,A as pe,a as x,o as me,V as be,B as w,b as d,c as b,d as _,f as l,h as o,e as fe,L as c,F as C,H as V,j as E,u as ve,i as j,t as F,k as ce,Y as Pe}from"./index-dd5fae99.js";import{_ as _e}from"./index-4950cfb0.js";import Ce from"./userDialog-d5cb489c.js";import ye from"./lineOrgDialog-016f914a.js";import{a as ge}from"./indicatorTemplate-ca1642c9.js";import"./unitManage-104cfe86.js";import"./index-b6aa4cff.js";const De={class:"flex items-center"},Ve=ce({name:"projectCollectionEnterBasicInfo"}),we=Object.assign(Ve,{props:{detail:{type:Object},dictionaryList:{type:Array,default:()=>[]}},emits:["getBasicInfoData"],setup(k,{expose:R,emit:G}){const{projectOpeOptions:z}=O.dictStore.globalDicts||{},Q=k,Y=de(O.userStore).userInfo||{},U=f(),a=f({baseProjIsConfidentiality:"01",push:!0}),N=(r,e,m)=>{e||m(),a.value.baseProjPrincipal===a.value.baseProjContacts&&a.value.baseProjPrincipalCall===a.value.baseProjContactsCall?m("项目负责人与项目联系人不能相同"):m()},h=pe(()=>a.value.baseProjIsConfidentiality==="02"?{baseProjIsConfidentiality:[{required:!0,message:"请选择是否涉密项目"}],baseProjName:[{required:!0,message:"请填写项目名称",trigger:"blur"}]}:{push:[{required:!0,message:"请选择是否归集省里",type:Boolean}],baseProjIsConfidentiality:[{required:!0,message:"请选择是否涉密项目"}],baseProjName:[{required:!0,message:"请填写项目名称"}],baseProjType:[{required:!0,message:"请选择项目类型"}],baseArea:[{required:!0,message:"请选择所属区划"}],baseConstructionType:[{required:!0,message:"请选择内容类别"}],baseProjSetProg:[{required:!0,message:"请选择项目状态"}],baseProvManDeprtType:[{required:!0,message:"请选择上级主管单位类型"}],baseProvManDeprt:[{required:!0,message:"请选择上级主管单位"}],baseManDeprt:[{required:!0,message:"请选择本级主管单位"}],baseManDepartUsci:[{required:!0,message:"请填写本级主管单位统一社会信用代码"}],baseBuildDeprt:[{required:!0,message:"请填写建设单位"}],baseBuildDepartUsci:[{required:!0,message:"请填写建设单位统一信用代码"}],baseProjPrincipal:[{required:!0,message:"请选择项目负责人"},{validator:N}],baseProjPrincipalCall:[{required:!0,message:"请选择项目负责人"}],baseProjContacts:[{required:!0,message:"请选择项目联系人"},{validator:N}],baseProjContactsCall:[{required:!0,message:"请选择联系人手机号码"}],systemPosition:[{required:!0,message:"请填写系统定位"}],templateType:[{required:!0,message:"请选择绩效评价类型"}]}),T=f({}),H=async(r,e)=>{const m=await Pe(e||Y.value.empPosUnitCode);T.value[r]=!!m.data.unifiedSocialCreditCode,a.value[r]=m.data.unifiedSocialCreditCode||a.value[r]},J=f([]),s=x({field:void 0,unitVisible:!1,data:void 0,title:void 0,type:void 0,params:void 0}),B=r=>{s.fieldName=r,s.unitVisible=!0,s.title="选择单位",s.type="UNIT",s.showCheckbox=!0,s.defaultProps={children:"children",label:"title",value:"key",isLeaf:"isLeaf"},s.params={onlyUnit:!0},s.data=a.value[`${r}Ding`]?[{key:a.value[`${r}Ding`],title:a.value[r]}]:[],console.log(s.data)},K=()=>{s.unitVisible=!1},W=r=>{a.value[s.fieldName+"Ding"]=(r==null?void 0:r[0].key)||void 0,a.value[s.fieldName]=(r==null?void 0:r[0].title)||void 0,(s.fieldName==="baseManDeprt"||s.fieldName==="baseBuildDeprt")&&H(s.fieldName==="baseManDeprt"?"baseManDepartUsci":"baseBuildDepartUsci",a.value[s.fieldName+"Ding"])},y=x({visible:!1,params:{}}),q=f(),S=f(),g=(r,e)=>{y.visible=!0,q.value=r,S.value=e},X=r=>{a.value[q.value]=r.name,a.value[S.value]=r.phoneNo},Z=(r,e)=>{a.value.baseProvManDeprtDing="",a.value.baseProvManDeprt=""},v=x({visible:!1,data:void 0}),ee=()=>{v.visible=!0,v.data={businessStripCode:a.value.baseProvManDeprtDing}},ae=r=>{a.value.baseProvManDeprtDing=r.businessStripCode,a.value.baseProvManDeprt=r.businessStripName,v.visible=!1},le=G,$=f(),te=async()=>{var e;const r=await ge({pageNumber:1,pageSize:1e4});$.value=((e=r==null?void 0:r.data)==null?void 0:e.records)||[]};return R({formRef:U,formData:a}),me(async()=>{te();const r=await be({regionCode:330500,regionLevel:2});J.value=r.data}),w(()=>Q.detail,r=>{var e,m,D;r&&(a.value={...r.baseinfo,baseProjIsConfidentiality:"01",baseProvManDeprtType:((e=r.baseinfo)==null?void 0:e.baseProvManDeprtType)+""||"",baseConstructionType:((D=(m=r.baseinfo)==null?void 0:m.baseConstructionType)==null?void 0:D.split(";"))||[]})}),w(()=>a.value.baseProjIsConfidentiality,r=>{U.value.clearValidate()}),w(()=>a.value,r=>{le("getBasicInfoData",a.value)},{deep:!0}),(r,e)=>{const m=d("el-switch"),D=d("QuestionFilled"),oe=d("el-icon"),re=d("el-tooltip"),n=d("el-form-item"),u=d("el-col"),I=d("el-option"),L=d("el-select"),p=d("el-input"),se=d("el-checkbox"),ne=d("el-checkbox-group"),M=d("el-radio"),A=d("el-radio-group"),ue=d("el-row"),ie=d("el-form");return b(),_(C,null,[l(ie,{ref_key:"formRef",ref:U,model:a.value,rules:h.value,"label-position":"top","label-suffix":":","scroll-to-error":"","validate-on-rule-change":!1},{default:o(()=>[l(ue,{gutter:40},{default:o(()=>[l(u,{span:24},{default:o(()=>[l(n,{prop:"push",label:"项目是否归集省里",class:"flex-form-item"},{default:o(()=>[l(m,{modelValue:a.value.push,"onUpdate:modelValue":e[0]||(e[0]=t=>a.value.push=t),class:"mr-8"},null,8,["modelValue"]),l(re,{class:"box-item",content:"选择是的情况下,会将项目信息推送至省里进行归集;选择否的情况下,不会将项目信息推至省里。",placement:"top"},{default:o(()=>[fe("div",De,[l(oe,{class:"cursor-pointer"},{default:o(()=>[l(D)]),_:1})])]),_:1})]),_:1})]),_:1}),E("",!0),l(u,{span:8},{default:o(()=>[l(n,{label:"项目名称",prop:"baseProjName"},{default:o(()=>[l(p,{modelValue:a.value.baseProjName,"onUpdate:modelValue":e[2]||(e[2]=t=>a.value.baseProjName=t),maxlength:"50",placeholder:"请填写"},null,8,["modelValue"])]),_:1})]),_:1}),l(u,{span:8},{default:o(()=>[l(n,{label:"项目类型",prop:"baseProjType"},{default:o(()=>[l(L,{modelValue:a.value.baseProjType,"onUpdate:modelValue":e[3]||(e[3]=t=>a.value.baseProjType=t),placeholder:"请选择",class:"w-full"},{default:o(()=>[(b(!0),_(C,null,V(ve(z),(t,i)=>(b(),c(I,{key:i,label:t,value:i},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),E("",!0),l(u,{span:8},{default:o(()=>[l(n,{label:"内容类别",prop:"baseConstructionType"},{default:o(()=>[l(ne,{modelValue:a.value.baseConstructionType,"onUpdate:modelValue":e[5]||(e[5]=t=>a.value.baseConstructionType=t)},{default:o(()=>{var t;return[(b(!0),_(C,null,V((t=k.dictionaryList)==null?void 0:t.filter(i=>i.type==="CONTENT_TYPE"),(i,P)=>(b(),c(se,{key:P,label:i.value},{default:o(()=>[j(F(i.label),1)]),_:2},1032,["label"]))),128))]}),_:1},8,["modelValue"])]),_:1})]),_:1}),l(u,{span:8},{default:o(()=>[l(n,{label:"项目状态",prop:"baseProjSetProg"},{default:o(()=>[l(L,{modelValue:a.value.baseProjSetProg,"onUpdate:modelValue":e[6]||(e[6]=t=>a.value.baseProjSetProg=t),placeholder:"请选择",class:"w-full"},{default:o(()=>{var t;return[(b(!0),_(C,null,V((t=k.dictionaryList)==null?void 0:t.filter(i=>i.type==="PROJECT_STATUS"),(i,P)=>(b(),c(I,{key:P,label:i.label,value:i.value},null,8,["label","value"]))),128))]}),_:1},8,["modelValue"])]),_:1})]),_:1}),l(u,{span:8},{default:o(()=>[l(n,{label:"上级主管单位类型",prop:"baseProvManDeprtType"},{default:o(()=>[l(A,{modelValue:a.value.baseProvManDeprtType,"onUpdate:modelValue":e[7]||(e[7]=t=>a.value.baseProvManDeprtType=t),onChange:Z},{default:o(()=>[l(M,{label:"1"},{default:o(()=>e[29]||(e[29]=[j("省级")])),_:1}),l(M,{label:"2"},{default:o(()=>e[30]||(e[30]=[j("非省级")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(u,{span:8},{default:o(()=>[l(n,{label:"上级主管单位",prop:"baseProvManDeprt"},{default:o(()=>[a.value.baseProvManDeprtType==="2"?(b(),c(p,{key:0,modelValue:a.value.baseProvManDeprt,"onUpdate:modelValue":e[8]||(e[8]=t=>a.value.baseProvManDeprt=t),placeholder:"请选择",readonly:"",onClick:e[9]||(e[9]=t=>B("baseProvManDeprt"))},null,8,["modelValue"])):(b(),c(p,{key:1,modelValue:a.value.baseProvManDeprt,"onUpdate:modelValue":e[10]||(e[10]=t=>a.value.baseProvManDeprt=t),placeholder:"请选择",readonly:"",onClick:ee},null,8,["modelValue"]))]),_:1})]),_:1}),l(u,{span:8},{default:o(()=>[l(n,{label:"本级主管单位",prop:"baseManDeprt"},{default:o(()=>[l(p,{modelValue:a.value.baseManDeprt,"onUpdate:modelValue":e[11]||(e[11]=t=>a.value.baseManDeprt=t),placeholder:"请选择",readonly:"",onClick:e[12]||(e[12]=t=>B("baseManDeprt"))},null,8,["modelValue"])]),_:1})]),_:1}),l(u,{span:8},{default:o(()=>[l(n,{label:"本级主管单位统一社会信用代码",prop:"baseManDepartUsci"},{default:o(()=>[l(p,{modelValue:a.value.baseManDepartUsci,"onUpdate:modelValue":e[13]||(e[13]=t=>a.value.baseManDepartUsci=t),placeholder:"请填写",disabled:T.value.baseManDepartUsci},null,8,["modelValue","disabled"])]),_:1})]),_:1}),l(u,{span:8},{default:o(()=>[l(n,{label:"建设单位",prop:"baseBuildDeprt"},{default:o(()=>[l(p,{modelValue:a.value.baseBuildDeprt,"onUpdate:modelValue":e[14]||(e[14]=t=>a.value.baseBuildDeprt=t),placeholder:"请选择",readonly:"",onClick:e[15]||(e[15]=t=>B("baseBuildDeprt"))},null,8,["modelValue"])]),_:1})]),_:1}),l(u,{span:8},{default:o(()=>[l(n,{label:"建设单位统一信用代码",prop:"baseBuildDepartUsci"},{default:o(()=>[l(p,{modelValue:a.value.baseBuildDepartUsci,"onUpdate:modelValue":e[16]||(e[16]=t=>a.value.baseBuildDepartUsci=t),placeholder:"请填写",disabled:T.value.baseBuildDepartUsci},null,8,["modelValue","disabled"])]),_:1})]),_:1}),l(u,{span:8},{default:o(()=>[l(n,{label:"项目负责人",prop:"baseProjPrincipal"},{default:o(()=>[l(p,{modelValue:a.value.baseProjPrincipal,"onUpdate:modelValue":e[17]||(e[17]=t=>a.value.baseProjPrincipal=t),readonly:"",placeholder:"请选择,温馨提示:项目负责人请填写领导信息",onClick:e[18]||(e[18]=t=>g("baseProjPrincipal","baseProjPrincipalCall"))},null,8,["modelValue"])]),_:1})]),_:1}),l(u,{span:8},{default:o(()=>[l(n,{label:"负责人手机号码",prop:"baseProjPrincipalCall"},{default:o(()=>[l(p,{modelValue:a.value.baseProjPrincipalCall,"onUpdate:modelValue":e[19]||(e[19]=t=>a.value.baseProjPrincipalCall=t),readonly:"",placeholder:"请选择",onClick:e[20]||(e[20]=t=>g("baseProjPrincipal","baseProjPrincipalCall"))},null,8,["modelValue"])]),_:1})]),_:1}),l(u,{span:8},{default:o(()=>[l(n,{label:"项目联系人",prop:"baseProjContacts"},{default:o(()=>[l(p,{modelValue:a.value.baseProjContacts,"onUpdate:modelValue":e[21]||(e[21]=t=>a.value.baseProjContacts=t),readonly:"",placeholder:"请选择",onClick:e[22]||(e[22]=t=>g("baseProjContacts","baseProjContactsCall"))},null,8,["modelValue"])]),_:1})]),_:1}),l(u,{span:8},{default:o(()=>[l(n,{label:"联系人手机号码",prop:"baseProjContactsCall"},{default:o(()=>[l(p,{modelValue:a.value.baseProjContactsCall,"onUpdate:modelValue":e[23]||(e[23]=t=>a.value.baseProjContactsCall=t),readonly:"",placeholder:"请选择",onClick:e[24]||(e[24]=t=>g("baseProjContacts","baseProjContactsCall"))},null,8,["modelValue"])]),_:1})]),_:1}),l(u,{span:24},{default:o(()=>[l(n,{label:"系统定位",prop:"systemPosition"},{default:o(()=>[l(p,{modelValue:a.value.systemPosition,"onUpdate:modelValue":e[25]||(e[25]=t=>a.value.systemPosition=t),type:"textarea","show-word-limit":"",placeholder:"请填写",maxlength:2e3},null,8,["modelValue"])]),_:1})]),_:1}),l(u,{span:24},{default:o(()=>[l(n,{label:"绩效评价类型",prop:"templateType"},{default:o(()=>[l(A,{modelValue:a.value.templateType,"onUpdate:modelValue":e[26]||(e[26]=t=>a.value.templateType=t)},{default:o(()=>[(b(!0),_(C,null,V($.value,(t,i)=>(b(),c(M,{key:i,label:t.id},{default:o(()=>[j(F(t.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"]),l(_e,{visible:s.unitVisible,"show-checkbox":!1,"default-data":s.data,title:s.title,type:s.type,"default-props":s.defaultProps,params:s.params,onClose:K,onGetSelectUnit:W},null,8,["visible","default-data","title","type","default-props","params"]),l(Ce,{visible:y.visible,params:y.params,onClose:e[27]||(e[27]=t=>y.visible=!1),onGetUserData:X},null,8,["visible","params"]),l(ye,{visible:v.visible,data:v.data,onClose:e[28]||(e[28]=t=>v.visible=!1),onGetBaseProvManDeprt:ae},null,8,["visible","data"])],64)}}});export{we as default};
|