@steedos-widgets/amis-lib 1.1.4-beta.3 → 1.1.4-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +20 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +20 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +20 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/objectsRelated.d.ts +11 -0
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -5694,7 +5694,11 @@ async function getObjectCRUD(objectSchema, fields, options){
|
|
|
5694
5694
|
options.queryCount = true; // 禁止翻页的时候, 需要查找总数
|
|
5695
5695
|
}else if(top){
|
|
5696
5696
|
bodyProps.footerToolbar = [];
|
|
5697
|
-
options.
|
|
5697
|
+
if(options.isRelated){
|
|
5698
|
+
options.queryCount = true;
|
|
5699
|
+
}else {
|
|
5700
|
+
options.queryCount = false;
|
|
5701
|
+
}
|
|
5698
5702
|
}
|
|
5699
5703
|
|
|
5700
5704
|
bodyProps.headerToolbar = getObjectHeaderToolbar(objectSchema, options.formFactor, {showDisplayAs, hiddenCount: options.queryCount === false});
|
|
@@ -6731,6 +6735,11 @@ async function getCalendarApi(mainObject, fields, options) {
|
|
|
6731
6735
|
}else{
|
|
6732
6736
|
filters = [filters, 'and', eventDurationFilters]
|
|
6733
6737
|
}
|
|
6738
|
+
|
|
6739
|
+
if(api.data.$self.additionalFilters){
|
|
6740
|
+
filters.push(api.data.$self.additionalFilters)
|
|
6741
|
+
}
|
|
6742
|
+
|
|
6734
6743
|
var pageSize = api.data.pageSize || 10;
|
|
6735
6744
|
var pageNo = api.data.pageNo || 1;
|
|
6736
6745
|
var skip = (pageNo - 1) * pageSize;
|
|
@@ -7194,6 +7203,7 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
|
|
|
7194
7203
|
"type": "steedos-fullcalendar",
|
|
7195
7204
|
"label": "",
|
|
7196
7205
|
"name": "fullcalendar",
|
|
7206
|
+
"placeholder":"${additionalFilters}",//用于触发reload
|
|
7197
7207
|
"editable": permissions.allowEdit,
|
|
7198
7208
|
"selectable": permissions.allowCreate,
|
|
7199
7209
|
"selectMirror": permissions.allowCreate,
|
|
@@ -7281,8 +7291,8 @@ const getRecordPermissions = async (objectName, recordId)=>{
|
|
|
7281
7291
|
/*
|
|
7282
7292
|
* @Author: baozhoutao@steedos.com
|
|
7283
7293
|
* @Date: 2022-07-05 15:55:39
|
|
7284
|
-
* @LastEditors:
|
|
7285
|
-
* @LastEditTime: 2023-03-
|
|
7294
|
+
* @LastEditors: Please set LastEditors
|
|
7295
|
+
* @LastEditTime: 2023-03-30 17:44:53
|
|
7286
7296
|
* @Description:
|
|
7287
7297
|
*/
|
|
7288
7298
|
|
|
@@ -7357,6 +7367,13 @@ async function getRecordDetailRelatedListSchema(objectName, recordId, relatedObj
|
|
|
7357
7367
|
let { top, perPage, hiddenEmptyTable, appId, relatedLabel, className, columns, sort, filters, visible_on } = ctx;
|
|
7358
7368
|
// console.log('getRecordDetailRelatedListSchema==>',objectName,recordId,relatedObjectName)
|
|
7359
7369
|
const relatedObjectUiSchema = await getUISchema(relatedObjectName);
|
|
7370
|
+
if(!relatedObjectUiSchema){
|
|
7371
|
+
// 子表对象不存在时直接返回空值.
|
|
7372
|
+
return {
|
|
7373
|
+
uiSchema: {},
|
|
7374
|
+
amisSchema: {}
|
|
7375
|
+
}
|
|
7376
|
+
}
|
|
7360
7377
|
const { label , fields } = relatedObjectUiSchema;
|
|
7361
7378
|
if(!relatedLabel){
|
|
7362
7379
|
relatedLabel = label;
|