ERP-admin/build/admin/assets/index.5cd591d7.js

2 lines
4.4 KiB
JavaScript

import{C as A,D as Q,w as q,F as K,T as M,O,b as Z,Q as z,R as G}from"./element-plus.8c800afc.js";import{_ as H}from"./index.vue_vue_type_script_setup_true_lang.7b224fce.js";import{f as J,b as W}from"./index.2398c167.js";import{u as X}from"./usePaging.6a6670f9.js";import{u as Y}from"./useDictOptions.080d297e.js";import{_ as ee,a as te,b as oe}from"./edit.vue_vue_type_script_setup_true_name_labelEdit_lang.dfd5bb1b.js";import"./lodash.be6e4bb5.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.ef95d8c0.js";import"./axios.77245e3c.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.6061d63f.js";import"./color.1580a89c.js";import"./clone.4ed29f58.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.b29ee5e2.js";import"./vue-clipboard3.15c43b43.js";import"./clipboard.4a3580c9.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./picker.e9a187d6.js";import"./index.d0a14c5a.js";import"./index.427ee87d.js";import"./index.bc8c239a.js";import"./vuedraggable.11c6ad82.js";import"./vue.09510228.js";import"./sortablejs.b9072078.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")},R=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=Q,s=q,P=K,k=M,T=W,g=O,N=Z,S=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(T,{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(S,{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(N,{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=>R(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};