在windows上修复一些bug
This commit is contained in:
parent
0de17d0251
commit
e55476133f
@ -84,7 +84,6 @@ function createWindow() {
|
|||||||
preload: path.join(__dirname, "../electron/preload.js"),
|
preload: path.join(__dirname, "../electron/preload.js"),
|
||||||
nodeIntegration: false,
|
nodeIntegration: false,
|
||||||
contextIsolation: true,
|
contextIsolation: true,
|
||||||
openDevTools: true,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -9,9 +9,11 @@
|
|||||||
<!-- 交卷结果卡片 -->
|
<!-- 交卷结果卡片 -->
|
||||||
<div class="bg-white rounded-4 shadow-lg p-4 w-100 max-w-2xl border-2 border-primary/20">
|
<div class="bg-white rounded-4 shadow-lg p-4 w-100 max-w-2xl border-2 border-primary/20">
|
||||||
<el-result icon="success" title="考试已完成" sub-title="您已成功提交试卷,感谢您的参与!">
|
<el-result icon="success" title="考试已完成" sub-title="您已成功提交试卷,感谢您的参与!">
|
||||||
|
<!--
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<p v-if="pdfPath">{{ pdfPath.filePath }}</p>
|
<p v-if="pdfPath">{{ pdfPath.filePath }}</p>
|
||||||
</template>
|
</template>
|
||||||
|
-->
|
||||||
</el-result>
|
</el-result>
|
||||||
|
|
||||||
<el-divider />
|
<el-divider />
|
||||||
@ -170,9 +172,11 @@ const formatDuration = (startTime, endTime) => {
|
|||||||
const end = new Date(endTime)
|
const end = new Date(endTime)
|
||||||
const diff = end - start
|
const diff = end - start
|
||||||
const minutes = Math.floor(diff / (1000 * 60))
|
const minutes = Math.floor(diff / (1000 * 60))
|
||||||
const hours = Math.floor(minutes / 60)
|
return `${minutes}分钟`
|
||||||
const mins = minutes % 60
|
|
||||||
return `${hours}小时${mins}分钟`
|
// const hours = Math.floor(minutes / 60)
|
||||||
|
// const mins = minutes % 60
|
||||||
|
// return `${hours}小时${mins}分钟`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 返回首页
|
// 返回首页
|
||||||
@ -212,7 +216,8 @@ const checkAnswers = async () => {
|
|||||||
pdfPath.value = await window.electronAPI.generatePaperPdf(result.data)
|
pdfPath.value = await window.electronAPI.generatePaperPdf(result.data)
|
||||||
console.log('生成的试卷PDF文件路径:', pdfPath.value)
|
console.log('生成的试卷PDF文件路径:', pdfPath.value)
|
||||||
// 更新store中的试卷数据
|
// 更新store中的试卷数据
|
||||||
userStore.setPaper(JSON.stringify(result.data))
|
userStore.setPaper(JSON.parse(result.data))
|
||||||
|
console.log("paper.value: ", paper.value)
|
||||||
console.log('试卷数据已更新到store,得分:', result.data.paper_score_real)
|
console.log('试卷数据已更新到store,得分:', result.data.paper_score_real)
|
||||||
} else {
|
} else {
|
||||||
console.error('判卷失败:', result.message)
|
console.error('判卷失败:', result.message)
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
考试时长
|
考试时长
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
{{ formatExamDuration(lastExam?.exam_minutes) }}
|
{{ lastExam?.exam_minutes }}分钟
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template #label>
|
<template #label>
|
||||||
@ -74,7 +74,7 @@
|
|||||||
最短考试时长
|
最短考试时长
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
{{ formatExamDuration(lastExam?.exam_minutes_min) }}
|
{{ lastExam?.exam_minutes_min }}分钟
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template #label>
|
<template #label>
|
||||||
|
Loading…
Reference in New Issue
Block a user