2 lines
5.9 KiB
JavaScript
2 lines
5.9 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.91c68cc0.js";import{_ as oe}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{f as te,b as ae}from"./index.0e5577f4.js";import{d as K,s as le,r as B,Z as re,ap as ne,o as i,c as se,U as o,L as a,u as t,aa as E,R as d,M as _,K as m,a as V,a3 as h,j as ie,Q as ue,n as x}from"./@vue.76ce7aa3.js";import{u as pe}from"./usePaging.f8c888e4.js";import{u as de}from"./useDictOptions.1cd81cc1.js";import{e as me,a as ce}from"./store_category.3fcc23e3.js";import"./lodash.4e6d2a38.js";import{u as _e,a as fe}from"./vue-router.10bd5b90.js";import{_ as ye}from"./edit.vue_vue_type_script_setup_true_name_storeCategoryEdit_lang.c85528b8.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./pinia.f3529286.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./picker.42c24469.js";import"./index.395bb96e.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./index.30ca9d2e.js";import"./index.22ace1f3.js";import"./vuedraggable.c04c7c0c.js";import"./vue.3299ef77.js";import"./sortablejs.c62bcaf8.js";const Ce={class:"mt-4",style:{cursor:"pointer"}},we={class:"flex mt-4 justify-end"},ge=K({name:"storeCategoryLists"}),fo=K({...ge,setup(Fe){var k;const f=le(),y=B(!1),R=_e(),$=fe(),n=re({pid:((k=R.query)==null?void 0:k.pid)||0,name:"",data:"",pic:"",sort:""}),v=B([]),L=r=>{v.value=r.map(({id:e})=>e)},{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 e,u;y.value=!0,await x(),(e=f.value)==null||e.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,e)=>{if(e.no==7)return console.log("\u65E0\u6548\u70B9\u51FB");$.push({path:"/store/store_category",query:{pid:r.id}})};return(r,e)=>{const u=Z,g=z,p=G,T=H,D=J,q=ae,s=W,M=X,j=Y,A=oe,F=ne("perms"),O=ee;return i(),se("div",null,[o(D,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[o(T,{class:"mb-[-16px] disabledEdit",model:t(n),inline:""},{default:a(()=>[o(g,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name"},{default:a(()=>[o(u,{class:"w-[280px]",modelValue:t(n).name,"onUpdate:modelValue":e[0]||(e[0]=l=>t(n).name=l),onKeydown:E(t(w),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0"},null,8,["modelValue","onKeydown"])]),_:1}),o(g,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data"},{default:a(()=>[o(u,{class:"w-[280px]",modelValue:t(n).data,"onUpdate:modelValue":e[1]||(e[1]=l=>t(n).data=l),onKeydown:E(t(w),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F"},null,8,["modelValue","onKeydown"])]),_:1}),o(g,{label:"\u6392\u5E8F",prop:"sort"},{default:a(()=>[o(u,{class:"w-[280px]",modelValue:t(n).sort,"onUpdate:modelValue":e[2]||(e[2]=l=>t(n).sort=l),onKeydown:E(t(w),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F"},null,8,["modelValue","onKeydown"])]),_:1}),o(g,null,{default:a(()=>[o(p,{type:"primary",onClick:t(w)},{default:a(()=>e[6]||(e[6]=[d("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(p,{onClick:t(I)},{default:a(()=>e[7]||(e[7]=[d("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((i(),m(D,{class:"!border-none",shadow:"never"},{default:a(()=>[_((i(),m(p,{type:"primary",onClick:N},{icon:a(()=>[o(q,{name:"el-icon-Plus"})]),default:a(()=>[e[8]||(e[8]=d(" \u65B0\u589E "))]),_:1})),[[F,["store_category.store_category/add"]]]),_((i(),m(p,{disabled:!t(v).length,onClick:e[3]||(e[3]=l=>b(t(v)))},{default:a(()=>e[9]||(e[9]=[d(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[F,["store_category.store_category/delete"]]]),V("div",Ce,[o(j,{data:t(c).lists,onSelectionChange:L,onCellClick:U},{default:a(()=>[o(s,{type:"selection",width:"55"}),o(s,{label:"ID",prop:"id",width:"120"}),o(s,{label:"\u6240\u5C5EID",prop:"pid","show-overflow-tooltip":""}),o(s,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),o(s,{label:"\u56FE\u7247",prop:"pic"},{default:a(({row:l})=>[o(M,{style:{width:"50px",height:"50px"},src:l.pic,"preview-teleported":!0},null,8,["src"])]),_:1}),o(s,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),o(s,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),o(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[_((i(),m(p,{type:"primary",link:"",onClick:h(Q=>P(l),["stop"])},{default:a(()=>e[10]||(e[10]=[d(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[F,["store_category.store_category/edit"]]]),_((i(),m(p,{type:"danger",link:"",onClick:h(Q=>b(l.id),["stop"])},{default:a(()=>e[11]||(e[11]=[d(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[F,["store_category.store_category/delete"]]])]),_:1})]),_:1},8,["data"])]),V("div",we,[o(A,{modelValue:t(c),"onUpdate:modelValue":e[4]||(e[4]=l=>ie(c)?c.value=l:null),onChange:t(C)},null,8,["modelValue","onChange"])])]),_:1})),[[O,t(c).loading]]),t(y)?(i(),m(ye,{key:0,ref_key:"editRef",ref:f,"dict-data":t(S),onSuccess:t(C),onClose:e[5]||(e[5]=l=>y.value=!1)},null,8,["dict-data","onSuccess"])):ue("",!0)])}}});export{fo as default};
|