2 lines
5.4 KiB
JavaScript
2 lines
5.4 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.9990c39e.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.3de7c996.js";import{f as oe,b as te}from"./index.9424646f.js";import{d as V,s as ae,r as k,Z as le,ap as se,o as u,c as ne,U as e,L as a,u as t,R as p,M as _,K as m,a as y,a3 as D,j as ie,Q as ue,n as B}from"./@vue.18505fe0.js";import{u as re}from"./usePaging.6a6670f9.js";import{u as de}from"./useDictOptions.d0c29343.js";import{e as pe,a as me}from"./goodsclass.b96be6e9.js";import"./lodash.be6e4bb5.js";import{u as ce,a as _e}from"./vue-router.886c5f5a.js";import{_ as fe}from"./edit.vue_vue_type_script_setup_true_name_goodsclassEdit_lang.d4d20873.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.ef95d8c0.js";import"./axios.77245e3c.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./pinia.a969beab.js";import"./css-color-function.6061d63f.js";import"./color.1580a89c.js";import"./clone.4ed29f58.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.b29ee5e2.js";import"./vue-clipboard3.15c43b43.js";import"./clipboard.4a3580c9.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./picker.be4d3224.js";import"./index.1fdb40b8.js";import"./index.f4f18b5a.js";import"./index.08bd2556.js";import"./vuedraggable.11c6ad82.js";import"./vue.09510228.js";import"./sortablejs.b9072078.js";const Ce={class:"mt-4"},Fe={class:"flex mt-4 justify-end"},ge=V({name:"goodsclassLists"}),ro=V({...ge,setup(Ee){var w;const f=ae(),C=k(!1),x=ce(),R=_e(),n=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}=de(""),{pager:c,getLists:F,resetParams:L,resetPage:P}=re({fetchFun:me,params:n}),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 pe({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,d=Z,S=z,h=H,q=te,i=J,j=W,A=X,G=ee,E=se("perms"),M=Y;return u(),ne("div",null,[e(h,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(S,{class:"mb-[-16px] disabledEdit",model:t(n),inline:""},{default:a(()=>[e(g,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:t(n).name,"onUpdate:modelValue":o[0]||(o[0]=l=>t(n).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(n).data,"onUpdate:modelValue":o[1]||(o[1]=l=>t(n).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(n).sort,"onUpdate:modelValue":o[2]||(o[2]=l=>t(n).sort=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F"},null,8,["modelValue"])]),_:1}),e(g,null,{default:a(()=>[e(d,{type:"primary",onClick:t(P)},{default:a(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(d,{onClick:t(L)},{default:a(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((u(),m(h,{class:"!border-none",shadow:"never"},{default:a(()=>[_((u(),m(d,{type:"primary",onClick:T},{icon:a(()=>[e(q,{name:"el-icon-Plus"})]),default:a(()=>[p(" \u65B0\u589E ")]),_:1})),[[E,["goods.goodsclass/add"]]]),_((u(),m(d,{disabled:!t(b).length,onClick:o[3]||(o[3]=l=>v(t(b)))},{default:a(()=>[p(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[E,["goods.goodsclass/delete"]]]),y("div",Ce,[e(A,{data:t(c).lists,onSelectionChange:$,onCellClick:N},{default:a(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"ID",prop:"id",width:"120"}),e(i,{label:"\u6240\u5C5EID",prop:"pid","show-overflow-tooltip":""}),e(i,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(i,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),e(i,{label:"\u56FE\u7247",prop:"pic"},{default:a(({row:l})=>[e(j,{style:{width:"50px",height:"50px"},src:l.pic},null,8,["src"])]),_:1}),e(i,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[_((u(),m(d,{type:"primary",link:"",onClick:D(Q=>U(l),["stop"])},{default:a(()=>[p(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[E,["goods.goodsclass/edit"]]]),_((u(),m(d,{type:"danger",link:"",onClick:D(Q=>v(l.id),["stop"])},{default:a(()=>[p(" \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=>ie(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{ro as default};
|