无关风月
2025-05-08 9486766c806fe1d9e082b2fd02ea1cc558f1b443
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/**
 * 跨城站点管理管理初始化
 */
var WorldCupRecords = {
    id: "WorldCupRecordsTable",    //表格id
    seItem: null,        //选中的条目
    table1: null,
    table2: null,
    table3: null,
    layerIndex: -1,
};
 
 
 
/**
 * 检查是否选中
 */
WorldCupRecords.check = function () {
    var selected = $('#' + this.id).bootstrapTable('getSelections');
    if(selected.length == 0){
        Feng.info("请先选中表格中的某一记录!");
        return false;
    }else{
        WorldCupRecords.seItem = selected[0];
        return true;
    }
};
 
 
WorldCupRecords.openWorldCupRecordsInfo = function (){
    var selected = $('#WorldCupRecordsTable2').bootstrapTable('getSelections');
    if(selected.length == 0){
        Feng.info("请先选中表格中的某一记录!");
        return false;
    }
    let seItem2 = selected[0];
    var index = layer.open({
        type: 2,
        title: '查看详情',
        area: ['100%', '100%'], //宽高
        fix: false, //不固定
        maxmin: true,
        content: Feng.ctxPath + '/worldCupRecords/openWorldCupGameStatisticsInfo?id=' + seItem2.id
    });
    this.layerIndex = index;
}
 
WorldCupRecords.openUserGameRecord = function (){
    var index = layer.open({
        type: 2,
        title: '比赛记录',
        area: ['100%', '100%'], //宽高
        fix: false, //不固定
        maxmin: true,
        content: Feng.ctxPath + '/worldCupRecords/openUserGameRecord'
    });
    this.layerIndex = index;
}
 
WorldCupRecords.exportUserStatistics = function (){
    let phone = $("#phone").val();
    let name =$("#userName").val();
    let idcard =$("#idcard").val();
    window.location.href = Feng.ctxPath + '/worldCupRecords/exportUserStatistics?phone=' + phone + "&name=" + name + "&idcard=" + idcard
}
 
 
/**
 * 关闭此对话框
 */
WorldCupRecords.close = function() {
    parent.layer.close(window.parent.WorldCupRecords.layerIndex);
};
 
 
WorldCupRecords.search1 = function () {
    var queryData = {};
    queryData['province']  = $("#province").val();
    queryData['city'] =$("#city").val();
    WorldCupRecords.table1.refresh({query: queryData});
};
 
WorldCupRecords.resetSearch1 = function () {
    $("#province").val("");
    $("#city").val("");
    WorldCupRecords.search1();
};
 
WorldCupRecords.search2 = function () {
    var queryData = {};
    queryData['name']  = $("#name").val();
    WorldCupRecords.table2.refresh({query: queryData});
};
 
WorldCupRecords.resetSearch2 = function () {
    $("#name").val("");
    WorldCupRecords.search2();
};
 
WorldCupRecords.search3 = function () {
    var queryData = {};
    queryData['phone']  = $("#phone").val();
    queryData['name'] =$("#userName").val();
    queryData['idcard'] =$("#idcard").val();
    WorldCupRecords.table3.refresh({query: queryData});
};
 
WorldCupRecords.resetSearch3 = function () {
    $("#phone").val("");
    $("#userName").val("");
    $("#idcard").val("");
    WorldCupRecords.search3();
};
 
$(function () {
    var defaultColunms1 = [
        {field: 'selectItem', visible: false, checkbox: false},
        {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
        {title: '名次', field: 'row_num', visible: true, align: 'center', valign: 'middle',width:'20%',},
        {title: '用户姓名', field: 'name', visible: true, align: 'center', valign: 'middle',},
        {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle'},
        {title: '所在城市', field: 'province', visible: true, align: 'center', valign: 'middle'},
        {title: '已比赛场次', field: 'totalSession', visible: true, align: 'center', valign: 'middle'},
        {title: '胜-负场次', field: 'win', visible: true, align: 'center', valign: 'middle',
            formatter:function (data, item) {
                return item.win + '-' + item.lose;
            }
        },
        {title: '胜率', field: 'winRate', visible: true, align: 'center', valign: 'middle',
            formatter:function (data) {
                return data + '%';
            }
        },
    ];
    var table1 = new BSTable("WorldCupRecordsTable1", "/worldCupRecords/worldCupRecordsList", defaultColunms1);
    table1.setPaginationType("server");
    WorldCupRecords.table1 = table1.init();
 
    var defaultColunms2 = [
        {field: 'selectItem', checkbox: true},
        {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
        {title: '比赛名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:'20%',},
        {title: '开始时间', field: 'startTime', visible: true, align: 'center', valign: 'middle',},
        {title: '结束时间', field: 'endTime', visible: true, align: 'center', valign: 'middle'},
        {title: '已报名人数', field: 'applicants', visible: true, align: 'center', valign: 'middle'},
        {title: '已比赛场次', field: 'matchTime', visible: true, align: 'center', valign: 'middle'},
    ];
    var table2 = new BSTable("WorldCupRecordsTable2", "/worldCupRecords/worldCupGameStatistics", defaultColunms2);
    table2.setPaginationType("server");
    WorldCupRecords.table2 = table2.init();
 
    var defaultColunms3 = [
        {field: 'selectItem', checkbox: true},
        {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
        {title: '用户姓名', field: 'name', visible: true, align: 'center', valign: 'middle',width:'20%',},
        {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle',},
        {title: '身份证号', field: 'idcard', visible: true, align: 'center', valign: 'middle'},
        {title: '已比赛场次', field: 'totalSession', visible: true, align: 'center', valign: 'middle'},
        {title: '胜-负场次', field: 'win', visible: true, align: 'center', valign: 'middle',
            formatter:function (data, item) {
                return item.win + '-' + item.lose;
            }
        },
        {title: '胜率', field: 'winRate', visible: true, align: 'center', valign: 'middle',
            formatter:function (data) {
                return data + '%';
            }
        },
    ];
    var table3 = new BSTable("WorldCupRecordsTable3", "/worldCupRecords/getUserGameRecordList", defaultColunms3);
    table3.setPaginationType("server");
    WorldCupRecords.table3 = table3.init();
});