mooho-base-admin-plus 2.4.40 → 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
@@ -72,3 +72,5 @@ mooho-base-admin-plus@2.4.37 - 增加component导出
72
72
  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
+ mooho-base-admin-plus@2.4.41 - 修复页面权限判断的bug
76
+ mooho-base-admin-plus@2.4.42 - 修复可筛选下拉框的bug,修复页面出滚动条的问题
@@ -22204,11 +22204,7 @@ var menu = {
22204
22204
  }
22205
22205
  let permissions = {};
22206
22206
  res2.permissions.forEach((key) => {
22207
- let permissionKey = key.split("?")[0];
22208
- if (key.split("$").length > 1) {
22209
- permissionKey = permissionKey + "$" + key.split("$")[1];
22210
- }
22211
- permissions[permissionKey] = true;
22207
+ permissions[key.split("?")[0]] = true;
22212
22208
  });
22213
22209
  state.userPermissions = permissions;
22214
22210
  setNativePermission(permissions);
@@ -22935,7 +22931,7 @@ var mixinPage = {
22935
22931
  if (key.startsWith("permission/")) {
22936
22932
  return this.userPermissions[key];
22937
22933
  } else {
22938
- let url = router$1.currentRoute.value.fullPath.substr(1);
22934
+ let url = router$1.currentRoute.value.fullPath.substr(1).split("?")[0];
22939
22935
  if (this.userPermissions[url + "$" + key] == true) {
22940
22936
  return true;
22941
22937
  }
@@ -23156,7 +23152,6 @@ var mixinPage = {
23156
23152
  return data2;
23157
23153
  },
23158
23154
  setArrayData(model2, expression2, value) {
23159
- console.log("setArrayData", expression2, value);
23160
23155
  let data2 = "";
23161
23156
  if (value != null) {
23162
23157
  data2 = JSON.stringify(value);
@@ -36460,9 +36455,7 @@ const _sfc_main$1b = {
36460
36455
  if (this.isJSON(value)) {
36461
36456
  data2 = JSON.parse(value);
36462
36457
  }
36463
- setTimeout(() => {
36464
- this.loadComboDataLabel(model2, column, data2);
36465
- });
36458
+ this.loadComboDataLabel(model2, column, data2);
36466
36459
  return data2;
36467
36460
  },
36468
36461
  async loadComboDataLabel(model2, column, data2) {
@@ -36492,27 +36485,34 @@ const _sfc_main$1b = {
36492
36485
  pendings.push(newValue);
36493
36486
  }
36494
36487
  }
36495
- if (pendings.length > 0) {
36496
- let param = this.getParam(model2, column);
36497
- param[column.sourceDataCode] = pendings.map((item) => item.value).join(",");
36498
- let res2;
36499
- if (column.isSourceCustom) {
36500
- res2 = await customModelApi.query(column.source, param);
36501
- } else {
36502
- res2 = await modelApi.query(column.source, param);
36503
- }
36504
- res2.data.forEach((item) => {
36505
- let v = this.parseData(item, column.sourceDataCode);
36506
- let label = this.parseData(item, column.sourceDisplayCode);
36507
- if (column.controlType == "ComboSelect")
36508
- ;
36509
- let newValue = pendings.find((i3) => i3.value == v);
36510
- if (newValue) {
36511
- 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);
36512
36497
  }
36513
- });
36514
- this.$forceUpdate();
36515
- }
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);
36516
36516
  }
36517
36517
  }
36518
36518
  }
@@ -36844,7 +36844,9 @@ function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
36844
36844
  style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
36845
36845
  placeholder: column.description,
36846
36846
  transfer: true,
36847
- 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)
36848
36850
  }, {
36849
36851
  default: withCtx(() => [
36850
36852
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
@@ -36860,7 +36862,7 @@ function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
36860
36862
  }), 128))
36861
36863
  ]),
36862
36864
  _: 2
36863
- }, 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"])
36864
36866
  ], 64)) : column.controlType === "MultiComboSelect" ? (openBlock(), createBlock(_component_Select, {
36865
36867
  key: 11,
36866
36868
  ref: "control_" + column.code,
@@ -36874,7 +36876,8 @@ function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
36874
36876
  style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
36875
36877
  placeholder: column.description,
36876
36878
  transfer: true,
36877
- onOnChange: (selected) => _ctx.onSelectDataChange(column, selected)
36879
+ onOnChange: (selected) => _ctx.onSelectDataChange(column, selected),
36880
+ onOnQueryChange: (query) => $options.onComboQueryChange(column, query)
36878
36881
  }, {
36879
36882
  default: withCtx(() => [
36880
36883
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
@@ -36890,7 +36893,7 @@ function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
36890
36893
  }), 128))
36891
36894
  ]),
36892
36895
  _: 2
36893
- }, 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, {
36894
36897
  key: 12,
36895
36898
  "model-value": _ctx.parseData($data.data, column.code),
36896
36899
  "onUpdate:modelValue": ($event) => _ctx.setData($data.data, column.code, $event),
@@ -40264,9 +40267,7 @@ const _sfc_main$12 = {
40264
40267
  if (this.isJSON(value)) {
40265
40268
  data2 = JSON.parse(value);
40266
40269
  }
40267
- setTimeout(() => {
40268
- this.loadComboDataLabel(model2, column, data2);
40269
- });
40270
+ this.loadComboDataLabel(model2, column, data2);
40270
40271
  return data2;
40271
40272
  },
40272
40273
  async loadComboDataLabel(model2, column, data2) {
@@ -40291,27 +40292,34 @@ const _sfc_main$12 = {
40291
40292
  pendings.push(newValue);
40292
40293
  }
40293
40294
  }
40294
- if (pendings.length > 0) {
40295
- let param = this.getParam(model2, column);
40296
- param[column.sourceDataCode] = pendings.map((item) => item.value).join(",");
40297
- let res2;
40298
- if (column.isSourceCustom) {
40299
- res2 = await customModelApi.query(column.source, param);
40300
- } else {
40301
- res2 = await modelApi.query(column.source, param);
40302
- }
40303
- res2.data.forEach((item) => {
40304
- let v = this.parseData(item, column.sourceDataCode);
40305
- let label = this.parseData(item, column.sourceDisplayCode);
40306
- if (column.controlType == "ComboSelect")
40307
- ;
40308
- let newValue = pendings.find((i3) => i3.value == v);
40309
- if (newValue) {
40310
- 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);
40311
40304
  }
40312
- });
40313
- this.$forceUpdate();
40314
- }
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);
40315
40323
  }
40316
40324
  }
40317
40325
  }
@@ -40546,7 +40554,9 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
40546
40554
  style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
40547
40555
  placeholder: column.description,
40548
40556
  transfer: true,
40549
- 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)
40550
40560
  }, {
40551
40561
  default: withCtx(() => [
40552
40562
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
@@ -40562,7 +40572,7 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
40562
40572
  }), 128))
40563
40573
  ]),
40564
40574
  _: 2
40565
- }, 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, {
40566
40576
  key: 11,
40567
40577
  ref_for: true,
40568
40578
  ref: "control_" + column.code,
@@ -40577,7 +40587,8 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
40577
40587
  style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
40578
40588
  placeholder: column.description,
40579
40589
  transfer: true,
40580
- onOnChange: (selected) => $options.onSelectDataChange(column, selected)
40590
+ onOnChange: (selected) => $options.onSelectDataChange(column, selected),
40591
+ onOnQueryChange: (query) => $options.onComboQueryChange(column, query)
40581
40592
  }, {
40582
40593
  default: withCtx(() => [
40583
40594
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
@@ -40593,7 +40604,7 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
40593
40604
  }), 128))
40594
40605
  ]),
40595
40606
  _: 2
40596
- }, 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, {
40597
40608
  key: 12,
40598
40609
  size: "small",
40599
40610
  "model-value": $options.parseFilterData($data.data, column),
@@ -42627,9 +42638,7 @@ const _sfc_main$$ = {
42627
42638
  if (this.isJSON(value)) {
42628
42639
  data2 = JSON.parse(value);
42629
42640
  }
42630
- setTimeout(() => {
42631
- this.loadComboDataLabel(model2, column, data2);
42632
- });
42641
+ this.loadComboDataLabel(model2, column, data2);
42633
42642
  return data2;
42634
42643
  },
42635
42644
  async loadComboDataLabel(model2, column, data2) {
@@ -42637,13 +42646,13 @@ const _sfc_main$$ = {
42637
42646
  return;
42638
42647
  }
42639
42648
  if (this.$refs["control_" + column.code] && data2) {
42640
- let values = this.$refs["control_" + column.code][0].$data.values;
42649
+ let values = this.$refs["control_" + column.code][0].values;
42641
42650
  let pendings = [];
42642
42651
  if (column.controlType == "MultiComboSelect") {
42643
42652
  data2.forEach((value) => {
42644
42653
  if (!values.some((v) => v.value == value)) {
42645
42654
  let newValue = { value, label: null, disabled: false };
42646
- values.push(newValue);
42655
+ this.$refs["control_" + column.code][0].values.push(newValue);
42647
42656
  pendings.push(newValue);
42648
42657
  }
42649
42658
  });
@@ -42654,27 +42663,34 @@ const _sfc_main$$ = {
42654
42663
  pendings.push(newValue);
42655
42664
  }
42656
42665
  }
42657
- if (pendings.length > 0) {
42658
- let param = this.getParam(model2, column);
42659
- param[column.sourceDataCode] = pendings.map((item) => item.value).join(",");
42660
- let res2;
42661
- if (column.isSourceCustom) {
42662
- res2 = await customModelApi.query(column.source, param);
42663
- } else {
42664
- res2 = await modelApi.query(column.source, param);
42665
- }
42666
- res2.data.forEach((item) => {
42667
- let v = this.parseData(item, column.sourceDataCode);
42668
- let label = this.parseData(item, column.sourceDisplayCode);
42669
- if (column.controlType == "ComboSelect")
42670
- ;
42671
- let newValue = pendings.find((i3) => i3.value == v);
42672
- if (newValue) {
42673
- 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);
42674
42675
  }
42675
- });
42676
- this.$forceUpdate();
42677
- }
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);
42678
42694
  }
42679
42695
  }
42680
42696
  }
@@ -42990,7 +43006,9 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
42990
43006
  style: normalizeStyle$1({ width: column.controlWidth == null ? null : column.controlWidth + "px" }),
42991
43007
  placeholder: column.description,
42992
43008
  transfer: true,
42993
- 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)
42994
43012
  }, {
42995
43013
  default: withCtx(() => [
42996
43014
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.getDataSource($data.data, column), (item) => {
@@ -43006,7 +43024,7 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
43006
43024
  }), 128))
43007
43025
  ]),
43008
43026
  _: 2
43009
- }, 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"])
43010
43028
  ], 64)) : column.controlType === "MultiComboSelect" ? (openBlock(), createBlock(_component_Select, {
43011
43029
  key: 11,
43012
43030
  ref_for: true,