From 2ba4fecc687309b21fd6a0b09133dec7359c33c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E4=BA=91=E9=B9=8F?= Date: Wed, 27 Nov 2024 17:30:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=89=A9=E6=A8=A1=E5=9E=8B=EF=BC=9A?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=8A=B6=E6=80=81=E6=8F=8F=E8=BF=B0=20?= =?UTF-8?q?=E9=A3=8E=E6=9C=BA=E5=88=97=E8=A1=A8=EF=BC=9A=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AE=9E=E6=97=B6=E6=9B=B2=E7=BA=BF=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/backend/auth/model/index.vue | 39 ++++++++++++++++--- .../src/views/backend/auth/model/type.ts | 4 ++ .../backend/equipment/airBlower/index.vue | 7 +++- .../equipment/airBlower/realDataChart.vue | 7 ++-- 4 files changed, 47 insertions(+), 10 deletions(-) diff --git a/ui/dasadmin/src/views/backend/auth/model/index.vue b/ui/dasadmin/src/views/backend/auth/model/index.vue index 9a40f574..4d9325f4 100644 --- a/ui/dasadmin/src/views/backend/auth/model/index.vue +++ b/ui/dasadmin/src/views/backend/auth/model/index.vue @@ -239,14 +239,12 @@ - - - - + +
- +
+ + + + + +
+ + + + + + +
@@ -617,7 +628,11 @@ const sortChange = ({ const attributeTableData = ref([]) const editAttributeForm = (data: AddModelAttributeType & UpdateModelAttributeType) => { attributeFormTitle.value = AttributeDialogTitleStateType['edit'] - attributeForm.value = JSON.parse(JSON.stringify(data)) + const copyData = JSON.parse(JSON.stringify(data)) + const stateDescArr = copyData.stateDesc?.split('|') + copyData.stateDesc0 = stateDescArr?.[0] ?? '' + copyData.stateDesc1 = stateDescArr?.[1] ?? '' + attributeForm.value = copyData attributeVisible.value = true } const delAttributeForm = (data: AddModelAttributeType & UpdateModelAttributeType) => { @@ -790,6 +805,7 @@ const originAttributeForm: AddModelAttributeType & UpdateModelAttributeType = { dataType: '', visible: true, unit: '', + stateDesc: '', level: undefined, revision: 1, createdBy: undefined, @@ -819,6 +835,11 @@ const submitAttributeForm = () => { const copyFormData = JSON.parse(JSON.stringify(attributeForm.value)) copyFormData.highSpeed = copyFormData.highSpeed ? 1 : 0 copyFormData.visible = copyFormData.visible ? 1 : 0 + if (copyFormData.stateDesc0 || copyFormData.stateDesc1) { + copyFormData.stateDesc = (copyFormData?.stateDesc0 ?? '') + '|' + (copyFormData?.stateDesc1 ?? '') + } + delete copyFormData.stateDesc0 + delete copyFormData.stateDesc1 if (attributeFormTitle.value === AttributeDialogTitleStateType['add']) { copyFormData.iotModelId = curContextMenuTreeData.value!.id! addModelAttributeReq(copyFormData) @@ -1157,4 +1178,10 @@ $paginationHeight: 32px; width: 184px; } } +.formRowSplitFiledStyle { + display: flex; + .el-input { + width: 229px; + } +} diff --git a/ui/dasadmin/src/views/backend/auth/model/type.ts b/ui/dasadmin/src/views/backend/auth/model/type.ts index 07bc9c4e..1b46b6e6 100644 --- a/ui/dasadmin/src/views/backend/auth/model/type.ts +++ b/ui/dasadmin/src/views/backend/auth/model/type.ts @@ -73,6 +73,7 @@ export enum ModelAttributeFieldsEnums { 'createdTime' = '创建时间', 'updatedBy' = '更新人', 'updatedTime' = '更新时间', + 'stateDesc' = '状态描述' } export enum ModelServiceFieldsEnums { @@ -114,6 +115,9 @@ export type AddModelAttributeType = { unit: string level?: 0 | 1 | 2 visible: 0 | 1 | boolean + stateDesc:string + stateDesc0?:string + stateDesc1?:string revision: number createdBy?: string createdTime?: string diff --git a/ui/dasadmin/src/views/backend/equipment/airBlower/index.vue b/ui/dasadmin/src/views/backend/equipment/airBlower/index.vue index fc870cd4..8160c94e 100644 --- a/ui/dasadmin/src/views/backend/equipment/airBlower/index.vue +++ b/ui/dasadmin/src/views/backend/equipment/airBlower/index.vue @@ -191,7 +191,12 @@ - +