--修正活动历史告警的代码规范

This commit is contained in:
lai
2023-10-18 10:21:58 +08:00
parent caa0016626
commit 0845751a76
3 changed files with 55 additions and 59 deletions

View File

@@ -1,6 +1,5 @@
<script setup lang="ts">
import { useRoute } from 'vue-router';
import dayjs, { Dayjs } from 'dayjs';
import { reactive, ref, onMounted, toRaw } from 'vue';
import { PageContainer } from '@ant-design-vue/pro-layout';
import { message, Modal } from 'ant-design-vue/lib';
@@ -18,7 +17,6 @@ import {
getPass,
exportAll,
} from '@/api/faultManage/actAlarm';
import useNeInfoStore from '@/store/modules/neinfo';
import useI18n from '@/hooks/useI18n';
import saveAs from 'file-saver';
import { writeSheet } from '@/utils/execl-utils';
@@ -26,7 +24,6 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { readLoalXlsx } from '@/utils/execl-utils';
const { t } = useI18n();
const route = useRoute();
type RangeValue = [Dayjs, Dayjs];
/**路由标题 */
let title = ref<string>((route.meta.title as string) ?? '标题');
@@ -36,23 +33,23 @@ let queryRangePicker = ref<[string, string]>(['', '']);
/**查询参数 */
let queryParams = reactive({
/**告警设备类型 */
ne_type: '',
neType: '',
/**告警网元名称 */
ne_name: '',
neName: '',
/**告警网元标识 */
ne_id: '',
neId: '',
/**告警编号 */
alarm_code: '',
alarmCode: '',
/**告警级别 */
orig_severity: '',
origSeverity: '',
beginTime: '',
endTime: '',
/**告警产生时间 */
eventTime: (queryRangePicker.value = ['', '']),
/**虚拟化标识 */
pv_flag: '',
pvFlag: '',
/**告警类型 */
alarm_type: '',
alarmType: '',
/**当前页数 */
pageNum: 1,
/**每页条数 */
@@ -63,21 +60,21 @@ let queryParams = reactive({
function fnQueryReset() {
queryParams = Object.assign(queryParams, {
/**告警设备类型 */
ne_type: '',
neType: '',
/**告警网元名称 */
ne_name: '',
neName: '',
/**告警网元标识 */
ne_id: '',
neId: '',
/**告警编号 */
alarm_code: '',
alarmCode: '',
/**告警级别 */
orig_severity: '',
origSeverity: '',
/**告警产生时间 */
eventTime: (queryRangePicker.value = ['', '']),
/**虚拟化标识 */
pv_flag: '',
pvFlag: '',
/**告警类型 */
alarm_type: '',
alarmType: '',
/**当前页数 */
});
tablePagination.current = 1;
@@ -295,20 +292,6 @@ let alarmTableColumns: ColumnsType = [
},
];
/**告警帮助文档 */
let pronInfo: any = reactive({
告警名称: '',
告警定位信息: '',
告警帮助信息: '',
告警类型: '',
告警级别: '',
告警编号: '',
告警问题原因: '',
清除类型: '',
英文标题: '',
适用网元: '',
});
/**表格分页器参数 */
let tablePagination = reactive({
/**当前页数 */
@@ -774,7 +757,7 @@ onMounted(() => {
name="ne_type"
>
<a-input
v-model:value="queryParams.ne_type"
v-model:value="queryParams.neType"
allow-clear
placeholder="查询告警设备类型"
></a-input>
@@ -786,7 +769,7 @@ onMounted(() => {
name="ne_name"
>
<a-input
v-model:value="queryParams.ne_name"
v-model:value="queryParams.neName"
allow-clear
placeholder="查询告警网元名称"
></a-input>
@@ -798,7 +781,7 @@ onMounted(() => {
name="ne_id"
>
<a-input
v-model:value="queryParams.ne_id"
v-model:value="queryParams.neId"
allow-clear
placeholder="查询告警网元标识"
></a-input>
@@ -827,7 +810,7 @@ onMounted(() => {
name="alarm_code"
>
<a-input
v-model:value="queryParams.alarm_code"
v-model:value="queryParams.alarmCode"
allow-clear
placeholder="查询告警编号"
></a-input>
@@ -839,7 +822,7 @@ onMounted(() => {
name="orig_severity"
>
<a-select
v-model:value="queryParams.orig_severity"
v-model:value="queryParams.origSeverity"
placeholder="Select alarm Type"
show-search
allow-clear
@@ -869,7 +852,7 @@ onMounted(() => {
name="pv_flag"
>
<a-select
v-model:value="queryParams.pv_flag"
v-model:value="queryParams.pvFlag"
placeholder="Select a person"
show-search
:options="actAlarmOption.pvFlag"
@@ -885,7 +868,7 @@ onMounted(() => {
name="alarm_type"
>
<a-select
v-model:value="queryParams.alarm_type"
v-model:value="queryParams.alarmType"
placeholder="Select alarm Type"
show-search
:options="actAlarmOption.alarmType"
@@ -1025,7 +1008,7 @@ onMounted(() => {
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'origSeverity'">
<a-tag :color="profile.color[record.origSeverity]">{{
<a-tag :color="profile.color[record.origSeverity.toLowerCase()]">{{
record.origSeverity
}}</a-tag>
</template>

View File

@@ -767,7 +767,7 @@ onMounted(() => {
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'origSeverity'">
<a-tag :color="profile.color[record.origSeverity]">{{
<a-tag :color="profile.color[record.origSeverity.toLowerCase()]">{{
record.origSeverity
}}</a-tag>
</template>