@newview/ui 1.1.97 → 1.1.98

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,5 +1,6 @@
1
- ### 1.1.97
2
- 1、搜索日期时间选择组件赋值修改
1
+ ### 1.1.98
2
+ 1、表头筛选daterange增加默认传值功能
3
+
3
4
 
4
5
  ### 1.1.96
5
6
  1、表单及表格日期时间选择组件赋值修改
@@ -33002,6 +33002,7 @@ let GridColumnInstance$1 = class GridColumnInstance2 extends BaseInstance {
33002
33002
  //#endregion 事件 END
33003
33003
  //#region 表头筛选
33004
33004
  __publicField2(this, "getColumFilters", (filter3) => {
33005
+ debugger;
33005
33006
  if (filter3) {
33006
33007
  if (filter3.type == "select") {
33007
33008
  return filter3.options.map((e) => {
@@ -33009,7 +33010,11 @@ let GridColumnInstance$1 = class GridColumnInstance2 extends BaseInstance {
33009
33010
  return e;
33010
33011
  });
33011
33012
  } else if (filter3.type == "daterange") {
33012
- return [{ data: ["", ""] }];
33013
+ if ((filter3 == null ? void 0 : filter3.data) && (filter3 == null ? void 0 : filter3.data.length) >= 2) {
33014
+ return [{ data: filter3.data }];
33015
+ } else {
33016
+ return [{ data: ["", ""] }];
33017
+ }
33013
33018
  } else if (filter3.type == "numberrange") {
33014
33019
  return [{ data: ["", ""] }];
33015
33020
  } else {
@@ -33626,6 +33631,11 @@ const _sfc_main$l = defineComponent({
33626
33631
  const { column } = params;
33627
33632
  const option = column.filters[0];
33628
33633
  filterDateRangeVal.option = option;
33634
+ if (option.data && option.data.length >= 2) {
33635
+ const { $panel } = params;
33636
+ const checked = option.data[0] && option.data[1];
33637
+ $panel.changeOption(null, checked, toRaw(option));
33638
+ }
33629
33639
  }
33630
33640
  };
33631
33641
  const changeOptionEvent = (datevalue) => {
@@ -33763,7 +33773,9 @@ const CreatGridRenderer$1 = () => {
33763
33773
  },
33764
33774
  // 重置筛选复原方法(当未点击确认时,该选项将被恢复为默认值)
33765
33775
  filterRecoverMethod({ option }) {
33766
- option.data = ["", ""];
33776
+ if (!(option.data && option.data.length >= 2)) {
33777
+ option.data = ["", ""];
33778
+ }
33767
33779
  }
33768
33780
  });
33769
33781
  }
@@ -58682,8 +58694,9 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
58682
58694
  }
58683
58695
  break;
58684
58696
  case "daterange":
58685
- _queryWrapper.ge(key2, value[0]);
58686
- _queryWrapper.le(key2, value[1]);
58697
+ let startDate = this.utilities.format(value[0], "yyyy-MM-DD");
58698
+ let EndDate = this.utilities.format(value[1], "yyyy-MM-DD");
58699
+ _queryWrapper.between(`date_format(${key2},'%Y-%m-%d')`, startDate, EndDate);
58687
58700
  break;
58688
58701
  case "numberrange":
58689
58702
  if (!this.utilities.isNull(value[0])) {
@@ -59442,8 +59455,8 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
59442
59455
  }
59443
59456
  //#endregion 公开方法 END
59444
59457
  };
59445
- const Grid_vue_vue_type_style_index_0_scoped_1b3fc6d2_lang = "";
59446
- const _withScopeId$3 = (n) => (pushScopeId("data-v-1b3fc6d2"), n = n(), popScopeId(), n);
59458
+ const Grid_vue_vue_type_style_index_0_scoped_2a3c4718_lang = "";
59459
+ const _withScopeId$3 = (n) => (pushScopeId("data-v-2a3c4718"), n = n(), popScopeId(), n);
59447
59460
  const _hoisted_1$e = { class: "nv-crud nv-pos-r" };
59448
59461
  const _hoisted_2$b = { class: "grid-msg" };
59449
59462
  const _hoisted_3$9 = { class: "nv-crud-body" };
@@ -59480,6 +59493,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
59480
59493
  const _component_vxe_table = resolveComponent("vxe-table");
59481
59494
  const _component_Page = resolveComponent("Page");
59482
59495
  return openBlock(), createElementBlock("div", _hoisted_1$e, [
59496
+ createTextVNode(" 123 "),
59483
59497
  createVNode(_component_Spin, {
59484
59498
  fix: "",
59485
59499
  show: _ctx.doMethodLoading.show,
@@ -59675,7 +59689,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
59675
59689
  ])) : createCommentVNode("", true)
59676
59690
  ]);
59677
59691
  }
59678
- const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-1b3fc6d2"]]);
59692
+ const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-2a3c4718"]]);
59679
59693
  const GridCellContent = defineComponent({
59680
59694
  name: "GridCellContent",
59681
59695
  props: {
@@ -241265,8 +241279,9 @@ class GridInstance extends BaseInstance {
241265
241279
  }
241266
241280
  break;
241267
241281
  case "daterange":
241268
- _queryWrapper.ge(key2, value[0]);
241269
- _queryWrapper.le(key2, value[1]);
241282
+ let startDate = this.utilities.format(value[0], "yyyy-MM-DD");
241283
+ let EndDate = this.utilities.format(value[1], "yyyy-MM-DD");
241284
+ _queryWrapper.between(`date_format(${key2},'%Y-%m-%d')`, startDate, EndDate);
241270
241285
  break;
241271
241286
  case "numberrange":
241272
241287
  if (!this.utilities.isNull(value[0])) {