1 |
- import{aU as _,ac as Z,_ as ee,d as te,w as v,ag as V,bv as y,r as d,aC as ue,o as r,G as p,C as l,H as ae,u as s,aR as le,l as n,c as F,F as E,D as x,M as R,L as oe,a as se,b as ne}from"./index.42bf163d.js";const re=[{value:"1",label:"\u5F00\u59CB\u8282\u70B9"},{value:"2",label:"\u8FC7\u7A0B\u8282\u70B9"},{value:"3",label:"\u4E2D\u65AD\u8282\u70B9"},{value:"4",label:"\u7ED3\u675F\u8282\u70B9"}],ie=[{value:"1",label:"\u5BA1\u6279\u8282\u70B9"},{value:"2",label:"\u7CFB\u7EDF\u8282\u70B9"}],de={action_type:{trigger:"blur",message:"\u8BF7\u9009\u62E9\u8282\u70B9\u7C7B\u578B",required:!0},operation_type:{trigger:"blur",message:"\u8BF7\u9009\u62E9\u64CD\u4F5C\u7C7B\u578B",required:!0},status_name:{trigger:"blur",message:"\u8BF7\u8F93\u5165\u8282\u70B9\u540D\u79F0",required:!0},order_process:{trigger:"blur",message:"\u8BF7\u8F93\u5165\u8282\u70B9\u503C",required:!0},next_action_ids:{trigger:"blur",message:"\u8BF7\u9009\u62E9\u4E0B\u4E00\u8282\u70B9",required:!0}},{VITE_PROXY_DOMAIN_REAL:ye,VITE_PROXY_USER_REAL:ce}=Z(),m=ce+"/admin/",pe=(a={})=>_.request("post",`${m}action_process_getlist`,{data:a}),_e=(a={})=>_.request("post",`${m}action_process_add`,{data:a}),me=(a={})=>_.request("post",`${m}action_process_read`,{data:a}),ve=(a={})=>_.request("post",`${m}action_process_update`,{data:a}),De=(a={})=>_.request("post",`${m}action_process_update`,{data:a}),Ce=a=>_.request("post",`${m}action_process_update`,{data:{...a,is_del:"1"}}),fe={flex:"","w-full":"","justify-end":""},Be=te({__name:"process-modal",props:{currentProcess:{type:Object,required:!0}},emits:["reload"],setup(a,{expose:w,emit:L}){const D=a,c=v(""),C=v(!1),f=v(!1),k=v(null),A=V(()=>!c.value),u=v({action_type:"",operation_type:"",status_name:"",order_process:"",next_action_ids:[]}),q=()=>{f.value=!1,L("reload")},P=V(()=>u.value.action_type==="1"||u.value.action_type==="2"),{run:U,data:N,listLoading:O}=y({initalData:[],isList:[]}),{run:T,data:$,loading:j}=y({initalData:{},success:()=>{const{order_process:o,status_name:t,operation_type:B,action_type:b,next_action_ids:i}=$.value;u.value={order_process:o,status_name:t,operation_type:B,action_type:b,next_action_ids:i.filter(g=>g)}}}),{run:M,loading:S}=y({success:()=>q()}),{run:h,loading:I}=y({success:()=>q()});function X(){const{currentProcess:o}=D;M(_e({process_id:o.id,...u.value}))}function Y(){const{currentProcess:o}=D;h(ve({id:c.value,process_id:o.id,...u.value}))}function z(){k.value.validate(o=>{if(!!o){if(A.value)return X();Y()}})}const G=V(()=>C.value?"\u6D41\u7A0B\u8282\u70B9\u8BE6\u60C5":A.value?"\u521B\u5EFA\u6D41\u7A0B\u8282\u70B9":"\u7F16\u8F91\u6D41\u7A0B\u8282\u70B9");return w({onDisplay(o,t=!1){if(f.value=!0,c.value=o,C.value=t,U(pe({process_id:D.currentProcess.id})),c.value)return T(me({id:c.value}))}}),(o,t)=>{const B=d("el-option"),b=d("el-select"),i=d("el-form-item"),g=d("el-input"),H=d("el-checkbox"),J=d("el-checkbox-group"),K=d("el-button"),Q=d("el-dialog"),W=ue("loading");return r(),p(Q,{modelValue:f.value,"onUpdate:modelValue":t[6]||(t[6]=e=>f.value=e),title:s(G),center:"",onClose:t[7]||(t[7]=()=>u.value={...o.initalData}),rules:s(de),"close-on-click-modal":!1},{default:l(()=>[ae((r(),p(s(le),{"label-width":"100px",model:u.value,disabled:C.value,ref_key:"formRef",ref:k},{default:l(()=>[n(i,{label:"\u8282\u70B9\u7C7B\u578B",prop:"action_type"},{default:l(()=>[n(b,{"w-full":"",modelValue:u.value.action_type,"onUpdate:modelValue":t[0]||(t[0]=e=>u.value.action_type=e)},{default:l(()=>[(r(!0),F(E,null,x(s(re),e=>(r(),p(B,{key:e.value,value:e.value,label:e.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),n(i,{label:"\u64CD\u4F5C\u7C7B\u578B",prop:"operation_type"},{default:l(()=>[n(b,{"w-full":"",modelValue:u.value.operation_type,"onUpdate:modelValue":t[1]||(t[1]=e=>u.value.operation_type=e)},{default:l(()=>[(r(!0),F(E,null,x(s(ie),e=>(r(),p(B,{key:e.value,value:e.value,label:e.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),n(i,{label:"\u8282\u70B9\u540D\u79F0",prop:"status_name"},{default:l(()=>[n(g,{modelValue:u.value.status_name,"onUpdate:modelValue":t[2]||(t[2]=e=>u.value.status_name=e)},null,8,["modelValue"])]),_:1}),n(i,{label:"\u8282\u70B9\u503C",prop:"order_process"},{default:l(()=>[n(g,{modelValue:u.value.order_process,"onUpdate:modelValue":t[3]||(t[3]=e=>u.value.order_process=e)},null,8,["modelValue"])]),_:1}),s(P)?(r(),p(i,{key:0,label:"\u4E0B\u4E00\u8282\u70B9",prop:"next_action_ids"},{default:l(()=>[n(J,{modelValue:u.value.next_action_ids,"onUpdate:modelValue":t[4]||(t[4]=e=>u.value.next_action_ids=e)},{default:l(()=>[(r(!0),F(E,null,x(s(N),e=>(r(),p(H,{label:e.id,key:e.id,disabled:e.id===c.value},{default:l(()=>[R(oe(e.status_name),1)]),_:2},1032,["label","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})):se("v-if",!0),n(i,null,{default:l(()=>[ne("div",fe,[n(K,{loading:s(I)||s(S),type:"primary",onClick:t[5]||(t[5]=()=>z())},{default:l(()=>[R("\u4FDD\u5B58 ")]),_:1},8,["loading"])])]),_:1})]),_:1},8,["model","disabled"])),[[W,s(j)||s(O)]])]),_:1},8,["modelValue","title","rules"])}}});var be=ee(Be,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/parameter/setActionProcess/components/process-modal.vue"]]),Ve=Object.freeze(Object.defineProperty({__proto__:null,default:be},Symbol.toStringTag,{value:"Module"}));export{be as P,re as a,pe as b,De as c,Ce as d,_e as h,ie as o,Ve as p};
|