import{u as V,_ as R,a as j}from"./useTable-b49f23f8.js";import{d as M,r as N,x as D,Q as F,o as n,c as y,i as s,w as i,a as o,B as f,j as m,m as g,F as w,A as I,_ as q,q as O,cX as Q}from"./index-92f7a16c.js";import{E as X}from"./el-image-b5c91f66.js";import"./el-image-viewer-668f12f8.js";import{_ as G}from"./ContentWrap.vue_vue_type_script_setup_true_lang-93cdc892.js";import{a as A,_ as H}from"./SeckillConfigForm.vue_vue_type_script_name_SeckillConfigForm_setup_true_lang-bcb02907.js";import{b as J,d as K,e as T}from"./seckillConfig-814e5555.js";import{c as W}from"./index-53ab5084.js";import{C as p}from"./constants-e43f22dd.js";import{u as Y}from"./useMessage-f6048a9f.js";import"./Form-0d5e375d.js";import"./el-virtual-list-ca7ab789.js";import"./el-tree-select-4c0548d3.js";import"./el-time-select-2783b2e3.js";import"./InputPassword-037ae163.js";import"./InputPassword.vue_vue_type_style_index_0_scoped_0af03974_lang-bb0df722.js";import"./_plugin-vue_export-helper-1b428a4d.js";import"./style.css_vue_type_style_index_0_src_true_lang-d17c7064.js";import"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-9ca6f58d.js";import"./UploadImg-7f651e4b.js";import"./UploadImgs-905a3324.js";import"./UploadImgs.vue_vue_type_style_index_0_scoped_bad238b9_lang-c7fc1fae.js";import"./UploadFile-2d1c39f8.js";import"./UploadFile.vue_vue_type_style_index_0_scoped_a9e67aa2_lang-10e7d64a.js";import"./index-579dde8f.js";import"./useForm-c4fac6fb.js";import"./download-20922b56.js";import"./el-card-e60c275e.js";import"./Dialog-524c7d28.js";import"./formatTime-71947df8.js";import"./formRules-ffb17ad4.js";import"./dict-b31d62c6.js";import"./useCrudSchemas-c988da71.js";import"./tree-0af4953a.js";import"./DictTag.vue_vue_type_script_lang-34041e25.js";import"./color-6e929987.js";const Z=M({__name:"index",setup($){const E=Y(),{tableObject:e,tableMethods:h}=V({getListApi:J,delListApi:K}),{getList:c,setSearchParams:k}=h,_=N(),S=(C,t)=>{_.value.open(C,t)};return D(()=>{c()}),(C,t)=>{const b=q,u=O,x=R,P=G,U=X,z=Q,B=j,d=F("hasPermi");return n(),y(w,null,[s(P,null,{default:i(()=>[s(x,{schema:o(A).searchSchema,onReset:o(k),onSearch:o(k)},{actionMore:i(()=>[f((n(),m(u,{plain:"",type:"primary",onClick:t[0]||(t[0]=a=>S("create"))},{default:i(()=>[s(b,{class:"mr-5px",icon:"ep:plus"}),t[3]||(t[3]=g(" \u65B0\u589E "))]),_:1})),[[d,["promotion:seckill-config:create"]]])]),_:1},8,["schema","onReset","onSearch"])]),_:1}),s(P,null,{default:i(()=>[s(B,{currentPage:o(e).currentPage,"onUpdate:currentPage":t[1]||(t[1]=a=>o(e).currentPage=a),pageSize:o(e).pageSize,"onUpdate:pageSize":t[2]||(t[2]=a=>o(e).pageSize=a),columns:o(A).tableColumns,data:o(e).tableList,loading:o(e).loading,pagination:{total:o(e).total}},{sliderPicUrls:i(({row:a})=>[(n(!0),y(w,null,I(a.sliderPicUrls,(l,r)=>(n(),m(U,{key:r,src:l,class:"mr-10px h-60px w-60px",onClick:L=>{return v=a.sliderPicUrls,void W({urlList:v});var v}},null,8,["src","onClick"]))),128))]),status:i(({row:a})=>[s(z,{modelValue:a.status,"onUpdate:modelValue":l=>a.status=l,"active-value":0,"inactive-value":1,onChange:l=>(async r=>{try{const L=r.status===p.ENABLE?"\u542F\u7528":"\u505C\u7528";await E.confirm('\u786E\u8BA4\u8981"'+L+'""'+r.name+"?"),await T(r.id,r.status),await c()}catch{r.status=r.status===p.ENABLE?p.DISABLE:p.ENABLE}})(a)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),action:i(({row:a})=>[f((n(),m(u,{link:"",type:"primary",onClick:l=>S("update",a.id)},{default:i(()=>t[4]||(t[4]=[g(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[d,["promotion:seckill-config:update"]]]),f((n(),m(u,{link:"",type:"danger",onClick:l=>{return r=a.id,void h.delList(r,!1);var r}},{default:i(()=>t[5]||(t[5]=[g(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[d,["promotion:seckill-config:delete"]]])]),_:1},8,["currentPage","pageSize","columns","data","loading","pagination"])]),_:1}),s(H,{ref_key:"formRef",ref:_,onSuccess:o(c)},null,8,["onSuccess"])],64)}}});export{Z as default};