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
dd2f4170
authored
2026-04-03 17:09:39 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
数据申请按钮不跟角色绑定
1 parent
8733607e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
101 deletions
src/views/data_asset/productApplicationDetail.vue
src/views/data_asset/productApplicationManage.vue
src/views/data_asset/productCatalogManage.vue
src/views/data_asset/productApplicationDetail.vue
View file @
dd2f417
...
...
@@ -40,7 +40,7 @@
</div>
<ContentWrap
id=
"id-baseInfo"
title=
"数据申请信息"
description=
""
:expand-swicth=
"false"
>
<div
class=
"list_panel"
>
<div
v-if=
"!isDataUse"
class=
"list_item is_block"
style=
"font-weight: 600;"
>
<div
class=
"list_item is_block"
style=
"font-weight: 600;"
>
<span
class=
"item_label"
>
数据申请方:
</span>
<span
class=
"item_value"
>
{{
detailInfo
.
tenantName
||
'--'
}}
</span>
</div>
...
...
@@ -93,7 +93,8 @@
</div>
<div
class=
"tool_btns"
>
<div
class=
"btns"
>
<el-button
v-for=
"btn in toolBtns"
:type=
"btn.type"
:plain=
"btn.plain"
@
click=
"btn.click ? btn.click() : btnClick(btn)"
>
{{
btn
.
label
<el-button
v-for=
"btn in toolBtns"
:type=
"btn.type"
:plain=
"btn.plain"
@
click=
"btn.click ? btn.click() : btnClick(btn)"
>
{{
btn
.
label
}}
</el-button>
</div>
</div>
...
...
@@ -132,65 +133,51 @@ const viewProductDetail = () => {
});
}
/** 是否是数据提供方 */
const
isDataUse
=
computed
(()
=>
{
return
localStorage
.
getItem
(
'userRole'
)
==
USERROLE
.
USE
;
})
const
toolBtns
:
any
=
computed
(()
=>
{
if
(
isDataUse
.
value
)
{
let
btnsArr
:
any
=
[{
label
:
"关闭"
,
value
:
"cancel"
,
plain
:
true
}];
const
approveVO
=
detailInfo
.
value
.
applicationApproveRSVO
||
{}
let
approveState
=
approveVO
.
approveState
||
null
;
const
staffGuid
=
detailInfo
.
value
.
createUserId
||
''
;
const
currentStaffGuid
=
userData
.
userGuid
;
if
(
approveState
==
'A'
&&
staffGuid
==
currentStaffGuid
)
{
btnsArr
.
push
({
label
:
"撤销"
,
value
:
"revoke"
,
click
:
()
=>
{
proxy
.
$openMessageBox
(
'确定撤销该数据申请审批吗??'
,
()
=>
{
fullscreenLoading
.
value
=
true
;
updateDataApplyState
({
guid
:
detailInfo
.
value
.
guid
,
approveState
:
'C'
}).
then
((
res
:
any
)
=>
{
fullscreenLoading
.
value
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
proxy
.
$ElMessage
.
success
(
'该数据申请撤销成功'
);
getDetail
();
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
});
},
()
=>
{
proxy
.
$ElMessage
.
info
(
"已取消撤销"
);
let
btnsArr
:
any
=
[{
label
:
"关闭"
,
value
:
"cancel"
,
plain
:
true
}];
const
staffGuid
=
detailInfo
.
value
.
createUserId
||
''
;
const
currentStaffGuid
=
userData
.
userGuid
;
// 获取审批人。
const
approveVO
=
detailInfo
.
value
.
applicationApproveRSVO
||
{}
let
approveState
=
approveVO
.
approveState
||
null
;
let
approveStaffGuid
=
approveVO
?.
approveInstanceRSVOS
?.[
1
]?.
operator
||
''
;
if
(
approveState
==
'A'
&&
approveStaffGuid
==
userData
.
tenantGuid
)
{
btnsArr
.
push
(...[{
label
:
"通过"
,
value
:
"pass"
,
type
:
'primary'
,
click
:
()
=>
{
passDialogInfo
.
value
.
visible
=
true
;
}
},
{
label
:
"驳回"
,
value
:
"reject"
,
type
:
'danger'
,
plain
:
true
,
click
:
()
=>
{
rejectDialogInfo
.
value
.
visible
=
true
;
}
}])
}
if
(
approveState
==
'A'
&&
staffGuid
==
currentStaffGuid
)
{
btnsArr
.
push
({
label
:
"撤销"
,
value
:
"revoke"
,
click
:
()
=>
{
proxy
.
$openMessageBox
(
'确定撤销该数据申请审批吗??'
,
()
=>
{
fullscreenLoading
.
value
=
true
;
updateDataApplyState
({
guid
:
detailInfo
.
value
.
guid
,
approveState
:
'C'
}).
then
((
res
:
any
)
=>
{
fullscreenLoading
.
value
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
proxy
.
$ElMessage
.
success
(
'该数据申请撤销成功'
);
getDetail
();
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
});
}
})
}
return
btnsArr
;
}
else
{
let
btnsArr
:
any
=
[{
label
:
"关闭"
,
value
:
"cancel"
,
plain
:
true
}];
// 获取审批人。
const
approveVO
=
detailInfo
.
value
.
applicationApproveRSVO
||
{}
let
approveState
=
approveVO
.
approveState
||
null
;
let
approveStaffGuid
=
approveVO
?.
approveInstanceRSVOS
?.[
1
]?.
operator
||
''
;
if
(
approveState
==
'A'
&&
approveStaffGuid
==
userData
.
tenantGuid
)
{
btnsArr
.
push
(...[{
label
:
"通过"
,
value
:
"pass"
,
type
:
'primary'
,
click
:
()
=>
{
passDialogInfo
.
value
.
visible
=
true
;
}
},
{
label
:
"驳回"
,
value
:
"reject"
,
type
:
'danger'
,
plain
:
true
,
click
:
()
=>
{
rejectDialogInfo
.
value
.
visible
=
true
;
}
}])
}
return
btnsArr
;
},
()
=>
{
proxy
.
$ElMessage
.
info
(
"已取消撤销"
);
});
}
})
}
return
btnsArr
;
});
const
btnClick
=
(
btn
:
any
)
=>
{
...
...
src/views/data_asset/productApplicationManage.vue
View file @
dd2f417
...
...
@@ -143,44 +143,38 @@ const tableInfo = ref({
if
(
approveState
==
'N'
)
{
flowState
=
1
;
}
if
(
isDataUse
.
value
)
{
let
isShowCancel
=
false
;
let
list
:
any
=
[];
const
staffGuid
=
row
.
createUserId
||
''
;
const
currentStaffGuid
=
userData
.
userGuid
if
((
bizApproveState
==
'D'
||
approveState
==
'C'
||
approveState
==
'R'
||
approveState
==
'E'
)
&&
staffGuid
==
currentStaffGuid
)
{
flowState
=
3
;
}
if
(
approveState
==
'A'
&&
staffGuid
==
currentStaffGuid
)
{
isShowCancel
=
true
;
}
if
(
flowState
===
1
)
{
list
=
[{
label
:
"编辑"
,
value
:
"edit"
,
click
:
btnHandlers
.
edit
},
{
label
:
"删除"
,
value
:
"del"
,
click
:
btnHandlers
.
del
}]
}
if
(
flowState
!==
1
)
{
list
.
push
({
label
:
"详情"
,
value
:
"detail"
,
click
:
btnHandlers
.
detail
})
}
if
(
flowState
===
3
&&
bizApproveState
!==
'D'
)
{
//重新提交过的不能再重新提交 && bizApproveState != 'D'
list
.
push
({
label
:
"重新提交"
,
value
:
"redit"
,
click
:
btnHandlers
.
redit
})
//已驳回
}
isShowCancel
&&
list
.
push
({
label
:
"撤销"
,
value
:
"revoke"
,
click
:
btnHandlers
.
revoke
})
if
(
flowState
===
3
)
{
list
.
push
({
label
:
"删除"
,
value
:
"del"
,
click
:
btnHandlers
.
del
})
}
return
list
}
else
{
//数据提供方需要进行审批驳回和通过。
let
list
:
any
=
[];
list
.
push
({
label
:
"详情"
,
value
:
"detail"
,
click
:
btnHandlers
.
detail
});
// 获取审批人。
let
approveStaffGuid
=
approveVO
?.
approveInstanceRSVOS
?.[
1
]?.
operator
||
''
;
if
(
approveState
==
'A'
&&
approveStaffGuid
==
userData
.
tenantGuid
)
{
flowState
=
2
;
}
if
(
flowState
===
2
)
{
list
.
push
(...[{
label
:
"通过"
,
value
:
"pass"
,
click
:
btnHandlers
.
pass
},
{
label
:
"驳回"
,
value
:
"reject"
,
click
:
btnHandlers
.
reject
}])
}
return
list
;
let
isShowCancel
=
false
;
let
list
:
any
=
[];
const
staffGuid
=
row
.
createUserId
||
''
;
const
currentStaffGuid
=
userData
.
userGuid
if
((
bizApproveState
==
'D'
||
approveState
==
'C'
||
approveState
==
'R'
||
approveState
==
'E'
)
&&
staffGuid
==
currentStaffGuid
)
{
flowState
=
3
;
}
if
(
approveState
==
'A'
&&
staffGuid
==
currentStaffGuid
)
{
isShowCancel
=
true
;
}
if
(
flowState
===
1
)
{
list
=
[{
label
:
"编辑"
,
value
:
"edit"
,
click
:
btnHandlers
.
edit
},
{
label
:
"删除"
,
value
:
"del"
,
click
:
btnHandlers
.
del
}]
}
if
(
flowState
!==
1
)
{
list
.
push
({
label
:
"详情"
,
value
:
"detail"
,
click
:
btnHandlers
.
detail
})
}
// 获取审批人。
let
approveStaffGuid
=
approveVO
?.
approveInstanceRSVOS
?.[
1
]?.
operator
||
''
;
if
(
approveState
==
'A'
&&
approveStaffGuid
==
userData
.
tenantGuid
)
{
flowState
=
2
;
}
if
(
flowState
===
2
)
{
list
.
push
(...[{
label
:
"通过"
,
value
:
"pass"
,
click
:
btnHandlers
.
pass
},
{
label
:
"驳回"
,
value
:
"reject"
,
click
:
btnHandlers
.
reject
}])
}
if
(
flowState
===
3
&&
bizApproveState
!==
'D'
)
{
//重新提交过的不能再重新提交 && bizApproveState != 'D'
list
.
push
({
label
:
"重新提交"
,
value
:
"redit"
,
click
:
btnHandlers
.
redit
})
//已驳回
}
isShowCancel
&&
list
.
push
({
label
:
"撤销"
,
value
:
"revoke"
,
click
:
btnHandlers
.
revoke
})
if
(
flowState
===
3
)
{
list
.
push
({
label
:
"删除"
,
value
:
"del"
,
click
:
btnHandlers
.
del
})
}
return
list
},
}
});
...
...
@@ -244,13 +238,13 @@ const btnHandlers = {
proxy
.
$ElMessage
.
info
(
"已取消撤销"
);
});
},
pass
:
(
scope
)
=>
{
pass
:
(
scope
)
=>
{
passDialogInfo
.
value
.
visible
=
true
;
currTableData
.
value
=
scope
.
row
;
},
reject
:
(
scope
)
=>
{
reject
:
(
scope
)
=>
{
rejectDialogInfo
.
value
.
visible
=
true
;
currTableData
.
value
=
scope
.
row
;
currTableData
.
value
=
scope
.
row
;
}
}
const
toSearch
=
(
val
:
any
,
clear
:
boolean
=
false
)
=>
{
...
...
@@ -276,8 +270,7 @@ const getTableData = () => {
pageSize
:
page
.
value
.
limit
,
damName
:
page
.
value
.
damName
,
damType
:
page
.
value
.
damType
,
approveState
:
page
.
value
.
approveState
,
characterType
:
isDataUse
.
value
?
'1'
:
'2'
approveState
:
page
.
value
.
approveState
}).
then
((
res
:
any
)
=>
{
tableInfo
.
value
.
loading
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
...
...
src/views/data_asset/productCatalogManage.vue
View file @
dd2f417
...
...
@@ -350,7 +350,7 @@ const tableInfo = ref({
actionInfo
:
{
label
:
"操作"
,
type
:
"btn"
,
show
:
isDataUse
.
value
,
// 仅对数据使用方
显示
// show: isDataUse.value, // 都可以
显示
width
:
120
,
// 操作按钮定义
btns
:
(
scope
)
=>
{
...
...
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