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
a50f2ba4
Commit
a50f2ba4
authored
Nov 22, 2024
by
zxw
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
4aeea9ef
113ba2c7
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
2588 additions
and
13 deletions
+2588
-13
projectSetting.ts
src/settings/projectSetting.ts
+0
-1
DeplysModal.vue
...dataIntegration/dataLoading/dataEntryLake/DeplysModal.vue
+112
-0
GroupTree.vue
...s/dataIntegration/dataLoading/dataEntryLake/GroupTree.vue
+84
-0
dataEntry.data.ts
...taIntegration/dataLoading/dataEntryLake/dataEntry.data.ts
+166
-0
databaseOfflineLoading.vue
...tion/dataLoading/dataEntryLake/databaseOfflineLoading.vue
+356
-0
fileOfflineLoading.vue
...egration/dataLoading/dataEntryLake/fileOfflineLoading.vue
+13
-0
getMetadataModal.vue
...ntegration/dataLoading/dataEntryLake/getMetadataModal.vue
+80
-0
importModal.vue
...dataIntegration/dataLoading/dataEntryLake/importModal.vue
+70
-0
index.vue
...views/dataIntegration/dataLoading/dataEntryLake/index.vue
+255
-0
mock.ts
src/views/dataIntegration/dataLoading/dataEntryLake/mock.ts
+790
-0
moveFile.vue
...ws/dataIntegration/dataLoading/dataEntryLake/moveFile.vue
+112
-0
newFolder.vue
...s/dataIntegration/dataLoading/dataEntryLake/newFolder.vue
+144
-0
offlineLoading.data.ts
...egration/dataLoading/dataEntryLake/offlineLoading.data.ts
+255
-0
sceneSelectionModal.vue
...gration/dataLoading/dataEntryLake/sceneSelectionModal.vue
+80
-0
treeTwo.vue
...ews/dataIntegration/dataLoading/dataEntryLake/treeTwo.vue
+60
-0
index.vue
src/views/dataQuality/dataSheet/template/index.vue
+0
-1
executionRecord.vue
.../APIDataSecurity/sensitiveRecognition/executionRecord.vue
+1
-1
index.vue
...ataService/APIDataSecurity/sensitiveRecognition/index.vue
+1
-1
mock.ts
.../dataService/APIDataSecurity/sensitiveRecognition/mock.ts
+9
-9
No files found.
src/settings/projectSetting.ts
View file @
a50f2ba4
...
...
@@ -34,7 +34,6 @@ const setting: ProjectConfig = {
// ROLE:前端模式(菜单路由分开)
permissionMode
:
PermissionModeEnum
.
BACK
,
// 权限缓存存放位置。默认存放于localStorage
permissionCacheType
:
CacheTypeEnum
.
LOCAL
,
...
...
src/views/dataIntegration/dataLoading/dataEntryLake/DeplysModal.vue
0 → 100644
View file @
a50f2ba4
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
minHeight=
"50"
>
<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
{
MoveFormSchema
}
from
'./dataEntry.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
'./mock'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
rowId
=
ref
(
''
);
const
idList
=
ref
([]);
const
rowData
=
ref
([]);
let
isMove
=
ref
();
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
span
:
24
},
schemas
:
MoveFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
console
.
log
(
'data'
,
data
);
// //每次点击弹窗 需要清空存储的数据
rowData
.
value
=
[];
isMove
.
value
=
data
.
isMove
;
// //重置表单数据
resetFields
();
setModalProps
({
confirmLoading
:
false
});
// if (data.idList != null && data.idList.length > 0) {
// /* empty */
// } else {
// rowData.value.push(data.record);
// //单个移动
// rowId.value = data.record.businessId;
// data.record.taskId = data.record.businessId;
// setFieldsValue({
// ...data.record,
// });
// }
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
);
updateSchema
([
{
field
:
'taskId'
,
componentProps
:
{
treeData
:
treeList
,
},
},
]);
console
.
log
(
'treeList:'
,
treeList
);
});
const
getTitle
=
computed
(()
=>
'移动'
);
/**确定按钮*/
async
function
handleSubmit
()
{
// console.log('isMove.value', isMove.value);
if
(
isMove
.
value
===
1
)
{
createMessage
.
success
(
'移动成功!'
);
}
else
{
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/dataIntegration/dataLoading/dataEntryLake/GroupTree.vue
0 → 100644
View file @
a50f2ba4
<
template
>
<div
class=
"m-5 mr-0 overflow-hidden bg-white"
>
<BasicTree
title=
""
ref=
"treeRef"
treeWrapperClassName=
"h-[calc(100%-35px)] overflow-auto"
:defaultExpandAll=
"true"
:treeData=
"treeData"
:fieldNames=
"
{ key: 'businessId', title: 'workSpaceName' }"
@select="handleSelect"
/>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicTree
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
Nullable
}
from
'@vben/types'
;
import
{
TreeData
}
from
'./mock.ts'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useModal
}
from
'@/components/Modal'
;
const
emit
=
defineEmits
([
'select'
]);
const
{
createMessage
}
=
useMessage
();
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
function
getTree
()
{
const
tree
=
unref
(
treeRef
);
if
(
!
tree
)
{
throw
new
Error
(
'tree is null!'
);
}
return
tree
;
}
const
[
registerModal
,
{
openModal
}]
=
useModal
();
async
function
fetch
()
{
treeData
.
value
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
);
await
nextTick
(()
=>
{
getTree
().
expandAll
(
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
;
}
// function handleSelect() {
// const keys = getTree().getSelectedKeys();
// const node = getTree().getSelectedNode(keys[0]);
// // console.log('node', node);
// emit('select', node);
// }
/**选中的数据*/
function
handleSelect
(
keys
)
{
emit
(
'select'
,
keys
[
0
]);
}
onMounted
(()
=>
{
fetch
();
});
</
script
>
src/views/dataIntegration/dataLoading/dataEntryLake/dataEntry.data.ts
0 → 100644
View file @
a50f2ba4
import
{
getAllRoleList
}
from
'@/api/system/role/role'
;
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
export
const
columns
:
BasicColumn
[]
=
[
{
title
:
'名称'
,
dataIndex
:
'name'
,
width
:
120
,
// slots: { customRender: 'name' },
},
{
title
:
'场景'
,
dataIndex
:
'scene'
,
width
:
150
,
},
{
title
:
'权属工作组'
,
dataIndex
:
'workgroup'
,
width
:
120
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createTime'
,
width
:
150
,
},
{
title
:
'更新时间'
,
dataIndex
:
'updateTime'
,
width
:
150
,
},
{
title
:
'拥有者'
,
dataIndex
:
'owner'
,
width
:
100
,
},
{
title
:
'发布状态'
,
dataIndex
:
'releaseStatus'
,
width
:
120
,
},
];
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
field
:
'name'
,
label
:
' '
,
component
:
'Input'
,
colProps
:
{
span
:
5
},
componentProps
:
{
placeholder
:
'输入关键字搜索'
,
},
},
{
field
:
'releaseStatus'
,
label
:
' '
,
component
:
'Select'
,
colProps
:
{
span
:
5
},
componentProps
:
{
placeholder
:
'发布状态'
,
options
:
[
{
label
:
'未发布'
,
value
:
'未发布'
},
{
label
:
'已发布'
,
value
:
'已发布'
},
{
label
:
'审核中'
,
value
:
'审核中'
},
{
label
:
'已下线'
,
value
:
'已下线'
},
],
},
},
];
/**移动*/
export
const
MoveFormSchema
:
any
[]
=
[
{
field
:
'taskId'
,
label
:
'路径'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
// border: 'none',
fieldNames
:
{
label
:
'workSpaceName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
required
:
true
,
},
];
export
const
formSchemaNewFolder
:
any
=
[
{
field
:
'path'
,
label
:
'路径'
,
component
:
'TreeSelect'
,
rules
:
[
{
required
:
true
,
message
:
'请选择上级菜单'
,
},
],
componentProps
:
{
fieldNames
:
{
label
:
'workSpaceName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'name'
,
label
:
'文件夹名称'
,
component
:
'Input'
,
colProps
:
{
span
:
8
},
componentProps
:
{
placeholder
:
'输入文件夹名称'
,
},
},
// {
// field: 'fileType',
// label: '权限模式',
// component: 'RadioGroup',
// defaultValue: '本级定义',
// colProps: { span: 8 },
// componentProps: {
// options: [
// { label: '本级定义', value: '本级定义' },
// { label: '资源自定义', value: '资源自定义' },
// ],
// placeholder: '输入描述',
// },
// },
// {
// field: 'group',
// label: '权属工作组',
// component: 'Select',
// defaultValue: '默认工作组',
// colProps: { span: 8 },
// componentProps: {
// placeholder: '输入描述',
// options: [{ label: '默认工作组', value: '默认工作组' }],
// },
// },
];
export
const
importFormSchema
:
any
[]
=
[
{
field
:
'fileMethods'
,
label
:
'导入文件选择'
,
slot
:
'fileMethods'
,
colProps
:
{
lg
:
24
,
md
:
24
,
offset
:
3
},
},
{
field
:
'fileRename'
,
label
:
'文件重名'
,
component
:
'RadioGroup'
,
required
:
true
,
colProps
:
{
lg
:
24
,
md
:
24
,
offset
:
3
},
componentProps
:
{
options
:
[
{
label
:
'全部放弃'
,
value
:
'1'
},
{
label
:
'全部替换'
,
value
:
'2'
},
{
label
:
'自动重命名'
,
value
:
'3'
},
],
},
},
];
src/views/dataIntegration/dataLoading/dataEntryLake/databaseOfflineLoading.vue
0 → 100644
View file @
a50f2ba4
This diff is collapsed.
Click to expand it.
src/views/dataIntegration/dataLoading/dataEntryLake/fileOfflineLoading.vue
0 → 100644
View file @
a50f2ba4
<
template
>
</
template
>
<
script
>
export
default
{
name
:
"databaseOfflineLoading"
}
</
script
>
<
style
scoped
>
</
style
>
src/views/dataIntegration/dataLoading/dataEntryLake/getMetadataModal.vue
0 → 100644
View file @
a50f2ba4
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"registerModal"
title=
"获取元数据"
@
ok=
"handleSubmit"
minHeight=
"50"
>
<div
style=
"display: flex; justify-content: space-between"
>
<a-input-search
style=
"width: 220px"
/>
<a-button
@
click=
"handleClick"
>
通过序号批量选择
<Icon
v-if=
"unfold"
icon=
"fe:arrow-up"
/>
<Icon
v-else
icon=
"fe:arrow-down"
/>
</a-button>
</div>
<div
v-if=
"unfold"
>
从
<a-input
class=
"getMetadataInput"
style=
"margin-right: 5px"
/>
到
<a-input
class=
"getMetadataInput"
style=
"margin-right: 5px; margin-left: 5px"
/>
<a-button
style=
"margin-right: 5px"
>
选择
</a-button>
<a-button
style=
"margin-right: 5px"
>
清空
</a-button>
</div>
<BasicTable
@
register=
"registerTable"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
'vue'
;
import
{
BasicTable
,
useTable
}
from
'@/components/Table'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
getMetadataTableList
}
from
'@/views/dataIntegration/dataLoading/dataEntryLake/mock'
;
import
{
getMetadataColumns
}
from
'@/views/dataIntegration/dataLoading/dataEntryLake/offlineLoading.data'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
unfold
=
ref
(
false
);
let
getMetadataTable
=
ref
(
getMetadataTableList
);
const
[
registerTable
]
=
useTable
({
api
:
async
()
=>
{
const
response
=
{
pageNu
:
'1'
,
pageSize
:
'5'
,
pages
:
'1'
,
total
:
getMetadataTable
.
value
.
length
,
code
:
''
,
message
:
''
,
data
:
getMetadataTable
.
value
,
};
return
{
...
response
};
},
scroll
:
{
y
:
300
},
rowKey
:
'businessId'
,
rowSelection
:
true
,
columns
:
getMetadataColumns
,
showTableSetting
:
false
,
showIndexColumn
:
true
,
bordered
:
false
,
});
//初始化弹框
const
[
registerModal
,
{
closeModal
}]
=
useModalInner
(
async
()
=>
{});
function
handleClick
()
{
unfold
.
value
=
!
unfold
.
value
;
}
/**确定按钮*/
async
function
handleSubmit
()
{
closeModal
();
}
</
script
>
<
style
scoped
lang=
"scss"
>
.getMetadataInput
{
width
:
120px
;
}
</
style
>
src/views/dataIntegration/dataLoading/dataEntryLake/importModal.vue
0 → 100644
View file @
a50f2ba4
<
template
>
<BasicModal
width=
"35%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
>
<template
#
fileMethods=
"
{ model, field }">
<div
style=
"display: flex"
>
<div>
<a-button>
下载模板
</a-button>
<a-button
type=
"primary"
style=
"margin-left: 5px"
>
选择文件
</a-button>
</div>
<div
style=
"width: 200px; margin-top: 6px; margin-left: 5px"
>
数据质量只能导入单个zip文件
</div
>
</div>
</
template
>
</BasicForm>
</BasicModal>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
unref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
importFormSchema
}
from
'./dataEntry.data'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
isUpdate
=
ref
(
true
);
const
isMove
=
ref
(
false
);
const
rowId
=
ref
(
''
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
importFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
isMove
.
value
=
!!
data
?.
isMove
;
if
(
unref
(
isUpdate
))
{
// 获取行数据的id
rowId
.
value
=
data
.
record
.
businessId
;
// 塞值
setFieldsValue
({
...
data
.
record
,
});
}
});
// onMounted(){}
// const getTitle = computed(() => '新建文件');
const
getTitle
=
'导入文件选择'
;
/**确定按钮*/
async
function
handleSubmit
()
{
closeModal
();
}
</
script
>
src/views/dataIntegration/dataLoading/dataEntryLake/index.vue
0 → 100644
View file @
a50f2ba4
<
template
>
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<GroupTree
class=
"w-1/4 xl:w-1/5"
@
select=
"handleSelect"
/>
<BasicTable
@
register=
"registerTable"
class=
"w-3/4 xl:w-4/5"
>
<template
#
toolbar
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleRun"
>
运行
</a-button
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handlePublish"
>
发布
</a-button
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleDownline"
>
下线
</a-button
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleMove(0)"
>
复制到
</a-button
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"deleteButton"
>
删除
</a-button
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleMove(1)"
>
移动
</a-button
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
>
导出
</a-button>
<a-button
type=
"primary"
@
click=
"handleImport"
>
导入
</a-button>
<a-button
type=
"primary"
@
click=
"handleNewFolder"
>
新建文件夹
</a-button>
<a-button
type=
"primary"
@
click=
"handleDataEntry"
>
新建文件
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
//
{
// label: '详情',
// onClick: handleEdit.bind(null, record, 1),
// },
// {
// label: '发布',
// onClick: handlePublish.bind(null, record),
// },
{
label: '复制',
onClick: handleMove.bind(null, 0, record),
},
{
label: '移动',
onClick: handleMove.bind(null, 1, record),
},
{
label: '删除',
onClick: deleteButton.bind(null, record, 1),
},
]"
/>
</
template
>
</template>
</BasicTable>
<MoveFile
@
register=
"registerMoveFile"
@
success=
"handleMoveSuccess"
/>
<ImportModal
@
register=
"registerImport"
@
success=
"handleImportSuccess"
/>
<SceneSelectionModal
@
register=
"registerSceneSelectionModal"
/>
<NewFolder
@
register=
"registerNewFolder"
/>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
onMounted
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
tableList
}
from
'./mock'
;
import
{
columns
,
searchFormSchema
}
from
'./dataEntry.data'
;
import
{
useRouter
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
router
}
from
'@/router'
;
import
MoveFile
from
'./moveFile.vue'
;
import
NewFolder
from
'./newFolder.vue'
;
import
GroupTree
from
'./GroupTree.vue'
;
import
SceneSelectionModal
from
'./sceneSelectionModal.vue'
;
import
ImportModal
from
'./importModal.vue'
;
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
filterStore
=
useFilterStore
();
const
route
=
useRouter
();
const
[
registerImport
,
{
openModal
:
openImportModal
}]
=
useModal
();
const
[
registerMoveFile
,
{
openModal
:
openMoveFileModal
}]
=
useModal
();
const
[
registerSceneSelectionModal
,
{
openModal
:
openSceneSelectionModal
}]
=
useModal
();
const
[
registerNewFolder
,
{
openModal
:
openNewFolderModal
}]
=
useModal
();
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
},
]
=
useTable
({
api
:
async
()
=>
{
// console.log('tableList', tableList);
const
response
=
{
pageNu
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
tableList
.
length
,
code
:
''
,
message
:
''
,
data
:
tableList
,
};
return
{
...
response
};
},
rowKey
:
'businessId'
,
rowSelection
:
true
,
columns
,
formConfig
:
{
labelWidth
:
10
,
schemas
:
searchFormSchema
,
autoSubmitOnEnter
:
true
,
},
useSearchForm
:
true
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
bordered
:
true
,
handleSearchInfoFn
(
info
)
{
// console.log('handleSearchInfoFn', info);
return
info
;
},
actionColumn
:
{
width
:
260
,
title
:
'操作'
,
dataIndex
:
'action'
,
// slots: { customRender: 'action' },
},
});
function
handleDataEntry
()
{
openSceneSelectionModal
(
true
);
}
function
handleNewFolder
()
{
openNewFolderModal
(
true
,
{
isUpdate
:
false
,
});
}
/** 导入按钮*/
function
handleImport
()
{
openImportModal
(
true
,
{});
}
/** 重置密码弹窗确定按钮*/
/** 删除按钮*/
function
handleDelete
(
record
:
Recordable
)
{
createMessage
.
success
(
'删除成功!'
);
reload
();
}
/** 移动按钮*/
function
handleMove
(
isMove
,
record
:
Recordable
)
{
// console.log('record',record)
openMoveFileModal
(
true
,
{
record
,
isMove
:
isMove
,
});
}
/**删除按钮*/
function
deleteButton
()
{
createConfirm
({
iconType
:
'warning'
,
title
:
'确认删除'
,
content
:
'确认批量删除选中数据吗?'
,
onOk
()
{
createMessage
.
success
(
'删除成功!'
);
reload
();
},
});
}
/** 导出按钮*/
async
function
handleExport
()
{}
/** 导入成功*/
function
handleImportSuccess
()
{
reload
();
}
/** 部门树的select*/
function
handleSelect
()
{
reload
();
}
function
handleEdit
(
record
:
Recordable
,
disabled
:
number
)
{
// console.log('record', record.businessId);
router
.
push
({
path
:
'/dataQuality/dataSheet/template/edit'
,
query
:
{
id
:
record
.
businessId
,
disabled
:
String
(
disabled
),
},
});
}
/** 移动*/
function
handleMoveSuccess
({
isMove
,
values
})
{
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
if
(
rowSelection
.
length
>
0
)
{
//批量移动
for
(
let
i
=
0
;
i
<
rowSelection
.
length
;
i
++
)
{
const
result
=
updateTableDataRecord
(
values
[
i
].
institutionId
,
values
[
i
]);
}
}
else
{
//单个移动
const
result
=
updateTableDataRecord
(
values
.
businessId
,
values
);
}
reload
();
}
onMounted
(()
=>
{
// const path = route.path;
// if (filterStore.getSearchParams[path]) {
// if (JSON.parse(filterStore.getSearchParams[path] !== {})) {
// const params = JSON.parse(filterStore.getSearchParams[path]);
// // console.log('11111111111111111111111111111', params);
// getForm().setFieldsValue({
// page: params.page,
// pageSize: params.pageSize,
// username: params.username,
// flag: params.flag,
// });
// searchInfo.deptId = params.deptId;
// }
// }
});
onBeforeRouteLeave
((
to
,
from
,
next
)
=>
{
// const params = Object.assign({}, getSearchInfo(), getForm().getFieldsValue());
// // console.log('path', from.path);
// // console.log('params', params);
// filterStore.setSearchParams({
// path: from.path,
// param: {
// ...params,
// },
// });
next
();
// 允许导航
});
</
script
>
src/views/dataIntegration/dataLoading/dataEntryLake/mock.ts
0 → 100644
View file @
a50f2ba4
This diff is collapsed.
Click to expand it.
src/views/dataIntegration/dataLoading/dataEntryLake/moveFile.vue
0 → 100644
View file @
a50f2ba4
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
minHeight=
"50"
>
<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
{
MoveFormSchema
}
from
'./dataEntry.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
'./mock'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
rowId
=
ref
(
''
);
const
idList
=
ref
([]);
const
rowData
=
ref
([]);
let
isMove
=
ref
();
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
span
:
24
},
schemas
:
MoveFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
console
.
log
(
'data'
,
data
);
// //每次点击弹窗 需要清空存储的数据
rowData
.
value
=
[];
isMove
.
value
=
data
.
isMove
;
// //重置表单数据
resetFields
();
setModalProps
({
confirmLoading
:
false
});
// if (data.idList != null && data.idList.length > 0) {
// /* empty */
// } else {
// rowData.value.push(data.record);
// //单个移动
// rowId.value = data.record.businessId;
// data.record.taskId = data.record.businessId;
// setFieldsValue({
// ...data.record,
// });
// }
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
);
updateSchema
([
{
field
:
'taskId'
,
componentProps
:
{
treeData
:
treeList
,
},
},
]);
console
.
log
(
'treeList:'
,
treeList
);
});
const
getTitle
=
computed
(()
=>
'移动'
);
/**确定按钮*/
async
function
handleSubmit
()
{
// console.log('isMove.value', isMove.value);
if
(
isMove
.
value
===
1
)
{
createMessage
.
success
(
'移动成功!'
);
}
else
{
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/dataIntegration/dataLoading/dataEntryLake/newFolder.vue
0 → 100644
View file @
a50f2ba4
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
<!--
<div
class=
"modalRow"
>
-->
<!--
<div>
可见范围
</div>
-->
<!--
<div
class=
"right"
>
-->
<!--
<div
class=
"clearAll"
>
清空
</div>
-->
<!--
<div>
-->
<!--
<a-button
type=
"primary"
>
添加工作组
</a-button>
-->
<!--
</div>
-->
<!--
</div>
-->
<!--
</div>
-->
<!--
<div
class=
"addDialogBG"
>
-->
<!--
<div
style=
"float: right"
>
-->
<!--
<Icon
icon=
"ant-design:delete-outlined"
:size=
"25"
:color=
"'#ED6F6F'"
/>
-->
<!--
</div>
-->
<!--
<TreeTwo
class=
"w-1/4 xl:w-1/5"
@
select=
"handleSelect"
/>
-->
<!--
</div>
-->
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
formSchemaNewFolder
}
from
'./dataEntry.data'
;
import
TreeTwo
from
'./treeTwo.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
'./mock'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
rowId
=
ref
(
''
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
24
,
md
:
24
},
schemas
:
formSchemaNewFolder
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
if
(
unref
(
isUpdate
))
{
// 通过id获取行详情信息
// 塞值
setFieldsValue
({
...
data
.
record
,
});
}
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
);
updateSchema
([
{
field
:
'path'
,
componentProps
:
{
treeData
:
treeList
,
},
},
]);
});
/**数组对象转成树*/
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
;
}
const
getTitle
=
computed
(()
=>
(
!
unref
(
isUpdate
)
?
'新建主体'
:
'编辑主体'
));
async
function
handleSubmit
()
{
try
{
const
values
=
await
validate
();
setModalProps
({
confirmLoading
:
true
});
// TODO custom api
closeModal
();
emit
(
'success'
,
{
isUpdate
:
unref
(
isUpdate
),
values
:
{
...
values
,
id
:
rowId
.
value
}
});
}
finally
{
setModalProps
({
confirmLoading
:
false
});
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.modalRow
{
padding
:
0
20px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.clearAll
{
padding-right
:
10px
;
font-size
:
16px
;
}
.right
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
.addDialogBG
{
margin
:
10px
;
border-radius
:
10px
;
padding
:
20px
;
background-color
:
#e8ecf7
;
width
:
98%
;
height
:
400px
;
}
</
style
>
src/views/dataIntegration/dataLoading/dataEntryLake/offlineLoading.data.ts
0 → 100644
View file @
a50f2ba4
import
{
FormSchema
}
from
'@/components/Form'
;
import
{
BasicColumn
}
from
'@/components/Table'
;
export
const
sourceSideConfigurationFormSchema
:
FormSchema
[]
=
[
{
field
:
'loadType'
,
label
:
'加载方式'
,
component
:
'RadioGroup'
,
defaultValue
:
'全量数据加载'
,
componentProps
:
{
options
:
[
{
label
:
'全量数据加载'
,
value
:
'全量数据加载'
},
{
label
:
'增量数据加载'
,
value
:
'增量数据加载'
},
],
},
},
{
field
:
'metadataAcquisitionMode'
,
label
:
'元数据获取方式'
,
component
:
'RadioGroup'
,
defaultValue
:
'从JDBC获取元数据'
,
componentProps
:
({
formModel
,
formActionType
})
=>
({
onChange
:
()
=>
{
const
flag
=
formModel
.
metadataAcquisitionMode
===
'从JDBC获取元数据'
;
formActionType
.
updateSchema
([{
field
:
'dataBase'
,
ifShow
:
flag
,
required
:
flag
}]);
formActionType
.
updateSchema
([{
field
:
'metadataType'
,
ifShow
:
flag
,
required
:
flag
}]);
formActionType
.
updateSchema
([{
field
:
'getMetadata'
,
ifShow
:
flag
}]);
},
options
:
[
{
label
:
'从JDBC获取元数据'
,
value
:
'从JDBC获取元数据'
},
{
label
:
'自定义SQL'
,
value
:
'自定义SQL'
},
{
label
:
'导入元数据文件'
,
value
:
'导入元数据文件'
},
],
}),
},
{
field
:
'dataSource'
,
label
:
'数据源'
,
component
:
'Select'
,
required
:
true
,
defaultValue
:
'KunOB数据源'
,
componentProps
:
{
placeholder
:
'请选择数据源'
,
options
:
[
{
label
:
'KunOB数据源'
,
value
:
'KunOB数据源'
},
{
label
:
'MongoDB数据源'
,
value
:
'MongoDB数据源'
},
{
label
:
'AmazonS3'
,
value
:
'AmazonS3'
},
],
},
},
{
field
:
'dataBase'
,
label
:
'数据库'
,
component
:
'Cascader'
,
required
:
true
,
componentProps
:
{
placeholder
:
'请选择数据源'
,
displayRender
:
({
labels
})
=>
{
return
labels
[
labels
.
length
-
1
];
},
options
:
[
{
value
:
'数据库对象资源'
,
label
:
'数据库对象资源'
,
children
:
[
{
value
:
'数据中台工作区01'
,
label
:
'数据中台工作区01'
,
children
:
[
{
value
:
'ArgoDB_Dev01'
,
label
:
'ArgoDB_Dev01'
,
},
{
value
:
'ArgoDB_Dev02'
,
label
:
'ArgoDB_Dev02'
,
},
{
value
:
'GbaseDB_Dev01'
,
label
:
'GbaseDB_Dev01'
,
},
],
},
],
},
],
},
},
{
field
:
'metadataType'
,
label
:
'元数据类型'
,
component
:
'Input'
,
required
:
true
,
componentProps
:
{
placeholder
:
'以,分隔输入元数据类型'
,
},
},
{
field
:
'getMetadata'
,
label
:
' '
,
component
:
'Slot'
,
slot
:
'getMetadata'
,
},
{
field
:
'maximumNumberOfDatabaseConnections'
,
label
:
'源库最大连接数'
,
component
:
'Input'
,
componentProps
:
{
placeholder
:
'请输入源库最大连接数'
,
},
},
];
export
const
LoadingStrategyFormSchema
:
FormSchema
[]
=
[
{
field
:
'loadingStrategy'
,
label
:
'加载策略'
,
component
:
'RadioGroup'
,
defaultValue
:
'基于数量'
,
componentProps
:
({
formModel
,
formActionType
})
=>
({
onChange
:
()
=>
{
const
flag
=
formModel
.
loadingStrategy
===
'基于数量'
;
formActionType
.
updateSchema
([{
field
:
'quantityBasedAlert'
,
ifShow
:
flag
}]);
formActionType
.
updateSchema
([{
field
:
'conditionBasedAlert'
,
ifShow
:
!
flag
}]);
},
options
:
[
{
label
:
'基于数量'
,
value
:
'基于数量'
},
{
label
:
'基于条件'
,
value
:
'基于条件'
},
],
}),
},
{
field
:
'quantityBasedAlert'
,
component
:
'Slot'
,
slot
:
'quantityBasedAlert'
,
},
{
field
:
'conditionBasedAlert'
,
component
:
'Slot'
,
slot
:
'conditionBasedAlert'
,
ifShow
:
false
,
},
{
component
:
'Divider'
,
},
{
field
:
'customSQL'
,
label
:
'自定义SQL'
,
component
:
'RadioGroup'
,
defaultValue
:
'否'
,
required
:
true
,
componentProps
:
({
formModel
,
formActionType
})
=>
({
onChange
:
()
=>
{
const
flag
=
formModel
.
customSQL
===
'否'
;
formActionType
.
updateSchema
([{
field
:
'filterCondition'
,
ifShow
:
flag
}]);
formActionType
.
updateSchema
([{
field
:
'notCustomSQLTable'
,
ifShow
:
flag
}]);
formActionType
.
updateSchema
([{
field
:
'querySQL'
,
ifShow
:
!
flag
}]);
formActionType
.
updateSchema
([{
field
:
'parsingSQL'
,
ifShow
:
!
flag
}]);
formActionType
.
updateSchema
([{
field
:
'isCustomSQLAlert'
,
ifShow
:
!
flag
}]);
formActionType
.
updateSchema
([{
field
:
'isCustomSQLTable'
,
ifShow
:
!
flag
}]);
},
options
:
[
{
label
:
'是'
,
value
:
'是'
},
{
label
:
'否'
,
value
:
'否'
},
],
}),
},
{
field
:
'filterCondition'
,
label
:
'过滤条件'
,
component
:
'InputTextArea'
,
componentProps
:
{
placeholder
:
'请输入'
,
},
},
{
field
:
'notCustomSQLTable'
,
component
:
'Slot'
,
slot
:
'notCustomSQLTable'
,
},
{
field
:
'querySQL'
,
label
:
'查询SQL'
,
component
:
'InputTextArea'
,
componentProps
:
{
placeholder
:
'请输入'
,
},
ifShow
:
false
,
},
{
field
:
'parsingSQL'
,
label
:
' '
,
component
:
'Slot'
,
slot
:
'parsingSQL'
,
ifShow
:
false
,
},
{
field
:
'isCustomSQLAlert'
,
component
:
'Slot'
,
slot
:
'isCustomSQLAlert'
,
ifShow
:
false
,
},
{
field
:
'isCustomSQLTable'
,
component
:
'Slot'
,
slot
:
'isCustomSQLTable'
,
ifShow
:
false
,
},
];
export
const
isCustomSQLColumns
:
BasicColumn
[]
=
[
{
title
:
'列名'
,
dataIndex
:
'fieldName'
,
},
{
title
:
'类型'
,
dataIndex
:
'fieldType'
,
},
];
export
const
getMetadataColumns
:
BasicColumn
[]
=
[
{
title
:
'表名'
,
dataIndex
:
'tableName'
,
},
];
export
const
notCustomSQLColumns
:
BasicColumn
[]
=
[
{
title
:
'列名'
,
dataIndex
:
'fieldName'
,
},
{
title
:
'类型'
,
dataIndex
:
'fieldType'
,
},
{
title
:
'数据转换'
,
dataIndex
:
'dataConversion'
,
slots
:
{
customRender
:
'dataConversion'
},
},
];
export
const
tableListSearchFormSchema
:
FormSchema
[]
=
[
{
field
:
'name'
,
label
:
' '
,
component
:
'Input'
,
colProps
:
{
span
:
24
},
componentProps
:
{
placeholder
:
'输入关键字搜索'
,
},
},
];
src/views/dataIntegration/dataLoading/dataEntryLake/sceneSelectionModal.vue
0 → 100644
View file @
a50f2ba4
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
title=
"场景选择"
>
<List>
<Row
:gutter=
"16"
>
<template
v-for=
"item in cardList"
:key=
"item.title"
>
<Col
:span=
"12"
>
<ListItem>
<Card
:hoverable=
"true"
class=
"sceneSelectionCard"
@
click=
"handleNewModal(item.scene)"
>
<div>
<Icon
class=
"sceneSelectionIcon"
v-if=
"item.icon"
:icon=
"item.icon"
:color=
"item.color"
/>
</div>
<div
class=
"sceneSelectionTitle"
>
{{
item
.
title
}}
</div>
<div
class=
"sceneSelectionDescription"
>
{{
item
.
description
}}
</div>
</Card>
</ListItem>
</Col>
</
template
>
</Row>
</List>
</BasicModal>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
'vue'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
cardList
}
from
'./mock'
;
import
{
Card
,
Row
,
Col
,
List
,
ListItem
}
from
'ant-design-vue'
;
import
{
router
}
from
'@/router'
;
const
emit
=
defineEmits
([
'register'
]);
const
rowId
=
ref
(
''
);
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
()
=>
{});
function
handleNewModal
(
scene
)
{
router
.
push
({
path
:
'/dataIntegration/dataLoading/dataEntryLake/'
+
scene
,
});
}
</
script
>
<
style
lang=
"scss"
scoped
>
.sceneSelectionCard
{
height
:
190px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
text-align
:
center
;
}
.sceneSelectionIcon
{
font-size
:
40px
!
important
;
margin-bottom
:
16px
;
}
.sceneSelectionTitle
{
font-size
:
18px
;
font-weight
:
bold
;
margin-bottom
:
8px
;
}
.sceneSelectionDescription
{
font-size
:
14px
;
color
:
gray
;
text-align
:
left
;
}
</
style
>
src/views/dataIntegration/dataLoading/dataEntryLake/treeTwo.vue
0 → 100644
View file @
a50f2ba4
<
template
>
<div
class=
"m-4 mr-0 overflow-hidden bg-white"
>
<BasicTree
title=
"工作组"
ref=
"treeRef"
toolbar
search
treeWrapperClassName=
"h-[calc(100%-35px)] overflow-auto"
:clickRowToExpand=
"true"
:checkable=
"true"
:defaultExpandAll=
"true"
:treeData=
"treeData"
:fieldNames=
"
{ key: 'businessId', title: 'label' }"
@select="handleSelect"
/>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicTree
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
getDeptList
}
from
'@/api/system/dept/dept'
;
import
{
Nullable
}
from
'@vben/types'
;
import
{
treeDataListTwo
}
from
'./mock'
;
defineOptions
({
name
:
'DeptTree'
});
const
emit
=
defineEmits
([
'select'
]);
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
async
function
fetch
()
{
treeData
.
value
=
treeDataListTwo
;
await
nextTick
(()
=>
{
getTree
().
expandAll
(
true
);
});
}
function
getTree
()
{
const
tree
=
unref
(
treeRef
);
if
(
!
tree
)
{
throw
new
Error
(
'tree is null!'
);
}
return
tree
;
}
function
handleSelect
(
keys
)
{
emit
(
'select'
,
keys
[
0
]);
}
onMounted
(()
=>
{
fetch
();
});
</
script
>
<
style
lang=
"scss"
scoped
>
.bg-white
{
width
:
97%
;
}
::v-deep
(
.vben-tree
)
{
background-color
:
#e8ecf7
!
important
;
}
</
style
>
src/views/dataQuality/dataSheet/template/index.vue
View file @
a50f2ba4
...
...
@@ -106,7 +106,6 @@
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
},
]
=
useTable
({
title
:
'主体管理列表'
,
api
:
async
(
params
)
=>
{
// console.log('tableList', tableList);
const
response
=
{
...
...
src/views/dataService/APIDataSecurity/sensitiveRecognition/executionRecord.vue
View file @
a50f2ba4
...
...
@@ -19,7 +19,7 @@
<List
:pagination=
"pagination"
>
<template
v-for=
"item in executionList"
:key=
"item.id"
>
<List
.
Item
class=
"list"
>
<List
.
Item
.
Meta
style=
"display: flex !important; align-items: center !important"
>
<List
.
Item
.
Meta
style=
"display: flex !important; align-items: center !important"
>
<template
#
avatar
>
<Icon
class=
"icon"
v-if=
"item.icon"
:icon=
"item.icon"
:color=
"item.color"
/>
</
template
>
...
...
src/views/dataService/APIDataSecurity/sensitiveRecognition/index.vue
View file @
a50f2ba4
...
...
@@ -142,7 +142,7 @@
// 选中节点
async
function
onNodeSelect
(
id
)
{
const
node
=
TreeData
.
filter
((
item
)
=>
id
===
undefined
||
item
.
businessId
===
id
);
tableTitle
.
value
=
node
[
0
].
parentWo
e
kSpaceName
;
tableTitle
.
value
=
node
[
0
].
parentWo
r
kSpaceName
;
await
getForm
().
setFieldsValue
({
path
:
tableTitle
.
value
,
});
...
...
src/views/dataService/APIDataSecurity/sensitiveRecognition/mock.ts
View file @
a50f2ba4
...
...
@@ -3,7 +3,7 @@ export const TreeData: any[] = [
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
100
,
parentWo
e
kSpaceName
:
'敏感识别'
,
parentWo
r
kSpaceName
:
'敏感识别'
,
workSpaceName
:
'敏感识别'
,
parentId
:
0
,
'code:'
:
'001'
,
...
...
@@ -18,7 +18,7 @@ export const TreeData: any[] = [
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
101
,
parentWo
e
kSpaceName
:
'admin-个人工作区'
,
parentWo
r
kSpaceName
:
'admin-个人工作区'
,
workSpaceName
:
'admin-个人工作区'
,
parentId
:
100
,
'code:'
:
'002'
,
...
...
@@ -33,7 +33,7 @@ export const TreeData: any[] = [
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
102
,
parentWo
e
kSpaceName
:
'共享工作区'
,
parentWo
r
kSpaceName
:
'共享工作区'
,
workSpaceName
:
'共享工作区'
,
parentId
:
100
,
'code:'
:
'003'
,
...
...
@@ -48,7 +48,7 @@ export const TreeData: any[] = [
delFlag
:
'0'
,
flag
:
'0'
,
businessId
:
103
,
parentWo
e
kSpaceName
:
'高级工作区'
,
parentWo
r
kSpaceName
:
'高级工作区'
,
workSpaceName
:
'高级工作区'
,
parentId
:
100
,
'code:'
:
'010'
,
...
...
@@ -63,7 +63,7 @@ export const TreeData: any[] = [
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
201
,
parentWo
e
kSpaceName
:
'admin-个人工作区'
,
parentWo
r
kSpaceName
:
'admin-个人工作区'
,
workSpaceName
:
'独导'
,
parentId
:
101
,
'code:'
:
'002'
,
...
...
@@ -78,7 +78,7 @@ export const TreeData: any[] = [
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
202
,
parentWo
e
kSpaceName
:
'共享工作区'
,
parentWo
r
kSpaceName
:
'共享工作区'
,
workSpaceName
:
'test'
,
parentId
:
102
,
'code:'
:
'003'
,
...
...
@@ -93,7 +93,7 @@ export const TreeData: any[] = [
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
203
,
parentWo
e
kSpaceName
:
'高级工作区'
,
parentWo
r
kSpaceName
:
'高级工作区'
,
workSpaceName
:
'sql_api'
,
parentId
:
103
,
'code:'
:
'003'
,
...
...
@@ -108,7 +108,7 @@ export const TreeData: any[] = [
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
301
,
parentWo
e
kSpaceName
:
'admin-个人工作区'
,
parentWo
r
kSpaceName
:
'admin-个人工作区'
,
workSpaceName
:
'向导API'
,
parentId
:
201
,
'code:'
:
'002'
,
...
...
@@ -123,7 +123,7 @@ export const TreeData: any[] = [
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
302
,
parentWo
e
kSpaceName
:
'共享工作区'
,
parentWo
r
kSpaceName
:
'共享工作区'
,
workSpaceName
:
'托管系统'
,
parentId
:
202
,
'code:'
:
'003'
,
...
...
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