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
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
521 additions
and
91 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,21 +155,32 @@ 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
({
id
:
"input-member-table"
,
id
:
"input-member-table"
,
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
...
...
@@ -13,21 +13,19 @@
</div>
</el-tab-pane>
<el-tab-pane
label=
"策略配置"
name=
"strategy"
>
<StrategyTable
ref=
"strategyTableRef"
:value=
"detailInfo.policyRSVOS || (route.query.guid ? [] : [
{
index: 1,
action: '',
children: [{ childIndex: 1 }]
}])" :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList"
<StrategyTable
ref=
"strategyTableRef"
:value=
"detailInfo.policyRSVOS || []"
:operatorOptionList=
"operatorOptionList"
:actionOptionsList=
"actionOptionsList"
:constraintOptionsList=
"constraintOptionsList"
></StrategyTable>
</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=
"bottom_tool_wrap"
>
<el-button
@
click=
"cancel"
>
取消
</el-button>
...
...
@@ -46,20 +44,22 @@ import {
import
{
getActionPolicyList
,
getConstraintPolicyList
,
getContractTenantList
}
from
"@/api/modules/dataSmartContract"
import
useUserStore
from
"@/store/modules/user"
;
import
useDataProduct
ApplicationStore
from
"@/store/modules/productApplication
"
;
import
useDataProduct
SpaceStore
from
"@/store/modules/productSpace
"
;
import
{
useValidator
}
from
'@/hooks/useValidator'
;
import
{
TableColumnWidth
}
from
"@/utils/enum"
;
import
{
scrollLastRowToView
}
from
"@/utils/common"
;
import
StrategyTable
from
"../data_smart_contract/components/strategyTable.vue"
;
import
{
getLogicSpaceDetail
,
saveLogicSpace
,
updateLogicSpace
}
from
"@/api/modules/dataAsset"
;
const
{
required
}
=
useValidator
();
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
const
userStore
=
useUserStore
();
const
product
ApplicationStore
=
useDataProductApplication
Store
();
const
product
SpaceStore
=
useDataProductSpace
Store
();
const
route
=
useRoute
();
const
router
=
useRouter
();
const
userData
=
JSON
.
parse
(
localStorage
.
userData
);
...
...
@@ -86,6 +86,9 @@ const activeTabName = ref('member');
const
deploymentId
=
ref
(
''
);
const
processInstanceId
=
ref
(
''
);
/** 策略表格组件引用 */
const
strategyTableRef
=
ref
();
const
baseInfoFormRef
=
ref
();
const
domainDictList
:
any
=
ref
([]);
...
...
@@ -130,11 +133,11 @@ const baseInfoFormItems = ref([
{
label
:
'是否开启'
,
type
:
'switch'
,
field
:
'
bizSt
ate'
,
field
:
'
isActiv
ate'
,
default
:
'Y'
,
placeholder
:
'请选择'
,
activeValue
:
'Y'
,
inactiveValue
:
'
S
'
,
inactiveValue
:
'
N
'
,
required
:
true
,
switchWidth
:
32
,
},
...
...
@@ -142,7 +145,7 @@ const baseInfoFormItems = ref([
label
:
'逻辑空间描述'
,
type
:
'textarea'
,
placeholder
:
'该逻辑空间主要为医疗机构的数据产品,限制了数据产品以及只有进行查看操作。参与方为某某医药企业、某某医疗机构以及运营方。'
,
field
:
'
d
escription'
,
field
:
'
spaceD
escription'
,
default
:
''
,
block
:
true
,
maxlength
:
500
,
...
...
@@ -154,7 +157,7 @@ const baseInfoFormItems = ref([
const
baseInfoFormRules
=
ref
({
spaceName
:
[
required
(
'请输入逻辑空间名称'
)],
domain
:
[
required
(
'请选择所属领域'
)],
d
escription
:
[
required
(
'请输入逻辑空间描述'
)]
spaceD
escription
:
[
required
(
'请输入逻辑空间描述'
)]
})
const
cancel
=
()
=>
{
...
...
@@ -171,10 +174,10 @@ const cancel = () => {
const
memberTenantList
:
any
=
ref
([]);
const
roleTypeList
:
any
=
ref
([{
value
:
'
use
'
,
value
:
'
1
'
,
label
:
'数据使用方'
},
{
value
:
'
provider
'
,
value
:
'
2
'
,
label
:
'数据提供方'
}]);
...
...
@@ -191,7 +194,7 @@ const memberTableInfo = ref({
fields
:
[
{
label
:
"序号"
,
type
:
"index"
,
width
:
TableColumnWidth
.
INDEX
,
align
:
"center"
},
{
label
:
"成员名称"
,
field
:
"memberGuid"
,
width
:
200
,
required
:
true
,
columClass
:
'edit-colum'
,
type
:
'edit'
},
{
label
:
"角色类型"
,
field
:
"
role
Type"
,
width
:
160
,
required
:
true
,
columClass
:
'edit-colum'
,
type
:
'edit'
},
{
label
:
"角色类型"
,
field
:
"
character
Type"
,
width
:
160
,
required
:
true
,
columClass
:
'edit-colum'
,
type
:
'edit'
},
{
label
:
"描述"
,
field
:
"description"
,
width
:
300
,
required
:
false
,
columClass
:
'edit-colum'
,
type
:
'edit'
},
],
editInfo
:
{
...
...
@@ -209,10 +212,10 @@ const memberTableInfo = ref({
clearable
:
true
,
filterable
:
true
},
role
Type
:
{
character
Type
:
{
label
:
''
,
type
:
'select'
,
field
:
'
role
Type'
,
field
:
'
character
Type'
,
default
:
''
,
options
:
roleTypeList
.
value
,
props
:
{
...
...
@@ -271,28 +274,111 @@ const addMember = () => {
const
save
=
()
=>
{
// 保存不检验。
let
formInline
=
baseInfoFormRef
.
value
.
formInline
;
let
params
=
{
...
formInline
};
if
(
!
params
.
spaceName
)
{
proxy
.
$ElMessage
.
error
(
'逻辑空间名称不能为空'
);
return
;
}
params
.
permissionRQVOS
=
memberTableInfo
.
value
.
data
||
[];
params
.
policyRQVOS
=
strategyTableRef
.
value
.
strategyData
?.
map
((
d
,
index
)
=>
{
return
Object
.
assign
({},
d
,
{
orderNum
:
index
+
1
})
});
params
.
tenantGuid
=
userData
.
tenantGuid
;
fullscreenLoading
.
value
=
true
;
if
(
route
.
query
.
guid
)
{
params
.
guid
=
route
.
query
.
guid
;
updateLogicSpace
(
params
).
then
((
res
:
any
)
=>
{
fullscreenLoading
.
value
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
proxy
.
$ElMessage
.
success
(
'编辑保存成功'
);
userStore
.
setTabbar
(
userStore
.
tabbar
.
filter
((
tab
:
any
)
=>
tab
.
fullPath
!==
fullPath
));
router
.
push
({
name
:
'productSpaceManage'
});
productSpaceStore
.
setIsRefresh
(
true
);
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
}
else
{
saveLogicSpace
(
params
).
then
((
res
:
any
)
=>
{
fullscreenLoading
.
value
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
proxy
.
$ElMessage
.
success
(
'保存成功'
);
userStore
.
setTabbar
(
userStore
.
tabbar
.
filter
((
tab
:
any
)
=>
tab
.
fullPath
!==
fullPath
));
router
.
push
({
name
:
'productSpaceManage'
});
productSpaceStore
.
setIsRefresh
(
true
);
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
}
}
const
submit
=
()
=>
{
baseInfoFormRef
.
value
?.
ruleFormRef
?.
validate
().
then
((
valid
,
errorItem
)
=>
{
if
(
valid
)
{
let
formInline
=
baseInfoFormRef
.
value
.
formInline
;
// fullscreenLoading.value = true;
// listingSavePortal(params).then((res: any) => {
// fullscreenLoading.value = false;
// if (res?.code == proxy.$passCode) {
// proxy.$ElMessage.success('提交审批成功');
// userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
// productApplicationStore.setIsRefresh(true);
// router.push({
// name: "productApplicationManage",
// });
// } else {
// res?.msg && proxy.$ElMessage.error(res.msg);
// }
// }).catch((res) => {
// fullscreenLoading.value = false;
// });
// for循环判断相同成员不能重复添加相同的角色类型,且每行数据的成员guid和角色类型不能出现为空的,若为空则提示。
for
(
let
data
of
memberTableData
.
value
)
{
if
(
!
data
.
memberGuid
||
!
data
.
characterType
)
{
proxy
.
$ElMessage
.
error
(
'成员名称和角色类型请填写完整'
);
activeTabName
.
value
=
'member'
;
return
;
}
let
isExist
=
memberTableData
.
value
.
find
((
item
:
any
)
=>
data
!==
item
&&
item
.
memberGuid
==
data
.
memberGuid
&&
item
.
characterType
==
data
.
characterType
);
if
(
isExist
)
{
proxy
.
$ElMessage
.
error
(
'相同成员不能重复添加相同的角色类型'
);
activeTabName
.
value
=
'member'
;
return
;
}
}
let
validate
=
strategyTableRef
.
value
?.
validateValue
();
if
(
!
validate
)
{
activeTabName
.
value
=
'strategy'
;
return
;
}
let
params
=
{
...
formInline
};
params
.
permissionRQVOS
=
memberTableInfo
.
value
.
data
||
[];
params
.
policyRQVOS
=
strategyTableRef
.
value
.
strategyData
?.
map
((
d
,
index
)
=>
{
return
Object
.
assign
({},
d
,
{
orderNum
:
index
+
1
})
});
params
.
immediateApprove
=
true
;
params
.
tenantGuid
=
userData
.
tenantGuid
;
fullscreenLoading
.
value
=
true
;
if
(
route
.
query
.
guid
)
{
params
.
guid
=
route
.
query
.
guid
;
updateLogicSpace
(
params
).
then
((
res
:
any
)
=>
{
fullscreenLoading
.
value
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
proxy
.
$ElMessage
.
success
(
'编辑提交审批成功'
);
userStore
.
setTabbar
(
userStore
.
tabbar
.
filter
((
tab
:
any
)
=>
tab
.
fullPath
!==
fullPath
));
router
.
push
({
name
:
'productSpaceManage'
});
productSpaceStore
.
setIsRefresh
(
true
);
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
}
else
{
saveLogicSpace
(
params
).
then
((
res
:
any
)
=>
{
fullscreenLoading
.
value
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
proxy
.
$ElMessage
.
success
(
'提交审批成功'
);
userStore
.
setTabbar
(
userStore
.
tabbar
.
filter
((
tab
:
any
)
=>
tab
.
fullPath
!==
fullPath
));
router
.
push
({
name
:
'productSpaceManage'
});
productSpaceStore
.
setIsRefresh
(
true
);
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
}
}
else
{
var
obj
=
Object
.
keys
(
errorItem
);
baseInfoFormRef
.
value
.
ruleFormRef
.
scrollToField
(
obj
[
0
]);
...
...
@@ -302,31 +388,38 @@ const submit = () => {
onActivated
(()
=>
{
let
tab
:
any
=
userStore
.
tabbar
.
find
((
tab
:
any
)
=>
tab
.
fullPath
==
fullPath
);
let
detailType
=
route
.
query
.
type
;
let
name
=
route
.
query
.
name
;
if
(
tab
)
{
switch
(
detailType
)
{
case
'edit'
:
tab
.
meta
.
title
=
`编辑-
${
name
}
`
;
break
;
case
'redit'
:
tab
.
meta
.
title
=
`编辑-
${
name
}
`
;
break
;
default
:
tab
.
meta
.
title
=
'新增逻辑空间'
;
}
document
.
title
=
tab
.
meta
.
title
;
};
tab
.
meta
.
title
=
route
.
query
.
guid
?
`编辑-
${
name
}
`
:
'新增逻辑空间'
;
}
document
.
title
=
tab
.
meta
.
title
;
})
onBeforeMount
(()
=>
{
// getCamundaDeploymentId('10016', userData.tenantGuid, userData.staffGuid).then((res: any) => {
// 可信空间需要
// getCamundaDeploymentId('10034', userData.tenantGuid, userData.staffGuid).then((res: any) => {
// if (res.code == proxy.$passCode) {
// deploymentId.value = res.data;
// } else {
// proxy.$ElMessage.error(res.msg);
// }
// })
if
(
route
.
query
.
guid
)
{
fullscreenLoading
.
value
=
true
;
getLogicSpaceDetail
({
guid
:
route
.
query
.
guid
}).
then
((
res
:
any
)
=>
{
fullscreenLoading
.
value
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
detailInfo
.
value
=
res
.
data
||
{};
baseInfoFormItems
.
value
.
forEach
((
item
:
any
)
=>
{
item
.
default
=
detailInfo
.
value
[
item
.
field
]
||
''
;
})
memberTableInfo
.
value
.
data
=
detailInfo
.
value
?.
permissionRSVOS
||
[];
strategyTableRef
.
value
.
strategyData
=
detailInfo
.
value
?.
policyRSVOS
||
[];
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
);
}
})
}
getParamsList
({
dictType
:
'领域'
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
...
...
@@ -363,6 +456,15 @@ onBeforeMount(() => {
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
);
}
})
/** 获取可选择的成员下拉列表 */
getContractTenantList
().
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
memberTenantList
.
value
=
res
.
data
||
[];
memberTableInfo
.
value
.
editInfo
.
memberGuid
.
options
=
memberTenantList
.
value
;
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
})
</
script
>
...
...
@@ -402,7 +504,7 @@ onBeforeMount(() => {
}
:deep
(
.el-tabs
)
{
margin-top
:
-8
px
;
margin-top
:
0
px
;
.el-tabs__header
{
margin-bottom
:
8px
;
...
...
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"
>
<div
class=
"per"
@
click
.
stop=
"clickDetail(item)"
>
详情
</div>
<div
class=
"divider"
@
click
.
stop
></div>
<div
class=
"per"
@
click
.
stop=
"clickDelete(item)"
>
删除
</div>
<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