From 49dd5c4f09d8f6410c625cf526b9aabb3ad26c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E4=BA=91=E9=B9=8F?= Date: Mon, 4 Nov 2024 17:53:18 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=87=8F=E6=B5=8B=EF=BC=9A=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8E=86=E5=8F=B2=E6=9B=B2=E7=BA=BF=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/backend/auth/model/type.ts | 1 + .../equipment/equipmentManagement/index.vue | 20 +- .../equipmentManagement/measurement.vue | 345 ++++++++++++++++-- 3 files changed, 340 insertions(+), 26 deletions(-) diff --git a/ui/dasadmin/src/views/backend/auth/model/type.ts b/ui/dasadmin/src/views/backend/auth/model/type.ts index c9f90e5b..41d66071 100644 --- a/ui/dasadmin/src/views/backend/auth/model/type.ts +++ b/ui/dasadmin/src/views/backend/auth/model/type.ts @@ -93,6 +93,7 @@ export type GetModelAttributeType = { iotModelId: string attributeCode?: string attributeName?: string + attributeType?: ModelAttributeType pageSize?: number pageNum?: number orderColumn?: string diff --git a/ui/dasadmin/src/views/backend/equipment/equipmentManagement/index.vue b/ui/dasadmin/src/views/backend/equipment/equipmentManagement/index.vue index 50c9ec93..079a05f9 100644 --- a/ui/dasadmin/src/views/backend/equipment/equipmentManagement/index.vue +++ b/ui/dasadmin/src/views/backend/equipment/equipmentManagement/index.vue @@ -444,6 +444,12 @@ style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949" > + + + + + +
@@ -452,6 +458,7 @@ :deviceId="measureData.deviceId" :iotModelId="measureData.iotModelId" :autoUpdate="measureData.autoUpdate" + :attributeType="measureData.measureType" >
@@ -478,6 +485,7 @@ import { useAdminInfo } from '/@/stores/adminInfo' import { encrypt_aes, generateRandomNumber } from '/@/utils/crypto' import ControlPage from './control.vue' import MeasurementPage from './measurement.vue' +import { ModelAttributeType } from '/@/views/backend/auth/model/type' const adminInfo = useAdminInfo() interface Tree { @@ -993,10 +1001,16 @@ const openControl = (data: any) => { } } -const measureData = reactive({ +const measureData = reactive<{ + deviceId: string + iotModelId: string + autoUpdate: boolean + measureType: ModelAttributeType +}>({ deviceId: '', iotModelId: '', autoUpdate: false, + measureType: 138, }) const showMeasure = ref(false) const openMeasure = (data: any) => { @@ -1008,6 +1022,7 @@ const openMeasure = (data: any) => { ElMessage.warning('该设备没有绑定物模型!') } } + watch(showMeasure, (newVal: boolean) => { !newVal && (measureData.autoUpdate = false) }) @@ -1107,5 +1122,8 @@ $paginationHeight: 32px; .measureSlotHeaderRight { margin-left: 20px; } + .measureTabs { + margin-left: auto; + } } diff --git a/ui/dasadmin/src/views/backend/equipment/equipmentManagement/measurement.vue b/ui/dasadmin/src/views/backend/equipment/equipmentManagement/measurement.vue index d5954bab..8085f9fe 100644 --- a/ui/dasadmin/src/views/backend/equipment/equipmentManagement/measurement.vue +++ b/ui/dasadmin/src/views/backend/equipment/equipmentManagement/measurement.vue @@ -11,8 +11,13 @@ :sortable="item.sortable" > @@ -30,32 +35,89 @@ > + + +
+
+ + + +
+
+ + + + + + + + + + + + + +
+ 查询 +
+
+
+
+
+
- + From 2bfb7458d1e078ffbb79cd014898c465185c797e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E4=BA=91=E9=B9=8F?= Date: Tue, 5 Nov 2024 09:29:42 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=87=8F=E6=B5=8B=EF=BC=9A=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=98=BE=E7=A4=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/backend/WindBlower/index.vue | 22 ++--- .../equipmentManagement/measurement.vue | 84 +++++++------------ 2 files changed, 35 insertions(+), 71 deletions(-) diff --git a/ui/dasadmin/src/views/backend/WindBlower/index.vue b/ui/dasadmin/src/views/backend/WindBlower/index.vue index 453c048a..4fb17608 100644 --- a/ui/dasadmin/src/views/backend/WindBlower/index.vue +++ b/ui/dasadmin/src/views/backend/WindBlower/index.vue @@ -409,9 +409,7 @@ const initpowerChart = () => { axisLabel: { //x轴文字的配置 show: true, - textStyle: { - color: '#4E5969', - }, + color: '#4E5969', interval: 'auto', //rotate: 45 }, @@ -442,9 +440,7 @@ const initpowerChart = () => { axisLabel: { //x轴文字的配置 show: true, - textStyle: { - color: '#4E5969', - }, + color: '#4E5969', }, axisTick: { show: false }, splitLine: { @@ -472,9 +468,7 @@ const initpowerChart = () => { axisLabel: { //x轴文字的配置 show: true, - textStyle: { - color: '#4E5969', - }, + color: '#4E5969', }, axisTick: { show: false }, splitLine: { @@ -623,9 +617,7 @@ const initTrendChart = (type: 'day' | 'month') => { axisLabel: { //x轴文字的配置 show: true, - textStyle: { - color: '#4E5969', - }, + color: '#4E5969', }, splitLine: { //分割线配置 @@ -654,9 +646,7 @@ const initTrendChart = (type: 'day' | 'month') => { axisLabel: { //x轴文字的配置 show: true, - textStyle: { - color: '#4E5969', - }, + color: '#4E5969', }, axisTick: { show: false }, splitLine: { @@ -1403,7 +1393,7 @@ const sendManualCommand = (type: 1 | 0) => { deviceId: route.query.irn as string, serviceCode: 'Locked', serviceName, - optDesc: serviceName +',设定值为:'+ type, + optDesc: serviceName + ',设定值为:' + type, opValue: type, }).then((res) => { if (res.code == 200) { diff --git a/ui/dasadmin/src/views/backend/equipment/equipmentManagement/measurement.vue b/ui/dasadmin/src/views/backend/equipment/equipmentManagement/measurement.vue index 8085f9fe..d6150614 100644 --- a/ui/dasadmin/src/views/backend/equipment/equipmentManagement/measurement.vue +++ b/ui/dasadmin/src/views/backend/equipment/equipmentManagement/measurement.vue @@ -11,8 +11,10 @@ :sortable="item.sortable" >