|
@@ -288,9 +288,9 @@ export default {
|
|
|
getNewRow(val) {
|
|
|
return this.$objAssign(
|
|
|
{
|
|
|
- id: null,
|
|
|
+ id: this.$randomCode(),
|
|
|
key: this.$randomCode(),
|
|
|
- mainId: null,
|
|
|
+ mainId: this.$randomCode(),
|
|
|
objective: true,
|
|
|
mainNumber: 1,
|
|
|
subNumber: 1,
|
|
@@ -333,7 +333,7 @@ export default {
|
|
|
},
|
|
|
toAddMain(row) {
|
|
|
const startPos = this.tableData.findIndex((item) => item.id === row.id);
|
|
|
- let nextMainStartPos = this.getNextMainStartPos(startPos, row.mainId);
|
|
|
+ const nextMainStartPos = this.getNextMainStartPos(startPos, row.mainId);
|
|
|
this.tableData.splice(
|
|
|
nextMainStartPos,
|
|
|
0,
|
|
@@ -403,7 +403,7 @@ export default {
|
|
|
},
|
|
|
qTypeChange(row) {
|
|
|
const curQt = this.QUESTION_TYPE_LIST.find(
|
|
|
- (item) => item.code === row.type
|
|
|
+ (item) => item.code === row.questionType
|
|
|
);
|
|
|
if (!curQt) return;
|
|
|
|
|
@@ -413,6 +413,10 @@ export default {
|
|
|
item.questionType = curQt.code;
|
|
|
item.objective = curQt.qType === "objective";
|
|
|
item.optionCount = curQt.optionCount;
|
|
|
+ if (item.objective) {
|
|
|
+ item.intervalScore = undefined;
|
|
|
+ this.intervalScorePerTopic[row.mainId] = undefined;
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
optionCountChange(row) {
|