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

2 lines
7.0 KiB
JavaScript

import{d as A,r as D,dj as j,b as I,e as G,o as d,j as i,w as o,a as r,u as f,h as l,ad as _,c as H,aa as P,aY as U,f as K,ac as R,T as z,I as Y,dk as q,a$ as J,B as Q,af as W,b0 as X,dl as Z,dm as ee,am as te,an as ae,ao as oe,b1 as re,ae as ne}from"./index-D2_T1wn8.js";import{_ as h}from"./AppIcon.vue_vue_type_script_setup_true_lang-CkLwzok3.js";import{_ as se}from"./Info.vue_vue_type_script_setup_true_lang-C3uWKsAv.js";import{_ as de}from"./PageContainerGame.vue_vue_type_script_setup_true_lang-BOdvIqSv.js";import{_ as ie}from"./TableCurdV1.vue_vue_type_script_setup_true_lang-Vmle43x3.js";import{T as v}from"./AppDictionaryCache-emH9lV7i.js";import"./h-common-select.vue_vue_type_style_index_0_lang-DI3wHo3k.js";import"./h-game-tag-select.vue_vue_type_style_index_0_lang-7rVXXxTg.js";/* empty css *//* empty css *//* empty css */import"./h-game-type-select.vue_vue_type_style_index_0_lang-D-tIoCN_.js";import"./h-game-operation-select.vue_vue_type_style_index_0_lang-D6JPNLmy.js";import"./WangEditor.vue_vue_type_script_setup_true_lang-QukuYg01.js";import"./ColumnSetting.vue_vue_type_script_setup_true_lang-CoyFCDkB.js";import"./SysDictionaryService-CoxT7Yam.js";import"./T_Game_TypesService-O6BewZrT.js";import"./T_Game_TagsService-BMaG5ygF.js";const le=["innerHTML"],$e=A({name:"t_Game_ListIndex",__name:"Index",setup(ue){var T=[{dataIndex:"id",title:"id",show:!0,width:80,sorter:!0},{dataIndex:"gameId",title:"游戏Id",show:!0,width:150,sorter:!0},{dataIndex:"gameName",title:"游戏名称",show:!0,width:150,sorter:!0},{dataIndex:"gameIntroduce",title:"游戏介绍",show:!0,width:450,sorter:!0},{dataIndex:"gamePeopleNum",title:"游戏人数",show:!0,width:120,sorter:!0},{dataIndex:"gameCloudId",title:"云游戏Id",show:!0,width:150,sorter:!0},{dataIndex:"orderId",title:"排序",show:!0,width:80,sorter:!0},{dataIndex:"dCompany",title:"云游戏开发公司",show:!1,width:150,sorter:!0},{dataIndex:"gameOperationModel",title:"游戏操作类型",show:!0,width:150,sorter:!0},{dataIndex:"desc",title:"备注",show:!0,width:100,sorter:!0},{dataIndex:"gameIsSaveFile",title:"是否存档",show:!1,width:80,sorter:!0},{dataIndex:"gameIsCrack",title:"是否破解",show:!1,width:80,sorter:!0},{dataIndex:"gameIsAdapter",title:"是否适配",show:!1,width:80,sorter:!0},{dataIndex:"gameIsVersion",title:"版权",show:!1,width:80,sorter:!0},{dataIndex:"updateTime",title:"修改时间",show:!1,width:120,sorter:!0},{dataIndex:"screenOrientation",title:"屏幕方向",show:!0,width:120,sorter:!0},{dataIndex:"gameIsEditionNumber",title:"版号",show:!1,width:80,sorter:!0},{dataIndex:"gameIsEditionMouse",title:"隐藏鼠标",show:!1,width:80,sorter:!0},{dataIndex:"steamId",title:"steam",show:!1,width:100,sorter:!0},{dataIndex:"gameDifficulty",title:"游戏难度",show:!0,width:100,sorter:!0},{dataIndex:"gameIssuer",title:"游戏发行方",show:!1,width:100,sorter:!0}];const t=D({search:{state:!0,vm:{gameid:void 0,gamename:void 0},sort:[]},loading:!1,page:1,size:50,total:100,columns:[],data:[]}),u=j(),y=I(),w=I(),k=I();G(()=>{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=T,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 z.message.error("请选择要删除的行!");try{t.loading=!0;const g=await v.deleteList(e);if(t.loading=!1,g.code!=200)return;z.message.success("删除成功!"),m()}catch{t.loading=!1}}function $(){v.exportExcel(t.search.vm,t.search.sort)}return(n,e)=>{const c=Y,g=q,x=J,p=Q,L=W,N=X,B=Z,S=ee,E=te,F=ae,M=oe,b=re,V=ne;return d(),i(de,null,{default:o(()=>[r(ie,{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?(d(),i(B,{key:0,ref_key:"refSearchForm",ref:k,model:t.search.vm},{default:o(()=>[r(N,{gutter:[16,0]},{default:o(()=>[r(x,{xs:4,sm:4,md:4,lg:4,xl:4},{default:o(()=>[r(g,{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(g,{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(L,{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?(d(),i(p,{key:0,type:"primary",onClick:e[4]||(e[4]=()=>{var a;return(a=w.value)==null?void 0:a.open()})},{icon:o(()=>[r(h,{name:"PlusOutlined"})]),default:o(()=>[e[11]||(e[11]=l(" 新建 "))]),_:1})):_("",!0),f(u).delete?(d(),i(S,{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(M,null,{overlay:o(()=>[r(F,null,{default:o(()=>[r(E,{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(()=>[(d(!0),H(R,null,P(t.columns.filter(a=>a.dataIndex!=="id"&&a.show),(a,s)=>(d(),i(b,{key:a.dataIndex,title:a.title,width:a.width,"data-index":a.dataIndex,sorter:a.sort?{multiple:s+1}:!1},U({_:2},[a.dataIndex==="gameIntroduce"?{name:"default",fn:o(({record:O})=>[K("div",{innerHTML:O.gameIntroduce},null,8,le)]),key:"0"}:void 0]),1032,["title","width","data-index","sorter"]))),128)),f(u).update||f(u).delete?(d(),i(b,{key:0,title:"操作","data-index":"id",width:"200px",fixed:"right"},{default:o(({record:a})=>[f(u).update?(d(),i(p,{key:0,type:"link",onClick:()=>{var s;return(s=w.value)==null?void 0:s.open(a.id)}},{default:o(()=>e[15]||(e[15]=[l("编辑")])),_:2},1032,["onClick"])):_("",!0),r(V,{type:"vertical"}),f(u).delete?(d(),i(S,{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(se,{ref_key:"refInfo",ref:w,onSuccess:()=>m()},null,8,["onSuccess"])]),_:1})}}});export{$e as default};