2 lines
4.7 KiB
JavaScript
2 lines
4.7 KiB
JavaScript
import{C as j,D as A,w as G,F as Q,T as q,O as K,Q as M,R as O}from"./element-plus.681b9893.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.58d80c54.js";import{f as z,b as H}from"./index.6e50aa23.js";import{u as J}from"./usePaging.6a6670f9.js";import{u as W}from"./useDictOptions.e1bb01b2.js";import{e as X,a as Y}from"./goods_label.669751bf.js";import"./lodash.466e9fe4.js";import{_ as ee}from"./edit.vue_vue_type_script_setup_true_name_goodsLabelEdit_lang.8cbb7af2.js";import{d as F,s as oe,r as E,Z as te,ap as ae,o as n,c as le,U as e,L as o,u as t,R as r,M as d,K as m,a as y,j as ie,Q as ne,n as D}from"./@vue.18505fe0.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.a6528143.js";import"./@babel.16688d44.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./axios.4905d81f.js";import"./jspdf.54afd842.js";import"./fflate.fca59393.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.29b71fa4.js";import"./color.87d313dc.js";import"./clone.a63396d9.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"./vue-plugin-hiprint.a2d84e76.js";import"./jquery.c3f97e49.js";import"./jsbarcode.39151b53.js";import"./socket.io-client.0b5a7289.js";import"./engine.io-client.81030771.js";import"./engine.io-parser.c748e159.js";import"./@socket.io.77accf6a.js";import"./debug.b392f131.js";import"./socket.io-parser.b7256298.js";import"./html2canvas.0f5947bc.js";import"./canvg.a673c4b2.js";import"./core-js.97b94d69.js";import"./raf.407ad6ad.js";import"./performance-now.a710f6e4.js";import"./rgbcolor.20c71161.js";import"./svg-pathdata.eba17832.js";import"./stackblur-canvas.0fb5df18.js";import"./nprogress.3461658b.js";import"./vue-clipboard3.c63182fd.js";import"./clipboard.dd2c63d0.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.bba2f543.js";const se={class:"mt-4"},re={class:"flex mt-4 justify-end"},me=F({name:"goodsLabelLists"}),fo=F({...me,setup(pe){const u=oe(),c=E(!1),_=te({name:""}),C=E([]),B=l=>{C.value=l.map(({id:a})=>a)},{dictData:V}=W(""),{pager:p,getLists:f,resetParams:x,resetPage:L}=J({fetchFun:Y,params:_}),$=async()=>{var l;c.value=!0,await D(),(l=u.value)==null||l.open("add")},R=async l=>{var a,v;c.value=!0,await D(),(a=u.value)==null||a.open("edit"),(v=u.value)==null||v.setFormData(l)},k=async l=>{await z.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await X({id:l}),f()};return f(),(l,a)=>{const v=j,h=A,s=G,P=Q,w=q,T=H,b=K,N=M,S=Z,g=ae("perms"),I=O;return n(),le("div",null,[e(w,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(P,{class:"mb-[-16px]",model:t(_),inline:""},{default:o(()=>[e(h,{label:"\u6807\u7B7E\u540D",prop:"name"},{default:o(()=>[e(v,{class:"w-[280px]",modelValue:t(_).name,"onUpdate:modelValue":a[0]||(a[0]=i=>t(_).name=i),clearable:"",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1}),e(h,null,{default:o(()=>[e(s,{type:"primary",onClick:t(L)},{default:o(()=>[r("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(s,{onClick:t(x)},{default:o(()=>[r("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),d((n(),m(w,{class:"!border-none",shadow:"never"},{default:o(()=>[d((n(),m(s,{type:"primary",onClick:$},{icon:o(()=>[e(T,{name:"el-icon-Plus"})]),default:o(()=>[r(" \u65B0\u589E ")]),_:1})),[[g,["goods.goods_label/add"]]]),d((n(),m(s,{disabled:!t(C).length,onClick:a[1]||(a[1]=i=>k(t(C)))},{default:o(()=>[r(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[g,["goods.goods_label/delete"]]]),y("div",se,[e(N,{data:t(p).lists,onSelectionChange:B},{default:o(()=>[e(b,{type:"selection",width:"55"}),e(b,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(b,{label:"\u6807\u7B7E\u540D",prop:"name","show-overflow-tooltip":""}),e(b,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:i})=>[d((n(),m(s,{type:"primary",link:"",onClick:U=>R(i)},{default:o(()=>[r(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[g,["goods.goods_label/edit"]]]),d((n(),m(s,{type:"danger",link:"",onClick:U=>k(i.id)},{default:o(()=>[r(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[g,["goods.goods_label/delete"]]])]),_:1})]),_:1},8,["data"])]),y("div",re,[e(S,{modelValue:t(p),"onUpdate:modelValue":a[2]||(a[2]=i=>ie(p)?p.value=i:null),onChange:t(f)},null,8,["modelValue","onChange"])])]),_:1})),[[I,t(p).loading]]),t(c)?(n(),m(ee,{key:0,ref_key:"editRef",ref:u,"dict-data":t(V),onSuccess:t(f),onClose:a[3]||(a[3]=i=>c.value=!1)},null,8,["dict-data","onSuccess"])):ne("",!0)])}}});export{fo as default};
|