fix ml group (#12172)

This commit is contained in:
JieguangZhou 2022-09-28 18:30:52 +08:00 committed by GitHub
parent 4973b30efb
commit 856083d591
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 59 additions and 0 deletions

View File

@ -791,6 +791,7 @@ export default {
logic: 'Logic',
di: 'Data Integration',
dq: 'Data Quality',
ml: 'Machine Learning',
other: 'Other',
}
}

View File

@ -771,6 +771,7 @@ export default {
logic: '逻辑节点',
di: '数据集成',
dq: '数据质量',
ml: '机器学习',
other: '其他',
}
}

View File

@ -38,6 +38,7 @@ export default defineComponent({
logic: [],
di: [],
dq: [],
ml: [],
other: [],
fav: []
})
@ -68,6 +69,9 @@ export default defineComponent({
variables.dq = variables.dataList.filter(
(item: any) => item.taskType === 'DataQuality'
)
variables.ml = variables.dataList.filter(
(item: any) => item.taskType === 'MachineLearning'
)
variables.other = variables.dataList.filter(
(item: any) => item.taskType === 'Other'
)
@ -413,6 +417,59 @@ export default defineComponent({
}}
></NCollapseItem>
)}
{variables.ml.length > 0 && (
<NCollapseItem
title={t('project.menu.ml')}
name='5'
class='task-cate-ml'
v-slots={{
default: () => {
return variables.ml.map((task: any) => (
<div
class={[styles.draggable, `task-item-${task.type}`]}
draggable='true'
onDragstart={(e) => {
context.emit('dragStart', e, task.type as TaskType)
}}
>
<em
class={[
styles['sidebar-icon'],
styles['icon-' + task.type.toLocaleLowerCase()]
]}
/>
<span>{task.taskName}</span>
<div
class={styles.stars}
onMouseenter={() => {
task.starHover = true
}}
onMouseleave={() => {
task.starHover = false
}}
onClick={() => handleCollection(task)}
>
<NIcon
size='20'
color={
task.collection || task.starHover
? '#288FFF'
: '#ccc'
}
>
{task.collection ? (
<StarFilled />
) : (
<StarOutlined />
)}
</NIcon>
</div>
</div>
))
}
}}
></NCollapseItem>
)}
{variables.other.length > 0 && (
<NCollapseItem
title={t('project.menu.other')}