|
@@ -93,7 +93,17 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</template>
|
|
|
- <el-table-column label="每题分值" width="100">
|
|
|
+ <el-table-column prop="mainNumber" label="大题号" width="80">
|
|
|
+ <template slot-scope="scope" v-if="scope.row.mainFirstSub">
|
|
|
+ <span>{{ scope.row.mainNumber }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="subNumber"
|
|
|
+ label="小题号"
|
|
|
+ width="80"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column label="每题分值" width="120">
|
|
|
<template slot-scope="scope" v-if="scope.row.mainFirstSub">
|
|
|
<el-input-number
|
|
|
v-model="scoresPerTopic[scope.row.mainId]"
|
|
@@ -104,31 +114,54 @@
|
|
|
:step="0.5"
|
|
|
step-strictly
|
|
|
:controls="false"
|
|
|
+ placeholder="每题分值"
|
|
|
@change="(val) => scorePerTopicChange(val, scope.row)"
|
|
|
></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="mainNumber" label="大题号" width="80">
|
|
|
+ <el-table-column prop="totalScore" label="小题满分" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input-number
|
|
|
+ v-model="scope.row.totalScore"
|
|
|
+ class="width-full"
|
|
|
+ size="small"
|
|
|
+ :min="0.5"
|
|
|
+ :max="500"
|
|
|
+ :step="0.5"
|
|
|
+ step-strictly
|
|
|
+ :controls="false"
|
|
|
+ placeholder="小题分值"
|
|
|
+ ></el-input-number>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="每题间隔分" width="120">
|
|
|
<template slot-scope="scope" v-if="scope.row.mainFirstSub">
|
|
|
- <span>{{ scope.row.mainNumber }}</span>
|
|
|
+ <el-input-number
|
|
|
+ v-model="intervalScorePerTopic[scope.row.mainId]"
|
|
|
+ class="width-full"
|
|
|
+ size="small"
|
|
|
+ :min="0.5"
|
|
|
+ :max="500"
|
|
|
+ :step="0.5"
|
|
|
+ step-strictly
|
|
|
+ :controls="false"
|
|
|
+ placeholder="每题间隔分"
|
|
|
+ @change="(val) => intervalScorePerTopicChange(val, scope.row)"
|
|
|
+ ></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="subNumber"
|
|
|
- label="小题号"
|
|
|
- width="80"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column prop="totalScore" label="小题满分" width="105">
|
|
|
+ <el-table-column prop="intervalScore" label="间隔分" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input-number
|
|
|
- v-model="scope.row.totalScore"
|
|
|
- class="width-80"
|
|
|
+ v-model="scope.row.intervalScore"
|
|
|
+ class="width-full"
|
|
|
size="small"
|
|
|
:min="0.5"
|
|
|
:max="500"
|
|
|
:step="0.5"
|
|
|
step-strictly
|
|
|
:controls="false"
|
|
|
+ placeholder="小题间隔分"
|
|
|
></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -191,6 +224,7 @@ export default {
|
|
|
QUESTION_TYPE_LIST,
|
|
|
questionTypeDict: {},
|
|
|
scoresPerTopic: {},
|
|
|
+ intervalScorePerTopic: {},
|
|
|
loading: false,
|
|
|
};
|
|
|
},
|
|
@@ -218,7 +252,8 @@ export default {
|
|
|
|
|
|
let curMainNumber = null;
|
|
|
let curMainId = null;
|
|
|
- let scoresPerTopic = {};
|
|
|
+ let scoresPerTopic = {},
|
|
|
+ intervalScorePerTopic = {};
|
|
|
this.tableData = this.paperStructureInfo.map((item) => {
|
|
|
let nitem = {
|
|
|
...item,
|
|
@@ -230,13 +265,17 @@ export default {
|
|
|
curMainNumber = item.mainNumber;
|
|
|
curMainId = this.$randomCode();
|
|
|
scoresPerTopic[curMainNumber] = undefined;
|
|
|
+ intervalScorePerTopic[curMainNumber] = undefined;
|
|
|
nitem.mainFirstSub = true;
|
|
|
}
|
|
|
+ nitem.totalScore = nitem.totalScore || undefined;
|
|
|
+ nitem.intervalScore = nitem.intervalScore || undefined;
|
|
|
nitem.mainId = curMainId;
|
|
|
|
|
|
return nitem;
|
|
|
});
|
|
|
this.scoresPerTopic = scoresPerTopic;
|
|
|
+ this.intervalScorePerTopic = intervalScorePerTopic;
|
|
|
|
|
|
if (!this.tableData.length && this.structureCanEdit) {
|
|
|
this.createMain();
|
|
@@ -248,7 +287,7 @@ export default {
|
|
|
id: null,
|
|
|
key: this.$randomCode(),
|
|
|
mainId: null,
|
|
|
- isObjective: true,
|
|
|
+ objective: true,
|
|
|
mainNumber: 1,
|
|
|
subNumber: 1,
|
|
|
mainTitle: "",
|
|
@@ -368,7 +407,7 @@ export default {
|
|
|
.filter((item) => item.mainId === row.mainId)
|
|
|
.forEach((item) => {
|
|
|
item.questionType = curQt.code;
|
|
|
- item.isObjective = curQt.qType === "objective";
|
|
|
+ item.objective = curQt.qType === "objective";
|
|
|
item.optionCount = curQt.optionCount;
|
|
|
});
|
|
|
},
|
|
@@ -389,6 +428,14 @@ export default {
|
|
|
item.totalScore = val;
|
|
|
});
|
|
|
},
|
|
|
+ intervalScorePerTopicChange(val, row) {
|
|
|
+ if (!val) return;
|
|
|
+ this.tableData
|
|
|
+ .filter((item) => item.mainId === row.mainId)
|
|
|
+ .forEach((item) => {
|
|
|
+ item.intervalScore = val;
|
|
|
+ });
|
|
|
+ },
|
|
|
checkData() {
|
|
|
let errorMessages = [];
|
|
|
this.tableData.forEach((item) => {
|