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
24a1aab9
Commit
24a1aab9
authored
Nov 13, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了基础标准页
parent
2cf914c5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
391 additions
and
3 deletions
+391
-3
basicStandards.data.ts
...views/dataStandards/basicStandards/basicStandards.data.ts
+141
-0
basicStandardsData.ts
src/views/dataStandards/basicStandards/basicStandardsData.ts
+38
-0
recommendedMetadataModal.vue
...dataStandards/basicStandards/recommendedMetadataModal.vue
+124
-0
recommendedMetadataTipModal.vue
...aStandards/basicStandards/recommendedMetadataTipModal.vue
+76
-0
relatedRelationships.vue
...ews/dataStandards/basicStandards/relatedRelationships.vue
+12
-3
No files found.
src/views/dataStandards/basicStandards/basicStandards.data.ts
View file @
24a1aab9
...
@@ -2805,3 +2805,144 @@ export const relatedMeteDataSchema: any[] = [
...
@@ -2805,3 +2805,144 @@ export const relatedMeteDataSchema: any[] = [
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
},
]
]
/**关联关系-智能推荐元数据 表单*/
export
const
recommendedMetadataSchema
:
FormSchema
[]
=
[
{
field
:
'standardPath'
,
label
:
'标准路径'
,
component
:
'Input'
,
defaultValue
:
'/基础标准/DMP_admin-个人工作区/当前就读学校'
,
componentProps
:
{
style
:
{
border
:
'none'
,
},
readOnly
:
true
,
disabled
:
true
,
placeholder
:
'请输入标准路径'
,
},
colProps
:
{
lg
:
12
,
md
:
12
},
},
{
field
:
'dataSource'
,
label
:
'数据源'
,
component
:
'Input'
,
defaultValue
:
'argodb_test'
,
componentProps
:
{
style
:
{
border
:
'none'
,
},
readOnly
:
true
,
disabled
:
true
,
placeholder
:
'请输入数据源'
,
},
colProps
:
{
lg
:
12
,
md
:
12
},
},
{
field
:
'standardChineseName'
,
label
:
'标准中文名称'
,
component
:
'Input'
,
defaultValue
:
'当前就读学校'
,
componentProps
:
{
style
:
{
border
:
'none'
,
},
readOnly
:
true
,
disabled
:
true
,
placeholder
:
'请输入标准中文名称'
,
},
colProps
:
{
lg
:
12
,
md
:
12
},
},
{
field
:
'standardEnglishName'
,
label
:
'标准英文名称'
,
component
:
'Input'
,
defaultValue
:
'current_school'
,
componentProps
:
{
style
:
{
border
:
'none'
,
},
readOnly
:
true
,
disabled
:
true
,
placeholder
:
'请输入标准英文名称'
,
},
colProps
:
{
lg
:
12
,
md
:
12
},
},
];
/**关联关系-智能推荐元数据 列表*/
export
const
recommendedMetadataColumns
:
BasicColumn
[]
=
[
{
title
:
'字段名称'
,
dataIndex
:
'fieldName'
,
width
:
150
,
},
{
title
:
'字段注释'
,
dataIndex
:
'fieldComment'
,
width
:
150
,
},
{
title
:
'字段类型'
,
dataIndex
:
'fieldType'
,
width
:
150
,
},
{
title
:
'推荐度'
,
dataIndex
:
'recommendationLevel'
,
width
:
150
,
},
{
title
:
'映射描述'
,
dataIndex
:
'mappingDescription'
,
width
:
150
,
editable
:
true
,
edit
:
true
},
];
/**关联关系-智能推荐元数据-提示 表单*/
export
const
recommendedMetadataTipsSchema
:
FormSchema
[]
=
[
{
field
:
'standardPath'
,
label
:
'标准路径'
,
component
:
'Input'
,
defaultValue
:
'/基础标准/DMP_admin-个人工作区/当前就读学校'
,
componentProps
:
{
style
:
{
border
:
'none'
,
},
readOnly
:
true
,
disabled
:
true
,
placeholder
:
'请输入标准路径'
,
},
colProps
:
{
lg
:
12
,
md
:
12
},
},
{
field
:
'standardChineseName'
,
label
:
'标准中文名称'
,
component
:
'Input'
,
defaultValue
:
'当前就读学校'
,
componentProps
:
{
style
:
{
border
:
'none'
,
},
readOnly
:
true
,
disabled
:
true
,
placeholder
:
'请输入标准中文名称'
,
},
colProps
:
{
lg
:
12
,
md
:
12
},
},
{
field
:
'standardEnglishName'
,
label
:
'标准英文名称'
,
component
:
'Input'
,
defaultValue
:
'current_school'
,
componentProps
:
{
style
:
{
border
:
'none'
,
},
readOnly
:
true
,
disabled
:
true
,
placeholder
:
'请输入标准英文名称'
,
},
colProps
:
{
lg
:
12
,
md
:
12
},
},
];
src/views/dataStandards/basicStandards/basicStandardsData.ts
View file @
24a1aab9
...
@@ -1062,3 +1062,41 @@ export const publicCodeTreeData: any[] = [
...
@@ -1062,3 +1062,41 @@ export const publicCodeTreeData: any[] = [
"icon"
:
"ant-design:partition-outlined"
,
"icon"
:
"ant-design:partition-outlined"
,
}
}
];
];
/**关联关系-智能推荐元数据 数据*/
export
const
recommendedMetadataData
=
[
{
fieldName
:
'current_school'
,
fieldComment
:
'数值类'
,
fieldType
:
'string'
,
recommendationLevel
:
'100%'
,
mappingDescription
:
''
},
{
fieldName
:
'current_school'
,
fieldComment
:
'数值类'
,
fieldType
:
'string'
,
recommendationLevel
:
'98%'
,
mappingDescription
:
''
},{
fieldName
:
'current_school'
,
fieldComment
:
'数值类'
,
fieldType
:
'string'
,
recommendationLevel
:
'99%'
,
mappingDescription
:
''
},
{
fieldName
:
'current_school'
,
fieldComment
:
'数值类'
,
fieldType
:
'string'
,
recommendationLevel
:
'100%'
,
mappingDescription
:
''
},
{
fieldName
:
'current_school'
,
fieldComment
:
'数值类'
,
fieldType
:
'string'
,
recommendationLevel
:
'95'
,
mappingDescription
:
''
},
]
src/views/dataStandards/basicStandards/recommendedMetadataModal.vue
0 → 100644
View file @
24a1aab9
<
template
>
<BasicModal
width=
"55%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
<BasicTable
@
register=
"registerTable1"
/>
<template
#
footer
>
<a-button
type=
"primary"
@
click=
"handleCancel"
>
取消
</a-button>
<a-button
type=
"primary"
@
click=
"handleSubmit"
>
确定
</a-button>
<a-button
type=
"primary"
@
click=
"handleSubmit"
>
确认并创建质量规则
</a-button>
</
template
>
<!-- 提示弹窗-->
<RecommendedMetadataTipModal
@
register=
"registerTipsModal"
@
success=
"handleSuccess"
/>
</BasicModal>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
recommendedMetadataColumns
,
recommendedMetadataSchema
,
relatedQualityColumns
,
}
from
'./basicStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
qualityTreeData
,
recommendedMetadataData
,
relatedQualityData
,
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
RecommendedMetadataTipModal
from
'./recommendedMetadataTipModal.vue'
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'智能推荐元数据'
));
const
[
registerTipsModal
,
{
openModal
:
openTipsModal
}]
=
useModal
();
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
recommendedMetadataSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
,
showCancelBtn
:
false
,
showOkBtn
:
false
});
setFieldsValue
({
...
data
.
record
,
})
const
treeList
=
handleTree
(
qualityTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'QualityId'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
const
[
registerTable1
]
=
useTable
({
title
:
'参数配置'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
recommendedMetadataData
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
recommendedMetadataData
};
},
rowKey
:
'businessId'
,
rowSelection
:
true
,
columns
:
recommendedMetadataColumns
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
bordered
:
true
,
});
/**取消按钮*/
async
function
handleCancel
()
{
closeModal
()
}
/**确定按钮*/
async
function
handleSubmit
()
{
openTipsModal
(
true
,{
})
}
/**数组对象转成树*/
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/recommendedMetadataTipModal.vue
0 → 100644
View file @
24a1aab9
<
template
>
<BasicModal
width=
"55%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
<Alert
type=
"error"
show-icon
message=
"后台只能推荐开关未开启,无法使用智能推荐功能"
description=
"后台开关开启之前,需要确认是否已经完整针对当前使用场景的AI建模和机器学习等前置实施工作,否则TDS无法提供准确的智能推荐功能"
/>
<template
#
footer
>
<a-button
type=
"primary"
@
click=
"handleCancel"
>
取消
</a-button>
<a-button
type=
"primary"
@
click=
"handleSubmit"
>
确定
</a-button>
</
template
>
</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
{
recommendedMetadataColumns
,
recommendedMetadataSchema
,
recommendedMetadataTipsSchema
,
relatedQualityColumns
,
}
from
'./basicStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
qualityTreeData
,
recommendedMetadataData
,
relatedQualityData
,
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
Alert
}
from
'ant-design-vue'
;
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
:
recommendedMetadataTipsSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
,
showCancelBtn
:
false
,
showOkBtn
:
false
});
setFieldsValue
({
...
data
.
record
,
})
const
treeList
=
handleTree
(
qualityTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
updateSchema
([
{
field
:
'QualityId'
,
componentProps
:
{
treeData
:
treeList
},
},
]);
});
/**取消按钮*/
async
function
handleCancel
()
{
closeModal
()
}
/**确定按钮*/
async
function
handleSubmit
()
{
closeModal
()
}
</
script
>
src/views/dataStandards/basicStandards/relatedRelationships.vue
View file @
24a1aab9
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
</BasicTable>
</BasicTable>
<BasicTable
@
register=
"registerTable6"
>
<BasicTable
@
register=
"registerTable6"
>
<
template
#
toolbar
>
<
template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"Button"
>
智能推荐元数据
</a-button>
<a-button
type=
"primary"
@
click=
"
recommendMetaData
Button"
>
智能推荐元数据
</a-button>
<a-button
type=
"primary"
@
click=
"referenceMetaDataButton"
>
关联元数据
</a-button>
<a-button
type=
"primary"
@
click=
"referenceMetaDataButton"
>
关联元数据
</a-button>
</
template
>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<
template
#
bodyCell=
"{ column, record }"
>
...
@@ -142,7 +142,8 @@
...
@@ -142,7 +142,8 @@
<RelatedPublicCodeModal
@
register=
"registerPublicCodeModal"
@
success=
"handleSuccess"
/>
<RelatedPublicCodeModal
@
register=
"registerPublicCodeModal"
@
success=
"handleSuccess"
/>
<!-- 引用指标标准 弹窗-->
<!-- 引用指标标准 弹窗-->
<RelatedIndicatorStandardsModal
@
register=
"registerIndicatorStandardsModal"
@
success=
"handleSuccess"
/>
<RelatedIndicatorStandardsModal
@
register=
"registerIndicatorStandardsModal"
@
success=
"handleSuccess"
/>
<!-- 智能推荐元数据 弹窗-->
<RecommendedMetadataModal
@
register=
"registerRecommendedMetadataModal"
@
success=
"handleSuccess"
/>
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -161,6 +162,7 @@ import RelatedMetaDataModal from './relatedMetaDataModal.vue';
...
@@ -161,6 +162,7 @@ import RelatedMetaDataModal from './relatedMetaDataModal.vue';
import
RelatedDocumentModal
from
'./relatedDocumentModal.vue'
;
import
RelatedDocumentModal
from
'./relatedDocumentModal.vue'
;
import
RelatedIndicatorStandardsModal
from
'./relatedIndicatorStandardsModal.vue'
;
import
RelatedIndicatorStandardsModal
from
'./relatedIndicatorStandardsModal.vue'
;
import
RelatedPublicCodeModal
from
'./relatedPublicCodeModal.vue'
;
import
RelatedPublicCodeModal
from
'./relatedPublicCodeModal.vue'
;
import
RecommendedMetadataModal
from
'./recommendedMetadataModal.vue'
;
import
{
import
{
relatedRelationshipColumns1
,
relatedRelationshipColumns1
,
relatedRelationshipColumns2
,
relatedRelationshipColumns2
,
...
@@ -189,7 +191,7 @@ const [registerMetaDataModal, { openModal: openMetaDataModal }] = useModal();
...
@@ -189,7 +191,7 @@ const [registerMetaDataModal, { openModal: openMetaDataModal }] = useModal();
const
[
registerDocumentModal
,
{
openModal
:
openDocumentModal
}]
=
useModal
();
const
[
registerDocumentModal
,
{
openModal
:
openDocumentModal
}]
=
useModal
();
const
[
registerPublicCodeModal
,
{
openModal
:
openPublicCodeModal
}]
=
useModal
();
const
[
registerPublicCodeModal
,
{
openModal
:
openPublicCodeModal
}]
=
useModal
();
const
[
registerIndicatorStandardsModal
,
{
openModal
:
openIndicatorStandardsModal
}]
=
useModal
();
const
[
registerIndicatorStandardsModal
,
{
openModal
:
openIndicatorStandardsModal
}]
=
useModal
();
const
[
registerRecommendedMetadataModal
,
{
openModal
:
openRecommendMetadataModal
}]
=
useModal
();
/**列表*/
/**列表*/
const
[
registerTable1
]
=
useTable
({
const
[
registerTable1
]
=
useTable
({
title
:
'质量模版'
,
title
:
'质量模版'
,
...
@@ -369,6 +371,13 @@ function referencePublicCodeButton(record) {
...
@@ -369,6 +371,13 @@ function referencePublicCodeButton(record) {
})
})
}
}
/**智能推荐元数据 按钮*/
function
recommendMetaDataButton
(
record
)
{
openRecommendMetadataModal
(
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