1
0
Files
gringotts/gringotts-frontend/pages/index/tab-data.js

59 lines
1.9 KiB
JavaScript

import {resourceAddDialog, resourceDetailDialog} from "../../components/resource/dialog-resource.js";
import {apiPost, copyField, crudCommonOptions} from "../../components/constants.js";
export function tabData() {
return {
title: '数据资源',
icon: 'fa fa-database',
body: [
{
type: 'crud',
api: {
...apiPost('${base}/data_resource/list')
},
...crudCommonOptions(),
headerToolbar: [
'reload',
{
type: 'action',
label: '新增数据资源',
icon: 'fa fa-plus',
...resourceAddDialog()
},
],
columns: [
{
label: '名称',
name: 'name',
width: 200,
...copyField(
'name',
'查看详情',
undefined,
resourceDetailDialog(),
)
},
{
label: '描述',
name: 'description',
},
{
label: '创建时间',
width: 150,
align: 'center',
type: 'tpl',
tpl: "${IF(createdTime, DATETOSTR(createdTime), '-')}"
},
{
label: '操作',
width: 200,
type: 'operation',
fixed: 'right',
className: 'nowrap',
buttons: []
},
]
}
]
}
}