index-62604efe.js 3.9 KB

1
  1. import{u as V,_ as R,a as j}from"./useTable-03b88b8f.js";import{d as M,r as N,x as F,Q as I,o as n,c as y,i as s,w as i,a as t,B as f,j as m,m as g,F as E,A as q,_ as D,q as O,cX as Q}from"./index-df709923.js";import{E as T}from"./el-image-29d644a2.js";import"./el-image-viewer-90ad41b7.js";import{_ as X}from"./ContentWrap.vue_vue_type_script_setup_true_lang-e908c5dd.js";import{a as w,_ as G}from"./SeckillConfigForm.vue_vue_type_script_name_SeckillConfigForm_setup_true_lang-41b23c55.js";import{b as H,d as J,e as K}from"./seckillConfig-53eee8c9.js";import{c as W}from"./index-54511734.js";import{C as p}from"./constants-e43f22dd.js";import{u as Y}from"./useMessage-89e9d1aa.js";import"./Form-28e78230.js";import"./el-virtual-list-2b626d76.js";import"./el-tree-select-880d8b15.js";import"./el-time-select-361d5221.js";import"./InputPassword-54d560b0.js";import"./InputPassword.vue_vue_type_style_index_0_scoped_0af03974_lang-0932eb11.js";import"./_plugin-vue_export-helper-1b428a4d.js";import"./style.css_vue_type_style_index_0_src_true_lang-721caac6.js";import"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-2a8cd6e4.js";import"./UploadImg-15376c0d.js";import"./UploadImgs-248b9428.js";import"./UploadImgs.vue_vue_type_style_index_0_scoped_bad238b9_lang-5cadf78a.js";import"./UploadFile-b5592e67.js";import"./UploadFile.vue_vue_type_style_index_0_scoped_a9e67aa2_lang-2736ca2c.js";import"./index-c8bd5ba7.js";import"./useForm-b7a6ca90.js";import"./download-20922b56.js";import"./el-card-91c2276d.js";import"./Dialog-2f8bd685.js";import"./formatTime-c6262bd7.js";import"./formRules-392c4b03.js";import"./dict-017bf708.js";import"./useCrudSchemas-3931a8b9.js";import"./tree-fd3a041e.js";import"./DictTag.vue_vue_type_script_lang-6753827b.js";import"./color-6e929987.js";const Z=M({__name:"index",setup($){const U=Y(),{tableObject:e,tableMethods:h}=V({getListApi:H,delListApi:J}),{getList:c,setSearchParams:k}=h,_=N(),S=(C,a)=>{_.value.open(C,a)};return F(()=>{c()}),(C,a)=>{const b=D,u=O,x=R,L=X,A=T,z=Q,B=j,d=I("hasPermi");return n(),y(E,null,[s(L,null,{default:i(()=>[s(x,{schema:t(w).searchSchema,onReset:t(k),onSearch:t(k)},{actionMore:i(()=>[f((n(),m(u,{plain:"",type:"primary",onClick:a[0]||(a[0]=o=>S("create"))},{default:i(()=>[s(b,{class:"mr-5px",icon:"ep:plus"}),a[3]||(a[3]=g(" \u65B0\u589E "))]),_:1})),[[d,["promotion:seckill-config:create"]]])]),_:1},8,["schema","onReset","onSearch"])]),_:1}),s(L,null,{default:i(()=>[s(B,{currentPage:t(e).currentPage,"onUpdate:currentPage":a[1]||(a[1]=o=>t(e).currentPage=o),pageSize:t(e).pageSize,"onUpdate:pageSize":a[2]||(a[2]=o=>t(e).pageSize=o),columns:t(w).tableColumns,data:t(e).tableList,loading:t(e).loading,pagination:{total:t(e).total}},{sliderPicUrls:i(({row:o})=>[(n(!0),y(E,null,q(o.sliderPicUrls,(l,r)=>(n(),m(A,{key:r,src:l,class:"mr-10px h-60px w-60px",onClick:P=>{return v=o.sliderPicUrls,void W({urlList:v});var v}},null,8,["src","onClick"]))),128))]),status:i(({row:o})=>[s(z,{modelValue:o.status,"onUpdate:modelValue":l=>o.status=l,"active-value":0,"inactive-value":1,onChange:l=>(async r=>{try{const P=r.status===p.ENABLE?"\u542F\u7528":"\u505C\u7528";await U.confirm('\u786E\u8BA4\u8981"'+P+'""'+r.name+"?"),await K(r.id,r.status),await c()}catch{r.status=r.status===p.ENABLE?p.DISABLE:p.ENABLE}})(o)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),action:i(({row:o})=>[f((n(),m(u,{link:"",type:"primary",onClick:l=>S("update",o.id)},{default:i(()=>a[4]||(a[4]=[g(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[d,["promotion:seckill-config:update"]]]),f((n(),m(u,{link:"",type:"danger",onClick:l=>{return r=o.id,void h.delList(r,!1);var r}},{default:i(()=>a[5]||(a[5]=[g(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[d,["promotion:seckill-config:delete"]]])]),_:1},8,["currentPage","pageSize","columns","data","loading","pagination"])]),_:1}),s(G,{ref_key:"formRef",ref:_,onSuccess:t(c)},null,8,["onSuccess"])],64)}}});export{Z as default};