20241113-a

This commit is contained in:
unknown
2024-11-13 09:05:45 +08:00
commit 3bcaa20bc4
186 changed files with 100169 additions and 0 deletions

View File

@@ -0,0 +1,104 @@
const schema = {
body: [
{
type: 'crud',
messages: {},
api: {
method: 'get',
url: 'rest/projects?select=*&organization_id=eq.${centre_id}&semester_id=eq.${currentSemester}&order=code',
data: { page: '$page', perPage: '$perPage' },
},
headerToolbar: [],
syncLocation: false,
pageField: 'page',
perPageField: 'perPage',
name: 'score',
footerToolbar: [
{ type: 'pagination' },
{ type: 'switch-per-page' },
{ type: 'statistics' },
],
mode: 'table',
affixHeader: true,
perPageAvailable: [10, 20, 30, 40, 50],
columns: [
{ name: 'code', type: 'text', label: '编号' },
{ type: 'text', name: 'name', label: '名称' },
{
type: 'operation',
label: '操作',
buttons: [
{
type: 'button',
actionType: 'dialog',
dialog: {
type: 'dialog',
title: '附件管理',
body: [
{
type: 'form',
title: '表单',
api: {
method: 'patch',
url: 'rest/projects?id=eq.${id}',
data: {
files: '${files}',
},
dataType: 'json',
},
body: [
{
type: 'combo',
label: '',
name: 'files',
mode: 'inline',
inputClassName: 'm-l-xs',
multiple: true,
controls: [
{
type: 'dataset-picker',
bucket: 'mooc',
name: 'path',
required: true,
},
{ type: 'tpl', tpl: '$path' },
],
multiLine: false,
joinValues: false,
draggable: false,
strictMode: false,
delimiter: ',',
scaffold: '',
disabled: false,
disabledOn: '',
removable: true,
},
],
},
],
closeOnEsc: true,
showCloseButton: true,
size: 'lg',
},
level: 'link',
size: 'md',
icon: 'fa fa-cog text-warning',
tooltip: '附件管理',
tooltipPlacement: 'top',
iconClassName: 'pull-left',
className: 'm-r-none m-l-none',
},
],
placeholder: '-',
},
],
bodyClassName: '',
initApi: '',
initFetch: '',
label: '名称',
},
],
type: 'page',
};
export { schema };