|
@@ -2,9 +2,11 @@
|
2
|
2
|
<div class="body" style="font-size:14px">
|
3
|
3
|
<el-card class="box-card" shadow="never">
|
4
|
4
|
游戏名称:
|
5
|
|
- <el-input v-model="title" style="width: 200px; margin-right: 20px" />
|
|
5
|
+ <el-input v-model="gameTitle" style="width: 200px; margin-right: 20px" />
|
6
|
6
|
用户昵称:
|
7
|
7
|
<el-input v-model="nickName" style="width: 200px; margin-right: 20px" />
|
|
8
|
+ 手机号:
|
|
9
|
+ <el-input v-model="phone" style="width: 200px; margin-right: 20px" />
|
8
|
10
|
创建时间:
|
9
|
11
|
<el-date-picker
|
10
|
12
|
v-model="daterange"
|
|
@@ -19,37 +21,31 @@
|
19
|
21
|
<div style="float:right">
|
20
|
22
|
<el-button type="primary" @click="onSearch">查询</el-button>
|
21
|
23
|
<el-button @click="onReset">重置</el-button>
|
22
|
|
- <el-button type="primary" icon="el-icon-plus" @click="handleAdd">添加游戏</el-button>
|
23
|
24
|
</div>
|
24
|
25
|
</el-card>
|
25
|
26
|
<el-table stripe :data="tableData" border style="width: 100%">
|
26
|
|
- <el-table-column prop="title" label="游戏名称" />
|
27
|
|
- <el-table-column prop="title" label="游戏类型" />
|
28
|
|
- <!-- <el-table-column prop="nickName" label="用户昵称" /> -->
|
29
|
|
- <el-table-column prop="score" label="答题分数" />
|
30
|
|
- <el-table-column prop="resultId" label="实例结果" />
|
31
|
|
- <el-table-column prop="createDate" label="测试时间">
|
|
27
|
+ <el-table-column prop="gameTitle" label="游戏名称" />
|
|
28
|
+ <el-table-column prop="resultMode" label="游戏类型">
|
32
|
29
|
<template slot-scope="scope">
|
33
|
30
|
{{
|
34
|
|
- scope.row.createDate.substr(0, 10)
|
|
31
|
+ scope.row.resultMode=='examination'?'测试':'匹配'
|
35
|
32
|
}}
|
36
|
33
|
</template>
|
37
|
34
|
</el-table-column>
|
38
|
|
- <el-table-column fixed="right" label="操作">
|
|
35
|
+ <el-table-column prop="nickName" label="用户昵称" />
|
|
36
|
+ <el-table-column prop="avatar" label="用户头像">
|
|
37
|
+ <template slot-scope="scope">
|
|
38
|
+ <el-image :src="scope.row.avatar" style="width: 100px; height: 100px" />
|
|
39
|
+ </template>
|
|
40
|
+ </el-table-column>
|
|
41
|
+ <el-table-column prop="phone" label="手机号" />
|
|
42
|
+ <el-table-column prop="score" label="答题分数" />
|
|
43
|
+ <el-table-column prop="characterName" label="实例结果" />
|
|
44
|
+ <el-table-column prop="createDate" label="参与时间">
|
39
|
45
|
<template slot-scope="scope">
|
40
|
|
- <el-link :underline="false" style="margin-right:1em" type="primary">
|
41
|
|
- <router-link
|
42
|
|
- :to="{name: 'gameEdit', query: { id: scope.row.gameId }}"
|
43
|
|
- >编辑</router-link>
|
44
|
|
- </el-link>
|
45
|
|
- <el-popconfirm
|
46
|
|
- icon="el-icon-info"
|
47
|
|
- icon-color="red"
|
48
|
|
- title="确定删除这个游戏吗?"
|
49
|
|
- @onConfirm="handleDelete(scope.row)"
|
50
|
|
- >
|
51
|
|
- <el-button slot="reference" type="text" style="color:red">删除</el-button>
|
52
|
|
- </el-popconfirm>
|
|
46
|
+ {{
|
|
47
|
+ scope.row.createDate.substr(0, 10)
|
|
48
|
+ }}
|
53
|
49
|
</template>
|
54
|
50
|
</el-table-column>
|
55
|
51
|
</el-table>
|
|
@@ -67,13 +63,15 @@
|
67
|
63
|
</div>
|
68
|
64
|
</template>
|
69
|
65
|
<script>
|
70
|
|
-import { getGameList, deleteGame } from '@/api/game'
|
|
66
|
+import { getGamePersonList } from '@/api/gamePerson'
|
71
|
67
|
|
72
|
68
|
export default {
|
73
|
69
|
data() {
|
74
|
70
|
return {
|
75
|
71
|
characterId: undefined,
|
76
|
|
- title: undefined,
|
|
72
|
+ gameTitle: undefined,
|
|
73
|
+ nickName: undefined,
|
|
74
|
+ phone: undefined,
|
77
|
75
|
daterange: undefined,
|
78
|
76
|
tableData: [],
|
79
|
77
|
endDate: undefined,
|
|
@@ -100,8 +98,10 @@ export default {
|
100
|
98
|
},
|
101
|
99
|
// 改变分页组件重新查询数据
|
102
|
100
|
changePagination() {
|
103
|
|
- getGameList({
|
104
|
|
- title: this.title,
|
|
101
|
+ getGamePersonList({
|
|
102
|
+ gameTitle: this.gameTitle,
|
|
103
|
+ nickName: this.nickName,
|
|
104
|
+ phone: this.phone,
|
105
|
105
|
startDate: this.startDate,
|
106
|
106
|
endDate: this.endDate,
|
107
|
107
|
pageNum: this.currentPage,
|
|
@@ -110,17 +110,11 @@ export default {
|
110
|
110
|
this.tableData = res.data.records
|
111
|
111
|
})
|
112
|
112
|
},
|
113
|
|
- handleAdd() {
|
114
|
|
- this.$router.push({ name: 'gameEdit' })
|
115
|
|
- },
|
116
|
|
- handleDelete(row) {
|
117
|
|
- deleteGame(row.gameId).then(() => {
|
118
|
|
- this.onSearch()
|
119
|
|
- })
|
120
|
|
- },
|
121
|
113
|
onSearch() {
|
122
|
|
- getGameList({
|
123
|
|
- title: this.title,
|
|
114
|
+ getGamePersonList({
|
|
115
|
+ gameTitle: this.gameTitle,
|
|
116
|
+ nickName: this.nickName,
|
|
117
|
+ phone: this.phone,
|
124
|
118
|
startDate: this.startDate,
|
125
|
119
|
endDate: this.endDate,
|
126
|
120
|
pageSize: this.pageSize
|
|
@@ -131,7 +125,9 @@ export default {
|
131
|
125
|
})
|
132
|
126
|
},
|
133
|
127
|
onReset() {
|
134
|
|
- this.title = undefined
|
|
128
|
+ this.gameTitle = undefined
|
|
129
|
+ this.nickName = undefined
|
|
130
|
+ this.phone = undefined
|
135
|
131
|
this.daterange = undefined
|
136
|
132
|
this.startDate = undefined
|
137
|
133
|
this.endDate = undefined
|