1 |
- /* empty css *//* empty css */import{_ as e}from"./index-c18598fb.js";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang-2ef7e94f.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as l}from"./search.vue_vue_type_script_setup_true_lang-1d53ef10.js";/* empty css *//* empty css *//* empty css */import{c as t,o as s,a as o}from"./create-9d7d02bd.js";import{u as r}from"./useGetList-aee70ebc.js";import{o as i}from"./index-c0a51b8f.js";/* empty css */import"./http-0a3fb0e3.js";/* empty css */import{d as p,m as u,p as n,x as m,aq as d,o as c,c as v,e as j,a as _,w as f,f as b,F as y,y as g,l as h,Z as x,b as V,a7 as w,aC as k,a5 as C,a6 as B,A as U,B as z,W as T,aa as q,D as W,au as $,ab as A,a2 as D}from"./index-8f6379f8.js";/* empty css */import"./index-0599643c.js";/* empty css *//* empty css */import"./myUpload-19d1a5fa.js";/* empty css */import"./videoList-089b81f6.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./index-b8a1ff49.js";import"./index-b7d848b5.js";const L={class:"flex flex-col justify-between w-full sm:flex-row"},X={class:"w-full"},Z={class:"table-default"},F={class:"pt-5 pl-2"},G=j("br",null,null,-1),H=p({__name:"index",setup(p){const H=u([]),{data:I,query:S,search:Y,reset:E,loading:J}=r("operation/banner/list",!0),K=n((()=>{var e;return null==(e=I.value)?void 0:e.data})),M=u(!1),N=u({}),O=u(""),P=u(!1);return m((()=>{Y(),i().then((e=>{H.value=e.data.miniprogramType}))})),(r,i)=>{const p=C,u=B,n=U,m=z,I=l,Q=T,R=q,ee=W,ae=$,le=A,te=a,se=e,oe=d("action"),re=D;return c(),v(y,null,[j("div",L,[j("div",X,[_(I,{search:b(Y),reset:b(E)},{body:f((()=>[_(u,{label:"轮播图名称"},{default:f((()=>[_(p,{modelValue:b(S).title,"onUpdate:modelValue":i[0]||(i[0]=e=>b(S).title=e),size:"default",placeholder:"请输入轮播图名称",clearable:""},null,8,["modelValue"])])),_:1}),_(u,{label:"小程序类型"},{default:f((()=>[_(m,{modelValue:b(S).miniprogram_type,"onUpdate:modelValue":i[1]||(i[1]=e=>b(S).miniprogram_type=e),clearable:"",filterable:"",placeholder:"请选择小程序类型"},{default:f((()=>[(c(!0),v(y,null,g(H.value,((e,a)=>(c(),h(n,{key:a,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),j("div",Z,[x((c(),v("div",F,[_(Q,{type:"primary",size:"default",onClick:i[2]||(i[2]=e=>(O.value="新增",N.value={},void(M.value=!0)))},{default:f((()=>[V("新增")])),_:1})])),[[oe,"operation.Banner.add"]]),x((c(),h(le,{data:b(K),class:"mt-3"},{default:f((()=>[_(R,{label:"轮播图ID",prop:"id"}),_(R,{label:"轮播图名称",prop:"title"}),_(R,{label:"封面",prop:"img_url"},{default:f((e=>[_(ee,{src:e.row.img_url,fit:"fill",lazy:!0},null,8,["src"])])),_:1}),_(R,{label:"排序",prop:"sort"}),_(R,{label:"添加时间",prop:"created_at"}),_(R,{label:"小程序类型",prop:"miniprogram_type_text"}),x((c(),h(R,{label:"状态"},{default:f((e=>[j("div",null,[_(ae,{modelValue:e.row.status,"onUpdate:modelValue":a=>e.row.status=a,onChange:a=>{return l=e.row,void s(l.id,{status:l.status}).then((e=>{w.success(e.message),Y()})).catch((e=>{Y()}));var l},"active-value":1,"inactive-value":0},null,8,["modelValue","onUpdate:modelValue","onChange"])])])),_:1})),[[oe,"operation.Banner.updateStatus"]]),_(R,{label:"操作"},{default:f((e=>[x((c(),h(Q,{link:"",type:"primary",size:"small",onClick:a=>{return l=e.row,O.value="编辑",N.value=l,void(M.value=!0);var l}},{default:f((()=>[V("编辑")])),_:2},1032,["onClick"])),[[oe,"operation.Banner.edit"]]),G,x((c(),h(Q,{link:"",type:"primary",size:"small",onClick:a=>{return l=e.row,void k.confirm(`确认删除 ${l.title} 吗?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{o(l.id).then((e=>{w.success(e.message),Y()}))})).catch((()=>{Y()}));var l}},{default:f((()=>[V("删除")])),_:2},1032,["onClick"])),[[oe,"operation.Banner.del"]])])),_:1})])),_:1},8,["data"])),[[re,b(J)]]),_(te)])])]),_(se,{modelValue:M.value,"onUpdate:modelValue":i[4]||(i[4]=e=>M.value=e),title:O.value,width:"30%","destroy-on-close":""},{default:f((()=>[_(t,{onClose:i[3]||(i[3]=e=>(e=>{switch(e){case"configVisible":P.value=!1;break;case"addVisible":M.value=!1}Y()})("addVisible")),primary:N.value},null,8,["primary"])])),_:1},8,["modelValue","title"])],64)}}});export{H as default};
|