提交 22ece323 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 33fcc3e0
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
"blueimp-md5": "^2.19.0", "blueimp-md5": "^2.19.0",
"clipboard": "^2.0.10", "clipboard": "^2.0.10",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",
"lodash": "^4.17.21",
"query-string": "^7.1.1", "query-string": "^7.1.1",
"vue": "^2.6.14", "vue": "^2.6.14",
"vue-router": "^3.5.3", "vue-router": "^3.5.3",
...@@ -3173,8 +3174,8 @@ ...@@ -3173,8 +3174,8 @@
}, },
"node_modules/lodash": { "node_modules/lodash": {
"version": "4.17.21", "version": "4.17.21",
"dev": true, "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"license": "MIT" "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
}, },
"node_modules/lodash.debounce": { "node_modules/lodash.debounce": {
"version": "4.0.8", "version": "4.0.8",
...@@ -6847,7 +6848,8 @@ ...@@ -6847,7 +6848,8 @@
}, },
"lodash": { "lodash": {
"version": "4.17.21", "version": "4.17.21",
"dev": true "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
}, },
"lodash.debounce": { "lodash.debounce": {
"version": "4.0.8", "version": "4.0.8",
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"blueimp-md5": "^2.19.0", "blueimp-md5": "^2.19.0",
"clipboard": "^2.0.10", "clipboard": "^2.0.10",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",
"lodash": "^4.17.21",
"query-string": "^7.1.1", "query-string": "^7.1.1",
"vue": "^2.6.14", "vue": "^2.6.14",
"vue-router": "^3.5.3", "vue-router": "^3.5.3",
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
:multiple="multiple" :multiple="multiple"
:value="selectValue" :value="selectValue"
clearable clearable
collapse-tags
@clear="handleClear" @clear="handleClear"
@remove-tag="handleRemoveTag" @remove-tag="handleRemoveTag"
ref="select" ref="select"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<!-- 自动组卷规则 --> <!-- 自动组卷规则 -->
<el-form-item label="自动组卷规则:"> <el-form-item label="自动组卷规则:">
<el-table ref="mytable" :data="questionList" style="width: 100%"> <el-table ref="mytable" :data="questionList" style="width: 100%">
<el-table-column align="center" label="题目类型"> <el-table-column align="center" label="题目类型" width="140">
<template slot-scope="{ row, $index }"> <template slot-scope="{ row, $index }">
<el-select v-model="row.question_type" @change="getQuestionMaxCount($index, row)"> <el-select v-model="row.question_type" @change="getQuestionMaxCount($index, row)">
<el-option <el-option
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="难度"> <el-table-column align="center" label="难度" width="140">
<template slot-scope="{ row, $index }"> <template slot-scope="{ row, $index }">
<el-select v-model="row.question_difficulty" @change="getQuestionMaxCount($index, row)"> <el-select v-model="row.question_difficulty" @change="getQuestionMaxCount($index, row)">
<el-option <el-option
...@@ -44,28 +44,35 @@ ...@@ -44,28 +44,35 @@
multiple multiple
v-model="row.question_categories" v-model="row.question_categories"
@change="getQuestionMaxCount($index, row)" @change="getQuestionMaxCount($index, row)"
style="width: 100%"
></question-type-treeselect> ></question-type-treeselect>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="数量"> <el-table-column align="center" label="数量" width="140">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-input-number <el-input-number
v-model="row.question_num" v-model="row.question_num"
:min="0" :min="0"
:max="row.max_question_num" :max="row.max_question_num"
step-strictly step-strictly
style="width: 100%"
></el-input-number> ></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="每题分值"> <el-table-column align="center" label="每题分值" width="140">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-input-number v-model="row.question_score" :min="0" step-strictly></el-input-number> <el-input-number
v-model="row.question_score"
:min="0"
step-strictly
style="width: 100%"
></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作"> <el-table-column align="center" label="操作" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
style="margin-left: 10px" style="margin-left: 10px"
...@@ -121,6 +128,7 @@ ...@@ -121,6 +128,7 @@
</template> </template>
<script> <script>
import { cloneDeep } from 'lodash'
import QuestionTypeTreeselect from '@/components/base/QuestionTypeTreeselect.vue' import QuestionTypeTreeselect from '@/components/base/QuestionTypeTreeselect.vue'
import { getQuestionCount, updatePaperRules } from '../api.js' import { getQuestionCount, updatePaperRules } from '../api.js'
export default { export default {
...@@ -169,7 +177,7 @@ export default { ...@@ -169,7 +177,7 @@ export default {
this.form = Object.assign({}, this.form, data.paper_contents) this.form = Object.assign({}, this.form, data.paper_contents)
} }
if (data.paper_contents && data.paper_contents.rules) { if (data.paper_contents && data.paper_contents.rules) {
this.questionList = data.paper_contents.rules.slice() this.questionList = cloneDeep(data.paper_contents.rules)
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论