- 更新 resourceList 函数以支持 showMode 参数 - 调整 tab-data.js 和 tab-market.js 以适应新的对话框结构
52 lines
1.3 KiB
JavaScript
52 lines
1.3 KiB
JavaScript
import {wareDetailDialog} from "../../components/ware/dialog-ware.js";
|
|
import {apiGet, crudCommonOptions} from "../../components/constants.js";
|
|
import {authenticationAddDialog} from "../../components/permission/dialog-permission.js";
|
|
|
|
export function tabMarket() {
|
|
return {
|
|
title: '数据市场',
|
|
icon: 'fa fa-store',
|
|
reload: true,
|
|
body: {
|
|
type: 'crud',
|
|
api: {
|
|
...apiGet('${base}/ware/list_public'),
|
|
adaptor: (payload, response, api, context) => {
|
|
payload.data = payload.data.map(i => {
|
|
return {
|
|
...i,
|
|
targetId: i.resourceId,
|
|
}
|
|
})
|
|
return payload
|
|
}
|
|
},
|
|
...crudCommonOptions(),
|
|
headerToolbar: [
|
|
'reload',
|
|
],
|
|
mode: 'cards',
|
|
card: {
|
|
header: {
|
|
title: '${name}',
|
|
subTitle: '${createdTime}',
|
|
description: '${description}',
|
|
avatar: '${icon}',
|
|
avatarClassName: 'pull-left thumb-md avatar b-3x m-r'
|
|
},
|
|
actions: [
|
|
{
|
|
type: 'action',
|
|
label: '查看',
|
|
...wareDetailDialog(),
|
|
},
|
|
{
|
|
type: 'action',
|
|
label: '申请授权',
|
|
...authenticationAddDialog(),
|
|
}
|
|
]
|
|
},
|
|
}
|
|
}
|
|
} |