fix(工作报告、我的绩效、产品/项目、消息通知): 修复已知的一些问题。

This commit is contained in:
dk
2026-06-28 14:04:28 +08:00
parent a4884035cd
commit 499f2115b2
10 changed files with 189 additions and 58 deletions

View File

@@ -4,6 +4,7 @@ import { ElTag } from 'element-plus';
import { SYSTEM_LOGIN_RESULT_DICT_CODE, SYSTEM_LOGIN_TYPE_DICT_CODE } from '@/constants/dict';
import { fetchExportLoginLog, fetchGetLoginLog, fetchGetLoginLogPage } from '@/service/api';
import { useAuth } from '@/hooks/business/auth';
import { useDict } from '@/hooks/business/dict';
import { useUIPaginatedTable } from '@/hooks/common/table';
import BusinessTableActionCell, { type BusinessTableAction } from '@/components/custom/business-table-action-cell';
import DictText from '@/components/custom/dict-text.vue';
@@ -46,12 +47,19 @@ function transformPageResult(response: LoginLogPageResponse, pageNo: number, pag
}
const { hasAuth } = useAuth();
const { getLabel: getLoginResultLabel } = useDict(SYSTEM_LOGIN_RESULT_DICT_CODE);
const searchParams = reactive(createSearchParams());
const detailVisible = ref(false);
const currentRow = ref<Api.SystemLog.Login.Log | null>(null);
const exporting = ref(false);
const canExport = computed(() => hasAuth(LogPermission.LoginExport));
function getLoginResultTagType(result: Api.SystemLog.Login.Log['result']) {
const label = getLoginResultLabel(result, '');
return label.includes('成功') ? 'success' : 'danger';
}
const detailSections: LogDetailSection[] = [
{
title: '基础信息',
@@ -107,7 +115,7 @@ const { columns, columnChecks, data, loading, getData, getDataByPage, mobilePagi
label: '登录结果',
minWidth: 80,
formatter: row => (
<ElTag type={row.result === 1 ? 'success' : 'danger'}>
<ElTag type={getLoginResultTagType(row.result)}>
<DictText dictCode={SYSTEM_LOGIN_RESULT_DICT_CODE} value={row.result} />
</ElTag>
)