fix(bi): chart filter fields

This commit is contained in:
xilesun 2024-03-03 14:17:18 +08:00
parent 542390899f
commit 2cf11fe7ac
5 changed files with 27 additions and 12 deletions

View File

@ -236,7 +236,6 @@ export const ACLActionProvider = (props) => {
return <>{props.children}</>;
}
const params = parseAction(actionPath, { schema, recordPkValue });
console.log(params, actionPath, recordPkValue, 'params');
if (!params) {
return <ACLActionParamsContext.Provider value={params}>{props.children}</ACLActionParamsContext.Provider>;
}

View File

@ -799,5 +799,9 @@
"Used for drag and drop sorting scenarios, supporting grouping sorting": "Used for drag and drop sorting scenarios, supporting grouping sorting",
"Group sorting": "Group sorting",
"When a field is selected as a group, it will be grouped first and then sorted": "When a field is selected as a group, it will be grouped first and then sorted",
"Departments": "Departments"
"Departments": "Departments",
"Main department": "Main department",
"Department name": "Department name",
"Superior department": "Superior department",
"Owners": "Owners"
}

View File

@ -599,7 +599,7 @@
"Global action permissions": "全局操作权限",
"General action permissions": "通用操作权限",
"Plugin settings permissions": "插件配置权限",
"Data source permissions":"数据源权限",
"Data source permissions": "数据源权限",
"Allow to desgin pages": "允许界面配置",
"Allow to manage plugins": "允许管理插件",
"Allow to configure plugins": "允许管理配置中心",
@ -884,5 +884,9 @@
"Main": "主数据源",
"Index": "索引",
"The field must be a primary key or have a unique index set": "字段必须是主键或者设置了唯一索引",
"Departments": "部门"
"Departments": "部门",
"Main department": "主属部门",
"Department name": "部门名称",
"Superior department": "上级部门",
"Owners": "负责人"
}

View File

@ -6,6 +6,8 @@ import { uid } from '@formily/shared';
import {
ACLCollectionFieldProvider,
BlockItem,
CollectionFieldProvider,
CollectionProvider,
FormDialog,
HTMLEncode,
SchemaComponent,
@ -75,15 +77,21 @@ export const ChartFilterFormItem = observer(
},
);
}, [showTitle]);
const collectionField = schema?.['x-collection-field'] || '';
const [collection] = collectionField.split('.');
return (
<ACLCollectionFieldProvider>
<BlockItem className={'nb-form-item'}>
<ErrorBoundary onError={(err) => console.log(err)} FallbackComponent={ErrorFallback}>
<FormItem className={className} {...props} extra={extra} />
</ErrorBoundary>
</BlockItem>
</ACLCollectionFieldProvider>
<CollectionProvider name={collection} allowNull={!collection}>
<CollectionFieldProvider name={schema.name} allowNull={!schema['x-collection-field']}>
<ACLCollectionFieldProvider>
<BlockItem className={'nb-form-item'}>
<ErrorBoundary onError={(err) => console.log(err)} FallbackComponent={ErrorFallback}>
<FormItem className={className} {...props} extra={extra} />
</ErrorBoundary>
</BlockItem>
</ACLCollectionFieldProvider>
</CollectionFieldProvider>
</CollectionProvider>
);
},
{ displayName: 'ChartFilterFormItem' },

View File

@ -458,7 +458,7 @@ export const usersSchema: ISchema = {
'x-component': 'Action.Link',
'x-component-props': {
confirm: {
title: "{{t('Delete user')}}",
title: "{{t('Delete')}}",
content: "{{t('Are you sure you want to delete it?')}}",
},
useAction: '{{cm.useDestroyAction}}',