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
43ff9089
authored
2025-12-05 17:26:17 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
数据使用
1 parent
4352b373
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
216 additions
and
42 deletions
src/api/modules/dataDelivery.ts
src/components/Tools/table_search.vue
src/router/modules/dataAsset.ts
src/router/modules/dataDelivery.ts
src/views/data_asset/dataDelivery.vue
src/views/data_asset/dataUsage.vue
src/views/data_asset/dataUsageLog.vue
src/views/data_asset/registerCatalogDetail.vue
src/views/data_service/apiManagement.vue
src/views/data_smart_contract/contractLogManage.vue
src/api/modules/dataDelivery.ts
View file @
43ff908
...
...
@@ -38,4 +38,11 @@ export const getDataUsePageList = (params) => request({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/contract-use/page-list`
,
method
:
'post'
,
data
:
params
})
\ No newline at end of file
})
/** 删除数据使用 */
export
const
deleteDataUse
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/contract-use/delete`
,
method
:
'delete'
,
data
:
params
});
...
...
src/components/Tools/table_search.vue
View file @
43ff908
...
...
@@ -179,8 +179,8 @@ onMounted(() => {
</template>
<
template
v-else-if=
"item.type == 'date-time'"
>
<el-date-picker
v-model=
"formInline[item.field]"
type=
"datetimerange"
start-placeholder=
"开始时间
"
end-placeholder=
"结束时间
"
/>
<el-date-picker
v-model=
"formInline[item.field]"
type=
"datetimerange"
:start-placeholder=
"item.startPlaceholder ?? '开始时间'
"
:default-time=
"item.defaultTime ?? [item.defaultStartTime, item.defaultEndTime]"
:end-placeholder=
"item.endPlaceholder ?? '结束时间'
"
/>
</
template
>
<
template
v-else-if=
"item.type == 'date-range'"
>
<el-date-picker
v-model=
"formInline[item.field]"
type=
"daterange"
:start-placeholder=
"item.startPlaceholder ?? '开始日期'"
format=
"YYYY-MM-DD"
value-format=
"YYYY-MM-DD"
...
...
src/router/modules/dataAsset.ts
View file @
43ff908
...
...
@@ -69,7 +69,7 @@ const routes: RouteRecordRaw[] = [
name
:
'apiDetail'
,
component
:
()
=>
import
(
'@/views/data_asset/detail_serviceApi.vue'
),
meta
:
{
title
:
'
流程详情
'
,
title
:
'
详情-
'
,
sidebar
:
false
,
breadcrumb
:
false
,
cache
:
true
,
...
...
src/router/modules/dataDelivery.ts
View file @
43ff908
...
...
@@ -62,6 +62,42 @@ const routes: RouteRecordRaw[] = [
return
;
}
}
},
{
path
:
'usage-register-catalog-detail'
,
name
:
'usageCatalogDetail'
,
component
:
()
=>
import
(
'@/views/data_asset/registerCatalogDetail.vue'
),
meta
:
{
title
:
'详情-'
,
sidebar
:
false
,
breadcrumb
:
false
,
cache
:
true
,
reuse
:
true
}
},
{
path
:
'usage-api-detail'
,
name
:
'usageApiDetail'
,
component
:
()
=>
import
(
'@/views/data_asset/detail_serviceApi.vue'
),
meta
:
{
title
:
'详情-'
,
sidebar
:
false
,
breadcrumb
:
false
,
cache
:
true
,
reuse
:
true
}
},
{
path
:
'data-usage-log'
,
name
:
'dataUsageLog'
,
component
:
()
=>
import
(
'@/views/data_asset/dataUsageLog.vue'
),
meta
:
{
title
:
'使用日志-'
,
sidebar
:
false
,
breadcrumb
:
false
,
cache
:
true
,
reuse
:
true
}
}
],
},
...
...
src/views/data_asset/dataDelivery.vue
View file @
43ff908
...
...
@@ -234,7 +234,7 @@ const tableInfo = ref({
}
// 交付只有核验通过有。
let
verifySatus
=
row
.
verifySatus
;
(
verifySatus
==
1
||
verifySatus
==
4
)
&&
!
row
.
isRefresh
&&
btns
.
push
({
(
deliveryStatus
==
3
||
verifySatus
==
1
||
verifySatus
==
4
)
&&
!
row
.
isRefresh
&&
btns
.
push
({
value
:
'refresh'
,
label
:
'刷新'
,
click
:
(
scope
)
=>
{
scope
.
row
.
isRefresh
=
true
;
//只刷新当前这一条数据
...
...
@@ -273,7 +273,7 @@ const tableInfo = ref({
});
}
//已通过且未交付时,有交付按钮
verifySatus
==
3
&&
deliveryStatus
!=
2
&&
btns
.
push
({
verifySatus
==
3
&&
deliveryStatus
!=
2
&&
deliveryStatus
!=
3
&&
btns
.
push
({
value
:
'delivery'
,
label
:
'交付'
,
click
:
(
scope
)
=>
{
deliveryContract
(
scope
.
row
.
guid
).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
...
...
src/views/data_asset/dataUsage.vue
View file @
43ff908
...
...
@@ -3,9 +3,11 @@ import TableTools from "@/components/Tools/table_tools.vue";
import
{
commonPageConfig
,
TableColumnWidth
}
from
'@/utils/enum'
;
import
{
getDataUsePageList
,
deleteDataUse
,
}
from
"@/api/modules/dataDelivery"
;
import
{
useValidator
}
from
"@/hooks/useValidator"
;
const
{
required
}
=
useValidator
();
const
router
=
useRouter
();
const
route
=
useRoute
();
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
...
...
@@ -40,22 +42,20 @@ const page = ref({
const
tableFields
=
ref
([
{
label
:
"序号"
,
type
:
"index"
,
width
:
56
,
align
:
"center"
},
{
label
:
"数据产品名称"
,
field
:
"dataProductName"
,
width
:
150
,
type
:
"text_btn"
,
columClass
:
'text_btn'
,
value
:
"detail"
,
click
:
(
scope
)
=>
{
//TODO.是在数据使用方使用的
label
:
"数据产品名称"
,
field
:
"dataProductName"
,
width
:
160
,
type
:
"text_btn"
,
columClass
:
'text_btn'
,
value
:
"detail"
,
click
:
(
scope
)
=>
{
router
.
push
({
path
:
'/data-asset/register-catalog/register-catalog-d
etail'
,
name
:
'usageCatalogD
etail'
,
query
:
{
guid
:
scope
.
row
.
dataProductGuid
,
type
:
'detail'
,
dataSources
:
2
,
foundMode
:
1
,
foundMode
:
'use'
,
name
:
scope
.
row
.
dataProductName
,
}
});
}
},
{
label
:
"合约名称"
,
field
:
"contractName"
,
width
:
1
6
0
,
type
:
"text_btn"
,
columClass
:
'text_btn'
,
value
:
"detail1"
,
click
:
(
scope
)
=>
{
label
:
"合约名称"
,
field
:
"contractName"
,
width
:
1
7
0
,
type
:
"text_btn"
,
columClass
:
'text_btn'
,
value
:
"detail1"
,
click
:
(
scope
)
=>
{
//履约中的合约状态
router
.
push
({
name
:
'smartContractDetail'
,
...
...
@@ -73,7 +73,7 @@ const tableFields = ref([
return
scope
.
row
.
deliveryMethod
==
1
?
'文件'
:
'API'
;
}
},
{
label
:
"交付方"
,
field
:
"deliveryPartyName"
,
width
:
2
4
0
},
{
label
:
"交付方"
,
field
:
"deliveryPartyName"
,
width
:
2
2
0
},
{
label
:
"交付时间"
,
field
:
"deliveryTime"
,
width
:
170
},
]);
...
...
@@ -92,16 +92,75 @@ const tableInfo = ref({
actionInfo
:
{
label
:
"操作"
,
type
:
"btn"
,
width
:
16
0
,
width
:
23
0
,
btns
:
(
scope
)
=>
{
let
btns
:
any
=
[];
//TODO。根据返回值显示按钮
btns
.
push
({
label
:
'日志'
,
value
:
'log'
});
return
btns
;
let
actions
=
scope
.
row
.
actions
||
{};
let
arrBtns
:
any
=
[];
for
(
let
action
in
actions
)
{
arrBtns
.
push
({
label
:
actions
[
action
],
value
:
action
,
click
:
btnHanldesMap
[
action
]
});
}
arrBtns
.
push
({
label
:
'日志'
,
value
:
'log'
,
click
:
btnHanldesMap
[
'log'
]
});
return
arrBtns
;
}
}
});
const
btnHanldesMap
=
{
/** 查看产品详情 */
read
:
(
scope
)
=>
{
router
.
push
({
name
:
'usageCatalogDetail'
,
query
:
{
guid
:
scope
.
row
.
dataProductGuid
,
type
:
'detail'
,
foundMode
:
'read'
,
name
:
scope
.
row
.
dataProductName
,
}
});
},
download
:
(
scope
)
=>
{
//下载
router
.
push
({
name
:
'usageCatalogDetail'
,
query
:
{
guid
:
scope
.
row
.
dataProductGuid
,
type
:
'detail'
,
foundMode
:
'download'
,
name
:
scope
.
row
.
dataProductName
,
}
});
},
distribute
:
(
scope
)
=>
{
//分发
currTableData
.
value
=
scope
.
row
;
tenantDialogInfo
.
value
.
visible
=
true
;
templateFormItems
.
value
[
0
].
options
=
currTableData
.
value
.
deliveryNodes
||
[];
templateFormItems
.
value
[
0
].
default
=
''
;
},
delete
:
(
scope
)
=>
{
//删除
proxy
.
$openMessageBox
(
'确定要删除该数据使用吗?'
,
()
=>
{
deleteDataUse
([
scope
.
row
.
guid
]).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
page
.
value
.
curr
=
1
;
getTableData
();
proxy
.
$ElMessage
.
success
(
"删除成功"
);
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
});
},
()
=>
{
proxy
.
$ElMessage
.
info
(
"已取消"
);
})
},
log
:
(
scope
)
=>
{
//日志
router
.
push
({
name
:
'dataUsageLog'
,
query
:
{
contractGuid
:
scope
.
row
.
contractGuid
,
contractName
:
scope
.
row
.
contractName
}
});
}
}
const
toSearch
=
(
val
:
any
,
clear
:
boolean
=
false
)
=>
{
if
(
clear
)
{
searchItemList
.
value
.
map
((
item
)
=>
(
item
.
default
=
""
));
...
...
@@ -149,6 +208,51 @@ onBeforeMount(() => {
toSearch
({});
});
const
templateFormItems
=
ref
([{
type
:
'select'
,
label
:
'分发连接器'
,
field
:
'tenantGuids'
,
default
:
''
,
block
:
true
,
placeholder
:
'请选择'
,
options
:
[],
props
:
{
value
:
'guid'
,
label
:
'tenantName'
},
filterable
:
true
,
multiple
:
true
,
clearable
:
true
,
required
:
true
}]);
const
templateFormRules
=
ref
({
tenantGuids
:
[
required
(
'请选择分发连接器'
)]
});
const
tenantDialogInfo
=
ref
({
visible
:
false
,
size
:
480
,
title
:
"选择分发连接器"
,
type
:
'edit'
,
formInfo
:
{
id
:
'copy-form'
,
items
:
templateFormItems
.
value
,
rules
:
templateFormRules
.
value
},
submitBtnLoading
:
false
,
btns
:
{
submit
:
(
btn
,
info
)
=>
{
tenantDialogInfo
.
value
.
submitBtnLoading
=
true
;
tenantDialogInfo
.
value
.
visible
=
false
;
},
cancel
:
()
=>
{
tenantDialogInfo
.
value
.
visible
=
false
;
}
}
});
</
script
>
<
template
>
...
...
@@ -159,6 +263,8 @@ onBeforeMount(() => {
<div
class=
"table_panel_wrap"
style=
"height: calc(100% - 44px);"
>
<Table
:tableInfo=
"tableInfo"
@
tablePageChange=
"tablePageChange"
/>
</div>
<!-- 选择分发企业的对话框 -->
<Dialog
_form
:dialogConfigInfo=
"tenantDialogInfo"
/>
</div>
</
template
>
...
...
src/views/data_asset/dataUsageLog.vue
0 → 100644
View file @
43ff908
This diff is collapsed.
Click to expand it.
src/views/data_asset/registerCatalogDetail.vue
View file @
43ff908
...
...
@@ -41,6 +41,8 @@ const evaGuid = route.query.evaGuid;
const
costAssessGuid
=
route
.
query
.
costAssessGuid
;
const
certificateGuid
=
route
.
query
.
certificateGuid
;
const
detailType
=
ref
(
route
.
query
.
type
);
const
dataSources
=
ref
(
route
.
query
.
dataSources
||
2
)
const
foundMode
=
ref
(
route
.
query
.
foundMode
);
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
/** 当前主要类型的详情信息。 */
...
...
@@ -175,7 +177,7 @@ const registerDetailTableInfo = ref({
});
}
else
if
(
row
.
type
==
'trade'
)
{
router
.
push
({
path
:
route
.
query
.
dataSources
==
'1'
?
'/data-asset/authordata-catalog/register-catalog-transaction-detail'
:
'/data-asset/register-catalog/register-catalog-transaction-detail'
,
path
:
dataSources
.
value
==
'1'
?
'/data-asset/authordata-catalog/register-catalog-transaction-detail'
:
'/data-asset/register-catalog/register-catalog-transaction-detail'
,
//name: 'transactionManagement'
query
:
{
guid
:
row
.
guid
,
...
...
@@ -341,7 +343,24 @@ const productTableInfo = ref({
data
:
[],
showPage
:
false
,
actionInfo
:
{
show
:
false
label
:
"操作"
,
type
:
"btn"
,
isMore
:
false
,
width
:
130
,
btns
:
(
scope
)
=>
{
let
arrBtns
:
any
=
[];
//若是使用方,则换一个api地址
arrBtns
.
push
({
label
:
'查看'
,
value
:
'view'
,
click
:
(
scope
)
=>
{
router
.
push
({
name
:
(
route
.
query
.
foundMode
==
'read'
||
route
.
query
.
foundMode
==
'download'
)
?
'useApiDetail'
:
'apiDetail'
,
query
:
{
guid
:
scope
.
row
.
guid
,
apiName
:
scope
.
row
.
apiName
}
});
}
})
// 是否显示下载等。
return
arrBtns
;
}
},
loading
:
false
});
...
...
@@ -355,10 +374,10 @@ onBeforeMount(() => {
onActivated
(()
=>
{
if
(
detailInfo
.
value
?.
damName
)
{
if
(
fullPath
===
route
.
fullPath
)
{
document
.
title
=
`详情-
${
detailInfo
.
value
?.
damName
}
`
;
document
.
title
=
foundMode
.
value
==
'download'
?
`下载详情-
${
detailInfo
.
value
?.
damName
}
` : (foundMode.value == 'read' ? `
查看详情
-
$
{
detailInfo
.
value
?.
damName
}
` : `
详情
-
$
{
detailInfo
.
value
?.
damName
}
`)
;
let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath);
if (tab) {
tab.meta.title =
`
详情
-
$
{
detailInfo
.
value
?.
damName
}
`
;
tab.meta.title =
foundMode.value == 'download' ? `
下载详情
-
$
{
detailInfo
.
value
?.
damName
}
` : (foundMode.value == 'read' ? `
查看详情
-
$
{
detailInfo
.
value
?.
damName
}
` : `
详情
-
$
{
detailInfo
.
value
?.
damName
}
`)
;
}
}
}
...
...
@@ -417,7 +436,7 @@ const handleTableViewData = (scope) => {
let row = scope.row;
router.push({
// name: 'damTableDataView',
path:
route.query.dataSources
== '1' ? '/data-asset/authordata-catalog/damTableDataView' : '/data-asset/register-catalog/damTableDataView',
path:
dataSources.value
== '1' ? '/data-asset/authordata-catalog/damTableDataView' : '/data-asset/register-catalog/damTableDataView',
query: {
guid: row.guid,
name: row.tableChName,
...
...
@@ -426,6 +445,11 @@ const handleTableViewData = (scope) => {
});
}
/** 下载数据 */
const handleTableViewDataDown = (scope) => {
//TODO
}
const toolBtns: any = computed(() => {
let btnsArr: any = [{
label: "关闭", value: "cancel", plain: true
...
...
@@ -453,7 +477,7 @@ const btnClick = (btn) => {
console.log('detailType', detailType.value);
if (detailType.value == 'asset') {
router.push({
path:
route.query.dataSources
== '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog',
path:
dataSources.value
== '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog',
//name: 'registerCatalogManagement',
query: {}
});
...
...
@@ -1100,16 +1124,16 @@ const formattedAmount = computed(() => {
const
handleClick
=
()
=>
{
// 跳转到 apiDetail 页面
if
(
detailInfo
.
value
.
foundMode
==
'2'
)
{
router
.
push
({
path
:
route
.
query
.
dataSources
==
'1'
?
'/data-asset/authordata-catalog/api-detail'
:
'/data-asset/register-catalog/api-detail'
,
//name: 'apiDetail',
query
:
{
guid
:
detailInfo
.
value
.
guid
,
type
:
'detaile'
,
}
});
}
//
if (detailInfo.value.foundMode == '2') {
//
router.push({
//
path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog/api-detail' : '/data-asset/register-catalog/api-detail',
//
//name: 'apiDetail',
//
query: {
//
guid: detailInfo.value.guid,
//
type: 'detaile',
//
}
//
});
//
}
};
const
deliverySpanMethod
=
({
...
...
@@ -1230,7 +1254,7 @@ const respParamsTableInfo = ref({
<div
class=
"right-main"
>
<div
class=
"asset-title"
>
<div
style=
"display: flex;align-items: center;width: 100%"
>
<div
@
click=
"handleClick"
:class=
"
{ 'foundMode': detailInfo.foundMode == '2',
'title1': true }">
<ellipsis-tooltip
:content=
"detailInfo.damName ?? '--'"
<div
:class=
"
{
'title1': true }">
<ellipsis-tooltip
:content=
"detailInfo.damName ?? '--'"
class-name=
"w100f"
:refName=
"'tooltipOver' + 'damName'"
></ellipsis-tooltip></div>
<div
class=
"dataLabel"
>
{{
detailInfo
.
damTypeName
}}
</div>
<div
class=
"dataLabel"
v-show=
"detailInfo.domainName"
>
{{
detailInfo
.
domainName
}}
</div>
...
...
@@ -1449,9 +1473,10 @@ const respParamsTableInfo = ref({
<span>
{{
scope
.
row
[
"updateTime"
]
||
'--'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
v-if=
"!detailInfo.nodeId"
minWidth=
"120px"
align=
"left"
fixed=
"right"
show-overflow-tooltip
>
<el-table-column
label=
"操作"
v-if=
"!detailInfo.nodeId
|| foundMode == 'download'
"
minWidth=
"120px"
align=
"left"
fixed=
"right"
show-overflow-tooltip
>
<
template
#
default=
"scope"
>
<span
class=
"text_btn"
@
click=
"handleTableViewData(scope)"
>
查看样例数据
</span>
<span
class=
"text_btn"
@
click=
"handleTableViewDataDown(scope)"
>
下载数据
</span>
</
template
>
</el-table-column>
</el-table>
...
...
src/views/data_service/apiManagement.vue
View file @
43ff908
...
...
@@ -196,10 +196,10 @@ const tableInfo = ref({
btns
:
(
scope
)
=>
{
const
{
row
}
=
scope
;
let
list
:
any
=
[];
list
.
push
({
label
:
"编辑"
,
disabled
:
row
.
apiState
==
1
,
value
:
"edit"
,
click
:
apiManageTableBtnMap
.
EDIT
});
list
.
push
({
label
:
"删除"
,
disabled
:
row
.
apiState
==
1
,
value
:
"del"
,
click
:
apiManageTableBtnMap
.
DELETE
});
list
.
push
({
label
:
"编辑"
,
disabled
:
row
.
apiState
==
1
||
!!
row
.
nodeId
,
value
:
"edit"
,
click
:
apiManageTableBtnMap
.
EDIT
});
list
.
push
({
label
:
"删除"
,
disabled
:
row
.
apiState
==
1
||
!!
row
.
nodeId
,
value
:
"del"
,
click
:
apiManageTableBtnMap
.
DELETE
});
list
.
push
({
label
:
"详情"
,
value
:
"detail"
,
click
:
apiManageTableBtnMap
.
DETAIL
});
list
.
push
({
label
:
"复制"
,
value
:
"copy"
,
click
:
apiManageTableBtnMap
.
COPY
})
list
.
push
({
label
:
"复制"
,
value
:
"copy"
,
disabled
:
!!
row
.
nodeId
,
click
:
apiManageTableBtnMap
.
COPY
})
return
list
;
// const approveVO = row.approveVO || {};
// if (!approveVO && row.isApprove == 'N') {
...
...
src/views/data_smart_contract/contractLogManage.vue
View file @
43ff908
...
...
@@ -64,8 +64,8 @@ const processTableSearchItemList = ref([{
default
:
[],
defaultStartTime
:
new
Date
(
2000
,
1
,
1
,
0
,
0
,
0
),
defaultEndTime
:
new
Date
(
2000
,
1
,
1
,
23
,
59
,
59
),
startPlaceholder
:
'
操作
开始时间'
,
endPlaceholder
:
'
操作
结束时间'
,
startPlaceholder
:
'
执行
开始时间'
,
endPlaceholder
:
'
执行
结束时间'
,
clearable
:
true
},
{
type
:
'select'
,
...
...
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