import{w as N,O as U,t as A,P as Q,I as j,Q as q}from"./element-plus.9c2fdfa8.js";import{_ as I}from"./index.vue_vue_type_script_setup_true_lang.261df48b.js";import{f as K,b as M}from"./index.5be037e5.js";import{u as O}from"./usePaging.c22e2b6f.js";import{u as z}from"./useDictOptions.aa9aa458.js";import{e as G,f as H}from"./examined.727b963f.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,Q as Z,U as e,R as h,a as g,S as tt,k as et,n as y}from"./@vue.53f8d7c3.js";import"./lodash.47b8af7d.js";import{_ as ot}from"./editCate.vue_vue_type_script_setup_true_name_flowTypeEdit_lang.cb0ac315.js";import"./@vueuse.038954e7.js";import"./@element-plus.37f92579.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.96be3cef.js";import"./vue-router.e2f4a118.js";import"./pinia.bd103f5d.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.efc99072.js";import"./color.e83714e9.js";import"./clone.fb54e01d.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.b4b577c6.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.9cf3e967.js";import"./index.da6dd366.js";import"./index.vue_vue_type_style_index_0_scoped_187b1ead_lang.33043b78.js";const at={class:"mt-4"},it={class:"flex mt-4 justify-end"},nt=b({name:"flowTypeLists"}),Xt=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:G,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=>{H({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(tt(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=>et(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"])):Z("",!0)])}}});export{Xt as default};