2 lines
5.5 KiB
JavaScript
2 lines
5.5 KiB
JavaScript
import{C as K,D as O,w as Z,F as z,T as H,O as J,b as W,Q as X,R as Y}from"./element-plus.d8e0827b.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.b67c1046.js";import{f as oe,b as te}from"./index.58242ff9.js";import{d as V,s as ae,r as k,Z as le,ap as se,o as u,c as ie,U as e,L as a,u as t,R as d,M as _,K as m,a as y,a3 as D,j as ne,Q as ue,n as B}from"./@vue.18505fe0.js";import{u as re}from"./usePaging.6a6670f9.js";import{u as pe}from"./useDictOptions.f8f89444.js";import{e as de,a as me}from"./goodsclass.19b7edf0.js";import"./lodash.466e9fe4.js";import{u as ce,a as _e}from"./vue-router.101084e3.js";import{_ as fe}from"./edit.vue_vue_type_script_setup_true_name_goodsclassEdit_lang.da38ee17.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"./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"./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"./picker.197acc10.js";import"./index.432b2bf9.js";import"./index.606807f5.js";import"./index.97ac23f5.js";import"./vuedraggable.9f282753.js";import"./vue.e5198d72.js";import"./sortablejs.6fa237f8.js";const Ce={class:"mt-4"},Fe={class:"flex mt-4 justify-end"},ge=V({name:"goodsclassLists"}),co=V({...ge,setup(Ee){var w;const f=ae(),C=k(!1),x=ce(),R=_e(),i=le({pid:((w=x.query)==null?void 0:w.pid)||0,name:"",data:"",pic:"",sort:""}),b=k([]),$=s=>{b.value=s.map(({id:o})=>o)},{dictData:I}=pe(""),{pager:c,getLists:F,resetParams:L,resetPage:P}=re({fetchFun:me,params:i}),T=async()=>{var s;C.value=!0,await B(),(s=f.value)==null||s.open("add")},U=async s=>{var o,r;C.value=!0,await B(),(o=f.value)==null||o.open("edit"),(r=f.value)==null||r.setFormData(s)},v=async s=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await de({id:s}),F()};F();const N=(s,o)=>{if(o.no==7)return console.log("\u65E0\u6548\u70B9\u51FB");R.push({path:"/goods/goodsclass",query:{pid:s.id}})};return(s,o)=>{const r=K,g=O,p=Z,S=z,h=H,q=te,n=J,j=W,A=X,G=ee,E=se("perms"),M=Y;return u(),ie("div",null,[e(h,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(S,{class:"mb-[-16px] disabledEdit",model:t(i),inline:""},{default:a(()=>[e(g,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:t(i).name,"onUpdate:modelValue":o[0]||(o[0]=l=>t(i).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(g,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:t(i).data,"onUpdate:modelValue":o[1]||(o[1]=l=>t(i).data=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(g,{label:"\u6392\u5E8F",prop:"sort"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:t(i).sort,"onUpdate:modelValue":o[2]||(o[2]=l=>t(i).sort=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F"},null,8,["modelValue"])]),_:1}),e(g,null,{default:a(()=>[e(p,{type:"primary",onClick:t(P)},{default:a(()=>[d("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(p,{onClick:t(L)},{default:a(()=>[d("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((u(),m(h,{class:"!border-none",shadow:"never"},{default:a(()=>[_((u(),m(p,{type:"primary",onClick:T},{icon:a(()=>[e(q,{name:"el-icon-Plus"})]),default:a(()=>[d(" \u65B0\u589E ")]),_:1})),[[E,["goods.goodsclass/add"]]]),_((u(),m(p,{disabled:!t(b).length,onClick:o[3]||(o[3]=l=>v(t(b)))},{default:a(()=>[d(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[E,["goods.goodsclass/delete"]]]),y("div",Ce,[e(A,{data:t(c).lists,onSelectionChange:$,onCellClick:N},{default:a(()=>[e(n,{type:"selection",width:"55"}),e(n,{label:"ID",prop:"id",width:"120"}),e(n,{label:"\u6240\u5C5EID",prop:"pid","show-overflow-tooltip":""}),e(n,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(n,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),e(n,{label:"\u56FE\u7247",prop:"pic"},{default:a(({row:l})=>[e(j,{style:{width:"50px",height:"50px"},src:l.pic},null,8,["src"])]),_:1}),e(n,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(n,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[_((u(),m(p,{type:"primary",link:"",onClick:D(Q=>U(l),["stop"])},{default:a(()=>[d(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[E,["goods.goodsclass/edit"]]]),_((u(),m(p,{type:"danger",link:"",onClick:D(Q=>v(l.id),["stop"])},{default:a(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[E,["goods.goodsclass/delete"]]])]),_:1})]),_:1},8,["data"])]),y("div",Fe,[e(G,{modelValue:t(c),"onUpdate:modelValue":o[4]||(o[4]=l=>ne(c)?c.value=l:null),onChange:t(F)},null,8,["modelValue","onChange"])])]),_:1})),[[M,t(c).loading]]),t(C)?(u(),m(fe,{key:0,ref_key:"editRef",ref:f,"dict-data":t(I),onSuccess:t(F),onClose:o[5]||(o[5]=l=>C.value=!1)},null,8,["dict-data","onSuccess"])):ue("",!0)])}}});export{co as default};
|