2 lines
4.7 KiB
JavaScript
2 lines
4.7 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.4a7d92a3.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{f as G,b as H}from"./index.572e6a3e.js";import{u as J}from"./usePaging.6a6670f9.js";import{u as W}from"./useDictOptions.357feaed.js";import{d as X,e as Y}from"./config.9806a87e.js";import"./lodash.9dc701ad.js";import{_ as ee}from"./edit.vue_vue_type_script_setup_true_name_configEdit_lang.bd2e5c18.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.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.c33ef412.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const se={class:"mt-4"},ue={class:"flex mt-4 justify-end"},re=V({name:"configLists"}),He=V({...re,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,u;v.value=!0,await h(),(t=_.value)==null||t.open("edit"),(u=_.value)==null||u.setFormData(n)},F=async n=>{await G.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await X({id:n}),C()};return C(),(n,t)=>{const u=A,g=I,r=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(u,{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(u,{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(u,{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(r,{type:"primary",onClick:o($)},{default:a(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(r,{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(r,{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(r,{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(r,{type:"primary",link:"",onClick:j=>N(l)},{default:a(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[b,["config.config/edit"]]]),f((s(),p(r,{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",ue,[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{He as default};
|