浏览代码

游戏模块v1.6

李志伟 3 年前
父节点
当前提交
4e11cb303e
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 5
    5
      src/components/Question/edit.vue
  2. 1
    1
      src/components/Question/index.vue

+ 5
- 5
src/components/Question/edit.vue 查看文件

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="请选择">
10
-            <el-option label="单选题" value="1" />
11
-            <el-option label="多选题" value="2" />
12
-            <el-option label="判断题" value="3" />
10
+            <el-option label="单选题" value="single" />
11
+            <el-option label="多选题" value="many" />
12
+            <el-option label="判断题" value="judgment" />
13
           </el-select>
13
           </el-select>
14
         </el-input>
14
         </el-input>
15
       </el-form-item>
15
       </el-form-item>
194
               }
194
               }
195
               UpdateQuestion(data, this.questionId).then((res) => {
195
               UpdateQuestion(data, this.questionId).then((res) => {
196
                 this.$message('修改问题成功')
196
                 this.$message('修改问题成功')
197
-                // 告诉父页面实例表需要刷新并且关闭当前组件
197
+                // 告诉父页面问题表需要刷新并且关闭当前组件
198
                 this.$emit('handleRefreshQuestion', true)
198
                 this.$emit('handleRefreshQuestion', true)
199
               })
199
               })
200
             } else {
200
             } else {
201
               saveQuestion(data).then((res) => {
201
               saveQuestion(data).then((res) => {
202
                 this.$message('添加问题成功')
202
                 this.$message('添加问题成功')
203
-                // 告诉父页面实例表需要刷新并且关闭当前组件
203
+                // 告诉父页面问题表需要刷新并且关闭当前组件
204
                 this.$emit('handleRefreshQuestion', true)
204
                 this.$emit('handleRefreshQuestion', true)
205
                 this.$emit('handleEditQuestion', res.data.questionId)
205
                 this.$emit('handleEditQuestion', res.data.questionId)
206
               })
206
               })

+ 1
- 1
src/components/Question/index.vue 查看文件

13
       <ul style="list-style-type: none;margin:24px 0 0 -40px">
13
       <ul style="list-style-type: none;margin:24px 0 0 -40px">
14
         <li v-for="item,index in tableData" :key="index" class="questionli" @click="handleEdit(item)">
14
         <li v-for="item,index in tableData" :key="index" class="questionli" @click="handleEdit(item)">
15
           <span style="width:45px">第{{ index+1 }}题</span>
15
           <span style="width:45px">第{{ index+1 }}题</span>
16
-          <span style="width:45px">{{ item.optType === '1'?'单选题':item.optType==='2'?'多选题':'判断题' }}</span>
16
+          <span style="width:45px">{{ item.optType === 'single'?'单选题':item.optType==='many'?'多选题':'判断题' }}</span>
17
           <span style="flex:1">{{ item.title }}</span>
17
           <span style="flex:1">{{ item.title }}</span>
18
           <el-popconfirm
18
           <el-popconfirm
19
             style="width:30px"
19
             style="width:30px"