2 lines
5.3 KiB
JavaScript
2 lines
5.3 KiB
JavaScript
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.9990c39e.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.3de7c996.js";import{f as te,b as oe}from"./index.9424646f.js";import{u as ae}from"./usePaging.6a6670f9.js";import{u as le}from"./useDictOptions.d0c29343.js";import{a as ne,d as ie,e as se}from"./brand.23f2275e.js";import{_ as re}from"./edit.vue_vue_type_script_setup_true_name_brandEdit_lang.e55ed9a0.js";import{_ as ue}from"./detail.vue_vue_type_script_setup_true_name_brandEdit_lang.ff46f2ab.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.be4d3224.js";import"./index.1fdb40b8.js";import"./index.f4f18b5a.js";import"./index.08bd2556.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\u606F",prop:"more","show-overflow-tooltip":""}),e(i,{label:"\u56FE\u7247",prop:"pic"},{default:a(({row:l})=>[e(Q,{style:{width:"50px",height:"50px"},src:l.pic},null,8,["src"])]),_:1}),e(i,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(i,{label:"\u64CD\u4F5C",width:"170",fixed:"right"},{default:a(({row:l})=>[p((s(),r(m,{type:"primary",link:"",onClick:x=>N(l)},{default:a(()=>[d(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[C,["goods.brand/edit"]]]),p((s(),r(m,{type:"danger",link:"",onClick:x=>D(l.id)},{default:a(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[C,["goods.brand/delete"]]]),p((s(),r(m,{link:"",onClick:x=>U(l.id)},{default:a(()=>[d(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[C,["goods.brand/delete"]]])]),_:1})]),_:1},8,["data"])]),$("div",fe,[e(K,{modelValue:o(c),"onUpdate:modelValue":t[2]||(t[2]=l=>ce(c)?c.value=l:null),onChange:o(_)},null,8,["modelValue","onChange"])])]),_:1})),[[M,o(c).loading]]),o(b)?(s(),r(re,{key:0,ref_key:"editRef",ref:v,"dict-data":o(y),onSuccess:o(_),onClose:t[3]||(t[3]=l=>b.value=!1)},null,8,["dict-data","onSuccess"])):R("",!0),o(g)?(s(),r(ue,{key:1,ref_key:"detailRef",ref:F,"dict-data":o(y),onSuccess:o(_),onClose:t[4]||(t[4]=l=>g.value=!1)},null,8,["dict-data","onSuccess"])):R("",!0)])}}});export{rt as default};
|