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
295d1a3f
authored
2024-12-27 10:08:29 +0800
by
lxs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
分类分级任务bug修改
1 parent
0b36fb0c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
14 deletions
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_inventory/taskConfig.vue
View file @
295d1a3
...
...
@@ -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
({
...
...
@@ -196,10 +198,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 @
295d1a3
...
...
@@ -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,6 +27,9 @@ 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
gradeList
=
ref
([]);
...
...
@@ -659,6 +664,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"
,
});
...
...
src/views/data_inventory/taskEdit.vue
View file @
295d1a3
...
...
@@ -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 @
295d1a3
...
...
@@ -131,11 +131,11 @@ const getFirstPageData = () => {
}
onActivated
(()
=>
{
getFirstPageData
()
//
getFirstPageData()
})
onBeforeMount
(()
=>
{
getFirstPageData
()
})
</
script
>
...
...
@@ -170,7 +170,7 @@ onBeforeMount(() => {
.table_panel_wrap
{
width
:
100%
;
height
:
100%
;
padding
:
0
px
8px
0
;
padding
:
12
px
8px
0
;
}
.card-noData
{
...
...
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