import{C as j,D as A,w as K,F as q,K as G,G as H,H as M,I as Q}from"./element-plus.8e273e86.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{f as z,b as J}from"./index.2078eb25.js";import{u as O}from"./usePaging.f8c888e4.js";import{u as W}from"./useDictOptions.0f4dac76.js";import{d as X,e as Y}from"./config.7ae3a864.js";import"./lodash.41b9567d.js";import{_ as ee}from"./edit.vue_vue_type_script_setup_true_name_configEdit_lang.e96a9b02.js";import{d as D,s as oe,r as k,Z as te,ap as le,o as s,c as ae,U as o,L as l,u as t,R as m,M as f,K as p,a as B,j as ne,Q as ie,n as V}from"./@vue.76ce7aa3.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./axios.b4cbdbc9.js";import"./jspdf.75308076.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.f23177ae.js";import"./color.a6ad6672.js";import"./clone.954ba32c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./index.8afed1db.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const se={class:"mt-4"},re={class:"flex mt-4 justify-end"},ue=D({name:"configLists"}),Xe=D({...ue,setup(me){const _=oe(),v=k(!1),i=te({type:"",name:"",value:""}),w=k([]),E=n=>{w.value=n.map(({id:e})=>e)},{dictData:x}=W(""),{pager:d,getLists:C,resetParams:$,resetPage:L}=O({fetchFun:Y,params:i}),P=async()=>{var n;v.value=!0,await V(),(n=_.value)==null||n.open("add")},R=async n=>{var e,r;v.value=!0,await V(),(e=_.value)==null||e.open("edit"),(r=_.value)==null||r.setFormData(n)},F=async n=>{await z.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await X({id:n}),C()};return C(),(n,e)=>{const r=j,g=A,u=K,U=q,y=G,h=J,c=H,N=M,S=Z,b=le("perms"),T=Q;return s(),ae("div",null,[o(y,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[o(U,{class:"mb-[-16px]",model:t(i),inline:""},{default:l(()=>[o(g,{label:"\u7C7B\u578B",prop:"type"},{default:l(()=>[o(r,{class:"w-[280px]",modelValue:t(i).type,"onUpdate:modelValue":e[0]||(e[0]=a=>t(i).type=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7C7B\u578B"},null,8,["modelValue"])]),_:1}),o(g,{label:"\u540D\u79F0",prop:"name"},{default:l(()=>[o(r,{class:"w-[280px]",modelValue:t(i).name,"onUpdate:modelValue":e[1]||(e[1]=a=>t(i).name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(g,{label:"\u503C",prop:"value"},{default:l(()=>[o(r,{class:"w-[280px]",modelValue:t(i).value,"onUpdate:modelValue":e[2]||(e[2]=a=>t(i).value=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u503C"},null,8,["modelValue"])]),_:1}),o(g,null,{default:l(()=>[o(u,{type:"primary",onClick:t(L)},{default:l(()=>e[6]||(e[6]=[m("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(u,{onClick:t($)},{default:l(()=>e[7]||(e[7]=[m("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((s(),p(y,{class:"!border-none",shadow:"never"},{default:l(()=>[f((s(),p(u,{type:"primary",onClick:P},{icon:l(()=>[o(h,{name:"el-icon-Plus"})]),default:l(()=>[e[8]||(e[8]=m(" \u65B0\u589E "))]),_:1})),[[b,["config.config/add"]]]),f((s(),p(u,{disabled:!t(w).length,onClick:e[3]||(e[3]=a=>F(t(w)))},{default:l(()=>e[9]||(e[9]=[m(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[b,["config.config/delete"]]]),B("div",se,[o(N,{data:t(d).lists,onSelectionChange:E},{default:l(()=>[o(c,{type:"selection",width:"55"}),o(c,{label:"\u7C7B\u578B",prop:"type","show-overflow-tooltip":""}),o(c,{label:"\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),o(c,{label:"\u503C",prop:"value","show-overflow-tooltip":""}),o(c,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:a})=>[f((s(),p(u,{type:"primary",link:"",onClick:I=>R(a)},{default:l(()=>e[10]||(e[10]=[m(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[b,["config.config/edit"]]]),f((s(),p(u,{type:"danger",link:"",onClick:I=>F(a.id)},{default:l(()=>e[11]||(e[11]=[m(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[b,["config.config/delete"]]])]),_:1})]),_:1},8,["data"])]),B("div",re,[o(S,{modelValue:t(d),"onUpdate:modelValue":e[4]||(e[4]=a=>ne(d)?d.value=a:null),onChange:t(C)},null,8,["modelValue","onChange"])])]),_:1})),[[T,t(d).loading]]),t(v)?(s(),p(ee,{key:0,ref_key:"editRef",ref:_,"dict-data":t(x),onSuccess:t(C),onClose:e[5]||(e[5]=a=>v.value=!1)},null,8,["dict-data","onSuccess"])):ie("",!0)])}}});export{Xe as default};
