2 lines
5.7 KiB
JavaScript
2 lines
5.7 KiB
JavaScript
import{C as Z,D as z,w as G,F as H,L as J,M as W,b as X,N as Y,O as ee}from"./element-plus.4a7d92a3.js";import{_ as oe}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{f as te,b as ae}from"./index.5488da9c.js";import{d as K,s as le,r as D,Z as re,ap as ne,o as i,c as se,U as e,L as a,u as o,aa as E,R as d,M as _,K as m,a as B,a3 as V,j as ie,Q as ue,n as x}from"./@vue.18505fe0.js";import{u as pe}from"./usePaging.6a6670f9.js";import{u as de}from"./useDictOptions.d26b50f5.js";import{e as me,a as ce}from"./store_category.01b46e8c.js";import"./lodash.9dc701ad.js";import{u as _e,a as fe}from"./vue-router.101084e3.js";import{_ as ye}from"./edit.vue_vue_type_script_setup_true_name_storeCategoryEdit_lang.72333937.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./pinia.a969beab.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./picker.fea45018.js";import"./index.fc5b29ca.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.9e0540e3.js";import"./index.d5185371.js";import"./vuedraggable.1648e3a8.js";import"./vue.393dceb0.js";import"./sortablejs.382fadba.js";const Ce={class:"mt-4",style:{cursor:"pointer"}},we={class:"flex mt-4 justify-end"},ge=K({name:"storeCategoryLists"}),mo=K({...ge,setup(Fe){var h;const f=le(),y=D(!1),R=_e(),$=fe(),n=re({pid:((h=R.query)==null?void 0:h.pid)||0,name:"",data:"",pic:"",sort:""}),v=D([]),L=r=>{v.value=r.map(({id:t})=>t)},{dictData:S}=de(""),{pager:c,getLists:C,resetParams:I,resetPage:w}=pe({fetchFun:ce,params:n}),N=async()=>{var r;y.value=!0,await x(),(r=f.value)==null||r.open("add")},P=async r=>{var t,u;y.value=!0,await x(),(t=f.value)==null||t.open("edit"),(u=f.value)==null||u.setFormData(r)},b=async r=>{await te.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await me({id:r}),C()};C();const U=(r,t)=>{if(t.no==7)return console.log("\u65E0\u6548\u70B9\u51FB");$.push({path:"/store/store_category",query:{pid:r.id}})};return(r,t)=>{const u=Z,g=z,p=G,T=H,k=J,q=ae,s=W,M=X,j=Y,A=oe,F=ne("perms"),O=ee;return i(),se("div",null,[e(k,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(T,{class:"mb-[-16px] disabledEdit",model:o(n),inline:""},{default:a(()=>[e(g,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name"},{default:a(()=>[e(u,{class:"w-[280px]",modelValue:o(n).name,"onUpdate:modelValue":t[0]||(t[0]=l=>o(n).name=l),onKeydown:E(o(w),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0"},null,8,["modelValue","onKeydown"])]),_:1}),e(g,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data"},{default:a(()=>[e(u,{class:"w-[280px]",modelValue:o(n).data,"onUpdate:modelValue":t[1]||(t[1]=l=>o(n).data=l),onKeydown:E(o(w),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F"},null,8,["modelValue","onKeydown"])]),_:1}),e(g,{label:"\u6392\u5E8F",prop:"sort"},{default:a(()=>[e(u,{class:"w-[280px]",modelValue:o(n).sort,"onUpdate:modelValue":t[2]||(t[2]=l=>o(n).sort=l),onKeydown:E(o(w),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F"},null,8,["modelValue","onKeydown"])]),_:1}),e(g,null,{default:a(()=>[e(p,{type:"primary",onClick:o(w)},{default:a(()=>[d("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(p,{onClick:o(I)},{default:a(()=>[d("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((i(),m(k,{class:"!border-none",shadow:"never"},{default:a(()=>[_((i(),m(p,{type:"primary",onClick:N},{icon:a(()=>[e(q,{name:"el-icon-Plus"})]),default:a(()=>[d(" \u65B0\u589E ")]),_:1})),[[F,["store_category.store_category/add"]]]),_((i(),m(p,{disabled:!o(v).length,onClick:t[3]||(t[3]=l=>b(o(v)))},{default:a(()=>[d(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[F,["store_category.store_category/delete"]]]),B("div",Ce,[e(j,{data:o(c).lists,onSelectionChange:L,onCellClick:U},{default:a(()=>[e(s,{type:"selection",width:"55"}),e(s,{label:"ID",prop:"id",width:"120"}),e(s,{label:"\u6240\u5C5EID",prop:"pid","show-overflow-tooltip":""}),e(s,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(s,{label:"\u56FE\u7247",prop:"pic"},{default:a(({row:l})=>[e(M,{style:{width:"50px",height:"50px"},src:l.pic,"preview-teleported":!0},null,8,["src"])]),_:1}),e(s,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),e(s,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[_((i(),m(p,{type:"primary",link:"",onClick:V(Q=>P(l),["stop"])},{default:a(()=>[d(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[F,["store_category.store_category/edit"]]]),_((i(),m(p,{type:"danger",link:"",onClick:V(Q=>b(l.id),["stop"])},{default:a(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[F,["store_category.store_category/delete"]]])]),_:1})]),_:1},8,["data"])]),B("div",we,[e(A,{modelValue:o(c),"onUpdate:modelValue":t[4]||(t[4]=l=>ie(c)?c.value=l:null),onChange:o(C)},null,8,["modelValue","onChange"])])]),_:1})),[[O,o(c).loading]]),o(y)?(i(),m(ye,{key:0,ref_key:"editRef",ref:f,"dict-data":o(S),onSuccess:o(C),onClose:t[5]||(t[5]=l=>y.value=!1)},null,8,["dict-data","onSuccess"])):ue("",!0)])}}});export{mo as default};
|