From 93c133349a5ccd7a328371fa113dce69d5611f21 Mon Sep 17 00:00:00 2001
From: liuyu <yu.liu@cqgbkj.com>
Date: 星期二, 22 九月 2026 09:25:39 +0800
Subject: [PATCH] feat(tms): 完成课程考试自测等页面与接口对接
---
apps/jnpf-web-apps-main/src/views/x/tms/trainArchive/index.vue | 23 ++---------------------
1 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/apps/jnpf-web-apps-main/src/views/x/tms/trainArchive/index.vue b/apps/jnpf-web-apps-main/src/views/x/tms/trainArchive/index.vue
index c83a3af..a6fac89 100644
--- a/apps/jnpf-web-apps-main/src/views/x/tms/trainArchive/index.vue
+++ b/apps/jnpf-web-apps-main/src/views/x/tms/trainArchive/index.vue
@@ -1,10 +1,9 @@
<script lang="ts" setup>
import type { TrainArchiveDetail } from './types';
-import { computed, onMounted, ref } from 'vue';
+import { onMounted, ref } from 'vue';
import { useMessage } from '@jnpf/hooks';
-import { useUserStore } from '@vben/stores';
import {
Descriptions as ADescriptions,
DescriptionsItem as ADescriptionsItem,
@@ -16,12 +15,9 @@
defineOptions({ name: 'TmsTrainArchive' });
const { createMessage } = useMessage();
-const userStore = useUserStore();
const loading = ref(false);
const detail = ref<TrainArchiveDetail | null>(null);
-
-const userInfo = computed(() => (userStore.getUserInfo || {}) as Record<string, any>);
const workColumns = [
{ title: '搴忓彿', key: 'index', width: 70, align: 'center', customRender: ({ index }: any) => index + 1 },
@@ -48,25 +44,10 @@
loadArchive();
});
-function resolvePositionName() {
- const list = userInfo.value.positionList;
- if (Array.isArray(list) && list.length) {
- return list.map((o: any) => o.treeName || o.fullName || o.name).filter(Boolean).join('銆�') || '鏃�';
- }
- return userInfo.value.positionName || '鏃�';
-}
-
async function loadArchive() {
loading.value = true;
try {
- const u = userInfo.value;
- detail.value = await getMyTrainArchive({
- userId: u.userId || u.id,
- userName: u.userName,
- userAccount: u.userAccount,
- organizeName: u.organizeName || u.departmentName,
- positionName: resolvePositionName(),
- });
+ detail.value = await getMyTrainArchive();
} catch (e: any) {
createMessage.error(e?.message || '鍔犺浇鍩硅妗f澶辫触');
} finally {
--
Gitblit v1.8.0