2 lines
6.0 KiB
JavaScript
2 lines
6.0 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.73c9e9a6.js";import{_ as H}from"./index.vue_vue_type_script_setup_true_lang.317e431e.js";import{f as J,b as W}from"./index.bd5cd373.js";import{u as X}from"./usePaging.77fa9d39.js";import{u as Y}from"./useDictOptions.3ea9a314.js";import{d as ee,e as oe}from"./brand.4eabb91c.js";import"./lodash.403d4198.js";import{_ as le}from"./edit.vue_vue_type_script_setup_true_name_brandEdit_lang.bf6326e0.js";import{d as k,s as ae,r as g,Z as te,ap as ue,o as i,c as ne,U as e,L as t,u as o,R as m,M as f,K as c,a as y,j as re,Q as se,n as h}from"./@vue.663bc523.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.4b5afb22.js";import"./@element-plus.8b1118e2.js";import"./dayjs.3f38f327.js";import"./axios.18becb61.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.58fac957.js";import"./pinia.068f0ef2.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.e6143ca6.js";import"./color.d79aa98b.js";import"./clone.a63396d9.js";import"./color-convert.69e17089.js";import"./color-string.e356f5de.js";import"./color-name.e7a4e1d3.js";import"./nprogress.48cb4095.js";import"./vue-clipboard3.6d09ff6e.js";import"./clipboard.564aa4b9.js";import"./echarts.8485a033.js";import"./zrender.b2f30540.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.85e4ac8b.js";import"./picker.903854da.js";import"./index.fa58e261.js";import"./index.fec21d03.js";import"./index.b3eba7ba.js";import"./vuedraggable.917b44c2.js";import"./vue.648d3a8e.js";import"./sortablejs.86ceda0b.js";const pe={class:"mt-4"},ie={class:"flex mt-4 justify-end"},de=k({name:"brandLists"}),eo=k({...de,setup(me){const _=ae(),b=g(!1),u=te({name:"",py:"",number:"",data:"",more:"",pic:"",sort:""}),E=g([]),x=r=>{E.value=r.map(({id:l})=>l)},{dictData:B}=Y(""),{pager:F,getLists:C,resetParams:D,resetPage:U}=X({fetchFun:oe,params:u}),$=async()=>{var r;b.value=!0,await h(),(r=_.value)==null||r.open("add")},L=async r=>{var l,s;b.value=!0,await h(),(l=_.value)==null||l.open("edit"),(s=_.value)==null||s.setFormData(r)},v=async r=>{await J.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ee({id:r}),C()};return C(),(r,l)=>{const s=A,p=M,d=q,N=K,V=O,P=W,n=Q,R=Z,I=z,S=H,w=ue("perms"),T=G;return i(),ne("div",null,[e(V,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(N,{class:"mb-[-16px]",model:o(u),inline:""},{default:t(()=>[e(p,{label:"\u54C1\u724C\u540D\u79F0",prop:"name"},{default:t(()=>[e(s,{class:"w-[280px]",modelValue:o(u).name,"onUpdate:modelValue":l[0]||(l[0]=a=>o(u).name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u54C1\u724C\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u62FC\u97F3\u4FE1\u606F",prop:"py"},{default:t(()=>[e(s,{class:"w-[280px]",modelValue:o(u).py,"onUpdate:modelValue":l[1]||(l[1]=a=>o(u).py=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u62FC\u97F3\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u54C1\u724C\u7F16\u53F7",prop:"number"},{default:t(()=>[e(s,{class:"w-[280px]",modelValue:o(u).number,"onUpdate:modelValue":l[2]||(l[2]=a=>o(u).number=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u54C1\u724C\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data"},{default:t(()=>[e(s,{class:"w-[280px]",modelValue:o(u).data,"onUpdate:modelValue":l[3]||(l[3]=a=>o(u).data=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u6269\u5C55\u4FE1\u606F",prop:"more"},{default:t(()=>[e(s,{class:"w-[280px]",modelValue:o(u).more,"onUpdate:modelValue":l[4]||(l[4]=a=>o(u).more=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6269\u5C55\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u6392\u5E8F",prop:"sort"},{default:t(()=>[e(s,{class:"w-[280px]",modelValue:o(u).sort,"onUpdate:modelValue":l[5]||(l[5]=a=>o(u).sort=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F"},null,8,["modelValue"])]),_:1}),e(p,null,{default:t(()=>[e(d,{type:"primary",onClick:o(U)},{default:t(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(d,{onClick:o(D)},{default:t(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((i(),c(V,{class:"!border-none",shadow:"never"},{default:t(()=>[f((i(),c(d,{type:"primary",onClick:$},{icon:t(()=>[e(P,{name:"el-icon-Plus"})]),default:t(()=>[m(" \u65B0\u589E ")]),_:1})),[[w,["goods.brand/add"]]]),f((i(),c(d,{disabled:!o(E).length,onClick:l[6]||(l[6]=a=>v(o(E)))},{default:t(()=>[m(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["goods.brand/delete"]]]),y("div",pe,[e(I,{data:o(F).lists,onSelectionChange:x},{default:t(()=>[e(n,{type:"selection",width:"55"}),e(n,{label:"ID",prop:"id",width:"55"}),e(n,{label:"\u54C1\u724C\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(n,{label:"\u62FC\u97F3\u4FE1\u606F",prop:"py","show-overflow-tooltip":""}),e(n,{label:"\u54C1\u724C\u7F16\u53F7",prop:"number","show-overflow-tooltip":""}),e(n,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),e(n,{label:"\u6269\u5C55\u4FE1\u606F",prop:"more","show-overflow-tooltip":""}),e(n,{label:"\u56FE\u7247",prop:"pic"},{default:t(({row:a})=>[e(R,{style:{width:"50px",height:"50px"},src:a.pic},null,8,["src"])]),_:1}),e(n,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(n,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:a})=>[f((i(),c(d,{type:"primary",link:"",onClick:j=>L(a)},{default:t(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["goods.brand/edit"]]]),f((i(),c(d,{type:"danger",link:"",onClick:j=>v(a.id)},{default:t(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["goods.brand/delete"]]])]),_:1})]),_:1},8,["data"])]),y("div",ie,[e(S,{modelValue:o(F),"onUpdate:modelValue":l[7]||(l[7]=a=>re(F)?F.value=a:null),onChange:o(C)},null,8,["modelValue","onChange"])])]),_:1})),[[T,o(F).loading]]),o(b)?(i(),c(le,{key:0,ref_key:"editRef",ref:_,"dict-data":o(B),onSuccess:o(C),onClose:l[8]||(l[8]=a=>b.value=!1)},null,8,["dict-data","onSuccess"])):se("",!0)])}}});export{eo as default};
|