更新容器获取

This commit is contained in:
2026-02-16 15:52:50 +08:00
parent 7fda86d890
commit 0817b1aa48
15 changed files with 851 additions and 516 deletions

View File

@@ -17,7 +17,33 @@ export interface MyWorkInfo extends BasicModel<MyWorkInfo> {
calendarNums?: number;
calendarAllNums?: number;
teamNums?: number;
}
}
export interface DockerInfo extends BasicModel<DockerInfo> {
name?: string;
id: string;
cid: string;
createTime?: string;
imageName?: string;
mapPorts?: string;
status?: string;
state?: string;
cpuUsage?: string;
memUsage?: string;
}
export const bizMyWorkInfoList = () =>
defHttp.get<MyWorkInfo>({ url: adminPath + '/biz/myWork/list'});
defHttp.get<MyWorkInfo>({ url: adminPath + '/biz/myWork/list'});
export const bizDockerInfoList = (params?: DockerInfo | any) =>
defHttp.get<DockerInfo[]>({ url: adminPath + '/biz/myWork/dockerList' , params });
export const bizDockerRestart = (params?: DockerInfo | any) =>
defHttp.get<DockerInfo>({ url: adminPath + '/biz/myWork/restart', params });
export const bizDockerStart = (params?: DockerInfo | any) =>
defHttp.get<DockerInfo>({ url: adminPath + '/biz/myWork/start', params });
export const bizDockerStop = (params?: DockerInfo | any) =>
defHttp.get<DockerInfo>({ url: adminPath + '/biz/myWork/stop', params });

View File

@@ -95,7 +95,7 @@
component: 'Input',
},
{
label: t('是否有附件'),
label: t('有附件'),
field: 'hasAttachment',
component: 'Select',
componentProps: {
@@ -138,7 +138,7 @@
dataIndex: 'fromAddress',
key: 'a.from_address',
sorter: true,
width: 130,
width: 225,
align: 'left',
},
{
@@ -146,20 +146,12 @@
dataIndex: 'subject',
key: 'a.subject',
sorter: true,
width: 425,
width: 1000,
align: 'left',
slot: 'slotBizKey',
},
{
title: t('接收时间'),
dataIndex: 'receivedTime',
key: 'a.received_time',
sorter: true,
width: 180,
align: 'center',
},
{
title: t('是否有附件'),
title: t('有无附件'),
dataIndex: 'hasAttachment',
key: 'a.has_attachment',
sorter: true,

View File

@@ -19,8 +19,8 @@
<div class="content-header">
<span class="content-title">邮件内容</span>
<span class="content-tip" v-if="!ReceivedList?.mailContent">暂无邮件内容</span>
</div>
<div class="db-content" v-html="ReceivedList?.mailContent || ''"></div>
</div>
<div class="db-content" v-html="decodeHtmlEntities(ReceivedList?.mailContent)"></div>
</div>
<!-- 附件列表区域 -->
@@ -66,7 +66,14 @@
emits: ['modalClose'],
setup(props, { emit }) {
const ReceivedList = ref<BizMailReceived>();
const MailAttachments = ref<BizMailAttachments[]>([]);
const MailAttachments = ref<BizMailAttachments[]>([]);
const decodeHtmlEntities = (html: string) => {
if (!html) return '';
const txt = document.createElement('textarea');
txt.innerHTML = html;
return txt.value.replace(/\s+/g, ' ').trim();
};
const [register, { closeModal }] = useModalInner(async (data: any) => {
if (!data) return;
@@ -123,7 +130,8 @@
ReceivedList,
MailAttachments,
downloadAttachment,
formatFileSize,
formatFileSize,
decodeHtmlEntities
};
},
});
@@ -234,7 +242,7 @@
padding: 14px;
margin: 0;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
white-space: pre-wrap;
white-space: normal;
word-break: break-all;
color: #333;
flex: 1;

View File

@@ -95,9 +95,18 @@
label: t('邮件主题'),
field: 'subject',
component: 'Input',
},
},
{
label: t('有无附件'),
field: 'hasAttachment',
component: 'Select',
componentProps: {
dictType: 'has_attachment',
allowClear: true,
},
},
{
label: t('发送状态'),
label: t('状态'),
field: 'sendStatus',
component: 'Select',
componentProps: {
@@ -105,15 +114,6 @@
allowClear: true,
},
},
{
label: t('有无附件'),
field: 'hasAttachment',
component: 'Select',
componentProps: {
dictType: 'has_attachment',
allowClear: true,
},
},
],
};