feat: 分组管理

This commit is contained in:
xuziqiang
2024-07-09 16:27:21 +08:00
parent fb1980d73a
commit 30286253e7
9 changed files with 94 additions and 25 deletions

View File

@@ -62,7 +62,12 @@ const mockData = ref(data.listData);
export const formSchema = [
{
field: 'isCreate',
component: 'NsInput',
component: 'NsCheck',
show: false,
},
{
field: 'isCreatSon',
component: 'NsCheck',
show: false,
},
{
@@ -71,7 +76,12 @@ export const formSchema = [
show: false,
},
{
field: 'isCreatSon',
field: 'id',
component: 'NsInput',
show: false,
},
{
field: 'pid',
component: 'NsInput',
show: false,
},
@@ -95,10 +105,10 @@ export const formSchema = [
component: 'NsSelectApi',
componentProps: {
placeholder: '请选择节点类型(必填)',
api: dict,
params: { dicKey: 'COUNT_POINT' },
api: () => dict({ params: { dicKey: 'COUNT_POINT' } }),
// params: { dicKey: 'COUNT_POINT' },
immediate: true,
resultField: 'data.COUNT_POINT',
// resultField: 'data.COUNT_POINT',
labelField: 'cnValue',
valueField: 'cnValue',
},
@@ -118,6 +128,7 @@ export const treeConfig = (orgId) => {
title: '能耗分组',
},
params: { orgId },
showLine: { showLeafIcon: false },
api: group.queryDeviceGroupTree,
// api: () => {
// return new Promise((resolve) => {
@@ -127,7 +138,7 @@ export const treeConfig = (orgId) => {
// });
// },
transform: (data) => {
return [{ title: '全部', key: 'all', selectable: false, children: data }];
return [{ pointName: '全部', id: 'all', selectable: false, children: data }];
},
formConfig: {
schemas: [