index-f9de7bdf.js 6.0 KB

1
  1. import{d as j,h as K,r as h,e as L,u as Q,l as $,Q as J,o as n,c as b,f as a,w as t,a as l,R as W,n as p,x as u,v as c,F as C,q as X,P as Z,V as aa,A as ea,B as ta,j as la,C as ra,D as ia,G as oa,H as na,I as sa,_ as _a,__tla as pa}from"./index-bd9277a1.js";import{_ as ca,__tla as ma}from"./index-3118d255.js";import{_ as ua,__tla as da}from"./DictTag-d6503fab.js";import{E as fa,__tla as ya}from"./el-image-c6b72263.js";import{__tla as ha}from"./el-image-viewer-995341ab.js";import{_ as wa,__tla as ga}from"./ContentWrap-7c73ab26.js";import{d as z,__tla as va}from"./formatTime-8639ba1a.js";import{d as ka,e as xa,f as ba,__tla as Ca}from"./template-d989d4ea.js";import Da,{__tla as Ta}from"./DiyTemplateForm-59a2b6be.js";import{D as Ua,__tla as Na}from"./dict-4b2e9fd3.js";import{u as Pa,__tla as Va}from"./useMessage-274788d4.js";import{__tla as Sa}from"./index-49ecf2ef.js";import"./color-6e929987.js";import{__tla as za}from"./ContentWrap.vue_vue_type_script_setup_true_lang-5f6a2d0d.js";import{__tla as Fa}from"./el-card-bc8cec83.js";import{__tla as Ra}from"./Dialog-eba103da.js";import{__tla as Ha}from"./UploadImgs-6d68033c.js";import{__tla as Ya}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-fb87e632.js";let F,Aa=Promise.all([(()=>{try{return pa}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Ya}catch{}})()]).then(async()=>{let D;D=j({name:"DiyTemplate",__name:"index",setup(Ea){const w=Pa(),{t:R}=K(),g=h(!0),T=h(0),U=h([]),i=L({pageNo:1,pageSize:10,name:null,createTime:[]}),N=h(),m=async()=>{g.value=!0;try{const d=await ka(i);U.value=d.list,T.value=d.total}finally{g.value=!1}},v=()=>{i.pageNo=1,m()},H=()=>{N.value.resetFields(),v()},P=h(),V=(d,r)=>{P.value.open(d,r)},{push:Y}=Q();return $(()=>{m()}),(d,r)=>{const A=aa,k=ea,E=ta,x=la,_=ra,I=ia,S=wa,s=oa,M=fa,q=ua,B=na,G=ca,f=J("hasPermi"),O=sa;return n(),b(C,null,[a(S,null,{default:t(()=>[a(I,{class:"-mb-15px",model:l(i),ref_key:"queryFormRef",ref:N,inline:!0,"label-width":"68px"},{default:t(()=>[a(k,{label:"\u6A21\u677F\u540D\u79F0",prop:"name"},{default:t(()=>[a(A,{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:W(v,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(k,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[a(E,{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(k,null,{default:t(()=>[a(_,{onClick:v},{default:t(()=>[a(x,{icon:"ep:search",class:"mr-5px"}),p(" \u641C\u7D22")]),_:1}),a(_,{onClick:H},{default:t(()=>[a(x,{icon:"ep:refresh",class:"mr-5px"}),p(" \u91CD\u7F6E")]),_:1}),u((n(),c(_,{type:"primary",plain:"",onClick:r[2]||(r[2]=e=>V("create"))},{default:t(()=>[a(x,{icon:"ep:plus",class:"mr-5px"}),p(" \u65B0\u589E ")]),_:1})),[[f,["promotion:diy-template:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(S,null,{default:t(()=>[u((n(),c(B,{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,X(e.row.previewPicUrls,(y,o)=>(n(),c(M,{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(q,{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(_,{link:"",type:"primary",onClick:y=>{return o=e.row.id,void Y({name:"DiyTemplateDecorate",params:{id:o}});var o}},{default:t(()=>[p(" \u88C5\u4FEE ")]),_:2},1032,["onClick"])),[[f,["promotion:diy-template:update"]]]),u((n(),c(_,{link:"",type:"primary",onClick:y=>V("update",e.row.id)},{default:t(()=>[p(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[f,["promotion:diy-template:update"]]]),e.row.used?Z("",!0):(n(),b(C,{key:0},[u((n(),c(_,{link:"",type:"primary",onClick:y=>(async o=>{try{await w.confirm(`\u662F\u5426\u4F7F\u7528\u6A21\u677F\u201C${o.name}\u201D?`),await ba(o.id),w.success("\u4F7F\u7528\u6210\u529F"),await m()}catch{}})(e.row)},{default:t(()=>[p(" \u4F7F\u7528 ")]),_:2},1032,["onClick"])),[[f,["promotion:diy-template:use"]]]),u((n(),c(_,{link:"",type:"danger",onClick:y=>(async o=>{try{await w.delConfirm(),await xa(o),w.success(R("common.delSuccess")),await m()}catch{}})(e.row.id)},{default:t(()=>[p(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[f,["promotion:diy-template:delete"]]])],64))]),_:1})]),_:1},8,["data"])),[[O,l(g)]]),a(G,{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)}}}),F=_a(D,[["__file","D:/zhongxing/mall-newfeifan-zx-admin/src/views/mall/promotion/diy/template/index.vue"]])});export{Aa as __tla,F as default};