mooho-base-admin-plus 2.4.41 → 2.4.42

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/history.md CHANGED
@@ -73,3 +73,4 @@ mooho-base-admin-plus@2.4.38 - 修复上一版本bug
73
73
  mooho-base-admin-plus@2.4.39 - 修复菜单管理界面无法用关键词查询的bug
74
74
  mooho-base-admin-plus@2.4.40 - 表格序号列表头增加序号显示
75
75
  mooho-base-admin-plus@2.4.41 - 修复页面权限判断的bug
76
+ mooho-base-admin-plus@2.4.42 - 修复可筛选下拉框的bug,修复页面出滚动条的问题
@@ -23152,7 +23152,6 @@ var mixinPage = {
23152
23152
  return data2;
23153
23153
  },
23154
23154
  setArrayData(model2, expression2, value) {
23155
- console.log("setArrayData", expression2, value);
23156
23155
  let data2 = "";
23157
23156
  if (value != null) {
23158
23157
  data2 = JSON.stringify(value);
@@ -36456,9 +36455,7 @@ const _sfc_main$1b = {
36456
36455
  if (this.isJSON(value)) {
36457
36456
  data2 = JSON.parse(value);
36458
36457
  }
36459
- setTimeout(() => {
36460
- this.loadComboDataLabel(model2, column, data2);
36461
- });
36458
+ this.loadComboDataLabel(model2, column, data2);
36462
36459
  return data2;
36463
36460
  },
36464
36461
  async loadComboDataLabel(model2, column, data2) {
@@ -36488,27 +36485,34 @@ const _sfc_main$1b = {
36488
36485
  pendings.push(newValue);
36489
36486
  }
36490
36487
  }
36491
- if (pendings.length > 0) {
36492
- let param = this.getParam(model2, column);
36493
- param[column.sourceDataCode] = pendings.map((item) => item.value).join(",");
36494
- let res2;
36495
- if (column.isSourceCustom) {
36496
- res2 = await customModelApi.query(column.source, param);
36497
- } else {
36498
- res2 = await modelApi.query(column.source, param);
36499
- }
36500
- res2.data.forEach((item) => {
36501
- let v = this.parseData(item, column.sourceDataCode);
36502
- let label = this.parseData(item, column.sourceDisplayCode);
36503
- if (column.controlType == "ComboSelect")
36504
- ;
36505
- let newValue = pendings.find((i3) => i3.value == v);
36506
- if (newValue) {
36507
- newValue.label = label;
36488
+ setTimeout(async () => {
36489
+ if (pendings.length > 0) {
36490
+ let param = this.getParam(model2, column);
36491
+ param[column.sourceDataCode] = pendings.map((item) => item.value).join(",");
36492
+ let res2;
36493
+ if (column.isSourceCustom) {
36494
+ res2 = await customModelApi.query(column.source, param);
36495
+ } else {
36496
+ res2 = await modelApi.query(column.source, param);
36508
36497
  }
36509
- });
36510
- this.$forceUpdate();
36511
- }
36498
+ res2.data.forEach((item) => {
36499
+ let v = this.parseData(item, column.sourceDataCode);
36500
+ let label = this.parseData(item, column.sourceDisplayCode);
36501
+ if (column.controlType == "ComboSelect")
36502
+ ;
36503
+ let newValue = pendings.find((i3) => i3.value == v);
36504
+ if (newValue) {
36505
+ newValue.label = label;
36506
+ }
36507
+ });
36508
+ this.$forceUpdate();
36509
+ }
36510
+ });
36511
+ }
36512
+ },
36513
+ onComboQueryChange(column, query) {
36514
+ if (!(query || "").trim()) {
36515
+ this.loadOption(this.data, column, null);
36512
36516
  }
36513
36517
  }
36514
36518
  }
@@ -36840,7 +36844,9 @@ function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
36840
36844
  style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
36841
36845
  placeholder: column.description,
36842
36846
  transfer: true,
36843
- onOnChange: (selected) => _ctx.onSelectDataChange(column, selected)
36847
+ onOnChange: (selected) => _ctx.onSelectDataChange(column, selected),
36848
+ onOnQueryChange: (query) => $options.onComboQueryChange(column, query),
36849
+ onOnClear: ($event) => $options.loadOption($data.data, column, null)
36844
36850
  }, {
36845
36851
  default: withCtx(() => [
36846
36852
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
@@ -36856,7 +36862,7 @@ function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
36856
36862
  }), 128))
36857
36863
  ]),
36858
36864
  _: 2
36859
- }, 1032, ["model-value", "onUpdate:modelValue", "disabled", "remote-method", "style", "placeholder", "onOnChange"])
36865
+ }, 1032, ["model-value", "onUpdate:modelValue", "disabled", "remote-method", "style", "placeholder", "onOnChange", "onOnQueryChange", "onOnClear"])
36860
36866
  ], 64)) : column.controlType === "MultiComboSelect" ? (openBlock(), createBlock(_component_Select, {
36861
36867
  key: 11,
36862
36868
  ref: "control_" + column.code,
@@ -36870,7 +36876,8 @@ function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
36870
36876
  style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
36871
36877
  placeholder: column.description,
36872
36878
  transfer: true,
36873
- onOnChange: (selected) => _ctx.onSelectDataChange(column, selected)
36879
+ onOnChange: (selected) => _ctx.onSelectDataChange(column, selected),
36880
+ onOnQueryChange: (query) => $options.onComboQueryChange(column, query)
36874
36881
  }, {
36875
36882
  default: withCtx(() => [
36876
36883
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
@@ -36886,7 +36893,7 @@ function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
36886
36893
  }), 128))
36887
36894
  ]),
36888
36895
  _: 2
36889
- }, 1032, ["model-value", "onUpdate:modelValue", "remote-method", "style", "placeholder", "onOnChange"])) : column.controlType === "DialogSelect" ? (openBlock(), createBlock(_component_dialog_select, {
36896
+ }, 1032, ["model-value", "onUpdate:modelValue", "remote-method", "style", "placeholder", "onOnChange", "onOnQueryChange"])) : column.controlType === "DialogSelect" ? (openBlock(), createBlock(_component_dialog_select, {
36890
36897
  key: 12,
36891
36898
  "model-value": _ctx.parseData($data.data, column.code),
36892
36899
  "onUpdate:modelValue": ($event) => _ctx.setData($data.data, column.code, $event),
@@ -40260,9 +40267,7 @@ const _sfc_main$12 = {
40260
40267
  if (this.isJSON(value)) {
40261
40268
  data2 = JSON.parse(value);
40262
40269
  }
40263
- setTimeout(() => {
40264
- this.loadComboDataLabel(model2, column, data2);
40265
- });
40270
+ this.loadComboDataLabel(model2, column, data2);
40266
40271
  return data2;
40267
40272
  },
40268
40273
  async loadComboDataLabel(model2, column, data2) {
@@ -40287,27 +40292,34 @@ const _sfc_main$12 = {
40287
40292
  pendings.push(newValue);
40288
40293
  }
40289
40294
  }
40290
- if (pendings.length > 0) {
40291
- let param = this.getParam(model2, column);
40292
- param[column.sourceDataCode] = pendings.map((item) => item.value).join(",");
40293
- let res2;
40294
- if (column.isSourceCustom) {
40295
- res2 = await customModelApi.query(column.source, param);
40296
- } else {
40297
- res2 = await modelApi.query(column.source, param);
40298
- }
40299
- res2.data.forEach((item) => {
40300
- let v = this.parseData(item, column.sourceDataCode);
40301
- let label = this.parseData(item, column.sourceDisplayCode);
40302
- if (column.controlType == "ComboSelect")
40303
- ;
40304
- let newValue = pendings.find((i3) => i3.value == v);
40305
- if (newValue) {
40306
- newValue.label = label;
40295
+ setTimeout(async () => {
40296
+ if (pendings.length > 0) {
40297
+ let param = this.getParam(model2, column);
40298
+ param[column.sourceDataCode] = pendings.map((item) => item.value).join(",");
40299
+ let res2;
40300
+ if (column.isSourceCustom) {
40301
+ res2 = await customModelApi.query(column.source, param);
40302
+ } else {
40303
+ res2 = await modelApi.query(column.source, param);
40307
40304
  }
40308
- });
40309
- this.$forceUpdate();
40310
- }
40305
+ res2.data.forEach((item) => {
40306
+ let v = this.parseData(item, column.sourceDataCode);
40307
+ let label = this.parseData(item, column.sourceDisplayCode);
40308
+ if (column.controlType == "ComboSelect")
40309
+ ;
40310
+ let newValue = pendings.find((i3) => i3.value == v);
40311
+ if (newValue) {
40312
+ newValue.label = label;
40313
+ }
40314
+ });
40315
+ this.$forceUpdate();
40316
+ }
40317
+ });
40318
+ }
40319
+ },
40320
+ onComboQueryChange(column, query) {
40321
+ if (!(query || "").trim()) {
40322
+ this.loadOption(this.data, column, null);
40311
40323
  }
40312
40324
  }
40313
40325
  }
@@ -40542,7 +40554,9 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
40542
40554
  style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
40543
40555
  placeholder: column.description,
40544
40556
  transfer: true,
40545
- onOnChange: (selected) => $options.onSelectDataChange(column, selected)
40557
+ onOnChange: (selected) => $options.onSelectDataChange(column, selected),
40558
+ onOnQueryChange: (query) => $options.onComboQueryChange(column, query),
40559
+ onOnClear: ($event) => $options.loadOption($data.data, column, null)
40546
40560
  }, {
40547
40561
  default: withCtx(() => [
40548
40562
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
@@ -40558,7 +40572,7 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
40558
40572
  }), 128))
40559
40573
  ]),
40560
40574
  _: 2
40561
- }, 1032, ["model-value", "onUpdate:modelValue", "disabled", "remote-method", "style", "placeholder", "onOnChange"])) : column.controlType === "MultiComboSelect" ? (openBlock(), createBlock(_component_Select, {
40575
+ }, 1032, ["model-value", "onUpdate:modelValue", "disabled", "remote-method", "style", "placeholder", "onOnChange", "onOnQueryChange", "onOnClear"])) : column.controlType === "MultiComboSelect" ? (openBlock(), createBlock(_component_Select, {
40562
40576
  key: 11,
40563
40577
  ref_for: true,
40564
40578
  ref: "control_" + column.code,
@@ -40573,7 +40587,8 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
40573
40587
  style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
40574
40588
  placeholder: column.description,
40575
40589
  transfer: true,
40576
- onOnChange: (selected) => $options.onSelectDataChange(column, selected)
40590
+ onOnChange: (selected) => $options.onSelectDataChange(column, selected),
40591
+ onOnQueryChange: (query) => $options.onComboQueryChange(column, query)
40577
40592
  }, {
40578
40593
  default: withCtx(() => [
40579
40594
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
@@ -40589,7 +40604,7 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
40589
40604
  }), 128))
40590
40605
  ]),
40591
40606
  _: 2
40592
- }, 1032, ["model-value", "onUpdate:modelValue", "remote-method", "style", "placeholder", "onOnChange"])) : column.controlType === "DialogSelect" ? (openBlock(), createBlock(_component_dialog_select, {
40607
+ }, 1032, ["model-value", "onUpdate:modelValue", "remote-method", "style", "placeholder", "onOnChange", "onOnQueryChange"])) : column.controlType === "DialogSelect" ? (openBlock(), createBlock(_component_dialog_select, {
40593
40608
  key: 12,
40594
40609
  size: "small",
40595
40610
  "model-value": $options.parseFilterData($data.data, column),
@@ -42623,9 +42638,7 @@ const _sfc_main$$ = {
42623
42638
  if (this.isJSON(value)) {
42624
42639
  data2 = JSON.parse(value);
42625
42640
  }
42626
- setTimeout(() => {
42627
- this.loadComboDataLabel(model2, column, data2);
42628
- });
42641
+ this.loadComboDataLabel(model2, column, data2);
42629
42642
  return data2;
42630
42643
  },
42631
42644
  async loadComboDataLabel(model2, column, data2) {
@@ -42633,13 +42646,13 @@ const _sfc_main$$ = {
42633
42646
  return;
42634
42647
  }
42635
42648
  if (this.$refs["control_" + column.code] && data2) {
42636
- let values = this.$refs["control_" + column.code][0].$data.values;
42649
+ let values = this.$refs["control_" + column.code][0].values;
42637
42650
  let pendings = [];
42638
42651
  if (column.controlType == "MultiComboSelect") {
42639
42652
  data2.forEach((value) => {
42640
42653
  if (!values.some((v) => v.value == value)) {
42641
42654
  let newValue = { value, label: null, disabled: false };
42642
- values.push(newValue);
42655
+ this.$refs["control_" + column.code][0].values.push(newValue);
42643
42656
  pendings.push(newValue);
42644
42657
  }
42645
42658
  });
@@ -42650,27 +42663,34 @@ const _sfc_main$$ = {
42650
42663
  pendings.push(newValue);
42651
42664
  }
42652
42665
  }
42653
- if (pendings.length > 0) {
42654
- let param = this.getParam(model2, column);
42655
- param[column.sourceDataCode] = pendings.map((item) => item.value).join(",");
42656
- let res2;
42657
- if (column.isSourceCustom) {
42658
- res2 = await customModelApi.query(column.source, param);
42659
- } else {
42660
- res2 = await modelApi.query(column.source, param);
42661
- }
42662
- res2.data.forEach((item) => {
42663
- let v = this.parseData(item, column.sourceDataCode);
42664
- let label = this.parseData(item, column.sourceDisplayCode);
42665
- if (column.controlType == "ComboSelect")
42666
- ;
42667
- let newValue = pendings.find((i3) => i3.value == v);
42668
- if (newValue) {
42669
- newValue.label = label;
42666
+ setTimeout(async () => {
42667
+ if (pendings.length > 0) {
42668
+ let param = this.getParam(model2, column);
42669
+ param[column.sourceDataCode] = pendings.map((item) => item.value).join(",");
42670
+ let res2;
42671
+ if (column.isSourceCustom) {
42672
+ res2 = await customModelApi.query(column.source, param);
42673
+ } else {
42674
+ res2 = await modelApi.query(column.source, param);
42670
42675
  }
42671
- });
42672
- this.$forceUpdate();
42673
- }
42676
+ res2.data.forEach((item) => {
42677
+ let v = this.parseData(item, column.sourceDataCode);
42678
+ let label = this.parseData(item, column.sourceDisplayCode);
42679
+ if (column.controlType == "ComboSelect")
42680
+ ;
42681
+ let newValue = pendings.find((i3) => i3.value == v);
42682
+ if (newValue) {
42683
+ newValue.label = label;
42684
+ }
42685
+ });
42686
+ this.$forceUpdate();
42687
+ }
42688
+ });
42689
+ }
42690
+ },
42691
+ onComboQueryChange(column, query) {
42692
+ if (!(query || "").trim()) {
42693
+ this.loadOption(this.data, column, null);
42674
42694
  }
42675
42695
  }
42676
42696
  }
@@ -42986,7 +43006,9 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
42986
43006
  style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
42987
43007
  placeholder: column.description,
42988
43008
  transfer: true,
42989
- onOnChange: (selected) => $options.onSelectDataChange(column, selected)
43009
+ onOnChange: (selected) => $options.onSelectDataChange(column, selected),
43010
+ onOnQueryChange: (query) => $options.onComboQueryChange(column, query),
43011
+ onOnClear: ($event) => $options.loadOption($data.data, column, null)
42990
43012
  }, {
42991
43013
  default: withCtx(() => [
42992
43014
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
@@ -43002,7 +43024,7 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
43002
43024
  }), 128))
43003
43025
  ]),
43004
43026
  _: 2
43005
- }, 1032, ["model-value", "onUpdate:modelValue", "disabled", "remote-method", "style", "placeholder", "onOnChange"])
43027
+ }, 1032, ["model-value", "onUpdate:modelValue", "disabled", "remote-method", "style", "placeholder", "onOnChange", "onOnQueryChange", "onOnClear"])
43006
43028
  ], 64)) : column.controlType === "MultiComboSelect" ? (openBlock(), createBlock(_component_Select, {
43007
43029
  key: 11,
43008
43030
  ref_for: true,