import{w as N,O as U,t as A,P as Q,I as j,Q as q}from"./element-plus.10e48c93.js";import{_ as I}from"./index.vue_vue_type_script_setup_true_lang.579ca8f7.js";import{f as K,b as M}from"./index.f095bcc5.js";import{u as O}from"./usePaging.2ad8e1e6.js";import{u as z}from"./useDictOptions.29c13eb8.js";import{e as G,f as H}from"./examined.564cdff7.js";import{d as b,s as J,r as C,$ as W,af as X,o as s,c as Y,M as m,u as n,K as p,L as l,U as e,R as h,a as g,S as Z,k as tt,Q as et,n as y}from"./@vue.51d7f2d8.js";import"./lodash.08438971.js";import{_ as ot}from"./editCate.vue_vue_type_script_setup_true_name_flowTypeEdit_lang.d5037c3c.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.105476b3.js";import"./vue-router.9f65afb1.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";import"./index.c570839a.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.js";const at={class:"mt-4"},it={class:"flex mt-4 justify-end"},nt=b({name:"flowTypeLists"}),Wt=b({...nt,setup(lt){const u=J(),c=C(!1),k=W({type:"",title:"",name:"",icon:"",department_ids:"",status:""}),E=C([]),D=t=>{E.value=t.map(({id:o})=>o)},{dictData:F}=z(""),{pager:r,getLists:d,resetParams:st,resetPage:rt}=O({fetchFun:H,params:k}),V=async()=>{var t;c.value=!0,await y(),(t=u.value)==null||t.open("add")},B=async t=>{var o,_;c.value=!0,await y(),(o=u.value)==null||o.open("edit"),(_=u.value)==null||_.setFormData(t)},S=async t=>{await K.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await apiFlowTypeDelete({id:t}),d()},$=t=>{G({id:t.id,status:t.status})};return d(),(t,o)=>{const _=M,w=N,i=U,x=A,P=Q,T=I,L=j,f=X("perms"),R=q;return s(),Y("div",null,[m((s(),p(L,{class:"!border-none",shadow:"never"},{default:l(()=>[m((s(),p(w,{type:"primary",onClick:V},{icon:l(()=>[e(_,{name:"el-icon-Plus"})]),default:l(()=>[h(" \u65B0\u589E ")]),_:1})),[[f,["flow_type/add"]]]),g("div",at,[e(P,{data:n(r).lists,onSelectionChange:D},{default:l(()=>[h(Z(n(r))+" ",1),e(i,{label:"id",prop:"id","show-overflow-tooltip":"",width:"60"}),e(i,{label:"\u540D\u79F0",prop:"title","show-overflow-tooltip":""}),e(i,{label:"\u5E94\u7528\u90E8\u95E8",prop:"department","show-overflow-tooltip":""}),e(i,{label:"\u6807\u8BC6",prop:"name","show-overflow-tooltip":""}),e(i,{label:"\u56FE\u6807",prop:"icon","show-overflow-tooltip":""}),e(i,{label:"\u6240\u5C5E\u5206\u7C7B",prop:"type_name","show-overflow-tooltip":""}),m((s(),p(i,{label:"\u8D26\u53F7\u72B6\u6001","min-width":"100"},{default:l(({row:a})=>[e(x,{modelValue:a.status,"onUpdate:modelValue":v=>a.status=v,"active-value":1,"inactive-value":0,onChange:v=>$(a)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1})),[[f,["auth.admin/edit"]]]),e(i,{label:"\u64CD\u4F5C",align:"center",width:"auto",fixed:"right"},{default:l(({row:a})=>[m((s(),p(w,{type:"primary",link:"",onClick:v=>B(a)},{default:l(()=>[h(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[f,["flow/edit"]]]),m((s(),p(w,{type:"danger",link:"",onClick:v=>S(a.id)},{default:l(()=>[h(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[f,["flow/delete"]]])]),_:1})]),_:1},8,["data"])]),g("div",it,[e(T,{modelValue:n(r),"onUpdate:modelValue":o[0]||(o[0]=a=>tt(r)?r.value=a:null),onChange:n(d)},null,8,["modelValue","onChange"])])]),_:1})),[[R,n(r).loading]]),n(c)?(s(),p(ot,{key:0,ref_key:"editRef",ref:u,"dict-data":n(F),onSuccess:n(d),onClose:o[1]||(o[1]=a=>c.value=!1)},null,8,["dict-data","onSuccess"])):et("",!0)])}}});export{Wt as default};