import{w as R,L as I,t as U,M,C as j,N as q}from"./element-plus.517d4382.js";import{_ as O}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{a as z}from"./index.8b1962e9.js";import{u as G}from"./usePaging.f6660143.js";import{u as H}from"./useDictOptions.b5854a9e.js";import{_ as J}from"./editFlow.vue_vue_type_script_setup_true_name_flowEdit_lang.f5832028.js";import{d as D,s as K,r as E,a0 as Q,ai as W,o as t,c as i,O as c,u as r,L as p,M as u,S as l,V as o,a as C,k as X,T as w,n as B}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.1d82ee7c.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.b30ab882.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.b17dae19.js";const Y=w(" \u65B0\u589E "),Z={class:"mt-4"},ee={key:0},te={key:1},oe={key:2},ae={key:3},se={key:4},le={key:5},ne={key:6},ie={key:7},ue=w(" \u7F16\u8F91 "),pe=w(" \u5220\u9664 "),re={class:"flex justify-end mt-4"},de=D({name:"flowLists"}),Ze=D({...de,setup(ce){const m=K(),_=E(!1),g=Q({name:"",check_type:"",type:"",flow_cate:"",department_ids:"",copy_uids:"",remark:"",flow_list:"",admin_id:"",status:"",delete_user_id:""}),b=E([]),A=s=>{b.value=s.map(({id:n})=>n)},{dictData:V}=H(""),{pager:d,getLists:k,resetParams:me,resetPage:_e}=G({params:g}),F=async()=>{var s;_.value=!0,await B(),(s=m.value)==null||s.open("add")},S=async s=>{var n,f;_.value=!0,await B(),(n=m.value)==null||n.open("edit"),(f=m.value)==null||f.setFormData(s)},$=s=>{console.log(s.status)};return(s,n)=>{const f=z,y=R,a=I,x=U,L=M,N=O,P=j,h=W("perms"),T=q;return t(),i("div",null,[c((t(),p(P,{class:"!border-none",shadow:"never"},{default:u(()=>[c((t(),p(y,{type:"primary",onClick:F},{icon:u(()=>[o(f,{name:"el-icon-Plus"})]),default:u(()=>[Y]),_:1})),[[h,["flow/add"]]]),C("div",Z,[o(L,{data:r(d).lists,onSelectionChange:A},{default:u(()=>[o(a,{type:"selection",width:"55"}),o(a,{label:"\u5BA1\u6279\u6D41\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),o(a,{label:"\u5E94\u7528\u6A21\u5757",prop:"type","show-overflow-tooltip":""},{default:u(({row:e})=>[e.type==1?(t(),i("span",ee,"\u5047\u52E4")):l("",!0),e.type==2?(t(),i("span",te,"\u884C\u653F")):l("",!0),e.type==3?(t(),i("span",oe,"\u8D22\u52A1")):l("",!0),e.type==4?(t(),i("span",ae,"\u4EBA\u4E8B")):l("",!0),e.type==5?(t(),i("span",se,"\u5176\u4ED6")):l("",!0),e.type==6?(t(),i("span",le,"\u62A5\u9500")):l("",!0),e.type==7?(t(),i("span",ne,"\u53D1\u7968")):l("",!0),e.type==8?(t(),i("span",ie,"\u5408\u540C")):l("",!0)]),_:1}),o(a,{label:"\u5E94\u7528\u5BA1\u6279\u7C7B\u578Bid",prop:"flow_cate","show-overflow-tooltip":""}),o(a,{label:"\u5E94\u7528\u90E8\u95E8",prop:"department","show-overflow-tooltip":""}),o(a,{label:"\u6284\u9001\u4EBAID",prop:"copy_uids","show-overflow-tooltip":""}),o(a,{label:"\u6D41\u7A0B\u8BF4\u660E",prop:"remark","show-overflow-tooltip":""}),o(a,{label:"\u6D41\u7A0B\u6570\u636E\u5E8F\u5217\u5316",prop:"flow_list","show-overflow-tooltip":""}),o(a,{label:"\u521B\u5EFA\u4EBAID",prop:"admin_id","show-overflow-tooltip":""}),c((t(),p(a,{label:"\u8D26\u53F7\u72B6\u6001","min-width":"100"},{default:u(({row:e})=>[e.root!=1?(t(),p(x,{key:0,modelValue:e.status,"onUpdate:modelValue":v=>e.status=v,"active-value":1,"inactive-value":0,onChange:v=>$(e)},null,8,["modelValue","onUpdate:modelValue","onChange"])):l("",!0)]),_:1})),[[h,["auth.admin/edit"]]]),o(a,{label:"\u5220\u9664\u4EBAID",prop:"delete_user_id","show-overflow-tooltip":""}),o(a,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:u(({row:e})=>[c((t(),p(y,{type:"primary",link:"",onClick:v=>S(e)},{default:u(()=>[ue]),_:2},1032,["onClick"])),[[h,["flow/edit"]]]),c((t(),p(y,{type:"danger",link:"",onClick:v=>s.handleDelete(e.id)},{default:u(()=>[pe]),_:2},1032,["onClick"])),[[h,["flow/delete"]]])]),_:1})]),_:1},8,["data"])]),C("div",re,[o(N,{modelValue:r(d),"onUpdate:modelValue":n[0]||(n[0]=e=>X(d)?d.value=e:null),onChange:r(k)},null,8,["modelValue","onChange"])])]),_:1})),[[T,r(d).loading]]),_.value?(t(),p(J,{key:0,ref_key:"editRef",ref:m,"dict-data":r(V),onSuccess:r(k),onClose:n[1]||(n[1]=e=>_.value=!1)},null,8,["dict-data","onSuccess"])):l("",!0)])}}});export{Ze as default};