moreShopAdmin/dist/assets/index.953d8b7f.js

2 lines
4.4 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.3a5be7a7.js";import{_ as H}from"./index.vue_vue_type_script_setup_true_lang.0cb80fdf.js";import{f as J,b as W}from"./index.077791ea.js";import{u as X}from"./usePaging.6a6670f9.js";import{u as Y}from"./useDictOptions.67fbbe2f.js";import{_ as ee,a as te,b as oe}from"./edit.vue_vue_type_script_setup_true_name_labelEdit_lang.b087d11a.js";import"./lodash.60201f64.js";import{d as D,s as ae,r as w,Z as le,ap as ne,o as i,c as ie,U as e,L as t,u as o,R as r,M as p,K as m,a as y,j as se,Q as re,n as B}from"./@vue.18505fe0.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.8ae0c638.js";import"./axios.2b8d80bd.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.886c5f5a.js";import"./pinia.a969beab.js";import"./css-color-function.b82a2ce7.js";import"./color.b905eb26.js";import"./clone.e1fb2883.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.495afef3.js";import"./vue-clipboard3.cb649e18.js";import"./clipboard.4592e390.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./picker.1e07f33b.js";import"./index.164c0d34.js";import"./index.643cac86.js";import"./index.51db1d5e.js";import"./vuedraggable.d1fd737a.js";import"./vue.feef8fd6.js";import"./sortablejs.c8f4cbb7.js";const me={class:"mt-4"},ue={class:"flex mt-4 justify-end"},pe=D({name:"labelLists"}),tt=D({...pe,setup(ce){const c=ae(),d=w(!1),_=le({label_name:"",logo:""}),C=w([]),F=n=>{C.value=n.map(({id:a})=>a)},{dictData:x}=Y(""),{pager:u,getLists:f,resetParams:V,resetPage:L}=X({fetchFun:oe,params:_}),$=async()=>{var n;d.value=!0,await B(),(n=c.value)==null||n.open("add")},N=async n=>{var a,b;d.value=!0,await B(),(a=c.value)==null||a.open("edit"),(b=c.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,a)=>{const b=A,h=M,s=q,P=K,k=O,R=W,g=Q,S=Z,T=z,I=H,v=ne("perms"),U=G;return i(),ie("div",null,[e(k,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(P,{class:"mb-[-16px]",model:o(_),inline:""},{default:t(()=>[e(h,{label:"\u6807\u7B7E\u540D\u5B57",prop:"label_name"},{default:t(()=>[e(b,{class:"w-[280px]",modelValue:o(_).label_name,"onUpdate:modelValue":a[0]||(a[0]=l=>o(_).label_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6807\u7B7E\u540D\u5B57"},null,8,["modelValue"])]),_:1}),e(h,null,{default:t(()=>[e(s,{type:"primary",onClick:o(L)},{default:t(()=>[r("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(s,{onClick:o(V)},{default:t(()=>[r("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),p((i(),m(k,{class:"!border-none",shadow:"never"},{default:t(()=>[p((i(),m(s,{type:"primary",onClick:$},{icon:t(()=>[e(R,{name:"el-icon-Plus"})]),default:t(()=>[r(" \u65B0\u589E ")]),_:1})),[[v,["setting.label/add"]]]),p((i(),m(s,{disabled:!o(C).length,onClick:a[1]||(a[1]=l=>E(o(C)))},{default:t(()=>[r(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[v,["setting.label/delete"]]]),y("div",me,[e(T,{data:o(u).lists,onSelectionChange:F},{default:t(()=>[e(g,{type:"selection",width:"55"}),e(g,{label:"\u6807\u7B7E\u540D\u5B57",prop:"label_name","show-overflow-tooltip":""}),e(g,{label:"logo(\u56FE\u7247)",prop:"logo"},{default:t(({row:l})=>[e(S,{style:{width:"50px",height:"50px"},src:l.logo},null,8,["src"])]),_:1}),e(g,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:l})=>[p((i(),m(s,{type:"primary",link:"",onClick:j=>N(l)},{default:t(()=>[r(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[v,["setting.label/edit"]]]),p((i(),m(s,{type:"danger",link:"",onClick:j=>E(l.id)},{default:t(()=>[r(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[v,["setting.label/delete"]]])]),_:1})]),_:1},8,["data"])]),y("div",ue,[e(I,{modelValue:o(u),"onUpdate:modelValue":a[2]||(a[2]=l=>se(u)?u.value=l:null),onChange:o(f)},null,8,["modelValue","onChange"])])]),_:1})),[[U,o(u).loading]]),o(d)?(i(),m(ee,{key:0,ref_key:"editRef",ref:c,"dict-data":o(x),onSuccess:o(f),onClose:a[3]||(a[3]=l=>d.value=!1)},null,8,["dict-data","onSuccess"])):re("",!0)])}}});export{tt as default};