index-57a6a30d.js 6.0 KB

1
  1. import{d as M,A as O,r as w,g as G,u as J,y as X,S as $,o as n,c as b,i as a,w as t,a as l,T as j,l as _,C as u,k as c,F as C,B as Q,R as W,X as Z,H as aa,p as ea,_ as ta,q as la,I as ra,J as ia,K as oa,L as na,__tla as sa}from"./index-ecc2785b.js";import{_ as pa,__tla as _a}from"./index.vue_vue_type_script_setup_true_lang-3eecd42d.js";import{_ as ca,__tla as ma}from"./DictTag.vue_vue_type_script_lang-2b84bf42.js";import{E as ua,__tla as da}from"./el-image-2ba3072e.js";import{__tla as fa}from"./el-image-viewer-24503c90.js";import{_ as ya,__tla as wa}from"./ContentWrap.vue_vue_type_script_setup_true_lang-13de8544.js";import{d as V,__tla as ha}from"./formatTime-158d9eb6.js";import{d as ga,e as ka,f as va,__tla as xa}from"./template-eb0f1950.js";import{_ as ba,__tla as Ca}from"./DiyTemplateForm.vue_vue_type_script_setup_true_lang-fdca20c9.js";import{D as Ta,__tla as Da}from"./dict-9266706a.js";import{u as Na,__tla as Sa}from"./useMessage-23ea1f6c.js";import{__tla as Ua}from"./index-bfba6893.js";import"./color-6e929987.js";import{__tla as Pa}from"./el-card-99460cde.js";import{__tla as Va}from"./Dialog-e3083a37.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Fa}from"./UploadImgs-73cd68a7.js";import{__tla as Ra}from"./UploadImgs.vue_vue_type_style_index_0_scoped_3d27d917_lang-3cf734dd.js";let F,Aa=Promise.all([(()=>{try{return sa}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ra}catch{}})()]).then(async()=>{F=M({name:"DiyTemplate",__name:"index",setup(Ya){const h=Na(),{t:R}=O(),g=w(!0),T=w(0),D=w([]),i=G({pageNo:1,pageSize:10,name:null,createTime:[]}),N=w(),m=async()=>{g.value=!0;try{const d=await ga(i);D.value=d.list,T.value=d.total}finally{g.value=!1}},k=()=>{i.pageNo=1,m()},A=()=>{N.value.resetFields(),k()},S=w(),U=(d,r)=>{S.value.open(d,r)},{push:Y}=J();return X(()=>{m()}),(d,r)=>{const q=Z,v=aa,z=ea,x=ta,p=la,H=ra,P=ya,s=ia,I=ua,B=ca,E=oa,K=pa,f=$("hasPermi"),L=na;return n(),b(C,null,[a(P,null,{default:t(()=>[a(H,{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(q,{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:j(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(v,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[a(z,{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=>U("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(P,null,{default:t(()=>[u((n(),c(E,{data:l(D),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,Q(e.row.previewPicUrls,(y,o)=>(n(),c(I,{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(B,{type:l(Ta).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(V),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(V),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 Y({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=>U("update",e.row.id)},{default:t(()=>[_(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[f,["promotion:diy-template:update"]]]),e.row.used?W("",!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 va(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 ka(o),h.success(R("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"])),[[L,l(g)]]),a(K,{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(ba,{ref_key:"formRef",ref:S,onSuccess:m},null,512)],64)}}})});export{Aa as __tla,F as default};