2 lines
4.8 KiB
JavaScript
2 lines
4.8 KiB
JavaScript
import{C as A,D as I,w as M,F as q,L as K,M as O,N as Q,O as Z}from"./element-plus.91c68cc0.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{f as G,b as H}from"./index.892cd835.js";import{u as J}from"./usePaging.f8c888e4.js";import{u as W}from"./useDictOptions.bbcac283.js";import{d as X,e as Y}from"./config.e2c1f70f.js";import"./lodash.4e6d2a38.js";import{_ as ee}from"./edit.vue_vue_type_script_setup_true_name_configEdit_lang.40dee85b.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.659d5af3.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.c6e6b480.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}=J({fetchFun:Y,params:i}),N=async()=>{var n;v.value=!0,await V(),(n=_.value)==null||n.open("add")},P=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 G.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await X({id:n}),C()};return C(),(n,e)=>{const r=A,g=I,u=M,R=q,y=K,U=H,c=O,h=Q,S=z,b=le("perms"),T=Z;return s(),ae("div",null,[o(y,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[o(R,{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:N},{icon:l(()=>[o(U,{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(h,{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:j=>P(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:j=>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};
|