@newview/ui 1.2.2 → 1.2.3

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/README.md CHANGED
@@ -1,10 +1,5 @@
1
- ### 1.2.2
2
- 1、form表单构建选择组件添加单位工程
3
-
4
-
5
- ### 1.2.1
6
- 1、表格组件工具栏、工具栏组件增加按钮权限控制
7
-
1
+ ### 1.2.3
2
+ 1、表格筛选条件刷新优化
8
3
 
9
4
  ### 1.2.0
10
5
  1、表格组件工具栏、工具栏组件增加按钮权限控制
@@ -32679,7 +32679,7 @@ const GridCellContent$1 = defineComponent({
32679
32679
  render() {
32680
32680
  var _a;
32681
32681
  if (utilities.isNull(this.$props.column.format)) {
32682
- if (this.$props.column.colType === "date") {
32682
+ if (this.$props.column.colType === "date" && this.$props.row[this.$props.column.field]) {
32683
32683
  if ((_a = this.$props.column.datePicker) == null ? void 0 : _a.format) {
32684
32684
  return utilities.format(new Date(this.$props.row[this.$props.column.field]), this.$props.column.datePicker.format);
32685
32685
  }
@@ -58657,12 +58657,13 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
58657
58657
  this.queryWrapper.value = _queryWrapper;
58658
58658
  this.defaultqueryWrapper = this.utilities.deepCopy(_queryWrapper.getQuerys());
58659
58659
  this.loadData(async (options2) => {
58660
- const apiResult = options2.isPagination ? await this.props.option.api.getEntitiesPageDynamic(options2.page, options2.pageSize, _queryWrapper) : await this.props.option.api.getEntitiesDynamic(_queryWrapper);
58660
+ const apiResult = options2.isPagination ? await this.props.option.api.getEntitiesPageDynamic(options2.page, options2.pageSize, this.queryWrapper.value) : await this.props.option.api.getEntitiesDynamic(this.queryWrapper.value);
58661
58661
  const result = this.utilities.parseApiResult(apiResult);
58662
58662
  options2.success(result);
58663
58663
  });
58664
58664
  }
58665
58665
  });
58666
+ __publicField2(this, "headerFilterParam", {});
58666
58667
  /**
58667
58668
  * 加载表头筛选数据--组件自带默认方法
58668
58669
  * @param _queryWrapper
@@ -58671,6 +58672,7 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
58671
58672
  if (this.utilities.isNull(this.props.option.api)) {
58672
58673
  this.message.error("未绑定Api");
58673
58674
  } else {
58675
+ this.headerFilterParam = filterParam;
58674
58676
  let _queryWrapper = this.loadHeaderFilter(filterParam);
58675
58677
  this.loadDataByHeaderFilter(_queryWrapper);
58676
58678
  }
@@ -58731,6 +58733,7 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
58731
58733
  * @param _queryWrapper
58732
58734
  */
58733
58735
  __publicField2(this, "loadDataByHeaderFilter", async (_queryWrapper) => {
58736
+ this.queryWrapper.value = _queryWrapper;
58734
58737
  let options2 = this.getLoadDataOptions();
58735
58738
  this.loadDataing.value = true;
58736
58739
  const apiResult = options2.isPagination ? await this.props.option.api.getEntitiesPageDynamic(options2.page, options2.pageSize, _queryWrapper) : await this.props.option.api.getEntitiesDynamic(_queryWrapper);
@@ -58743,7 +58746,13 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
58743
58746
  */
58744
58747
  __publicField2(this, "refreshData", async () => {
58745
58748
  const $table = this.xTable.value;
58749
+ $table.clearFilter();
58746
58750
  if (!this.utilities.isNull(this.readFunction)) {
58751
+ let _queryWrapper = QueryWrapper.create();
58752
+ if (this.defaultqueryWrapper) {
58753
+ _queryWrapper.querys = this.utilities.deepCopy(this.defaultqueryWrapper);
58754
+ }
58755
+ this.queryWrapper.value = _queryWrapper;
58747
58756
  this.loadDataing.value = true;
58748
58757
  await this.readFunction(this.getLoadDataOptions());
58749
58758
  this.loadDataing.value = false;
@@ -58753,7 +58762,6 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
58753
58762
  }
58754
58763
  $table.reloadData(this.datas.value);
58755
58764
  }
58756
- $table.clearFilter();
58757
58765
  });
58758
58766
  /**
58759
58767
  * 页码改变
@@ -241254,12 +241262,13 @@ class GridInstance extends BaseInstance {
241254
241262
  this.queryWrapper.value = _queryWrapper;
241255
241263
  this.defaultqueryWrapper = this.utilities.deepCopy(_queryWrapper.getQuerys());
241256
241264
  this.loadData(async (options2) => {
241257
- const apiResult = options2.isPagination ? await this.props.option.api.getEntitiesPageDynamic(options2.page, options2.pageSize, _queryWrapper) : await this.props.option.api.getEntitiesDynamic(_queryWrapper);
241265
+ const apiResult = options2.isPagination ? await this.props.option.api.getEntitiesPageDynamic(options2.page, options2.pageSize, this.queryWrapper.value) : await this.props.option.api.getEntitiesDynamic(this.queryWrapper.value);
241258
241266
  const result = this.utilities.parseApiResult(apiResult);
241259
241267
  options2.success(result);
241260
241268
  });
241261
241269
  }
241262
241270
  });
241271
+ __publicField2(this, "headerFilterParam", {});
241263
241272
  /**
241264
241273
  * 加载表头筛选数据--组件自带默认方法
241265
241274
  * @param _queryWrapper
@@ -241268,6 +241277,7 @@ class GridInstance extends BaseInstance {
241268
241277
  if (this.utilities.isNull(this.props.option.api)) {
241269
241278
  this.message.error("未绑定Api");
241270
241279
  } else {
241280
+ this.headerFilterParam = filterParam;
241271
241281
  let _queryWrapper = this.loadHeaderFilter(filterParam);
241272
241282
  this.loadDataByHeaderFilter(_queryWrapper);
241273
241283
  }
@@ -241328,6 +241338,7 @@ class GridInstance extends BaseInstance {
241328
241338
  * @param _queryWrapper
241329
241339
  */
241330
241340
  __publicField2(this, "loadDataByHeaderFilter", async (_queryWrapper) => {
241341
+ this.queryWrapper.value = _queryWrapper;
241331
241342
  let options2 = this.getLoadDataOptions();
241332
241343
  this.loadDataing.value = true;
241333
241344
  const apiResult = options2.isPagination ? await this.props.option.api.getEntitiesPageDynamic(options2.page, options2.pageSize, _queryWrapper) : await this.props.option.api.getEntitiesDynamic(_queryWrapper);
@@ -241340,7 +241351,13 @@ class GridInstance extends BaseInstance {
241340
241351
  */
241341
241352
  __publicField2(this, "refreshData", async () => {
241342
241353
  const $table = this.xTable.value;
241354
+ $table.clearFilter();
241343
241355
  if (!this.utilities.isNull(this.readFunction)) {
241356
+ let _queryWrapper = QueryWrapper.create();
241357
+ if (this.defaultqueryWrapper) {
241358
+ _queryWrapper.querys = this.utilities.deepCopy(this.defaultqueryWrapper);
241359
+ }
241360
+ this.queryWrapper.value = _queryWrapper;
241344
241361
  this.loadDataing.value = true;
241345
241362
  await this.readFunction(this.getLoadDataOptions());
241346
241363
  this.loadDataing.value = false;
@@ -241350,7 +241367,6 @@ class GridInstance extends BaseInstance {
241350
241367
  }
241351
241368
  $table.reloadData(this.datas.value);
241352
241369
  }
241353
- $table.clearFilter();
241354
241370
  });
241355
241371
  /**
241356
241372
  * 页码改变