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
4f833571
authored
2024-12-23 13:59:17 +0800
by
lxs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
分类分级任务联调
1 parent
2c8abf69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
30 deletions
src/layouts/components/SidebarItem/index.vue
src/views/data_inventory/taskDetail.vue
src/layouts/components/SidebarItem/index.vue
View file @
4f83357
...
...
@@ -55,7 +55,7 @@ const getSvgElement = async (item:any)=>{
}
// reslove(122)
// })
}
</
script
>
...
...
@@ -67,7 +67,7 @@ const getSvgElement = async (item:any)=>{
<el-menu-item
:title=
"item1.meta?.title ?? '[ 无标题 ]'"
:index=
"resolveRoutePath(basePath, item1.path || '')"
>
<el-icon
v-if=
"item1.meta?.icon"
class=
"title-icon"
>
<!--
<img
:src=
"item.meta.icon"
v-if=
"item.meta.icon.indexOf('http')>-1"
alt=
""
>
-->
<!--
{{
item
.
meta
.
icon
}}
-->
<template
v-if=
"item1.meta.icon.indexOf('svg')>-1"
>
<i
v-html=
"item1.meta.icon"
:key=
"item1.meta.icon"
v-if=
"!item1.meta.isEle"
></i>
...
...
src/views/data_inventory/taskDetail.vue
View file @
4f83357
...
...
@@ -103,7 +103,7 @@ const fieldItemList = ref([
{
type
:
"select"
,
label
:
""
,
placeholder
:
'
变更类型
'
,
placeholder
:
'
确认状态
'
,
field
:
'changeStatus'
,
default
:
''
,
options
:
[
...
...
@@ -185,8 +185,6 @@ const fieldItemList = ref([
},
]);
const
checked1
=
ref
(
false
);
const
page
=
ref
({
limit
:
50
,
curr
:
1
,
...
...
@@ -235,7 +233,7 @@ const fieldTableInfo = ref({
fields
:
[
{
label
:
"序号"
,
type
:
"index"
,
width
:
56
,
align
:
"center"
,
fixed
:
"left"
},
{
label
:
"确认状态"
,
field
:
"changeStatus"
,
width
:
140
,
align
:
'center'
,
type
:
"tag"
,
getName
:
(
scope
)
=>
{
label
:
"确认状态"
,
field
:
"changeStatus"
,
width
:
96
,
align
:
'center'
,
type
:
"tag"
,
getName
:
(
scope
)
=>
{
return
filterVal
(
scope
.
row
.
changeStatus
,
'changeStatus'
);
},
tagType
:
(
scope
)
=>
{
return
scope
.
row
.
changeStatus
==
'Y'
?
'success'
:
'warning'
;
...
...
@@ -268,14 +266,6 @@ const fieldTableInfo = ref({
},
{
label
:
"分级"
,
field
:
"gradeDetailName"
,
width
:
120
,
type
:
'select'
,
options
:
[],
props
:
{
label
:
'gradeName'
,
value
:
'guid'
},
// getName: (scope) => {
// if (scope.row['STATE'] === 'Running') {
// const classifyNames = scope.row.gradeGuid || '';
// return classifyNames;
// } else {
// return scope.row.gradeDetailName || '--';
// }
// }
},
{
label
:
"标签"
,
field
:
"label"
,
width
:
96
},
{
label
:
"规则"
,
field
:
"ruleDetail"
,
width
:
200
},
...
...
@@ -401,7 +391,7 @@ const getGradeData = () => {
})
}
// 获取
字段统计
// 获取
分类树形数据
const
getFieldTree
=
()
=>
{
treeInfo
.
value
.
loading
=
true
;
getTaskExeTreeList
({
execGuid
:
taskDetail
.
value
.
execGuid
}).
then
((
res
:
any
)
=>
{
...
...
@@ -425,7 +415,7 @@ const getFieldTree = () => {
}
// 获取库、表、字段信息
const
getSheetFieldList
=
(
params
,
tId
)
=>
{
const
getSheetFieldList
=
(
params
,
tId
=
null
)
=>
{
getDbFieldList
({
execGuid
:
taskDetail
.
value
.
execGuid
,
...
params
}).
then
(
res
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
[];
...
...
@@ -437,7 +427,7 @@ const getSheetFieldList = (params, tId) => {
sheetItemList
.
value
[
1
].
options
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
}
else
{
fieldItemList
.
value
[
2
].
options
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
if
(
tId
)
{
if
(
tId
)
{
fieldItemList
.
value
[
2
].
default
=
tId
;
}
}
...
...
@@ -461,7 +451,10 @@ const nodeClick = (data) => {
}
else
if
(
data
.
guid
==
'unclassified'
)
{
getFieldTableData
({
isClassify
:
'N'
})
}
else
{
getFieldTableData
({
isClassify
:
'Y'
});
getFieldTableData
({
isClassify
:
'Y'
,
classifyDetail
:
data
.
guid
});
const
parentGuids
=
data
.
parentGuids
||
[];
parentGuids
.
push
(
data
.
guid
)
fieldItemList
.
value
[
4
].
default
=
parentGuids
;
}
}
...
...
@@ -491,7 +484,7 @@ const getSheetTableData = () => {
};
// 获取字段表格数据
const
getFieldTableData
=
(
param
=
{})
=>
{
const
getFieldTableData
=
(
param
:
any
=
{})
=>
{
fieldTableInfo
.
value
.
loading
=
true
;
let
params
:
any
=
{
...
fieldParams
.
value
,
...
...
@@ -500,7 +493,6 @@ const getFieldTableData = (param = {}) => {
pageIndex
:
fieldTableInfo
.
value
.
page
.
curr
,
pageSize
:
fieldTableInfo
.
value
.
page
.
limit
,
}
params
.
classifyDetail
=
params
.
classifyName
&&
params
.
classifyName
.
length
?
params
.
classifyName
.
at
(
-
1
)
:
''
;
delete
params
.
classifyName
execTaskFieldList
(
params
).
then
((
res
:
any
)
=>
{
fieldTableInfo
.
value
.
loading
=
false
;
...
...
@@ -544,10 +536,13 @@ const tableBtnClick = (scope, btn) => {
currTableData
.
value
=
row
;
if
(
type
==
'tab'
)
{
tabsInfo
.
value
.
activeName
=
'field'
;
getFieldTableData
({
databaseGuid
:
row
.
databaseGuid
,
tableGuid
:
row
.
tableGuid
});
fieldItemList
.
value
.
map
(
item
=>
item
.
default
=
''
)
fieldItemList
.
value
[
1
].
default
=
row
.
databaseGuid
;
fieldItemList
.
value
[
2
].
disabled
=
false
;
treeInfo
.
value
.
expandedKey
=
[
'all'
];
treeInfoRef
.
value
.
setCurrentKey
(
'all'
);
getSheetFieldList
({
type
:
2
,
databaseGuid
:
row
.
databaseGuid
},
row
.
tableGuid
);
getFieldTableData
({
databaseGuid
:
row
.
databaseGuid
,
tableGuid
:
row
.
tableGuid
});
}
else
if
(
type
==
"edit"
)
{
row
.
STATE
=
'Running'
;
}
else
if
(
type
==
'save'
)
{
...
...
@@ -648,9 +643,9 @@ const searchField = (val: any, clear: boolean = false) => {
getFieldTableData
();
};
const
c
heckboxChange
=
(
val
)
=>
{
getFieldTableData
({
isClassify
:
val
?
'N'
:
'Y'
}
);
}
const
c
ascaderChange
=
(
val
,
row
)
=>
{
console
.
log
(
val
,
row
);
}
;
const
selectChange
=
(
val
,
item
,
scope
=
null
)
=>
{
if
(
scope
)
{
...
...
@@ -742,7 +737,7 @@ onBeforeMount(() => {
<span
class=
"title_text"
>
{{
taskDetail
.
taskName
}}
</span>
<el-tag
:type=
"taskDetail.confirmStatus == 'Y' ? 'success' : 'warning'"
>
{{
filterVal
(
taskDetail
.
confirmStatus
,
'confirmStatus'
)
}}
</el-tag>
'confirmStatus'
)
}}
</el-tag>
</div>
</div>
<div
class=
"title_desc"
>
...
...
@@ -806,17 +801,13 @@ onBeforeMount(() => {
<div
class=
"box_right"
>
<div
class=
"table_tool_wrap"
>
<TableTools
:searchItems=
"fieldItemList"
:searchId=
"'field-search'"
:init=
"false"
@
selectChange=
"selectChange"
@
search=
"searchField"
/>
@
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
plain
@
click=
"btnClick(
{ value: 'import' })">导入
</el-button>
<el-button
plain
@
click=
"btnClick(
{ value: 'export' })">导出
</el-button>
</div>
<div
class=
"checkboxs"
>
<el-checkbox
v-model=
"checked1"
@
change=
"(val) => checkboxChange(val)"
>
仅看未分级分类
</el-checkbox>
<!--
<el-checkbox
v-model=
"checked2"
>
仅看变更
</el-checkbox>
-->
</div>
</div>
</div>
<div
class=
"table_panel_wrap panel"
>
...
...
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