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
7c5345e6
authored
2025-12-09 11:20:38 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改产品详情策略按钮控制
1 parent
ef8b4437
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
7 deletions
src/views/data_asset/dataUsage.vue
src/views/data_asset/registerCatalogDetail.vue
src/views/data_asset/dataUsage.vue
View file @
7c5345e
...
...
@@ -105,12 +105,29 @@ const tableInfo = ref({
actionInfo
:
{
label
:
"操作"
,
type
:
"btn"
,
width
:
2
3
0
,
width
:
2
0
0
,
btns
:
(
scope
)
=>
{
let
actions
=
scope
.
row
.
actions
||
{};
let
arrBtns
:
any
=
[];
if
(
scope
.
row
.
contractStatus
!=
'06'
)
{
for
(
let
action
in
actions
)
{
if
(
action
==
'download'
)
{
let
index
=
arrBtns
.
findIndex
(
a
=>
a
.
value
==
'read'
);
if
(
index
>
-
1
)
{
arrBtns
[
index
]
=
{
label
:
'查看'
,
value
:
'readAndDown'
,
click
:
btnHanldesMap
[
action
]
};
continue
;
}
}
if
(
action
==
'read'
)
{
let
index
=
arrBtns
.
findIndex
(
a
=>
a
.
value
==
'download'
);
if
(
index
>
-
1
)
{
arrBtns
[
index
]
=
{
label
:
'查看'
,
value
:
'readAndDown'
,
click
:
btnHanldesMap
[
action
]
};
continue
;
}
}
if
(
action
==
'distribute'
&&
scope
.
row
.
isDistribute
==
'Y'
)
{
continue
}
arrBtns
.
push
({
label
:
actions
[
action
],
value
:
action
,
click
:
btnHanldesMap
[
action
]
});
}
}
...
...
@@ -146,6 +163,18 @@ const btnHanldesMap = {
}
});
},
readAndDown
:
(
scope
)
=>
{
//下载
router
.
push
({
name
:
'usageCatalogDetail'
,
query
:
{
guid
:
scope
.
row
.
dataProductGuid
,
type
:
'detail'
,
foundMode
:
'readAndDown'
,
name
:
scope
.
row
.
dataProductName
,
useGuid
:
scope
.
row
.
guid
}
});
},
distribute
:
(
scope
)
=>
{
//分发
currTableData
.
value
=
scope
.
row
;
tenantDialogInfo
.
value
.
visible
=
true
;
...
...
src/views/data_asset/registerCatalogDetail.vue
View file @
7c5345e
...
...
@@ -32,6 +32,7 @@ import {
downloadTableData
,
downloadTableDataCheck
}
from
"@/api/modules/dataDelivery"
;
import
StrategyTable
from
'../data_smart_contract/components/strategyTable.vue'
;
const
router
=
useRouter
();
const
route
=
useRoute
();
...
...
@@ -371,18 +372,24 @@ const productTableInfo = ref({
loading
:
false
});
/** ----- 服务信息 ----- */
const
strategyDetail
=
ref
([]);
const
strategyContentLoading
=
ref
(
false
);
onBeforeMount
(()
=>
{
if
(
!
assetStore
.
isRefreshDamCatalog
)
{
getDetailInfo
();
}
});
onActivated
(()
=>
{
if
(
fullPath
===
route
.
fullPath
)
{
document
.
title
=
foundMode
.
value
==
'download'
?
`下载详情-
${
route
.
query
.
name
}
`
:
(
foundMode
.
value
==
'read'
?
`查看详情-
${
route
.
query
.
name
}
`
:
`详情-
${
route
.
query
.
name
}
`
);
document
.
title
=
foundMode
.
value
==
'download'
?
`下载详情-
${
route
.
query
.
name
}
`
:
(
(
foundMode
.
value
==
'read'
||
foundMode
.
value
==
'readAndDown'
)
?
`查看详情-
${
route
.
query
.
name
}
`
:
`详情-
${
route
.
query
.
name
}
`
);
let
tab
:
any
=
userStore
.
tabbar
.
find
((
tab
:
any
)
=>
tab
.
fullPath
===
fullPath
);
if
(
tab
)
{
tab
.
meta
.
title
=
foundMode
.
value
==
'download'
?
`下载详情-
${
route
.
query
.
name
}
`
:
(
foundMode
.
value
==
'read'
?
`查看详情-
${
route
.
query
.
name
}
`
:
`详情-
${
route
.
query
.
name
}
`
);
tab
.
meta
.
title
=
foundMode
.
value
==
'download'
?
`下载详情-
${
route
.
query
.
name
}
`
:
(
(
foundMode
.
value
==
'read'
||
foundMode
.
value
==
'readAndDown'
)
?
`查看详情-
${
route
.
query
.
name
}
`
:
`详情-
${
route
.
query
.
name
}
`
);
}
}
if
(
assetStore
.
isRefreshDamCatalog
)
{
...
...
@@ -1484,17 +1491,24 @@ const respParamsTableInfo = ref({
<span>
{{
scope
.
row
[
"updateTime"
]
||
'--'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
v-if=
"!detailInfo.nodeId || foundMode == 'download' || foundMode == 'read'"
<el-table-column
label=
"操作"
v-if=
"!detailInfo.nodeId || foundMode == 'download' || foundMode == 'read'
|| foundMode == 'readAndDown'
"
width=
"220px"
align=
"left"
fixed=
"right"
show-overflow-tooltip
>
<
template
#
default=
"scope"
>
<span
class=
"text_btn"
@
click=
"handleTableViewData(scope)"
>
查看样例数据
</span>
<el-divider
v-show=
"foundMode == 'download'"
direction=
"vertical"
/>
<span
v-show=
"foundMode == 'download'"
class=
"text_btn"
<!-- 如果是下载,就只显示下载,如果是查看和下载就都显示,就两个按钮都显示。仅查看,就仅查看 -->
<span
v-show=
"foundMode != 'download'"
class=
"text_btn"
@
click=
"handleTableViewData(scope)"
>
查看样例数据
</span>
<el-divider
v-show=
"foundMode == 'readAndDown'"
direction=
"vertical"
/>
<span
v-show=
"foundMode == 'download' || foundMode == 'readAndDown'"
class=
"text_btn"
@
click=
"handleTableViewDataDown(scope)"
>
下载数据
</span>
</
template
>
</el-table-column>
</el-table>
</ContentWrap>
<ContentWrap
v-if=
"strategyDetail?.length"
id=
"strategy-info"
title=
"合约策略信息"
style=
"margin: 16px 16px 16px"
>
<div
v-loading=
"strategyContentLoading"
>
<StrategyTable
ref=
"strategyTableDetailRef"
:show-title=
"true"
:is-look=
"true"
:value=
"strategyDetail"
>
</StrategyTable>
</div>
</ContentWrap>
<ContentWrap
v-if=
"(route.query.type == 'qualityEvaluate' && evaDetailInfo?.qualityEvaluationFile?.length > 0) || (route.query.type == 'costAssess' && costAssessDetail?.costAssessmentFile?.length > 0)"
id=
"id-assetContent"
title=
"附件信息"
description=
""
style=
"margin: 16px 16px 16px"
>
...
...
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