multiStoreAdmin/dist/store/assets/index2.3b8566bb.js
2024-07-04 10:36:14 +08:00

2 lines
4.7 KiB
JavaScript

import{_ as A}from"./index.vue_vue_type_script_setup_true_lang.3863431c.js";import{w as U,C as M,Q as R,R as G,D as Q,F as W,I as X,b as H,L as J,M as K}from"./element-plus.0a93cab1.js";import{o as t,M as i,a9 as B,O as n,W as r,T as k,U as D,d as Y,a0 as Z,c as p,V as f,a7 as h,S as V,u as _,a as $,P as ee,$ as te,X as ne,j as oe,r as ae}from"./@vue.c3e77981.js";import{b as le}from"./index.297c7f7b.js";import{u as re}from"./usePaging.d25ebf19.js";import{b as se}from"./axios.a8078129.js";import{a as ce}from"./goodsList.0df368d5.js";import"./@vueuse.a48d0173.js";import"./@element-plus.12c58ce2.js";import"./lodash-es.2b5acb28.js";import"./dayjs.16ed1fda.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.b082b0c1.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.a2abcd4b.js";import"./vue-router.43c06794.js";import"./pinia.b5130627.js";import"./css-color-function.975e80a5.js";import"./color.d986aa86.js";import"./clone.704d8332.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.ded7f805.js";import"./vue-clipboard3.987889a8.js";import"./clipboard.af74a91f.js";import"./echarts.8535e5a6.js";import"./zrender.3eba8991.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b8b719e9.js";const P={__name:"genBtn",props:{config:{type:Object,default:()=>{}}},emits:["add","edit","del"],setup(o,{emit:s}){const a=s,l=c=>{switch(c){case"handleCreate":a("add");break;case"handleUpdate":a("edit");break;default:a("del");break}};return(c,g)=>{const v=le,w=U;return t(),i(w,{type:o.config.type,size:o.config.size,onClick:g[0]||(g[0]=x=>l(o.config.click))},B({default:n(()=>[k(" "+D(o.config.label),1)]),_:2},[o.config.icon?{name:"icon",fn:n(()=>[r(v,{name:o.config.icon},null,8,["name"])]),key:"0"}:void 0]),1032,["type","size"])}}},ie={class:"mt-4"},de={class:"flex justify-end mt-4"},ue=Y({name:"asd"}),me=Object.assign(ue,{props:{config:{type:Object,required:!0},tabFetchFn:{type:Function,required:!0}},setup(o){const s=o,l=Z({...(()=>{const y=s.config.search.map(u=>u.field).reduce((u,F)=>(u[F]="",u),{});return Object.assign({},y,s.query)})()}),{pager:c,getLists:g,resetParams:v,resetPage:w}=re({fetchFun:s.tabFetchFn,params:l}),x=()=>{alert("add")},S=b=>{console.log(b)};return g(),(b,y)=>{const C=M,u=R,F=G,E=Q,j=U,L=W,O=X,T=H,q=J,z=K,I=A;return t(),p(f,null,[k(D(l)+" ",1),r(O,{class:"!border-none",shadow:"never"},{default:n(()=>[r(L,{class:"mb-[-16px]",model:l,inline:""},{default:n(()=>[(t(!0),p(f,null,h(o.config.search,(e,m)=>(t(),i(E,{label:e.title,key:m},{default:n(()=>[e.type=="input"?(t(),i(C,{key:0,class:"w-[280px]",modelValue:l[e.field],"onUpdate:modelValue":d=>l[e.field]=d,clearable:"",placeholder:e.props.placeholder},null,8,["modelValue","onUpdate:modelValue","placeholder"])):V("",!0),e.type=="select"?(t(),i(F,{key:1,modelValue:l[e.field],"onUpdate:modelValue":d=>l[e.field]=d},{default:n(()=>[(t(!0),p(f,null,h(e.options,d=>(t(),i(u,{label:d.label,value:d.value},null,8,["label","value"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])):V("",!0)]),_:2},1032,["label"]))),128)),r(E,null,{default:n(()=>[r(j,{type:"primary",onClick:_(w)},{default:n(()=>[k("\u67E5\u8BE2")]),_:1},8,["onClick"]),r(j,{onClick:_(v)},{default:n(()=>[k("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),r(O,{class:"!border-none mt-5",shadow:"never"},{default:n(()=>[(t(!0),p(f,null,h(o.config.actions,e=>(t(),i(P,{config:e,onAdd:x},null,8,["config"]))),256)),$("div",ie,[r(z,{data:_(c).lists},{default:n(()=>[(t(!0),p(f,null,h(o.config.headers,e=>ee((t(),i(q,{label:e.label,prop:e.prop,"show-overflow-tooltip":"",width:e.width&&e.width,fixed:e.fixed&&e.fixed},B({_:2},[e.component?{name:"default",fn:n(({row:m})=>[r(T,{style:te({width:e.component[0].options.width,height:e.component[0].options.height}),src:m[e.prop]},null,8,["style","src"])]),key:"0"}:void 0,e.action?{name:"default",fn:n(({row:m})=>[(t(!0),p(f,null,h(e.action,d=>(t(),i(P,{config:d,onEdit:N=>S(m),onDel:N=>b.handDel(m)},null,8,["config","onEdit","onDel"]))),256))]),key:"1"}:void 0]),1032,["label","prop","width","fixed"])),[[ne,e.show]])),256))]),_:1},8,["data"])]),$("div",de,[r(I,{modelValue:_(c),"onUpdate:modelValue":y[0]||(y[0]=e=>oe(c)?c.value=e:null),onChange:_(g)},null,8,["modelValue","onChange"])])]),_:1})],64)}}}),Xe={__name:"index2",setup(o){const s=ae({});return se.get("http://192.168.1.22:8544/index/view ").then(function(a){s.value=a.data,console.log(a.data)}).catch(function(a){console.log(a)}).finally(function(){}),(a,l)=>{const c=me;return s.value.ref?(t(),i(c,{key:0,config:s.value,tabFetchFn:_(ce)},null,8,["config","tabFetchFn"])):V("",!0)}}};export{Xe as default};