From f88c124173b14e2002fd7e646710c62cddbf85ec Mon Sep 17 00:00:00 2001 From: hwj Date: Tue, 3 Feb 2026 17:02:38 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E9=87=87=E9=9B=86=E8=AE=BE?= =?UTF-8?q?=E5=A4=87-=E8=AE=BE=E5=A4=87=E5=B1=9E=E6=80=A7-=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=E5=AD=97=E6=AE=B5=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/components/DeviceAttributeForm.vue | 41 ------------------- .../device/components/DeviceAttributeList.vue | 10 ----- 2 files changed, 51 deletions(-) diff --git a/src/views/iot/device/components/DeviceAttributeForm.vue b/src/views/iot/device/components/DeviceAttributeForm.vue index 827a2071..78fe19ca 100644 --- a/src/views/iot/device/components/DeviceAttributeForm.vue +++ b/src/views/iot/device/components/DeviceAttributeForm.vue @@ -64,13 +64,6 @@ :disabled="!ratioEnabled" /> - - - { formData.value.attributeCode = val?.replace(/[\u4e00-\u9fa5]/g, '') } -const handleSortInput = (val: string) => { - formData.value.sort = val?.replace(/\D/g, '') -} const handleAttributeTypeChange = (val: number | string) => { const matched = typeList.value.find( @@ -190,22 +179,6 @@ const formRules = reactive({ } ], attributeName: [{ required: true, message: t('DataCollection.Device.attributeValidatorNameRequired'), trigger: 'blur' }], - sort: [ - { - validator: (_rule: any, value: string, callback: any) => { - if (!value) { - callback() - return - } - if (!/^\d+$/.test(value)) { - callback(new Error(t('DataCollection.Device.attributeValidatorSortNumber'))) - return - } - callback() - }, - trigger: ['blur', 'change'] - } - ], remark: [ { validator: (_rule: any, value: string, callback: any) => { @@ -232,17 +205,10 @@ const buildSubmitData = () => { address, dataUnit, ratio, - sort, remark, deviceId } = formData.value - const parsedSort = - sort === undefined || sort === null || sort === '' - ? undefined - : Number.isNaN(Number(sort)) - ? undefined - : Number(sort) const data: any = { attributeCode, attributeName, @@ -252,7 +218,6 @@ const buildSubmitData = () => { address, dataUnit, ratio: ratioEnabled.value ? ratio : undefined, - sort: parsedSort, remark, deviceId } @@ -279,11 +244,6 @@ const open = async (type: string, id?: number, deviceId: number) => { ;(formData.value as any).deviceId = deviceId } - const currentSort = (formData.value as any)?.sort - if (currentSort !== undefined && currentSort !== null) { - ;(formData.value as any).sort = String(currentSort) - } - const currentType = (formData.value as any)?.attributeType if (currentType !== undefined && currentType !== null && currentType !== '') { const matched = typeList.value.find( @@ -341,7 +301,6 @@ const resetForm = () => { address: undefined, dataUnit: undefined, ratio: undefined, - sort: undefined, remark: undefined, deviceId: undefined } diff --git a/src/views/iot/device/components/DeviceAttributeList.vue b/src/views/iot/device/components/DeviceAttributeList.vue index c18c6e19..024487aa 100644 --- a/src/views/iot/device/components/DeviceAttributeList.vue +++ b/src/views/iot/device/components/DeviceAttributeList.vue @@ -140,16 +140,6 @@ ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-to :formatter="dateFormatter" width="170px" /> - - -