您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

2 行
8.8KB

  1. import{_ as X}from"./index.9a76b4bf.js";import{a as Y}from"./flowConfiguration.5f822768.js";import{d as Z,r as _,b as h,J as ee,c as u,e as f,f as k,h as s,i as l,j as n,G as y,g as N,F as R,H as S,t as D,k as E}from"./index.a2494fc2.js";import"./unitManage.98e613d0.js";const ae={class:"flex flex-col items-start"},le=Z({name:"approvalDialog"}),ne=Object.assign(le,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close","update:data"],setup(w,{emit:B}){const t=w,T=B,c=_(),a=_({name:void 0,orgType:void 0,assignedOrg:[],subProcess:void 0,procDefId:void 0,threeDaysAutoPass:!1}),U={name:[{required:!0,message:"\u8BF7\u8F93\u5165\u8282\u70B9\u540D\u79F0",trigger:"blur"}],orgType:[{required:!0,message:"\u8BF7\u9009\u62E9\u8282\u70B9\u8D1F\u8D23\u5355\u4F4D"}],assignedOrg:[{required:!0,message:"\u8BF7\u81F3\u5C11\u6307\u5B9A\u4E00\u4E2A\u5355\u4F4D"}],subProcess:[{required:!0,message:"\u8BF7\u9009\u62E9\u5355\u4F4D\u5185\u90E8\u6D41\u7A0B"}],type:[{required:!0,message:"\u8BF7\u9009\u62E9\u5355\u4F4D\u5185\u90E8\u6D41\u7A0B"}],threeDaysAutoPass:[{type:Boolean,required:!0,message:"\u8BF7\u9009\u62E9"}],constructionSuggestions:[{type:Boolean,required:!0,message:"\u8BF7\u9009\u62E9"}]},q=async r=>{!r||await r.validate(async e=>{if(e){const p={name:a.value.name||"",id:a.value.id||"",parentId:a.value.parentId||"",type:"SUB",props:{mode:"AND",sign:!1,assignedType:"ASSIGN_ORG",refuse:{type:"TO_END",target:""},assignedOrg:a.value.orgType==="TARGET_LABEL"?a.value.assignedOrg&&a.value.assignedOrg.map(d=>({...d,type:b.value.find(i=>i.processDefId===a.value.subProcess).type||"DEFAULT",processDefId:a.value.subProcess,orgType:a.value.orgType})):[{orgType:a.value.orgType,type:a.value.type}],threeDaysAutoPass:a.value.type==="SEAL"?!1:a.value.threeDaysAutoPass||!1,constructionSuggestions:a.value.constructionSuggestions||!1}};T("update:data",p),T("close",!0)}})},I=()=>{a.value.assignedOrg=[],a.value.subProcess=void 0,a.value.type=void 0},v=h({unitVisible:!1,showCheckbox:!1,data:void 0}),x=()=>{v.unitVisible=!0,v.showCheckbox=!1,v.data=a.value.assignedOrg.map(r=>({key:r.orgCode,title:r.orgName}))},F=(r,e)=>{a.value.assignedOrg=r.map(p=>({orgCode:p.key,orgName:p.title})),P(r[0].key)},$=()=>{v.unitVisible=!1},M=r=>{a.value.assignedOrg.splice(r,1)},b=_([]),P=async r=>{const e=await Y({pageNum:1,pageSize:1e3,orgCode:r});b.value=e.data.records.filter(p=>!p.isStop),e.data.records&&!e.data.records.length&&(b.value=[])},O=_(!1),j=[{label:"\u5B57\u6BB5\u540D\u79F0",prop:"fieldName",key:"fieldName"},{label:"\u662F\u5426\u5FC5\u586B",prop:"isRequired",key:"isRequired"},{label:"\u586B\u5199\u7C7B\u578B",prop:"writeType",key:"writeType"}],J=_([{fieldName:"\u8BC4\u5BA1\u610F\u89C1\u9644\u4EF6",isRequired:"\u662F",writeType:"\u6587\u4EF6\u4E0A\u4F20"},{fieldName:"\u5EFA\u8BAE\u603B\u6295\u8D44",isRequired:"\u662F",writeType:"\u6587\u672C"},{fieldName:"\u5EFA\u8BAE\u5E74\u5EA6\u9884\u7B97",isRequired:"\u662F",writeType:"\u6587\u672C"}]);return ee(()=>t.visible,async r=>{var e,p,d,i,m;r?(t.data&&t.data.props&&((e=t.data.props.assignedOrg)==null?void 0:e.length)&&t.data.props.assignedOrg[0].orgType==="TARGET_LABEL"&&P(t.data.props.assignedOrg[0].orgCode),a.value={...t.data,props:void 0,orgType:t.data.props&&((p=t.data.props.assignedOrg)==null?void 0:p.length)?t.data.props.assignedOrg[0].orgType:null,subProcess:t.data.props&&t.data.props.assignedOrg[0].orgType==="TARGET_LABEL"?t.data.props.assignedOrg[0].processDefId:void 0,assignedOrg:t.data.props&&t.data.props.assignedOrg&&t.data.props.assignedOrg.length&&t.data.props.assignedOrg[0].orgType==="TARGET_LABEL"&&t.data.props.assignedOrg.map(g=>g)||[],type:t.data.props&&((d=t.data.props.assignedOrg)==null?void 0:d.length)&&t.data.props.assignedOrg[0].orgType!=="TARGET_LABEL"?t.data.props.assignedOrg[0].type:void 0,threeDaysAutoPass:((i=t.data.props)==null?void 0:i.threeDaysAutoPass)||!1,constructionSuggestions:((m=t.data.props)==null?void 0:m.constructionSuggestions)||!1}):c.value.resetFields()}),(r,e)=>{const p=u("el-input"),d=u("el-form-item"),i=u("el-col"),m=u("el-row"),g=u("el-radio"),L=u("el-radio-group"),W=u("Plus"),z=u("el-icon"),V=u("el-button"),H=u("el-tag"),C=u("el-switch"),K=u("el-form"),G=u("el-dialog"),Q=u("table-list");return f(),k(R,null,[s(G,{"model-value":w.visible,title:"\u5BA1\u6279\u8282\u70B9\u8BBE\u7F6E",width:"840px","destroy-on-close":"",onClose:e[9]||(e[9]=o=>T("close"))},{footer:l(()=>[s(V,{type:"primary",onClick:e[7]||(e[7]=o=>q(c.value))},{default:l(()=>e[20]||(e[20]=[n(" \u63D0\u4EA4 ")])),_:1}),s(V,{onClick:e[8]||(e[8]=o=>T("close"))},{default:l(()=>e[21]||(e[21]=[n(" \u5173\u95ED ")])),_:1})]),default:l(()=>[s(K,{ref_key:"formRef",ref:c,model:a.value,rules:U,"label-width":"200","label-suffix":":"},{default:l(()=>[s(m,null,{default:l(()=>[s(i,{span:24},{default:l(()=>[s(d,{label:"\u8282\u70B9\u540D\u79F0",prop:"name"},{default:l(()=>[s(p,{modelValue:a.value.name,"onUpdate:modelValue":e[0]||(e[0]=o=>a.value.name=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),s(m,null,{default:l(()=>[s(i,{span:24},{default:l(()=>[s(d,{label:"\u8282\u70B9\u8D1F\u8D23\u5355\u4F4D",prop:"orgType"},{default:l(()=>[s(L,{modelValue:a.value.orgType,"onUpdate:modelValue":e[1]||(e[1]=o=>a.value.orgType=o),onChange:I},{default:l(()=>[s(g,{label:"TARGET_LABEL"},{default:l(()=>e[11]||(e[11]=[n("\u6307\u5B9A\u5355\u4F4D")])),_:1}),s(g,{label:"TARGET_MANAGEMENT"},{default:l(()=>e[12]||(e[12]=[n("\u4E3B\u7BA1\u5355\u4F4D")])),_:1}),s(g,{label:"TARGET_OWNER"},{default:l(()=>e[13]||(e[13]=[n("\u53D1\u8D77\u5355\u4F4D")])),_:1}),s(g,{label:"TARGET_LINE_MANAGEMENT"},{default:l(()=>e[14]||(e[14]=[n("\u4E0A\u7EA7\u6761\u7EBF\u4E3B\u7BA1\u5355\u4F4D")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),a.value.orgType==="TARGET_LABEL"?(f(),y(m,{key:0},{default:l(()=>[s(i,{span:24},{default:l(()=>[s(d,{prop:"assignedOrg"},{default:l(()=>[N("div",ae,[s(V,{type:"primary",onClick:x},{default:l(()=>[s(z,null,{default:l(()=>[s(W)]),_:1}),e[15]||(e[15]=n("\u6DFB\u52A0\u5355\u4F4D"))]),_:1}),N("p",null,[(f(!0),k(R,null,S(a.value.assignedOrg,(o,A)=>(f(),y(H,{key:A,class:"mr-8",closable:"",onClose:se=>M(A)},{default:l(()=>[n(D(o.orgName),1)]),_:2},1032,["onClose"]))),128))])])]),_:1})]),_:1})]),_:1})):E("",!0),a.value.orgType==="TARGET_LABEL"&&a.value.assignedOrg.length||a.value.orgType&&a.value.orgType!=="TARGET_LABEL"?(f(),y(m,{key:1},{default:l(()=>[s(i,{span:24},{default:l(()=>[a.value.orgType==="TARGET_LABEL"?(f(),y(d,{key:0,label:"\u5355\u4F4D\u5185\u90E8\u6D41\u7A0B",prop:"subProcess"},{default:l(()=>[s(L,{modelValue:a.value.subProcess,"onUpdate:modelValue":e[2]||(e[2]=o=>a.value.subProcess=o)},{default:l(()=>[(f(!0),k(R,null,S(b.value,(o,A)=>(f(),y(g,{key:A,label:o.processDefId||0},{default:l(()=>[n(D(o.processDefName)+D(o.type==="SEAL"?"\uFF08\u76D6\u7AE0\u6D41\u7A0B\uFF09":o.type==="DEFAULT"?"\uFF08\u9ED8\u8BA4\u6D41\u7A0B\uFF09":""),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})):(f(),y(d,{key:1,prop:"type",label:"\u5355\u4F4D\u5185\u90E8\u6D41\u7A0B"},{default:l(()=>[s(L,{modelValue:a.value.type,"onUpdate:modelValue":e[3]||(e[3]=o=>a.value.type=o)},{default:l(()=>[s(g,{label:"DEFAULT"},{default:l(()=>e[16]||(e[16]=[n("\u9ED8\u8BA4\u6D41\u7A0B")])),_:1}),s(g,{label:"SEAL"},{default:l(()=>e[17]||(e[17]=[n("\u76D6\u7AE0\u6D41\u7A0B")])),_:1}),s(g,{label:"JOINT_REVIEW"},{default:l(()=>e[18]||(e[18]=[n("\u91CD\u5927\u9879\u76EE\u8054\u5BA1\u6D41\u7A0B")])),_:1}),s(g,{label:"JOINT_REVIEW_CONFIRM"},{default:l(()=>e[19]||(e[19]=[n("\u8054\u5BA1\u786E\u8BA4\u6D41\u7A0B")])),_:1})]),_:1},8,["modelValue"])]),_:1}))]),_:1})]),_:1})):E("",!0),a.value.type!=="SEAL"?(f(),y(m,{key:2},{default:l(()=>[s(i,{span:24},{default:l(()=>[s(d,{label:"3\u5929\u4E0D\u5904\u7406\u81EA\u52A8\u901A\u8FC7",prop:"threeDaysAutoPass"},{default:l(()=>[s(C,{modelValue:a.value.threeDaysAutoPass,"onUpdate:modelValue":e[4]||(e[4]=o=>a.value.threeDaysAutoPass=o)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):E("",!0),r.$route.query.formName==="\u5EFA\u8BBE\u65B9\u6848\u5BA1\u6279\u6D41\u7A0B"?(f(),y(m,{key:3},{default:l(()=>[s(i,{span:24},{default:l(()=>[s(d,{label:"\u662F\u5426\u6DFB\u52A0\u8BC4\u5BA1\u5EFA\u8BAE\u4FE1\u606F\u5B57\u6BB5",prop:"constructionSuggestions"},{default:l(()=>[s(C,{modelValue:a.value.constructionSuggestions,"onUpdate:modelValue":e[5]||(e[5]=o=>a.value.constructionSuggestions=o)},null,8,["modelValue"]),N("a",{class:"ml-8 cursor-pointer",onClick:e[6]||(e[6]=o=>O.value=!0)},"\u67E5\u770B\u5B57\u6BB5")]),_:1})]),_:1})]),_:1})):E("",!0)]),_:1},8,["model"])]),_:1},8,["model-value"]),s(G,{"model-value":O.value,title:"\u67E5\u770B\u5B57\u6BB5",width:"600px","destroy-on-close":"",onClose:e[10]||(e[10]=o=>O.value=!1)},{default:l(()=>[s(Q,{column:j,data:J.value,pagination:!1},null,8,["data"])]),_:1},8,["model-value"]),s(X,{visible:v.unitVisible,"show-checkbox":v.showCheckbox,"default-data":v.data,params:{onlyUnit:!0},onClose:$,onGetSelectUnit:F},null,8,["visible","show-checkbox","default-data"])],64)}}});export{ne as default};