|
@@ -8,7 +8,11 @@
|
8
|
8
|
<el-input v-model="gameForm.title" />
|
9
|
9
|
</el-form-item>
|
10
|
10
|
<el-form-item label="游戏图标:">
|
11
|
|
- <UploadImage :icon="gameForm.gameImage" @handleChange="handleChange" @handleDeleteIcon="handleDeleteIcon" />
|
|
11
|
+ <UploadImage
|
|
12
|
+ :icon="gameForm.gameImage"
|
|
13
|
+ @handleChange="handleChange"
|
|
14
|
+ @handleDeleteIcon="handleDeleteIcon"
|
|
15
|
+ />
|
12
|
16
|
</el-form-item>
|
13
|
17
|
<el-form-item label="游戏类型:" prop="resultMode">
|
14
|
18
|
<el-select
|
|
@@ -32,16 +36,12 @@
|
32
|
36
|
</el-form-item>
|
33
|
37
|
</el-form>
|
34
|
38
|
</el-tab-pane>
|
35
|
|
- <el-tab-pane
|
36
|
|
- label="关联特征"
|
37
|
|
- name="game-character"
|
38
|
|
- :disabled="gameId ? false : true"
|
39
|
|
- >
|
|
39
|
+ <el-tab-pane label="关联特征" name="game-character" :disabled="gameId ? false : true">
|
40
|
40
|
<el-row :gutter="20" style="padding-top: 20px">
|
41
|
41
|
<el-col :span="12">
|
42
|
42
|
<GameCharacter
|
43
|
43
|
ref="GameCharacter"
|
44
|
|
- :gameId='gameId'
|
|
44
|
+ :gameId="gameId"
|
45
|
45
|
@handleAddGameCharacter="characterId = undefined"
|
46
|
46
|
@handleCloseGameCharacter="characterId = undefined"
|
47
|
47
|
@handleEditGameCharacter="handleEditGameCharacter"
|
|
@@ -49,24 +49,20 @@
|
49
|
49
|
</el-col>
|
50
|
50
|
<el-col :span="12">
|
51
|
51
|
<GameCharacterEdit
|
52
|
|
- :characterId='characterId'
|
53
|
|
- :gameId='gameId'
|
|
52
|
+ :characterId="characterId"
|
|
53
|
+ :gameId="gameId"
|
54
|
54
|
@handleRefreshGameCharacter="handleRefreshGameCharacter"
|
55
|
55
|
@handleEditGameCharacter="handleEditGameCharacter"
|
56
|
56
|
/>
|
57
|
57
|
</el-col>
|
58
|
58
|
</el-row>
|
59
|
59
|
</el-tab-pane>
|
60
|
|
- <el-tab-pane
|
61
|
|
- label="游戏题库"
|
62
|
|
- name="question"
|
63
|
|
- :disabled="gameId ? false : true"
|
64
|
|
- >
|
|
60
|
+ <el-tab-pane label="游戏题库" name="question" :disabled="gameId ? false : true">
|
65
|
61
|
<el-row :gutter="20" style="padding-top: 20px">
|
66
|
62
|
<el-col :span="12">
|
67
|
63
|
<Question
|
68
|
64
|
ref="Question"
|
69
|
|
- :gameId='gameId'
|
|
65
|
+ :gameId="gameId"
|
70
|
66
|
@handleAddQuestion="questionId = undefined"
|
71
|
67
|
@handleCloseQuestion="questionId = undefined"
|
72
|
68
|
@handleEditQuestion="handleEditQuestion"
|
|
@@ -105,10 +101,10 @@ export default {
|
105
|
101
|
data() {
|
106
|
102
|
return {
|
107
|
103
|
rules: {
|
108
|
|
- title: [
|
109
|
|
- { required: true, message: '请输入游戏名称', trigger: 'blur' }
|
110
|
|
- ],
|
111
|
|
- resultMode: [{ required: true, message: '请选择游戏类型', trigger: 'blur' }]
|
|
104
|
+ title: [{ required: true, message: '请输入游戏名称', trigger: 'blur' }],
|
|
105
|
+ resultMode: [
|
|
106
|
+ { required: true, message: '请选择游戏类型', trigger: 'blur' }
|
|
107
|
+ ]
|
112
|
108
|
},
|
113
|
109
|
gameForm: {
|
114
|
110
|
title: undefined,
|
|
@@ -134,7 +130,8 @@ export default {
|
134
|
130
|
watch: {
|
135
|
131
|
'$route.query.id': {
|
136
|
132
|
handler(val) {
|
137
|
|
- if (val) { // 有值代表是编辑状态 查询详情 没有值就是新增
|
|
133
|
+ if (val) {
|
|
134
|
+ // 有值代表是编辑状态 查询详情 没有值就是新增
|
138
|
135
|
this.gameId = val
|
139
|
136
|
getGameDetail(val).then((res) => {
|
140
|
137
|
this.gameForm = res.data
|
|
@@ -199,7 +196,7 @@ export default {
|
199
|
196
|
}
|
200
|
197
|
</script>
|
201
|
198
|
<style scoped>
|
202
|
|
-.gameForm{
|
|
199
|
+.gameForm {
|
203
|
200
|
width: 700px;
|
204
|
201
|
margin: auto;
|
205
|
202
|
}
|