2 lines
4.6 KiB
JavaScript
2 lines
4.6 KiB
JavaScript
import{C as A,D as M,w as q,F as K,L as O,M as Q,b as Z,N as z,O as G}from"./element-plus.91c68cc0.js";import{_ as H}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{f as J,b as W}from"./index.27d7bb66.js";import{u as X}from"./usePaging.f8c888e4.js";import{u as Y}from"./useDictOptions.9fa317eb.js";import{_ as ee,a as te,b as oe}from"./edit.vue_vue_type_script_setup_true_name_labelEdit_lang.47999ed0.js";import"./lodash.4e6d2a38.js";import{d as F,s as ae,r as y,Z as le,ap as ne,o as i,c as ie,U as t,L as o,u as a,R as r,M as u,K as m,a as B,j as se,Q as re,n as D}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.cffda5ac.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"./picker.87f3902a.js";import"./index.e9fb0fda.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./index.ab6db84c.js";import"./index.89ecc357.js";import"./vuedraggable.c04c7c0c.js";import"./vue.3299ef77.js";import"./sortablejs.c62bcaf8.js";const me={class:"mt-4"},pe={class:"flex mt-4 justify-end"},ue=F({name:"labelLists"}),nt=F({...ue,setup(de){const d=ae(),c=y(!1),_=le({label_name:"",logo:""}),C=y([]),x=n=>{C.value=n.map(({id:e})=>e)},{dictData:V}=Y(""),{pager:p,getLists:f,resetParams:L,resetPage:h}=X({fetchFun:oe,params:_}),$=async()=>{var n;c.value=!0,await D(),(n=d.value)==null||n.open("add")},N=async n=>{var e,b;c.value=!0,await D(),(e=d.value)==null||e.open("edit"),(b=d.value)==null||b.setFormData(n)},E=async n=>{await J.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await te({id:n}),f()};return f(),(n,e)=>{const b=A,k=M,s=q,P=K,w=O,R=W,g=Q,S=Z,T=z,I=H,v=ne("perms"),U=G;return i(),ie("div",null,[t(w,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[t(P,{class:"mb-[-16px]",model:a(_),inline:""},{default:o(()=>[t(k,{label:"\u6807\u7B7E\u540D\u5B57",prop:"label_name"},{default:o(()=>[t(b,{class:"w-[280px]",modelValue:a(_).label_name,"onUpdate:modelValue":e[0]||(e[0]=l=>a(_).label_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6807\u7B7E\u540D\u5B57"},null,8,["modelValue"])]),_:1}),t(k,null,{default:o(()=>[t(s,{type:"primary",onClick:a(h)},{default:o(()=>e[4]||(e[4]=[r("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(s,{onClick:a(L)},{default:o(()=>e[5]||(e[5]=[r("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),u((i(),m(w,{class:"!border-none",shadow:"never"},{default:o(()=>[u((i(),m(s,{type:"primary",onClick:$},{icon:o(()=>[t(R,{name:"el-icon-Plus"})]),default:o(()=>[e[6]||(e[6]=r(" \u65B0\u589E "))]),_:1})),[[v,["setting.label/add"]]]),u((i(),m(s,{disabled:!a(C).length,onClick:e[1]||(e[1]=l=>E(a(C)))},{default:o(()=>e[7]||(e[7]=[r(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[v,["setting.label/delete"]]]),B("div",me,[t(T,{data:a(p).lists,onSelectionChange:x},{default:o(()=>[t(g,{type:"selection",width:"55"}),t(g,{label:"\u6807\u7B7E\u540D\u5B57",prop:"label_name","show-overflow-tooltip":""}),t(g,{label:"logo(\u56FE\u7247)",prop:"logo"},{default:o(({row:l})=>[t(S,{style:{width:"50px",height:"50px"},src:l.logo,"preview-teleported":!0},null,8,["src"])]),_:1}),t(g,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:l})=>[u((i(),m(s,{type:"primary",link:"",onClick:j=>N(l)},{default:o(()=>e[8]||(e[8]=[r(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[v,["setting.label/edit"]]]),u((i(),m(s,{type:"danger",link:"",onClick:j=>E(l.id)},{default:o(()=>e[9]||(e[9]=[r(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[v,["setting.label/delete"]]])]),_:1})]),_:1},8,["data"])]),B("div",pe,[t(I,{modelValue:a(p),"onUpdate:modelValue":e[2]||(e[2]=l=>se(p)?p.value=l:null),onChange:a(f)},null,8,["modelValue","onChange"])])]),_:1})),[[U,a(p).loading]]),a(c)?(i(),m(ee,{key:0,ref_key:"editRef",ref:d,"dict-data":a(V),onSuccess:a(f),onClose:e[3]||(e[3]=l=>c.value=!1)},null,8,["dict-data","onSuccess"])):re("",!0)])}}});export{nt as default};
|