You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
5.4KB

  1. import{G as z,E as H,x as K,r as N,a as M,B as J,b as n,c as _,d as g,f as l,h as t,i as d,e as c,F as y,H as Q,L as X,t as Y,j as C,u as R,k as Z}from"./index-dd5fae99.js";import{_ as h}from"./index-4950cfb0.js";import"./unitManage-104cfe86.js";const ee={class:"flex flex-col items-start"},le=Z({name:"approvalDialog"}),de=Object.assign(le,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object,orgCode:{type:String,default:""}},emits:["close","update:data"],setup(p,{emit:T}){const S=z(H.userStore).userInfo||{},B=K(),i=p,v=T,b=N(),a=N({name:void 0,unitType:void 0,assignedUser:[]}),O={name:[{required:!0,message:"请输入节点名称",trigger:"blur"}],assignedUser:[{required:!0,message:"请至少选择一个节点负责人"}],mode:[{required:!0,message:"请选择审核方式"}]},$=async s=>{s&&await s.validate(async e=>{if(e){const r={name:a.value.name,id:a.value.id,parentId:a.value.parentId,type:a.value.type,props:{assignedType:"ASSIGN_USER",assignedUser:a.value.assignedUser.map(u=>u),mode:a.value.mode||void 0}};v("update:data",r),v("close",!0)}})},m=M({unitVisible:!1,showCheckbox:!0,data:void 0}),q=()=>{m.unitVisible=!1},I=(s,e)=>{a.value.assignedUser=s.map(r=>({id:r.key,name:r.title})),m.unitVisible=!1},P=()=>{m.unitVisible=!0,m.data=a.value.assignedUser.map(s=>({key:s.id,title:s.name}))},A=s=>{a.value.assignedUser.splice(s,1)};return J(()=>i.visible,async s=>{s?a.value={...i.data,props:void 0,assignedUser:i.data.props&&i.data.props.assignedUser&&i.data.props.assignedUser.length&&i.data.props.assignedUser.map(e=>e)||[],mode:i.data.props&&i.data.props.mode}:b.value.resetFields()}),(s,e)=>{const r=n("el-input"),u=n("el-form-item"),f=n("el-col"),U=n("el-row"),D=n("Plus"),j=n("el-icon"),V=n("el-button"),L=n("el-tag"),k=n("el-radio"),E=n("el-radio-group"),te=n("el-switch"),x=n("el-checkbox"),F=n("el-checkbox-group"),G=n("el-form"),W=n("el-dialog");return _(),g(y,null,[l(W,{"model-value":p.visible,title:`${p.data.type==="APPROVAL"?"审批":p.data.type==="CONSTRCTION"?"建设审批":p.data.type==="CC"?"抄送":p.data.type==="SEAL"?"盖章":""}节点设置`,width:"840px","destroy-on-close":"",onClose:e[9]||(e[9]=o=>v("close"))},{footer:t(()=>[l(V,{type:"primary",onClick:e[7]||(e[7]=o=>$(b.value))},{default:t(()=>e[19]||(e[19]=[d(" 提交 ")])),_:1}),l(V,{onClick:e[8]||(e[8]=o=>v("close"))},{default:t(()=>e[20]||(e[20]=[d(" 关闭 ")])),_:1})]),default:t(()=>[l(G,{ref_key:"formRef",ref:b,model:a.value,rules:O,"label-width":"115px","label-suffix":":"},{default:t(()=>[l(U,null,{default:t(()=>[l(f,{span:24},{default:t(()=>[l(u,{label:"节点名称",prop:"name"},{default:t(()=>[l(r,{modelValue:a.value.name,"onUpdate:modelValue":e[0]||(e[0]=o=>a.value.name=o),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(U,null,{default:t(()=>[l(f,{span:24},{default:t(()=>[l(u,{prop:"assignedUser",label:"节点负责人"},{default:t(()=>[c("div",ee,[l(V,{type:"primary",onClick:P},{default:t(()=>[l(j,null,{default:t(()=>[l(D)]),_:1}),e[10]||(e[10]=d("添加人员"))]),_:1}),c("p",null,[(_(!0),g(y,null,Q(a.value.assignedUser,(o,w)=>(_(),X(L,{key:w,class:"mr-8",closable:"",onClose:ae=>A(w)},{default:t(()=>[d(Y(o.name),1)]),_:2},1032,["onClose"]))),128))])])]),_:1})]),_:1}),a.value.type!="CC"?(_(),g(y,{key:0},[l(f,{span:24},{default:t(()=>[l(u,{label:"审核方式",prop:"mode"},{default:t(()=>[l(E,{modelValue:a.value.mode,"onUpdate:modelValue":e[1]||(e[1]=o=>a.value.mode=o)},{default:t(()=>[l(k,{label:"OR"},{default:t(()=>e[11]||(e[11]=[d("或签")])),_:1}),l(k,{label:"AND"},{default:t(()=>e[12]||(e[12]=[d("会签")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),C("",!0),a.value.isTimeoutRemind?(_(),g(y,{key:1},[l(f,{span:24},{default:t(()=>[l(u,{label:"提醒规则",required:""},{default:t(()=>[e[13]||(e[13]=d(" 若流程达到该节点 ")),l(u,{prop:"overNum"},{default:t(()=>[l(r,{modelValue:a.value.overNum,"onUpdate:modelValue":e[3]||(e[3]=o=>a.value.overNum=o),placeholder:"几个小时",style:{width:"100px"}},null,8,["modelValue"])]),_:1}),e[14]||(e[14]=d(" 小时后未处理,则每隔 ")),l(u,{prop:"intervalNum"},{default:t(()=>[l(r,{modelValue:a.value.intervalNum,"onUpdate:modelValue":e[4]||(e[4]=o=>a.value.intervalNum=o),placeholder:"几个小时",style:{width:"100px"}},null,8,["modelValue"])]),_:1}),e[15]||(e[15]=d(" 小时提醒一次 "))]),_:1})]),_:1}),l(f,{span:24},{default:t(()=>[l(u,{label:"提醒方式",prop:"notifyWay"},{default:t(()=>[l(F,{modelValue:a.value.notifyWay,"onUpdate:modelValue":e[5]||(e[5]=o=>a.value.notifyWay=o)},{default:t(()=>[l(x,{label:1},{default:t(()=>e[16]||(e[16]=[d("浙政钉工作通知")])),_:1}),l(x,{label:2},{default:t(()=>e[17]||(e[17]=[d("手机短信")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(f,{span:24},{default:t(()=>[l(u,{label:"提醒内容",prop:"notifyContent"},{default:t(()=>[l(r,{modelValue:a.value.notifyContent,"onUpdate:modelValue":e[6]||(e[6]=o=>a.value.notifyContent=o),type:"textarea"},null,8,["modelValue"]),e[18]||(e[18]=c("p",{class:"text-info"},"变量:项目名称{projectName},流程名称{flowName}",-1))]),_:1})]),_:1})],64)):C("",!0)],64)):C("",!0)]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value","title"]),l(h,{"is-person":"",params:{needMember:!0,organizationCode:R(B).query.orgCode||R(S).empPosUnitCode},visible:m.unitVisible,"show-checkbox":m.showCheckbox,"default-data":m.data,title:"人员",onClose:q,onGetSelectUnit:I},null,8,["params","visible","show-checkbox","default-data"])],64)}}});export{de as default};