2 lines
5.7 KiB
JavaScript
2 lines
5.7 KiB
JavaScript
import{C as O,D as q,J,K as Q,w as Z,F as z,L as G,M as H,N as W,O as X}from"./element-plus.91c68cc0.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.20e90b1a.js";import{f as oe,b as te}from"./index.e9c2eb26.js";import{u as le}from"./usePaging.f8c888e4.js";import{u as ae}from"./useDictOptions.3b9f7ea9.js";import{_ as se,a as ne,b as ie}from"./edit.vue_vue_type_script_setup_true_name_categoryEdit_lang.6e9516b2.js";import"./lodash.4e6d2a38.js";import{d as $,s as ue,r as D,Z as re,ap as pe,o as i,c as V,U as o,L as l,u as t,T as me,a9 as de,K as r,R as m,M as _,a as B,j as ce,Q as _e,n as x}from"./@vue.76ce7aa3.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"./vue-router.10bd5b90.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"./index.d78ce335.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const fe={class:"mt-4"},ve={class:"flex mt-4 justify-end"},we=$({name:"categoryLists"}),no=$({...we,setup(be){const f=ue(),v=D(!1),u=re({pid:"",cate_name:"",path:"",sort:"",pic:"",is_show:"",level:""}),C=D([]),L=n=>{C.value=n.map(({category_id:e})=>e)},{dictData:F}=ae("show_status"),{pager:d,getLists:w,resetParams:A,resetPage:N}=le({fetchFun:ie,params:u}),P=async()=>{var n;v.value=!0,await x(),(n=f.value)==null||n.open("add")},R=async n=>{var e,c;v.value=!0,await x(),(e=f.value)==null||e.open("edit"),(c=f.value)==null||c.setFormData(n)},y=async n=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ne({category_id:n}),w()};return w(),(n,e)=>{const c=O,b=q,k=J,S=Q,p=Z,T=z,h=G,U=te,s=H,j=ee,I=W,K=Y,g=pe("perms"),M=X;return i(),V("div",null,[o(h,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[o(T,{class:"mb-[-16px]",model:t(u),inline:""},{default:l(()=>[o(b,{label:"\u7236id",prop:"pid"},{default:l(()=>[o(c,{class:"w-[280px]",modelValue:t(u).pid,"onUpdate:modelValue":e[0]||(e[0]=a=>t(u).pid=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7236id"},null,8,["modelValue"])]),_:1}),o(b,{label:"\u5206\u7C7B\u540D\u79F0",prop:"cate_name"},{default:l(()=>[o(c,{class:"w-[280px]",modelValue:t(u).cate_name,"onUpdate:modelValue":e[1]||(e[1]=a=>t(u).cate_name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(b,{label:"\u662F\u5426\u663E\u793A",prop:"is_show"},{default:l(()=>[o(S,{class:"w-[280px]",modelValue:t(u).is_show,"onUpdate:modelValue":e[2]||(e[2]=a=>t(u).is_show=a),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u663E\u793A"},{default:l(()=>[o(k,{label:"\u5168\u90E8",value:""}),(i(!0),V(me,null,de(t(F).show_status,(a,E)=>(i(),r(k,{key:E,label:a.name,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(b,null,{default:l(()=>[o(p,{type:"primary",onClick:t(N)},{default:l(()=>e[6]||(e[6]=[m("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(p,{onClick:t(A)},{default:l(()=>e[7]||(e[7]=[m("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((i(),r(h,{class:"!border-none",shadow:"never"},{default:l(()=>[_((i(),r(p,{type:"primary",onClick:P},{icon:l(()=>[o(U,{name:"el-icon-Plus"})]),default:l(()=>[e[8]||(e[8]=m(" \u65B0\u589E "))]),_:1})),[[g,["setting/category/add"]]]),_((i(),r(p,{disabled:!t(C).length,onClick:e[3]||(e[3]=a=>y(t(C)))},{default:l(()=>e[9]||(e[9]=[m(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[g,["setting/category/delete"]]]),B("div",fe,[o(I,{data:t(d).lists,onSelectionChange:L},{default:l(()=>[o(s,{type:"selection",width:"55"}),o(s,{label:"id",prop:"category_id","show-overflow-tooltip":""}),o(s,{label:"\u7236id",prop:"pid","show-overflow-tooltip":""}),o(s,{label:"\u5206\u7C7B\u540D\u79F0",prop:"cate_name","show-overflow-tooltip":""}),o(s,{label:"\u8DEF\u5F84",prop:"path","show-overflow-tooltip":""}),o(s,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),o(s,{label:"\u56FE\u6807",prop:"pic","show-overflow-tooltip":""}),o(s,{label:"\u662F\u5426\u663E\u793A",prop:"is_show"},{default:l(({row:a})=>[o(j,{options:t(F).show_status,value:a.is_show},null,8,["options","value"])]),_:1}),o(s,{label:"\u7B49\u7EA7",prop:"level","show-overflow-tooltip":""}),o(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:a})=>[_((i(),r(p,{type:"primary",link:"",onClick:E=>R(a)},{default:l(()=>e[10]||(e[10]=[m(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[g,["setting/category/edit"]]]),_((i(),r(p,{type:"danger",link:"",onClick:E=>y(a.category_id)},{default:l(()=>e[11]||(e[11]=[m(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[g,["setting/category/delete"]]])]),_:1})]),_:1},8,["data"])]),B("div",ve,[o(K,{modelValue:t(d),"onUpdate:modelValue":e[4]||(e[4]=a=>ce(d)?d.value=a:null),onChange:t(w)},null,8,["modelValue","onChange"])])]),_:1})),[[M,t(d).loading]]),t(v)?(i(),r(se,{key:0,ref_key:"editRef",ref:f,"dict-data":t(F),onSuccess:t(w),onClose:e[5]||(e[5]=a=>v.value=!1)},null,8,["dict-data","onSuccess"])):_e("",!0)])}}});export{no as default};
|