From b78b49a0b081707a2bd4b528f546c1458aa3c935 Mon Sep 17 00:00:00 2001
From: yuetsh <517252939@qq.com>
Date: Fri, 25 Oct 2024 21:24:19 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=8B=E5=8A=A8=E5=A4=8D?=
=?UTF-8?q?=E5=88=B6=E5=88=B0=E5=BE=AE=E4=BF=A1=E7=BE=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components.d.ts | 1 +
src/oj/submission/components/StatisticsPanel.vue | 10 ++++++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/components.d.ts b/src/components.d.ts
index 8ce4c3f..44342bb 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -56,6 +56,7 @@ declare module 'vue' {
NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag']
+ NText: typeof import('naive-ui')['NText']
NTooltip: typeof import('naive-ui')['NTooltip']
NUpload: typeof import('naive-ui')['NUpload']
RouterLink: typeof import('vue-router')['RouterLink']
diff --git a/src/oj/submission/components/StatisticsPanel.vue b/src/oj/submission/components/StatisticsPanel.vue
index 55ee057..14ba2b1 100644
--- a/src/oj/submission/components/StatisticsPanel.vue
+++ b/src/oj/submission/components/StatisticsPanel.vue
@@ -63,7 +63,7 @@
{{ unaccepted ? "隐藏没有完成的" : "显示没有完成的" }}
- 复制名单
+ 手动复制到微信群
@@ -74,6 +74,7 @@
{{ removeClassname(item) }}
+ {{ message }}
@@ -89,7 +90,6 @@ interface Props {
const props = defineProps()
-const message = useMessage()
const options: SelectOption[] = [
{ label: "30分钟内", value: "minutes:30" },
{ label: "本节课内", value: "hours:1" },
@@ -97,6 +97,7 @@ const options: SelectOption[] = [
{ label: "一天内", value: "days:1" },
{ label: "一周内", value: "weeks:1" },
{ label: "一个月内", value: "months:1" },
+ { label: "一个月内", value: "years:1" },
]
const columns: DataTableColumn[] = [
@@ -124,6 +125,7 @@ const person = reactive({
const list = ref([])
const listUnaccepted = ref([])
const [unaccepted, toggleUnaccepted] = useToggle()
+const message = ref("")
const subOptions = computed(() => {
let dur = options.find((it) => it.value === query.duration) ?? options[0]
@@ -151,6 +153,7 @@ async function handleStatistics() {
person.rate = res.data.person_rate
toggleUnaccepted(false)
+ message.value = ""
}
function removeClassname(name: string) {
@@ -166,7 +169,6 @@ function copyUnaccepted() {
const prefix = `${grade}计算机${classname}班${query.problem}这道题有${listUnaccepted.value.length}人没有完成,分别是:`
const names = listUnaccepted.value.map(removeClassname).join("、")
const suffix = "。请以上同学尽快完成!"
- console.log(prefix+names+suffix)
- message.success("到 DevTool 中手动复制")
+ message.value = prefix+names+suffix
}