import {apiGet, crudCommonOptions, providerOnly, userOnly} from "../../components/constants.js"; import {permissionAddDialog, permissionDetailDialog} from "../../components/permission/dialog-permission.js"; export function tabPermissions() { return { visibleOn: userOnly, title: '权属管理', icon: 'fa fa-user-shield', body: { type: 'tabs', tabs: [ { visibleOn: providerOnly, title: '确权管理', body: { type: 'crud', api: { ...apiGet('${base}/confirmation/list') }, ...crudCommonOptions(), headerToolbar: [ 'reload', { type: 'action', label: '', icon: 'fa fa-plus', ...permissionAddDialog() }, ], columns: [ { label: '名称', name: 'name', width: 200, }, { label: '描述', name: 'description', }, { label: '创建时间', width: 150, align: 'center', type: 'tpl', tpl: "${IF(createdTime, DATETOSTR(createdTime), '-')}" }, { label: '操作', width: 100, type: 'operation', fixed: 'right', className: 'nowrap', buttons: [ { type: 'action', label: '查看', level: 'link', ...permissionDetailDialog(), }, { type: 'action', label: '编辑', level: 'link', }, ] }, ] } }, { title: '授权管理', body: [] } ] } } }