李志伟 před 3 roky
rodič
revize
485f6b1881

+ 1
- 1
src/components/GameCharacter/edit.vue Zobrazit soubor

3
     <h2 style="text-align: center">
3
     <h2 style="text-align: center">
4
       特征实例{{ characterId ? "编辑" : "添加" }}
4
       特征实例{{ characterId ? "编辑" : "添加" }}
5
     </h2>
5
     </h2>
6
-    <el-form ref="form" :model="form" :rules="rules" label-width="150px" size="mini">
6
+    <el-form ref="form" :model="form" :rules="rules" label-width="150px">
7
       <el-form-item label="实例名称:" prop="name">
7
       <el-form-item label="实例名称:" prop="name">
8
         <el-input
8
         <el-input
9
           v-model="form.name"
9
           v-model="form.name"

+ 3
- 3
src/components/GameCharacter/index.vue Zobrazit soubor

1
 <template>
1
 <template>
2
   <div class="body" style="font-size:14px">
2
   <div class="body" style="font-size:14px">
3
-    <el-button type="primary" size="mini" style="float: right; margin-bottom: 20px;" @click="handleAdd">添加特征</el-button>
3
+    <el-button type="primary" style="float: right; margin-bottom: 20px;" @click="handleAdd">添加特征</el-button>
4
     <el-table stripe :data="tableData" border style="width: 100%">
4
     <el-table stripe :data="tableData" border style="width: 100%">
5
       <el-table-column prop="name" label="实例名称" />
5
       <el-table-column prop="name" label="实例名称" />
6
       <el-table-column prop="thumb" label="实例图片">
6
       <el-table-column prop="thumb" label="实例图片">
15
       </el-table-column>
15
       </el-table-column>
16
       <el-table-column fixed="right" label="操作">
16
       <el-table-column fixed="right" label="操作">
17
         <template slot-scope="scope">
17
         <template slot-scope="scope">
18
-          <el-button type="text" @click="handleEdit(scope.row)">编辑</el-button>
18
+          <el-button style="margin-right:1em" type="primary" @click="handleEdit(scope.row)">编辑</el-button>
19
           <el-popconfirm
19
           <el-popconfirm
20
             icon="el-icon-info"
20
             icon="el-icon-info"
21
             icon-color="red"
21
             icon-color="red"
22
             title="确定删除这个特征吗?"
22
             title="确定删除这个特征吗?"
23
             @onConfirm="handleDelete(scope.row)"
23
             @onConfirm="handleDelete(scope.row)"
24
           >
24
           >
25
-            <el-button slot="reference" type="text">删除</el-button>
25
+            <el-button slot="reference" type="danger">删除</el-button>
26
           </el-popconfirm>
26
           </el-popconfirm>
27
         </template>
27
         </template>
28
       </el-table-column>
28
       </el-table-column>

+ 4
- 5
src/components/Question/drawer.vue Zobrazit soubor

11
       <div class="demo-drawer__content">
11
       <div class="demo-drawer__content">
12
         <el-form ref="form" :model="form" :rules="rules" style="margin:20px">
12
         <el-form ref="form" :model="form" :rules="rules" style="margin:20px">
13
           <el-form-item label="答案:" prop="content" :label-width="formLabelWidth">
13
           <el-form-item label="答案:" prop="content" :label-width="formLabelWidth">
14
-            <el-input v-model="form.content" size="mini" placeholder="请输入答案(必填)">
15
-              <el-select slot="prepend" v-model="form.option" filterable allow-create default-first-option size="mini" style="width:100px" placeholder="请选择">
14
+            <el-input v-model="form.content" placeholder="请输入答案(必填)">
15
+              <el-select slot="prepend" v-model="form.option" filterable allow-create default-first-option style="width:100px" placeholder="请选择">
16
                 <el-option
16
                 <el-option
17
                   v-for="item in options"
17
                   v-for="item in options"
18
                   :key="item.value"
18
                   :key="item.value"
25
           <el-form-item v-if="resultMode === 'character_matched'" label="匹配特征:" :label-width="formLabelWidth">
25
           <el-form-item v-if="resultMode === 'character_matched'" label="匹配特征:" :label-width="formLabelWidth">
26
             <el-select
26
             <el-select
27
               v-model="form.characterList"
27
               v-model="form.characterList"
28
-              size="mini"
29
               multiple
28
               multiple
30
               filterable
29
               filterable
31
               default-first-option
30
               default-first-option
41
             </el-select>
40
             </el-select>
42
           </el-form-item>
41
           </el-form-item>
43
           <el-form-item style="text-align:center">
42
           <el-form-item style="text-align:center">
44
-            <el-button size="mini" @click="handleClose">取 消</el-button>
45
-            <el-button type="primary" size="mini" @click="onSubmit('form')">确 定</el-button>
43
+            <el-button @click="handleClose">取 消</el-button>
44
+            <el-button type="primary" @click="onSubmit('form')">确 定</el-button>
46
           </el-form-item>
45
           </el-form-item>
47
         </el-form>
46
         </el-form>
48
       </div>
47
       </div>

+ 1
- 1
src/components/Question/edit.vue Zobrazit soubor

3
     <h2 style="text-align: center">
3
     <h2 style="text-align: center">
4
       游戏题目{{ questionId ? "编辑" : "添加" }}
4
       游戏题目{{ questionId ? "编辑" : "添加" }}
5
     </h2>
5
     </h2>
6
-    <el-form ref="form" :rules="rules" :model="form" label-width="90px" size="mini">
6
+    <el-form ref="form" :rules="rules" :model="form" label-width="90px">
7
       <el-form-item label="题目:" prop="title">
7
       <el-form-item label="题目:" prop="title">
8
         <el-input v-model="form.title" placeholder="请输入实例名(必填)">
8
         <el-input v-model="form.title" placeholder="请输入实例名(必填)">
9
           <el-select slot="prepend" v-model="form.optType" style="width:100px" placeholder="请选择">
9
           <el-select slot="prepend" v-model="form.optType" style="width:100px" placeholder="请选择">

+ 1
- 1
src/components/Question/index.vue Zobrazit soubor

2
   <div class="body">
2
   <div class="body">
3
     <div style="line-height:30px; height:30px">
3
     <div style="line-height:30px; height:30px">
4
       题库列表
4
       题库列表
5
-      <el-button type="primary" size="mini" style="float: right; margin-bottom: 20px;" @click="handleAdd">添加问题</el-button>
5
+      <el-button type="primary" style="float: right; margin-bottom: 20px;" @click="handleAdd">添加问题</el-button>
6
     </div>
6
     </div>
7
     <ul style="list-style-type: none;margin:10px 0 10px -40px">
7
     <ul style="list-style-type: none;margin:10px 0 10px -40px">
8
       <li v-for="item,index in tableData" :key="index" class="questionli" @click="handleEdit(item)">
8
       <li v-for="item,index in tableData" :key="index" class="questionli" @click="handleEdit(item)">

+ 1
- 1
src/views/gameManage/edit.vue Zobrazit soubor

3
     <el-tabs v-model="activeName">
3
     <el-tabs v-model="activeName">
4
       <el-tab-pane label="游戏详情" name="game">
4
       <el-tab-pane label="游戏详情" name="game">
5
         <h2 style="text-align: center">游戏{{ gameId ? "编辑" : "新增" }}</h2>
5
         <h2 style="text-align: center">游戏{{ gameId ? "编辑" : "新增" }}</h2>
6
-        <el-form ref="form" :rules="rules" class="gameForm" :model="gameForm" label-width="150px" size="mini">
6
+        <el-form ref="form" :rules="rules" class="gameForm" :model="gameForm" label-width="150px">
7
           <el-form-item label="游戏名称:" prop="title">
7
           <el-form-item label="游戏名称:" prop="title">
8
             <el-input v-model="gameForm.title" />
8
             <el-input v-model="gameForm.title" />
9
           </el-form-item>
9
           </el-form-item>

+ 36
- 35
src/views/gameManage/index.vue Zobrazit soubor

2
   <div class="body" style="font-size:14px">
2
   <div class="body" style="font-size:14px">
3
     <el-card class="box-card">
3
     <el-card class="box-card">
4
       游戏名称:
4
       游戏名称:
5
-      <el-input v-model="title" size="mini" style="width: 200px; margin-right: 20px" />创建时间:
5
+      <el-input v-model="title" style="width: 200px; margin-right: 20px" />创建时间:
6
       <el-date-picker
6
       <el-date-picker
7
         v-model="daterange"
7
         v-model="daterange"
8
-        size="mini"
9
         type="daterange"
8
         type="daterange"
10
         range-separator="至"
9
         range-separator="至"
11
         start-placeholder="开始日期"
10
         start-placeholder="开始日期"
14
         style="margin-right: 20px"
13
         style="margin-right: 20px"
15
         @change="dateChange"
14
         @change="dateChange"
16
       />
15
       />
17
-      <el-button type="primary" size="mini" @click="onSearch">查询</el-button>
18
-      <el-button size="mini" @click="onReset">重置</el-button>
19
-      <el-button type="primary" size="mini" @click="handleAdd">添加游戏</el-button>
16
+      <div style="float:right">
17
+        <el-button type="primary" @click="onSearch">查询</el-button>
18
+        <el-button @click="onReset">重置</el-button>
19
+        <el-button type="primary" @click="handleAdd">添加游戏</el-button>
20
+      </div>
20
     </el-card>
21
     </el-card>
21
     <el-table stripe :data="tableData" border style="width: 100%">
22
     <el-table stripe :data="tableData" border style="width: 100%">
22
       <el-table-column prop="title" label="游戏名称" />
23
       <el-table-column prop="title" label="游戏名称" />
28
       <el-table-column prop="createDate" label="创建时间">
29
       <el-table-column prop="createDate" label="创建时间">
29
         <template slot-scope="scope">
30
         <template slot-scope="scope">
30
           {{
31
           {{
31
-          scope.row.createDate.substr(0, 10)
32
+            scope.row.createDate.substr(0, 10)
32
           }}
33
           }}
33
         </template>
34
         </template>
34
       </el-table-column>
35
       </el-table-column>
35
       <el-table-column fixed="right" label="操作">
36
       <el-table-column fixed="right" label="操作">
36
         <template slot-scope="scope">
37
         <template slot-scope="scope">
37
-          <el-button type="text" @click="handleEdit(scope.row)">编辑</el-button>
38
+          <el-button type="primary" style="margin-right:1em" @click="handleEdit(scope.row)">编辑</el-button>
38
           <el-popconfirm
39
           <el-popconfirm
39
             icon="el-icon-info"
40
             icon="el-icon-info"
40
             icon-color="red"
41
             icon-color="red"
41
             title="确定删除这个游戏吗?"
42
             title="确定删除这个游戏吗?"
42
             @onConfirm="handleDelete(scope.row)"
43
             @onConfirm="handleDelete(scope.row)"
43
           >
44
           >
44
-            <el-button slot="reference" type="text">删除</el-button>
45
+            <el-button slot="reference" type="danger">删除</el-button>
45
           </el-popconfirm>
46
           </el-popconfirm>
46
         </template>
47
         </template>
47
       </el-table-column>
48
       </el-table-column>
60
   </div>
61
   </div>
61
 </template>
62
 </template>
62
 <script>
63
 <script>
63
-import { getGameList, deleteGame } from '@/api/game';
64
+import { getGameList, deleteGame } from '@/api/game'
64
 
65
 
65
 export default {
66
 export default {
66
   data() {
67
   data() {
75
       pageSize: 10,
76
       pageSize: 10,
76
       currentPage: 1,
77
       currentPage: 1,
77
       gameTotal: 0 // 条目总数
78
       gameTotal: 0 // 条目总数
78
-    };
79
+    }
79
   },
80
   },
80
   mounted() {
81
   mounted() {
81
-    this.onSearch();
82
+    this.onSearch()
82
   },
83
   },
83
   methods: {
84
   methods: {
84
     // 改变每页显示条数
85
     // 改变每页显示条数
85
     handleSizeChange(val) {
86
     handleSizeChange(val) {
86
-      this.pageSize = val;
87
-      this.changePagination();
87
+      this.pageSize = val
88
+      this.changePagination()
88
     },
89
     },
89
     // 改变页码
90
     // 改变页码
90
     handleCurrentChange(val) {
91
     handleCurrentChange(val) {
91
-      this.currentPage = val;
92
-      this.changePagination();
92
+      this.currentPage = val
93
+      this.changePagination()
93
     },
94
     },
94
     // 改变分页组件重新查询数据
95
     // 改变分页组件重新查询数据
95
     changePagination() {
96
     changePagination() {
100
         pageNum: this.currentPage,
101
         pageNum: this.currentPage,
101
         pageSize: this.pageSize
102
         pageSize: this.pageSize
102
       }).then((res) => {
103
       }).then((res) => {
103
-        this.tableData = res.data.records;
104
-      });
104
+        this.tableData = res.data.records
105
+      })
105
     },
106
     },
106
     handleAdd() {
107
     handleAdd() {
107
-      this.$router.push({ name: 'gameEdit' });
108
+      this.$router.push({ name: 'gameEdit' })
108
     },
109
     },
109
     handleEdit(row) {
110
     handleEdit(row) {
110
       this.$router.push({
111
       this.$router.push({
111
         name: 'gameEdit',
112
         name: 'gameEdit',
112
         query: { id: row.gameId }
113
         query: { id: row.gameId }
113
-      });
114
+      })
114
     },
115
     },
115
     handleDelete(row) {
116
     handleDelete(row) {
116
       deleteGame(row.gameId).then(() => {
117
       deleteGame(row.gameId).then(() => {
117
-        this.onSearch();
118
-      });
118
+        this.onSearch()
119
+      })
119
     },
120
     },
120
     onSearch() {
121
     onSearch() {
121
       getGameList({
122
       getGameList({
124
         endDate: this.endDate,
125
         endDate: this.endDate,
125
         pageSize: this.pageSize
126
         pageSize: this.pageSize
126
       }).then((res) => {
127
       }).then((res) => {
127
-        this.tableData = res.data.records;
128
-        this.gameTotal = res.data.total;
129
-        this.pageSize = res.data.size;
130
-      });
128
+        this.tableData = res.data.records
129
+        this.gameTotal = res.data.total
130
+        this.pageSize = res.data.size
131
+      })
131
     },
132
     },
132
     onReset() {
133
     onReset() {
133
-      this.title = undefined;
134
-      this.daterange = undefined;
135
-      this.startDate = undefined;
136
-      this.endDate = undefined;
137
-      this.currentPage = 1;
138
-      this.pageSize = 10;
139
-      this.onSearch();
134
+      this.title = undefined
135
+      this.daterange = undefined
136
+      this.startDate = undefined
137
+      this.endDate = undefined
138
+      this.currentPage = 1
139
+      this.pageSize = 10
140
+      this.onSearch()
140
     },
141
     },
141
     dateChange(val) {
142
     dateChange(val) {
142
-      this.startDate = this.daterange[0];
143
-      this.endDate = this.daterange[1];
143
+      this.startDate = this.daterange[0]
144
+      this.endDate = this.daterange[1]
144
     }
145
     }
145
   }
146
   }
146
-};
147
+}
147
 </script>
148
 </script>
148
 <style>
149
 <style>
149
 </style>
150
 </style>