2 lines
5.3 KiB
JavaScript
2 lines
5.3 KiB
JavaScript
import{C as A,D as G,w as M,F as q,L as K,M as O,b as Q,N as Z,O as z}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{e as ee,a as oe}from"./goodsclass.7fa15708.js";import"./lodash.403d4198.js";import{_ as te}from"./edit.vue_vue_type_script_setup_true_name_goodsclassEdit_lang.9d6c8288.js";import{d as V,s as ae,r as h,Z as le,ap as se,o as r,c as ne,U as e,L as a,u as o,R as p,M as f,K as m,a as k,j as ue,Q as ie,n as D}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 re={class:"mt-4"},de={class:"flex mt-4 justify-end"},pe=V({name:"goodsclassLists"}),eo=V({...pe,setup(me){const C=ae(),F=h(!1),s=le({pid:"",name:"",data:"",pic:"",sort:""}),g=h([]),y=n=>{g.value=n.map(({id:t})=>t)},{dictData:B}=Y(""),{pager:c,getLists:b,resetParams:x,resetPage:I}=X({fetchFun:oe,params:s}),$=async()=>{var n;F.value=!0,await D(),(n=C.value)==null||n.open("add")},L=async n=>{var t,i;F.value=!0,await D(),(t=C.value)==null||t.open("edit"),(i=C.value)==null||i.setFormData(n)},v=async n=>{await J.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ee({id:n}),b()};return b(),(n,t)=>{const i=A,_=G,d=M,U=q,w=K,N=W,u=O,P=Q,R=Z,S=H,E=se("perms"),T=z;return r(),ne("div",null,[e(w,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(U,{class:"mb-[-16px] disabledEdit",model:o(s),inline:""},{default:a(()=>[e(_,{label:"\u6240\u5C5EID",prop:"pid"},{default:a(()=>[e(i,{class:"w-[280px]",modelValue:o(s).pid,"onUpdate:modelValue":t[0]||(t[0]=l=>o(s).pid=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6240\u5C5EID"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name"},{default:a(()=>[e(i,{class:"w-[280px]",modelValue:o(s).name,"onUpdate:modelValue":t[1]||(t[1]=l=>o(s).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data"},{default:a(()=>[e(i,{class:"w-[280px]",modelValue:o(s).data,"onUpdate:modelValue":t[2]||(t[2]=l=>o(s).data=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u6392\u5E8F",prop:"sort"},{default:a(()=>[e(i,{class:"w-[280px]",modelValue:o(s).sort,"onUpdate:modelValue":t[3]||(t[3]=l=>o(s).sort=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F"},null,8,["modelValue"])]),_:1}),e(_,null,{default:a(()=>[e(d,{type:"primary",onClick:o(I)},{default:a(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(d,{onClick:o(x)},{default:a(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((r(),m(w,{class:"!border-none",shadow:"never"},{default:a(()=>[f((r(),m(d,{type:"primary",onClick:$},{icon:a(()=>[e(N,{name:"el-icon-Plus"})]),default:a(()=>[p(" \u65B0\u589E ")]),_:1})),[[E,["goods.goodsclass/add"]]]),f((r(),m(d,{disabled:!o(g).length,onClick:t[4]||(t[4]=l=>v(o(g)))},{default:a(()=>[p(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[E,["goods.goodsclass/delete"]]]),k("div",re,[e(R,{data:o(c).lists,onSelectionChange:y},{default:a(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"ID",prop:"id",width:"55"}),e(u,{label:"\u6240\u5C5EID",prop:"pid","show-overflow-tooltip":""}),e(u,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(u,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),e(u,{label:"\u56FE\u7247",prop:"pic"},{default:a(({row:l})=>[e(P,{style:{width:"50px",height:"50px"},src:l.pic},null,8,["src"])]),_:1}),e(u,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[f((r(),m(d,{type:"primary",link:"",onClick:j=>L(l)},{default:a(()=>[p(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[E,["goods.goodsclass/edit"]]]),f((r(),m(d,{type:"danger",link:"",onClick:j=>v(l.id)},{default:a(()=>[p(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[E,["goods.goodsclass/delete"]]])]),_:1})]),_:1},8,["data"])]),k("div",de,[e(S,{modelValue:o(c),"onUpdate:modelValue":t[5]||(t[5]=l=>ue(c)?c.value=l:null),onChange:o(b)},null,8,["modelValue","onChange"])])]),_:1})),[[T,o(c).loading]]),o(F)?(r(),m(te,{key:0,ref_key:"editRef",ref:C,"dict-data":o(B),onSuccess:o(b),onClose:t[6]||(t[6]=l=>F.value=!1)},null,8,["dict-data","onSuccess"])):ie("",!0)])}}});export{eo as default};
|