moreShopAdmin/build/admin/assets/index.d8fd5acf.js

2 lines
5.5 KiB
JavaScript

import{C as Q,D as Z,w as z,F as G,L as H,M as J,b as W,N as X,O as Y}from"./element-plus.78e68aed.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.3c4454b7.js";import{f as oe,b as te}from"./index.230f36ed.js";import{d as V,s as ae,r as h,Z as le,ap as re,o as i,c as se,U as e,L as a,u as t,R as m,M as _,K as d,a as k,a3 as D,j as ne,Q as ie,n as B}from"./@vue.18505fe0.js";import{u as ue}from"./usePaging.6a6670f9.js";import{u as pe}from"./useDictOptions.914e77c9.js";import{e as me,a as de}from"./store_category.fd421815.js";import"./lodash.60201f64.js";import{u as ce,a as _e}from"./vue-router.101084e3.js";import{_ as fe}from"./edit.vue_vue_type_script_setup_true_name_storeCategoryEdit_lang.762d8b18.js";import"./lodash-es.f52bd8b1.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"./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.b5953134.js";import"./index.4b6d7f0d.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.abb04479.js";import"./index.ddc50b91.js";import"./vuedraggable.d1fd737a.js";import"./vue.feef8fd6.js";import"./sortablejs.c8f4cbb7.js";const Ce={class:"mt-4",style:{cursor:"pointer"}},Fe={class:"flex mt-4 justify-end"},Ee=V({name:"storeCategoryLists"}),po=V({...Ee,setup(be){var y;const f=ae(),C=h(!1),x=ce(),R=_e(),s=le({pid:((y=x.query)==null?void 0:y.pid)||0,name:"",data:"",pic:"",sort:""}),g=h([]),$=r=>{g.value=r.map(({id:o})=>o)},{dictData:L}=pe(""),{pager:c,getLists:F,resetParams:S,resetPage:I}=ue({fetchFun:de,params:s}),N=async()=>{var r;C.value=!0,await B(),(r=f.value)==null||r.open("add")},P=async r=>{var o,u;C.value=!0,await B(),(o=f.value)==null||o.open("edit"),(u=f.value)==null||u.setFormData(r)},v=async r=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await me({id:r}),F()};F();const U=(r,o)=>{if(o.no==7)return console.log("\u65E0\u6548\u70B9\u51FB");R.push({path:"/store/store_category",query:{pid:r.id}})};return(r,o)=>{const u=Q,E=Z,p=z,T=G,w=H,q=te,n=J,M=W,j=X,A=ee,b=re("perms"),K=Y;return i(),se("div",null,[e(w,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(T,{class:"mb-[-16px] disabledEdit",model:t(s),inline:""},{default:a(()=>[e(E,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name"},{default:a(()=>[e(u,{class:"w-[280px]",modelValue:t(s).name,"onUpdate:modelValue":o[0]||(o[0]=l=>t(s).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(E,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data"},{default:a(()=>[e(u,{class:"w-[280px]",modelValue:t(s).data,"onUpdate:modelValue":o[1]||(o[1]=l=>t(s).data=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(E,{label:"\u6392\u5E8F",prop:"sort"},{default:a(()=>[e(u,{class:"w-[280px]",modelValue:t(s).sort,"onUpdate:modelValue":o[2]||(o[2]=l=>t(s).sort=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F"},null,8,["modelValue"])]),_:1}),e(E,null,{default:a(()=>[e(p,{type:"primary",onClick:t(I)},{default:a(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(p,{onClick:t(S)},{default:a(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((i(),d(w,{class:"!border-none",shadow:"never"},{default:a(()=>[_((i(),d(p,{type:"primary",onClick:N},{icon:a(()=>[e(q,{name:"el-icon-Plus"})]),default:a(()=>[m(" \u65B0\u589E ")]),_:1})),[[b,["store.storecategory/add"]]]),_((i(),d(p,{disabled:!t(g).length,onClick:o[3]||(o[3]=l=>v(t(g)))},{default:a(()=>[m(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[b,["store.storecategory/delete"]]]),k("div",Ce,[e(j,{data:t(c).lists,onSelectionChange:$,onCellClick:U},{default:a(()=>[e(n,{type:"selection",width:"55"}),e(n,{label:"ID",prop:"id",width:"120"}),e(n,{label:"\u6240\u5C5EID",prop:"pid","show-overflow-tooltip":""}),e(n,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(n,{label:"\u56FE\u7247",prop:"pic"},{default:a(({row:l})=>[e(M,{style:{width:"50px",height:"50px"},src:l.pic},null,8,["src"])]),_:1}),e(n,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),e(n,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(n,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[_((i(),d(p,{type:"primary",link:"",onClick:D(O=>P(l),["stop"])},{default:a(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[b,["store.storecategory/edit"]]]),_((i(),d(p,{type:"danger",link:"",onClick:D(O=>v(l.id),["stop"])},{default:a(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[b,["store.storecategory/delete"]]])]),_:1})]),_:1},8,["data"])]),k("div",Fe,[e(A,{modelValue:t(c),"onUpdate:modelValue":o[4]||(o[4]=l=>ne(c)?c.value=l:null),onChange:t(F)},null,8,["modelValue","onChange"])])]),_:1})),[[K,t(c).loading]]),t(C)?(i(),d(fe,{key:0,ref_key:"editRef",ref:f,"dict-data":t(L),onSuccess:t(F),onClose:o[5]||(o[5]=l=>C.value=!1)},null,8,["dict-data","onSuccess"])):ie("",!0)])}}});export{po as default};