1 |
- /* empty css *//* empty css */import{_ as e}from"./index-9b21cb73.js";/* empty css */import{_ as a}from"./index.vue_vue_type_script_setup_true_lang-b96aacec.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-960e1c9f.js";/* empty css *//* empty css *//* empty css */import{_ as t}from"./create.vue_vue_type_script_setup_true_lang-9175722f.js";import s from"./config-f21f4994.js";import{u as o}from"./useGetList-74d01a4b.js";import{b as r,c as i}from"./index-93c079d9.js";import{o as n}from"./index-060bfa15.js";import"./http-65a1484b.js";/* empty css *//* empty css */import{d as p,q as u,n as d,z as m,ao as c,o as v,c as _,e as f,a as b,w as j,f as y,F as h,p as g,l as w,Z as V,b as x,A as C,aw as k,a7 as U,B as z,D as B,a6 as D,cC as F,X as G,aa as T,as as q,ab as A,R as E,a2 as I}from"./index-574ad2b9.js";/* empty css */import"./index-6918d81b.js";/* empty css */import"./videoList-c9f298dd.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./index-b8a1ff49.js";import"./index-d7e3a55b.js";const L={class:"flex flex-col justify-between w-full sm:flex-row"},R={class:"w-full"},S={class:"m-3"},X={class:"table-default"},Z={class:"pt-5 pl-2"},H=p({__name:"index",setup(p){const H=u([{name:"排行榜",value:1},{name:"最新",value:2}]),J=u([]),{data:K,query:M,search:N,reset:O,loading:P}=o("operation/channel/list",!0),Q=d((()=>{var e;return null==(e=K.value)?void 0:e.data})),W=u(!1),Y=u({}),$=u(!1),ee=e=>{switch(e){case"configVisible":$.value=!1;break;case"addVisible":W.value=!1}N()};return m((()=>{N(),n().then((e=>{J.value=e.data.miniprogramType}))})),(o,n)=>{const p=z,u=B,d=D,m=l,K=F,ae=G,le=T,te=q,se=A,oe=a,re=E,ie=e,ne=c("action"),pe=I;return v(),_(h,null,[f("div",L,[f("div",R,[b(m,{search:y(N),reset:y(O)},{body:j((()=>[b(d,{label:"频道名称"},{default:j((()=>[b(u,{modelValue:y(M).type,"onUpdate:modelValue":n[0]||(n[0]=e=>y(M).type=e),clearable:"",filterable:"",placeholder:"请选择频道名称"},{default:j((()=>[(v(!0),_(h,null,g(H.value,((e,a)=>(v(),w(p,{key:a,label:e.name,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),b(d,{label:"小程序类型"},{default:j((()=>[b(u,{modelValue:y(M).miniprogram_type,"onUpdate:modelValue":n[1]||(n[1]=e=>y(M).miniprogram_type=e),clearable:"",filterable:"",placeholder:"请选择小程序类型"},{default:j((()=>[(v(!0),_(h,null,g(J.value,((e,a)=>(v(),w(p,{key:a,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),b(re,{shadow:"always",class:"mt-3","body-style":{padding:"20px"}},{default:j((()=>[f("div",S,[b(K,{title:"启用状态后,最新开启的记录排序在上面",type:"warning",closable:!1})]),f("div",X,[V((v(),_("div",Z,[b(ae,{type:"primary",size:"default",onClick:n[2]||(n[2]=e=>{W.value=!0})},{default:j((()=>[x("新增")])),_:1})])),[[ne,"operation.Channel.add"]]),V((v(),w(se,{data:y(Q),class:"mt-3"},{default:j((()=>[b(le,{label:"频道ID",prop:"id"}),b(le,{label:"频道名称",prop:"type_txt"}),b(le,{label:"添加时间",prop:"created_at"}),b(le,{label:"小程序类型",prop:"miniprogram_type_text"}),V((v(),w(le,{label:"状态"},{default:j((e=>[f("div",null,[b(te,{modelValue:e.row.status,"onUpdate:modelValue":a=>e.row.status=a,disabled:Boolean(e.row.status),onChange:a=>{return l=e.row,void i(l.id).then((e=>{U.success(e.message),N()})).catch((e=>{N()}));var l},"active-value":1,"inactive-value":0},null,8,["modelValue","onUpdate:modelValue","disabled","onChange"])])])),_:1})),[[ne,"operation.Channel.enableStatus"]]),b(le,{label:"操作"},{default:j((e=>[V((v(),w(ae,{link:"",type:"primary",size:"small",onClick:a=>{return l=e.row,Y.value=l,void($.value=!0);var l}},{default:j((()=>[x("配置")])),_:2},1032,["onClick"])),[[ne,"operation.Channel.setting"]]),e.row.status?C("",!0):V((v(),w(ae,{key:0,link:"",type:"primary",size:"small",onClick:a=>{return l=e.row,void k.confirm("确认删除此列表吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{r(l.id).then((e=>{U.success(e.message),N()}))})).catch((()=>{N()}));var l}},{default:j((()=>[x("删除")])),_:2},1032,["onClick"])),[[ne,"operation.Channel.del"]])])),_:1})])),_:1},8,["data"])),[[pe,y(P)]]),b(oe)])])),_:1})])]),b(ie,{modelValue:$.value,"onUpdate:modelValue":n[4]||(n[4]=e=>$.value=e),title:"配置",width:"50%","destroy-on-close":""},{default:j((()=>[b(s,{onClose:n[3]||(n[3]=e=>ee("configVisible")),primary:Y.value},null,8,["primary"])])),_:1},8,["modelValue"]),b(ie,{modelValue:W.value,"onUpdate:modelValue":n[6]||(n[6]=e=>W.value=e),title:"新增",width:"30%","destroy-on-close":""},{default:j((()=>[b(t,{onClose:n[5]||(n[5]=e=>ee("addVisible"))})])),_:1},8,["modelValue"])],64)}}});export{H as default};
|