| | |
| | | import { BasicVxeTable, TableAction, useVxeTable } from '@jnpf/ui/vxeTable'; |
| | | |
| | | import { getExamScoreDetail } from '#/api/x/tms/examScore'; |
| | | import { TMS_BTN } from '#/views/x/tms/shared/ui'; |
| | | |
| | | import '#/views/x/tms/shared/page.css'; |
| | | |
| | | defineOptions({ name: 'TmsExamScoreDetail' }); |
| | | |
| | |
| | | const loaded = ref(false); |
| | | |
| | | const columns: BasicColumn[] = [ |
| | | { title: '培训主题', dataIndex: 'taskSubject', minWidth: 220 }, |
| | | { title: '培训任务编号', dataIndex: 'taskNo', width: 140 }, |
| | | { title: '试卷名称', dataIndex: 'taskSubject', minWidth: 220 }, |
| | | { title: '试卷编号', dataIndex: 'taskNo', width: 180 }, |
| | | { |
| | | title: '用户ID', |
| | | title: '考生', |
| | | dataIndex: 'userName', |
| | | width: 120, |
| | | customRender: ({ record }) => { |
| | |
| | | align: 'center', |
| | | slots: { default: 'passFlag' }, |
| | | }, |
| | | { title: '来源IP地址', dataIndex: 'sourceIp', width: 140 }, |
| | | ]; |
| | | |
| | | const [registerTable, { getSelectRows, reload }] = useVxeTable({ |
| | |
| | | } |
| | | |
| | | function getTableActions(record: ExamScoreDetailRow): ActionItem[] { |
| | | return [{ label: '查看试卷', onClick: viewPaper.bind(null, record) }]; |
| | | return [{ label: TMS_BTN.viewPaper, onClick: viewPaper.bind(null, record) }]; |
| | | } |
| | | </script> |
| | | |
| | |
| | | <BasicVxeTable @register="registerTable"> |
| | | <template #tableTitle> |
| | | <a-space> |
| | | <a-button @click="goBack">返回</a-button> |
| | | <a-button type="primary" @click="handleViewSelected">查看试卷</a-button> |
| | | <span class="text-gray-400 text-sm">{{ titleText }}</span> |
| | | <a-button @click="goBack">{{ TMS_BTN.back }}</a-button> |
| | | <a-button type="primary" @click="handleViewSelected">{{ TMS_BTN.viewPaper }}</a-button> |
| | | <span class="tms-toolbar-hint">{{ titleText }}</span> |
| | | </a-space> |
| | | </template> |
| | | <template #passFlag="{ record }"> |
| | | <span :class="record.passFlag === '1' ? 'text-green-600' : 'text-red-500'"> |
| | | <span |
| | | v-if="record.passFlag === '1' || record.passFlag === '0'" |
| | | :class="record.passFlag === '1' ? 'text-green-600' : 'text-red-500'" |
| | | > |
| | | {{ record.passFlag === '1' ? '是' : '否' }} |
| | | </span> |
| | | <span v-else>-</span> |
| | | </template> |
| | | <template #action="{ record }"> |
| | | <TableAction :actions="getTableActions(record)" /> |