No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

2 líneas
9.9KB

  1. import{E as x,G as Z,r as k,B as S,b as m,c as u,L as c,h as l,f as e,u as V,d as f,F as v,H as b,e as E,i as y,t as R,N as ee,j as le,k as ae,s as se}from"./index-dd5fae99.js";import{b as te}from"./index-b6aa4cff.js";const oe=ae({name:"appBasicInfo"}),ne=Object.assign(oe,{props:{data:{type:Object,default:null},drawerVisible:{type:Boolean,default:!1},isFirst:{type:Number,default:void 0},coreBusiness:{type:Array,default:()=>[]}},setup(D,{expose:G}){const{publisher:$,insuranceLevel:w,applicationType:T,accountAppNameOption:O,domainBrainAccountOptions:F}=x.dictStore.globalDicts||{},L=Z(x.userStore).userInfo||{},{proxy:M}=se(),d=D,a=k({coreBusinessList:[{}]}),C=k(),j={applicationName:[{required:!0,message:"请填写应用名称"}],relatedExistsApplication:[{required:!0,message:"请选择IRS注册应用"}],relatedExistsApplicationCode:[{required:!0,message:"请选择IRS应用编码"}],applicationType:[{required:!0,message:"请选择应用类型"}],publishSide:[{required:!0,message:"请选择发布端"}],applicationSummary:[{required:!0,message:"请填写应用简介"}],secrecyGrade:[{required:!0,message:"请选择等保级别"}],passwordGrade:[{required:!0,message:"请选择密码测评级别"}],accountAppName:[{required:!0,message:"请选择"}],domainBrainAccount:[{required:!0,message:"请选择"}]},z=p=>{C.value.validate(s=>{p(s)})},H=()=>{C.value.clearValidate()},N=k([]),P=async()=>{const p=await te({areaCode:L.value.regionCode});N.value=p.data},J=p=>{a.value.relatedExistsApplicationCode=p.applicationCode},K=()=>{var p,s,_;if(((p=d.coreBusiness)==null?void 0:p.length)<=((s=a.value.coreBusinessList)==null?void 0:s.length)){M.$message.warning(`最多添加${((_=d.coreBusiness)==null?void 0:_.length)||1}个核心业务`);return}a.value.coreBusinessList.push({})},Q=p=>{a.value.coreBusinessList.splice(p,1)};return S(()=>d.drawerVisible,p=>{var s;p&&(a.value={...d.data,coreBusinessList:(s=d.data.coreBusinessList)!=null&&s.length?d.data.coreBusinessList:[{}]},P())},{immediate:!0}),S(()=>d.data,p=>{var s;a.value={...d.data,coreBusinessList:(s=d.data.coreBusinessList)!=null&&s.length?d.data.coreBusinessList:[{}]}},{immediate:!0,deep:!0}),G({validForm:z,formData:a,clearValidate:H}),(p,s)=>{const _=m("el-option"),B=m("el-select"),r=m("el-form-item"),n=m("el-col"),g=m("el-input"),U=m("el-radio"),A=m("el-radio-group"),W=m("el-input-number"),I=m("el-row"),h=m("el-button"),X=m("el-form");return u(),c(X,{ref_key:"formRef",ref:C,model:a.value,rules:j,"label-position":"right","label-width":"180px","label-suffix":":","scroll-to-error":""},{default:l(()=>[e(I,{gutter:20},{default:l(()=>[d.isFirst===0&&V(L).regionCode==="331123"||V(L).regionCode!=="331123"?(u(),f(v,{key:0},[e(n,{span:12},{default:l(()=>[e(r,{label:"关联IRS已注册应用",prop:"relatedExistsApplication"},{default:l(()=>[e(B,{modelValue:a.value.relatedExistsApplication,"onUpdate:modelValue":s[0]||(s[0]=t=>a.value.relatedExistsApplication=t),class:"w-full",placeholder:"请选择","value-key":"applicationCode",onChange:J},{default:l(()=>[(u(!0),f(v,null,b(N.value,(t,o)=>(u(),c(_,{key:o,label:t.applicationName,value:{applicationCode:t.applicationCode,applicationName:t.applicationName}},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),s[11]||(s[11]=E("p",{class:"text-12 text-danger",style:{"line-height":"1.4"}},"温馨提示:首次建设项目请先去IRS平台注册后再关联应用",-1))]),_:1})]),_:1}),e(n,{span:12},{default:l(()=>[e(r,{label:"IRS应用编码",prop:"relatedExistsApplicationCode"},{default:l(()=>[e(g,{modelValue:a.value.relatedExistsApplicationCode,"onUpdate:modelValue":s[1]||(s[1]=t=>a.value.relatedExistsApplicationCode=t),disabled:""},null,8,["modelValue"])]),_:1})]),_:1})],64)):(u(),c(n,{key:1,span:12},{default:l(()=>[e(r,{label:"应用名称",prop:"applicationName"},{default:l(()=>[e(g,{modelValue:a.value.applicationName,"onUpdate:modelValue":s[2]||(s[2]=t=>a.value.applicationName=t),placeholder:"请填写"},null,8,["modelValue"])]),_:1})]),_:1})),e(n,{span:12},{default:l(()=>[e(r,{label:"应用类型",prop:"applicationType"},{default:l(()=>[e(B,{modelValue:a.value.applicationType,"onUpdate:modelValue":s[3]||(s[3]=t=>a.value.applicationType=t),placeholder:"请选择",class:"w-full"},{default:l(()=>[(u(!0),f(v,null,b(V(T),(t,o)=>(u(),c(_,{key:o,label:t,value:t},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(n,{span:12},{default:l(()=>[e(r,{label:"发布端",prop:"publishSide"},{default:l(()=>[e(B,{modelValue:a.value.publishSide,"onUpdate:modelValue":s[4]||(s[4]=t=>a.value.publishSide=t),placeholder:"请选择",class:"w-full"},{default:l(()=>[(u(!0),f(v,null,b(V($),(t,o)=>(u(),c(_,{key:o,label:t,value:t},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(n,{span:24},{default:l(()=>[e(r,{label:"应用简介",prop:"applicationSummary"},{default:l(()=>[e(g,{modelValue:a.value.applicationSummary,"onUpdate:modelValue":s[5]||(s[5]=t=>a.value.applicationSummary=t),autosize:{minRows:2,maxRows:4},maxlength:"2000",type:"textarea",placeholder:"请填写"},null,8,["modelValue"])]),_:1})]),_:1}),e(n,{span:12},{default:l(()=>[e(r,{label:"一本账重大应用名称"},{default:l(()=>[e(B,{modelValue:a.value.accountAppName,"onUpdate:modelValue":s[6]||(s[6]=t=>a.value.accountAppName=t),placeholder:"请选择",class:"w-full",clearable:""},{default:l(()=>[(u(!0),f(v,null,b(V(O),(t,o)=>(u(),c(_,{key:o,label:t,value:t},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(n,{span:12},{default:l(()=>[e(r,{label:"领域“大脑”一本账"},{default:l(()=>[e(B,{modelValue:a.value.domainBrainAccount,"onUpdate:modelValue":s[7]||(s[7]=t=>a.value.domainBrainAccount=t),placeholder:"请选择",class:"w-full"},{default:l(()=>[(u(!0),f(v,null,b(V(F),(t,o)=>(u(),c(_,{key:o,label:t,value:t},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(n,{span:24},{default:l(()=>[e(r,{label:"等保级别",prop:"secrecyGrade"},{default:l(()=>[e(A,{modelValue:a.value.secrecyGrade,"onUpdate:modelValue":s[8]||(s[8]=t=>a.value.secrecyGrade=t)},{default:l(()=>[(u(!0),f(v,null,b(V(w),(t,o)=>(u(),c(U,{key:o,label:o*1},{default:l(()=>[y(R(t),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(n,{span:24},{default:l(()=>[e(r,{label:"密码测评级别",prop:"passwordGrade"},{default:l(()=>[e(A,{modelValue:a.value.passwordGrade,"onUpdate:modelValue":s[9]||(s[9]=t=>a.value.passwordGrade=t)},{default:l(()=>[(u(!0),f(v,null,b(V(w),(t,o)=>(u(),c(U,{key:o,label:o*1},{default:l(()=>[y(R(t),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),(u(!0),f(v,null,b(a.value.coreBusinessList,(t,o)=>{var q;return u(),f("div",{key:o,class:"py-24 pr-60 mb-16 relative",style:{background:"rgb(245, 248, 250)"}},[e(I,null,{default:l(()=>[e(n,{span:12},{default:l(()=>[e(r,{label:"核心业务",prop:`coreBusinessList[${o}].coreBusiness`,rules:[{required:!0,message:"请选择"}]},{default:l(()=>[e(B,{modelValue:a.value.coreBusinessList[o].coreBusiness,"onUpdate:modelValue":i=>a.value.coreBusinessList[o].coreBusiness=i,placeholder:"请选择核心业务",class:"w-full"},{default:l(()=>[(u(!0),f(v,null,b(d.coreBusiness,(i,Y)=>(u(),c(_,{key:Y,label:i.matterName,value:i.matterName},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),e(n,{span:12},{default:l(()=>[e(r,{label:"分值",prop:`coreBusinessList[${o}].score`,rules:[{required:!0,message:"请输入"}]},{default:l(()=>[e(W,{modelValue:a.value.coreBusinessList[o].score,"onUpdate:modelValue":i=>a.value.coreBusinessList[o].score=i,class:"input-amount f",placeholder:"请填写",min:.01,max:10,precision:2,controls:!1,onMousewheel:s[10]||(s[10]=ee(()=>{},["prevent"]))},{suffix:l(()=>s[12]||(s[12]=[y("分")])),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),e(n,{span:12},{default:l(()=>[e(r,{label:"业务指标名称",prop:`coreBusinessList[${o}].businessIndicatorName`,rules:[{required:!0,message:"请输入"}]},{default:l(()=>[e(g,{modelValue:a.value.coreBusinessList[o].businessIndicatorName,"onUpdate:modelValue":i=>a.value.coreBusinessList[o].businessIndicatorName=i,maxlength:50,placeholder:"请填写"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),e(n,{span:12},{default:l(()=>[e(r,{label:"业务指标描述",prop:`coreBusinessList[${o}].businessIndicatorDescription`,rules:[{required:!0,message:"请输入"}]},{default:l(()=>[e(g,{modelValue:a.value.coreBusinessList[o].businessIndicatorDescription,"onUpdate:modelValue":i=>a.value.coreBusinessList[o].businessIndicatorDescription=i,maxlength:50,placeholder:"请填写"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),e(n,{span:12},{default:l(()=>[e(r,{label:"指标设计依据",prop:`coreBusinessList[${o}].indexDesignBasis`,style:{"margin-bottom":"0"},rules:[{required:!0,message:"请输入"}]},{default:l(()=>[e(g,{modelValue:a.value.coreBusinessList[o].indexDesignBasis,"onUpdate:modelValue":i=>a.value.coreBusinessList[o].indexDesignBasis=i,maxlength:50,placeholder:"请填写"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),e(n,{span:12},{default:l(()=>[e(r,{label:"指标计算方法",prop:`coreBusinessList[${o}].indexCalculationMethod`,style:{"margin-bottom":"0"},rules:[{required:!0,message:"请输入"}]},{default:l(()=>[e(g,{modelValue:a.value.coreBusinessList[o].indexCalculationMethod,"onUpdate:modelValue":i=>a.value.coreBusinessList[o].indexCalculationMethod=i,maxlength:50,placeholder:"请填写"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024)]),_:2},1024),((q=a.value.coreBusinessList)==null?void 0:q.length)>1?(u(),c(h,{key:0,type:"danger",link:"",plain:"",class:"absolute top-10 right-8",onClick:i=>Q(o)},{default:l(()=>s[13]||(s[13]=[y("删除")])),_:2},1032,["onClick"])):le("",!0)])}),128)),E("p",null,[e(h,{type:"primary",size:"small",icon:"Plus",plain:"",class:"ml-80 block",onClick:K},{default:l(()=>s[14]||(s[14]=[y("添加核心业务")])),_:1})])]),_:1})]),_:1},8,["model"])}}});export{ne as default};