Merge remote-tracking branch 'origin/lichang' into lite

This commit is contained in:
TsMask
2025-03-13 11:08:24 +08:00
14 changed files with 106 additions and 53 deletions

View File

@@ -193,7 +193,7 @@ let tableColumns: ColumnsType = [
title: t('views.faultManage.activeAlarm.eventTime'),
dataIndex: 'eventTime',
align: 'left',
width: 150,
width: 200,
customRender(opt) {
if (typeof opt.value === 'number') {
return parseDateToStr(+opt.value);
@@ -232,12 +232,6 @@ let tableColumns: ColumnsType = [
align: 'left',
width: 100,
},
{
title: t('views.ne.neInfo.pvflag'),
dataIndex: 'pvFlag',
align: 'left',
width: 150,
},
{
title: t('common.operate'),
key: 'id',

View File

@@ -132,7 +132,7 @@ let tableColumns: ColumnsType = [
title: t('views.faultManage.activeAlarm.eventTime'),
dataIndex: 'eventTime',
align: 'left',
width: 150,
width: 200,
customRender(opt) {
if (typeof opt.value === 'number') {
return parseDateToStr(+opt.value);

View File

@@ -170,7 +170,7 @@ let tableColumns: ColumnsType = [
title: t('views.faultManage.activeAlarm.eventTime'),
dataIndex: 'eventTime',
align: 'left',
width: 150,
width: 200,
customRender(opt) {
if (typeof opt.value === 'number') {
return parseDateToStr(+opt.value);
@@ -209,12 +209,6 @@ let tableColumns: ColumnsType = [
align: 'left',
width: 100,
},
{
title: t('views.ne.neInfo.pvflag'),
dataIndex: 'pvFlag',
align: 'left',
width: 150,
},
{
title: t('views.faultManage.activeAlarm.clearUser'),
dataIndex: 'clearUser',
@@ -232,7 +226,7 @@ let tableColumns: ColumnsType = [
title: t('views.faultManage.activeAlarm.clearTime'),
dataIndex: 'clearTime',
align: 'left',
width: 150,
width: 200,
customRender(opt) {
if (typeof opt.value === 'number') {
return parseDateToStr(+opt.value);

View File

@@ -98,7 +98,7 @@ type TabeStateType = {
let tableState: TabeStateType = reactive({
loading: false,
size: 'middle',
seached: false,
seached: true,
data: [],
});
@@ -177,7 +177,7 @@ let tableColumns: ColumnsType = [
if (!opt.value) return '';
return parseDateToStr(+opt.value);
},
width: 150,
width: 200,
},
{
title: t('views.logManage.alarm.logTime'),

View File

@@ -93,7 +93,7 @@ type TabeStateType = {
let tableState: TabeStateType = reactive({
loading: false,
size: 'middle',
seached: false,
seached: true,
data: [],
});
@@ -191,7 +191,7 @@ let tableColumns: ColumnsType = reactive([
if (!opt.value) return '';
return parseDateToStr(+opt.value);
},
width: 150,
width: 200,
},
{
title: t('views.logManage.forwarding.logTime'),
@@ -201,7 +201,7 @@ let tableColumns: ColumnsType = reactive([
if (!opt.value) return '';
return parseDateToStr(+opt.value);
},
width: 150,
width: 200,
},
]);

View File

@@ -108,7 +108,7 @@ let tableColumns: ColumnsType = [
title: t('views.system.dept.createTime'),
dataIndex: 'createTime',
align: 'center',
width: 150,
width: 200,
customRender(opt) {
if (+opt.value <= 0) return '';
return parseDateToStr(+opt.value);

View File

@@ -134,13 +134,13 @@ let tableColumns: ColumnsType = [
title: t('views.system.log.login.status'),
dataIndex: 'statusFlag',
key: 'statusFlag',
align: 'center',
align: 'left',
width: 100,
},
{
title: t('views.system.log.login.loginTime'),
dataIndex: 'loginTime',
align: 'center',
align: 'left',
width: 200,
customRender(opt) {
if (+opt.value <= 0) return '';
@@ -151,7 +151,6 @@ let tableColumns: ColumnsType = [
title: t('views.system.log.login.info'),
dataIndex: 'msg',
align: 'left',
width: 200,
},
];
@@ -534,7 +533,7 @@ onMounted(() => {
:loading="tableState.loading"
:data-source="tableState.data"
:size="tableState.size"
:scroll="{ x: tableColumns.length * 150 }"
:scroll="{ x: tableColumns.length * 180 }"
:pagination="tablePagination"
:row-selection="{
type: 'checkbox',

View File

@@ -139,13 +139,13 @@ let tableColumns: ColumnsType = [
dataIndex: 'statusFlag',
key: 'statusFlag',
align: 'left',
width: 150,
width: 100,
},
{
title: t('views.system.log.operate.operDate'),
dataIndex: 'operaTime',
align: 'left',
width: 150,
width: 200,
customRender(opt) {
if (+opt.value <= 0) return '';
return parseDateToStr(+opt.value);
@@ -156,7 +156,7 @@ let tableColumns: ColumnsType = [
dataIndex: 'costTime',
key: 'costTime',
align: 'right',
width: 150,
width: 100,
customRender(opt) {
return `${opt.value} ms`;
},

View File

@@ -144,7 +144,7 @@ let tableColumns: ColumnsType = [
title: t('views.system.role.createTime'),
dataIndex: 'createTime',
align: 'center',
width: 150,
width: 200,
customRender(opt) {
if (+opt.value <= 0) return '';
return parseDateToStr(+opt.value);

View File

@@ -158,7 +158,7 @@ let tableColumns: ColumnsType = [
title: t('views.system.user.loginTime'),
dataIndex: 'loginTime',
align: 'left',
width: 150,
width: 200,
customRender(opt) {
if (+opt.value <= 0) return '';
return parseDateToStr(+opt.value);

View File

@@ -5,7 +5,7 @@ import { SizeType } from 'ant-design-vue/es/config-provider';
import { ColumnsType } from 'ant-design-vue/es/table';
import { Modal, message } from 'ant-design-vue/es';
import { parseDateToStr } from '@/utils/date-utils';
import { getNeFile, listNeFiles } from '@/api/tool/neFile';
import { getNeDirZip, getNeFile, listNeFiles } from '@/api/tool/neFile';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import ViewDrawer from '@/views/logManage/neFile/components/ViewDrawer.vue';
import useNeInfoStore from '@/store/modules/neinfo';
@@ -79,7 +79,7 @@ let tableColumns: ColumnsType = reactive([
if (!opt.value) return '';
return parseDateToStr(opt.value * 1000);
},
width: 150,
width: 200,
},
{
title: t('views.logManage.neFile.fileName'),
@@ -168,6 +168,45 @@ function fnDownloadFile(row: Record<string, any>) {
});
}
/**信息文件下载 */
function fnDownloadFileZIP(row: Record<string, any>) {
if (downLoading.value) return;
Modal.confirm({
title: t('common.tipTitle'),
content: t('views.logManage.neFile.downTipZip', { fileName: row.fileName }),
onOk() {
downLoading.value = true;
const hide = message.loading(t('common.loading'), 0);
getNeDirZip({
neType: queryParams.neType,
neId: queryParams.neId,
path: `${queryParams.path}/${row.fileName}`,
delTemp: true,
})
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: t('common.msgSuccess', {
msg: t('common.downloadText'),
}),
duration: 2,
});
saveAs(res.data, `${row.fileName}.zip`);
} else {
message.error({
content: t('views.logManage.neFile.downTipErr'),
duration: 2,
});
}
})
.finally(() => {
hide();
downLoading.value = false;
});
},
});
}
/**tmp目录下UPF标准版内部输出目录 */
let tmp = ref<boolean>(false);
@@ -386,16 +425,6 @@ onMounted(() => {
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'fileName'">
<a-space :size="8" align="center">
<a-tooltip
v-if="
record.fileType === 'file' && record.fileName.endsWith('.log')
"
>
<template #title>{{ t('common.viewText') }}</template>
<a-button type="link" @click.prevent="fnDrawerOpen(record)">
<template #icon><ProfileOutlined /></template>
</a-button>
</a-tooltip>
<a-button
type="link"
:loading="downLoading"
@@ -405,15 +434,36 @@ onMounted(() => {
<template #icon><DownloadOutlined /></template>
{{ t('common.downloadText') }}
</a-button>
<a-button
type="link"
:loading="downLoading"
@click.prevent="fnDirCD(record.fileName)"
v-if="record.fileType === 'dir'"
@click.prevent="fnDrawerOpen(record)"
v-if="
record.fileType === 'file' && record.fileName.endsWith('.log')
"
>
<template #icon><FolderOutlined /></template>
{{ t('views.logManage.neFile.dirCd') }}
<template #icon><ProfileOutlined /></template>
{{ t('common.viewText') }}
</a-button>
<template v-if="record.fileType === 'dir'">
<a-button
type="link"
:loading="downLoading"
@click.prevent="fnDownloadFileZIP(record)"
>
<template #icon><DownloadOutlined /></template>
{{ t('common.downloadText') }}
</a-button>
<a-button
type="link"
:loading="downLoading"
@click.prevent="fnDirCD(record.fileName)"
>
<template #icon><FolderOutlined /></template>
{{ t('views.logManage.neFile.dirCd') }}
</a-button>
</template>
</a-space>
</template>
</template>