feat: 学习进度轮询、学时依据与首页代理弹窗

This commit is contained in:
2026-11-15 05:13:48 +08:00
parent f0a2bdd854
commit 5acbea35fb
17 changed files with 921 additions and 221 deletions
+15
View File
@@ -20,6 +20,7 @@ const hbMode = ref("manual");
const hbVideo = ref<number | null>(30);
const hbDocument = ref<number | null>(120);
const hbScorm = ref<number | null>(120);
const hoursSource = ref("api");
const preferenceLabel = computed(() =>
showManualJigsaw.value ? "默认勾选手动滑动验证码" : "先尝试自动滑动验证码",
@@ -66,6 +67,7 @@ onMounted(async () => {
hbVideo.value = readNumber(body.heartbeat_video_seconds) ?? 30;
hbDocument.value = readNumber(body.heartbeat_document_seconds) ?? 120;
hbScorm.value = readNumber(body.heartbeat_scorm_seconds) ?? 120;
hoursSource.value = body.hours_source === "history" ? "history" : "api";
loaded.value = true;
} catch {
errorText.value = "系统配置没有获取到。";
@@ -119,6 +121,7 @@ async function save() {
heartbeat_video_seconds: hbVideo.value as number,
heartbeat_document_seconds: hbDocument.value as number,
heartbeat_scorm_seconds: hbScorm.value as number,
hours_source: hoursSource.value,
};
if (password.value !== "" || confirmPassword.value !== "") {
if (password.value !== confirmPassword.value) {
@@ -218,6 +221,18 @@ async function save() {
</template>
</n-form>
</section>
<section class="panel-card">
<h3>学时达标</h3>
<n-form class="compact-nform" label-placement="left" label-align="left" :label-width="176" :show-feedback="false" size="small">
<n-form-item label="判断依据">
<n-radio-group v-model:value="hoursSource" size="small">
<n-radio-button value="api">接口本月学时</n-radio-button>
<n-radio-button value="history">学时历史统计</n-radio-button>
</n-radio-group>
</n-form-item>
</n-form>
<p class="form-hint">学时历史按倒序分页统计到上个月为止</p>
</section>
<section class="panel-card">
<h3>管理员</h3>
<n-form class="compact-nform" label-placement="left" label-align="left" :label-width="176" :show-feedback="false" size="small">