|
|
@@ -322,14 +322,8 @@ const onTemplateChanged=(templateData: any)=>{
|
|
|
console.log('模板更换成功', templateData)
|
|
|
currentTemplateId.value = templateData.id
|
|
|
currentTemplateName.value = templateData.templateName
|
|
|
- templateQuestionCount.value = templateData.questionEnd || 0
|
|
|
- templateQuestionStart.value = templateData.questionStart || 1
|
|
|
- templateQuestionEnd.value = templateData.questionEnd || 0
|
|
|
- // 更新 store 中的 templateId
|
|
|
- if (examStore.currentExam) {
|
|
|
- examStore.currentExam.templateId = templateData.id
|
|
|
- }
|
|
|
- // 重新获取试题列表
|
|
|
+ // 重新获取模板信息(含题目起止范围)并刷新试题列表
|
|
|
+ GetTemplateInfo()
|
|
|
GetSmartQuestionList()
|
|
|
}
|
|
|
|
|
|
@@ -765,10 +759,10 @@ const CalculateTableHeight = () => {
|
|
|
tableHeight.value = containerHeight - offset
|
|
|
}
|
|
|
|
|
|
-//获取模板信息
|
|
|
+//获取模板信息
|
|
|
const GetTemplateInfo=()=>{
|
|
|
const params={
|
|
|
- templateId:templateId.value,
|
|
|
+ templateId:currentTemplateId.value,
|
|
|
};
|
|
|
getTemplateInfo(params).then((res) => {
|
|
|
console.log("打印获取模板信息结果",res)
|
|
|
@@ -780,8 +774,6 @@ const GetTemplateInfo=()=>{
|
|
|
queryParams.value.end=res.data.questionEnd;//题目结束
|
|
|
queryParams.value.start=res.data.questionStart;//题目开始
|
|
|
currentTemplateName.value=res.data.templateName;//当前模板名称
|
|
|
- currentTemplateId.value=res.data.id;//当前模板ID
|
|
|
-
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -876,6 +868,7 @@ onMounted(() => {
|
|
|
scanClientConnected.value = isOnline;
|
|
|
// console.log('扫描客户端连接状态:', isOnline, '版本号:', clientVersion);
|
|
|
});
|
|
|
+ currentTemplateId.value=examStore.currentExam.templateId;
|
|
|
ConfigRequestUrlByEnv();//配置请求地址
|
|
|
GetScanAnswerStates();//获取扫描答案状态
|
|
|
// GetSmartQuestionList();
|