2024-05-16 10:05:14 +08:00
|
|
|
import{C as O,D as Z,w as z,F as G,T as H,O as J,b as W,Q as X,R as Y}from"./element-plus.8c800afc.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.7b224fce.js";import{f as te,b as oe}from"./index.2398c167.js";import{u as ae}from"./usePaging.6a6670f9.js";import{u as le}from"./useDictOptions.080d297e.js";import{a as ne,d as ie,e as se}from"./brand.c6cce5fb.js";import{_ as re}from"./edit.vue_vue_type_script_setup_true_name_brandEdit_lang.1e808e94.js";import{_ as ue}from"./detail.vue_vue_type_script_setup_true_name_brandEdit_lang.e19d5a5e.js";import{d as S,s as V,r as k,Z as me,ap as de,o as s,c as pe,U as e,L as a,u as o,R as d,M as p,K as r,a as $,j as ce,Q as R,n as E}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"./lodash.be6e4bb5.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 _e={class:"mt-4"},fe={class:"flex mt-4 justify-end"},Ce=S({name:"brandLists"}),rt=S({...Ce,setup(ve){const v=V(),F=V(),b=k(!1),g=k(!1),w=me({name:"",py:"",number:"",data:"",more:"",pic:"",sort:""}),h=k([]),L=n=>{h.value=n.map(({id:t})=>t)},{dictData:y}=le(""),{pager:c,getLists:_,resetParams:P,resetPage:T}=ae({fetchFun:se,params:w}),I=async()=>{var n;b.value=!0,await E(),(n=v.value)==null||n.open("add")},N=async n=>{var t,u;b.value=!0,await E(),(t=v.value)==null||t.open("edit"),(u=v.value)==null||u.setFormData(n)},U=async n=>{var u,f;let t=await ne({id:n});g.value=!0,await E(),(u=F.value)==null||u.open("edit"),(f=F.value)==null||f.setFormData(t)},D=async n=>{await te.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ie({id:n}),_()};return _(),(n,t)=>{const u=O,f=Z,m=z,j=G,B=H,A=oe,i=J,Q=W,q=X,K=ee,C=de("perms"),M=Y;return s(),pe("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(j,{class:"mb-[-16px]",model:o(w),inline:""},{default:a(()=>[e(f,{label:"\u54C1\u724C\u540D\u79F0",prop:"name"},{default:a(()=>[e(u,{class:"w-[280px]",modelValue:o(w).name,"onUpdate:modelValue":t[0]||(t[0]=l=>o(w).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u54C1\u724C\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(f,null,{default:a(()=>[e(m,{type:"primary",onClick:o(T)},{default:a(()=>[d("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(m,{onClick:o(P)},{default:a(()=>[d("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),p((s(),r(B,{class:"!border-none",shadow:"never"},{default:a(()=>[p((s(),r(m,{type:"primary",onClick:I},{icon:a(()=>[e(A,{name:"el-icon-Plus"})]),default:a(()=>[d(" \u65B0\u589E ")]),_:1})),[[C,["goods.brand/add"]]]),p((s(),r(m,{disabled:!o(h).length,onClick:t[1]||(t[1]=l=>D(o(h)))},{default:a(()=>[d(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[C,["goods.brand/delete"]]]),$("div",_e,[e(q,{data:o(c).lists,onSelectionChange:L},{default:a(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"ID",prop:"id",width:"55"}),e(i,{label:"\u54C1\u724C\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(i,{label:"\u54C1\u724C\u7F16\u53F7",prop:"number","show-overflow-tooltip":""}),e(i,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),e(i,{label:"\u6269\u5C55\u4FE1
|