@@ -43,9 +43,14 @@
+
diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/treeData.ts b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/treeData.ts
new file mode 100644
index 0000000..b764b47
--- /dev/null
+++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/treeData.ts
@@ -0,0 +1,88 @@
+import { ref } from 'vue';
+export const treeData = ref([
+ {
+ label: '站厅',
+ id: '1',
+ // 前端遍历后添加,属前端属性
+ selected: false,
+ children: [{
+ label: '站厅1区',
+ id: '1-1',
+ // 前端属性
+ selected: false,
+ // 后端属性(表示禁用了一个设备)
+ stop: false,
+ // 当前的控制模式
+ type: 3
+ },{
+ label: '站厅2区',
+ id: '1-2',
+ selected: false,
+ stop: false,
+ type: 1
+ }]
+ },
+ {
+ label: '站台',
+ id: '2',
+ selected: false,
+ children: [{
+ label: '站台1区',
+ id: '2-1',
+ selected: false,
+ stop: false,
+ type: 1
+ },{
+ label: '站台2区',
+ id: '2-2',
+ selected: false,
+ stop: false,
+ type: 2
+ },{
+ label: '站台3区',
+ id: '2-3',
+ selected: false,
+ stop: false,
+ type: 3
+ },{
+ label: '站台4区',
+ id: '2-4',
+ selected: false,
+ stop: false,
+ type: 1
+ }]
+ },{
+ label: '办公室',
+ id: '3',
+ selected: false,
+ children: [{
+ label: '办公室1区',
+ id: '3-1',
+ selected: false,
+ stop: false,
+ type: 2
+ }]
+ },{
+ label: '楼道',
+ id: '4',
+ selected: false,
+ children: [{
+ label: '楼道1区',
+ id: '4-1',
+ selected: false,
+ stop: false,
+ type: 3
+ }]
+ },
+]);
+
+export const controlType = ref([{
+ name: '托管',
+ type: 1,
+},{
+ name: 'AI',
+ type: 2,
+},{
+ name: '手动',
+ type: 3,
+}])
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/view/equipmentManage/group/config.ts b/hx-ai-intelligent/src/view/equipmentManage/group/config.ts
index 082faf5..4a51f89 100644
--- a/hx-ai-intelligent/src/view/equipmentManage/group/config.ts
+++ b/hx-ai-intelligent/src/view/equipmentManage/group/config.ts
@@ -4,10 +4,13 @@ import { http } from '/nerv-lib/util';
import { ref } from 'vue';
import { group } from '/@/api/deviceManage';
import { dict } from '/@/api';
-const tableKeyMap = [
+import { origanizemanage } from '/@/api/origanizemanage';
+const tableCalKeyMap = [
{
title: '来源企业',
- dataIndex: 'id',
+ dataIndex: 'orgName',
+ // textEllipsis: true,
+ // textNumber: 4,
},
{
title: '设备id',
@@ -32,20 +35,18 @@ const tableKeyMap = [
dataIndex: 'position',
},
];
-const tableCalKeyMap = [
+const tableKeyMap = [
{
title: '来源企业',
- dataIndex: 'id',
+ dataIndex: 'orgName',
},
{
title: '节点编号',
- dataIndex: 'deviceName',
- textNumber: 8,
- textEllipsis: true,
+ dataIndex: 'pointNum',
},
{
title: '节点路径',
- dataIndex: 'position',
+ dataIndex: 'routeName',
},
];
const doWnload = (url) => {
@@ -125,6 +126,26 @@ export const formSchema = [
],
},
];
+export const editTreeConfig = (orgId) => ({
+ selectedKeys: ['0-0'],
+ defaultExpandAll: true,
+ api: group.queryEditGroup,
+ params: { orgId },
+ resultField: 'data.orgInfos',
+ fieldNames: { title: 'orgName', key: 'orgId' },
+ formConfig: {
+ schemas: [
+ {
+ field: 'orgName',
+ component: 'NsInput',
+ autoSubmit: true,
+ componentProps: {
+ placeholder: '请输入企业名称',
+ },
+ },
+ ],
+ },
+});
export const treeConfig = (orgId) => {
return {
defaultExpandAll: true,
@@ -133,15 +154,8 @@ export const treeConfig = (orgId) => {
title: '能耗分组',
},
params: { orgId },
- showLine: { showLeafIcon: false },
+
api: group.queryDeviceGroupTree,
- // api: () => {
- // return new Promise((resolve) => {
- // setTimeout(() => {
- // resolve({ data: [{ title: '全部', key: 'all', children: data.data }] });
- // }, 100);
- // });
- // },
transform: (data) => {
return [{ pointName: '全部', id: 'all', selectable: false, children: data }];
},
@@ -176,12 +190,11 @@ export const treeConfig = (orgId) => {
},
};
};
-export const tableConfig = (el, elGroup, elFormula) => {
+export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
return {
title: '点位信息',
- // api: '/carbon_emission/device/getDeviceList',
- value: mockData.value,
-
+ api: group.queryGroupPage,
+ params: defaultParams.value,
headerActions: [
{
label: '编辑',
@@ -193,7 +206,7 @@ export const tableConfig = (el, elGroup, elFormula) => {
},
{
label: '批量删除',
- name: 'groupTemDownload',
+ name: 'groupBatDelete',
type: 'primary',
dynamicDisabled: (data: any) => {
return data.list.length === 0;
@@ -244,7 +257,7 @@ export const tableConfig = (el, elGroup, elFormula) => {
{
label: '批量分组',
- name: 'groupTemDownload',
+ name: 'groupBatGroup',
type: 'primary',
handle: () => {
elGroup.value.toggle();
@@ -252,7 +265,7 @@ export const tableConfig = (el, elGroup, elFormula) => {
},
{
label: '公式编辑',
- name: 'groupTemDownload',
+ name: 'groupFormulaEdit',
type: 'primary',
handle: () => {
elFormula.value.toggle();
@@ -265,7 +278,7 @@ export const tableConfig = (el, elGroup, elFormula) => {
actions: [
{
label: '删除',
- name: 'FeedBackDetail',
+ name: 'groupDelete',
dynamicParams: ['uuid', 'appealType'],
confirm: true,
handle: () => {
@@ -341,11 +354,13 @@ export const tableConfig = (el, elGroup, elFormula) => {
};
};
-export const tableConfigCal = (el, elGroup, elFormula) => {
+export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
+ // 分组节点
return {
title: '点位信息',
// api: '/carbon_emission/device/getDeviceList',
value: mockData.value,
+ params: defaultParams,
headerActions: [
{
@@ -413,12 +428,12 @@ export const tableConfigCal = (el, elGroup, elFormula) => {
actions: [
{
label: '删除',
- name: 'FeedBackDetail',
- dynamicParams: ['uuid', 'appealType'],
+ name: 'groupDelete',
+ dynamicParams: 'id',
confirm: true,
- handle: () => {
- mockData.value.splice(0, 1);
- },
+ isReload: true,
+ isClearCheck: true,
+ api: group.delGroupList,
},
],
},
diff --git a/hx-ai-intelligent/src/view/equipmentManage/group/edit.vue b/hx-ai-intelligent/src/view/equipmentManage/group/edit.vue
index 669dc6b..d43c189 100644
--- a/hx-ai-intelligent/src/view/equipmentManage/group/edit.vue
+++ b/hx-ai-intelligent/src/view/equipmentManage/group/edit.vue
@@ -1,53 +1,72 @@
-
+
+ @change="handleChange" />