From c2e69b4d366fa6a74e3702cc4fe6c2aff069549f Mon Sep 17 00:00:00 2001 From: zhaohy <1695786511@qq.com> Date: Wed, 17 Jul 2024 11:13:56 +0800 Subject: [PATCH 1/9] =?UTF-8?q?fix:=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=20=E6=8D=A2=E5=9B=BE=E6=A0=87=20=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=91=8A=E8=AD=A6=E8=AF=A6=E6=83=85=20=20=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=B5=81=E7=A8=8B=20=E6=8C=89=E9=92=AE=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/components/ns-steps.vue | 107 ++++++ hx-ai-intelligent/src/icon/gaojingguanli.svg | 13 +- hx-ai-intelligent/src/icon/gaojingtonglan.svg | 6 + hx-ai-intelligent/src/icon/status-0.svg | 6 + hx-ai-intelligent/src/icon/status-1.svg | 6 + hx-ai-intelligent/src/icon/status-2.svg | 6 + hx-ai-intelligent/src/icon/status-3.svg | 6 + hx-ai-intelligent/src/icon/status-4.svg | 6 + hx-ai-intelligent/src/router/alarmManagement.ts | 33 +- .../view/alarmManagement/alarmOverview/index.vue | 18 +- .../energyAlarm/configureEnergyAlarms.vue | 12 +- .../equipmentAlarm/configureDeviceAlarms.vue | 12 +- .../view/alarmManagement/alarmSettings/index.vue | 2 +- .../alarmSettings/ts/energyAlarmConfig.ts | 12 +- .../alarmSettings/ts/equipmentAlarmConfig.ts | 12 +- .../view/alarmManagement/equipmentAlarm/index.vue | 1 + .../view/alarmManagement/equipmentAlarm/look.vue | 412 +++++++++------------ .../view/alarmManagement/equipmentAlarm/status.vue | 99 ++++- .../alarmManagement/equipmentAlarm/ts/config.ts | 10 +- 19 files changed, 489 insertions(+), 290 deletions(-) create mode 100644 hx-ai-intelligent/src/components/ns-steps.vue create mode 100644 hx-ai-intelligent/src/icon/gaojingtonglan.svg create mode 100644 hx-ai-intelligent/src/icon/status-0.svg create mode 100644 hx-ai-intelligent/src/icon/status-1.svg create mode 100644 hx-ai-intelligent/src/icon/status-2.svg create mode 100644 hx-ai-intelligent/src/icon/status-3.svg create mode 100644 hx-ai-intelligent/src/icon/status-4.svg diff --git a/hx-ai-intelligent/src/components/ns-steps.vue b/hx-ai-intelligent/src/components/ns-steps.vue new file mode 100644 index 0000000..d55f6fd --- /dev/null +++ b/hx-ai-intelligent/src/components/ns-steps.vue @@ -0,0 +1,107 @@ + + + + diff --git a/hx-ai-intelligent/src/icon/gaojingguanli.svg b/hx-ai-intelligent/src/icon/gaojingguanli.svg index 23227d7..ef3dd02 100644 --- a/hx-ai-intelligent/src/icon/gaojingguanli.svg +++ b/hx-ai-intelligent/src/icon/gaojingguanli.svg @@ -1,12 +1 @@ - - - - + \ No newline at end of file diff --git a/hx-ai-intelligent/src/icon/gaojingtonglan.svg b/hx-ai-intelligent/src/icon/gaojingtonglan.svg new file mode 100644 index 0000000..0407a0a --- /dev/null +++ b/hx-ai-intelligent/src/icon/gaojingtonglan.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/hx-ai-intelligent/src/icon/status-0.svg b/hx-ai-intelligent/src/icon/status-0.svg new file mode 100644 index 0000000..d05487a --- /dev/null +++ b/hx-ai-intelligent/src/icon/status-0.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/hx-ai-intelligent/src/icon/status-1.svg b/hx-ai-intelligent/src/icon/status-1.svg new file mode 100644 index 0000000..7ded55c --- /dev/null +++ b/hx-ai-intelligent/src/icon/status-1.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/hx-ai-intelligent/src/icon/status-2.svg b/hx-ai-intelligent/src/icon/status-2.svg new file mode 100644 index 0000000..5e24ea9 --- /dev/null +++ b/hx-ai-intelligent/src/icon/status-2.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/hx-ai-intelligent/src/icon/status-3.svg b/hx-ai-intelligent/src/icon/status-3.svg new file mode 100644 index 0000000..3dcdc39 --- /dev/null +++ b/hx-ai-intelligent/src/icon/status-3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/hx-ai-intelligent/src/icon/status-4.svg b/hx-ai-intelligent/src/icon/status-4.svg new file mode 100644 index 0000000..08e2ae4 --- /dev/null +++ b/hx-ai-intelligent/src/icon/status-4.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/hx-ai-intelligent/src/router/alarmManagement.ts b/hx-ai-intelligent/src/router/alarmManagement.ts index dd930f3..f9d7428 100644 --- a/hx-ai-intelligent/src/router/alarmManagement.ts +++ b/hx-ai-intelligent/src/router/alarmManagement.ts @@ -15,7 +15,6 @@ const alarmManagement = { { path: 'index', name: 'alarmOverviewIndex', - // component: () => import('/nerv-lib/saas/view/menuManage/index.vue'), component: () => import('/@/view/alarmManagement/alarmOverview/index.vue'), meta: { title: '告警总览', @@ -26,16 +25,15 @@ const alarmManagement = { ], }, { - path: 'equipmentAlarm ', + path: 'equipmentAlarm', name: 'EquipmentAlarm', meta: { title: '设备告警', hideChildren: true, icon: 'gaojingguanli' }, component: Base, - redirect: { name: 'equipmentAlarmIndex' }, + redirect: { name: 'EquipmentAlarmIndex' }, children: [ { path: 'index', - name: 'equipmentAlarmIndex', - // component: () => import('/nerv-lib/saas/view/menuManage/index.vue'), + name: 'EquipmentAlarmIndex', component: () => import('/@/view/alarmManagement/equipmentAlarm/index.vue'), meta: { title: '设备告警', @@ -55,11 +53,34 @@ const alarmManagement = { { path: 'index', name: 'alarmSettingsIndex', - // component: () => import('/nerv-lib/saas/view/menuManage/index.vue'), component: () => import('/@/view/alarmManagement/alarmSettings/index.vue'), meta: { title: '告警设置', keepAlive: true, + operates: [ + { title: '设备告警新增', code: 'equipmentAlarmAdd' }, + { title: '设备告警导入', code: 'equipmentAlarmImport' }, + { title: '设备告警导出', code: 'equipmentAlarmExports' }, + { title: '设备告警删除', code: 'equipmentAlarmDel' }, + { title: '设备告警编辑', code: 'equipmentAlarmEdit' }, + { title: '能源告警新增', code: 'energyAlarmAdd' }, + { title: '能源告警导入', code: 'energyAlarmImport' }, + { title: '能源告警导出', code: 'energyAlarmExports' }, + { title: '能源告警删除', code: 'energyAlarmDel' }, + { title: '能源告警编辑', code: 'energyAlarmEdit' }, + { title: '设备告警规则新增', code: 'configureEquipmentAlarmAdd' }, + { title: '设备告警规则导入', code: 'configureEquipmentAlarmImport' }, + { title: '设备告警规则导出', code: 'configureEquipmentAlarmExports' }, + { title: '设备告警规则批量删除', code: 'configureEquipmentAlarmDels' }, + { title: '设备告警规则编辑', code: 'configureEquipmentAlarmEdit' }, + { title: '设备告警规则删除', code: 'configureEquipmentAlarmDel' }, + { title: '能源告警规则新增', code: 'configureEnergyAlarmAdd' }, + { title: '能源告警规则导入', code: 'configureEnergyAlarmImport' }, + { title: '能源告警规则导出', code: 'configureEnergyAlarmExports' }, + { title: '能源告警规则批量删除', code: 'configureEnergyAlarmDels' }, + { title: '能源告警规则编辑', code: 'configureEnergyAlarmEdit' }, + { title: '能源告警规则删除', code: 'configureEnergyAlarmDel' }, + ], // backApi: [], }, }, diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue index 4793714..a26556e 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue @@ -20,7 +20,7 @@
- +
@@ -45,7 +45,7 @@ import * as echarts from 'echarts'; defineOptions({ - name: 'alarmOverview', // 与页面路由name一致缓存才可生效 + name: 'alarmOverviewIndex', // 与页面路由name一致缓存才可生效 }); const info = ref({}); @@ -134,13 +134,13 @@ itemGap: 30, // 这里可以调整图例项之间的间距,单位为像素 }, ], - toolbox: { - show: true, - feature: { - restore: {}, - saveAsImage: {}, - }, - }, + // toolbox: { + // show: true, + // feature: { + // restore: {}, + // saveAsImage: {}, + // }, + // }, calculable: true, xAxis: [ { diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue index 02a3b8e..79bc3cf 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue @@ -106,7 +106,7 @@ headerActions: [ { label: '新增', - name: 'RoleTypeAdd', + name: 'configureEnergyAlarmAdd', type: 'primary', handle: () => { editConfigureEnergyAlarms.value.toggle(null, configureEnergyAlarmsData.value); @@ -114,7 +114,7 @@ }, { label: '导入', - name: 'groupImport', + name: 'configureEnergyAlarmImport', type: 'primary', extra: { // api: props.postImportApi, // 导入接口名 @@ -131,7 +131,7 @@ }, { label: '导出', - name: 'groupExports', + name: 'configureEnergyAlarmExports', type: 'primary', handle: () => { doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx'); @@ -140,7 +140,7 @@ { label: '批量删除', type: 'primary', - name: 'userBatchDel', + name: 'configureEnergyAlarmDels', confirm: true, dynamicDisabled: (data: any) => { return data.list.length === 0; @@ -205,7 +205,7 @@ actions: [ { label: '编辑', - name: 'FeedBackDetail', + name: 'configureEnergyAlarmEdit', dynamicParams: ['uuid', 'appealType'], handle: (data: any) => { editConfigureEnergyAlarms.value.toggle(data, configureEnergyAlarmsData.value); @@ -213,7 +213,7 @@ }, { label: '删除', - name: 'FeedBackDetail', + name: 'configureEnergyAlarmDel', dynamicParams: ['uuid', 'appealType'], confirm: true, handle: (data: any) => { diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue index bcb9426..9945b04 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue @@ -79,7 +79,7 @@ headerActions: [ { label: '新增', - name: 'RoleTypeAdd', + name: 'configureEquipmentAlarmAdd', type: 'primary', handle: () => { editConfigureDeviceAlarms.value.toggle(null, configureDeviceAlarmsData.value); @@ -87,7 +87,7 @@ }, { label: '导入', - name: 'groupImport', + name: 'configureEquipmentAlarmImport', type: 'primary', extra: { // api: props.postImportApi, // 导入接口名 @@ -104,7 +104,7 @@ }, { label: '导出', - name: 'groupExports', + name: 'configureEquipmentAlarmExports', type: 'primary', handle: () => { doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx'); @@ -112,7 +112,7 @@ }, { label: '批量删除', - name: 'groupTemDownload', + name: 'configureEquipmentAlarmDels', type: 'primary', confirm: true, dynamicDisabled: (data: any) => { @@ -177,7 +177,7 @@ actions: [ { label: '编辑', - name: 'FeedBackDetail', + name: 'configureEquipmentAlarmEdit', dynamicParams: ['uuid', 'appealType'], handle: (data: any) => { editConfigureDeviceAlarms.value.toggle(data, configureDeviceAlarmsData); @@ -185,7 +185,7 @@ }, { label: '删除', - name: 'FeedBackDetail', + name: 'configureEquipmentAlarmDel', dynamicParams: ['uuid', 'appealType'], confirm: true, handle: (data: any) => { diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue index 6f59342..83fc3a1 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue @@ -126,7 +126,7 @@ import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; export default { - name: 'AlarmSettings', + name: 'AlarmSettingsIndex', components: { editeEquipmentAlarm, configureDeviceAlarms, diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts index d5caddf..5edbf31 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts @@ -57,7 +57,7 @@ export const energyAlarmConfigs = ( headerActions: [ { label: '新增', - name: 'RoleTypeAdd', + name: 'energyAlarmAdd', type: 'primary', handle: () => { editeEnergyAlarm.value.toggle(); @@ -65,7 +65,7 @@ export const energyAlarmConfigs = ( }, { label: '导入', - name: 'groupImport', + name: 'energyAlarmImport', type: 'primary', extra: { title: '设备信息', // 弹窗title @@ -81,7 +81,7 @@ export const energyAlarmConfigs = ( }, { label: '导出', - name: 'groupExports', + name: 'energyAlarmExports', type: 'primary', handle: () => { doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx'); @@ -95,7 +95,7 @@ export const energyAlarmConfigs = ( actions: [ { label: '编辑', - name: 'FeedBackDetail', + name: 'energyAlarmEdit', dynamicParams: ['uuid', 'appealType'], handle: (data: any) => { data.monitorFrequency = data.monitorFrequency.value; @@ -106,7 +106,7 @@ export const energyAlarmConfigs = ( }, { label: '配置', - name: 'FeedBackDetail', + name: 'alarmSettingsIndex', dynamicParams: ['uuid', 'appealType'], handle: (data: any) => { energyAlarm.value = !energyAlarm.value; @@ -115,7 +115,7 @@ export const energyAlarmConfigs = ( }, { label: '删除', - name: 'FeedBackDetail', + name: 'energyAlarmDel', dynamicParams: ['uuid', 'appealType'], confirm: true, handle: (data: any) => { diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts index 16cc06a..e435364 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts @@ -61,7 +61,7 @@ export const equipmentAlarmTableConfig = ( headerActions: [ { label: '新增', - name: 'RoleTypeAdd', + name: 'equipmentAlarmAdd', type: 'primary', handle: () => { editEquipmentAlarm.value.toggle(); @@ -69,7 +69,7 @@ export const equipmentAlarmTableConfig = ( }, { label: '导入', - name: 'groupImport', + name: 'equipmentAlarmImport', type: 'primary', extra: { // api: props.postImportApi, // 导入接口名 @@ -86,7 +86,7 @@ export const equipmentAlarmTableConfig = ( }, { label: '导出', - name: 'groupExports', + name: 'equipmentAlarmExports', type: 'primary', handle: () => { doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx'); @@ -100,7 +100,7 @@ export const equipmentAlarmTableConfig = ( actions: [ { label: '编辑', - name: 'FeedBackDetail', + name: 'equipmentAlarmEdit', dynamicParams: ['uuid', 'appealType'], handle: (data: any) => { data.priority = data.priority.value; @@ -111,7 +111,7 @@ export const equipmentAlarmTableConfig = ( }, { label: '配置', - name: 'FeedBackDetail', + name: 'alarmSettingsIndex', dynamicParams: ['uuid', 'appealType'], handle: (data: any) => { equipmentAlarm.value = !equipmentAlarm.value; @@ -120,7 +120,7 @@ export const equipmentAlarmTableConfig = ( }, { label: '删除', - name: 'FeedBackDetail', + name: 'equipmentAlarmDel', dynamicParams: ['uuid', 'appealType'], confirm: true, handle: (data: any) => { diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/index.vue b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/index.vue index 59d78bf..a8e00cc 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/index.vue @@ -12,6 +12,7 @@ import { ref } from 'vue'; export default { + name: 'EquipmentAlarmIndex', components: { Look, Status }, setup() { diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue index 62e9a31..baeb5df 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue @@ -8,7 +8,7 @@ :cancel="handleClose" placement="right" @close="handleClose"> -
+
+
+
+
+ +
+ + 紧急 + 新告警 + C003 +
用电量超标
当日用电量超出预设值
+ 1栋10层低压柜 + 0 +
+
+ - diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue index d6cb122..9ec1b01 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue @@ -8,16 +8,81 @@ :cancel="handleClose" placement="right" @close="handleClose"> - 状态 + + Content of Tab Pane 1 + + + + + + + diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts index 8adc472..8d4092f 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts @@ -132,16 +132,8 @@ export const notificationtableConfig = (look: any, status: any) => { }, { field: 'provider', - label: '告警标题', - component: 'NsInput', - componentProps: { - placeholder: '请输入告警标题关键字', - }, - }, - { - field: 'provider', label: '错误码', - component: 'NsInputApi', + component: 'NsInput', componentProps: { placeholder: '请输入告警错误码', }, From 1be888febab1c605be99bc3922b0f255f5934de3 Mon Sep 17 00:00:00 2001 From: xuziqiang <1344691446@qq.com> Date: Wed, 17 Jul 2024 13:48:54 +0800 Subject: [PATCH 2/9] =?UTF-8?q?feat:=20=E9=83=A8=E9=97=A8=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/router/organizationManage.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hx-ai-intelligent/src/router/organizationManage.ts b/hx-ai-intelligent/src/router/organizationManage.ts index e02f7c4..6b5a52e 100644 --- a/hx-ai-intelligent/src/router/organizationManage.ts +++ b/hx-ai-intelligent/src/router/organizationManage.ts @@ -31,7 +31,6 @@ const organizationManage = { { title: '重置密码', code: 'userCodeReset' }, { title: '删除', code: 'userDelete' }, ], - // backApi: [], }, }, ], @@ -50,7 +49,16 @@ const organizationManage = { meta: { title: '部门/权限', keepAlive: true, - // backApi: [], + operates: [ + { title: '新增部门', code: 'authorityDeptAdd' }, + { title: '新增子部门', code: 'authorityDeptSonAdd' }, + { title: '删除部门', code: 'authorityDeptDelete' }, + { title: '编辑部门', code: 'authorityDeptEdit' }, + { title: '新增角色', code: 'authorityRoleAdd' }, + { title: '新增子角色', code: 'authorityRoleSonAdd' }, + { title: '删除角色', code: 'authorityRoleDelete' }, + { title: '编辑角色', code: 'authorityRoleEdit' }, + ], }, }, ], From ddf0514182d33b6a712dc3eea4b1b8982ef544bb Mon Sep 17 00:00:00 2001 From: fks-yangshouda Date: Wed, 17 Jul 2024 15:06:11 +0800 Subject: [PATCH 3/9] =?UTF-8?q?1.=E8=AE=BE=E5=A4=87=E7=9B=91=E6=B5=8B=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5=202.=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E7=9B=91=E6=B5=8B=20=E5=B9=B3=E5=9D=87=E6=95=B0=E6=8D=AE=20?= =?UTF-8?q?=E5=89=8D=E5=8F=B0=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/api/monitor.ts | 13 + .../src/view/monitor/deviceMonitor/graph/index.vue | 47 ++- .../src/view/monitor/deviceMonitor/index.vue | 1 + .../src/view/monitor/deviceMonitor/page.vue | 2 +- .../src/view/monitor/deviceMonitor/table/index.vue | 86 ++-- .../src/view/monitor/deviceMonitor/tree/index.vue | 452 ++++++++------------- .../environmentMonitor/averageData/config.ts | 36 ++ .../environmentMonitor/averageData/index.vue | 250 ++++++++++++ .../environmentMonitor/historyData/config.ts | 20 + .../environmentMonitor/historyData/index.vue | 243 +++++++++++ .../src/view/monitor/environmentMonitor/index.vue | 6 +- 11 files changed, 832 insertions(+), 324 deletions(-) create mode 100644 hx-ai-intelligent/src/api/monitor.ts create mode 100644 hx-ai-intelligent/src/view/monitor/environmentMonitor/averageData/config.ts create mode 100644 hx-ai-intelligent/src/view/monitor/environmentMonitor/averageData/index.vue create mode 100644 hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/config.ts create mode 100644 hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/index.vue diff --git a/hx-ai-intelligent/src/api/monitor.ts b/hx-ai-intelligent/src/api/monitor.ts new file mode 100644 index 0000000..62f5064 --- /dev/null +++ b/hx-ai-intelligent/src/api/monitor.ts @@ -0,0 +1,13 @@ +export enum deviceMonitor { + // getTableList = '/carbon/emission/factor/queryCarbonFactorPage', + // addNewData = '/carbon/emission/factor/creatOrUpdate', + // editUser = '/carbon-smart/api/user/edit', + // frozen = '/carbon-smart/api/user/frozen', + // resetPwd = '/carbon-smart/api/user/resetPwd', + // del = '/carbon-smart/api/user/del', + // batchDel = '/carbon-smart/api/user/batchDel', + // getCarbonFactorTree = '/carbon/emission/type/getCarbonFactorTree', + // queryDeptTree = '/carbon-smart/api/user/queryDeptTree', + // queryUserPerList = '/carbon-smart/api/user/queryUserPerList', + getDeviceGraph = '/carbon-smart/api/monitor/getDeviceGraph', +} diff --git a/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue b/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue index bce9c0e..194ded6 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue @@ -17,6 +17,7 @@ tableList: any[]; tableColumns: any[]; graphList: any[]; + XData: any[]; } const pageData = inject('pageData'); @@ -37,32 +38,40 @@ const draw = () => { data.value = pageData.graphList; + let XData = pageData.XData; if (chartInstance) { chartInstance.dispose(); } chartInstance = echarts.init(graphChart.value); var seriesList = []; - var date = []; + // var date = []; var legendList: string | any[] = []; for (let i = 0; i < data.value.length; i++) { - date.push(data.value[i].date); + seriesList.push({ + name: data.value[i].deviceName, + data: data.value[i].data, + type: 'line', + smooth: true, + }); + legendList.push(data.value[i].deviceName); + // date.push(data.value[i].date); - for (let j = 0; j < data.value[i].data.length; j++) { - if (seriesList.length < j + 1) { - seriesList.push({ - name: data.value[i].data[j].name, - data: [data.value[i].data[j].value], - type: 'line', - smooth: true, - }); - } else { - seriesList[j].data.push(data.value[i].data[j].value); - } - if (legendList.length == 0 || legendList.length < j + 1) { - legendList.push(data.value[i].data[j].name); - } - } + // for (let j = 0; j < data.value[i].data.length; j++) { + // if (seriesList.length < j + 1) { + // seriesList.push({ + // name: data.value[i].data[j].name, + // data: [data.value[i].data[j].value], + // type: 'line', + // smooth: true, + // }); + // } else { + // seriesList[j].data.push(data.value[i].data[j].value); + // } + // if (legendList.length == 0 || legendList.length < j + 1) { + // legendList.push(data.value[i].data[j].name); + // } + // } } const option = { legend: { @@ -76,7 +85,7 @@ const date = params[0].name; const values = params .map((param: any) => { - const unit = data.value.find((d) => d.date === date)?.unit || ''; + const unit = data.value.find((d) => d.date === date)?.devicePositionUnit || ''; return ` ${param.marker}${param.seriesName} ${param.value} ${unit} @@ -88,7 +97,7 @@ }, xAxis: { type: 'category', - data: date, + data: XData, }, yAxis: { type: 'value', diff --git a/hx-ai-intelligent/src/view/monitor/deviceMonitor/index.vue b/hx-ai-intelligent/src/view/monitor/deviceMonitor/index.vue index 71bf86b..909b319 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/index.vue @@ -12,6 +12,7 @@ tableList: [], tableColumns: [], graphList: [], + XData: [], }); // 使用 provide 函数来提供这个响应式对象 diff --git a/hx-ai-intelligent/src/view/monitor/deviceMonitor/page.vue b/hx-ai-intelligent/src/view/monitor/deviceMonitor/page.vue index d406f8c..4cbf1e7 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/page.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/page.vue @@ -16,7 +16,7 @@
- + diff --git a/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue b/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue index c205a2d..60f77cc 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue @@ -1,5 +1,10 @@ + + diff --git a/hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/config.ts b/hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/config.ts new file mode 100644 index 0000000..6fdccb4 --- /dev/null +++ b/hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/config.ts @@ -0,0 +1,20 @@ +export const tableColumns = [ + { + title: '序号', + customRender: (text: any) => { + return text.index + 1; + }, + }, + { + title: '区域名称', + dataIndex: 'areaName', + }, + { + title: '点位', + dataIndex: 'point', + }, + { + title: '日期', + dataIndex: 'date', + }, +]; diff --git a/hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/index.vue b/hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/index.vue new file mode 100644 index 0000000..a9342ab --- /dev/null +++ b/hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/index.vue @@ -0,0 +1,243 @@ + + + + + diff --git a/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue b/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue index 48caad7..485a9d9 100644 --- a/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue +++ b/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue @@ -4,14 +4,16 @@ Content of Tab Pane 2 Content of Tab Pane 3 - + + - - diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue index be5bf5b..9298666 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue @@ -1,13 +1,13 @@ + diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue index 2ccca11..f44bf69 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue @@ -235,8 +235,8 @@ }; //取值类型 const qzOptions = ref([ - { value: 1, label: '实时值', code: '1' }, - { value: 2, label: '平均值', code: '2' }, + { value: 1, label: '实时值' }, + { value: 2, label: '平均值' }, ]); //逻辑 const ljOptions = ref([ @@ -331,6 +331,7 @@ infoObject.value.alarmList = infoObject.value.hxAlarmRuleLogicList || []; delete infoObject.value.hxAlarmRuleLogicList; infoObject.value.deviceType = selectDevice; + infoObject.value.valueType = infoObject.value.valueType.value; infoObject.value.ruleType = infoObject.value.ruleType + ''; } }); diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/index.vue index fd33883..74a5db0 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/index.vue @@ -44,7 +44,7 @@ width: 5px; height: 15px; background: inherit; - background-color: rgba(251, 156, 67, 1); + background-color: #2778ff; border: none; border-radius: 5px; -moz-box-shadow: none; @@ -66,6 +66,9 @@ :scroll="{ x: 800, y: 700 }" :pagination="pagination"> + + Date: Wed, 17 Jul 2024 16:54:15 +0800 Subject: [PATCH 9/9] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E7=A9=BF=E6=8F=92=E9=80=BB=E8=BE=91=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=8F=90=E4=BA=A4=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/view/organizationManage/departmentManage/index.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue index 9a9308b..e7be87b 100644 --- a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue +++ b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue @@ -495,11 +495,13 @@ formData.value = {}; opMap.type = ''; opMap.fuc = ''; + disabled.value = true; }; const clearRoleData = () => { roleFormData.value = {}; opMap.type = ''; opMap.fuc = ''; + roleDisabled.value = true; }; // 部门权限选择 @@ -623,7 +625,8 @@ // 部门切换需要调整角色tab roleActiveKey.value = 1; - + // 需要重置数据 + clearDeptData(); const { selected } = info; if (!selectedKeys?.length) return; @@ -633,6 +636,7 @@ // 确定是否是企业 if (!selectRef.value.hasOwnProperty('own') && !selectRef.value.hasOwnProperty('orgInfo')) { // 部门 + formRef.value?.reset(); formData.value = cloneDeep(info.node.dataRef.deptInfo); } else { activeKey.value = 1; @@ -672,10 +676,13 @@ const SelectUserTree = (selectedKeys: any, info: any) => { const { selected } = info; // roleDisabled.value = !selected; - + // 重置原操作逻辑 + clearRoleData(); if (!selectedKeys?.length) return; roleTreeSelectedKeys.value = [info.node.key]; selectRoleRef.value = info.node.dataRef; + formRoleRef.value?.reset(); + roleFormData.value = cloneDeep(info.node.dataRef); roleCheckedKeys.value = []; if (selectRoleRef.value?.proleId) {