1 |
- import{_ as j,__tla as H}from"./Dialog-6fd39e06.js";import{d as J,B as L,r as n,g as O,o as d,k as u,w as r,i as o,a,l as G,c as _,F as y,C as I,S as v,R as Q,Y as W,I as X,G as Z,H as $,J as ee,s as ae,_ as le,__tla as se}from"./index-2f799233.js";import{E as te,__tla as re}from"./el-tree-select-ef4257fc.js";import{a as C,D as S,__tla as oe}from"./dict-20c916e2.js";import{d as de,h as ue}from"./tree-0af4953a.js";import{b as pe,__tla as ne}from"./index-4804615a.js";import{g as ie,__tla as me}from"./index-877a9f56.js";import{g as ce,__tla as _e}from"./index-7020a311.js";import{g as ye,__tla as Ie}from"./index-230cbedd.js";import{g as ve,__tla as fe}from"./index-dd9c509d.js";import{g as be,__tla as ge}from"./index-6ba7dc5e.js";import{u as Ve,__tla as he}from"./useMessage-e567ad40.js";let q,ke=Promise.all([(()=>{try{return H}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return re}catch{}})(),(()=>{try{return oe}catch{}})(),(()=>{try{return ne}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return _e}catch{}})(),(()=>{try{return Ie}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return ge}catch{}})(),(()=>{try{return he}catch{}})()]).then(async()=>{q=le(J({__name:"TaskCCDialogForm",emits:["success"],setup(we,{expose:x,emit:T}){const{t:P}=L(),R=Ve(),i=n(!1),g=n(!1),l=n({type:NaN,taskName:"",taskKey:"",processInstanceName:"",processInstanceKey:"",startUserId:"",options:[],roleIds:[],deptIds:[],postIds:[],userIds:[],userGroupIds:[],scripts:[],reason:""}),A=O({type:[{required:!0,message:"\u89C4\u5219\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],roleIds:[{required:!0,message:"\u6307\u5B9A\u89D2\u8272\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],deptIds:[{required:!0,message:"\u6307\u5B9A\u90E8\u95E8\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],postIds:[{required:!0,message:"\u6307\u5B9A\u5C97\u4F4D\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],userIds:[{required:!0,message:"\u6307\u5B9A\u7528\u6237\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],userGroupIds:[{required:!0,message:"\u6307\u5B9A\u7528\u6237\u7EC4\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],scripts:[{required:!0,message:"\u6307\u5B9A\u811A\u672C\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],reason:[{required:!0,message:"\u6284\u9001\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}]}),b=n(),V=n([]),h=n([]),k=n(),w=n([]),U=n([]),N=n([]),D=C(S.BPM_TASK_ASSIGN_SCRIPT);x({open:async s=>{E(),s!=null&&(l.value.type=void 0,l.value.taskName=s.name,l.value.taskKey=s.id,l.value.processInstanceName=s.processInstance.name,l.value.processInstanceKey=s.processInstance.id,l.value.startUserId=s.processInstance.startUserId),i.value=!0,V.value=await ie(),h.value=await ce(),k.value=ue(h.value,"id"),w.value=await ye(),U.value=await ve(),N.value=await be()}});const F=T,B=async()=>{if(!b||!await b.value.validate())return;const s={...l.value};s.type===10?s.options=s.roleIds:s.type===20||s.type===21?s.options=s.deptIds:s.type===22?s.options=s.postIds:s.type===30||s.type===31||s.type===32?s.options=s.userIds:s.type===40?s.options=s.userGroupIds:s.type===50&&(s.options=s.scripts),s.roleIds=void 0,s.deptIds=void 0,s.postIds=void 0,s.userIds=void 0,s.userGroupIds=void 0,s.scripts=void 0,g.value=!0;try{const t=s;await pe(t),console.log(t),R.success(P("common.createSuccess")),i.value=!1,F("success")}finally{g.value=!1}},E=()=>{var s;(s=b.value)==null||s.resetFields()};return(s,t)=>{const f=W,p=X,m=Z,c=$,z=te,M=ee,K=ae,Y=j;return d(),u(Y,{modelValue:a(i),"onUpdate:modelValue":t[13]||(t[13]=e=>Q(i)?i.value=e:null),title:"\u4FEE\u6539\u4EFB\u52A1\u89C4\u5219",width:"600"},{footer:r(()=>[o(K,{disabled:a(g),type:"primary",onClick:B},{default:r(()=>[G("\u786E \u5B9A")]),_:1},8,["disabled"]),o(K,{onClick:t[12]||(t[12]=e=>i.value=!1)},{default:r(()=>[G("\u53D6 \u6D88")]),_:1})]),default:r(()=>[o(M,{ref_key:"formRef",ref:b,model:a(l),rules:a(A),"label-width":"80px"},{default:r(()=>[o(p,{label:"\u4EFB\u52A1\u540D\u79F0",prop:"taskName"},{default:r(()=>[o(f,{modelValue:a(l).taskName,"onUpdate:modelValue":t[0]||(t[0]=e=>a(l).taskName=e),disabled:"",placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(p,{label:"\u4EFB\u52A1\u6807\u8BC6",prop:"taskKey"},{default:r(()=>[o(f,{modelValue:a(l).taskKey,"onUpdate:modelValue":t[1]||(t[1]=e=>a(l).taskKey=e),disabled:"",placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u6807\u8BC6"},null,8,["modelValue"])]),_:1}),o(p,{label:"\u6D41\u7A0B\u540D\u79F0",prop:"processInstanceName"},{default:r(()=>[o(f,{modelValue:a(l).processInstanceName,"onUpdate:modelValue":t[2]||(t[2]=e=>a(l).processInstanceName=e),disabled:"",placeholder:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(p,{label:"\u6D41\u7A0B\u6807\u8BC6",prop:"processInstanceKey"},{default:r(()=>[o(f,{modelValue:a(l).processInstanceKey,"onUpdate:modelValue":t[3]||(t[3]=e=>a(l).processInstanceKey=e),disabled:"",placeholder:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u6807\u8BC6"},null,8,["modelValue"])]),_:1}),o(p,{label:"\u89C4\u5219\u7C7B\u578B",prop:"type"},{default:r(()=>[o(c,{modelValue:a(l).type,"onUpdate:modelValue":t[4]||(t[4]=e=>a(l).type=e),clearable:"",style:{width:"100%"}},{default:r(()=>[(d(!0),_(y,null,I(a(C)(a(S).BPM_TASK_ASSIGN_RULE_TYPE),e=>(d(),u(m,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(l).type===10?(d(),u(p,{key:0,label:"\u6307\u5B9A\u89D2\u8272",prop:"roleIds"},{default:r(()=>[o(c,{modelValue:a(l).roleIds,"onUpdate:modelValue":t[5]||(t[5]=e=>a(l).roleIds=e),clearable:"",multiple:"",style:{width:"100%"}},{default:r(()=>[(d(!0),_(y,null,I(a(V),e=>(d(),u(m,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):v("",!0),a(l).type===20||a(l).type===21?(d(),u(p,{key:1,label:"\u6307\u5B9A\u90E8\u95E8",prop:"deptIds",span:"24"},{default:r(()=>[o(z,{ref:"treeRef",modelValue:a(l).deptIds,"onUpdate:modelValue":t[6]||(t[6]=e=>a(l).deptIds=e),data:a(k),props:a(de),"empty-text":"\u52A0\u8F7D\u4E2D\uFF0C\u8BF7\u7A0D\u540E",multiple:"","node-key":"id","show-checkbox":""},null,8,["modelValue","data","props"])]),_:1})):v("",!0),a(l).type===22?(d(),u(p,{key:2,label:"\u6307\u5B9A\u5C97\u4F4D",prop:"postIds",span:"24"},{default:r(()=>[o(c,{modelValue:a(l).postIds,"onUpdate:modelValue":t[7]||(t[7]=e=>a(l).postIds=e),clearable:"",multiple:"",style:{width:"100%"}},{default:r(()=>[(d(!0),_(y,null,I(a(w),e=>(d(),u(m,{key:parseInt(e.id),label:e.name,value:parseInt(e.id)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):v("",!0),a(l).type===30||a(l).type===31||a(l).type===32?(d(),u(p,{key:3,label:"\u6307\u5B9A\u7528\u6237",prop:"userIds",span:"24"},{default:r(()=>[o(c,{modelValue:a(l).userIds,"onUpdate:modelValue":t[8]||(t[8]=e=>a(l).userIds=e),clearable:"",multiple:"",style:{width:"100%"}},{default:r(()=>[(d(!0),_(y,null,I(a(U),e=>(d(),u(m,{key:parseInt(e.id),label:e.nickname,value:parseInt(e.id)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):v("",!0),a(l).type===40?(d(),u(p,{key:4,label:"\u6307\u5B9A\u7528\u6237\u7EC4",prop:"userGroupIds"},{default:r(()=>[o(c,{modelValue:a(l).userGroupIds,"onUpdate:modelValue":t[9]||(t[9]=e=>a(l).userGroupIds=e),clearable:"",multiple:"",style:{width:"100%"}},{default:r(()=>[(d(!0),_(y,null,I(a(N),e=>(d(),u(m,{key:parseInt(e.id),label:e.name,value:parseInt(e.id)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):v("",!0),a(l).type===50?(d(),u(p,{key:5,label:"\u6307\u5B9A\u811A\u672C",prop:"scripts"},{default:r(()=>[o(c,{modelValue:a(l).scripts,"onUpdate:modelValue":t[10]||(t[10]=e=>a(l).scripts=e),clearable:"",multiple:"",style:{width:"100%"}},{default:r(()=>[(d(!0),_(y,null,I(a(D),e=>(d(),u(m,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):v("",!0),o(p,{label:"\u6284\u9001\u539F\u56E0",prop:"reason"},{default:r(()=>[o(f,{modelValue:a(l).reason,"onUpdate:modelValue":t[11]||(t[11]=e=>a(l).reason=e),placeholder:"\u8BF7\u8F93\u5165\u6284\u9001\u539F\u56E0",type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/bpm/processInstance/detail/TaskCCDialogForm.vue"]])});export{ke as __tla,q as default};
|