Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

2 Zeilen
5.8KB

  1. import{d as z,C as H,B as J,x as K,r as N,b as M,J as Q,c as n,e as _,f as g,h as l,i as t,j as d,g as c,F as y,H as X,G as Y,t as Z,k as C,u as R}from"./index.de29349e.js";import{_ as h}from"./index.be610ec2.js";import"./unitManage.9716e421.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=H(J.userStore).userInfo||{},B=K(),i=p,v=T,b=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 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 Q(()=>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"),F=n("el-tag"),k=n("el-radio"),G=n("el-radio-group"),te=n("el-switch"),x=n("el-checkbox"),L=n("el-checkbox-group"),W=n("el-form"),E=n("el-dialog");return _(),g(y,null,[l(E,{"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: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(" \u63D0\u4EA4 ")])),_:1}),l(V,{onClick:e[8]||(e[8]=o=>v("close"))},{default:t(()=>e[20]||(e[20]=[d(" \u5173\u95ED ")])),_:1})]),default:t(()=>[l(W,{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:"\u8282\u70B9\u540D\u79F0",prop:"name"},{default:t(()=>[l(r,{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}),l(U,null,{default:t(()=>[l(f,{span:24},{default:t(()=>[l(u,{prop:"assignedUser",label:"\u8282\u70B9\u8D1F\u8D23\u4EBA"},{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("\u6DFB\u52A0\u4EBA\u5458"))]),_:1}),c("p",null,[(_(!0),g(y,null,X(a.value.assignedUser,(o,w)=>(_(),Y(F,{key:w,class:"mr-8",closable:"",onClose:ae=>A(w)},{default:t(()=>[d(Z(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:"\u5BA1\u6838\u65B9\u5F0F",prop:"mode"},{default:t(()=>[l(G,{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("\u6216\u7B7E")])),_:1}),l(k,{label:"AND"},{default:t(()=>e[12]||(e[12]=[d("\u4F1A\u7B7E")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),C("",!0),a.value.isTimeoutRemind?(_(),g(y,{key:1},[l(f,{span:24},{default:t(()=>[l(u,{label:"\u63D0\u9192\u89C4\u5219",required:""},{default:t(()=>[e[13]||(e[13]=d(" \u82E5\u6D41\u7A0B\u8FBE\u5230\u8BE5\u8282\u70B9 ")),l(u,{prop:"overNum"},{default:t(()=>[l(r,{modelValue:a.value.overNum,"onUpdate:modelValue":e[3]||(e[3]=o=>a.value.overNum=o),placeholder:"\u51E0\u4E2A\u5C0F\u65F6",style:{width:"100px"}},null,8,["modelValue"])]),_:1}),e[14]||(e[14]=d(" \u5C0F\u65F6\u540E\u672A\u5904\u7406,\u5219\u6BCF\u9694 ")),l(u,{prop:"intervalNum"},{default:t(()=>[l(r,{modelValue:a.value.intervalNum,"onUpdate:modelValue":e[4]||(e[4]=o=>a.value.intervalNum=o),placeholder:"\u51E0\u4E2A\u5C0F\u65F6",style:{width:"100px"}},null,8,["modelValue"])]),_:1}),e[15]||(e[15]=d(" \u5C0F\u65F6\u63D0\u9192\u4E00\u6B21 "))]),_:1})]),_:1}),l(f,{span:24},{default:t(()=>[l(u,{label:"\u63D0\u9192\u65B9\u5F0F",prop:"notifyWay"},{default:t(()=>[l(L,{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("\u6D59\u653F\u9489\u5DE5\u4F5C\u901A\u77E5")])),_:1}),l(x,{label:2},{default:t(()=>e[17]||(e[17]=[d("\u624B\u673A\u77ED\u4FE1")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(f,{span:24},{default:t(()=>[l(u,{label:"\u63D0\u9192\u5185\u5BB9",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"},"\u53D8\u91CF\uFF1A\u9879\u76EE\u540D\u79F0{projectName}\uFF0C\u6D41\u7A0B\u540D\u79F0{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:"\u4EBA\u5458",onClose:q,onGetSelectUnit:I},null,8,["params","visible","show-checkbox","default-data"])],64)}}});export{de as default};