提交 af9c74f4 authored 作者: matian's avatar matian

Merge remote-tracking branch 'origin/master'

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