修改告警级别
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="统计类型">
|
||||
<el-select
|
||||
style="min-width: 120px !important"
|
||||
style="min-width: 90px !important"
|
||||
placeholder="请选择"
|
||||
v-model="searchForm.valueType"
|
||||
filterable
|
||||
@@ -42,7 +42,7 @@
|
||||
<el-option value="max" label="最大值"></el-option>
|
||||
<el-option value="min" label="最小值"></el-option>
|
||||
<el-option value="avg" label="平均值"></el-option>
|
||||
<el-option value="cp95" label="cp95"></el-option>
|
||||
<el-option value="cp95" label="CP95"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
||||
@@ -139,16 +139,19 @@ const tableStore: any = new TableStore({
|
||||
provide('tableStore', tableStore)
|
||||
tableStore.table.params.sortBy = ''
|
||||
tableStore.table.params.orderBy = ''
|
||||
const open = async (row: any,searchBeginTime:any,searchEndTime:any) => {
|
||||
const open = async (row: any,searchBeginTime:any,searchEndTime:any,interval:any) => {
|
||||
dialogVisible.value = true
|
||||
initCSlineList()
|
||||
tableStore.table.params.lineId = row.lineId
|
||||
|
||||
nextTick(() => {
|
||||
tableHeaderRef.value.setTimeInterval([searchBeginTime, searchEndTime])
|
||||
tableHeaderRef.value.setInterval(interval)
|
||||
setTimeout(() => {
|
||||
tableHeaderRef.value.setTimeInterval([searchBeginTime, searchEndTime])
|
||||
tableStore.table.params.searchBeginTime =searchBeginTime
|
||||
tableStore.table.params.searchEndTime = searchEndTime
|
||||
tableStore.index()
|
||||
},100)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
:showReset="false"
|
||||
ref="TableHeaderRef"
|
||||
@selectChange="selectChange"
|
||||
datePicker :timeKeyList="prop.timeKey"
|
||||
datePicker
|
||||
:timeKeyList="prop.timeKey"
|
||||
v-if="fullscreen"
|
||||
></TableHeader>
|
||||
<my-echart
|
||||
@@ -41,7 +42,7 @@ const prop = defineProps({
|
||||
h: { type: [String, Number] },
|
||||
width: { type: [String, Number] },
|
||||
height: { type: [String, Number] },
|
||||
timeKey: { type: Array as () => string[] },
|
||||
timeKey: { type: Array as () => string[] },
|
||||
timeValue: { type: Object },
|
||||
interval: { type: Number }
|
||||
})
|
||||
@@ -197,6 +198,7 @@ const tableStore: any = new TableStore({
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
setTime()
|
||||
tableStore.table.params.interval = TableHeaderRef.value?.datePickerRef?.interval || 3
|
||||
},
|
||||
loadCallback: () => {
|
||||
tableStore.table.height = `calc(${prop.height} - 80px)`
|
||||
@@ -211,13 +213,12 @@ provide('tableStore', tableStore)
|
||||
|
||||
// 点击行
|
||||
const cellClickEvent = ({ row, column }: any) => {
|
||||
if (column.field != 'name') {
|
||||
OverLimitDetailsRef.value.open(
|
||||
row,
|
||||
tableStore.table.params.searchBeginTime || prop.timeValue?.[0],
|
||||
tableStore.table.params.searchEndTime || prop.timeValue?.[1]
|
||||
)
|
||||
}
|
||||
OverLimitDetailsRef.value.open(
|
||||
row,
|
||||
tableStore.table.params.searchBeginTime || prop.timeValue?.[0],
|
||||
tableStore.table.params.searchEndTime || prop.timeValue?.[1],
|
||||
tableStore.table.params.interval || prop.interval
|
||||
)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
@@ -29,12 +29,27 @@
|
||||
<Icon size="14" name="el-icon-ArrowUp" style="color: #fff" v-if="showSelect" />
|
||||
<Icon size="14" name="el-icon-ArrowDown" style="color: #fff" v-else />
|
||||
</el-button>
|
||||
<el-button @click="onComSearch" v-if="showSearch" type="primary" :icon="Search">查询</el-button>
|
||||
<el-button @click="onResetForm" v-if="showSearch && showReset" :icon="RefreshLeft">重置</el-button>
|
||||
<el-button
|
||||
@click="onComSearch"
|
||||
v-if="showSearch"
|
||||
:loading="tableStore.table.loading"
|
||||
type="primary"
|
||||
:icon="Search"
|
||||
>
|
||||
查询
|
||||
</el-button>
|
||||
<el-button
|
||||
@click="onResetForm"
|
||||
v-if="showSearch && showReset"
|
||||
:loading="tableStore.table.loading"
|
||||
:icon="RefreshLeft"
|
||||
>
|
||||
重置
|
||||
</el-button>
|
||||
<el-button
|
||||
@click="onExport"
|
||||
v-if="showExport"
|
||||
:loading="tableStore.table.loading"
|
||||
:loading="tableStore.table.exportLoading"
|
||||
type="primary"
|
||||
icon="el-icon-Download"
|
||||
>
|
||||
|
||||
@@ -45,6 +45,7 @@ export default class TableStore {
|
||||
pageSize: 20
|
||||
},
|
||||
loading: true,
|
||||
exportLoading: false,
|
||||
column: [],
|
||||
loadCallback: null,
|
||||
resetCallback: null,
|
||||
@@ -196,6 +197,7 @@ export default class TableStore {
|
||||
[
|
||||
'export',
|
||||
() => {
|
||||
this.table.exportLoading = true
|
||||
// this.index()
|
||||
let params = { ...this.table.params, pageNum: 1, pageSize: this.table.total }
|
||||
createAxios(
|
||||
@@ -206,11 +208,16 @@ export default class TableStore {
|
||||
},
|
||||
requestPayload(this.method, params, this.paramsPOST)
|
||||
)
|
||||
).then(res => {
|
||||
this.table.allData = filtration(res.data.records || res.data)
|
||||
this.table.exportProcessingData && this.table.exportProcessingData()
|
||||
this.table.allFlag = data.showAllFlag || true
|
||||
})
|
||||
)
|
||||
.then(res => {
|
||||
this.table.allData = filtration(res.data.records || res.data)
|
||||
this.table.exportProcessingData && this.table.exportProcessingData()
|
||||
this.table.allFlag = data.showAllFlag || true
|
||||
this.table.exportLoading = false
|
||||
})
|
||||
.catch(() => {
|
||||
this.table.exportLoading = false
|
||||
})
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
show-checkbox
|
||||
width="350px"
|
||||
:data="menuTree"
|
||||
:checkStrictly="false"
|
||||
:checkStrictly="checkStrictly"
|
||||
@checkChange="checkChange"
|
||||
></Tree>
|
||||
<el-empty
|
||||
@@ -162,6 +162,9 @@ const currentChange = (data: any) => {
|
||||
menuListId.value = data.row.id
|
||||
getFunctionsByRoleIndex({ id: data.row.id }).then((res: any) => {
|
||||
treeRef.value.treeRef.setCheckedKeys(res.data.map((item: any) => item.id))
|
||||
setTimeout(() => {
|
||||
checkStrictly.value = false
|
||||
}, 100)
|
||||
})
|
||||
getSystemByRoleId({ id: data.row.id }).then((res: any) => {
|
||||
systemIds.value = res.data.systemIds || []
|
||||
@@ -170,10 +173,10 @@ const currentChange = (data: any) => {
|
||||
|
||||
const timeout = ref<NodeJS.Timeout>()
|
||||
const checkChange = (data: any) => {
|
||||
// if (checkStrictly.value) {
|
||||
// checkStrictly.value = false
|
||||
// return
|
||||
// }
|
||||
if (checkStrictly.value) {
|
||||
checkStrictly.value = false
|
||||
return
|
||||
}
|
||||
|
||||
updateRoleMenu({
|
||||
id: menuListId.value,
|
||||
|
||||
@@ -67,6 +67,22 @@ const rankOptions = ref([
|
||||
{
|
||||
value: '3',
|
||||
label: '3级'
|
||||
},
|
||||
{
|
||||
value: '4',
|
||||
label: 'DEBUG'
|
||||
},
|
||||
{
|
||||
value: '5',
|
||||
label: 'NORMAL'
|
||||
},
|
||||
{
|
||||
value: '6',
|
||||
label: 'WARN'
|
||||
},
|
||||
{
|
||||
value: '7',
|
||||
label: 'ERROR'
|
||||
}
|
||||
])
|
||||
|
||||
@@ -83,14 +99,15 @@ const tableStore = new TableStore({
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '设备名称', field: 'equipmentName', align: 'center',minWidth: 100 },
|
||||
{ title: '工程名称', field: 'engineeringName', align: 'center',minWidth: 100 },
|
||||
{ title: '项目名称', field: 'projectName', align: 'center',minWidth: 100 },
|
||||
{ title: '发生时刻', field: 'startTime', align: 'center', minWidth: 180, sortable: true },
|
||||
{ title: '设备名称', field: 'equipmentName', align: 'center', width: 120 },
|
||||
{ title: '工程名称', field: 'engineeringName', align: 'center', width: 120 },
|
||||
{ title: '项目名称', field: 'projectName', align: 'center', width: 120 },
|
||||
{ title: '发生时刻', field: 'startTime', align: 'center', width: 180, sortable: true },
|
||||
{
|
||||
title: '模块信息',
|
||||
field: 'moduleNo',
|
||||
align: 'center',minWidth: 100 ,
|
||||
align: 'center',
|
||||
width: 100,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
@@ -116,14 +133,24 @@ const tableStore = new TableStore({
|
||||
width: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
// 1:Ⅰ级 2:Ⅱ级 3:Ⅲ级 4:DEBUG 5:NORMAL 6:WARN 7:ERROR
|
||||
|
||||
1: 'danger',
|
||||
2: 'warning',
|
||||
3: 'success'
|
||||
3: 'success',
|
||||
4: 'warning',
|
||||
5: 'success',
|
||||
6: 'warning',
|
||||
7: 'danger'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '1级',
|
||||
2: '2级',
|
||||
3: '3级'
|
||||
3: '3级',
|
||||
4: 'DEBUG',
|
||||
5: 'NORMAL',
|
||||
6: 'WARN',
|
||||
7: 'ERROR'
|
||||
}
|
||||
}
|
||||
// {
|
||||
@@ -135,7 +162,25 @@ const tableStore = new TableStore({
|
||||
// }
|
||||
],
|
||||
beforeSearchFun: () => {},
|
||||
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.level =
|
||||
item.level == 1
|
||||
? '1级'
|
||||
: item.level == 2
|
||||
? '2级'
|
||||
: item.level == 3
|
||||
? '3级'
|
||||
: item.level == 4
|
||||
? 'DEBUG'
|
||||
: item.level == 5
|
||||
? 'NORMAL'
|
||||
: item.level == 6
|
||||
? 'WARN'
|
||||
: 'ERROR'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
@@ -2,9 +2,23 @@
|
||||
<TableHeader datePicker ref="refheader" showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="关键词">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue" placeholder="请输入前置服务器名称,ip" />
|
||||
<el-input
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
v-model.trim="tableStore.table.params.searchValue"
|
||||
placeholder="请输入前置服务器名称,ip"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="级别">
|
||||
<el-select v-model.trim="tableStore.table.params.level" placeholder="请选择级别" clearable>
|
||||
<el-option
|
||||
v-for="item in rankOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!-- <div style="height: 300px;"> -->
|
||||
@@ -21,7 +35,36 @@ import { mainHeight } from '@/utils/layout'
|
||||
const props = defineProps(['deviceTree'])
|
||||
|
||||
const refheader = ref()
|
||||
|
||||
const rankOptions = ref([
|
||||
{
|
||||
value: '1',
|
||||
label: '1级'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '2级'
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: '3级'
|
||||
},
|
||||
{
|
||||
value: '4',
|
||||
label: 'DEBUG'
|
||||
},
|
||||
{
|
||||
value: '5',
|
||||
label: 'NORMAL'
|
||||
},
|
||||
{
|
||||
value: '6',
|
||||
label: 'WARN'
|
||||
},
|
||||
{
|
||||
value: '7',
|
||||
label: 'ERROR'
|
||||
}
|
||||
])
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-harmonic-boot/eventUser/frontWarnInfo',
|
||||
method: 'POST',
|
||||
@@ -35,34 +78,79 @@ const tableStore = new TableStore({
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '前置服务器名称', field: 'lineId', align: 'center' ,minWidth: 120 },
|
||||
{ title: '前置服务器ip', field: 'wavePath', align: 'center' ,minWidth: 100 },
|
||||
{ title: '进程号', field: 'clDid', align: 'center',minWidth: 60 },
|
||||
{ title: '发生时刻', field: 'startTime', align: 'center', minWidth: 180, sortable: true },
|
||||
|
||||
{ title: '前置服务器名称', field: 'lineId', align: 'center', width: 120 },
|
||||
{ title: '前置服务器ip', field: 'wavePath', align: 'center', width: 120 },
|
||||
{ title: '进程号', field: 'clDid', align: 'center', width: 60 },
|
||||
{ title: '发生时刻', field: 'startTime', align: 'center', width: 180, sortable: true },
|
||||
|
||||
{
|
||||
title: '事件描述',
|
||||
field: 'tag',
|
||||
minWidth: 350
|
||||
},
|
||||
{
|
||||
{
|
||||
title: '告警代码',
|
||||
field: 'code',
|
||||
align: 'center',minWidth: 100 ,
|
||||
|
||||
align: 'center',
|
||||
width: 100,
|
||||
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? '\u200B' + row.cellValue : '/'
|
||||
return row.cellValue ? '\u200B' + row.cellValue : '/'
|
||||
},
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '级别',
|
||||
field: 'level',
|
||||
width: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
// 1:Ⅰ级 2:Ⅱ级 3:Ⅲ级 4:DEBUG 5:NORMAL 6:WARN 7:ERROR
|
||||
|
||||
1: 'danger',
|
||||
2: 'warning',
|
||||
3: 'success',
|
||||
4: 'warning',
|
||||
5: 'success',
|
||||
6: 'warning',
|
||||
7: 'danger'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '1级',
|
||||
2: '2级',
|
||||
3: '3级',
|
||||
4: 'DEBUG',
|
||||
5: 'NORMAL',
|
||||
6: 'WARN',
|
||||
7: 'ERROR'
|
||||
}
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {}
|
||||
beforeSearchFun: () => {},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.level =
|
||||
item.level == 1
|
||||
? '1级'
|
||||
: item.level == 2
|
||||
? '2级'
|
||||
: item.level == 3
|
||||
? '3级'
|
||||
: item.level == 4
|
||||
? 'DEBUG'
|
||||
: item.level == 5
|
||||
? 'NORMAL'
|
||||
: item.level == 6
|
||||
? 'WARN'
|
||||
: 'ERROR'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.level = ''
|
||||
const deviceTreeOptions = ref<any>(props.deviceTree)
|
||||
deviceTreeOptions.value.map((item: any, index: any) => {
|
||||
if (item.children.length == 0) {
|
||||
@@ -76,6 +164,5 @@ onMounted(() => {
|
||||
setTimeout(() => {
|
||||
// tableStore.table.height = mainHeight(200).height as any
|
||||
}, 0)
|
||||
|
||||
</script>
|
||||
<style></style>
|
||||
|
||||
1
types/table.d.ts
vendored
1
types/table.d.ts
vendored
@@ -16,6 +16,7 @@ declare global {
|
||||
webPagingData: TableRow[][]
|
||||
// 表格加载状态
|
||||
loading: boolean
|
||||
exportLoading: boolean
|
||||
// 当前选中行
|
||||
selection: TableRow[]
|
||||
// 表格列定义
|
||||
|
||||
Reference in New Issue
Block a user