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/record/Sign.vue |   93 ++++++++--------------------------------------
 1 files changed, 17 insertions(+), 76 deletions(-)

diff --git a/apps/jnpf-web-apps-main/src/views/x/tms/record/Sign.vue b/apps/jnpf-web-apps-main/src/views/x/tms/record/Sign.vue
index ad80e52..0fe1c27 100644
--- a/apps/jnpf-web-apps-main/src/views/x/tms/record/Sign.vue
+++ b/apps/jnpf-web-apps-main/src/views/x/tms/record/Sign.vue
@@ -1,14 +1,16 @@
 <script lang="ts" setup>
 import type { TmsRecordDetail } from './types';
 
-import { onMounted, reactive, ref } from 'vue';
+import { onMounted, ref } from 'vue';
 import { useRoute, useRouter } from 'vue-router';
 
 import { useMessage } from '@jnpf/hooks';
 import { Table as ATable } from 'ant-design-vue';
-import dayjs from 'dayjs';
 
 import { getTmsRecordDetail } from '#/api/x/tms/record';
+import { TMS_BTN } from '#/views/x/tms/shared/ui';
+
+import '#/views/x/tms/shared/page.css';
 
 defineOptions({ name: 'TmsRecordSign' });
 
@@ -17,14 +19,7 @@
 const { createMessage } = useMessage();
 
 const loading = ref(false);
-const submitting = ref(false);
 const detail = ref<TmsRecordDetail | null>(null);
-
-const form = reactive({
-  userName: '',
-  deptName: '',
-  signMode: '鍦ㄧ嚎绛惧埌',
-});
 
 const signColumns = [
   { title: '搴忓彿', key: 'index', width: 70, align: 'center', customRender: ({ index }: any) => index + 1 },
@@ -59,32 +54,6 @@
   }
 }
 
-function handleSubmit() {
-  if (!form.userName.trim()) {
-    createMessage.warning('璇疯緭鍏ョ鍒颁汉濮撳悕');
-    return;
-  }
-  if (!detail.value) return;
-  submitting.value = true;
-  try {
-    detail.value.signList = [
-      {
-        id: `s-${Date.now()}`,
-        userName: form.userName.trim(),
-        deptName: form.deptName.trim() || undefined,
-        signTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
-        signMode: form.signMode,
-      },
-      ...(detail.value.signList || []),
-    ];
-    form.userName = '';
-    form.deptName = '';
-    createMessage.success('绛惧埌鎴愬姛锛堟湰鍦� mock锛岃仈璋冨悗鍐欏叆鏈嶅姟绔級');
-  } finally {
-    submitting.value = false;
-  }
-}
-
 function goBack() {
   router.push('/tms/record');
 }
@@ -96,38 +65,23 @@
       <div class="jnpf-content-wrapper-content tms-record-wrap">
         <a-spin :spinning="loading" class="record-spin">
           <div v-if="detail" class="record-inner">
-            <div class="record-header">
+            <div class="tms-page-header">
               <div>
-                <div class="text-base font-medium">鍩硅绛惧埌</div>
-                <div class="mt-1 text-gray-400 text-sm">
-                  {{ detail.recordNo }} 路 {{ detail.subject }}
-                </div>
+                <div class="tms-page-header__title">鍩硅绛惧埌</div>
+                <div class="tms-page-header__sub">{{ detail.recordNo }} 路 {{ detail.subject }}</div>
               </div>
-              <a-button @click="goBack">杩斿洖</a-button>
+              <div class="tms-page-header__actions">
+                <a-button @click="goBack">{{ TMS_BTN.back }}</a-button>
+              </div>
             </div>
 
-            <a-form layout="inline" class="sign-form mb-4">
-              <a-form-item label="濮撳悕">
-                <a-input v-model:value="form.userName" placeholder="绛惧埌浜哄鍚�" class="!w-[140px]" allow-clear />
-              </a-form-item>
-              <a-form-item label="閮ㄩ棬">
-                <a-input v-model:value="form.deptName" placeholder="閮ㄩ棬锛堝彲閫夛級" class="!w-[160px]" allow-clear />
-              </a-form-item>
-              <a-form-item label="鏂瑰紡">
-                <a-select
-                  v-model:value="form.signMode"
-                  class="!w-[130px]"
-                  :options="[
-                    { label: '鍦ㄧ嚎绛惧埌', value: '鍦ㄧ嚎绛惧埌' },
-                    { label: 'APP鎵爜', value: 'APP鎵爜' },
-                    { label: '寰俊鎵爜', value: '寰俊鎵爜' },
-                  ]"
-                />
-              </a-form-item>
-              <a-form-item>
-                <a-button type="primary" :loading="submitting" @click="handleSubmit">纭绛惧埌</a-button>
-              </a-form-item>
-            </a-form>
+            <a-alert
+              class="tms-page-tip"
+              type="info"
+              show-icon
+              message="绠$悊绔ˉ绛�/鎵爜绛惧埌鍗冲皢鎺ュ叆"
+              description="褰撳墠璇峰鍛樺湪銆屼釜浜哄煿璁换鍔°�嶄腑瀹屾垚绛惧埌銆備笅鏂逛负宸插悓姝ョ殑绛惧埌鍚嶅崟锛堝彧璇伙級銆�"
+            />
 
             <div class="section-title">宸茬鍒颁汉鍛�</div>
             <ATable
@@ -173,24 +127,11 @@
   padding: 16px 20px 24px;
 }
 
-.record-header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  margin-bottom: 16px;
-}
-
 .section-title {
   font-size: 15px;
   font-weight: 600;
   margin: 8px 0 12px;
   padding-left: 10px;
   border-left: 3px solid #1677ff;
-}
-
-.sign-form {
-  padding: 12px;
-  background: #fafafa;
-  border-radius: 6px;
 }
 </style>

--
Gitblit v1.8.0