解决所有bug 优化table内容

This commit is contained in:
2026-01-21 18:43:39 +08:00
parent 9984200814
commit 7f0280ec8a
80 changed files with 5202 additions and 744 deletions

View File

@@ -97,33 +97,90 @@
border
:cell-style="tableStyle.cellStyle"
:header-cell-style="tableStyle.headerCellStyle">
<el-table-column type="index" label="序号" width="60" align="center" />
<el-table-column prop="schoolYear" label="学年" show-overflow-tooltip align="center" />
<el-table-column prop="schoolTerm" label="学期" show-overflow-tooltip align="center">
<template #default="scope">
<span>{{ formatSchoolTerm(scope.row.schoolTerm) }}</span>
<el-table-column type="index" label="序号" width="60" align="center">
<template #header>
<el-icon><List /></el-icon>
</template>
</el-table-column>
<el-table-column prop="schoolYear" label="学年" show-overflow-tooltip align="center">
<template #header>
<el-icon><Calendar /></el-icon>
<span style="margin-left: 4px">学年</span>
</template>
</el-table-column>
<el-table-column prop="schoolTerm" label="学期" show-overflow-tooltip align="center">
<template #header>
<el-icon><Clock /></el-icon>
<span style="margin-left: 4px">学期</span>
</template>
<template #default="scope">
<el-tag size="small" type="primary" effect="plain">
{{ formatSchoolTerm(scope.row.schoolTerm) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="deptName" label="学院" show-overflow-tooltip align="center">
<template #header>
<el-icon><OfficeBuilding /></el-icon>
<span style="margin-left: 4px">学院</span>
</template>
</el-table-column>
<el-table-column prop="classNo" label="班号" show-overflow-tooltip align="center">
<template #header>
<el-icon><Grid /></el-icon>
<span style="margin-left: 4px">班号</span>
</template>
</el-table-column>
<el-table-column prop="title" label="标题" show-overflow-tooltip align="center" min-width="200">
<template #header>
<el-icon><Document /></el-icon>
<span style="margin-left: 4px">标题</span>
</template>
</el-table-column>
<el-table-column prop="author" label="作者" show-overflow-tooltip align="center">
<template #header>
<el-icon><User /></el-icon>
<span style="margin-left: 4px">作者</span>
</template>
</el-table-column>
<el-table-column prop="deptName" label="学院" show-overflow-tooltip align="center" />
<el-table-column prop="classNo" label="班号" show-overflow-tooltip align="center" />
<el-table-column prop="title" label="标题" show-overflow-tooltip align="center" min-width="200" />
<el-table-column prop="author" label="作者" show-overflow-tooltip align="center" />
<el-table-column prop="updateTime" label="更新时间" show-overflow-tooltip align="center" width="180">
<template #header>
<el-icon><Clock /></el-icon>
<span style="margin-left: 4px">更新时间</span>
</template>
<template #default="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column prop="belong" label="归档级别" show-overflow-tooltip align="center">
<template #header>
<el-icon><Collection /></el-icon>
<span style="margin-left: 4px">归档级别</span>
</template>
<template #default="scope">
<span>{{ formatBelong(scope.row.belong) }}</span>
<el-tag size="small" type="info" effect="plain">
{{ formatBelong(scope.row.belong) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="isAddScore" label="加分" show-overflow-tooltip align="center">
<template #header>
<el-icon><Plus /></el-icon>
<span style="margin-left: 4px">加分</span>
</template>
<template #default="scope">
<span>{{ scope.row.isAddScore === '1' ? '是' : '否' }}</span>
<StatusTag
:value="scope.row.isAddScore"
:options="[{ label: '是', value: '1' }, { label: '否', value: '0' }]"
:type-map="{ '1': { type: 'success', effect: 'light' }, '0': { type: 'info', effect: 'light' } }"
/>
</template>
</el-table-column>
<el-table-column label="操作" width="300" align="center" fixed="right">
<template #header>
<el-icon><Setting /></el-icon>
<span style="margin-left: 4px">操作</span>
</template>
<template #default="scope">
<el-button
icon="View"
@@ -192,6 +249,9 @@ import { useMessage, useMessageBox } from "/@/hooks/message";
import { parseTime } from "/@/utils/formatTime";
import FormDialog from './form.vue'
import BelongDialog from './belong.vue'
import { List, Calendar, Clock, OfficeBuilding, Grid, Document, User, Collection, Plus, Setting } from '@element-plus/icons-vue'
import { defineAsyncComponent } from 'vue'
const StatusTag = defineAsyncComponent(() => import('/@/components/StatusTag/index.vue'))
// 定义变量内容
const formDialogRef = ref()