From ec21379ba6e4f0d5c9cdc8e0c55c8ffe39a7bbe7 Mon Sep 17 00:00:00 2001 From: xiaojinfei <378266566@qq.com> Date: Mon, 12 Jan 2026 18:07:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=B3=85=E5=90=88=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=EF=BC=8C=E5=A4=8D=E7=94=A8=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../run/instant/warnConfig/UpdateModal.vue | 85 ---- src/views/run/instant/warnConfig/index.vue | 121 ------ src/views/run/instant/warnConfig/warn.data.ts | 364 ------------------ src/views/warn/alarm/index.vue | 4 +- src/views/warn/config/CreateModal.vue | 58 --- src/views/warn/config/UpdateModal.vue | 4 +- src/views/warn/config/UpdateModal1.vue | 162 ++++++++ src/views/warn/config/warn.data.ts | 2 + 8 files changed, 168 insertions(+), 632 deletions(-) delete mode 100644 src/views/run/instant/warnConfig/UpdateModal.vue delete mode 100644 src/views/run/instant/warnConfig/index.vue delete mode 100644 src/views/run/instant/warnConfig/warn.data.ts delete mode 100644 src/views/warn/config/CreateModal.vue create mode 100644 src/views/warn/config/UpdateModal1.vue diff --git a/src/views/run/instant/warnConfig/UpdateModal.vue b/src/views/run/instant/warnConfig/UpdateModal.vue deleted file mode 100644 index 6df4ce9..0000000 --- a/src/views/run/instant/warnConfig/UpdateModal.vue +++ /dev/null @@ -1,85 +0,0 @@ - - - diff --git a/src/views/run/instant/warnConfig/index.vue b/src/views/run/instant/warnConfig/index.vue deleted file mode 100644 index f533a96..0000000 --- a/src/views/run/instant/warnConfig/index.vue +++ /dev/null @@ -1,121 +0,0 @@ - - - - - diff --git a/src/views/run/instant/warnConfig/warn.data.ts b/src/views/run/instant/warnConfig/warn.data.ts deleted file mode 100644 index e9be076..0000000 --- a/src/views/run/instant/warnConfig/warn.data.ts +++ /dev/null @@ -1,364 +0,0 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import {getAlarmLevelList} from "@/api/alert/warn"; -const alarmLevelList = await getAlarmLevelList(); -console.log(alarmLevelList) -export const columns: BasicColumn[] = [ - { - title: '编号', - dataIndex: 'warnId', - width: 80, - fixed: 'left', - }, - { - title: '点号', - dataIndex: 'pointId', - width: 150, - fixed: 'left', - }, - { - title: '描述', - dataIndex: 'pointName', - width: 200, - }, - { - title: '单位', - dataIndex: 'unit', - width: 80, - }, - { - title: '上限', - dataIndex: 'uplimit', - width: 80, - }, - { - title: '下限', - dataIndex: 'lowlimit', - width: 80, - }, - { - title: '实例名称', - dataIndex: 'mpName', - width: 250, - fixed: 'left', - }, - { - title: '专业', - dataIndex: 'systemName', - width: 200, - - }, - { - title: '报警表达式', - dataIndex: 'equation', - width: 200, - - }, - { - title: '输出点号', - dataIndex: 'outputPoint', - width: 200, - - }, - { - title: '报警类型', - dataIndex: 'alarmModelRuleName', - width: 120, - - }, - { - title: '报警限制', - dataIndex: 'warnConstraintName', - width: 120, - - }, - { - title: '告警延时', - dataIndex: 'timeDurationThreshold', - width: 100, - slots: { customRender: 'timeDurationThreshold' }, - }, - { - title: '短信告警', - dataIndex: 'shortMessageOnOff', - width: 100, - slots: { customRender: 'shortMessageOnOff' }, - - }, - { - title: '光字牌告警', - dataIndex: 'gzpOnOff', - width: 100, - slots: { customRender: 'gzpOnOff' }, - - }, - { - title: '推送诊断', - dataIndex: 'copyToDiagOnOff', - width: 100, - slots: { customRender: 'copyToDiagOnOff' }, - - }, - { - title: '已有实例数量', - dataIndex: 'number', - width: 100, - }, - { - title: '参与报警', - dataIndex: 'warnStatus', - width: 100, - slots: { customRender: 'warnStatus' }, - fixed: 'right', - }, - // { - // title: '实时值', - // dataIndex: 'value', - // width: 90, - // className: 'value', - // slots: { customRender: 'value' }, - - // } - -] - -export const searchFormSchema: FormSchema[] = [ - { - label: '模型实例id', - field: 'mpId', - component: 'Input', - defaultValue: '', - required: true, - show: false, - colProps: { span: 8 }, - }, - -] - -export const updateWarnForm: FormSchema[] = [ - { - label: '编号', - field: 'warnId', - component: 'Input', - required: true, - show: false, - }, - { - label: '残差上限', - field: 'uplimit', - component: 'Input', - required: true, - componentProps: { - placeholder: '请输入残差上限', - }, - rules: [{ required: true, message: '请输入残差上限' }], - colProps: { - span: 12, - }, - }, - { - label: '残差下限', - field: 'lowlimit', - component: 'Input', - required: true, - componentProps: { - placeholder: '请输入残差下限', - }, - rules: [{ required: true, message: '请输入残差下限' }], - colProps: { - span: 12, - }, - }, - { - label: '延时告警', - field: 'timeDurationThreshold', - component: 'Input', - required: true, - componentProps: { - placeholder: '请输入延时告警', - }, - rules: [{ required: true, message: '请输入延时告警' }], - colProps: { - span: 12, - }, - }, - - { - label: '告警等级', - field: 'alarmLevel', - component: 'Select', - componentProps: { - options: alarmLevelList, - fieldNames: { - label: 'alarmLevelName', - value: 'alarmLevel', - }, - }, - required: true, - colProps: { - span: 12, - }, - }, - { - label: '光字牌名称', - field: 'gzpName', - component: 'Input', - required: true, - colProps: { - span: 24, - }, - }, - { - label: '光字牌状态', - field: 'gzpOnOff', - component: 'RadioGroup', - componentProps: { - // 数据源1:固定数据 - options: [ - { label: '是', value: 1 }, - { label: '否', value: 0 }, - ], - }, - required: true, - colProps: { - span: 12, - }, - }, - - { - label: '短信推送', - field: 'shortMessageOnOff', - component: 'RadioGroup', - componentProps: { - options: [{ label: '是', value: 1 }, { label: '否', value: 0 }], - }, - required: true, - colProps: { - span: 12, - }, - }, - { - label: '推送诊断', - field: 'copyToDiagOnOff', - component: 'RadioGroup', - componentProps: { - options: [{ label: '是', value: 1 }, { label: '否', value: 0 }], - }, - required: true, - colProps: { - span: 12, - }, - }, - { - label: '告警限制名称', - field: 'warnConstraintName', - component: 'Input', - - required: true, - colProps: { - span: 12, - }, - }, - { - label: '告警限制条件', - field: 'warnConstraint', - component: 'Input', - required: true, - colProps: { - span: 24, - }, - }, -] -export const InstantBasicInfo: any[] = [ - - { - label: '实例名称', - field: 'mpName', - - }, - { - label: '创建人', - field: 'creator', - }, - { - label: '创建时间', - field: 'createTime', - }, - { - label: '最近修改人', - field: 'updater', - }, - { - label: '最近修改时间', - field: 'updateTime', - }, - { - label: '算法', - field: 'algorithm_shortname', - }, - - // modelInfo中的字段 - { - label: '训练采样间隔', - field: 'sampling', - }, - - { - label: '参数个数', - field: 'pointInfo', - }, - { - label: '最小主元贡献率', - field: 'rate', - }, - { - label: '主元个数', - field: 'principal', - }, - { - label: '模型精度', - field: 'rate', - }, -] - -export const detailColumns: BasicColumn[] = [ - { - title: '编号', - dataIndex: 'id', - width: 80, - fixed: 'left', - }, - { - title: '测点编码', - dataIndex: 'inputInfo', - width: 150, - fixed: 'left', - }, - { - title: '测点名称', - dataIndex: 'inputName', - width: 200, - fixed: 'left', - }, - { - title: '单位', - dataIndex: 'unit', - width: 50, - fixed: 'left', - }, - { - title: '重构值测点', - dataIndex: 'outPointInfo', - width: 200, - - }, - { - title: '偏差值测点', - dataIndex: 'biasPointInfo', - width: 200, - }, - { - title: '错误状态测点', - dataIndex: 'faultVariablePointInfo', - width: 200, - }, -] diff --git a/src/views/warn/alarm/index.vue b/src/views/warn/alarm/index.vue index ad5b027..0f4fdcd 100644 --- a/src/views/warn/alarm/index.vue +++ b/src/views/warn/alarm/index.vue @@ -6,7 +6,9 @@ import { useRoute } from 'vue-router' import { columns } from './alarm.data' import { getSearchFormSchema } from '../../run/instant/instant.data' -import UpdateModal from '../../run/instant/warnConfig/UpdateModal.vue' +// import UpdateModal from '../../run/instant/warnConfig/UpdateModal.vue' +import UpdateModal from '@/views/warn/config/UpdateModal.vue' + import TrendModal from './TrendModal.vue' import { BasicTable, TableAction, useTable } from '@/components/Table' import {getWarnPageReal, updateWarn, warnTrendReqVO} from '@/api/alert/warn' diff --git a/src/views/warn/config/CreateModal.vue b/src/views/warn/config/CreateModal.vue deleted file mode 100644 index 2c79f0b..0000000 --- a/src/views/warn/config/CreateModal.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/views/warn/config/UpdateModal.vue b/src/views/warn/config/UpdateModal.vue index 94f3186..c0de246 100644 --- a/src/views/warn/config/UpdateModal.vue +++ b/src/views/warn/config/UpdateModal.vue @@ -69,7 +69,7 @@ async function handleQuery() { // outPointInfo:"XN.M00010001R" // unit:"" const {inputInfo, inputName, outPointInfo, ...rest} = pointInfo.value -//字段映射,后端字段和前端字段不一致,需要映射一下 + //字段映射,后端字段和前端字段不一致,需要映射一下 pointInfo.value = { ...rest, pointId: inputInfo, @@ -82,7 +82,6 @@ async function handleQuery() { submitButtonOptions: { loading: false }, }) pointLoading.value = false - } } @@ -107,7 +106,6 @@ const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) async function handleSubmit() { try { - const values = await validate() setModalProps({confirmLoading: true}) if (unref(isUpdate)) { diff --git a/src/views/warn/config/UpdateModal1.vue b/src/views/warn/config/UpdateModal1.vue new file mode 100644 index 0000000..c0de246 --- /dev/null +++ b/src/views/warn/config/UpdateModal1.vue @@ -0,0 +1,162 @@ + + + diff --git a/src/views/warn/config/warn.data.ts b/src/views/warn/config/warn.data.ts index b79d3d9..ca54833 100644 --- a/src/views/warn/config/warn.data.ts +++ b/src/views/warn/config/warn.data.ts @@ -377,6 +377,8 @@ export const detailColumns: BasicColumn[] = [ }, ] + +//下面是获取一张表中的unit\system\type\mp\point的信息 interface SelectItem { unitId: number unitName: string