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.2c2b06a1.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.7141614b.js";import{f as G,b as H}from"./index.3ccf3a31.js";import{u as J}from"./usePaging.6a6670f9.js";import{u as W}from"./useDictOptions.126182fb.js";import{d as X,e as Y}from"./config.01301613.js";import"./lodash.4e6d2a38.js";import{_ as ee}from"./edit.vue_vue_type_script_setup_true_name_configEdit_lang.7a0255d5.js";import{d as V,s as oe,r as k,Z as te,ap as ae,o as s,c as le,U as e,L as a,u as o,R as m,M as f,K as p,a as B,j as ne,Q as ie,n as h}from"./@vue.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.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.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.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.b0c09b66.js";import"./index.4dc74392.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const se={class:"mt-4"},re={class:"flex mt-4 justify-end"},ue=V({name:"configLists"}),Xe=V({...ue,setup(me){const _=oe(),v=k(!1),i=te({type:"",name:"",value:""}),w=k([]),D=n=>{w.value=n.map(({id:t})=>t)},{dictData:E}=W(""),{pager:d,getLists:C,resetParams:x,resetPage:$}=J({fetchFun:Y,params:i}),L=async()=>{var n;v.value=!0,await h(),(n=_.value)==null||n.open("add")},N=async n=>{var t,r;v.value=!0,await h(),(t=_.value)==null||t.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,t)=>{const r=A,g=I,u=M,P=q,y=K,R=H,c=O,U=Q,S=z,b=ae("perms"),T=Z;return s(),le("div",null,[e(y,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(P,{class:"mb-[-16px]",model:o(i),inline:""},{default:a(()=>[e(g,{label:"\u7C7B\u578B",prop:"type"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:o(i).type,"onUpdate:modelValue":t[0]||(t[0]=l=>o(i).type=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7C7B\u578B"},null,8,["modelValue"])]),_:1}),e(g,{label:"\u540D\u79F0",prop:"name"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:o(i).name,"onUpdate:modelValue":t[1]||(t[1]=l=>o(i).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(g,{label:"\u503C",prop:"value"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:o(i).value,"onUpdate:modelValue":t[2]||(t[2]=l=>o(i).value=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u503C"},null,8,["modelValue"])]),_:1}),e(g,null,{default:a(()=>[e(u,{type:"primary",onClick:o($)},{default:a(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(u,{onClick:o(x)},{default:a(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((s(),p(y,{class:"!border-none",shadow:"never"},{default:a(()=>[f((s(),p(u,{type:"primary",onClick:L},{icon:a(()=>[e(R,{name:"el-icon-Plus"})]),default:a(()=>[m(" \u65B0\u589E ")]),_:1})),[[b,["config.config/add"]]]),f((s(),p(u,{disabled:!o(w).length,onClick:t[3]||(t[3]=l=>F(o(w)))},{default:a(()=>[m(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[b,["config.config/delete"]]]),B("div",se,[e(U,{data:o(d).lists,onSelectionChange:D},{default:a(()=>[e(c,{type:"selection",width:"55"}),e(c,{label:"\u7C7B\u578B",prop:"type","show-overflow-tooltip":""}),e(c,{label:"\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(c,{label:"\u503C",prop:"value","show-overflow-tooltip":""}),e(c,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[f((s(),p(u,{type:"primary",link:"",onClick:j=>N(l)},{default:a(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[b,["config.config/edit"]]]),f((s(),p(u,{type:"danger",link:"",onClick:j=>F(l.id)},{default:a(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[b,["config.config/delete"]]])]),_:1})]),_:1},8,["data"])]),B("div",re,[e(S,{modelValue:o(d),"onUpdate:modelValue":t[4]||(t[4]=l=>ne(d)?d.value=l:null),onChange:o(C)},null,8,["modelValue","onChange"])])]),_:1})),[[T,o(d).loading]]),o(v)?(s(),p(ee,{key:0,ref_key:"editRef",ref:_,"dict-data":o(E),onSuccess:o(C),onClose:t[5]||(t[5]=l=>v.value=!1)},null,8,["dict-data","onSuccess"])):ie("",!0)])}}});export{Xe as default};
|