CloudGamingAdmin/admin-client/dist/static/js/Index-CLj7P6Kw.js
2024-11-15 02:58:48 +08:00

2 lines
6.8 KiB
JavaScript

import{d as P,r as G,dj as O,b as I,e as j,o as i,j as d,w as o,a as r,u as f,h as l,ad as _,c as A,aa as H,ac as M,T as S,I as U,dk as K,a$ as R,B as q,af as J,b0 as Q,dl as W,dm as X,am as Y,an as Z,ao as ee,b1 as te,ae}from"./index-D2_T1wn8.js";import{_ as h}from"./AppIcon.vue_vue_type_script_setup_true_lang-CkLwzok3.js";import{T as v,_ as oe}from"./Info.vue_vue_type_script_setup_true_lang-DXe77YL-.js";import{_ as re}from"./PageContainerGame.vue_vue_type_script_setup_true_lang-BOdvIqSv.js";import{_ as ne}from"./TableCurdV1.vue_vue_type_script_setup_true_lang-Vmle43x3.js";import"./h-image-btn.vue_vue_type_style_index_0_lang-5ryu2L8N.js";/* empty css */import"./h-language-select.vue_vue_type_style_index_0_lang--4ojSMVN.js";import"./AppDictionaryCache-emH9lV7i.js";import"./SysDictionaryService-CoxT7Yam.js";import"./T_Game_TypesService-O6BewZrT.js";import"./T_Game_TagsService-BMaG5ygF.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 ve=P({name:"t_GameCBTIndex",__name:"Index",setup(se){var z=[{dataIndex:"gameId",title:"游戏Id",show:!0,width:100,sorter:!0},{dataIndex:"gameName",title:"游戏名称",show:!0,width:200,sorter:!0},{dataIndex:"title2",title:"副标题",show:!0,width:120,sorter:!0},{dataIndex:"consumeDiamondNumHour",title:"消耗费用",show:!0,width:80,sorter:!0},{dataIndex:"isDiscount",title:"参与优惠",show:!0,width:80,sorter:!0},{dataIndex:"onlinePlatform",title:"平台类型",show:!1,width:80,sorter:!0},{dataIndex:"score",title:"评分",show:!0,width:40,sorter:!0},{dataIndex:"isOnline",title:"是否启用",show:!0,width:80,sorter:!0},{dataIndex:"orderId",title:"排序",show:!0,width:40,sorter:!0},{dataIndex:"friendlyTips",title:"启动提示",show:!1,width:80,sorter:!0},{dataIndex:"gameBgImgId",title:"游戏详情背景",show:!1,width:120,sorter:!0},{dataIndex:"gameImageId",title:"游戏库Icon图",show:!1,width:160,sorter:!0},{dataIndex:"updateTime",title:"修改时间",show:!1,width:80,sorter:!0},{dataIndex:"createTime",title:"创建时间",show:!1,width:80,sorter:!0},{dataIndex:"desc",title:"备注",show:!0,width:150,sorter:!0},{dataIndex:"gameLoadBgImageId",title:"游戏加载图",show:!1,width:100,sorter:!0},{dataIndex:"imageIconId",title:"游戏icon",show:!1,width:120,sorter:!0},{dataIndex:"isTest",title:"测试游戏",show:!0,width:100,sorter:!0},{dataIndex:"isLimitToVip",title:"VIP专属",show:!1,width:100,sorter:!0},{dataIndex:"gameLoadTime",title:"加载时间",show:!0,width:120,sorter:!0},{dataIndex:"consumeDiamondNumHourVip",title:"VIP钻石费用",show:!1,width:140,sorter:!0},{dataIndex:"gameGroup",title:"游戏分组",show:!1,width:80,sorter:!0},{dataIndex:"vipTypeLimit",title:"会员等级",show:!1,width:80,sorter:!0},{dataIndex:"vipVisible",title:"仅会员可见",show:!1,width:100,sorter:!0}];const t=G({search:{state:!0,vm:{gameid:void 0,gamename:void 0},sort:[]},loading:!1,page:1,size:50,total:100,columns:[],data:[]}),u=O(),y=I(),g=I(),k=I();j(()=>{m()});async function m(){try{t.loading=!0;const n=await v.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=z,t.data=n.data.dataSource}catch{t.loading=!1}}async function C(n){var c;let e=[];if(n?e.push(n):e=((c=y.value)==null?void 0:c.getSelectedRowKeys())??[],e.length==0)return S.message.error("请选择要删除的行!");try{t.loading=!0;const w=await v.deleteList(e);if(t.loading=!1,w.code!=200)return;S.message.success("删除成功!"),m()}catch{t.loading=!1}}function $(){v.exportExcel(t.search.vm,t.search.sort)}return(n,e)=>{const c=U,w=K,x=R,p=q,B=J,L=Q,V=W,T=X,N=Y,D=Z,F=ee,b=te,E=ae;return i(),d(re,null,{default:o(()=>[r(ne,{ref_key:"refTableCurd",ref:y,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(()=>[f(u).search?(i(),d(V,{key:0,ref_key:"refSearchForm",ref:k,model:t.search.vm},{default:o(()=>[r(L,{gutter:[16,0]},{default:o(()=>[r(x,{xs:4,sm:4,md:4,lg:4,xl:4},{default:o(()=>[r(w,{class:"mb-0",name:"name",label:"游戏Id"},{default:o(()=>[r(c,{value:t.search.vm.gameid,"onUpdate:value":e[0]||(e[0]=a=>t.search.vm.gameid=a),placeholder:"游戏Id"},null,8,["value"])]),_:1})]),_:1}),r(x,{xs:4,sm:4,md:4,lg:4,xl:4},{default:o(()=>[r(w,{class:"mb-0",name:"name",label:"游戏名称"},{default:o(()=>[r(c,{value:t.search.vm.gamename,"onUpdate:value":e[1]||(e[1]=a=>t.search.vm.gamename=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(B,{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]=[l(" 重置 ")])),_:1}),r(p,{type:"primary",onClick:e[3]||(e[3]=a=>{t.page=1,m()})},{default:o(()=>e[10]||(e[10]=[l(" 查询 ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])):_("",!0)]),"toolbar-left":o(()=>[f(u).insert?(i(),d(p,{key:0,type:"primary",onClick:e[4]||(e[4]=()=>{var a;return(a=g.value)==null?void 0:a.open()})},{icon:o(()=>[r(h,{name:"PlusOutlined"})]),default:o(()=>[e[11]||(e[11]=l(" 新建 "))]),_:1})):_("",!0),f(u).delete?(i(),d(T,{key:1,title:"您确定要删除?",onConfirm:e[5]||(e[5]=a=>C()),okText:"确定",cancelText:"取消"},{default:o(()=>[r(p,{type:"primary",danger:""},{icon:o(()=>[r(h,{name:"DeleteOutlined"})]),default:o(()=>[e[12]||(e[12]=l(" 批量删除 "))]),_:1})]),_:1})):_("",!0)]),"toolbar-right":o(()=>[r(F,null,{overlay:o(()=>[r(D,null,{default:o(()=>[r(N,{key:"1",onClick:e[6]||(e[6]=a=>$())},{default:o(()=>e[13]||(e[13]=[l("导出 Excel")])),_:1})]),_:1})]),default:o(()=>[r(p,null,{default:o(()=>[e[14]||(e[14]=l(" 更多 ")),r(h,{name:"ellipsis-outlined"})]),_:1})]),_:1})]),"table-col":o(()=>[(i(!0),A(M,null,H(t.columns.filter(a=>a.dataIndex!=="id"&&a.show),(a,s)=>(i(),d(b,{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)),f(u).update||f(u).delete?(i(),d(b,{key:0,title:"操作","data-index":"id",width:"200px",fixed:"right"},{default:o(({record:a})=>[f(u).update?(i(),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]=[l("编辑")])),_:2},1032,["onClick"])):_("",!0),r(E,{type:"vertical"}),f(u).delete?(i(),d(T,{key:1,title:"您确定要删除?",onConfirm:s=>C(a.id),okText:"确定",cancelText:"取消"},{default:o(()=>[r(p,{type:"link",danger:""},{default:o(()=>e[16]||(e[16]=[l("删除")])),_:1})]),_:2},1032,["onConfirm"])):_("",!0)]),_:1})):_("",!0)]),_:1},8,["config"]),r(oe,{ref_key:"refInfo",ref:g,onSuccess:()=>m()},null,8,["onSuccess"])]),_:1})}}});export{ve as default};