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 @@
+
+
+
+
+
+
+
+
+
+
+
{{ getStatus(item) }}
+
{{ item.name }}
+
2024-03-11 11:30:06
+
+
+ 工单已完成并通过验收
+
+
+
+
+
+
+
+
+
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 @@
-
+
();
- const total = ref()
- const queryParams = ref({
- pageNum: 1,
- pageSize: 10,
- })
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const fetch = (api, params = { orgId } ) => {
return http.post(api, params);
};
+ const data = ref([]);
+ const selectYear = ref(dayjs( new Date().getFullYear().toString()));
+ const total = ref()
+ const queryParams = ref({
+ pageNum: 1,
+ pageSize: 10,
+ year: selectYear.value.format('YYYY'),
+ orgId: orgId.value
+ })
// 年份选择改变触发
const changeYearData = () => {
- queryParams.value.year = selectYear.value.format('YYYY')
+ queryParams.value.year = selectYear.value
getTableList()
}
+ // 表头
+ const column: TableColumnsType [] = [
+ {
+ title: '排放类型',
+ dataIndex: 'cnValue',
+ customCell: (record, rowIndex) => {
+ if (rowIndex == undefined) {
+ return {
+ rowSpan: 0,
+ colSpan: 0,
+ };
+ }
+ const rowSpan = getRowSpan('cnValue', record, data.value);
+ if (rowIndex != 0 && data.value[rowIndex - 1].name == record.name) {
+ return {
+ rowSpan: 0,
+ colSpan: 0,
+ };
+ }
+ return {
+ rowSpan: rowSpan,
+ };
+ },
+ },
+ {
+ title: '能源种类',
+ dataIndex: 'energyType',
+ },
+ {
+ title: '计量单位',
+ dataIndex: 'unit',
+ },
+ {
+ title: '加权平均',
+ dataIndex: 'averageFactorValue',
+ },
+ {
+ title: '全年',
+ dataIndex: 'carbonYearly',
+ },
+ {
+ title: '1月',
+ dataIndex: 'jan',
+ },
+ {
+ title: '2月',
+ dataIndex: 'feb',
+ },
+ {
+ title: '3月',
+ dataIndex: 'mar',
+ },
+ {
+ title: '4月',
+ dataIndex: 'apr',
+ },
+ {
+ title: '5月',
+ dataIndex: 'may',
+ },
+ {
+ title: '6月',
+ dataIndex: 'jun',
+ },
+ {
+ title: '7月',
+ dataIndex: 'jul',
+ },
+ {
+ title: '8月',
+ dataIndex: 'aug',
+ },
+ {
+ title: '9月',
+ dataIndex: 'sep',
+ },
+ {
+ title: '10月',
+ dataIndex: 'oct',
+ },
+ {
+ title: '11月',
+ dataIndex: 'nov',
+ },
+ {
+ title: '12月',
+ dataIndex: 'dec',
+ },
+ ];
+ // 合并单元格
+ const getRowSpan = (dataIndex: string, record: any, data: any, dependents: string[] = []) => {
+ let rowSpan = 1;
+ for (let i = data.indexOf(record) + 1; i < data.length; i++) {
+ let shouldMerge = true;
+ for (const dependent of dependents) {
+ if (data[i][dependent] !== record[dependent]) {
+ shouldMerge = false;
+ break;
+ }
+ }
+ if (shouldMerge && data[i][dataIndex] === record[dataIndex]) {
+ rowSpan++;
+ } else {
+ break;
+ }
+ }
+ return rowSpan;
+ };
// 获取表格数据
const getTableList = () => {
- fetch(energyConsumption.pageList , queryParams.value).then((res) => {
+ fetch(carbonEmission.carbonEmissionStatistics , queryParams.value).then((res) => {
data.value = res.data.records
total.value = res.data.total
});
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts
index 6c8fd15..6f69329 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts
@@ -1,3 +1,4 @@
+// 能耗统计表表头
export const tableColumns = [
{
title: '序号',
@@ -78,6 +79,7 @@ export const tableColumns = [
width: 130
},
];
+// 碳排速算表表头
export const columns = [
{
title: '序号',
@@ -101,8 +103,8 @@ export const columns = [
},
{
title: '启用时间',
- className: 'startTime ',
- dataIndex: 'startTime ',
+ className: 'startTime',
+ dataIndex: 'startTime',
},
{
title: '结束时间',
@@ -120,6 +122,7 @@ export const columns = [
width: 130
},
];
+// 碳排速算新增页中表头
export const drawerColumns = [
{
title: '名称',
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue
index 7026fdb..78ff753 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue
@@ -16,7 +16,7 @@
-
+
人员列表
+ :size="'middle'">
+
+
+ {{ record.userRoleInfos?.[0].deptRoleInfoList }}
+
+
+
@@ -69,51 +74,23 @@
import { ref, watch, computed } from 'vue';
import { defineComponent } from 'vue';
import type { TreeProps } from 'ant-design-vue';
- import { device } from '/@/api/deviceManage';
+ import { origanizemanage } from '/@/api/origanizemanage';
+ import { department } from '/@/api/origanizemanage';
+
import { http } from '/nerv-lib/util';
// import { editTreeConfig } from './config';
-
- const x = 3;
- const y = 2;
- const z = 1;
- const genData: TreeProps['treeData'] = [];
-
- const generateData = (_level: number, _preKey?: string, _tns?: TreeProps['treeData']) => {
- const preKey = _preKey || '0';
- const tns = _tns || genData;
-
- const children = [];
- for (let i = 0; i < x; i++) {
- const key = `${preKey}-${i}`;
- tns.push({ title: key, key });
- if (i < y) {
- children.push(key);
- }
- }
- if (_level < 0) {
- return tns;
- }
- const level = _level - 1;
- children.forEach((key, index) => {
- tns[index].children = [];
- return generateData(level, key, tns[index].children);
- });
- };
- generateData(z);
-
+ //搜索存储
const dataList: TreeProps['treeData'] = [];
const generateList = (data: TreeProps['treeData']) => {
for (let i = 0; i < data.length; i++) {
const node = data[i];
const key = node.key;
- dataList.push({ key, title: key });
+ dataList.push({ key, title: node.title });
if (node.children) {
generateList(node.children);
}
}
};
- generateList(genData);
-
const getParentKey = (
key: string | number,
tree: TreeProps['treeData'],
@@ -133,55 +110,101 @@
};
export default defineComponent({
setup(props, { emit }) {
- // const config = computed(() => {
- // return editTreeConfig(result);
- // });
//组织数
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const dataSource = ref([]);
+ const loading = ref(false);
const selectedRowKey = ref([]);
const selectedRow = ref([]);
- const name = ref(null);
+ const realName = ref(null);
+ // 树方法
+ const expandedKeys = ref<(string | number)[]>([]);
+ const selectedKeys = ref([]);
+ const searchValue = ref('');
+ const deviceName = ref('');
+ const autoExpandParent = ref(true);
+ const deptTreeData = ref([]);
+ //选择 组织
+ const selectOrgId = ref('');
+ selectOrgId.value = result;
+ //选择部门
+ const selectDeptId = ref('');
+
const onSearch = () => {
- http
- .post(device.queryDevicePage, {
- pageNum: pagination.value.current,
- pageSize: pagination.value.pageSize,
- deviceName: name.value,
- orgId: orgId.value,
- })
- .then((res) => {
- dataSource.value = res.data.records;
- pagination.value.total = res.data.total;
- });
+ pagination.value.current = 1;
+ getList();
};
const onSelect = (selectedKeys: any, info: any) => {
- console.log('selected', selectedKeys, info.node.dataRef);
+ selectedKeys.value = selectedKeys;
+ if (info.node.dataRef.deptInfo) {
+ selectDeptId.value = info.node.dataRef.deptInfo.deptId;
+ selectOrgId.value = info.node.dataRef.deptInfo.orgId;
+ }
+ if (info.node.dataRef.orgInfo) {
+ selectOrgId.value = info.node.dataRef.orgInfo.orgId;
+ selectDeptId.value = '';
+ }
pagination.value.current = 1;
- onSearch();
+ getList();
+ };
+ // 递归处理部门树数据
+ const processDepartmentTree = (tree) => {
+ tree.forEach((item) => {
+ item.deptInfo = item.deptInfo;
+ item.key = item.deptInfo.deptId;
+ item.title = item.deptInfo.deptName;
+ item.children = processDepartmentTree(item.children); // 递归处理子节点
+ });
+ return tree;
};
- const handleChangePage = (current: number, pageSize: number) => {
- pagination.value.current = current;
- pagination.value.pageSize = pageSize;
+ // 获取部门树
+ const getDepartList = (params) => {
+ return http.post(department.queryDeptTree, params).then((res) => {
+ const result = res.data.map((item) => ({
+ key: item.orgInfo.orgId,
+ orgInfo: item.orgInfo,
+ title: item.orgInfo.orgName,
+ children: processDepartmentTree(item.deptTrees),
+ }));
+
+ return result;
+ });
+ };
+ //获取树
+ const getTreeData = () => {
+ getDepartList({ orgId: orgId.value }).then((res) => {
+ deptTreeData.value = res;
+ selectedKeys.value = [orgId.value];
+ generateList(deptTreeData.value);
+ });
+ };
+ //获取列表
+ const getList = () => {
+ loading.value = true;
http
- .post(device.queryDevicePage, {
+ .post(origanizemanage.userList, {
pageNum: pagination.value.current,
pageSize: pagination.value.pageSize,
- orgId: orgId.value,
+ orgId: selectOrgId.value,
+ deptId: selectDeptId.value,
+ realName: realName.value,
})
.then((res) => {
dataSource.value = res.data.records;
pagination.value.total = res.data.total;
+ loading.value = false;
});
- console.log(selectedRowKey.value, selectedRow.value);
};
- const onSelectChange = (selectedRowKeys: any, selectedRows: any) => {
- console.log(selectedRowKeys, selectedRows);
- console.log(selectedRows, '数据');
+ const handleChangePage = (current: number, pageSize: number) => {
+ pagination.value.current = current;
+ pagination.value.pageSize = pageSize;
+ getList();
+ };
+ const onSelectChange = (selectedRowKeys: any, selectedRows: any) => {
selectedRowKey.value = selectedRowKeys;
selectedRow.value = selectedRows;
};
@@ -200,14 +223,14 @@
const columns = [
{
title: '序号',
- dataIndex: 'address',
+ dataIndex: 'index',
customRender: (text: any) => {
return text.index + 1;
},
},
{
title: '姓名',
- dataIndex: 'deviceName',
+ dataIndex: 'realName',
},
{
title: '性别',
@@ -215,7 +238,7 @@
},
{
title: '组织关系',
- dataIndex: 'address',
+ dataIndex: 'orgName',
},
{
title: '部门 ',
@@ -227,48 +250,32 @@
emit('handleOk', { id: selectedRowKey.value, data: selectedRow.value });
show.value = false;
pagination.value.current = 1;
+ realName.value = null;
+ searchValue.value = '';
};
const getData = (data: any) => {
selectedRow.value = data.data;
selectedRowKey.value = data.id;
show.value = true;
- http
- .post(device.queryDevicePage, {
- pageNum: pagination.value.current,
- pageSize: pagination.value.pageSize,
- orgId: orgId.value,
- })
- .then((res) => {
- dataSource.value = res.data.records;
- pagination.value.total = res.data.total;
- });
+ //获取列表
+ getList();
+ //获取树
+ getTreeData();
};
const show = ref(false);
const handleCancel = () => {
// 处理取消按钮的逻辑
pagination.value.current = 1;
+ realName.value = null;
emit('handleCancel', null);
show.value = false;
};
- // 树方法
- const expandedKeys = ref<(string | number)[]>([]);
- const searchValue = ref('');
- const deviceName = ref('');
- const autoExpandParent = ref(true);
- const gData = ref(genData);
-
- const onExpand = (keys: string[]) => {
- expandedKeys.value = keys;
- autoExpandParent.value = false;
- console.log(keys, '数据');
- };
watch(searchValue, (value) => {
- console.log(gData.value, '数据');
-
const expanded = dataList
.map((item: TreeProps['treeData'][number]) => {
if (item.title.indexOf(value) > -1) {
- return getParentKey(item.key, gData.value);
+ console.log(item.title.indexOf(value));
+ return getParentKey(item.key, deptTreeData.value);
}
return null;
})
@@ -276,30 +283,35 @@
expandedKeys.value = expanded;
searchValue.value = value;
autoExpandParent.value = true;
- console.log(expandedKeys.value, '数据');
});
return {
columns,
- name,
+ realName,
orgId,
- // config,
+ processDepartmentTree,
onSearch,
+ getList,
+ loading,
dataSource,
onSelect,
- gData,
- onExpand,
+ deptTreeData,
selectedRow,
selectedRowKey,
autoExpandParent,
expandedKeys,
+ selectedKeys,
onSelectChange,
pagination,
handleOk,
show,
getData,
+ getTreeData,
+ getDepartList,
searchValue,
deviceName,
handleCancel,
+ selectDeptId,
+ selectOrgId,
};
},
});
@@ -313,7 +325,7 @@
width: 5px;
height: 15px;
background: inherit;
- background-color: rgba(251, 156, 67, 1);
+ background-color: @primary-color;
border: none;
border-radius: 5px;
-moz-box-shadow: none;
From 90318376959cc232924c591850a9d79822d6b512 Mon Sep 17 00:00:00 2001
From: xuziqiang <1344691446@qq.com>
Date: Wed, 17 Jul 2024 16:11:24 +0800
Subject: [PATCH 8/9] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9table=20Search?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
lib/component/form/form/form.vue | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/component/form/form/form.vue b/lib/component/form/form/form.vue
index 7dd6cde..ef5936e 100644
--- a/lib/component/form/form/form.vue
+++ b/lib/component/form/form/form.vue
@@ -37,9 +37,11 @@
+
+
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) {