Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
2cf914c5
Commit
2cf914c5
authored
Nov 13, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了基础标准页
parent
bc47f44f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
522 additions
and
12 deletions
+522
-12
basicStandards.data.ts
...views/dataStandards/basicStandards/basicStandards.data.ts
+110
-1
basicStandardsData.ts
src/views/dataStandards/basicStandards/basicStandardsData.ts
+225
-1
relatedDocumentModal.vue
...ews/dataStandards/basicStandards/relatedDocumentModal.vue
+3
-3
relatedIndicatorStandardsModal.vue
...andards/basicStandards/relatedIndicatorStandardsModal.vue
+79
-0
relatedMetaDataModal.vue
...ews/dataStandards/basicStandards/relatedMetaDataModal.vue
+4
-4
relatedPublicCodeModal.vue
...s/dataStandards/basicStandards/relatedPublicCodeModal.vue
+75
-0
relatedRelationships.vue
...ews/dataStandards/basicStandards/relatedRelationships.vue
+26
-3
No files found.
src/views/dataStandards/basicStandards/basicStandards.data.ts
View file @
2cf914c5
...
@@ -2632,6 +2632,100 @@ export const relatedBasicStandardsSchema: any[] = [
...
@@ -2632,6 +2632,100 @@ export const relatedBasicStandardsSchema: any[] = [
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
},
]
]
/**关联关系-关联指标标准 表单*/
export
const
relatedIndicatorStandardsSchema
:
any
[]
=
[
{
field
:
'indicatorStandardsTree'
,
label
:
'关联指标标准'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
fieldNames
:
{
label
:
'indicatorStandardsName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
required
:
true
,
},
{
field
:
'relatedRelationship'
,
label
:
'关联关系'
,
component
:
'Input'
,
rules
:
[
{
required
:
true
,
message
:
'请输入关联关系'
,
},
],
componentProps
:
{
placeholder
:
'请输入关联关系'
,
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'relatedDescription'
,
label
:
'关联描述'
,
component
:
'Input'
,
rules
:
[
{
required
:
true
,
message
:
'请输入关联描述'
,
},
],
componentProps
:
{
placeholder
:
'请输入关联描述'
,
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
]
/**关联关系-关联公共代码 表单*/
export
const
relatedPublicCodeSchema
:
any
[]
=
[
{
field
:
'publicCodeTree'
,
label
:
'关联公共代码'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
fieldNames
:
{
label
:
'publicCodeName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
required
:
true
,
},
{
field
:
'relatedRelationship'
,
label
:
'关联关系'
,
component
:
'Input'
,
rules
:
[
{
required
:
true
,
message
:
'请输入关联关系'
,
},
],
componentProps
:
{
placeholder
:
'请输入关联关系'
,
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'relatedDescription'
,
label
:
'关联描述'
,
component
:
'Input'
,
rules
:
[
{
required
:
true
,
message
:
'请输入关联描述'
,
},
],
componentProps
:
{
placeholder
:
'请输入关联描述'
,
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
]
/**关联关系-关联文档 表单*/
/**关联关系-关联文档 表单*/
export
const
relatedDocumentSchema
:
any
[]
=
[
export
const
relatedDocumentSchema
:
any
[]
=
[
{
{
...
@@ -2648,6 +2742,21 @@ export const relatedDocumentSchema: any[] = [
...
@@ -2648,6 +2742,21 @@ export const relatedDocumentSchema: any[] = [
},
},
required
:
true
,
required
:
true
,
},
},
{
field
:
'relatedRelationship'
,
label
:
'关联关系'
,
component
:
'Input'
,
rules
:
[
{
required
:
true
,
message
:
'请输入关联关系'
,
},
],
componentProps
:
{
placeholder
:
'请输入关联关系'
,
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
{
field
:
'relatedDescription'
,
field
:
'relatedDescription'
,
label
:
'关联描述'
,
label
:
'关联描述'
,
...
@@ -2673,7 +2782,7 @@ export const relatedMeteDataSchema: any[] = [
...
@@ -2673,7 +2782,7 @@ export const relatedMeteDataSchema: any[] = [
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
componentProps
:
{
fieldNames
:
{
fieldNames
:
{
label
:
'
meteData
Name'
,
label
:
'
workSpace
Name'
,
value
:
'businessId'
,
value
:
'businessId'
,
},
},
getPopupContainer
:
()
=>
document
.
body
,
getPopupContainer
:
()
=>
document
.
body
,
...
...
src/views/dataStandards/basicStandards/basicStandardsData.ts
View file @
2cf914c5
...
@@ -783,7 +783,7 @@ export const relatedQualityData = [
...
@@ -783,7 +783,7 @@ export const relatedQualityData = [
value
:
'0'
,
value
:
'0'
,
},
},
]
]
/**质量模版-树 数据*/
/**
关联关系-
质量模版-树 数据*/
export
const
qualityTreeData
:
any
[]
=
[
export
const
qualityTreeData
:
any
[]
=
[
{
{
"businessId"
:
100
,
"businessId"
:
100
,
...
@@ -838,3 +838,227 @@ export const qualityTreeData: any[] = [
...
@@ -838,3 +838,227 @@ export const qualityTreeData: any[] = [
"icon"
:
"ant-design:partition-outlined"
,
"icon"
:
"ant-design:partition-outlined"
,
}
}
];
];
/**关联关系-文档-树 数据*/
export
const
documentTreeData
:
any
[]
=
[
{
"businessId"
:
100
,
"documentName"
:
"文档模版"
,
"anotherName"
:
"文档模版"
,
"parentId"
:
0
,
"location"
:
"/文档模版"
,
"icon"
:
"ant-design:folder-open-outlined"
,
},
{
"businessId"
:
101
,
"documentName"
:
"CEA_POC_模版"
,
"anotherName"
:
"CEA_POC_模版"
,
"parentId"
:
100
,
"ancestors"
:
"0,100"
,
"icon"
:
"ant-design:folder-open-outlined"
,
},
{
"businessId"
:
102
,
"documentName"
:
"数据中台工作区01"
,
"anotherName"
:
"数据中台工作区01"
,
"parentId"
:
100
,
"ancestors"
:
"0,100"
,
"location"
:
"/文档模版/数据中台工作区01"
,
"icon"
:
"ant-design:folder-open-outlined"
,
},
{
"businessId"
:
201
,
"documentName"
:
"值域检查(倍数)"
,
"anotherName"
:
"值域检查(倍数)"
,
"parentId"
:
102
,
"ancestors"
:
"0,100,102"
,
"location"
:
"/文档模版/数据中台工作区01/值域检查(倍数)"
,
"icon"
:
"ant-design:partition-outlined"
,
},
{
"businessId"
:
202
,
"documentName"
:
"值域检查(数值大于零)"
,
"anotherName"
:
"值域检查(数值大于零)"
,
"parentId"
:
102
,
"ancestors"
:
"0,100,102"
,
"location"
:
"/文档模版/数据中台工作区01/值域检查(数值大于零)"
,
"icon"
:
"ant-design:partition-outlined"
,
},
{
"businessId"
:
204
,
"documentName"
:
"准取检查-数值大于等于n"
,
"anotherName"
:
"准取检查-数值大于等于n"
,
"parentId"
:
101
,
"ancestors"
:
"0,100,101"
,
"location"
:
"/文档模版/CEA_POC_模版/准取检查-数值大于等于n"
,
"icon"
:
"ant-design:partition-outlined"
,
}
];
/**关联关系-元数据-树 数据*/
export
const
meteDataTreeData
:
any
[]
=
[
{
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
100
,
workSpaceName
:
'数据库对象资源'
,
parentId
:
0
,
'code:'
:
'001'
,
ancestors
:
'0'
,
orderNum
:
0
,
children
:
[],
selectType
:
null
,
createTime
:
'2024-10-24 10:04:04'
,
createBy
:
'admin'
,
},
{
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
101
,
workSpaceName
:
'admin-个人工作区'
,
parentId
:
100
,
'code:'
:
'002'
,
ancestors
:
'0,100'
,
orderNum
:
1
,
children
:
[],
selectType
:
null
,
createTime
:
'2024-10-24 10:04:04'
,
createBy
:
'admin'
,
},
{
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
107
,
workSpaceName
:
'共享工作区'
,
parentId
:
100
,
'code:'
:
'003'
,
ancestors
:
'0,100'
,
orderNum
:
2
,
children
:
[],
selectType
:
null
,
createTime
:
'2024-10-24 10:04:04'
,
createBy
:
'admin'
,
},
{
delFlag
:
'0'
,
flag
:
'0'
,
businessId
:
203
,
workSpaceName
:
'高级工作区'
,
parentId
:
100
,
'code:'
:
'010'
,
ancestors
:
'0,100,107'
,
orderNum
:
2
,
children
:
[],
selectType
:
null
,
createTime
:
'2024-10-24 10:04:04'
,
createBy
:
'admin'
,
},
]
/**关联关系-指标标准-树 数据*/
export
const
indicatorTreeData
:
any
[]
=
[
{
"businessId"
:
100
,
"indicatorStandardsName"
:
"指标标准"
,
"anotherName"
:
"指标标准"
,
"parentId"
:
0
,
"location"
:
"/指标标准"
,
"icon"
:
"ant-design:folder-open-outlined"
,
},
{
"businessId"
:
101
,
"indicatorStandardsName"
:
"CEA_POC_模版"
,
"anotherName"
:
"CEA_POC_模版"
,
"parentId"
:
100
,
"ancestors"
:
"0,100"
,
"icon"
:
"ant-design:folder-open-outlined"
,
},
{
"businessId"
:
102
,
"indicatorStandardsName"
:
"数据中台工作区01"
,
"anotherName"
:
"数据中台工作区01"
,
"parentId"
:
100
,
"ancestors"
:
"0,100"
,
"location"
:
"/文档模版/数据中台工作区01"
,
"icon"
:
"ant-design:folder-open-outlined"
,
},
{
"businessId"
:
201
,
"indicatorStandardsName"
:
"值域检查(倍数)"
,
"anotherName"
:
"值域检查(倍数)"
,
"parentId"
:
102
,
"ancestors"
:
"0,100,102"
,
"location"
:
"/文档模版/数据中台工作区01/值域检查(倍数)"
,
"icon"
:
"ant-design:partition-outlined"
,
},
{
"businessId"
:
202
,
"indicatorStandardsName"
:
"值域检查(数值大于零)"
,
"anotherName"
:
"值域检查(数值大于零)"
,
"parentId"
:
102
,
"ancestors"
:
"0,100,102"
,
"location"
:
"/文档模版/数据中台工作区01/值域检查(数值大于零)"
,
"icon"
:
"ant-design:partition-outlined"
,
},
{
"businessId"
:
204
,
"indicatorStandardsName"
:
"准取检查-数值大于等于n"
,
"anotherName"
:
"准取检查-数值大于等于n"
,
"parentId"
:
101
,
"ancestors"
:
"0,100,101"
,
"location"
:
"/文档模版/CEA_POC_模版/准取检查-数值大于等于n"
,
"icon"
:
"ant-design:partition-outlined"
,
}
];
/**关联关系-公共代码-树 数据*/
export
const
publicCodeTreeData
:
any
[]
=
[
{
"businessId"
:
100
,
"publicCodeName"
:
"公共代码"
,
"anotherName"
:
"公共代码"
,
"parentId"
:
0
,
"location"
:
"/公共代码"
,
"icon"
:
"ant-design:folder-open-outlined"
,
},
{
"businessId"
:
101
,
"publicCodeName"
:
"CEA_POC_模版"
,
"anotherName"
:
"CEA_POC_模版"
,
"parentId"
:
100
,
"ancestors"
:
"0,100"
,
"icon"
:
"ant-design:folder-open-outlined"
,
},
{
"businessId"
:
102
,
"publicCodeName"
:
"数据中台工作区01"
,
"anotherName"
:
"数据中台工作区01"
,
"parentId"
:
100
,
"ancestors"
:
"0,100"
,
"location"
:
"/文档模版/数据中台工作区01"
,
"icon"
:
"ant-design:folder-open-outlined"
,
},
{
"businessId"
:
201
,
"publicCodeName"
:
"值域检查(倍数)"
,
"anotherName"
:
"值域检查(倍数)"
,
"parentId"
:
102
,
"ancestors"
:
"0,100,102"
,
"location"
:
"/文档模版/数据中台工作区01/值域检查(倍数)"
,
"icon"
:
"ant-design:partition-outlined"
,
},
{
"businessId"
:
202
,
"publicCodeName"
:
"值域检查(数值大于零)"
,
"anotherName"
:
"值域检查(数值大于零)"
,
"parentId"
:
102
,
"ancestors"
:
"0,100,102"
,
"location"
:
"/文档模版/数据中台工作区01/值域检查(数值大于零)"
,
"icon"
:
"ant-design:partition-outlined"
,
},
{
"businessId"
:
204
,
"publicCodeName"
:
"准取检查-数值大于等于n"
,
"anotherName"
:
"准取检查-数值大于等于n"
,
"parentId"
:
101
,
"ancestors"
:
"0,100,101"
,
"location"
:
"/文档模版/CEA_POC_模版/准取检查-数值大于等于n"
,
"icon"
:
"ant-design:partition-outlined"
,
}
];
src/views/dataStandards/basicStandards/relatedDocumentModal.vue
View file @
2cf914c5
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
relatedDocumentSchema
}
from
'./basicStandards.data'
;
import
{
relatedDocumentSchema
}
from
'./basicStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
qualityTreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
documentTreeData
,
qualityTreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'AccountModal'
});
defineOptions
({
name
:
'AccountModal'
});
...
@@ -35,10 +35,10 @@
...
@@ -35,10 +35,10 @@
setFieldsValue
({
setFieldsValue
({
...
data
.
record
,
...
data
.
record
,
})
})
const
treeList
=
handleTree
(
quality
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
const
treeList
=
handleTree
(
document
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
updateSchema
([
{
{
field
:
'
QualityId
'
,
field
:
'
documentTree
'
,
componentProps
:
{
componentProps
:
{
treeData
:
treeList
treeData
:
treeList
},
},
...
...
src/views/dataStandards/basicStandards/relatedIndicatorStandardsModal.vue
0 → 100644
View file @
2cf914c5
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
relatedDocumentSchema
,
relatedIndicatorStandardsSchema
}
from
'./basicStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
documentTreeData
,
indicatorTreeData
,
qualityTreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'关联指标标准'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
relatedIndicatorStandardsSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
...
data
.
record
,
})
const
treeList
=
handleTree
(
indicatorTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'indicatorStandardsTree'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
/**确定按钮*/
async
function
handleSubmit
()
{
createMessage
.
success
(
'移动成功'
);
closeModal
()
}
/**数组对象转成树*/
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
parentId
=
parentId
||
'parentId'
children
=
children
||
'children'
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
(
item
=>
{
return
item
[
parentId
]
}))
||
0
// 对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 循环所有项
const
treeData
=
cloneData
.
filter
(
father
=>
{
const
branchArr
=
cloneData
.
filter
(
child
=>
{
// 返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
]
})
branchArr
.
length
>
0
?
father
.
children
=
branchArr
:
''
// 返回第一层
return
father
[
parentId
]
===
rootId
})
return
treeData
!==
''
?
treeData
:
data
}
</
script
>
src/views/dataStandards/basicStandards/relatedMetaDataModal.vue
View file @
2cf914c5
...
@@ -9,14 +9,14 @@
...
@@ -9,14 +9,14 @@
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
relatedMeteDataSchema
}
from
'./basicStandards.data'
;
import
{
relatedMeteDataSchema
}
from
'./basicStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
qualityTreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
meteDataTreeData
,
qualityTreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'AccountModal'
});
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'关联元
模型
'
));
const
getTitle
=
computed
(()
=>
(
'关联元
数据
'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
...
@@ -35,10 +35,10 @@
...
@@ -35,10 +35,10 @@
setFieldsValue
({
setFieldsValue
({
...
data
.
record
,
...
data
.
record
,
})
})
const
treeList
=
handleTree
(
quality
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
const
treeList
=
handleTree
(
meteData
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
updateSchema
([
{
{
field
:
'
QualityId
'
,
field
:
'
meteDataTree
'
,
componentProps
:
{
componentProps
:
{
treeData
:
treeList
treeData
:
treeList
},
},
...
...
src/views/dataStandards/basicStandards/relatedPublicCodeModal.vue
0 → 100644
View file @
2cf914c5
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
relatedPublicCodeSchema
}
from
'./basicStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
publicCodeTreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'关联公共代码'
));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
relatedPublicCodeSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
...
data
.
record
,
})
const
treeList
=
handleTree
(
publicCodeTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'publicCodeTree'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
/**确定按钮*/
async
function
handleSubmit
()
{
createMessage
.
success
(
'移动成功'
);
closeModal
()
}
/**数组对象转成树*/
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
parentId
=
parentId
||
'parentId'
children
=
children
||
'children'
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
(
item
=>
{
return
item
[
parentId
]
}))
||
0
// 对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 循环所有项
const
treeData
=
cloneData
.
filter
(
father
=>
{
const
branchArr
=
cloneData
.
filter
(
child
=>
{
// 返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
]
})
branchArr
.
length
>
0
?
father
.
children
=
branchArr
:
''
// 返回第一层
return
father
[
parentId
]
===
rootId
})
return
treeData
!==
''
?
treeData
:
data
}
</
script
>
src/views/dataStandards/basicStandards/relatedRelationships.vue
View file @
2cf914c5
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
</BasicTable>
</BasicTable>
<BasicTable
@
register=
"registerTable4"
>
<BasicTable
@
register=
"registerTable4"
>
<
template
#
toolbar
>
<
template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"Button"
>
引用公共代码
</a-button>
<a-button
type=
"primary"
@
click=
"
referencePublicCode
Button"
>
引用公共代码
</a-button>
</
template
>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<template
v-if=
"column.key === 'action'"
>
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
</BasicTable>
</BasicTable>
<BasicTable
@
register=
"registerTable5"
>
<BasicTable
@
register=
"registerTable5"
>
<
template
#
toolbar
>
<
template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"Button"
>
引用标准
</a-button>
<a-button
type=
"primary"
@
click=
"
referenceIndicatorStandards
Button"
>
引用标准
</a-button>
</
template
>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<template
v-if=
"column.key === 'action'"
>
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
<BasicTable
@
register=
"registerTable6"
>
<BasicTable
@
register=
"registerTable6"
>
<
template
#
toolbar
>
<
template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"Button"
>
智能推荐元数据
</a-button>
<a-button
type=
"primary"
@
click=
"Button"
>
智能推荐元数据
</a-button>
<a-button
type=
"primary"
@
click=
"Button"
>
关联元数据
</a-button>
<a-button
type=
"primary"
@
click=
"
referenceMetaData
Button"
>
关联元数据
</a-button>
</
template
>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<template
v-if=
"column.key === 'action'"
>
...
@@ -138,6 +138,11 @@
...
@@ -138,6 +138,11 @@
<RelatedMetaDataModal
@
register=
"registerMetaDataModal"
@
success=
"handleSuccess"
/>
<RelatedMetaDataModal
@
register=
"registerMetaDataModal"
@
success=
"handleSuccess"
/>
<!-- 引用文档 弹窗-->
<!-- 引用文档 弹窗-->
<RelatedDocumentModal
@
register=
"registerDocumentModal"
@
success=
"handleSuccess"
/>
<RelatedDocumentModal
@
register=
"registerDocumentModal"
@
success=
"handleSuccess"
/>
<!-- 引用公共代码 弹窗-->
<RelatedPublicCodeModal
@
register=
"registerPublicCodeModal"
@
success=
"handleSuccess"
/>
<!-- 引用指标标准 弹窗-->
<RelatedIndicatorStandardsModal
@
register=
"registerIndicatorStandardsModal"
@
success=
"handleSuccess"
/>
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -154,6 +159,8 @@ import RelatedQualityModal from './relatedQualityModal.vue';
...
@@ -154,6 +159,8 @@ import RelatedQualityModal from './relatedQualityModal.vue';
import
RelatedBasicStandardModal
from
'./relatedBasicStandardModal.vue'
;
import
RelatedBasicStandardModal
from
'./relatedBasicStandardModal.vue'
;
import
RelatedMetaDataModal
from
'./relatedMetaDataModal.vue'
;
import
RelatedMetaDataModal
from
'./relatedMetaDataModal.vue'
;
import
RelatedDocumentModal
from
'./relatedDocumentModal.vue'
;
import
RelatedDocumentModal
from
'./relatedDocumentModal.vue'
;
import
RelatedIndicatorStandardsModal
from
'./relatedIndicatorStandardsModal.vue'
;
import
RelatedPublicCodeModal
from
'./relatedPublicCodeModal.vue'
;
import
{
import
{
relatedRelationshipColumns1
,
relatedRelationshipColumns1
,
relatedRelationshipColumns2
,
relatedRelationshipColumns2
,
...
@@ -180,6 +187,8 @@ const [registerRelatedQualityModal, { openModal: openRelatedQualityModal }] = us
...
@@ -180,6 +187,8 @@ const [registerRelatedQualityModal, { openModal: openRelatedQualityModal }] = us
const
[
registerBasicStandardModal
,
{
openModal
:
openBasicStandardModal
}]
=
useModal
();
const
[
registerBasicStandardModal
,
{
openModal
:
openBasicStandardModal
}]
=
useModal
();
const
[
registerMetaDataModal
,
{
openModal
:
openMetaDataModal
}]
=
useModal
();
const
[
registerMetaDataModal
,
{
openModal
:
openMetaDataModal
}]
=
useModal
();
const
[
registerDocumentModal
,
{
openModal
:
openDocumentModal
}]
=
useModal
();
const
[
registerDocumentModal
,
{
openModal
:
openDocumentModal
}]
=
useModal
();
const
[
registerPublicCodeModal
,
{
openModal
:
openPublicCodeModal
}]
=
useModal
();
const
[
registerIndicatorStandardsModal
,
{
openModal
:
openIndicatorStandardsModal
}]
=
useModal
();
/**列表*/
/**列表*/
const
[
registerTable1
]
=
useTable
({
const
[
registerTable1
]
=
useTable
({
...
@@ -346,6 +355,20 @@ const [registerTable6] = useTable({
...
@@ -346,6 +355,20 @@ const [registerTable6] = useTable({
});
});
/**引用指标标准 按钮*/
function
referenceIndicatorStandardsButton
(
record
)
{
openIndicatorStandardsModal
(
true
,{
})
}
/**引用公共代码 按钮*/
function
referencePublicCodeButton
(
record
)
{
openPublicCodeModal
(
true
,{
})
}
/**引用元数据 按钮*/
/**引用元数据 按钮*/
function
referenceMetaDataButton
(
record
)
{
function
referenceMetaDataButton
(
record
)
{
openMetaDataModal
(
true
,{
openMetaDataModal
(
true
,{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment