feat: 完成数码管websocket通信

This commit is contained in:
2025-08-14 20:25:32 +08:00
parent 7bfc362b1f
commit 56eeb5dce3
12 changed files with 444 additions and 243 deletions

View File

@@ -250,7 +250,7 @@
</div>
</template>
<script setup lang="ts">
import type { Commit, ExamInfo } from "@/APIClient";
import { ResourcePurpose, type ExamInfo, type ResourceInfo } from "@/APIClient";
import { useAlertStore } from "@/components/Alert";
import { AuthManager } from "@/utils/AuthManager";
import { useRequiredInjection } from "@/utils/Common";
@@ -272,7 +272,7 @@ const props = defineProps<{
selectedExam: ExamInfo;
}>();
const commitsList = ref<Commit[]>();
const commitsList = ref<ResourceInfo[]>();
async function updateCommits() {
const client = AuthManager.createAuthenticatedExamClient();
const list = await client.getCommitsByExamId(props.selectedExam.id);
@@ -294,7 +294,7 @@ const downloadResources = async () => {
const resourceList = await resourceClient.getResourceList(
props.selectedExam.id,
"resource",
"template",
ResourcePurpose.Template,
);
if (resourceList && resourceList.length > 0) {