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

73 lines
2.6 KiB
JavaScript

import {
apiGet,
apiPost,
checkerOnly,
checkTypeMapping,
crudCommonOptions,
mappingField
} from "../../components/constants.js";
import {permissionDetailDialog} from "../../components/permission/dialog-permission.js";
export function tabCheck() {
return {
visibleOn: checkerOnly,
title: '审核审查',
icon: 'fa fa-shield-halved',
reload: true,
body: [
{
type: 'crud',
api: apiGet('${base}/check/list'),
...crudCommonOptions(),
headerToolbar: [
'reload',
],
columns: [
{
name: 'name',
label: '描述',
},
{
label: '类型',
width: 80,
align: 'center',
...mappingField('type', checkTypeMapping)
},
{
label: '操作',
width: 100,
type: 'operation',
fixed: 'right',
className: 'nowrap',
buttons: [
{
type: 'action',
label: '处理',
level: 'link',
...permissionDetailDialog(
'parameters.confirmationId',
[
{
type: 'each',
name: 'operations',
items: {
type: 'action',
label: '${item.name}',
level: '${item.level}',
actionType: 'ajax',
api: {
...apiPost('${base}/check/operation/${item.operation}'),
data: '${parameters}'
}
}
},
]
),
},
]
}
]
}
]
}
}