feat: gant block table configure

This commit is contained in:
katherinehhh 2023-01-30 10:24:13 +08:00
parent 636ad912f9
commit 3b6b84f8c3
2 changed files with 41 additions and 81 deletions

View File

@ -456,7 +456,7 @@ export const Gantt: any = (props) => {
return (
<div>
<Toolbar />
<div className={styles.wrapper} onKeyDown={handleKeyDown} tabIndex={0} ref={wrapperRef}>
<div>
<TableBlockProvider
service={ctx.service}
{...ctx}
@ -466,42 +466,44 @@ export const Gantt: any = (props) => {
>
<RecursionField name={'table'} schema={fieldSchema.properties.table} />
</TableBlockProvider>
<TaskGantt
gridProps={gridProps}
calendarProps={calendarProps}
barProps={barProps}
ganttHeight={ganttHeight}
scrollY={scrollY}
scrollX={scrollX}
ref={verticalGanttContainerRef}
/>
{ganttEvent.changedTask && (
<Tooltip
arrowIndent={arrowIndent}
rowHeight={rowHeight}
svgContainerHeight={svgContainerHeight}
svgContainerWidth={svgContainerWidth}
fontFamily={fontFamily}
fontSize={fontSize}
scrollX={scrollX}
<div className={styles.wrapper} onKeyDown={handleKeyDown} tabIndex={0} ref={wrapperRef}>
<TaskGantt
gridProps={gridProps}
calendarProps={calendarProps}
barProps={barProps}
ganttHeight={ganttHeight}
scrollY={scrollY}
task={ganttEvent.changedTask}
headerHeight={headerHeight}
taskListWidth={taskListWidth}
TooltipContent={TooltipContent}
rtl={rtl}
svgWidth={svgWidth}
scrollX={scrollX}
ref={verticalGanttContainerRef}
/>
)}
<VerticalScroll
ganttFullHeight={ganttFullHeight}
ganttHeight={ganttHeight}
headerHeight={headerHeight}
scroll={scrollY}
onScroll={handleScrollY}
rtl={rtl}
/>
{ganttEvent.changedTask && (
<Tooltip
arrowIndent={arrowIndent}
rowHeight={rowHeight}
svgContainerHeight={svgContainerHeight}
svgContainerWidth={svgContainerWidth}
fontFamily={fontFamily}
fontSize={fontSize}
scrollX={scrollX}
scrollY={scrollY}
task={ganttEvent.changedTask}
headerHeight={headerHeight}
taskListWidth={taskListWidth}
TooltipContent={TooltipContent}
rtl={rtl}
svgWidth={svgWidth}
/>
)}
<VerticalScroll
ganttFullHeight={ganttFullHeight}
ganttHeight={ganttHeight}
headerHeight={headerHeight}
scroll={scrollY}
onScroll={handleScrollY}
rtl={rtl}
/>
</div>
</div>
<HorizontalScroll
svgWidth={svgWidth}

View File

@ -1056,15 +1056,16 @@ export const createGanttBlockSchema = (options) => {
'x-initializer': 'GanttActionInitializers',
properties: {},
},
table:{
table: {
type: 'array',
'x-decorator': 'div',
'x-decorator-props': {
style: {
display: 'inline-block',
float: 'left',
width: '35%',
},
},
'x-initializer': 'TableColumnInitializers',
'x-component': 'TableV2',
'x-component-props': {
@ -1076,49 +1077,6 @@ export const createGanttBlockSchema = (options) => {
pagination: false,
},
},
// event: {
// type: 'void',
// 'x-component': 'Gantt.Event',
// properties: {
// drawer: {
// type: 'void',
// 'x-component': 'Action.Drawer',
// 'x-component-props': {
// className: 'nb-action-popup',
// },
// title: '{{ t("View record") }}',
// properties: {
// tabs: {
// type: 'void',
// 'x-component': 'Tabs',
// 'x-component-props': {},
// 'x-initializer': 'TabPaneInitializers',
// properties: {
// tab1: {
// type: 'void',
// title: '{{t("Details")}}',
// 'x-component': 'Tabs.TabPane',
// 'x-designer': 'Tabs.Designer',
// 'x-component-props': {},
// properties: {
// grid: {
// type: 'void',
// 'x-component': 'Grid',
// 'x-initializer-props': {
// actionInitializers: 'GanttFormActionInitializers',
// },
// 'x-initializer': 'RecordBlockInitializers',
// properties: {},
// },
// },
// },
// },
// },
// },
// },
// },
// },
},
},
},