新增预警页面

This commit is contained in:
2025-12-15 22:57:11 +08:00
parent 7da14e282e
commit 55d02106cb
11 changed files with 159 additions and 88 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

View File

@@ -56,4 +56,3 @@ export const bizMailAttachmentsImportData = (
export const bizMailAttachmentsDelete = (params?: BizMailAttachments | any) =>
defHttp.get<BizMailAttachments>({ url: adminPath + '/biz/mailAttachments/delete', params });

View File

@@ -12,6 +12,7 @@ const { adminPath } = useGlobSetting();
export interface BizQuickLogin extends BasicModel<BizQuickLogin> {
createTime?: string; // 创建时间
systemName: string; // 系统名称
systemType: string; // 系统类型
homepageUrl: string; // 首页地址
iconClass: string; // 图标类名
iconColor: string; // 图标颜色

View File

@@ -36,8 +36,6 @@
import ChartLineType from './components/ChartLineType.vue';
import ChartLineRatio from './components/ChartLineRatio.vue';
const FormValues = ref<Record<string, any>>({
cycleType: 'M'
});

View File

@@ -50,8 +50,17 @@
maxlength: 100,
},
required: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('系统类型'),
field: 'systemType',
component: 'Select',
componentProps: {
dictType: 'system_type',
allowClear: true,
},
required: true,
},
{
label: t('首页地址'),
field: 'homepageUrl',

View File

@@ -99,6 +99,15 @@
align: 'left',
slot: 'slotBizKey',
},
{
title: t('系统类型'),
dataIndex: 'systemType',
key: 'a.system_type',
sorter: true,
width: 200,
align: 'left',
dictType: 'system_type'
},
{
title: t('首页地址'),
dataIndex: 'homepageUrl',

View File

@@ -1,8 +1,5 @@
<template>
<Card title="运行信息" v-bind="$attrs">
<template #extra>
<a-button type="link" size="small" @click="goToMorePage()">更多</a-button>
</template>
<div class="dynamic-list-container">
<div class="card-grid">
<template v-for="item in listData" :key="item.id || item.ip">
@@ -103,11 +100,6 @@ export default defineComponent({
}
};
// 跳转到更多页面
const goToMorePage = () => {
router.push('/biz/hostInfo/index');
};
// 根据使用率获取样式类
const getUsageClass = (usage: number) => {
if (usage >= 80) return 'usage-danger';
@@ -130,7 +122,6 @@ export default defineComponent({
listData,
register,
openModal,
goToMorePage,
getUsageClass,
getProgressClass,
};

View File

@@ -1,8 +1,5 @@
<template>
<Card title="项目信息" v-bind="$attrs">
<template #extra>
<a-button type="link" size="small" @click="goToMorePage()">更多</a-button>
</template>
<div class="scroll-container" style="overflow-x: hidden;">
<template v-for="item in listData" :key="item.projectCode || item">
<CardGrid class="!w-full rounded-lg p-4 shadow-sm hover:shadow-md transition-shadow duration-200 border border-gray-100 card-grid-fixed-height">
@@ -69,17 +66,12 @@ export default defineComponent({
}
};
const goToMorePage = () => {
router.push('/biz/projectInfo/list');
};
onMounted(() => {
getDataList();
});
return {
listData,
goToMorePage,
};
},
});

View File

@@ -72,12 +72,15 @@ const filteredAppList = computed(() => {
const fetchAppList = async () => {
try {
// 新增错误处理,避免接口异常导致页面卡死
const result = await bizQuickLoginListAll();
appList.value = result || []; // 防止返回 null 导致渲染异常
const params = {
isEnabled: '1',
systemType: '2'
}
const result = await bizQuickLoginListAll(params);
appList.value = result || [];
} catch (error) {
console.error('获取应用列表失败:', error);
appList.value = []; // 异常时置空列表,显示空状态
appList.value = [];
}
};

View File

@@ -4,9 +4,14 @@
<template #headerContent>
<MySchedule />
</template>
<div>
s
</div>
<Card title="常用应用" class="common-app-card">
<div class="app-item" v-for="(app, index) in appList">
<a-button type="link" size="small" @click="goToMorePage(app)">
<img :src="app.iconClass" class="app-icon" />
</a-button>
<span class="app-text">{{ app.systemName }}</span>
</div>
</Card>
</PageWrapper>
<Tabs v-model:activeKey="activeKey">
<TabPane key="1" tab="日程管理">
@@ -18,17 +23,46 @@
</Tabs>
</div>
</template>
<script lang="ts" setup name="AboutPage">
import { h, ref } from 'vue';
import { Tag, Tabs ,TabPane } from 'ant-design-vue';
import { h, ref, onMounted } from 'vue';
import { Tag, Tabs, TabPane, Card } from 'ant-design-vue';
import { PageWrapper } from '@jeesite/core/components/Page';
import { useRouter } from 'vue-router';
import { BizQuickLogin, bizQuickLoginListAll } from '@jeesite/biz/api/biz/quickLogin';
import MySchedule from './components/MySchedule.vue';
import Calendar from './components/calendar/list.vue';
import TableInfo from './components/tableInfo/list.vue';
const appList = ref<BizQuickLogin[]>([]);
const activeKey = ref('1');
const router = useRouter();
const goToMorePage = (app : BizQuickLogin) => {
router.push(app.homepageUrl);
};
const fetchAppList = async () => {
try {
const params = {
isEnabled: '1',
systemType: '1'
}
const result = await bizQuickLoginListAll(params);
appList.value = result || [];
} catch (error) {
console.error('获取应用列表失败:', error);
appList.value = [];
}
};
onMounted(() => {
fetchAppList();
});
</script>
<style scoped lang="less">
@@ -39,6 +73,37 @@
display: flex;
flex-direction: column; // 垂直布局
overflow: hidden; // 防止内容溢出
padding: 0 8px;
}
// 常用应用Card样式
.common-app-card {
width: 100%;
margin: 4px 0; // Card上下间距
border-radius: 8px; // 优化圆角,更美观
.app-item {
display: inline-flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 6px 12px;
// 应用图标样式
.app-icon {
width: 32px;
height: 24px;
object-fit: contain;
border-radius: 4px;
}
// 应用文字样式
.app-text {
font-size: 12px;
color: #333; // 文字颜色
white-space: nowrap; // 防止文字换行
font-weight: 500; // 轻微加粗,提升可读性
}
}
}
</style>