|
@@ -40,8 +40,8 @@
|
|
|
ref="TableList"
|
|
|
:data="tableData"
|
|
|
:row-class-name="getRowClassName"
|
|
|
- border
|
|
|
:height="tableHeight"
|
|
|
+ border
|
|
|
>
|
|
|
<el-table-column width="50" align="center">
|
|
|
<template slot-scope="scope" v-if="scope.row.mainFirstSub">
|
|
@@ -75,31 +75,28 @@
|
|
|
></el-table-column>
|
|
|
<el-table-column prop="totalScore" label="小题满分" width="85">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="答案" width="140px" class-name="answer-column">
|
|
|
- <div
|
|
|
- slot-scope="scope"
|
|
|
- :class="['el-form-item', { 'is-error': scope.row.answerError }]"
|
|
|
- >
|
|
|
- <div class="el-form-item__content">
|
|
|
- <el-input
|
|
|
- v-model.trim="scope.row.answer"
|
|
|
- :placeholder="
|
|
|
- scope.row.type === 3 ? 'A:正确,B:错误' : '请输入答案'
|
|
|
- "
|
|
|
- :maxlength="scope.row.optionCount"
|
|
|
- clearable
|
|
|
- @change="answerChange(scope.row)"
|
|
|
- ></el-input>
|
|
|
- <div v-if="scope.row.answerError" class="el-form-item__error">
|
|
|
- {{ scope.row.answerError }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <el-table-column label="答案" width="140px" class-name="input-column">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input
|
|
|
+ v-model.trim="scope.row.answer"
|
|
|
+ :placeholder="
|
|
|
+ scope.row.type === 3 ? 'A:正确,B:错误' : '请输入答案'
|
|
|
+ "
|
|
|
+ :maxlength="scope.row.optionCount"
|
|
|
+ size="mini"
|
|
|
+ clearable
|
|
|
+ :class="{ 'is-error': scope.row.answerError }"
|
|
|
+ @change="answerChange(scope.row)"
|
|
|
+ ></el-input>
|
|
|
+ <p v-if="scope.row.answerError" class="color-danger error-tips">
|
|
|
+ {{ scope.row.answerError }}
|
|
|
+ </p>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="判分策略"
|
|
|
- width="270px"
|
|
|
- class-name="answer-column"
|
|
|
+ width="250px"
|
|
|
+ class-name="input-column"
|
|
|
>
|
|
|
<template slot="header">
|
|
|
<span>判分策略</span>
|
|
@@ -121,7 +118,8 @@
|
|
|
<template v-if="scope.row.questionType === 2">
|
|
|
<el-select
|
|
|
v-model="scope.row.objectivePolicy"
|
|
|
- style="width: 120px"
|
|
|
+ style="width: 130px"
|
|
|
+ size="mini"
|
|
|
@change="objectivePolicyChange(scope.row)"
|
|
|
>
|
|
|
<el-option
|
|
@@ -133,39 +131,29 @@
|
|
|
</el-select>
|
|
|
<div
|
|
|
v-if="scope.row.objectivePolicy === 'LEAK'"
|
|
|
- :class="[
|
|
|
- 'el-form-item',
|
|
|
- { 'is-error': scope.row.objectivePolicyError },
|
|
|
- ]"
|
|
|
+ :class="[{ 'is-error': scope.row.objectivePolicyError }]"
|
|
|
style="display: inline-block"
|
|
|
>
|
|
|
- <div class="el-form-item__content">
|
|
|
- <el-input-number
|
|
|
- v-model="scope.row.objectivePolicyScore"
|
|
|
- :disabled="scope.row.answer.length <= 1"
|
|
|
- style="width: 110px; margin-left: 5px"
|
|
|
- size="small"
|
|
|
- :min="0"
|
|
|
- :max="100"
|
|
|
- :step="0.1"
|
|
|
- step-strictly
|
|
|
- :controls="false"
|
|
|
- placeholder="每个选项得分"
|
|
|
- @change="objectivePolicyScoreChange(scope.row)"
|
|
|
- ></el-input-number>
|
|
|
- <div
|
|
|
- v-if="scope.row.objectivePolicyError"
|
|
|
- class="el-form-item__error"
|
|
|
- style="
|
|
|
- right: 0;
|
|
|
- left: auto;
|
|
|
- width: 210px;
|
|
|
- text-align: right;
|
|
|
- "
|
|
|
- >
|
|
|
- {{ scope.row.objectivePolicyError }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <el-input-number
|
|
|
+ v-model="scope.row.objectivePolicyScore"
|
|
|
+ :disabled="!scope.row.answer || scope.row.answer.length <= 1"
|
|
|
+ style="width: 110px; margin-left: 5px"
|
|
|
+ size="mini"
|
|
|
+ :min="0"
|
|
|
+ :max="100"
|
|
|
+ :step="0.1"
|
|
|
+ step-strictly
|
|
|
+ :controls="false"
|
|
|
+ placeholder="每个选项得分"
|
|
|
+ @change="objectivePolicyScoreChange(scope.row)"
|
|
|
+ ></el-input-number>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="scope.row.objectivePolicyError"
|
|
|
+ class="color-danger error-tips"
|
|
|
+ style="text-align: right"
|
|
|
+ >
|
|
|
+ {{ scope.row.objectivePolicyError }}
|
|
|
</div>
|
|
|
</template>
|
|
|
<template
|
|
@@ -175,7 +163,8 @@
|
|
|
>
|
|
|
<el-select
|
|
|
v-model="scope.row.objectivePolicy"
|
|
|
- style="width: 120px"
|
|
|
+ style="width: 130px"
|
|
|
+ size="mini"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(val, key) in QUESTION_SCORE_TYPE_SIMPLE"
|
|
@@ -319,7 +308,7 @@ export default {
|
|
|
this.tableData = this.tableDict[this.curPaperType];
|
|
|
},
|
|
|
getRowClassName({ row }) {
|
|
|
- let classNames = [];
|
|
|
+ let classNames = ["row-vertical-top"];
|
|
|
if (row.mainFirstSub) {
|
|
|
classNames.push("row-main-first-sub");
|
|
|
}
|
|
@@ -416,6 +405,7 @@ export default {
|
|
|
},
|
|
|
objectivePolicyChange(row) {
|
|
|
row.objectivePolicyScore = undefined;
|
|
|
+ row.objectivePolicyError = "";
|
|
|
},
|
|
|
async save() {
|
|
|
if (!this.checkData()) return;
|