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
d9e56607
authored
2024-12-19 09:21:09 +0800
by
lxs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
分类分级任务联调
1 parent
967a81c8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
33 deletions
src/api/modules/dataInventory.ts
src/api/modules/dataMetaService.ts
src/store/modules/user.ts
src/views/data_inventory/taskConfig.vue
src/views/data_inventory/taskEdit.vue
src/views/data_inventory/taskLog.vue
src/api/modules/dataInventory.ts
View file @
d9e5660
...
...
@@ -254,26 +254,40 @@ export const getCgTaskDetail = (data) => request({
})
// 分来分级任务-新增
export
const
getC
gTaskSave
=
(
data
)
=>
request
({
export
const
c
gTaskSave
=
(
data
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/cg-task/save`
,
method
:
'post'
,
data
})
// 分来分级任务-修改
export
const
getC
gTaskUpdate
=
(
data
)
=>
request
({
export
const
c
gTaskUpdate
=
(
data
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/cg-task/update`
,
method
:
'put'
,
data
})
// 分来分级任务-删除
export
const
getC
gTaskDelete
=
(
data
)
=>
request
({
export
const
c
gTaskDelete
=
(
data
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/cg-task/delete`
,
method
:
'delete'
,
data
})
// 手动执行任务
export
const
runExecTask
=
(
data
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/cg-task/exec-task`
,
method
:
'put'
,
data
})
// 分类分级任务日志
export
const
getTaskExecPageList
=
(
data
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/cg-task-exec/page-list`
,
method
:
'post'
,
data
})
// 标签规则-分页
export
const
getCgLabelPageList
=
(
data
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/cg-label/page-list`
,
...
...
@@ -317,7 +331,7 @@ export const filterVal = (val, type) => {
status
=
'已确认'
;
break
;
default
:
status
=
'
草稿中
'
;
status
=
'
--
'
;
break
;
}
}
...
...
src/api/modules/dataMetaService.ts
View file @
d9e5660
...
...
@@ -86,7 +86,7 @@ export const getMetaDataBase = (params) => request({
})
// 表分页查询
export
const
getMetaDataSheet
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
PLAN
_BASEURL
}
/meta-table/meta-table-detail-list`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_
CHECK
_BASEURL
}
/meta-table/meta-table-detail-list`
,
method
:
'post'
,
data
:
params
})
...
...
src/store/modules/user.ts
View file @
d9e5660
...
...
@@ -54,6 +54,7 @@ const useUserStore = defineStore(
userName
.
value
=
res
.
data
.
userName
// userData.value = JSON.stringify(res.data.data);
currentTenantGuid
.
value
=
res
.
data
.
tenantInfoList
&&
res
.
data
.
tenantInfoList
.
length
?
res
.
data
.
tenantInfoList
[
0
].
guid
:
''
;
localStorage
.
setItem
(
'currentTenantGuid'
,
currentTenantGuid
.
value
);
let
currentTenant
=
res
.
data
.
tenantInfoList
?.[
0
];
return
getSystemMenu
({
tenantGuid
:
currentTenantGuid
.
value
}).
then
((
info
:
any
)
=>
{
if
(
info
.
code
==
'00000'
)
{
...
...
src/views/data_inventory/taskConfig.vue
View file @
d9e5660
...
...
@@ -9,7 +9,7 @@ import useUserStore from "@/store/modules/user";
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
useDataAssetStore
from
"@/store/modules/dataAsset"
;
import
{
filterVal
,
getCgTaskPageList
,
}
from
"@/api/modules/dataInventory"
;
import
{
filterVal
,
getCgTaskPageList
,
cgTaskDelete
,
runExecTask
}
from
"@/api/modules/dataInventory"
;
import
{
TableColumnWidth
}
from
'@/utils/enum'
;
import
Table
from
"@/components/Table/index.vue"
;
...
...
@@ -46,7 +46,12 @@ const tableInfo = ref({
});
}
},
{
label
:
"元数据"
,
field
:
"metaNames"
,
width
:
200
},
{
label
:
"元数据"
,
field
:
"metaNames"
,
width
:
200
,
getName
:
(
scope
)
=>
{
const
metaNames
=
scope
.
row
.
metaNames
||
[];
return
metaNames
.
join
(
','
);
}
},
{
label
:
"执行状态"
,
field
:
"status"
,
width
:
TableColumnWidth
.
STATE
,
align
:
'center'
,
type
:
"tag"
,
getName
:
(
scope
)
=>
{
return
filterVal
(
scope
.
row
.
status
,
'status'
);
...
...
@@ -73,19 +78,18 @@ const tableInfo = ref({
actionInfo
:
{
label
:
"操作"
,
type
:
"btn"
,
width
:
2
2
0
,
width
:
2
8
0
,
btns
:
(
scope
)
=>
{
let
row
=
scope
.
row
,
btnArr
:
any
=
[
{
label
:
"手动执行"
,
value
:
"run"
},
{
label
:
"编辑"
,
value
:
"edit"
},
{
label
:
"日志"
,
value
:
"log"
},
{
label
:
"删除"
,
value
:
"delete"
}
];
if
(
row
.
status
==
'Y'
)
{
if
(
row
.
confirmStatus
==
'Y'
)
{
btnArr
.
splice
(
0
,
0
,
{
label
:
"结果修改"
,
value
:
"modify"
});
}
else
{
btnArr
.
splice
(
0
,
0
,
{
label
:
"结果确认"
,
value
:
"confirm"
});
}
if
(
row
.
confirmStatus
==
'Y'
)
{
btnArr
.
splice
(
0
,
0
,
{
label
:
"结果修改"
,
value
:
"modify"
});
}
else
{
btnArr
.
splice
(
0
,
0
,
{
label
:
"结果确认"
,
value
:
"confirm"
,
disabled
:
row
.
status
!=
'Y'
});
}
return
btnArr
;
},
...
...
@@ -115,8 +119,25 @@ const tableBtnClick = (scope, btn) => {
const
type
=
btn
.
value
;
const
row
=
scope
.
row
;
currTableData
.
value
=
row
;
if
(
type
==
'confirm'
||
type
==
'modify'
||
type
==
'edit'
||
type
==
"log"
)
{
if
(
type
==
'confirm'
||
type
==
'modify'
||
type
==
'edit'
||
type
==
"log"
)
{
toPath
(
type
);
}
else
if
(
type
==
'run'
)
{
const
guids
=
[
currTableData
.
value
.
guid
];
runExecTask
(
guids
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
getFirstPageData
();
}
else
{
ElMessage
({
type
:
"error"
,
message
:
res
.
msg
,
});
}
}).
catch
((
res
)
=>
{
ElMessage
({
type
:
"error"
,
message
:
'请求失败'
,
});
});
}
else
if
(
type
===
"delete"
)
{
open
(
"此操作将永久删除,是否继续?"
,
"warning"
);
}
...
...
@@ -130,21 +151,21 @@ const toPath = (type) => {
type
},
});
}
else
if
(
type
==
'edit'
)
{
}
else
if
(
type
==
'edit'
)
{
router
.
push
({
name
:
"taskEdit"
,
query
:
{
guid
:
currTableData
.
value
.
guid
,
name
:
currTableData
.
value
.
dam
Name
,
name
:
currTableData
.
value
.
task
Name
,
type
},
});
}
else
if
(
type
==
'confirm'
||
type
==
'modify'
)
{
}
else
if
(
type
==
'confirm'
||
type
==
'modify'
)
{
router
.
push
({
name
:
"taskDetail"
,
query
:
{
guid
:
currTableData
.
value
.
guid
,
name
:
currTableData
.
value
.
dam
Name
,
name
:
currTableData
.
value
.
task
Name
,
type
},
});
...
...
@@ -153,7 +174,7 @@ const toPath = (type) => {
name
:
"taskLog"
,
query
:
{
guid
:
currTableData
.
value
.
guid
,
name
:
currTableData
.
value
.
dam
Name
,
name
:
currTableData
.
value
.
task
Name
,
type
},
});
...
...
@@ -175,7 +196,7 @@ const open = (msg, type, isBatch = false) => {
type
:
type
,
}).
then
(()
=>
{
const
guids
=
[
currTableData
.
value
.
guid
];
listing
Delete
(
guids
).
then
((
res
:
any
)
=>
{
cgTask
Delete
(
guids
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
getFirstPageData
();
ElMessage
({
...
...
@@ -200,24 +221,22 @@ const getFirstPageData = () => {
getTableData
();
}
// onActivated(() => {
// if (assetStore.isRefresh) {//如果是首次加载,则不需要调用
// getFirstPageData();
// assetStore.set(false);
// }
// })
onActivated
(()
=>
{
// if (assetStore.isRefresh) {//如果是首次加载,则不需要调用
// getFirstPageData();
// assetStore.set(false);
// }
getFirstPageData
()
})
onBeforeMount
(()
=>
{
getFirstPageData
()
})
</
script
>
<
template
>
<div
class=
"container_wrap"
v-if=
"tableInfo.data.length"
>
<div
class=
"table_tool_wrap"
>
<div
class=
"table_title"
>
分类分级任务
</div>
</div>
<div
class=
"table_panel_wrap"
>
<Table
:tableInfo=
"tableInfo"
@
tableBtnClick=
"tableBtnClick"
@
tablePageChange=
"tablePageChange"
/>
</div>
...
...
@@ -225,7 +244,7 @@ onBeforeMount(() => {
<div
class=
"container_wrap"
v-else
>
<div
class=
"card-noData"
>
<img
src=
"@/assets/images/no-data.png"
:style=
"
{ width: '96px', height: '96px' }" />
<p>
暂无
分类分级任务,
<span
class=
"text_btn"
@
click=
"toPath('add')"
>
去新建
</span>
</p>
<p>
暂无
日志记录
</p>
</div>
</div>
</
template
>
...
...
@@ -247,7 +266,7 @@ onBeforeMount(() => {
.table_panel_wrap
{
width
:
100%
;
height
:
calc
(
100%
-
40px
)
;
height
:
100%
;
padding
:
0px
8px
0
;
}
...
...
src/views/data_inventory/taskEdit.vue
View file @
d9e5660
This diff is collapsed.
Click to expand it.
src/views/data_inventory/taskLog.vue
View file @
d9e5660
This diff is collapsed.
Click to expand it.
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