@steedos-widgets/amis-object 3.6.2-beta.17 → 3.6.2-beta.18

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.
@@ -11524,7 +11524,6 @@ async function getObjectFilter(objectSchema, fields, options) {
11524
11524
  "timeOut": 1000
11525
11525
  }
11526
11526
  });
11527
- resizeWindow();
11528
11527
  const scope = event.context.scoped;
11529
11528
  // let filterFormValues = event.data;
11530
11529
  let filterForm = SteedosUI.getClosestAmisComponentByType(scope, "form");
@@ -15387,13 +15386,31 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
15387
15386
  };
15388
15387
  break;
15389
15388
  case 'input-datetime-range':
15389
+ // convertData = {
15390
+ // type: "input-datetime-range",
15391
+ // inputFormat: 'YYYY-MM-DD HH:mm',
15392
+ // format:'YYYY-MM-DDTHH:mm:ss.SSSZ',
15393
+ // tpl: readonly ? Tpl.getDateTimeTpl(field) : null,
15394
+ // utc: true,
15395
+ // joinValues: false
15396
+ // }
15397
+ // 日期时间字段,按日期方式展现显示控件,用户不用关心小时分钟
15390
15398
  convertData = {
15391
- type: "input-datetime-range",
15392
- inputFormat: 'YYYY-MM-DD HH:mm',
15399
+ type: "input-date-range",
15400
+ inputFormat: "YYYY-MM-DD HH:mm",
15393
15401
  format:'YYYY-MM-DDTHH:mm:ss.SSSZ',
15394
15402
  tpl: readonly ? getDateTimeTpl(field) : null,
15395
15403
  utc: true,
15396
- joinValues: false
15404
+ joinValues: false,
15405
+ "shortcuts": [
15406
+ "thismonth",
15407
+ "2monthsago",
15408
+ "3monthslater",
15409
+ "prevquarter",
15410
+ "thisquarter",
15411
+ "thisyear",
15412
+ "lastYear"
15413
+ ]
15397
15414
  };
15398
15415
  break;
15399
15416
  case 'datetime':
@@ -15910,8 +15927,9 @@ async function getFieldSearchable(perField, permissionFields, ctx){
15910
15927
  fieldNamePrefix = `${fieldNamePrefix}between__`;
15911
15928
  }
15912
15929
  if(_field.type === 'datetime'){
15913
- // 特意改为日期范围而不是日期时间范围,因为搜索时一般精确到日期就足够了,需要精确到日期时间范围需要在字段上配置amis属性来实现
15914
- _field.type = 'input-date-range';
15930
+ // 这里如果想把搜索范围展示效果改为日期范围,不可以直接改为input-date-range,因为它们规则不一样,包括时区规则和小时分秒的存值规则都不一样
15931
+ // 所以想改为展示日期范围效果,只能改input-datetime-range类型本身的属性来实现
15932
+ _field.type = 'input-datetime-range';
15915
15933
  _field.is_wide = true;
15916
15934
  fieldNamePrefix = `${fieldNamePrefix}between__`;
15917
15935
  }