index-42bb2cd3.js 5.9 KB

1
  1. import{d as J,P as K,r as w,x as L,u as Q,b as W,a4 as X,o as n,c as b,f as a,A as t,a as l,a5 as Z,D as _,k as u,C as c,F as C,R as $,a3 as j,a9 as aa,V as ea,I as ta,Q as la,J as ra,W as ia,X as oa,Y as na,Z as sa,_ as pa,__tla as _a}from"./index-286756b9.js";import{_ as ca,__tla as ma}from"./index-ed6c67a8.js";import{_ as ua,__tla as da}from"./DictTag-f72b04ca.js";import{E as fa,__tla as ya}from"./el-image-73c105b7.js";import{__tla as wa}from"./el-image-viewer-e0e5d3be.js";import{_ as ha,__tla as ga}from"./ContentWrap-83998678.js";import{d as z,__tla as ka}from"./formatTime-83e416ef.js";import{d as va,e as xa,f as ba,__tla as Ca}from"./template-6ba93929.js";import Da,{__tla as Ta}from"./DiyTemplateForm-657dec57.js";import{D as Ua,__tla as Na}from"./dict-82dca549.js";import{u as Pa,__tla as Sa}from"./useMessage-084b1e70.js";import{__tla as Va}from"./index-fb47c94c.js";import"./color-6e929987.js";import{__tla as za}from"./el-card-d3d5a654.js";import{__tla as Ra}from"./Dialog-4c2de357.js";import{__tla as Ya}from"./UploadImgs-b8116d2f.js";import{__tla as Aa}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-a65d467a.js";let R,Fa=Promise.all([(()=>{try{return _a}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Aa}catch{}})()]).then(async()=>{let D;D=J({name:"DiyTemplate",__name:"index",setup(Ha){const h=Pa(),{t:Y}=K(),g=w(!0),T=w(0),U=w([]),i=L({pageNo:1,pageSize:10,name:null,createTime:[]}),N=w(),m=async()=>{g.value=!0;try{const d=await va(i);U.value=d.list,T.value=d.total}finally{g.value=!1}},k=()=>{i.pageNo=1,m()},A=()=>{N.value.resetFields(),k()},P=w(),S=(d,r)=>{P.value.open(d,r)},{push:F}=Q();return W(()=>{m()}),(d,r)=>{const H=aa,v=ea,I=ta,x=la,p=ra,B=ia,V=ha,s=oa,E=fa,M=ua,O=na,q=ca,f=X("hasPermi"),G=sa;return n(),b(C,null,[a(V,null,{default:t(()=>[a(B,{class:"-mb-15px",model:l(i),ref_key:"queryFormRef",ref:N,inline:!0,"label-width":"68px"},{default:t(()=>[a(v,{label:"\u6A21\u677F\u540D\u79F0",prop:"name"},{default:t(()=>[a(H,{modelValue:l(i).name,"onUpdate:modelValue":r[0]||(r[0]=e=>l(i).name=e),placeholder:"\u8BF7\u8F93\u5165\u6A21\u677F\u540D\u79F0",clearable:"",onKeyup:Z(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(v,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[a(I,{modelValue:l(i).createTime,"onUpdate:modelValue":r[1]||(r[1]=e=>l(i).createTime=e),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px"},null,8,["modelValue","default-time"])]),_:1}),a(v,null,{default:t(()=>[a(p,{onClick:k},{default:t(()=>[a(x,{icon:"ep:search",class:"mr-5px"}),_(" \u641C\u7D22")]),_:1}),a(p,{onClick:A},{default:t(()=>[a(x,{icon:"ep:refresh",class:"mr-5px"}),_(" \u91CD\u7F6E")]),_:1}),u((n(),c(p,{type:"primary",plain:"",onClick:r[2]||(r[2]=e=>S("create"))},{default:t(()=>[a(x,{icon:"ep:plus",class:"mr-5px"}),_(" \u65B0\u589E ")]),_:1})),[[f,["promotion:diy-template:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(V,null,{default:t(()=>[u((n(),c(O,{data:l(U),stripe:!0,"show-overflow-tooltip":!0},{default:t(()=>[a(s,{label:"\u7F16\u53F7",align:"center",prop:"id"}),a(s,{label:"\u9884\u89C8\u56FE",align:"center",prop:"previewPicUrls"},{default:t(e=>[(n(!0),b(C,null,$(e.row.previewPicUrls,(y,o)=>(n(),c(E,{class:"h-40px max-w-40px",key:o,src:y,"preview-src-list":e.row.previewPicUrls,"initial-index":o,"preview-teleported":""},null,8,["src","preview-src-list","initial-index"]))),128))]),_:1}),a(s,{label:"\u6A21\u677F\u540D\u79F0",align:"center",prop:"name"}),a(s,{label:"\u662F\u5426\u4F7F\u7528",align:"center",prop:"used"},{default:t(e=>[a(M,{type:l(Ua).INFRA_BOOLEAN_STRING,value:e.row.used},null,8,["type","value"])]),_:1}),a(s,{label:"\u4F7F\u7528\u65F6\u95F4",align:"center",prop:"usedTime",formatter:l(z),width:"180px"},null,8,["formatter"]),a(s,{label:"\u5907\u6CE8",align:"center",prop:"remark"}),a(s,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:l(z),width:"180px"},null,8,["formatter"]),a(s,{label:"\u64CD\u4F5C",align:"center",width:"200"},{default:t(e=>[u((n(),c(p,{link:"",type:"primary",onClick:y=>{return o=e.row.id,void F({name:"DiyTemplateDecorate",params:{id:o}});var o}},{default:t(()=>[_(" \u88C5\u4FEE ")]),_:2},1032,["onClick"])),[[f,["promotion:diy-template:update"]]]),u((n(),c(p,{link:"",type:"primary",onClick:y=>S("update",e.row.id)},{default:t(()=>[_(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[f,["promotion:diy-template:update"]]]),e.row.used?j("",!0):(n(),b(C,{key:0},[u((n(),c(p,{link:"",type:"primary",onClick:y=>(async o=>{try{await h.confirm(`\u662F\u5426\u4F7F\u7528\u6A21\u677F\u201C${o.name}\u201D?`),await ba(o.id),h.success("\u4F7F\u7528\u6210\u529F"),await m()}catch{}})(e.row)},{default:t(()=>[_(" \u4F7F\u7528 ")]),_:2},1032,["onClick"])),[[f,["promotion:diy-template:use"]]]),u((n(),c(p,{link:"",type:"danger",onClick:y=>(async o=>{try{await h.delConfirm(),await xa(o),h.success(Y("common.delSuccess")),await m()}catch{}})(e.row.id)},{default:t(()=>[_(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[f,["promotion:diy-template:delete"]]])],64))]),_:1})]),_:1},8,["data"])),[[G,l(g)]]),a(q,{total:l(T),page:l(i).pageNo,"onUpdate:page":r[3]||(r[3]=e=>l(i).pageNo=e),limit:l(i).pageSize,"onUpdate:limit":r[4]||(r[4]=e=>l(i).pageSize=e),onPagination:m},null,8,["total","page","limit"])]),_:1}),a(Da,{ref_key:"formRef",ref:P,onSuccess:m},null,512)],64)}}}),R=pa(D,[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/promotion/diy/template/index.vue"]])});export{Fa as __tla,R as default};