Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
d04e0078
authored
2024-12-27 11:29:49 +0800
by
xukangle
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' into dev_20241202_xukangle
2 parents
cc7ff2f3
57b32e7c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
121 additions
and
81 deletions
src/api/modules/dataMetaService.ts
src/views/data_inventory/taskConfig.vue
src/views/data_inventory/taskDetail.vue
src/views/data_inventory/taskEdit.vue
src/views/data_inventory/taskLog.vue
src/views/data_meta/collectorTask.vue
src/views/data_meta/metaSheet.vue
src/api/modules/dataMetaService.ts
View file @
d04e007
...
...
@@ -5,13 +5,13 @@ import request from "@/utils/request";
**/
// 新增
export
const
addMetaDataTask
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-collect-task/add`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-collect-task/add`
,
method
:
'post'
,
data
:
params
})
// 删除
export
const
deleteMetaDataTask
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-collect-task/del`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-collect-task/del`
,
method
:
'delete'
,
data
:
params
})
...
...
@@ -24,24 +24,24 @@ export const getMetaDataTask = (params) => request({
// 修改
export
const
updateMetaDataTask
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-collect-task/update`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-collect-task/update`
,
method
:
'put'
,
data
:
params
})
// 详情
export
const
getMetaDataTaskDetail
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-collect-task/detail/
${
params
}
`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-collect-task/detail/
${
params
}
`
,
method
:
'get'
})
// 上线下线
export
const
updateMetaDataState
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-collect-task/change-state`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-collect-task/change-state`
,
method
:
'get'
,
params
})
// 名称唯一性验证
export
const
checkMetaDataTask
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-collect-task/check-exist`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-collect-task/check-exist`
,
method
:
'post'
,
data
:
{
collectTaskName
:
params
,
...
...
@@ -49,18 +49,18 @@ export const checkMetaDataTask = (params) => request({
})
// 执行元数据采集任务
export
const
executeMetaDataTask
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-collect-task/execute/
${
params
}
`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-collect-task/execute/
${
params
}
`
,
method
:
'get'
})
// 执行日志
export
const
getMetaDataTaskLog
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-collect-exec/page-list`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-collect-exec/page-list`
,
method
:
'post'
,
data
:
params
})
//
export
const
saveMetaReportAnalysis
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/lineage-analysis-report/add`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/lineage-analysis-report/add`
,
method
:
'post'
,
data
:
params
})
...
...
@@ -99,86 +99,86 @@ export const getMetaSheetField = (params) => request({
})
// 表索引查询
export
const
getMetaSheetKeys
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-table/meta-table-index-list`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-table/meta-table-index-list`
,
method
:
'post'
,
params
})
// 变更查询
export
const
getMetaChange
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-table/meta-collect-change-list`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-table/meta-collect-change-list`
,
method
:
'post'
,
data
:
params
})
// 变更明细
export
const
getMetaChangeRecord
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-table/meta-change-record-list`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-table/meta-change-record-list`
,
method
:
'post'
,
data
:
params
})
//
export
const
getMetacompareList
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-table/meta-change-compare-list/
${
params
}
`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-table/meta-change-compare-list/
${
params
}
`
,
method
:
'get'
,
//data: params
})
// 表信息详情
export
const
getMetaDetail
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-table/detail/
${
params
}
`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-table/detail/
${
params
}
`
,
method
:
'get'
,
})
/** 根据表获取血缘数据 */
export
const
getTableLineage
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/lineage/lineage-query?guid=
${
params
.
guid
}
&lineageType=tb`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/lineage/lineage-query?guid=
${
params
.
guid
}
&lineageType=tb`
,
method
:
'get'
,
})
/** 根据字段获取血缘数据 */
export
const
getTableFieldLineage
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/lineage/lineage-query?guid=
${
params
.
guid
}
&lineageType=co`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/lineage/lineage-query?guid=
${
params
.
guid
}
&lineageType=co`
,
method
:
'get'
,
})
/** 获取表的所有字段血缘数据 */
export
const
getTableAllFieldLineage
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/lineage/lineage-query-field?databaseName=
${
params
.
databaseName
}
&tableName=
${
params
.
tableName
}
`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/lineage/lineage-query-field?databaseName=
${
params
.
databaseName
}
&tableName=
${
params
.
tableName
}
`
,
method
:
'get'
,
})
// 查询列表
export
const
getMetaList
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-table/list-meta-all`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-table/list-meta-all`
,
method
:
'post'
,
data
:
params
})
// 元数据表字段查询
export
const
getMetaTableField
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-table/meta-table-field-list`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-table/meta-table-field-list`
,
method
:
'post'
,
params
,
})
// 保存血缘字段节点
export
const
saveLineageField
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/lineage/save-field`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/lineage/save-field`
,
method
:
'post'
,
data
:
params
})
// 保存血源节点
export
const
saveLineageTable
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/lineage/save-table`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/lineage/save-table`
,
method
:
'post'
,
data
:
params
})
// 删除血源节点
export
const
delLineageTable
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/lineage/del-vertex?vertexId=
${
params
.
vertexId
}
`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/lineage/del-vertex?vertexId=
${
params
.
vertexId
}
`
,
method
:
'delete'
,
//data:params
})
/** 获取同步任务变更记录 */
export
const
getTaskChangeList
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/task-change-record/page-list`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/task-change-record/page-list`
,
method
:
'post'
,
data
:
params
})
...
...
@@ -200,41 +200,41 @@ export const getDatabase = (params) => request({
/** 源数据分析报告 */
/**查询列表 */
export
const
getAnalysisReportList
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/lineage-analysis-report/list`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/lineage-analysis-report/list`
,
method
:
'post'
,
data
:
params
})
/** 根据guid删除 */
export
const
delAnalysisRepor
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/lineage-analysis-report/del`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/lineage-analysis-report/del`
,
method
:
'delete'
,
data
:
params
})
/** 根据guid更新 */
export
const
updateAnalysisRepor
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/lineage-analysis-report/update`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/lineage-analysis-report/update`
,
method
:
'put'
,
data
:
params
})
/** 删除边 */
export
const
delLineAge
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/lineage/del-edge?euid=
${
params
}
`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/lineage/del-edge?euid=
${
params
}
`
,
method
:
'delete'
,
})
/** 判断是否有元数据数据 */
export
const
checkTableData
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-table/check-table-data/
${
params
}
`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-table/check-table-data/
${
params
}
`
,
method
:
'get'
,
})
/**校验任务是否有数据库信息 */
export
const
checkDatabaseIsExist
=
(
dataSourceGuid
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-collect-task/check-database-is-exist/
${
dataSourceGuid
}
`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-collect-task/check-database-is-exist/
${
dataSourceGuid
}
`
,
method
:
'get'
,
})
/**同步任务 变更详情展示 */
export
const
syncChangeDetail
=
(
guid
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/task-change-record/sync-change-detail/
${
guid
}
`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/task-change-record/sync-change-detail/
${
guid
}
`
,
method
:
'get'
,
})
...
...
src/views/data_inventory/taskConfig.vue
View file @
d04e007
...
...
@@ -6,11 +6,13 @@
import
{
ref
,
onMounted
}
from
"vue"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
useDataAssetStore
from
"@/store/modules/dataAsset"
;
import
{
filterVal
,
getCgTaskPageList
,
cgTaskDelete
,
runExecTask
}
from
"@/api/modules/dataInventory"
;
import
{
TableColumnWidth
}
from
'@/utils/enum'
;
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
const
router
=
useRouter
();
const
assetStore
=
useDataAssetStore
();
const
loading
=
ref
(
false
);
const
page
=
ref
({
...
...
@@ -35,7 +37,7 @@ const tableInfo = ref({
label
:
"目录名称"
,
field
:
"cgDirName"
,
width
:
120
,
type
:
"text_btn"
,
columClass
:
'text_btn'
,
click
:
(
scope
)
=>
{
router
.
push
({
name
:
"classifyGradeCatalogue"
,
query
:
{
name
:
scope
.
row
.
cgDirName
},
query
:
{
classifyGuid
:
scope
.
row
.
classifyGuid
},
});
}
},
...
...
@@ -48,6 +50,8 @@ const tableInfo = ref({
{
label
:
"执行状态"
,
field
:
"status"
,
width
:
TableColumnWidth
.
STATE
,
align
:
'center'
,
type
:
"tag"
,
getName
:
(
scope
)
=>
{
return
filterVal
(
scope
.
row
.
status
,
'status'
);
},
tagType
:
(
scope
)
=>
{
return
scope
.
row
.
status
==
'Y'
?
'success'
:
scope
.
row
.
status
==
'E'
?
'danger'
:
'info'
;
}
},
{
label
:
"任务修改人"
,
field
:
"updateUserName"
,
width
:
120
},
...
...
@@ -59,8 +63,8 @@ const tableInfo = ref({
label
:
"结果状态"
,
field
:
"confirmStatus"
,
width
:
TableColumnWidth
.
STATE
,
align
:
'center'
,
type
:
"tag"
,
getName
:
(
scope
)
=>
{
return
filterVal
(
scope
.
row
.
confirmStatus
,
'confirmStatus'
);
},
tagType
:
(
scope
)
=>
{
return
scope
.
row
.
confirmStatus
==
'Y'
?
'success'
:
'warning'
;
}
,
return
scope
.
row
.
confirmStatus
==
'Y'
?
'success'
:
'warning'
;
}
},
],
data
:
[],
...
...
@@ -71,10 +75,10 @@ const tableInfo = ref({
width
:
280
,
btns
:
(
scope
)
=>
{
let
row
=
scope
.
row
,
btnArr
:
any
=
[
{
label
:
"手动执行"
,
value
:
"run"
},
{
label
:
"编辑"
,
value
:
"edit"
},
{
label
:
"手动执行"
,
value
:
"run"
,
disabled
:
row
.
status
!=
'Y'
&&
row
.
status
!=
'E'
},
{
label
:
"编辑"
,
value
:
"edit"
,
disabled
:
row
.
status
!=
'Y'
&&
row
.
status
!=
'E'
},
{
label
:
"日志"
,
value
:
"log"
},
{
label
:
"删除"
,
value
:
"delete"
}
{
label
:
"删除"
,
value
:
"delete"
,
disabled
:
row
.
status
!=
'Y'
&&
row
.
status
!=
'E'
}
];
if
(
row
.
confirmStatus
==
'Y'
)
{
btnArr
.
splice
(
0
,
0
,
{
label
:
"结果修改"
,
value
:
"modify"
});
...
...
@@ -109,7 +113,7 @@ const tableBtnClick = (scope, btn) => {
if
(
type
==
'confirm'
||
type
==
'modify'
||
type
==
'edit'
||
type
==
"log"
)
{
toPath
(
type
);
}
else
if
(
type
==
'run'
)
{
const
params
=
{
guid
:
currTableData
.
value
.
guid
};
const
params
=
{
guid
:
currTableData
.
value
.
guid
};
runExecTask
(
params
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
getTableData
();
...
...
@@ -196,10 +200,10 @@ const open = (msg, type, isBatch = false) => {
};
onActivated
(()
=>
{
//
if (assetStore.isRefresh) {//如果是首次加载,则不需要调用
// getFirstPageData();
//
assetStore.set(false);
//
}
if
(
assetStore
.
isRefresh
)
{
//如果是首次加载,则不需要调用
getTableData
()
assetStore
.
set
(
false
);
}
})
onBeforeMount
(()
=>
{
...
...
src/views/data_inventory/taskDetail.vue
View file @
d04e007
...
...
@@ -8,6 +8,8 @@ import { useRouter, useRoute } from "vue-router";
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
Search
,
Warning
,
ArrowUp
}
from
"@element-plus/icons-vue"
;
import
{
tagMethod
,
tagType
,
changeNum
}
from
"@/utils/common"
;
import
useUserStore
from
"@/store/modules/user"
;
import
useDataAssetStore
from
"@/store/modules/dataAsset"
;
import
TableTools
from
'@/components/Tools/table_tools.vue'
;
import
{
getCgTaskDetail
,
...
...
@@ -25,8 +27,12 @@ import {
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
const
router
=
useRouter
();
const
route
=
useRoute
();
const
userStore
=
useUserStore
();
const
fullPath
=
route
.
fullPath
;
const
assetStore
=
useDataAssetStore
();
const
loading
=
ref
(
false
);
const
showBtns
=
ref
(
true
);
const
gradeList
=
ref
([]);
const
treeData
=
ref
([
{
...
...
@@ -341,7 +347,7 @@ const dialogInfo: any = ref({
size
:
480
,
direction
:
"column"
,
header
:
{
title
:
"
新建
"
,
title
:
"
批量变更
"
,
},
type
:
'form'
,
contents
:
[
...
...
@@ -371,6 +377,7 @@ const getTaskDetail = (param) => {
loading
.
value
=
false
;
if
(
res
.
code
==
proxy
.
$passCode
)
{
taskDetail
.
value
=
res
.
data
||
{};
taskDetail
.
value
.
confirmStatus
!=
'Y'
&&
(
showBtns
.
value
=
true
);
getFieldCount
()
getSheetFieldList
({
type
:
1
});
getFieldTree
()
...
...
@@ -618,7 +625,7 @@ const btnClick = async (btn, bType = null) => {
router
.
push
({
name
:
"classifyGradeCatalogue"
,
query
:
{
name
:
taskDetail
.
value
.
cgDirName
classifyGuid
:
taskDetail
.
value
.
classifyGuid
}
});
}
else
if
(
type
==
'batch'
)
{
...
...
@@ -659,6 +666,8 @@ const saveTask = () => {
loading
.
value
=
false
;
if
(
res
.
code
==
proxy
.
$passCode
)
{
ElMessage
.
success
(
'变更成功'
);
userStore
.
setTabbar
(
userStore
.
tabbar
.
filter
((
tab
:
any
)
=>
tab
.
fullPath
!==
fullPath
));
assetStore
.
set
(
true
);
router
.
push
({
name
:
"taskConfig"
,
});
...
...
@@ -690,6 +699,7 @@ const searchField = (val: any, clear: boolean = false) => {
const
cascaderChange
=
(
val
,
info
)
=>
{
if
(
dialogInfo
.
value
.
visible
)
{
const
cascaderData
=
dialogRef
.
value
.
getCascaderCheckedData
();
formItems
.
value
[
0
].
default
=
val
||
[];
formItems
.
value
[
1
].
default
=
cascaderData
.
length
?
cascaderData
[
0
].
data
.
gradeGuid
:
''
;
}
else
{
if
(
info
&&
info
.
row
)
{
...
...
@@ -788,6 +798,7 @@ onActivated(() => {
onBeforeMount
(()
=>
{
if
(
route
.
query
.
type
==
'log'
)
{
showBtns
.
value
=
false
;
getTaskDetail
({
guid
:
route
.
query
.
guid
,
execGuid
:
route
.
query
.
execGuid
});
}
else
{
getTaskDetail
({
guid
:
route
.
query
.
guid
});
...
...
@@ -806,7 +817,7 @@ onMounted(() => {
<
template
>
<div
class=
"container_wrap full flex"
v-loading=
"loading"
>
<div
class=
"main_wrap full"
>
<div
class=
"content_main panel"
>
<div
class=
"content_main panel"
:class=
"
{ full: !showBtns }"
>
<div
class=
"template_panel"
:class=
"
{ active: !titleClose }">
<div
class=
"panel_title"
>
<div
class=
"title_wrap"
>
...
...
@@ -887,7 +898,7 @@ onMounted(() => {
@
selectChange=
"selectChange"
@
cascaderChange=
"cascaderChange"
@
search=
"searchField"
/>
<div
class=
"tools_btns"
>
<div
class=
"btns"
>
<el-button
type=
"primary"
plain
@
click=
"btnClick(
{ value: 'batch' })">批量变
量
分类分级
</el-button>
<el-button
type=
"primary"
plain
@
click=
"btnClick(
{ value: 'batch' })">批量变
更
分类分级
</el-button>
<el-button
plain
@
click=
"btnClick(
{ value: 'import' })">导入
</el-button>
<el-button
plain
@
click=
"btnClick(
{ value: 'export' })">导出
</el-button>
</div>
...
...
@@ -951,7 +962,7 @@ onMounted(() => {
</div>
</div>
</div>
<div
class=
"tool_btns"
>
<div
class=
"tool_btns"
v-if=
"showBtns"
>
<div
class=
"btns"
>
<el-button
@
click=
"btnClick({ value: 'cancel' })"
>
暂存
</el-button>
<el-button
type=
"primary"
@
click=
"btnClick({ value: 'confirm' })"
>
确认变更
</el-button>
...
...
@@ -1027,6 +1038,10 @@ onMounted(() => {
padding
:
0
16px
;
}
&
.full
{
height
:
100%
;
}
.template_panel
{
padding
:
0
16px
;
height
:
40px
;
...
...
src/views/data_inventory/taskEdit.vue
View file @
d04e007
...
...
@@ -7,14 +7,20 @@ import { ref, onMounted } from "vue";
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
Search
}
from
"@element-plus/icons-vue"
;
import
useUserStore
from
"@/store/modules/user"
;
import
useDataAssetStore
from
"@/store/modules/dataAsset"
;
import
{
getCgTaskDetail
,
getClassifyGradList
,
getClassifyTreeList
,
getCgLabelPageList
,
getMetaTableCollectList
,
cgTaskSave
,
cgTaskUpdate
}
from
"@/api/modules/dataInventory"
;
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
const
router
=
useRouter
();
const
route
=
useRoute
();
const
userStore
=
useUserStore
();
const
fullPath
=
route
.
fullPath
;
const
assetStore
=
useDataAssetStore
();
const
loading
=
ref
(
false
);
const
step
=
ref
(
0
);
const
selectIndex
=
ref
(
0
);
const
selectIndex
=
ref
(
''
);
const
taskDetail
=
ref
({});
const
asideSearchInput
=
ref
(
""
);
const
permissionList
:
any
=
ref
([])
...
...
@@ -56,6 +62,7 @@ const taskFormItems: any = ref([
field
:
'taskName'
,
default
:
''
,
maxlength
:
50
,
clearable
:
true
,
required
:
true
},
{
...
...
@@ -65,6 +72,7 @@ const taskFormItems: any = ref([
field
:
'cgDirName'
,
default
:
''
,
maxlength
:
50
,
clearable
:
true
,
required
:
true
},
])
...
...
@@ -190,9 +198,10 @@ const getTableData = () => {
};
const
toPath
=
()
=>
{
userStore
.
setTabbar
(
userStore
.
tabbar
.
filter
((
tab
:
any
)
=>
tab
.
fullPath
!==
fullPath
));
assetStore
.
set
(
true
);
router
.
push
({
name
:
"taskConfig"
,
query
:
{},
});
}
...
...
@@ -222,7 +231,7 @@ const getMetaTableData = () => {
if
(
route
.
query
.
type
===
'edit'
)
{
nextTick
(()
=>
{
data
.
map
((
row
)
=>
{
taskDetail
.
value
.
metaGuids
.
indexOf
(
row
.
g
uid
)
>
-
1
&&
metadataTableRef
.
value
.
tableRef
.
toggleRowSelection
(
row
,
true
);
taskDetail
.
value
.
metaGuids
.
indexOf
(
row
.
databaseG
uid
)
>
-
1
&&
metadataTableRef
.
value
.
tableRef
.
toggleRowSelection
(
row
,
true
);
});
})
}
...
...
@@ -258,7 +267,9 @@ const btnClick = async (btn, bType = null) => {
const
subForm
=
{
...
form
};
submitForm
(
formEl
,
subForm
);
}
else
{
toPath
()
router
.
push
({
name
:
"taskConfig"
,
});
}
};
...
...
@@ -266,6 +277,7 @@ const submitForm = (formEl, info) => {
if
(
!
formEl
)
return
;
formEl
.
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
loading
.
value
=
true
;
const
params
=
{
classifyGuid
:
templateInfo
.
value
.
guid
,
metaGuids
:
selectRowData
.
value
,
...
...
@@ -275,6 +287,7 @@ const submitForm = (formEl, info) => {
params
.
guid
=
taskDetail
.
value
.
guid
;
params
.
execGuid
=
taskDetail
.
value
.
execGuid
;
cgTaskUpdate
(
params
).
then
((
res
:
any
)
=>
{
loading
.
value
=
false
;
if
(
res
.
code
==
proxy
.
$passCode
)
{
toPath
()
}
else
{
...
...
@@ -288,9 +301,11 @@ const submitForm = (formEl, info) => {
type
:
"error"
,
message
:
'请求失败'
,
});
loading
.
value
=
false
;
})
}
else
{
cgTaskSave
(
params
).
then
((
res
:
any
)
=>
{
loading
.
value
=
false
;
if
(
res
.
code
==
proxy
.
$passCode
)
{
toPath
()
}
else
{
...
...
@@ -304,6 +319,7 @@ const submitForm = (formEl, info) => {
type
:
"error"
,
message
:
'请求失败'
,
});
loading
.
value
=
false
;
})
}
}
else
{
...
...
@@ -322,6 +338,7 @@ const handleScroll = () => {
// 点击分类列表
const
listClick
=
(
row
)
=>
{
selectIndex
.
value
=
row
.
guid
;
templateInfo
.
value
=
row
;
getClassifyTree
();
searchItemValue
.
value
.
classifyGuid
=
row
.
guid
;
...
...
@@ -409,7 +426,7 @@ onMounted(() => {
</
script
>
<
template
>
<div
class=
"container_wrap full flex"
>
<div
class=
"container_wrap full flex"
v-loading=
"loading"
>
<div
class=
"aside_wrap"
v-show=
"step == 0"
>
<div
class=
"aside_title"
>
选择分类
</div>
<!--
<div
class=
"aside_search"
>
...
...
@@ -417,8 +434,8 @@ onMounted(() => {
@
change=
"querySearch"
/>
</div>
-->
<div
class=
"aside_list"
v-loading=
"listLoading"
v-infinite-scroll=
"handleScroll"
>
<div
class=
"list_item"
v-for=
"(item, i) in currpermissionList"
:class=
"
{ active: selectIndex == i }"
@click="
selectIndex = i;
listClick(item);" v-preReClick>
{{
item
.
name
}}
</div>
<div
class=
"list_item"
v-for=
"(item, i) in currpermissionList"
:class=
"
{ active: selectIndex == i
tem.guid
}"
@click="listClick(item);" v-preReClick>
{{
item
.
name
}}
</div>
</div>
</div>
<div
class=
"main_wrap"
:class=
"
{ full: step == 1 }">
...
...
src/views/data_inventory/taskLog.vue
View file @
d04e007
...
...
@@ -52,6 +52,8 @@ const tableInfo = ref({
{
label
:
"结果状态"
,
field
:
"status"
,
width
:
TableColumnWidth
.
STATE
,
align
:
'center'
,
type
:
"tag"
,
getName
:
(
scope
)
=>
{
return
filterVal
(
scope
.
row
.
status
,
'confirmStatus'
);
},
tagType
:
(
scope
)
=>
{
return
scope
.
row
.
confirmStatus
==
'Y'
?
'success'
:
'warning'
;
}
},
],
...
...
@@ -131,11 +133,11 @@ const getFirstPageData = () => {
}
onActivated
(()
=>
{
getFirstPageData
()
//
getFirstPageData()
})
onBeforeMount
(()
=>
{
getFirstPageData
()
})
</
script
>
...
...
@@ -170,7 +172,7 @@ onBeforeMount(() => {
.table_panel_wrap
{
width
:
100%
;
height
:
100%
;
padding
:
0
px
8px
0
;
padding
:
12
px
8px
0
;
}
.card-noData
{
...
...
src/views/data_meta/collectorTask.vue
View file @
d04e007
...
...
@@ -104,7 +104,7 @@ const tableInfo = ref({
actionInfo
:
{
label
:
"操作"
,
type
:
"btn"
,
width
:
2
3
0
,
width
:
2
1
0
,
fixed
:
'right'
,
btns
:
(
scope
)
=>
{
const
row
=
scope
.
row
...
...
@@ -114,7 +114,7 @@ const tableInfo = ref({
}
else
{
btnsArr
.
splice
(
0
,
0
,
{
label
:
"立即执行"
,
value
:
"carry"
,
disabled
:
row
.
taskState
===
0
||
row
.
execState
==
1
})
}
btnsArr
.
push
({
label
:
"编辑"
,
value
:
"edit"
,
disabled
:
row
.
taskState
===
1
||
row
.
isCarry
||
row
.
execState
==
1
});
//
btnsArr.push({ label: "编辑", value: "edit", disabled: row.taskState === 1 || row.isCarry || row.execState == 1 });
btnsArr
.
push
({
label
:
"删除"
,
value
:
"delete"
,
disabled
:
row
.
isCarry
||
row
.
taskState
===
1
||
row
.
execState
==
1
});
btnsArr
.
push
({
label
:
"执行日志"
,
value
:
"log"
});
return
btnsArr
...
...
@@ -472,18 +472,19 @@ const setDetailInfo = (row) => {
}
const
getDataSourceList
=
()
=>
{
getDatabase
({
connectStatus
:
1
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
dataSourceList
.
value
=
res
.
data
||
[];
formItems
.
value
[
1
].
options
=
dataSourceList
.
value
;
searchItemList
.
value
[
1
].
options
=
dataSourceList
.
value
;
}
else
{
proxy
.
$ElMessage
({
type
:
"error"
,
message
:
res
.
msg
,
});
}
})
// TODO
// getDatabase({ connectStatus: 1 }).then((res: any) => {
// if (res.code == proxy.$passCode) {
// dataSourceList.value = res.data || [];
// formItems.value[1].options = dataSourceList.value;
// searchItemList.value[1].options = dataSourceList.value;
// } else {
// proxy.$ElMessage({
// type: "error",
// message: res.msg,
// });
// }
// })
}
const
radioGroupChange
=
(
val
,
info
)
=>
{
...
...
@@ -597,7 +598,7 @@ onBeforeMount(() => {
<!-- 头部搜索 -->
<TableTools
:searchItems=
"searchItemList"
:searchId=
"'data-source-search'"
@
search=
"toSearch"
:init=
"false"
/>
<div
class=
"tools_btns"
>
<
el-button
type=
"primary"
@
click=
"loadDrawer"
>
新建
</el-button
>
<
!--
<el-button
type=
"primary"
@
click=
"loadDrawer"
>
新建
</el-button>
--
>
<el-button
@
click=
"importMeta"
>
导入
</el-button>
</div>
</div>
...
...
src/views/data_meta/metaSheet.vue
View file @
d04e007
...
...
@@ -61,7 +61,7 @@ const tabsInfo = ref({
tabs
:
[
{
label
:
'基础信息'
,
name
:
'first'
},
// / { label: '数据血缘', name: 'second' },
{
label
:
'变更记录'
,
name
:
'third'
}
//
{ label: '变更记录', name: 'third' }
]
})
/** 切换布局 */
...
...
@@ -191,13 +191,14 @@ const tabsPaneMap = ref({
type
:
'table'
,
tableInfo
:
fieldTableInfo
.
value
,
show
:
true
},
{
title
:
'索引信息'
,
type
:
'table'
,
isIndex
:
true
,
tableInfo
:
indexTableInfo
.
value
,
show
:
true
},
// {
// title: '索引信息',
// type: 'table',
// isIndex: true,
// tableInfo: indexTableInfo.value,
// show: true
// },
],
second
:
[
{
...
...
@@ -309,10 +310,10 @@ const lineageDataLoading = ref(true);
const
getDetailInfo
=
()
=>
{
getSheetDetail
()
getSheetField
()
getSheetKeys
()
//
getSheetKeys()
logPage
.
value
.
curr
=
1
getSheetLog
();
getTableLineageMap
();
//
getSheetLog();
//
getTableLineageMap();
}
const
getSheetDetail
=
()
=>
{
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment