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
d8b88fc3
authored
2024-12-27 15:37:31 +0800
by
lxs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
分类分级任务bug修改
1 parent
57b32e7c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
12 deletions
src/api/modules/dataInventory.ts
src/views/data_inventory/taskConfig.vue
src/views/data_inventory/taskDetail.vue
src/views/data_inventory/taskEdit.vue
src/api/modules/dataInventory.ts
View file @
d8b88fc
...
...
@@ -514,6 +514,13 @@ export const execFieldConfirm = (data) => request({
data
})
// 分类分级任务执行结果确认
export
const
execTaskStatus
=
(
data
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/cg-task-exec-result/batch-change-status`
,
method
:
'post'
,
data
})
// 标签规则-分页
export
const
getCgLabelPageList
=
(
data
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/cg-label/page-list`
,
...
...
src/views/data_inventory/taskConfig.vue
View file @
d8b88fc
...
...
@@ -35,9 +35,12 @@ const tableInfo = ref({
{
label
:
"任务名称"
,
field
:
"taskName"
,
width
:
96
},
{
label
:
"目录名称"
,
field
:
"cgDirName"
,
width
:
120
,
type
:
"text_btn"
,
columClass
:
'text_btn'
,
click
:
(
scope
)
=>
{
if
(
scope
.
row
.
confirmCnt
>
0
){
ElMessage
.
warning
(
'请先进行任务确认'
);
return
}
router
.
push
({
name
:
"classifyGradeCatalogue"
,
query
:
{
classifyGuid
:
scope
.
row
.
classifyGuid
},
});
}
},
...
...
src/views/data_inventory/taskDetail.vue
View file @
d8b88fc
...
...
@@ -21,7 +21,8 @@ import {
execFieldConfirm
,
filterVal
,
getGradeList
,
getDbFieldList
getDbFieldList
,
execTaskStatus
}
from
"@/api/modules/dataInventory"
;
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
...
...
@@ -463,6 +464,8 @@ const getSheetFieldList = (params, tId = null) => {
fieldItemList
.
value
[
2
].
options
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
if
(
tId
)
{
fieldItemList
.
value
[
2
].
default
=
tId
;
getSheetFieldList
({
type
:
3
,
dbGuid
:
tId
});
getFieldTableData
();
}
}
}
else
{
...
...
@@ -573,26 +576,27 @@ const getCascaderCheckedData = () => {
const
tableBtnClick
=
(
scope
,
btn
)
=>
{
const
type
=
btn
.
value
;
const
row
=
scope
.
row
;
currTableData
.
value
=
row
;
if
(
type
==
'tab'
)
{
tabsInfo
.
value
.
activeName
=
'field'
;
fieldItemList
.
value
.
map
(
item
=>
item
.
default
=
''
)
fieldItemList
.
value
[
1
].
default
=
row
.
databaseGuid
;
fieldItemList
.
value
[
2
].
disabled
=
false
;
fieldItemList
.
value
[
3
].
disabled
=
false
;
treeInfo
.
value
.
expandedKey
=
[
'all'
];
treeInfoRef
.
value
.
setCurrentKey
(
'all'
);
getSheetFieldList
({
type
:
2
,
databaseGuid
:
row
.
databaseGuid
},
row
.
tableGuid
);
getFieldTableData
();
getSheetFieldList
({
type
:
2
,
dbGuid
:
row
.
databaseGuid
},
row
.
tableGuid
);
}
else
if
(
type
==
"edit"
)
{
row
.
STATE
=
'Running'
;
}
else
if
(
type
==
'save'
)
{
currTableData
.
value
=
row
;
const
cascaderData
=
getCascaderCheckedData
();
row
.
classifyDetailNameRoutes
=
cascaderData
.
length
?
cascaderData
[
0
].
pathLabels
:
[];
row
.
classifyDetailGuidRoutes
=
cascaderData
.
length
?
cascaderData
[
0
].
pathValues
:
[];
row
.
classifyDetailGuid
=
cascaderData
.
length
?
cascaderData
[
0
].
value
:
''
;
row
.
classifyDetailName
=
cascaderData
.
length
?
cascaderData
[
0
].
label
:
''
;
row
.
gradeDetailName
=
gradeList
.
value
.
find
(
item
=>
item
.
guid
==
row
.
gradeDetailGuid
)?.
gradeName
;
row
.
STATE
=
''
;
if
(
cascaderData
.
length
&&
row
.
gradeDetail
Name
)
{
if
(
cascaderData
.
length
&&
row
.
gradeDetail
Guid
)
{
const
params
=
[
{
guid
:
row
.
guid
,
...
...
@@ -622,11 +626,12 @@ const tablePageChange = (info) => {
const
btnClick
=
async
(
btn
,
bType
=
null
)
=>
{
const
type
=
btn
.
value
;
if
(
type
==
'path'
)
{
if
(
taskDetail
.
value
.
confirmCnt
>
0
){
ElMessage
.
warning
(
'请先进行任务确认'
);
return
}
router
.
push
({
name
:
"classifyGradeCatalogue"
,
query
:
{
classifyGuid
:
taskDetail
.
value
.
classifyGuid
}
});
}
else
if
(
type
==
'batch'
)
{
if
(
selectRowData
.
value
.
length
==
0
)
{
...
...
@@ -640,6 +645,25 @@ const btnClick = async (btn, bType = null) => {
});
}
else
if
(
type
==
'confirm'
)
{
saveTask
();
}
else
if
(
type
==
'status'
){
if
(
selectRowData
.
value
.
length
==
0
)
{
ElMessage
.
warning
(
'请选择需要操作的数据'
);
}
else
{
let
toChange
=
true
,
params
:
any
=
[];
selectRowData
.
value
.
map
((
item
:
any
)
=>
{
if
(
!
item
.
classifyDetailGuid
||
!
item
.
gradeDetailGuid
){
toChange
=
false
}
params
.
push
(
item
.
guid
)
})
if
(
!
toChange
){
ElMessage
.
warning
(
'所选数据分类分级均不能为空'
);
return
}
saveStatus
(
params
);
}
}
else
if
(
type
==
'export'
){
}
};
...
...
@@ -650,7 +674,11 @@ const saveFields = (params, isBatch = false) => {
loading
.
value
=
false
;
if
(
res
.
code
==
proxy
.
$passCode
)
{
ElMessage
.
success
(
'保存成功'
);
isBatch
&&
getFieldTableData
();
if
(
isBatch
){
getFieldTableData
();
}
else
{
currTableData
.
value
.
changeStatus
=
'Y'
;
}
}
else
{
ElMessage
.
error
(
res
.
msg
);
}
...
...
@@ -679,6 +707,18 @@ const saveTask = () => {
})
}
// 批量确认
const
saveStatus
=
(
params
)
=>
{
loading
.
value
=
true
;
execTaskStatus
(
params
).
then
((
res
:
any
)
=>
{
loading
.
value
=
false
;
if
(
res
.
code
==
proxy
.
$passCode
)
{
ElMessage
.
success
(
'确认成功'
);
getFieldTableData
();
}
})
}
/** 搜索查询分类分级模板。 */
const
searchSheet
=
(
val
:
any
,
clear
:
boolean
=
false
)
=>
{
if
(
clear
)
{
...
...
@@ -739,6 +779,7 @@ const selectChange = (val, item, scope = null) => {
}
else
{
if
(
item
.
field
==
"databaseGuid"
)
{
if
(
!
val
)
{
fieldItemList
.
value
[
1
].
default
=
''
;
fieldItemList
.
value
[
2
].
default
=
''
;
fieldItemList
.
value
[
3
].
default
=
''
;
fieldItemList
.
value
[
2
].
disabled
=
true
;
...
...
@@ -899,7 +940,7 @@ onMounted(() => {
<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
type=
"primary"
plain
@
click=
"btnClick(
{ value: 'status' })">批量确认
</el-button>
<el-button
plain
@
click=
"btnClick(
{ value: 'export' })">导出
</el-button>
</div>
</div>
...
...
src/views/data_inventory/taskEdit.vue
View file @
d8b88fc
...
...
@@ -428,7 +428,7 @@ onMounted(() => {
<
template
>
<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_title"
>
选择分类
规则
</div>
<!--
<div
class=
"aside_search"
>
<el-input
v-model
.
trim=
"asideSearchInput"
placeholder=
"请输入关键字"
:prefix-icon=
"Search"
clearable
@
change=
"querySearch"
/>
...
...
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