---补充可视化的图

This commit is contained in:
lai
2024-01-20 17:04:28 +08:00
parent bb0c6a9e84
commit 5a1d77f186
5 changed files with 490 additions and 813 deletions

View File

@@ -287,3 +287,34 @@ export async function exportAll(query: Record<string, any>) {
}
return result;
}
/**
* 首页活动告警
* @param query 查询参数
* @returns bolb
*/
export async function mainGet() {
let totalSQL = `select count(*) as value,alarm_type as name from alarm where alarm_status=1 group by alarm_type`;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'get',
params: {
SQL: totalSQL,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const itemData = result.data.data;
if (Array.isArray(itemData)) {
const v = itemData[0]['alarm'];
if (Array.isArray(v)) {
result.data = v;
}
}
}
return result;
}