import{x as g,a7 as y}from"./index-fNs72j9w.js";import{B as I,N as k,a as L,ar as w,w as E,I as u,X as v,C as l,D as C,u as o,O as i,W as p,H as n,P as m,p as N,_ as T,G as q,U as x,aK as D,au as S}from"./vue-DweYBrEc.js";import{u as U,P as A,a as P}from"./popupForm-BxCdindB.js";import{b as z,T as B,a as G}from"./index-CgMrKa77.js";import"./index-BlEwok4a.js";import"./validate-CEOscgyN.js";import"./index-DMA3A9_B.js";const R={class:"default-main ba-table-box"},F={class:"table-header-operate-text"},J=I({name:"user/scoreLog",__name:"index",setup(K){const{t:e,tm:d}=g.useI18n(),b=k().query.user_id??"",t=L({userInfo:{}}),r=new z(new y(U),{column:[{type:"selection",align:"center",operator:!1},{label:e("Id"),prop:"id",align:"center",operator:"=",operatorPlaceholder:e("Id"),width:70},{label:e("user.moneyLog.User ID"),prop:"user_id",align:"center",width:70},{label:e("user.moneyLog.User name"),prop:"user.username",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("user.moneyLog.User nickname"),prop:"user.nickname",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("user.scoreLog.Game type"),prop:"game_type",align:"center",operator:"eq",sortable:!1,render:"tag",replaceValue:{...d("user.scoreLog.game_type")}},{label:e("user.scoreLog.Change points"),prop:"score",align:"center",operator:"RANGE",sortable:"custom"},{label:e("user.moneyLog.Before change"),prop:"before",align:"center",operator:"RANGE",sortable:"custom"},{label:e("user.moneyLog.After change"),prop:"after",align:"center",operator:"RANGE",sortable:"custom"},{label:e("user.moneyLog.remarks"),prop:"memo",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query"),showOverflowTooltip:!0},{label:e("Create time"),prop:"create_time",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160}],dblClickNotEditColumn:["all"]},{defaultItems:{user_id:b,memo:""}});r.after.onSubmit=()=>{s(r.comSearch.form.user_id)},r.after.onTableHeaderAction=({event:a})=>{a=="refresh"&&s(r.comSearch.form.user_id)},r.mount(),r.getData(),S("baTable",r);const s=w(a=>{a&&D(a)>0?P(a).then(c=>{t.userInfo=c.data.user}):t.userInfo={}},300);return s(r.comSearch.form.user_id),E(()=>r.comSearch.form.user_id,a=>{r.form.defaultItems.user_id=a,s(a)}),(a,c)=>{const f=u("el-alert"),_=u("el-button"),h=v("blur");return l(),C("div",R,[o(r).table.remark?(l(),i(f,{key:0,class:"ba-table-alert",title:o(r).table.remark,type:"info","show-icon":""},null,8,["title"])):p("",!0),n(B,{buttons:["refresh","comSearch","quickSearch","columnDisplay"],"quick-search-placeholder":o(e)("Quick search placeholder",{fields:o(e)("user.moneyLog.User name")+"/"+o(e)("user.moneyLog.User nickname")})},{default:m(()=>[o(N)(t.userInfo)?p("",!0):T((l(),i(_,{key:0,class:"table-header-operate"},{default:m(()=>[q("span",F,x(t.userInfo.username+"(ID:"+t.userInfo.id+") "+o(e)("user.scoreLog.integral")+":"+t.userInfo.score),1)]),_:1})),[[h]])]),_:1},8,["quick-search-placeholder"]),n(G),n(A)])}}});export{J as default};
