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
7a70da24
authored
2026-04-02 10:27:05 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
逻辑空间管理连接器接口联调
1 parent
6ed57b4c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
366 additions
and
38 deletions
src/api/modules/dataAsset.ts
src/router/modules/dataAsset.ts
src/store/modules/productSpace.ts
src/views/data_asset/productSpaceDetail.vue
src/views/data_asset/productSpaceEdit.vue
src/views/data_asset/productSpaceManage.vue
src/api/modules/dataAsset.ts
View file @
7a70da2
...
...
@@ -592,6 +592,41 @@ export const getTdsRegisterCatalogDetail = (damGuid) => request({
method
:
'get'
});
/** --------------------------- 逻辑空间接口 --------------------------------------- */
export
const
getLogicSpacePageList
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/logic-space/page-list`
,
method
:
'post'
,
data
:
params
})
/** 获取逻辑空间详情 */
export
const
getLogicSpaceDetail
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/logic-space/detail`
,
method
:
'get'
,
params
})
/** 保存新建逻辑空间 */
export
const
saveLogicSpace
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/logic-space/save`
,
method
:
'post'
,
data
:
params
})
/** 编辑逻辑空间 */
export
const
updateLogicSpace
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/logic-space/update`
,
method
:
'put'
,
data
:
params
})
/** 删除逻辑空间 */
export
const
deleteLogicSpace
=
(
guids
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/logic-space/delete`
,
method
:
'delete'
,
data
:
guids
})
/** ----------------------------- 提供方进行数据申请接口联调 ---------------------------------- */
export
const
getDataApplyPageList
=
(
params
)
=>
request
({
...
...
src/router/modules/dataAsset.ts
View file @
7a70da2
...
...
@@ -474,6 +474,9 @@ const routes: RouteRecordRaw[] = [
breadcrumb
:
false
,
cache
:
true
,
reuse
:
true
},
beforeEnter
:
(
to
,
from
)
=>
{
to
.
query
.
guid
&&
(
to
.
meta
.
title
=
`逻辑空间详情-
${
to
.
query
.
name
}
`
);
}
},
]
...
...
src/store/modules/productSpace.ts
0 → 100644
View file @
7a70da2
const
useDataProductSpaceStore
=
defineStore
(
// 产品逻辑空间
'productSpace'
,
()
=>
{
const
isRefresh
=
ref
<
boolean
>
(
false
);
function
setIsRefresh
(
v
:
boolean
)
{
isRefresh
.
value
=
v
;
}
return
{
isRefresh
,
setIsRefresh
,
};
}
);
export
default
useDataProductSpaceStore
;
src/views/data_asset/productSpaceDetail.vue
View file @
7a70da2
<
template
>
<div
class=
"container_wrap full"
v-loading=
"fullscreenLoading"
>
<div
class=
"content_main"
>
<div
v-if=
"detailInfo.bizApproveState"
:class=
"['panel_wrap', 'mb16', 'results_panel', detailInfo.bizApproveState == 'Y' ? 'success' : ((detailInfo.bizApproveState == 'R' || detailInfo.bizApproveState == 'E') ? 'reject' : (detailInfo.bizApproveState == 'C' ? 'revoke' : 'audit'))]"
>
<div
class=
"panel_header"
>
<div
class=
"header_title"
v-if=
"detailInfo.bizApproveState == 'Y'"
>
<el-icon
class=
"title-icon"
>
<svg-icon
name=
"icon-success"
/>
</el-icon>
<span
class=
"title_text"
>
审批通过
</span>
</div>
<div
class=
"header_title"
v-else-if=
"detailInfo.bizApproveState == 'R'"
>
<el-icon
class=
"title-icon"
>
<CircleCloseFilled
/>
</el-icon>
<span
class=
"title_text"
>
审批被驳回
</span>
</div>
<div
class=
"header_title"
v-else-if=
"detailInfo.bizApproveState == 'E'"
>
<el-icon
class=
"title-icon"
>
<CircleCloseFilled
/>
</el-icon>
<span
class=
"title_text"
>
审批发起失败
</span>
</div>
<div
class=
"header_title"
v-else-if=
"detailInfo.bizApproveState == 'A'"
>
<el-icon
class=
"title-icon"
>
<svg-icon
name=
"icon-audit"
/>
</el-icon>
<span
class=
"title_text"
>
审批中
</span>
</div>
<div
class=
"header_title"
v-else-if=
"detailInfo.bizApproveState == 'C'"
>
<el-icon
class=
"title-icon"
>
<svg-icon
name=
"icon-revoke"
/>
</el-icon>
<span
class=
"title_text"
>
已撤销
</span>
</div>
</div>
<div
class=
"panel_body"
v-if=
"detailInfo.bizApproveState == 'R'"
style=
"padding: 0px 16px 10px;"
>
<div
class=
"results_list"
>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
平台审批意见:
</span>
<span
class=
"item_value"
>
{{
detailInfo
?.
tdsApproveSuggest
||
'--'
}}
</span>
</div>
</div>
</div>
<div
class=
"panel_body"
v-if=
"detailInfo.bizApproveState == 'E'"
style=
"padding: 0px 16px 10px;"
>
<div
class=
"results_list"
>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
失败原因:
</span>
<span
class=
"item_value"
>
{{
detailInfo
?.
tdsApproveErrorMsg
||
'--'
}}
</span>
</div>
</div>
</div>
</div>
<ContentWrap
id=
"id-baseInfo"
title=
"逻辑空间信息"
description=
""
:isExpand=
"baseInfoExpand"
:expand-swicth=
"true"
class=
"mb16"
@
expand=
"(v) => baseInfoExpand = v"
>
<div
class=
"list_panel"
>
...
...
@@ -22,7 +73,11 @@
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
是否开启:
</span>
<span
class=
"item_value"
>
{{
detailInfo
.
bizState
?
'是'
:
'否'
}}
</span>
<span
class=
"item_value"
>
{{
detailInfo
.
isActivate
==
'Y'
?
'是'
:
'否'
}}
</span>
</div>
<div
class=
"list_item is_block"
>
<span
class=
"item_label"
>
逻辑空间描述:
</span>
<span
class=
"item_value"
>
{{
detailInfo
.
spaceDescription
||
'--'
}}
</span>
</div>
</div>
<el-tabs
v-model=
"activeTabName"
class=
"param-tabs"
style=
"margin-top: 8px;"
>
...
...
@@ -36,16 +91,18 @@
</el-tab-pane>
</el-tabs>
</ContentWrap>
<ContentWrap
id=
"id-approveInfo"
title=
"流程审批"
expandSwicth
style=
"margin-top: 15px"
:isExpand=
"expandApprove"
<!-- 只有可信空间才有流程审批,连接器是提交给可信空间审批的 -->
<!--
<ContentWrap
id=
"id-approveInfo"
title=
"流程审批"
expandSwicth
style=
"margin-top: 15px"
:isExpand=
"expandApprove"
@
expand=
"(v) => expandApprove = v"
>
<ApprovalProcess
ref=
"approvalProcessRef"
v-if=
"deploymentId"
:deploymentId=
"deploymentId"
:processInstanceId=
"processInstanceId"
>
</ApprovalProcess>
</ContentWrap>
</ContentWrap>
-->
</div>
<div
class=
"tool_btns"
>
<div
class=
"btns"
>
<el-button
v-for=
"btn in toolBtns"
:type=
"btn.type"
:plain=
"btn.plain"
@
click=
"btnClick(btn)"
>
{{
btn
.
label
}}
</el-button>
<el-button
v-for=
"btn in toolBtns"
:type=
"btn.type"
:plain=
"btn.plain"
@
click=
"btnClick(btn)"
>
{{
btn
.
label
}}
</el-button>
</div>
</div>
</div>
...
...
@@ -55,6 +112,8 @@
import
useUserStore
from
"@/store/modules/user"
;
import
StrategyTable
from
"../data_smart_contract/components/strategyTable.vue"
;
import
{
TableColumnWidth
}
from
"@/utils/enum"
;
import
{
CircleCloseFilled
}
from
"@element-plus/icons-vue"
;
import
{
getLogicSpaceDetail
}
from
"@/api/modules/dataAsset"
;
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
...
...
@@ -96,12 +155,21 @@ const btnClick = (btn: any) => {
const
cancel
=
()
=>
{
userStore
.
setTabbar
(
userStore
.
tabbar
.
filter
((
tab
:
any
)
=>
tab
.
fullPath
!==
fullPath
));
router
.
push
({
name
:
'product
Application
Manage'
name
:
'product
Space
Manage'
});
}
onBeforeMount
(()
=>
{
fullscreenLoading
.
value
=
true
;
getLogicSpaceDetail
({
guid
:
route
.
query
.
guid
}).
then
((
res
:
any
)
=>
{
fullscreenLoading
.
value
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
detailInfo
.
value
=
res
.
data
||
{};
memberTableInfo
.
value
.
data
=
detailInfo
.
value
.
permissionRSVOS
||
[];
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
})
const
memberTableInfo
=
ref
({
...
...
@@ -109,8 +177,10 @@ const memberTableInfo = ref({
height
:
'214px'
,
fields
:
[
{
label
:
"序号"
,
type
:
"index"
,
width
:
TableColumnWidth
.
INDEX
,
align
:
"center"
},
{
label
:
"成员名称"
,
field
:
"memberGuid"
,
width
:
200
},
{
label
:
"角色类型"
,
field
:
"roleType"
,
width
:
160
},
{
label
:
"成员名称"
,
field
:
"memberName"
,
width
:
200
},
{
label
:
"角色类型"
,
field
:
"characterType"
,
width
:
160
,
getName
:
(
scope
)
=>
{
return
!
scope
.
row
.
characterType
?
'--'
:
(
scope
.
row
.
characterType
==
'1'
?
'数据使用方'
:
'数据提供方'
)
}
},
{
label
:
"描述"
,
field
:
"description"
,
width
:
300
},
],
data
:
[],
...
...
@@ -197,4 +267,134 @@ const memberTableInfo = ref({
}
}
.panel_wrap
{
.panel_header
{
.header_title
{
height
:
40px
;
padding
:
0
16px
;
background-color
:
#fafafa
;
box-shadow
:
0
0
0
1px
#e5e5e5
;
display
:
flex
;
align-items
:
center
;
}
.title_text
{
line-height
:
22px
;
font-size
:
14px
;
color
:
var
(
--el-color-regular
);
font-weight
:
600
;
display
:
flex
;
align-items
:
center
;
.title_icon
{
width
:
26px
;
height
:
21px
;
margin-right
:
4px
;
cursor
:
pointer
;
&.active
{
transform
:
rotate
(
90deg
);
}
}
}
}
&
.results_panel
{
box-shadow
:
0
0
0
1px
#d9d9d9
;
.panel_header
{
.header_title
{
background-color
:
transparent
;
box-shadow
:
none
;
.el-icon
{
margin-right
:
8px
;
width
:
20px
;
height
:
20px
;
svg
{
width
:
100%
;
height
:
100%
;
}
}
}
}
.panel_body
{
padding-top
:
0
;
margin-top
:
0
;
box-shadow
:
none
;
.results_list
{
display
:
flex
;
.list_item
{
display
:
flex
;
margin-bottom
:
8px
;
margin-right
:
60px
;
color
:
#666
;
.item_value
{
padding
:
0
8px
;
color
:
var
(
--el-color-regular
);
}
}
}
}
&
.success
{
background-color
:
#F4FEF6
;
box-shadow
:
0
0
0
1px
#4FA55D
;
.panel_header
{
.header_title
{
.el-icon
{
color
:
#4FA55D
;
}
}
}
}
&
.reject
{
background-color
:
#FDF2F4
;
box-shadow
:
0
0
0
1px
#E63E33
;
.panel_header
{
.header_title
{
.el-icon
{
color
:
#E63E33
;
}
}
}
}
&
.audit
{
background-color
:
#FEFBF3
;
box-shadow
:
0
0
0
1px
#F19E40
;
.panel_header
{
.header_title
{
.el-icon
{
color
:
#F19E40
;
}
}
}
}
&
.revoke
{
background-color
:
#F5F5F5
;
box-shadow
:
0
0
0
1px
#CCCCCC
;
.panel_header
{
.header_title
{
.el-icon
{
color
:
#666666
;
}
}
}
}
}
}
</
style
>
\ No newline at end of file
...
...
src/views/data_asset/productSpaceEdit.vue
View file @
7a70da2
This diff is collapsed.
Click to expand it.
src/views/data_asset/productSpaceManage.vue
View file @
7a70da2
...
...
@@ -5,27 +5,40 @@
<el-input
v-model
.
trim=
"pageInfo.keyWord"
placeholder=
"名称搜索"
:suffix-icon=
"Search"
clearable
@
blur=
"toSearch(true, true)"
@
keyup
.
enter
.
native=
"searchEnterFun"
/>
</div>
<div
class=
"table_panel_wrap"
>
<div
v-show=
"listData.length"
class=
"data-content"
v-loading=
"listDataLoading"
>
<div
class=
"table_panel_wrap"
v-loading=
"listDataLoading"
>
<div
v-show=
"listData.length"
class=
"data-content"
>
<div
class=
"card-content"
v-for=
"(item, index) in listData"
:key=
"item.guid"
@
click=
"handleDataClick(item)"
>
<div
class=
"v-top"
>
<span
class=
"title"
>
{{
item
.
n
ame
}}
</span>
<el-tag
:type=
"tagType(item, '
approveState')"
>
{{
tagMethod
(
item
,
'a
pproveState'
)
}}
</el-tag>
<span
class=
"title"
>
{{
item
.
spaceN
ame
}}
</span>
<el-tag
:type=
"tagType(item, '
bizApproveState')"
>
{{
tagMethod
(
item
,
'bizA
pproveState'
)
}}
</el-tag>
</div>
<div
class=
"v-middle"
>
<div
class=
"per"
>
<div
class=
"desc"
>
产品数量
</div>
<div
class=
"cnt"
>
{{
item
.
productNum
==
null
?
'--'
:
changeNum
(
item
.
productNum
,
0
)
}}
</div>
<div
class=
"cnt"
>
{{
item
.
damCount
==
null
?
'--'
:
changeNum
(
item
.
damCount
,
0
)
}}
</div>
</div>
<div
class=
"per"
>
<div
class=
"desc"
>
成员数量
</div>
<div
class=
"cnt"
>
{{
item
.
productNum
==
null
?
'--'
:
changeNum
(
item
.
productNum
,
0
)
}}
</div>
<div
class=
"cnt"
>
{{
item
.
memberCount
==
null
?
'--'
:
changeNum
(
item
.
memberCount
,
0
)
}}
</div>
</div>
</div>
<div
class=
"v-bottom"
>
<template
v-if=
"item.bizApproveState == 'N'"
>
<div
class=
"per"
@
click
.
stop=
"clickEdit(item)"
>
编辑
</div>
<div
class=
"divider"
@
click
.
stop
></div>
<div
class=
"per"
@
click
.
stop=
"clickDelete(item)"
>
删除
</div>
</
template
>
<
template
v-else-if=
"item.bizApproveState == 'A'"
>
<div
class=
"per"
@
click
.
stop=
"clickDetail(item)"
>
详情
</div>
<div
class=
"divider"
@
click
.
stop
></div>
<div
class=
"per"
style=
"cursor: default;"
>
--
</div>
</
template
>
<
template
v-else
>
<div
class=
"per"
@
click
.
stop=
"clickDetail(item)"
>
详情
</div>
<div
class=
"divider"
@
click
.
stop
></div>
<div
class=
"per"
@
click
.
stop=
"clickDelete(item)"
>
删除
</div>
</
template
>
<!-- TODO 只有审批中才有删除 -->
</div>
</div>
</div>
...
...
@@ -41,16 +54,19 @@
import
{
commonPageConfig
}
from
'@/components/PageNav'
;
import
{
changeNum
,
tagMethod
,
tagType
}
from
'@/utils/common'
;
import
{
Search
}
from
"@element-plus/icons-vue"
;
import
{
getLogicSpacePageList
,
deleteLogicSpace
}
from
'@/api/modules/dataAsset'
;
import
useDataProductSpaceStore
from
"@/store/modules/productSpace"
;
const
productSpaceStore
=
useDataProductSpaceStore
();
const
router
=
useRouter
();
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
const
userData
=
JSON
.
parse
(
localStorage
.
userData
);
/** 卡片加载条 */
const
listDataLoading
=
ref
(
false
);
/** 列表数据 */
const
listData
:
any
=
ref
([{
guid
:
'1'
,
name
:
'产品空间1'
},
{
guid
:
'2'
,
name
:
'产品空间1'
},
{
guid
:
'3'
,
name
:
'产品空间1'
},
{
guid
:
'4'
,
name
:
'产品空间1'
},
{
guid
:
'5'
,
name
:
'产品空间1'
}
]);
const
listData
:
any
=
ref
([]);
const
oldKeyWord
=
ref
(
""
);
// 记录上次输入的关键字,避免重复搜索
const
isEnter
=
ref
(
false
);
// 标识是否通过回车键触发搜索
...
...
@@ -63,23 +79,23 @@ const pageInfo = ref({
});
const
getTableData
=
(
clear
=
false
)
=>
{
//
listDataLoading.value = true;
// getDamCatalogTable
({
//
pageSize: pageInfo.value.limit,
//
pageIndex: pageInfo.value.curr,
// keyWord
: pageInfo.value.keyWord
//
}).then((res: any) => {
//
listDataLoading.value = false;
//
if (res.code == proxy.$passCode) {
//
const data = res.data || {}
//
listData.value = data.records || [];
//
pageInfo.value.limit = data.pageSize
//
pageInfo.value.curr = data.pageIndex
//
pageInfo.value.rows = data.totalRows
//
} else {
//
proxy.$ElMessage.error(res.msg);
//
}
//
});
listDataLoading
.
value
=
true
;
getLogicSpacePageList
({
pageSize
:
pageInfo
.
value
.
limit
,
pageIndex
:
pageInfo
.
value
.
curr
,
spaceName
:
pageInfo
.
value
.
keyWord
}).
then
((
res
:
any
)
=>
{
listDataLoading
.
value
=
false
;
if
(
res
.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
{}
listData
.
value
=
data
.
records
||
[];
pageInfo
.
value
.
limit
=
data
.
pageSize
pageInfo
.
value
.
curr
=
data
.
pageIndex
pageInfo
.
value
.
rows
=
data
.
totalRows
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
});
}
const
pageChange
=
(
info
)
=>
{
...
...
@@ -123,11 +139,35 @@ const newCreate = () => {
}
const
handleDataClick
=
(
item
)
=>
{
let
approveState
=
item
.
bizApproveState
;
if
(
approveState
==
'A'
||
approveState
==
'Y'
)
{
//通过或审批中,点进去是详情
router
.
push
({
name
:
'productSpaceDetail'
,
query
:
{
guid
:
item
.
guid
,
name
:
item
.
spaceName
}
})
return
;
}
const
staffGuid
=
item
.
createUserId
||
''
;
let
currentStaffGuid
=
userData
.
tenantGuid
;
// 如果是驳回等状态,是自己创建的可以编辑。
if
((
approveState
==
'C'
||
approveState
==
'E'
||
approveState
==
'R'
))
{
router
.
push
({
name
:
staffGuid
==
currentStaffGuid
?
'productSpaceEdit'
:
'productSpaceDetail'
,
query
:
{
guid
:
item
.
guid
,
name
:
item
.
spaceName
}
})
return
;
}
router
.
push
({
name
:
'productSpaceEdit'
,
query
:
{
guid
:
item
.
guid
,
name
:
item
.
n
ame
name
:
item
.
spaceN
ame
}
})
}
...
...
@@ -137,19 +177,52 @@ const clickDetail = (item) => {
name
:
'productSpaceDetail'
,
query
:
{
guid
:
item
.
guid
,
name
:
item
.
name
name
:
item
.
spaceName
}
})
}
const
clickEdit
=
(
item
)
=>
{
router
.
push
({
name
:
'productSpaceEdit'
,
query
:
{
guid
:
item
.
guid
,
name
:
item
.
spaceName
}
})
}
const
clickDelete
=
(
item
)
=>
{
proxy
.
$openMessageBox
(
'此操作将永久删除该空间,是否继续?'
,
()
=>
{
// TODO
proxy
.
$openMessageBox
(
'此操作将永久删除该逻辑空间,是否继续?'
,
()
=>
{
deleteLogicSpace
([
item
.
guid
]).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
proxy
.
$ElMessage
.
success
(
'删除成功'
);
pageInfo
.
value
.
curr
=
1
;
getTableData
();
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
},
()
=>
{
proxy
.
$ElMessage
.
info
(
'已取消删除'
);
});
}
onActivated
(()
=>
{
if
(
productSpaceStore
.
isRefresh
)
{
pageInfo
.
value
.
keyWord
=
''
;
pageInfo
.
value
.
curr
=
1
;
getTableData
();
productSpaceStore
.
setIsRefresh
(
false
);
}
})
onBeforeMount
(()
=>
{
pageInfo
.
value
.
keyWord
=
''
;
pageInfo
.
value
.
curr
=
1
;
getTableData
();
})
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
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