2 lines
6.7 KiB
JavaScript
2 lines
6.7 KiB
JavaScript
import{_ as A}from"./h-epg-all-select.vue_vue_type_style_index_0_lang-Ba0mRR2w.js";import{d as D,r as M,dj as P,b as h,e as R,o as l,j as d,w as o,a as r,u as _,h as i,ad as f,c as U,aa as K,ac as q,T,dk as G,a$ as H,I as J,B as Q,af as W,b0 as X,dl as Y,dm as Z,am as ee,an as te,ao as ae,b1 as oe,ae as re}from"./index-D2_T1wn8.js";import{_ as I}from"./AppIcon.vue_vue_type_script_setup_true_lang-CkLwzok3.js";import{T as y,_ as ne}from"./Info.vue_vue_type_script_setup_true_lang-zRAtTVsv.js";import{_ as se}from"./PageContainerGame.vue_vue_type_script_setup_true_lang-BOdvIqSv.js";import{_ as le}from"./TableCurdV1.vue_vue_type_script_setup_true_lang-Vmle43x3.js";import"./AppDictionaryCache-emH9lV7i.js";import"./SysDictionaryService-CoxT7Yam.js";import"./T_Game_TypesService-O6BewZrT.js";import"./T_Game_TagsService-BMaG5ygF.js";/* empty css */import"./h-image-btn.vue_vue_type_style_index_0_lang-5ryu2L8N.js";import"./h-language-select.vue_vue_type_style_index_0_lang--4ojSMVN.js";import"./h-common-select.vue_vue_type_style_index_0_lang-DI3wHo3k.js";import"./ColumnSetting.vue_vue_type_script_setup_true_lang-CoyFCDkB.js";const Ce=D({name:"t_Epg_CfgIndex",__name:"Index",setup(de){var $=[{dataIndex:"id",title:"id",show:!0,width:40,sorter:!0},{dataIndex:"title",title:"标题",show:!0,width:100,sorter:!0},{dataIndex:"title2",title:"副标题",show:!0,width:60,sorter:!0},{dataIndex:"resId",title:"资源Id",show:!0,width:80,sorter:!0},{dataIndex:"resType",title:"资源类型",show:!0,width:80,sorter:!0},{dataIndex:"resParams",title:"资源参数",show:!0,width:120,sorter:!0},{dataIndex:"imageId",title:"图片",show:!1,width:40,sorter:!0},{dataIndex:"imageResStyle",title:"资源图样式",show:!0,width:100,sorter:!0},{dataIndex:"isOnline",title:"是否启用",show:!0,width:80,sorter:!0},{dataIndex:"idName",title:"代码标识",show:!0,width:80,sorter:!0},{dataIndex:"startEnableTime",title:"启用时间",show:!0,width:120,sorter:!0},{dataIndex:"endEnableTime",title:"结束时间",show:!0,width:120,sorter:!0},{dataIndex:"orderId",title:"排序",show:!0,width:100,sorter:!0},{dataIndex:"cornerIconId",title:"角标",show:!1,width:40,sorter:!0},{dataIndex:"updateTime",title:"更新时间",show:!1,width:80,sorter:!0},{dataIndex:"imageId2",title:"图片2-预留",show:!1,width:120,sorter:!0},{dataIndex:"imageId3",title:"图片3",show:!1,width:60,sorter:!0},{dataIndex:"countryName",title:"国家",show:!1,width:40,sorter:!0},{dataIndex:"continent",title:"州",show:!1,width:20,sorter:!0},{dataIndex:"channel",title:"渠道",show:!1,width:40,sorter:!0},{dataIndex:"platform",title:"平台",show:!1,width:200,sorter:!0},{dataIndex:"createTime",title:"创建时间",show:!1,width:80,sorter:!0}];const t=M({search:{state:!0,vm:{epgcategory:void 0,title:void 0},sort:[]},loading:!1,page:1,size:50,total:100,columns:[],data:[]}),u=P(),v=h(),g=h(),k=h();R(()=>{m()});async function m(){try{t.loading=!0;const n=await y.findList(t.page,t.size,t.search.vm,t.search.sort);if(t.loading=!1,n.code!=200)return;t.page=n.data.page,t.size=n.data.size,t.total=n.data.total,t.columns=$,t.data=n.data.dataSource}catch{t.loading=!1}}async function C(n){var w;let e=[];if(n?e.push(n):e=((w=v.value)==null?void 0:w.getSelectedRowKeys())??[],e.length==0)return T.message.error("请选择要删除的行!");try{t.loading=!0;const c=await y.deleteList(e);if(t.loading=!1,c.code!=200)return;T.message.success("删除成功!"),m()}catch{t.loading=!1}}function z(){y.exportExcel(t.search.vm,t.search.sort)}return(n,e)=>{const w=A,c=G,x=H,E=J,p=Q,V=W,B=X,F=Y,b=Z,L=ee,N=te,O=ae,S=oe,j=re;return l(),d(se,null,{default:o(()=>[r(le,{ref_key:"refTableCurd",ref:v,config:t,onChange:e[7]||(e[7]=a=>{t.page=a.pagination.current??1,t.size=a.pagination.pageSize??t.size,t.search.sort=a.sorter instanceof Array?[...a.sorter]:[a.sorter],m()}),onShowSizeChange:e[8]||(e[8]=({current:a,size:s})=>{t.page=a==0?1:a,t.size=s,m()})},{search:o(()=>[_(u).search?(l(),d(F,{key:0,ref_key:"refSearchForm",ref:k,model:t.search.vm},{default:o(()=>[r(B,{gutter:[16,0]},{default:o(()=>[r(x,{xs:4,sm:4,md:4,lg:4,xl:4},{default:o(()=>[r(c,{class:"mb-0",name:"name",label:"epg分组"},{default:o(()=>[r(w,{modelValue:t.search.vm.epgcategory,"onUpdate:modelValue":e[0]||(e[0]=a=>t.search.vm.epgcategory=a)},null,8,["modelValue"])]),_:1})]),_:1}),r(x,{xs:4,sm:4,md:4,lg:4,xl:4},{default:o(()=>[r(c,{class:"mb-0",name:"name",label:"标题"},{default:o(()=>[r(E,{value:t.search.vm.title,"onUpdate:value":e[1]||(e[1]=a=>t.search.vm.title=a),placeholder:"标题"},null,8,["value"])]),_:1})]),_:1}),r(x,{xs:2,sm:2,md:2,lg:2,xl:2,class:"text-right"},{default:o(()=>[r(V,{size:8},{default:o(()=>[r(p,{onClick:e[2]||(e[2]=a=>{var s;t.page=1,(s=k.value)==null||s.resetFields(),m()})},{default:o(()=>e[9]||(e[9]=[i(" 重置 ")])),_:1}),r(p,{type:"primary",onClick:e[3]||(e[3]=a=>{t.page=1,m()})},{default:o(()=>e[10]||(e[10]=[i(" 查询 ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])):f("",!0)]),"toolbar-left":o(()=>[_(u).insert?(l(),d(p,{key:0,type:"primary",onClick:e[4]||(e[4]=()=>{var a;return(a=g.value)==null?void 0:a.open(null,t.search.vm.epgcategory)})},{icon:o(()=>[r(I,{name:"PlusOutlined"})]),default:o(()=>[e[11]||(e[11]=i(" 新建 "))]),_:1})):f("",!0),_(u).delete?(l(),d(b,{key:1,title:"您确定要删除?",onConfirm:e[5]||(e[5]=a=>C()),okText:"确定",cancelText:"取消"},{default:o(()=>[r(p,{type:"primary",danger:""},{icon:o(()=>[r(I,{name:"DeleteOutlined"})]),default:o(()=>[e[12]||(e[12]=i(" 批量删除 "))]),_:1})]),_:1})):f("",!0)]),"toolbar-right":o(()=>[r(O,null,{overlay:o(()=>[r(N,null,{default:o(()=>[r(L,{key:"1",onClick:e[6]||(e[6]=a=>z())},{default:o(()=>e[13]||(e[13]=[i("导出 Excel")])),_:1})]),_:1})]),default:o(()=>[r(p,null,{default:o(()=>[e[14]||(e[14]=i(" 更多 ")),r(I,{name:"ellipsis-outlined"})]),_:1})]),_:1})]),"table-col":o(()=>[(l(!0),U(q,null,K(t.columns.filter(a=>a.dataIndex!=="id"&&a.show),(a,s)=>(l(),d(S,{key:a.dataIndex,title:a.title,width:a.width,"data-index":a.dataIndex,sorter:a.sort?{multiple:s+1}:!1},null,8,["title","width","data-index","sorter"]))),128)),_(u).update||_(u).delete?(l(),d(S,{key:0,title:"操作","data-index":"id",width:"200px",fixed:"right"},{default:o(({record:a})=>[_(u).update?(l(),d(p,{key:0,type:"link",onClick:()=>{var s;return(s=g.value)==null?void 0:s.open(a.id)}},{default:o(()=>e[15]||(e[15]=[i("编辑")])),_:2},1032,["onClick"])):f("",!0),r(j,{type:"vertical"}),_(u).delete?(l(),d(b,{key:1,title:"您确定要删除?",onConfirm:s=>C(a.id),okText:"确定",cancelText:"取消"},{default:o(()=>[r(p,{type:"link",danger:""},{default:o(()=>e[16]||(e[16]=[i("删除")])),_:1})]),_:2},1032,["onConfirm"])):f("",!0)]),_:1})):f("",!0)]),_:1},8,["config"]),r(ne,{ref_key:"refInfo",ref:g,onSuccess:()=>m()},null,8,["onSuccess"])]),_:1})}}});export{Ce as default};
|