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
5.6KB

  1. import{d as z,G as E,D as J,z as K,r as N,b as M,L as H,c as n,e as _,f as v,h as e,i as l,j as d,g as C,F as g,J as Q,I as X,t as Y,k as V,u as h}from"./index.d340e473.js";import{_ as Z}from"./index.92826120.js";import"./unitManage.92dc7eb4.js";const ee={class:"flex flex-col items-start"},le=C("p",{class:"text-info"},"\u53D8\u91CF\uFF1A\u9879\u76EE\u540D\u79F0{projectName}\uFF0C\u6D41\u7A0B\u540D\u79F0{flowName}",-1),ae=z({name:"approvalDialog"}),ue=Object.assign(ae,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object,orgCode:{type:String,default:""}},emits:["close","update:data"],setup(p,{emit:R}){const T=E(J.userStore).userInfo||{},S=K(),i=p,c=R,y=N(),a=N({name:void 0,unitType:void 0,assignedUser:[]}),O={name:[{required:!0,message:"\u8BF7\u8F93\u5165\u8282\u70B9\u540D\u79F0",trigger:"blur"}],assignedUser:[{required:!0,message:"\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u8282\u70B9\u8D1F\u8D23\u4EBA"}],mode:[{required:!0,message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u65B9\u5F0F"}]},$=async s=>{!s||await s.validate(async t=>{if(t){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}};c("update:data",r),c("close",!0)}})},m=M({unitVisible:!1,showCheckbox:!0,data:void 0}),B=()=>{m.unitVisible=!1},I=(s,t)=>{a.value.assignedUser=s.map(r=>({id:r.key,name:r.title})),m.unitVisible=!1},q=()=>{m.unitVisible=!0,m.data=a.value.assignedUser.map(s=>({key:s.id,title:s.name}))},D=s=>{a.value.assignedUser.splice(s,1)};return H(()=>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(t=>t)||[],mode:i.data.props&&i.data.props.mode}:y.value.resetFields()}),(s,t)=>{const r=n("el-input"),u=n("el-form-item"),f=n("el-col"),U=n("el-row"),P=n("Plus"),A=n("el-icon"),b=n("el-button"),j=n("el-tag"),k=n("el-radio"),L=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 _(),v(g,null,[e(W,{"model-value":p.visible,title:`${p.data.type==="APPROVAL"?"\u5BA1\u6279":p.data.type==="CONSTRCTION"?"\u5EFA\u8BBE\u5BA1\u6279":p.data.type==="CC"?"\u6284\u9001":p.data.type==="SEAL"?"\u76D6\u7AE0":""}\u8282\u70B9\u8BBE\u7F6E`,width:"840px","destroy-on-close":"",onClose:t[9]||(t[9]=o=>c("close"))},{footer:l(()=>[e(b,{type:"primary",onClick:t[7]||(t[7]=o=>$(y.value))},{default:l(()=>[d(" \u63D0\u4EA4 ")]),_:1}),e(b,{onClick:t[8]||(t[8]=o=>c("close"))},{default:l(()=>[d(" \u5173\u95ED ")]),_:1})]),default:l(()=>[e(G,{ref_key:"formRef",ref:y,model:a.value,rules:O,"label-width":"115px","label-suffix":":"},{default:l(()=>[e(U,null,{default:l(()=>[e(f,{span:24},{default:l(()=>[e(u,{label:"\u8282\u70B9\u540D\u79F0",prop:"name"},{default:l(()=>[e(r,{modelValue:a.value.name,"onUpdate:modelValue":t[0]||(t[0]=o=>a.value.name=o),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(U,null,{default:l(()=>[e(f,{span:24},{default:l(()=>[e(u,{prop:"assignedUser",label:"\u8282\u70B9\u8D1F\u8D23\u4EBA"},{default:l(()=>[C("div",ee,[e(b,{type:"primary",onClick:q},{default:l(()=>[e(A,null,{default:l(()=>[e(P)]),_:1}),d("\u6DFB\u52A0\u4EBA\u5458")]),_:1}),C("p",null,[(_(!0),v(g,null,Q(a.value.assignedUser,(o,w)=>(_(),X(j,{key:w,class:"mr-8",closable:"",onClose:oe=>D(w)},{default:l(()=>[d(Y(o.name),1)]),_:2},1032,["onClose"]))),128))])])]),_:1})]),_:1}),a.value.type!="CC"?(_(),v(g,{key:0},[e(f,{span:24},{default:l(()=>[e(u,{label:"\u5BA1\u6838\u65B9\u5F0F",prop:"mode"},{default:l(()=>[e(L,{modelValue:a.value.mode,"onUpdate:modelValue":t[1]||(t[1]=o=>a.value.mode=o)},{default:l(()=>[e(k,{label:"OR"},{default:l(()=>[d("\u6216\u7B7E")]),_:1}),e(k,{label:"AND"},{default:l(()=>[d("\u4F1A\u7B7E")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),V("",!0),a.value.isTimeoutRemind?(_(),v(g,{key:1},[e(f,{span:24},{default:l(()=>[e(u,{label:"\u63D0\u9192\u89C4\u5219",required:""},{default:l(()=>[d(" \u82E5\u6D41\u7A0B\u8FBE\u5230\u8BE5\u8282\u70B9 "),e(u,{prop:"overNum"},{default:l(()=>[e(r,{modelValue:a.value.overNum,"onUpdate:modelValue":t[3]||(t[3]=o=>a.value.overNum=o),placeholder:"\u51E0\u4E2A\u5C0F\u65F6",style:{width:"100px"}},null,8,["modelValue"])]),_:1}),d(" \u5C0F\u65F6\u540E\u672A\u5904\u7406,\u5219\u6BCF\u9694 "),e(u,{prop:"intervalNum"},{default:l(()=>[e(r,{modelValue:a.value.intervalNum,"onUpdate:modelValue":t[4]||(t[4]=o=>a.value.intervalNum=o),placeholder:"\u51E0\u4E2A\u5C0F\u65F6",style:{width:"100px"}},null,8,["modelValue"])]),_:1}),d(" \u5C0F\u65F6\u63D0\u9192\u4E00\u6B21 ")]),_:1})]),_:1}),e(f,{span:24},{default:l(()=>[e(u,{label:"\u63D0\u9192\u65B9\u5F0F",prop:"notifyWay"},{default:l(()=>[e(F,{modelValue:a.value.notifyWay,"onUpdate:modelValue":t[5]||(t[5]=o=>a.value.notifyWay=o)},{default:l(()=>[e(x,{label:1},{default:l(()=>[d("\u6D59\u653F\u9489\u5DE5\u4F5C\u901A\u77E5")]),_:1}),e(x,{label:2},{default:l(()=>[d("\u624B\u673A\u77ED\u4FE1")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(f,{span:24},{default:l(()=>[e(u,{label:"\u63D0\u9192\u5185\u5BB9",prop:"notifyContent"},{default:l(()=>[e(r,{modelValue:a.value.notifyContent,"onUpdate:modelValue":t[6]||(t[6]=o=>a.value.notifyContent=o),type:"textarea"},null,8,["modelValue"]),le]),_:1})]),_:1})],64)):V("",!0)],64)):V("",!0)]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value","title"]),e(Z,{"is-person":"",params:{needMember:!0,organizationCode:h(S).query.orgCode||h(T).empPosUnitCode},visible:m.unitVisible,"show-checkbox":m.showCheckbox,"default-data":m.data,title:"\u4EBA\u5458",onClose:B,onGetSelectUnit:I},null,8,["params","visible","show-checkbox","default-data"])],64)}}});export{ue as default};