fix(工作报告、我的绩效、产品/项目、消息通知): 修复已知的一些问题。
This commit is contained in:
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user