feat: 告警记录

This commit is contained in:
leiqiaochu 2023-03-02 11:08:07 +08:00
parent 569c430ca2
commit 849bfbdaad
3 changed files with 50 additions and 4 deletions

View File

@ -10,6 +10,7 @@
:columns="columns"
:request="queryList"
:gridColumn="3"
:gridColumns="[1,2,3]"
ref="tableRef"
:defaultParams="{
sorts: [{ name: 'createTime', order: 'desc' }],

View File

@ -5,8 +5,14 @@
:width="1200"
cancelText="取消"
okText="确定"
@ok="clsoeModal"
@cancel="clsoeModal"
>
<Search :columns="columns" target="bind-channel"></Search>
<Search
:columns="columns"
target="bind-channel"
@search="handleSearch"
></Search>
<JTable
model="TABLE"
:columns="columns"
@ -15,7 +21,23 @@
terms,
}"
:request="queryHandleHistory"
:params="params"
>
<template #headerTitle>
<h3>记录列表</h3>
</template>
<template #handleTime="slotsProps">
<span>
{{
moment(slotsProps.handleTime).format(
'YYYY-MM-DD HH:mm:ss'
)
}}
</span>
</template>
<template #handleType="slotProps">
<span>{{ slotProps.handleType.text }}</span>
</template>
<template #alarmTime="slotProps">
<span>
{{
@ -50,8 +72,9 @@ const columns = [
title: '处理时间',
dataIndex: 'handleTime',
key: 'handleTime',
scopedSlots: true,
search: {
type: 'string',
type: 'date',
},
},
{
@ -91,6 +114,18 @@ const columns = [
},
},
];
const params = ref();
const emit = defineEmits(['closeLog']);
/**
* 关闭弹窗
*/
const clsoeModal = () => {
emit('closeLog');
};
const handleSearch = (e: any) => {
params.value = e;
};
</script>
<style lang="less" scoped>
</style>

View File

@ -28,6 +28,7 @@
:columns="columns"
:request="handleSearch"
:params="params"
:gridColumns="[1,1,2]"
:gridColumn="2"
model="CARD"
>
@ -116,7 +117,7 @@
</template>
</JTable>
<SolveComponent :data="data" v-if="data.solveVisible" @closeSolve="closeSolve"/>
<SolveLog :data="data.current" v-if="data.logVisible"/>
<SolveLog :data="data.current" v-if="data.logVisible" @closeLog="closeLog"/>
</div>
</template>
@ -400,8 +401,17 @@ const getActions = (
];
return actions;
};
/**
* 关闭告警日志
*/
const closeSolve = () =>{
data.value.solveVisible = false
data.value.solveVisible = false;
}
/**
* 关闭处理记录
*/
const closeLog = () =>{
data.value.logVisible = false;
}
</script>
<style lang="less" scoped>