From 7f46fc8fb7d7bb17c45c3c8fdfecfda235e4a0bc Mon Sep 17 00:00:00 2001 From: xiaojinfei <378266566@qq.com> Date: Mon, 12 Jan 2026 09:04:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=E9=9B=86=E4=B8=AD=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E5=8C=BA=E9=97=B4=E5=AD=97=E6=AE=B5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/warn/alarm/alarm.data.ts | 104 ++--------------------------- 1 file changed, 4 insertions(+), 100 deletions(-) diff --git a/src/views/warn/alarm/alarm.data.ts b/src/views/warn/alarm/alarm.data.ts index 23e0f0d..f57d156 100644 --- a/src/views/warn/alarm/alarm.data.ts +++ b/src/views/warn/alarm/alarm.data.ts @@ -16,102 +16,6 @@ function toTimestamp(time: string): number { // 兼容:2026-01-04T09:30:15 / 2026-01-04 09:30:15 return new Date(time.replace('T', ' ')).getTime() } -const optionList = await optionListApi() - -const systemOptions = ref([]) -systemOptions.value = optionList.systems -export const searchFormSchema: FormSchema[] = [ - { - label: '机组', - field: 'unit', - component: 'Select', - // defaultValue: optionList.units[0].id || null, - defaultValue: null, - - colProps: { span: 4 }, - - componentProps: ({ schema, tableAction, formActionType, formModel }) => { - return { - // xxxx props - placeholder: '全部机组', - options: optionList.units.map(unit => ({ value: unit.id, label: unit.name })), - onChange: async (e: any) => { - // const { reload } = tableAction - // reload() - // or - console.log(e) - const param: systemSelectParams = { - unitId: e, - typeId: formModel.type, - } - //如果typeId是空,则不设置system'Options - if (!param.typeId || !param.unitId) { - systemOptions.value = [] - return - } - systemOptions.value = await subSystemListApi(param) - // formModel.system = systemOptions.value[0].id - }, - } - }, - }, - { - label: '系统', - field: 'type', - component: 'Select', - // defaultValue: optionList.types[0].id || null, - defaultValue: null, - - colProps: { span: 4 }, - componentProps: ({ formModel }) => { - return { - placeholder: '全部系统', - options: optionList.types.map(type => ({ value: type.id, label: type.name })), - onChange: async (e: any) => { - // const { reload } = tableAction - // reload() - // or - console.log(e) - const param: systemSelectParams = { - unitId: formModel.unit, - typeId: e, - } - //如果typeId是空,则不设置system'Options - if (!param.typeId || !param.unitId) { - systemOptions.value = [] - return - } - systemOptions.value = await subSystemListApi(param) - }, - } - }, - }, - { - label: '子系统', - field: 'system', - component: 'Select', - // defaultValue: systemOptions.value[0].id || null, - defaultValue: null, - colProps: { span: 4 }, - componentProps: () => { - return { - placeholder: '全部子系统', - options: systemOptions.value.map(system => ({ value: system.id, label: system.name })), - } - }, - }, - - { - label: '模型实例名称', - field: 'mpName', - component: 'Input', - labelWidth: 100, - - defaultValue: '', - colProps: { span: 5 }, - }, -] - export const columns: BasicColumn[] = [ { title: '编号', @@ -151,8 +55,8 @@ export const columns: BasicColumn[] = [ // 将 JSX 改为 h 函数调用 customRender: ({ record }) => { return h('div', [ - h('div', { style: 'color: #006400;font-weight:bold' },'实时值:'+record.pointValue), - h('div', { style: 'color: #0960BD;font-weight:bold' },'重构值:'+record.outputPointValue), + h('div', { style: 'color: #006400;font-weight:bold' },'实时值:'+record.pointValue.toFixed(3)), + h('div', { style: 'color: #0960BD;font-weight:bold' },'重构值:'+record.outputPointValue.toFixed(3)), ]); }, }, @@ -176,8 +80,8 @@ export const columns: BasicColumn[] = [ // 将 JSX 改为 h 函数调用 customRender: ({ record }) => { return h('div', [ - h('div', record.lowlimit), - h('div', record.uplimit), + h('div', (Number(record.outputPointValue)+Number(record.lowlimit)).toFixed(2)), + h('div', (Number(record.outputPointValue)+Number(record.uplimit)).toFixed(2)), ]); }, From 3b79042e4872adcd488cfdd7453a8786744d7b2a Mon Sep 17 00:00:00 2001 From: xiaojinfei <378266566@qq.com> Date: Mon, 12 Jan 2026 09:04:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=E5=AE=9E=E4=BE=8B=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=9C=BA=E7=BB=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/run/instant/instant.data.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/views/run/instant/instant.data.ts b/src/views/run/instant/instant.data.ts index c6e5b1c..3b92a42 100644 --- a/src/views/run/instant/instant.data.ts +++ b/src/views/run/instant/instant.data.ts @@ -33,6 +33,12 @@ export const columns: BasicColumn[] = [ slots: { customRender: 'detail' }, fixed: 'left', }, + { + title: '机组', + dataIndex: 'unitName', + width: 200, + + }, { title: '专业', dataIndex: 'systemName',