20241113-a
This commit is contained in:
104
src/pages/schema/centre/mooc/accessory.schema.ts
Normal file
104
src/pages/schema/centre/mooc/accessory.schema.ts
Normal 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 };
|
||||
1042
src/pages/schema/centre/mooc/course.schema.ts
Normal file
1042
src/pages/schema/centre/mooc/course.schema.ts
Normal file
File diff suppressed because it is too large
Load Diff
18
src/pages/schema/centre/mooc/resource.schema.ts
Normal file
18
src/pages/schema/centre/mooc/resource.schema.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
const schema = {
|
||||
type: 'page',
|
||||
body: {
|
||||
type: 'iframe',
|
||||
src: '/res',
|
||||
height: window.innerHeight - 80,
|
||||
},
|
||||
};
|
||||
window.parent.postMessage(
|
||||
{
|
||||
type: 'amis:resize',
|
||||
data: {
|
||||
height: window.innerHeight - 80
|
||||
}
|
||||
},
|
||||
'*'
|
||||
);
|
||||
export { schema };
|
||||
Reference in New Issue
Block a user