fix(frontend): remove interview sample fill actions
This commit is contained in:
@@ -105,21 +105,13 @@
|
|||||||
<div class="answer-box">
|
<div class="answer-box">
|
||||||
<div class="answer-head">
|
<div class="answer-head">
|
||||||
<span>候选人回答 · {{ activeQuestion.scenario }}</span>
|
<span>候选人回答 · {{ activeQuestion.scenario }}</span>
|
||||||
<el-button text type="danger" @click="fillSampleAnswer">填入参考回答</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
<el-input
|
<el-input v-model="answers[activeQuestion.id]" type="textarea" :rows="6" resize="none" placeholder="输入候选人真实回答" />
|
||||||
v-model="answers[activeQuestion.id]"
|
|
||||||
type="textarea"
|
|
||||||
:rows="6"
|
|
||||||
resize="none"
|
|
||||||
placeholder="输入候选人真实回答,或点击“填入参考回答”快速推进测试"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="action-row question-actions">
|
<div class="action-row question-actions">
|
||||||
<el-button @click="moveQuestion(-1)">上一题</el-button>
|
<el-button @click="moveQuestion(-1)">上一题</el-button>
|
||||||
<el-button @click="moveQuestion(1)">下一题</el-button>
|
<el-button @click="moveQuestion(1)">下一题</el-button>
|
||||||
<el-button @click="fillAllSampleAnswers">填满参考回答</el-button>
|
|
||||||
<el-button @click="saveDraft">保存草稿</el-button>
|
<el-button @click="saveDraft">保存草稿</el-button>
|
||||||
<el-button type="danger" :disabled="!canScore" @click="finishScore">完成评分</el-button>
|
<el-button type="danger" :disabled="!canScore" @click="finishScore">完成评分</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -518,17 +510,6 @@ const generateQuestions = async () => {
|
|||||||
generated.value = true;
|
generated.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const fillSampleAnswer = () => {
|
|
||||||
answers[activeQuestion.value.id] = activeQuestion.value.sampleAnswer;
|
|
||||||
};
|
|
||||||
|
|
||||||
const fillAllSampleAnswers = () => {
|
|
||||||
questions.value.forEach((question) => {
|
|
||||||
answers[question.id] = question.sampleAnswer;
|
|
||||||
});
|
|
||||||
ElMessage.success('已填入全部参考回答');
|
|
||||||
};
|
|
||||||
|
|
||||||
const moveQuestion = (offset: number) => {
|
const moveQuestion = (offset: number) => {
|
||||||
const index = questions.value.findIndex((question) => question.id === activeQuestion.value.id);
|
const index = questions.value.findIndex((question) => question.id === activeQuestion.value.id);
|
||||||
const nextIndex = Math.min(Math.max(index + offset, 0), questions.value.length - 1);
|
const nextIndex = Math.min(Math.max(index + offset, 0), questions.value.length - 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user