@steedos-widgets/sortable 3.6.2-beta.16 → 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.
@@ -55467,7 +55467,7 @@ async function getTableColumns(fields, options){
55467
55467
  var data = event.data;
55468
55468
  var file_name = data.versions ? data.name : "${field.label}";
55469
55469
  var file_id = data._id;
55470
- SteedosUI.previewFile && SteedosUI.previewFile({file_name, file_id});
55470
+ window.previewFile && window.previewFile({file_name, file_id});
55471
55471
  `;
55472
55472
  columnItem = {
55473
55473
  "type": "button",
@@ -55496,7 +55496,7 @@ async function getTableColumns(fields, options){
55496
55496
  "actionType": "custom",
55497
55497
  "script": previewFileScript,
55498
55498
  // "expression": "!!window?.nw?.require" //PC客户端预览附件
55499
- "expression": "!!!(window && window.nw && window.nw.require)"//PC客户端预览附件
55499
+ "expression": "!!(window && window.nw && window.nw.require)"//PC客户端预览附件
55500
55500
  }
55501
55501
  ]
55502
55502
  }
@@ -58415,7 +58415,6 @@ async function getObjectFilter(objectSchema, fields, options) {
58415
58415
  "timeOut": 1000
58416
58416
  }
58417
58417
  });
58418
- resizeWindow();
58419
58418
  const scope = event.context.scoped;
58420
58419
  // let filterFormValues = event.data;
58421
58420
  let filterForm = SteedosUI.getClosestAmisComponentByType(scope, "form");
@@ -60464,13 +60463,31 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
60464
60463
  };
60465
60464
  break;
60466
60465
  case 'input-datetime-range':
60466
+ // convertData = {
60467
+ // type: "input-datetime-range",
60468
+ // inputFormat: 'YYYY-MM-DD HH:mm',
60469
+ // format:'YYYY-MM-DDTHH:mm:ss.SSSZ',
60470
+ // tpl: readonly ? Tpl.getDateTimeTpl(field) : null,
60471
+ // utc: true,
60472
+ // joinValues: false
60473
+ // }
60474
+ // 日期时间字段,按日期方式展现显示控件,用户不用关心小时分钟
60467
60475
  convertData = {
60468
- type: "input-datetime-range",
60469
- inputFormat: 'YYYY-MM-DD HH:mm',
60476
+ type: "input-date-range",
60477
+ inputFormat: "YYYY-MM-DD HH:mm",
60470
60478
  format:'YYYY-MM-DDTHH:mm:ss.SSSZ',
60471
60479
  tpl: readonly ? getDateTimeTpl(field) : null,
60472
60480
  utc: true,
60473
- joinValues: false
60481
+ joinValues: false,
60482
+ "shortcuts": [
60483
+ "thismonth",
60484
+ "2monthsago",
60485
+ "3monthslater",
60486
+ "prevquarter",
60487
+ "thisquarter",
60488
+ "thisyear",
60489
+ "lastYear"
60490
+ ]
60474
60491
  };
60475
60492
  break;
60476
60493
  case 'datetime':
@@ -60652,6 +60669,36 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
60652
60669
  convertData = {
60653
60670
  type: 'static-text'
60654
60671
  };
60672
+ }else if(field.autonumber_enable_modify){
60673
+ convertData = {
60674
+ "type": "input-group",
60675
+ "body": [
60676
+ {
60677
+ "type": "input-text",
60678
+ "name": field.name
60679
+ },
60680
+ {
60681
+ "type": "button",
60682
+ "label": "自动获取",
60683
+ "actionType": "ajax",
60684
+ "api": {
60685
+ "url": `\${context.rootUrl}/api/autonumber/generator/\${objectName}/${field.name}`,
60686
+ "method": "post",
60687
+ "headers": {
60688
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
60689
+ },
60690
+ "adaptor": `
60691
+ payload.data["${field.name}"] = payload.data && payload.data.autonumber;
60692
+ delete payload.data.autonumber;
60693
+ return payload;
60694
+ `
60695
+ },
60696
+ "messages": {
60697
+ "success": "获取成功"
60698
+ }
60699
+ }
60700
+ ]
60701
+ };
60655
60702
  }
60656
60703
  break;
60657
60704
  case 'url':
@@ -60957,8 +61004,9 @@ async function getFieldSearchable(perField, permissionFields, ctx){
60957
61004
  fieldNamePrefix = `${fieldNamePrefix}between__`;
60958
61005
  }
60959
61006
  if(_field.type === 'datetime'){
60960
- // 特意改为日期范围而不是日期时间范围,因为搜索时一般精确到日期就足够了,需要精确到日期时间范围需要在字段上配置amis属性来实现
60961
- _field.type = 'input-date-range';
61007
+ // 这里如果想把搜索范围展示效果改为日期范围,不可以直接改为input-date-range,因为它们规则不一样,包括时区规则和小时分秒的存值规则都不一样
61008
+ // 所以想改为展示日期范围效果,只能改input-datetime-range类型本身的属性来实现
61009
+ _field.type = 'input-datetime-range';
60962
61010
  _field.is_wide = true;
60963
61011
  fieldNamePrefix = `${fieldNamePrefix}between__`;
60964
61012
  }