@newview/ui 1.2.13 → 1.2.15

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.
@@ -17833,7 +17833,7 @@ const _export_sfc = (sfc, props) => {
17833
17833
  }
17834
17834
  return target;
17835
17835
  };
17836
- const _sfc_main$t = {
17836
+ const _sfc_main$u = {
17837
17837
  name: "BAceEditor",
17838
17838
  props: {
17839
17839
  modelValue: String,
@@ -17972,13 +17972,13 @@ const _sfc_main$t = {
17972
17972
  }
17973
17973
  }
17974
17974
  };
17975
- function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
17975
+ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
17976
17976
  return openBlock(), createElementBlock("div", {
17977
17977
  class: "bin-editor-next",
17978
17978
  style: normalizeStyle($options.wrapStyles)
17979
17979
  }, null, 4);
17980
17980
  }
17981
- const BinEditor = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$t]]);
17981
+ const BinEditor = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$v]]);
17982
17982
  var ace$1 = { exports: {} };
17983
17983
  (function(module, exports) {
17984
17984
  (function() {
@@ -30024,7 +30024,7 @@ var json$1 = { exports: {} };
30024
30024
  });
30025
30025
  })();
30026
30026
  })(json$1);
30027
- const propDefine$z = {
30027
+ const propDefine$A = {
30028
30028
  lang: {
30029
30029
  // 代码编辑器语言 json/javascript/java/sql/elixir/html/css
30030
30030
  type: String,
@@ -30061,12 +30061,12 @@ const propDefine$z = {
30061
30061
  default: {}
30062
30062
  }
30063
30063
  };
30064
- const _sfc_main$s = defineComponent({
30064
+ const _sfc_main$t = defineComponent({
30065
30065
  name: "NvEditor",
30066
30066
  components: { BinEditor },
30067
30067
  emits: [""],
30068
30068
  // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
30069
- props: propDefine$z,
30069
+ props: propDefine$A,
30070
30070
  setup(props, ctx) {
30071
30071
  return new EditorInstance$1(props, ctx);
30072
30072
  }
@@ -30108,10 +30108,10 @@ let EditorInstance$1 = class EditorInstance2 extends BaseInstance {
30108
30108
  //#endregion BinEditor 编辑器 END
30109
30109
  };
30110
30110
  const Editor_vue_vue_type_style_index_0_scoped_cf6872cf_lang = "";
30111
- const _hoisted_1$l = { class: "monacoEditor" };
30112
- function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
30111
+ const _hoisted_1$n = { class: "monacoEditor" };
30112
+ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
30113
30113
  const _component_BinEditor = resolveComponent("BinEditor");
30114
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
30114
+ return openBlock(), createElementBlock("div", _hoisted_1$n, [
30115
30115
  createVNode(_component_BinEditor, {
30116
30116
  modelValue: _ctx.editorValue,
30117
30117
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.editorValue = $event),
@@ -30127,8 +30127,8 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
30127
30127
  }, null, 8, ["modelValue", "lang", "readonly", "font-size", "wrap", "snippets", "options", "styles"])
30128
30128
  ]);
30129
30129
  }
30130
- const Editor = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$s], ["__scopeId", "data-v-cf6872cf"]]);
30131
- const propDefine$y = {
30130
+ const Editor = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$u], ["__scopeId", "data-v-cf6872cf"]]);
30131
+ const propDefine$z = {
30132
30132
  placeholder: {
30133
30133
  // 占位文本
30134
30134
  type: String,
@@ -30155,12 +30155,12 @@ const propDefine$y = {
30155
30155
  default: false
30156
30156
  }
30157
30157
  };
30158
- const _sfc_main$r = defineComponent({
30158
+ const _sfc_main$s = defineComponent({
30159
30159
  name: "NvIconSelect",
30160
30160
  components: {},
30161
30161
  emits: ["update:modelValue", "change"],
30162
30162
  // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
30163
- props: propDefine$y,
30163
+ props: propDefine$z,
30164
30164
  setup(props, ctx) {
30165
30165
  return new IconSelectInstance(props, ctx);
30166
30166
  }
@@ -31080,15 +31080,15 @@ class IconSelectInstance extends BaseInstance {
31080
31080
  //#endregion Icon 选择 END
31081
31081
  }
31082
31082
  const IconSelect_vue_vue_type_style_index_0_lang = "";
31083
- const _hoisted_1$k = { class: "icon-select" };
31084
- const _hoisted_2$h = { class: "icon-select-search" };
31085
- const _hoisted_3$e = { class: "icon-select-list" };
31086
- const _hoisted_4$9 = ["onClick", "title"];
31087
- function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
31083
+ const _hoisted_1$m = { class: "icon-select" };
31084
+ const _hoisted_2$j = { class: "icon-select-search" };
31085
+ const _hoisted_3$g = { class: "icon-select-list" };
31086
+ const _hoisted_4$b = ["onClick", "title"];
31087
+ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
31088
31088
  const _component_Icon = resolveComponent("Icon");
31089
31089
  const _component_Input = resolveComponent("Input");
31090
31090
  const _component_Poptip = resolveComponent("Poptip");
31091
- return openBlock(), createElementBlock("div", _hoisted_1$k, [
31091
+ return openBlock(), createElementBlock("div", _hoisted_1$m, [
31092
31092
  _ctx.readonly ? (openBlock(), createBlock(_component_Icon, {
31093
31093
  key: 0,
31094
31094
  type: "iconValue"
@@ -31104,7 +31104,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
31104
31104
  createElementVNode("div", {
31105
31105
  style: normalizeStyle({ width: _ctx.poptipWidth + "px" })
31106
31106
  }, [
31107
- createElementVNode("div", _hoisted_2$h, [
31107
+ createElementVNode("div", _hoisted_2$j, [
31108
31108
  createVNode(_component_Input, {
31109
31109
  modelValue: _ctx.iconSearch,
31110
31110
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.iconSearch = $event),
@@ -31113,7 +31113,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
31113
31113
  onOnChange: _ctx.doSearchIcon
31114
31114
  }, null, 8, ["modelValue", "onOnChange"])
31115
31115
  ]),
31116
- createElementVNode("div", _hoisted_3$e, [
31116
+ createElementVNode("div", _hoisted_3$g, [
31117
31117
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.icons, (item2) => {
31118
31118
  return openBlock(), createElementBlock("div", {
31119
31119
  class: "icon-select-item",
@@ -31123,7 +31123,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
31123
31123
  createVNode(_component_Icon, {
31124
31124
  type: item2.type
31125
31125
  }, null, 8, ["type"])
31126
- ], 8, _hoisted_4$9);
31126
+ ], 8, _hoisted_4$b);
31127
31127
  }), 256))
31128
31128
  ])
31129
31129
  ], 4)
@@ -31149,8 +31149,8 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
31149
31149
  }, 8, ["modelValue"]))
31150
31150
  ]);
31151
31151
  }
31152
- const NvIconSelect = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$r]]);
31153
- const propDefine$x = {
31152
+ const NvIconSelect = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$t]]);
31153
+ const propDefine$y = {
31154
31154
  dataValue: {
31155
31155
  default: "",
31156
31156
  type: String
@@ -31171,12 +31171,12 @@ const propDefine$x = {
31171
31171
  default: "K"
31172
31172
  }
31173
31173
  };
31174
- const _sfc_main$q = defineComponent({
31174
+ const _sfc_main$r = defineComponent({
31175
31175
  name: "NvMileEdit",
31176
31176
  components: {},
31177
31177
  emits: ["on-change"],
31178
31178
  // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
31179
- props: propDefine$x,
31179
+ props: propDefine$y,
31180
31180
  setup(props, ctx) {
31181
31181
  return new MileEditInstance(props, ctx);
31182
31182
  }
@@ -31280,7 +31280,7 @@ class MileEditInstance extends BaseInstance {
31280
31280
  }
31281
31281
  //#endregion 业务逻辑 END
31282
31282
  }
31283
- function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
31283
+ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
31284
31284
  const _component_Input = resolveComponent("Input");
31285
31285
  return openBlock(), createBlock(_component_Input, {
31286
31286
  modelValue: _ctx.inputValue,
@@ -31293,8 +31293,8 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
31293
31293
  style: { "width": "100%" }
31294
31294
  }, null, 8, ["modelValue", "placeholder", "readonly", "onOnBlur", "onOnFocus", "onOnChange"]);
31295
31295
  }
31296
- const MileEdit = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q]]);
31297
- const propDefine$w = {
31296
+ const MileEdit = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$s]]);
31297
+ const propDefine$x = {
31298
31298
  onlyView: {
31299
31299
  // 是否只读
31300
31300
  type: Boolean,
@@ -31312,11 +31312,11 @@ const propDefine$w = {
31312
31312
  }
31313
31313
  }
31314
31314
  };
31315
- const _sfc_main$p = defineComponent({
31315
+ const _sfc_main$q = defineComponent({
31316
31316
  name: "NvComForm",
31317
31317
  components: { NvIconSelect, MileEdit },
31318
31318
  emits: [""],
31319
- props: propDefine$w,
31319
+ props: propDefine$x,
31320
31320
  setup(props, ctx) {
31321
31321
  return new ComFormInstance$1(props, ctx);
31322
31322
  }
@@ -31460,16 +31460,16 @@ let ComFormInstance$1 = class ComFormInstance2 extends BaseInstance {
31460
31460
  //#endregion 公开Api End
31461
31461
  };
31462
31462
  const ComForm_vue_vue_type_style_index_0_scoped_80b78296_lang = "";
31463
- const _hoisted_1$j = { class: "comForm" };
31464
- const _hoisted_2$g = ["onClick"];
31465
- const _hoisted_3$d = { key: 1 };
31466
- const _hoisted_4$8 = ["onClick"];
31467
- const _hoisted_5$7 = {
31463
+ const _hoisted_1$l = { class: "comForm" };
31464
+ const _hoisted_2$i = ["onClick"];
31465
+ const _hoisted_3$f = { key: 1 };
31466
+ const _hoisted_4$a = ["onClick"];
31467
+ const _hoisted_5$9 = {
31468
31468
  key: 0,
31469
31469
  class: "ivu-input-group-append"
31470
31470
  };
31471
- const _hoisted_6$5 = ["onClick"];
31472
- function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
31471
+ const _hoisted_6$6 = ["onClick"];
31472
+ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
31473
31473
  const _component_Button = resolveComponent("Button");
31474
31474
  const _component_com_form = resolveComponent("com-form", true);
31475
31475
  const _component_Card = resolveComponent("Card");
@@ -31498,7 +31498,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
31498
31498
  const _component_FormItem = resolveComponent("FormItem");
31499
31499
  const _component_Col = resolveComponent("Col");
31500
31500
  const _component_Row = resolveComponent("Row");
31501
- return openBlock(), createElementBlock("div", _hoisted_1$j, [
31501
+ return openBlock(), createElementBlock("div", _hoisted_1$l, [
31502
31502
  createElementVNode("div", {
31503
31503
  class: normalizeClass({ onlyViewForm: _ctx.onlyView })
31504
31504
  }, [
@@ -31579,7 +31579,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
31579
31579
  loading: _ctx.getPropValue(item2.switchProp, "loading"),
31580
31580
  onOnChange: ($event) => _ctx.getPropEvent(item2.switchProp, "onChange")($event, item2)
31581
31581
  }, null, 8, ["modelValue", "onUpdate:modelValue", "size", "disabled", "true-value", "false-value", "true-color", "false-color", "before-change", "loading", "onOnChange"])) : createCommentVNode("", true),
31582
- item2.type == "Label" ? (openBlock(), createElementBlock("span", _hoisted_3$d, toDisplayString(_ctx.formModel[item2.model]), 1)) : createCommentVNode("", true),
31582
+ item2.type == "Label" ? (openBlock(), createElementBlock("span", _hoisted_3$f, toDisplayString(_ctx.formModel[item2.model]), 1)) : createCommentVNode("", true),
31583
31583
  item2.type == "Button" ? (openBlock(), createBlock(_component_Button, {
31584
31584
  key: 2,
31585
31585
  type: _ctx.getPropValue(item2.buttonProp, "type"),
@@ -31651,7 +31651,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
31651
31651
  createElementVNode("div", {
31652
31652
  onClick: ($event) => _ctx.getPropEvent(item2.inputProp, "onTextClick")($event, item2),
31653
31653
  style: { "cursor": "pointer", "color": "rgb(45, 140, 240)" }
31654
- }, toDisplayString(_ctx.getPropValue(item2.inputProp, "append")), 9, _hoisted_4$8)
31654
+ }, toDisplayString(_ctx.getPropValue(item2.inputProp, "append")), 9, _hoisted_4$a)
31655
31655
  ]),
31656
31656
  key: "1"
31657
31657
  } : void 0
@@ -31681,11 +31681,11 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
31681
31681
  onOnFocus: ($event) => _ctx.getPropEvent(item2.inputNumberProp, "onFocus")($event, item2),
31682
31682
  onOnBlur: ($event) => _ctx.getPropEvent(item2.inputNumberProp, "onBlur")($event, item2)
31683
31683
  }, null, 8, ["modelValue", "onUpdate:modelValue", "max", "min", "controls-outside", "step", "size", "disabled", "placeholder", "formatter", "parser", "readonly", "editable", "precision", "element-id", "active-change", "onOnChange", "onOnFocus", "onOnBlur"]),
31684
- _ctx.getAppend(item2.inputNumberProp) != "" ? (openBlock(), createElementBlock("div", _hoisted_5$7, [
31684
+ _ctx.getAppend(item2.inputNumberProp) != "" ? (openBlock(), createElementBlock("div", _hoisted_5$9, [
31685
31685
  createElementVNode("div", {
31686
31686
  onClick: ($event) => _ctx.getPropEvent(item2.inputNumberProp, "onTextClick")($event, item2),
31687
31687
  style: { "cursor": "pointer", "color": "rgb(45, 140, 240)" }
31688
- }, toDisplayString(_ctx.getPropValue(item2.inputNumberProp, "append")), 9, _hoisted_6$5)
31688
+ }, toDisplayString(_ctx.getPropValue(item2.inputNumberProp, "append")), 9, _hoisted_6$6)
31689
31689
  ])) : createCommentVNode("", true)
31690
31690
  ], 2)) : createCommentVNode("", true),
31691
31691
  item2.type == "Select" ? (openBlock(), createBlock(_component_Select, {
@@ -32030,7 +32030,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
32030
32030
  item2.label ? (openBlock(), createElementBlock("span", {
32031
32031
  key: 0,
32032
32032
  onClick: ($event) => _ctx.getPropEvent(item2, "onLabelClick")($event, item2)
32033
- }, toDisplayString(item2.label), 9, _hoisted_2$g)) : createCommentVNode("", true)
32033
+ }, toDisplayString(item2.label), 9, _hoisted_2$i)) : createCommentVNode("", true)
32034
32034
  ]),
32035
32035
  key: "0"
32036
32036
  } : void 0
@@ -32048,9 +32048,9 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
32048
32048
  ], 2)
32049
32049
  ]);
32050
32050
  }
32051
- const ComForm = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$p], ["__scopeId", "data-v-80b78296"]]);
32051
+ const ComForm = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$r], ["__scopeId", "data-v-80b78296"]]);
32052
32052
  const style = "";
32053
- const propDefine$v = {
32053
+ const propDefine$w = {
32054
32054
  options: {
32055
32055
  // SearchCom 配置项
32056
32056
  type: Array,
@@ -32067,11 +32067,11 @@ const propDefine$v = {
32067
32067
  default: () => 80
32068
32068
  }
32069
32069
  };
32070
- const _sfc_main$o = defineComponent({
32070
+ const _sfc_main$p = defineComponent({
32071
32071
  name: "NvSearchCom",
32072
32072
  components: {},
32073
32073
  emits: ["search"],
32074
- props: propDefine$v,
32074
+ props: propDefine$w,
32075
32075
  setup(props, ctx) {
32076
32076
  return new SearchComInstance$1(props, ctx);
32077
32077
  }
@@ -32187,7 +32187,7 @@ let SearchComInstance$1 = class SearchComInstance2 extends BaseInstance {
32187
32187
  //#endregion AutoComplete END
32188
32188
  };
32189
32189
  const SearchCom_vue_vue_type_style_index_0_scoped_4a07b3ec_lang = "";
32190
- function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
32190
+ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32191
32191
  const _component_Input = resolveComponent("Input");
32192
32192
  const _component_Radio = resolveComponent("Radio");
32193
32193
  const _component_RadioGroup = resolveComponent("RadioGroup");
@@ -32374,8 +32374,8 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
32374
32374
  _: 1
32375
32375
  }, 8, ["model", "label-width"]);
32376
32376
  }
32377
- const SearchCom = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-4a07b3ec"]]);
32378
- const propDefine$u = {
32377
+ const SearchCom = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$q], ["__scopeId", "data-v-4a07b3ec"]]);
32378
+ const propDefine$v = {
32379
32379
  options: {
32380
32380
  // 配置项
32381
32381
  type: Array,
@@ -32397,11 +32397,11 @@ const propDefine$u = {
32397
32397
  default: 3
32398
32398
  }
32399
32399
  };
32400
- const _sfc_main$n = defineComponent({
32400
+ const _sfc_main$o = defineComponent({
32401
32401
  name: "NvToolbar",
32402
32402
  components: {},
32403
32403
  emits: [""],
32404
- props: propDefine$u,
32404
+ props: propDefine$v,
32405
32405
  setup(props, ctx) {
32406
32406
  return new ToolbarInstance$1(props, ctx);
32407
32407
  }
@@ -32536,10 +32536,10 @@ let ToolbarInstance$1 = class ToolbarInstance2 extends BaseInstance {
32536
32536
  //#endregion 业务逻辑 END
32537
32537
  };
32538
32538
  const Toolbar_vue_vue_type_style_index_0_scoped_09e0c64e_lang = "";
32539
- const _hoisted_1$i = { class: "toolbar" };
32540
- const _hoisted_2$f = { style: { "display": "none" } };
32541
- const _hoisted_3$c = { key: 0 };
32542
- function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
32539
+ const _hoisted_1$k = { class: "toolbar" };
32540
+ const _hoisted_2$h = { style: { "display": "none" } };
32541
+ const _hoisted_3$e = { key: 0 };
32542
+ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
32543
32543
  const _component_Button = resolveComponent("Button");
32544
32544
  const _component_ButtonGroup = resolveComponent("ButtonGroup");
32545
32545
  const _component_Divider = resolveComponent("Divider");
@@ -32548,10 +32548,10 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
32548
32548
  const _component_DropdownMenu = resolveComponent("DropdownMenu");
32549
32549
  const _component_Dropdown = resolveComponent("Dropdown");
32550
32550
  const _component_Space = resolveComponent("Space");
32551
- return openBlock(), createElementBlock("div", _hoisted_1$i, [
32551
+ return openBlock(), createElementBlock("div", _hoisted_1$k, [
32552
32552
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.mainOptions, (item2, index2) => {
32553
- return openBlock(), createElementBlock("div", _hoisted_2$f, [
32554
- _ctx.getIsShow(item2) ? (openBlock(), createElementBlock("span", _hoisted_3$c)) : createCommentVNode("", true)
32553
+ return openBlock(), createElementBlock("div", _hoisted_2$h, [
32554
+ _ctx.getIsShow(item2) ? (openBlock(), createElementBlock("span", _hoisted_3$e)) : createCommentVNode("", true)
32555
32555
  ]);
32556
32556
  }), 256)),
32557
32557
  _ctx.isButtonGroup ? (openBlock(), createBlock(_component_ButtonGroup, { key: 0 }, {
@@ -32663,7 +32663,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
32663
32663
  }))
32664
32664
  ]);
32665
32665
  }
32666
- const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-09e0c64e"]]);
32666
+ const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$p], ["__scopeId", "data-v-09e0c64e"]]);
32667
32667
  const GridCellContent$1 = defineComponent({
32668
32668
  name: "GridCellContent",
32669
32669
  props: {
@@ -32706,7 +32706,7 @@ const GridTitleContent$1 = defineComponent({
32706
32706
  return this.$props.column.titleFormat(h, this.$props.column);
32707
32707
  }
32708
32708
  });
32709
- const propDefine$t = {
32709
+ const propDefine$u = {
32710
32710
  columns: {
32711
32711
  // 列配置项
32712
32712
  type: Array,
@@ -32718,11 +32718,11 @@ const propDefine$t = {
32718
32718
  }
32719
32719
  }
32720
32720
  };
32721
- const _sfc_main$m = defineComponent({
32721
+ const _sfc_main$n = defineComponent({
32722
32722
  name: "GridColumn",
32723
32723
  components: { VxeColumn, VxeColgroup, GridCellContent: GridCellContent$1, GridTitleContent: GridTitleContent$1, MileEdit },
32724
32724
  emits: ["clearRadioRow", "change", "delete", "addchild"],
32725
- props: propDefine$t,
32725
+ props: propDefine$u,
32726
32726
  setup(props, ctx) {
32727
32727
  return new GridColumnInstance$1(props, ctx);
32728
32728
  }
@@ -33254,13 +33254,13 @@ let GridColumnInstance$1 = class GridColumnInstance2 extends BaseInstance {
33254
33254
  };
33255
33255
  const GridColumn_vue_vue_type_style_index_0_lang$1 = "";
33256
33256
  const GridColumn_vue_vue_type_style_index_1_scoped_125c7c24_lang = "";
33257
- const _hoisted_1$h = { class: "gridColumn" };
33258
- const _hoisted_2$e = {
33257
+ const _hoisted_1$j = { class: "gridColumn" };
33258
+ const _hoisted_2$g = {
33259
33259
  key: 3,
33260
33260
  class: "nv-num-text"
33261
33261
  };
33262
- const _hoisted_3$b = { key: 4 };
33263
- function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
33262
+ const _hoisted_3$d = { key: 4 };
33263
+ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
33264
33264
  const _component_GridTitleContent = resolveComponent("GridTitleContent");
33265
33265
  const _component_grid_column = resolveComponent("grid-column", true);
33266
33266
  const _component_vxe_colgroup = resolveComponent("vxe-colgroup");
@@ -33281,7 +33281,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
33281
33281
  const _component_MileEdit = resolveComponent("MileEdit");
33282
33282
  const _component_Button = resolveComponent("Button");
33283
33283
  const _component_Space = resolveComponent("Space");
33284
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
33284
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
33285
33285
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (column) => {
33286
33286
  return openBlock(), createElementBlock(Fragment, null, [
33287
33287
  _ctx.getHasColgroup(column) && _ctx.getVisible(column) ? (openBlock(), createBlock(_component_vxe_colgroup, {
@@ -33544,7 +33544,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
33544
33544
  modelValue: row[_ctx.getField(column)],
33545
33545
  "onUpdate:modelValue": ($event) => row[_ctx.getField(column)] = $event,
33546
33546
  disabled: true
33547
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : column.colType == "num" ? (openBlock(), createElementBlock("span", _hoisted_2$e, toDisplayString(row[_ctx.getField(column)]), 1)) : column.colType == "mile" ? (openBlock(), createElementBlock("span", _hoisted_3$b, toDisplayString(_ctx.formatMileValue(row[_ctx.getField(column)], (_a = column.mileConfig) == null ? void 0 : _a.prefix)), 1)) : (openBlock(), createBlock(_component_GridCellContent, {
33547
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])) : column.colType == "num" ? (openBlock(), createElementBlock("span", _hoisted_2$g, toDisplayString(row[_ctx.getField(column)]), 1)) : column.colType == "mile" ? (openBlock(), createElementBlock("span", _hoisted_3$d, toDisplayString(_ctx.formatMileValue(row[_ctx.getField(column)], (_a = column.mileConfig) == null ? void 0 : _a.prefix)), 1)) : (openBlock(), createBlock(_component_GridCellContent, {
33548
33548
  key: 5,
33549
33549
  column,
33550
33550
  row
@@ -33633,8 +33633,8 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
33633
33633
  }), 256))
33634
33634
  ]);
33635
33635
  }
33636
- const GridColumn$1 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$m], ["__scopeId", "data-v-125c7c24"]]);
33637
- const _sfc_main$l = defineComponent({
33636
+ const GridColumn$1 = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$o], ["__scopeId", "data-v-125c7c24"]]);
33637
+ const _sfc_main$m = defineComponent({
33638
33638
  name: "FilterDaterange",
33639
33639
  props: {
33640
33640
  params: Object
@@ -33678,15 +33678,15 @@ const _sfc_main$l = defineComponent({
33678
33678
  };
33679
33679
  }
33680
33680
  });
33681
- const _hoisted_1$g = { class: "nv-flex" };
33682
- const _hoisted_2$d = {
33681
+ const _hoisted_1$i = { class: "nv-flex" };
33682
+ const _hoisted_2$f = {
33683
33683
  key: 0,
33684
33684
  style: { "font-size": "12px", "color": "#f00", "text-align": "center" }
33685
33685
  };
33686
- function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
33686
+ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
33687
33687
  const _component_DatePicker = resolveComponent("DatePicker");
33688
33688
  return openBlock(), createElementBlock("div", null, [
33689
- createElementVNode("div", _hoisted_1$g, [
33689
+ createElementVNode("div", _hoisted_1$i, [
33690
33690
  _ctx.filterDateRangeVal.option.data && _ctx.filterDateRangeVal.option.data.length > 0 ? (openBlock(), createBlock(_component_DatePicker, {
33691
33691
  key: 0,
33692
33692
  modelValue: _ctx.filterDateRangeVal.option.data,
@@ -33698,11 +33698,11 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
33698
33698
  onOnChange: _ctx.changeOptionEvent
33699
33699
  }, null, 8, ["modelValue", "onOnChange"])) : createCommentVNode("", true)
33700
33700
  ]),
33701
- _ctx.warningMsg.isShow ? (openBlock(), createElementBlock("div", _hoisted_2$d, "起始时间不能大于结束时间")) : createCommentVNode("", true)
33701
+ _ctx.warningMsg.isShow ? (openBlock(), createElementBlock("div", _hoisted_2$f, "起始时间不能大于结束时间")) : createCommentVNode("", true)
33702
33702
  ]);
33703
33703
  }
33704
- const FilterDaterange$1 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l]]);
33705
- const _sfc_main$k = defineComponent({
33704
+ const FilterDaterange$1 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$n]]);
33705
+ const _sfc_main$l = defineComponent({
33706
33706
  name: "FilterDaterange",
33707
33707
  props: {
33708
33708
  params: Object
@@ -33744,16 +33744,16 @@ const _sfc_main$k = defineComponent({
33744
33744
  };
33745
33745
  }
33746
33746
  });
33747
- const _hoisted_1$f = { class: "nv-flex" };
33748
- const _hoisted_2$c = /* @__PURE__ */ createElementVNode("span", null, " ~ ", -1);
33749
- const _hoisted_3$a = {
33747
+ const _hoisted_1$h = { class: "nv-flex" };
33748
+ const _hoisted_2$e = /* @__PURE__ */ createElementVNode("span", null, " ~ ", -1);
33749
+ const _hoisted_3$c = {
33750
33750
  key: 0,
33751
33751
  style: { "font-size": "12px", "color": "#f00", "text-align": "center" }
33752
33752
  };
33753
- function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
33753
+ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
33754
33754
  const _component_vxe_input = resolveComponent("vxe-input");
33755
33755
  return openBlock(), createElementBlock("div", null, [
33756
- createElementVNode("div", _hoisted_1$f, [
33756
+ createElementVNode("div", _hoisted_1$h, [
33757
33757
  _ctx.filterDateRangeVal.option.data && _ctx.filterDateRangeVal.option.data.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
33758
33758
  createVNode(_component_vxe_input, {
33759
33759
  modelValue: _ctx.filterDateRangeVal.option.data[0],
@@ -33763,7 +33763,7 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
33763
33763
  style: { "width": "120px" },
33764
33764
  onChange: _ctx.changeOptionEvent
33765
33765
  }, null, 8, ["modelValue", "onChange"]),
33766
- _hoisted_2$c,
33766
+ _hoisted_2$e,
33767
33767
  createVNode(_component_vxe_input, {
33768
33768
  modelValue: _ctx.filterDateRangeVal.option.data[1],
33769
33769
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.filterDateRangeVal.option.data[1] = $event),
@@ -33774,10 +33774,10 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
33774
33774
  }, null, 8, ["modelValue", "onChange"])
33775
33775
  ], 64)) : createCommentVNode("", true)
33776
33776
  ]),
33777
- _ctx.warningMsg.isShow ? (openBlock(), createElementBlock("div", _hoisted_3$a, "起始值不能大于结束值")) : createCommentVNode("", true)
33777
+ _ctx.warningMsg.isShow ? (openBlock(), createElementBlock("div", _hoisted_3$c, "起始值不能大于结束值")) : createCommentVNode("", true)
33778
33778
  ]);
33779
33779
  }
33780
- const FilterNumberrange$1 = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k]]);
33780
+ const FilterNumberrange$1 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$m]]);
33781
33781
  const CreatGridRenderer$1 = () => {
33782
33782
  if (!VXETable.renderer.get("filterDaterange")) {
33783
33783
  VXETable.renderer.add("filterDaterange", {
@@ -57943,7 +57943,7 @@ class ExcelHelper {
57943
57943
  XLSX$1.writeFile(wb, fileName);
57944
57944
  }
57945
57945
  }
57946
- const propDefine$s = {
57946
+ const propDefine$t = {
57947
57947
  option: {
57948
57948
  // Gird 配置项
57949
57949
  type: Object,
@@ -57994,7 +57994,7 @@ const propDefine$s = {
57994
57994
  }
57995
57995
  }
57996
57996
  };
57997
- const _sfc_main$j = defineComponent({
57997
+ const _sfc_main$k = defineComponent({
57998
57998
  name: "NvGrid",
57999
57999
  components: {
58000
58000
  VxeGrid,
@@ -58005,12 +58005,12 @@ const _sfc_main$j = defineComponent({
58005
58005
  GridColumn: GridColumn$1
58006
58006
  },
58007
58007
  emits: [""],
58008
- props: propDefine$s,
58008
+ props: propDefine$t,
58009
58009
  setup(props, ctx) {
58010
- return new GridInstance$1(props, ctx);
58010
+ return new GridInstance$2(props, ctx);
58011
58011
  }
58012
58012
  });
58013
- let GridInstance$1 = class GridInstance2 extends BaseInstance {
58013
+ let GridInstance$2 = class GridInstance2 extends BaseInstance {
58014
58014
  constructor(props, ctx) {
58015
58015
  super();
58016
58016
  __publicField2(this, "props");
@@ -59514,29 +59514,29 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
59514
59514
  //#endregion 公开方法 END
59515
59515
  };
59516
59516
  const Grid_vue_vue_type_style_index_0_scoped_cad0be75_lang = "";
59517
- const _withScopeId$3 = (n) => (pushScopeId("data-v-cad0be75"), n = n(), popScopeId(), n);
59518
- const _hoisted_1$e = { class: "nv-crud nv-pos-r" };
59519
- const _hoisted_2$b = { class: "grid-msg" };
59520
- const _hoisted_3$9 = { class: "nv-crud-body" };
59521
- const _hoisted_4$7 = { class: "nv-crud-body-search" };
59522
- const _hoisted_5$6 = {
59517
+ const _withScopeId$4 = (n) => (pushScopeId("data-v-cad0be75"), n = n(), popScopeId(), n);
59518
+ const _hoisted_1$g = { class: "nv-crud nv-pos-r" };
59519
+ const _hoisted_2$d = { class: "grid-msg" };
59520
+ const _hoisted_3$b = { class: "nv-crud-body" };
59521
+ const _hoisted_4$9 = { class: "nv-crud-body-search" };
59522
+ const _hoisted_5$8 = {
59523
59523
  key: 0,
59524
59524
  class: "nv-crud-toolbar"
59525
59525
  };
59526
- const _hoisted_6$4 = {
59526
+ const _hoisted_6$5 = {
59527
59527
  key: 0,
59528
59528
  class: "nv-title"
59529
59529
  };
59530
- const _hoisted_7$3 = {
59530
+ const _hoisted_7$4 = {
59531
59531
  class: "nv-crud-body-table",
59532
59532
  ref: "crudTable"
59533
59533
  };
59534
- const _hoisted_8$3 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "grid-msg" }, "加载中...", -1));
59535
- const _hoisted_9$3 = {
59534
+ const _hoisted_8$4 = /* @__PURE__ */ _withScopeId$4(() => /* @__PURE__ */ createElementVNode("span", { class: "grid-msg" }, "加载中...", -1));
59535
+ const _hoisted_9$4 = {
59536
59536
  key: 0,
59537
59537
  class: "nv-crud-footer"
59538
59538
  };
59539
- function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
59539
+ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
59540
59540
  var _a;
59541
59541
  const _component_Icon = resolveComponent("Icon");
59542
59542
  const _component_Spin = resolveComponent("Spin");
@@ -59550,7 +59550,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
59550
59550
  const _component_grid_column = resolveComponent("grid-column");
59551
59551
  const _component_vxe_table = resolveComponent("vxe-table");
59552
59552
  const _component_Page = resolveComponent("Page");
59553
- return openBlock(), createElementBlock("div", _hoisted_1$e, [
59553
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
59554
59554
  createVNode(_component_Spin, {
59555
59555
  fix: "",
59556
59556
  show: _ctx.doMethodLoading.show,
@@ -59562,12 +59562,12 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
59562
59562
  size: "24",
59563
59563
  class: "grid-icon-load"
59564
59564
  }),
59565
- createElementVNode("span", _hoisted_2$b, toDisplayString(_ctx.doMethodLoading.text ? _ctx.doMethodLoading.text : "正在执行..."), 1)
59565
+ createElementVNode("span", _hoisted_2$d, toDisplayString(_ctx.doMethodLoading.text ? _ctx.doMethodLoading.text : "正在执行..."), 1)
59566
59566
  ]),
59567
59567
  _: 1
59568
59568
  }, 8, ["show"]),
59569
- createElementVNode("div", _hoisted_3$9, [
59570
- withDirectives(createElementVNode("div", _hoisted_4$7, [
59569
+ createElementVNode("div", _hoisted_3$b, [
59570
+ withDirectives(createElementVNode("div", _hoisted_4$9, [
59571
59571
  !_ctx.isShowSearchSlot ? (openBlock(), createBlock(_component_search_com, {
59572
59572
  key: 0,
59573
59573
  options: _ctx.option.searchOptions,
@@ -59579,7 +59579,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
59579
59579
  ], 512), [
59580
59580
  [vShow, _ctx.showSearch]
59581
59581
  ]),
59582
- _ctx.isShowSearchBtn || _ctx.hasToolbar() || _ctx.getRefreshBtn() || _ctx.hasRightToolbar() || _ctx.isHasSlot ? (openBlock(), createElementBlock("div", _hoisted_5$6, [
59582
+ _ctx.isShowSearchBtn || _ctx.hasToolbar() || _ctx.getRefreshBtn() || _ctx.hasRightToolbar() || _ctx.isHasSlot ? (openBlock(), createElementBlock("div", _hoisted_5$8, [
59583
59583
  createVNode(_component_Row, null, {
59584
59584
  default: withCtx(() => [
59585
59585
  createVNode(_component_Col, { flex: "auto" }, {
@@ -59588,7 +59588,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
59588
59588
  default: withCtx(() => {
59589
59589
  var _a2, _b, _c, _d;
59590
59590
  return [
59591
- _ctx.hasTitle() ? (openBlock(), createElementBlock("div", _hoisted_6$4, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
59591
+ _ctx.hasTitle() ? (openBlock(), createElementBlock("div", _hoisted_6$5, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
59592
59592
  _ctx.hasTitleDivider() ? (openBlock(), createBlock(_component_Divider, {
59593
59593
  key: 1,
59594
59594
  type: "vertical"
@@ -59655,6 +59655,1826 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
59655
59655
  _: 3
59656
59656
  })
59657
59657
  ])) : createCommentVNode("", true),
59658
+ createElementVNode("div", _hoisted_7$4, [
59659
+ createVNode(_component_Spin, {
59660
+ fix: "",
59661
+ show: _ctx.loadDataing
59662
+ }, {
59663
+ default: withCtx(() => [
59664
+ createVNode(_component_Icon, {
59665
+ type: "ios-loading",
59666
+ size: "24",
59667
+ class: "grid-icon-load"
59668
+ }),
59669
+ _hoisted_8$4
59670
+ ]),
59671
+ _: 1
59672
+ }, 8, ["show"]),
59673
+ withDirectives(createVNode(_component_vxe_table, mergeProps(toHandlers(_ctx.gridEvents), {
59674
+ ref: "xTable",
59675
+ size: "small",
59676
+ height: "100%",
59677
+ "empty-text": (_a = _ctx.option.setting) == null ? void 0 : _a.emptyText,
59678
+ data: _ctx.datas,
59679
+ "footer-data": _ctx.footerData,
59680
+ "keep-source": true,
59681
+ "column-config": { resizable: true },
59682
+ border: _ctx.getBorder(),
59683
+ "show-header": _ctx.getShowHeader(),
59684
+ "row-class-name": _ctx.getRowClassName(),
59685
+ "cell-class-name": _ctx.getCellClassName(),
59686
+ "row-config": _ctx.getRowConfig(),
59687
+ "edit-config": _ctx.getEditConfig(),
59688
+ "tree-config": _ctx.getTreeConfig(),
59689
+ "edit-rules": _ctx.getEditRules(),
59690
+ "menu-config": _ctx.getMenuConfig(),
59691
+ "filter-config": _ctx.getFilterConfig(),
59692
+ "merge-cells": _ctx.getMergeCells(),
59693
+ "span-method": _ctx.rowspanMethod,
59694
+ "footer-method": _ctx.footerMethod,
59695
+ "checkbox-config": _ctx.getCheckboxConfig(),
59696
+ stripe: _ctx.getStripe(),
59697
+ "show-overflow": _ctx.getShowOverflow(),
59698
+ "show-footer": _ctx.getShowFooter(),
59699
+ onKeydownStart: _ctx.gridEvents.keydownStart,
59700
+ onKeydown: _ctx.gridEvents.keydown,
59701
+ onKeydownEnd: _ctx.gridEvents.keydownEnd,
59702
+ onPaste: _ctx.gridEvents.paste,
59703
+ onCopy: _ctx.gridEvents.copy,
59704
+ onCut: _ctx.gridEvents.cut,
59705
+ onCurrentChange: _ctx.gridEvents.currentChange,
59706
+ onRadioChange: _ctx.gridEvents.radioChange,
59707
+ onCheckboxChange: _ctx.gridEvents.checkboxChange,
59708
+ onCheckboxAll: _ctx.gridEvents.checkboxAll,
59709
+ onCheckboxRangeStart: _ctx.gridEvents.checkboxRangeStart,
59710
+ onCheckboxRangeChange: _ctx.gridEvents.checkboxRangeChange,
59711
+ onCheckboxRangeEnd: _ctx.gridEvents.checkboxRangeEnd,
59712
+ onCellClick: _ctx.gridEvents.cellClick,
59713
+ onCellDblclick: _ctx.gridEvents.cellDblclick,
59714
+ onCellMenu: _ctx.gridEvents.cellMenu,
59715
+ onCellMouseenter: _ctx.gridEvents.cellMouseenter,
59716
+ onCellMouseleave: _ctx.gridEvents.cellMouseleave,
59717
+ onHeaderCellClick: _ctx.gridEvents.headerCellClick,
59718
+ onHeaderCellDblclick: _ctx.gridEvents.headerCellDblclick,
59719
+ onHeaderCellMenu: _ctx.gridEvents.headerCellMenu,
59720
+ onFooterCellClick: _ctx.gridEvents.footerCellClick,
59721
+ onFooterCellDblclick: _ctx.gridEvents.footerCellDblclick,
59722
+ onFooterCellMenu: _ctx.gridEvents.footerCellMenu,
59723
+ onSortChange: _ctx.gridEvents.sortChange,
59724
+ onFilterChange: _ctx.gridEvents.filterChange,
59725
+ onResizableChange: _ctx.gridEvents.resizableChange,
59726
+ onToggleRowExpand: _ctx.gridEvents.toggleRowExpand,
59727
+ onToggleTreeExpand: _ctx.gridEvents.toggleTreeExpand,
59728
+ onMenuClick: _ctx.gridEvents.menuClick,
59729
+ onEditClosed: _ctx.gridEvents.editClosed,
59730
+ onEditActived: _ctx.gridEvents.editActived,
59731
+ onEditDisabled: _ctx.gridEvents.editDisabled,
59732
+ onValidError: _ctx.gridEvents.validError,
59733
+ onScroll: _ctx.gridEvents.scroll,
59734
+ onCustom: _ctx.gridEvents.custom
59735
+ }), {
59736
+ default: withCtx(() => [
59737
+ createVNode(_component_grid_column, {
59738
+ columns: _ctx.option.columns,
59739
+ xTable: _ctx.xTable,
59740
+ onClearRadioRow: _ctx.doClearRadioRow,
59741
+ onDelete: _ctx.doDelete,
59742
+ onAddchild: _ctx.doAddChild
59743
+ }, null, 8, ["columns", "xTable", "onClearRadioRow", "onDelete", "onAddchild"])
59744
+ ]),
59745
+ _: 1
59746
+ }, 16, ["empty-text", "data", "footer-data", "border", "show-header", "row-class-name", "cell-class-name", "row-config", "edit-config", "tree-config", "edit-rules", "menu-config", "filter-config", "merge-cells", "span-method", "footer-method", "checkbox-config", "stripe", "show-overflow", "show-footer", "onKeydownStart", "onKeydown", "onKeydownEnd", "onPaste", "onCopy", "onCut", "onCurrentChange", "onRadioChange", "onCheckboxChange", "onCheckboxAll", "onCheckboxRangeStart", "onCheckboxRangeChange", "onCheckboxRangeEnd", "onCellClick", "onCellDblclick", "onCellMenu", "onCellMouseenter", "onCellMouseleave", "onHeaderCellClick", "onHeaderCellDblclick", "onHeaderCellMenu", "onFooterCellClick", "onFooterCellDblclick", "onFooterCellMenu", "onSortChange", "onFilterChange", "onResizableChange", "onToggleRowExpand", "onToggleTreeExpand", "onMenuClick", "onEditClosed", "onEditActived", "onEditDisabled", "onValidError", "onScroll", "onCustom"]), [
59747
+ [vShow, _ctx.showTable]
59748
+ ])
59749
+ ], 512)
59750
+ ]),
59751
+ _ctx.getIsPagination() ? (openBlock(), createElementBlock("div", _hoisted_9$4, [
59752
+ createVNode(_component_Page, {
59753
+ modelValue: _ctx.pageIndex,
59754
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.pageIndex = $event),
59755
+ transfer: true,
59756
+ total: _ctx.total,
59757
+ "page-size": _ctx.getPageSize(),
59758
+ simple: _ctx.getPageConfig("simple", false),
59759
+ "show-total": "",
59760
+ "show-elevator": _ctx.getPageConfig("showElevator", false),
59761
+ "show-sizer": _ctx.getPageConfig("showSizer", false),
59762
+ "page-size-opts": _ctx.getPageConfig("pageSizeOpts", [25, 50, 100]),
59763
+ onOnChange: _ctx.doPageChange,
59764
+ onOnPageSizeChange: _ctx.doPageSizeChange
59765
+ }, null, 8, ["modelValue", "total", "page-size", "simple", "show-elevator", "show-sizer", "page-size-opts", "onOnChange", "onOnPageSizeChange"])
59766
+ ])) : createCommentVNode("", true)
59767
+ ]);
59768
+ }
59769
+ const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$l], ["__scopeId", "data-v-cad0be75"]]);
59770
+ const propDefine$s = {
59771
+ option: {
59772
+ // Gird 配置项
59773
+ type: Object,
59774
+ default: () => ({
59775
+ setting: {
59776
+ isTree: true,
59777
+ emptyText: "暂无数据",
59778
+ searchConfig: {
59779
+ btnSpan: 6,
59780
+ labelWidth: 120,
59781
+ defaultShowSearch: true
59782
+ },
59783
+ toolbarConfig: {
59784
+ isButtonGroup: false
59785
+ },
59786
+ editConfig: {
59787
+ trigger: "click",
59788
+ mode: "row",
59789
+ showStatus: true
59790
+ },
59791
+ rowConfig: {
59792
+ isCurrent: true,
59793
+ isHover: true
59794
+ },
59795
+ treeConfig: {
59796
+ lazy: false
59797
+ },
59798
+ filterConfig: {
59799
+ remote: true
59800
+ //默认使用服务端筛选
59801
+ }
59802
+ }
59803
+ })
59804
+ },
59805
+ title: {
59806
+ // Grid标题
59807
+ type: String,
59808
+ default: ""
59809
+ },
59810
+ /**
59811
+ * 正在执行方法中遮罩配置(可遮盖表格组件全部)
59812
+ */
59813
+ doMethodLoading: {
59814
+ type: Object,
59815
+ default: {
59816
+ show: false,
59817
+ text: "正在执行..."
59818
+ }
59819
+ }
59820
+ };
59821
+ const _sfc_main$j = defineComponent({
59822
+ name: "NvGrid",
59823
+ components: {
59824
+ VxeGrid,
59825
+ VxeColumn,
59826
+ VxeTable,
59827
+ SearchCom,
59828
+ Toolbar,
59829
+ GridColumn: GridColumn$1
59830
+ },
59831
+ emits: [""],
59832
+ props: propDefine$s,
59833
+ setup(props, ctx) {
59834
+ return new GridInstance$1(props, ctx);
59835
+ }
59836
+ });
59837
+ let GridInstance$1 = class GridInstance3 extends BaseInstance {
59838
+ constructor(props, ctx) {
59839
+ super();
59840
+ __publicField2(this, "props");
59841
+ __publicField2(this, "ctx");
59842
+ // API实例化
59843
+ // 全局属性
59844
+ __publicField2(this, "xTable", ref());
59845
+ //#region 查询面板
59846
+ /**
59847
+ * 显示查询面板
59848
+ */
59849
+ __publicField2(this, "showSearch", ref());
59850
+ /**
59851
+ * 是否显示Table
59852
+ */
59853
+ __publicField2(this, "showTable", ref(true));
59854
+ /**
59855
+ * 是否显示查询按钮
59856
+ */
59857
+ __publicField2(this, "isShowSearchBtn", computed(() => {
59858
+ if (!this.utilities.isNull(this.ctx.slots.search)) {
59859
+ return true;
59860
+ }
59861
+ if (this.utilities.isNull(this.props.option.searchOptions) || this.props.option.searchOptions.length == 0) {
59862
+ return false;
59863
+ }
59864
+ return true;
59865
+ }));
59866
+ __publicField2(this, "isShowSearchSlot", computed(() => {
59867
+ return !this.utilities.isNull(this.ctx.slots.search);
59868
+ }));
59869
+ __publicField2(this, "isHasSlot", computed(() => {
59870
+ return !this.utilities.isNull(this.ctx.slots.default);
59871
+ }));
59872
+ /**
59873
+ * 查询按钮Span
59874
+ */
59875
+ __publicField2(this, "btnSpan", computed(() => {
59876
+ if (this.utilities.isNull(this.props.option.setting) || this.utilities.isNull(this.props.option.setting.searchConfig) || this.utilities.isNull(this.props.option.setting.searchConfig.btnSpan)) {
59877
+ return 6;
59878
+ }
59879
+ return this.props.option.setting.searchConfig.btnSpan;
59880
+ }));
59881
+ /**
59882
+ * 查询表单标签宽度
59883
+ */
59884
+ __publicField2(this, "labelWidth", computed(() => {
59885
+ if (this.utilities.isNull(this.props.option.setting) || this.utilities.isNull(this.props.option.setting.searchConfig) || this.utilities.isNull(this.props.option.setting.searchConfig.labelWidth)) {
59886
+ return 100;
59887
+ }
59888
+ return this.props.option.setting.searchConfig.labelWidth;
59889
+ }));
59890
+ /**
59891
+ * 切换显示查询面板
59892
+ */
59893
+ __publicField2(this, "toggleShowSearch", () => {
59894
+ this.showTable.value = false;
59895
+ this.showSearch.value = !this.showSearch.value;
59896
+ this.updateTableSize();
59897
+ });
59898
+ /**
59899
+ * 执行查询
59900
+ * @param searchData
59901
+ */
59902
+ __publicField2(this, "doSearch", (searchData) => {
59903
+ if (this.props.option.event && this.props.option.event.event_search) {
59904
+ this.props.option.event.event_search(searchData);
59905
+ }
59906
+ });
59907
+ /**
59908
+ * 合并行或列
59909
+ * @param param0
59910
+ * @returns
59911
+ */
59912
+ __publicField2(this, "rowspanMethod", ({ row, _rowIndex, column, visibleData }) => {
59913
+ if (this.props.option.event && this.props.option.event.event_rowspanMethod) {
59914
+ return this.props.option.event.event_rowspanMethod({ row, _rowIndex, column, visibleData });
59915
+ }
59916
+ });
59917
+ /**
59918
+ * 表尾数据
59919
+ * @returns
59920
+ */
59921
+ __publicField2(this, "footerMethod", ({ columns, data: data2 }) => {
59922
+ if (this.props.option.event && this.props.option.event.event_footerMethod) {
59923
+ return this.props.option.event.event_footerMethod({ columns, data: data2 });
59924
+ } else {
59925
+ return [];
59926
+ }
59927
+ });
59928
+ //#endregion 查询面板 End
59929
+ /**
59930
+ * 清除当前选中行
59931
+ */
59932
+ __publicField2(this, "clearCurrentRow", () => {
59933
+ this.xTable.value.clearCurrentRow();
59934
+ });
59935
+ /**
59936
+ * 设置当前行为编辑状态
59937
+ */
59938
+ __publicField2(this, "setEditRow", (row) => {
59939
+ this.xTable.value.setEditRow(row);
59940
+ });
59941
+ /**
59942
+ * 设置当前行
59943
+ * @param row
59944
+ */
59945
+ __publicField2(this, "setCurrentRow", (row) => {
59946
+ if (this.xTable.value) {
59947
+ this.xTable.value.setCurrentRow(row);
59948
+ if (this.props.option.event && this.props.option.event.currentChange) {
59949
+ const data2 = { "$table": this.xTable.value, row, newValue: row, oldValue: void 0, rowIndex: 1, columnIndex: 0 };
59950
+ this.props.option.event.currentChange(data2);
59951
+ }
59952
+ }
59953
+ });
59954
+ //#region 全局值
59955
+ /**
59956
+ * 全局值
59957
+ */
59958
+ __publicField2(this, "gloablValues", ref([]));
59959
+ /**
59960
+ * 设置全局值
59961
+ * @param key
59962
+ * @param value
59963
+ * @param isOnlyAddSetValue
59964
+ */
59965
+ __publicField2(this, "setGloablValue", (key2, value, isOnlyAddSetValue = false) => {
59966
+ const values5 = this.gloablValues.value.filter((item2) => item2.key == key2);
59967
+ if (values5.length == 0) {
59968
+ this.gloablValues.value.push({ key: key2, value, isOnlyAddSetValue });
59969
+ } else {
59970
+ values5[0].value = value;
59971
+ values5[0].isOnlyAddSetValue = isOnlyAddSetValue;
59972
+ }
59973
+ });
59974
+ /**
59975
+ * 填充全局值到Row
59976
+ * @param row row数据
59977
+ */
59978
+ __publicField2(this, "intoGloablValue", (row) => {
59979
+ const isAdd = row.Id < 0 ? true : false;
59980
+ for (const gloablValue of this.gloablValues.value) {
59981
+ if (!isAdd && gloablValue.isOnlyAddSetValue == true)
59982
+ continue;
59983
+ let value = gloablValue.value;
59984
+ if (typeof value == "function") {
59985
+ row[gloablValue.key] = value(row);
59986
+ } else {
59987
+ switch (value) {
59988
+ case "$datetime":
59989
+ value = this.utilities.getCurrentDate("yyyy-MM-dd hh:mm:ss");
59990
+ break;
59991
+ case "$date":
59992
+ value = this.utilities.getCurrentDate("yyyy-MM-dd");
59993
+ break;
59994
+ case "$time":
59995
+ value = this.utilities.getCurrentDate("hh:mm:ss");
59996
+ break;
59997
+ case "$guid":
59998
+ value = this.utilities.getUniqueCode();
59999
+ break;
60000
+ }
60001
+ row[gloablValue.key] = value;
60002
+ }
60003
+ }
60004
+ });
60005
+ /**
60006
+ * 清除行Radio选中状态
60007
+ */
60008
+ __publicField2(this, "doClearRadioRow", () => {
60009
+ this.xTable.value.clearRadioRow();
60010
+ });
60011
+ /**
60012
+ * 清除行checkbox选中状态
60013
+ */
60014
+ __publicField2(this, "doClearCheckboxRow", () => {
60015
+ this.xTable.value.clearCheckboxRow();
60016
+ });
60017
+ //#endregion 表格列回调及初始化默认值 End
60018
+ //#region 获取表格配置 setting
60019
+ __publicField2(this, "gridEvents", ref({
60020
+ keydownStart: (params) => {
60021
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.keydownStart)) {
60022
+ this.props.option.event.keydownStart(params);
60023
+ }
60024
+ },
60025
+ keydown: (params) => {
60026
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.keydown)) {
60027
+ this.props.option.event.keydown(params);
60028
+ }
60029
+ },
60030
+ keydownEnd: (params) => {
60031
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.keydownEnd)) {
60032
+ this.props.option.event.keydownEnd(params);
60033
+ }
60034
+ },
60035
+ paste: (params) => {
60036
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.paste)) {
60037
+ this.props.option.event.paste(params);
60038
+ }
60039
+ },
60040
+ copy: (params) => {
60041
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.copy)) {
60042
+ this.props.option.event.copy(params);
60043
+ }
60044
+ },
60045
+ cut: (params) => {
60046
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.cut)) {
60047
+ this.props.option.event.cut(params);
60048
+ }
60049
+ },
60050
+ currentChange: (params) => {
60051
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.currentChange)) {
60052
+ this.props.option.event.currentChange(params);
60053
+ }
60054
+ },
60055
+ radioChange: (params) => {
60056
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.radioChange)) {
60057
+ this.props.option.event.radioChange(params);
60058
+ }
60059
+ },
60060
+ checkboxChange: (params) => {
60061
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.checkboxChange)) {
60062
+ this.props.option.event.checkboxChange(params);
60063
+ }
60064
+ },
60065
+ checkboxAll: (params) => {
60066
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.checkboxAll)) {
60067
+ this.props.option.event.checkboxAll(params);
60068
+ }
60069
+ },
60070
+ checkboxRangeStart: (params) => {
60071
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.checkboxRangeStart)) {
60072
+ this.props.option.event.checkboxRangeStart(params);
60073
+ }
60074
+ },
60075
+ checkboxRangeChange: (params) => {
60076
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.checkboxRangeChange)) {
60077
+ this.props.option.event.checkboxRangeChange(params);
60078
+ }
60079
+ },
60080
+ checkboxRangeEnd: (params) => {
60081
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.checkboxRangeEnd)) {
60082
+ this.props.option.event.checkboxRangeEnd(params);
60083
+ }
60084
+ },
60085
+ cellClick: (params) => {
60086
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.cellClick)) {
60087
+ this.props.option.event.cellClick(params);
60088
+ }
60089
+ },
60090
+ cellDblclick: (params) => {
60091
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.cellDblclick)) {
60092
+ this.props.option.event.cellDblclick(params);
60093
+ }
60094
+ if (this.getDblClickToggleTreeExpand()) {
60095
+ this.xTable.value.toggleTreeExpand(params.row);
60096
+ }
60097
+ },
60098
+ cellMenu: (params) => {
60099
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.cellMenu)) {
60100
+ this.props.option.event.cellMenu(params);
60101
+ }
60102
+ },
60103
+ cellMouseenter: (params) => {
60104
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.cellMouseenter)) {
60105
+ this.props.option.event.cellMouseenter(params);
60106
+ }
60107
+ },
60108
+ cellMouseleave: (params) => {
60109
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.cellMouseleave)) {
60110
+ this.props.option.event.cellMouseleave(params);
60111
+ }
60112
+ },
60113
+ headerCellClick: (params) => {
60114
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.headerCellClick)) {
60115
+ this.props.option.event.headerCellClick(params);
60116
+ }
60117
+ },
60118
+ headerCellDblclick: (params) => {
60119
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.headerCellDblclick)) {
60120
+ this.props.option.event.headerCellDblclick(params);
60121
+ }
60122
+ },
60123
+ headerCellMenu: (params) => {
60124
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.headerCellMenu)) {
60125
+ this.props.option.event.headerCellMenu(params);
60126
+ }
60127
+ },
60128
+ footerCellClick: (params) => {
60129
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.footerCellClick)) {
60130
+ this.props.option.event.footerCellClick(params);
60131
+ }
60132
+ },
60133
+ footerCellDblclick: (params) => {
60134
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.footerCellDblclick)) {
60135
+ this.props.option.event.footerCellDblclick(params);
60136
+ }
60137
+ },
60138
+ footerCellMenu: (params) => {
60139
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.footerCellMenu)) {
60140
+ this.props.option.event.footerCellMenu(params);
60141
+ }
60142
+ },
60143
+ sortChange: (params) => {
60144
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.sortChange)) {
60145
+ this.props.option.event.sortChange(params);
60146
+ }
60147
+ },
60148
+ filterChange: (params) => {
60149
+ let filterData = {};
60150
+ params.filterList.map((e) => {
60151
+ let filterMultiple = toRaw(e.column).filterMultiple;
60152
+ filterData[e.field] = e.values && !this.utilities.isNull(e.values[0]) ? filterMultiple ? e.values : e.values[0] : toRaw(e.datas[0]);
60153
+ });
60154
+ this.setPageIndex(1);
60155
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.event_filterChange)) {
60156
+ this.props.option.event.event_filterChange(filterData, params);
60157
+ } else {
60158
+ this.loadDataByHeaderFilterDefault(filterData);
60159
+ }
60160
+ },
60161
+ resizableChange: (params) => {
60162
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.resizableChange)) {
60163
+ this.props.option.event.resizableChange(params);
60164
+ }
60165
+ },
60166
+ toggleRowExpand: (params) => {
60167
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.toggleRowExpand)) {
60168
+ this.props.option.event.toggleRowExpand(params);
60169
+ }
60170
+ },
60171
+ toggleTreeExpand: (params) => {
60172
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.toggleTreeExpand)) {
60173
+ this.props.option.event.toggleTreeExpand(params);
60174
+ }
60175
+ },
60176
+ menuClick: (params) => {
60177
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.menuClick)) {
60178
+ this.props.option.event.menuClick(params);
60179
+ }
60180
+ },
60181
+ editClosed: (params) => {
60182
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.editClosed)) {
60183
+ this.props.option.event.editClosed(params);
60184
+ }
60185
+ },
60186
+ editActived: (params) => {
60187
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.editActived)) {
60188
+ this.props.option.event.editActived(params);
60189
+ }
60190
+ },
60191
+ editDisabled: (params) => {
60192
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.editDisabled)) {
60193
+ this.props.option.event.editDisabled(params);
60194
+ }
60195
+ },
60196
+ validError: (params) => {
60197
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.validError)) {
60198
+ this.props.option.event.validError(params);
60199
+ }
60200
+ },
60201
+ scroll: (params) => {
60202
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.scroll)) {
60203
+ this.props.option.event.scroll(params);
60204
+ }
60205
+ },
60206
+ custom: (params) => {
60207
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.custom)) {
60208
+ this.props.option.event.custom(params);
60209
+ }
60210
+ }
60211
+ }));
60212
+ /**
60213
+ * 获取表格边框
60214
+ * @returns
60215
+ */
60216
+ __publicField2(this, "getBorder", () => {
60217
+ if (this.props.option.setting) {
60218
+ return this.props.option.setting.border == false ? "inner" : "full";
60219
+ }
60220
+ return "full";
60221
+ });
60222
+ /**
60223
+ * 是否斑马纹
60224
+ */
60225
+ __publicField2(this, "getStripe", () => {
60226
+ if (this.props.option.setting) {
60227
+ return this.props.option.setting.stripe == true ? true : false;
60228
+ }
60229
+ return false;
60230
+ });
60231
+ /**
60232
+ * 单元格内容过长时是否显示为省略号
60233
+ */
60234
+ __publicField2(this, "getShowOverflow", () => {
60235
+ if (this.props.option.setting) {
60236
+ return this.utilities.isNull(this.props.option.setting.showOverflow) ? true : this.props.option.setting.showOverflow;
60237
+ }
60238
+ return true;
60239
+ });
60240
+ /**
60241
+ * 显示标题
60242
+ * @returns
60243
+ */
60244
+ __publicField2(this, "getShowHeader", () => {
60245
+ if (this.props.option.setting) {
60246
+ return this.props.option.setting.showHeader;
60247
+ }
60248
+ return true;
60249
+ });
60250
+ /**
60251
+ * 显示表尾
60252
+ * @returns
60253
+ */
60254
+ __publicField2(this, "getShowFooter", () => {
60255
+ if (this.props.option.setting) {
60256
+ return this.props.option.setting.showFooter;
60257
+ }
60258
+ return false;
60259
+ });
60260
+ /**
60261
+ * 行附加 className
60262
+ * @returns
60263
+ */
60264
+ __publicField2(this, "getRowClassName", () => {
60265
+ if (this.props.option.setting) {
60266
+ return this.props.option.setting.rowClassName;
60267
+ }
60268
+ return "";
60269
+ });
60270
+ /**
60271
+ * 单元格附加 className
60272
+ * @returns
60273
+ */
60274
+ __publicField2(this, "getCellClassName", () => {
60275
+ if (this.props.option.setting) {
60276
+ return this.props.option.setting.cellClassName;
60277
+ }
60278
+ return "";
60279
+ });
60280
+ /**
60281
+ * 启用双击展开行
60282
+ * @returns
60283
+ */
60284
+ __publicField2(this, "getDblClickToggleTreeExpand", () => {
60285
+ if (this.props.option.setting) {
60286
+ return this.props.option.setting.dblClickToggleTreeExpand == true;
60287
+ }
60288
+ return false;
60289
+ });
60290
+ /**
60291
+ * 获取表格编辑配置
60292
+ * @returns
60293
+ */
60294
+ __publicField2(this, "getEditConfig", () => {
60295
+ return this.utilities.isNull(this.props.option.setting) ? {} : this.props.option.setting.editConfig;
60296
+ });
60297
+ /**
60298
+ * 获取行配置
60299
+ * @returns
60300
+ */
60301
+ __publicField2(this, "getRowConfig", () => {
60302
+ let defaultConfig2 = {
60303
+ height: 48
60304
+ };
60305
+ return this.utilities.isNull(this.props.option.setting) ? {} : Object.assign(defaultConfig2, this.props.option.setting.rowConfig, {});
60306
+ });
60307
+ /**
60308
+ * 获取右键菜单配置
60309
+ */
60310
+ __publicField2(this, "getMenuConfig", () => {
60311
+ return this.utilities.isNull(this.props.option.setting) ? {} : this.props.option.setting.menuConfig;
60312
+ });
60313
+ /**
60314
+ * 获取表头筛选配置
60315
+ */
60316
+ __publicField2(this, "getFilterConfig", () => {
60317
+ let defaultFilterConfig = { remote: true };
60318
+ let propFilterConfig = this.props.option.setting ? this.props.option.setting.filterConfig : {};
60319
+ propFilterConfig = propFilterConfig ? propFilterConfig : {};
60320
+ return this.utilities.isNull(this.props.option.setting) ? defaultFilterConfig : Object.assign(defaultFilterConfig, propFilterConfig);
60321
+ });
60322
+ /**
60323
+ * 获取复选框配置项
60324
+ */
60325
+ __publicField2(this, "getCheckboxConfig", () => {
60326
+ return this.utilities.isNull(this.props.option.setting) ? {} : this.props.option.setting.checkboxConfig;
60327
+ });
60328
+ /**
60329
+ * 校验规则配置项
60330
+ * @returns
60331
+ */
60332
+ __publicField2(this, "getEditRules", () => {
60333
+ return this.utilities.isNull(this.props.option.setting) ? {} : this.props.option.setting.editRules;
60334
+ });
60335
+ /**
60336
+ * 获取树配置
60337
+ * @returns
60338
+ */
60339
+ __publicField2(this, "getTreeConfig", () => {
60340
+ const treeConfig = this.utilities.isNull(this.props.option.setting) ? {} : this.props.option.setting.isTree ? Object.assign({ transform: true, rowField: "Id", parentField: "PId" }, this.props.option.setting.treeConfig) : {};
60341
+ return treeConfig;
60342
+ });
60343
+ /**
60344
+ * 获取是否树表
60345
+ * @returns
60346
+ */
60347
+ __publicField2(this, "getIsTree", () => {
60348
+ return this.utilities.isNull(this.props.option.setting) ? false : this.props.option.setting.isTree;
60349
+ });
60350
+ /**
60351
+ * 获取是否分页
60352
+ * @returns
60353
+ */
60354
+ __publicField2(this, "getIsPagination", () => {
60355
+ return this.utilities.isNull(this.props.option.setting) ? false : this.props.option.setting.isPagination;
60356
+ });
60357
+ /**
60358
+ * 获取每页条数
60359
+ * @returns
60360
+ */
60361
+ __publicField2(this, "crudTable", ref());
60362
+ __publicField2(this, "getPageSize", () => {
60363
+ let pagesize = 25;
60364
+ if (this.getPageConfig("showSizer", false)) {
60365
+ const pageSizeOpts = this.getPageConfig("pageSizeOpts", [25, 50, 100]);
60366
+ if (Array.isArray(pageSizeOpts) && pageSizeOpts.length > 0) {
60367
+ pagesize = pageSizeOpts[0];
60368
+ }
60369
+ } else {
60370
+ if (this.crudTable.value && this.crudTable.value.clientHeight > 0) {
60371
+ let height = this.crudTable.value.clientHeight / 40;
60372
+ pagesize = parseInt(height);
60373
+ }
60374
+ }
60375
+ return this.utilities.isNull(this.props.option.setting) || this.utilities.isNull(this.props.option.setting.pageSize) ? pagesize : this.props.option.setting.pageSize;
60376
+ });
60377
+ /**
60378
+ * 获取分页配置属性
60379
+ * @returns
60380
+ */
60381
+ __publicField2(this, "getPageConfig", (propName, defaultValue) => {
60382
+ return this.props.option.setting && this.props.option.setting.pageConfig && !this.utilities.isNull(this.props.option.setting.pageConfig[propName]) ? this.props.option.setting.pageConfig[propName] : defaultValue;
60383
+ });
60384
+ /**
60385
+ * 获取合并单元格配置
60386
+ */
60387
+ __publicField2(this, "getMergeCells", () => {
60388
+ var _a;
60389
+ return this.props.option.setting && ((_a = this.props.option.setting) == null ? void 0 : _a.mergeCells);
60390
+ });
60391
+ //#endregion 获取表格配置 setting End
60392
+ //#region 加载数据
60393
+ // 私有属性 | private
60394
+ /**
60395
+ * 加载数据Function
60396
+ */
60397
+ __publicField2(this, "readFunction");
60398
+ // 响应属性 | ref、reactive、computed、watch
60399
+ /**
60400
+ * 表格数据
60401
+ */
60402
+ __publicField2(this, "datas", ref([]));
60403
+ /**
60404
+ * 表尾数据
60405
+ */
60406
+ __publicField2(this, "footerData", ref([]));
60407
+ /**
60408
+ * 页码
60409
+ */
60410
+ __publicField2(this, "pageIndex", ref(1));
60411
+ /**
60412
+ * 上一次页码
60413
+ */
60414
+ __publicField2(this, "pageIndexBefore", ref(1));
60415
+ /**
60416
+ * 总页数
60417
+ */
60418
+ __publicField2(this, "total", ref(0));
60419
+ /**
60420
+ * 是否加载数据
60421
+ */
60422
+ __publicField2(this, "loadDataing", ref(false));
60423
+ /**
60424
+ * 查询配置构造器
60425
+ */
60426
+ __publicField2(this, "queryWrapper", ref(void 0));
60427
+ /**
60428
+ * 初始查询条件
60429
+ */
60430
+ __publicField2(this, "defaultqueryWrapper", null);
60431
+ /**
60432
+ * 设置数据
60433
+ * @param data
60434
+ */
60435
+ __publicField2(this, "setDatas", (data2) => {
60436
+ let _datas = [];
60437
+ if (this.getIsPagination()) {
60438
+ _datas = data2 && data2.Datas ? data2.Datas : [];
60439
+ this.total.value = data2 && data2.TotalItemCount ? data2.TotalItemCount : 0;
60440
+ } else {
60441
+ _datas = data2;
60442
+ }
60443
+ this.datas.value = _datas;
60444
+ nextTick(() => {
60445
+ if (!this.xTable.value) {
60446
+ return;
60447
+ }
60448
+ if (this.props.option.setting && this.props.option.setting.isTree && this.props.option.setting.treeConfig && this.props.option.setting.treeConfig.expandAll) {
60449
+ this.xTable.value.setAllTreeExpand(true);
60450
+ }
60451
+ if (this.props.option.setting && this.props.option.setting.rowConfig && this.props.option.setting.rowConfig.isCurrent && this.datas.value.length > 0) {
60452
+ this.setCurrentRow(this.datas.value[0]);
60453
+ }
60454
+ if (!this.utilities.isNull(this.props.option.event) && !this.utilities.isNull(this.props.option.event.event_loaded)) {
60455
+ this.props.option.event.event_loaded(this.datas.value);
60456
+ }
60457
+ });
60458
+ });
60459
+ /**
60460
+ * 组织查询参数
60461
+ * @returns
60462
+ */
60463
+ __publicField2(this, "getLoadDataOptions", () => {
60464
+ return {
60465
+ isPagination: this.getIsPagination(),
60466
+ page: this.pageIndex.value,
60467
+ pageSize: this.getPageSize(),
60468
+ queryWrapper: this.queryWrapper.value,
60469
+ success: this.setDatas
60470
+ };
60471
+ });
60472
+ /**
60473
+ * 加载数据
60474
+ * @param _readFunction
60475
+ */
60476
+ __publicField2(this, "loadData", async (_readFunction) => {
60477
+ this.readFunction = _readFunction;
60478
+ this.loadDataing.value = true;
60479
+ await this.readFunction(this.getLoadDataOptions());
60480
+ this.loadDataing.value = false;
60481
+ });
60482
+ /**
60483
+ * 加载数据
60484
+ * @param _queryWrapper
60485
+ */
60486
+ __publicField2(this, "loadDataByQuery", (_queryWrapper) => {
60487
+ if (this.utilities.isNull(this.props.option.api)) {
60488
+ this.message.error("未绑定Api");
60489
+ } else {
60490
+ this.queryWrapper.value = _queryWrapper;
60491
+ this.defaultqueryWrapper = this.utilities.deepCopy(_queryWrapper.getQuerys());
60492
+ this.loadData(async (options2) => {
60493
+ 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);
60494
+ const result = this.utilities.parseApiResult(apiResult);
60495
+ options2.success(result);
60496
+ });
60497
+ }
60498
+ });
60499
+ __publicField2(this, "headerFilterParam", {});
60500
+ /**
60501
+ * 加载表头筛选数据--组件自带默认方法
60502
+ * @param _queryWrapper
60503
+ */
60504
+ __publicField2(this, "loadDataByHeaderFilterDefault", async (filterParam) => {
60505
+ if (this.utilities.isNull(this.props.option.api)) {
60506
+ this.message.error("未绑定Api");
60507
+ } else {
60508
+ this.headerFilterParam = filterParam;
60509
+ let _queryWrapper = this.loadHeaderFilter(filterParam);
60510
+ this.loadDataByHeaderFilter(_queryWrapper);
60511
+ }
60512
+ });
60513
+ /**
60514
+ * 获取表头筛选查询条件
60515
+ * @param filterParam
60516
+ */
60517
+ __publicField2(this, "loadHeaderFilter", (filterParam) => {
60518
+ var _a, _b;
60519
+ let _queryWrapper = QueryWrapper.create();
60520
+ if (this.defaultqueryWrapper) {
60521
+ _queryWrapper.querys = this.utilities.deepCopy(this.defaultqueryWrapper);
60522
+ }
60523
+ for (const key2 in filterParam) {
60524
+ let filterconfig = (_a = this.props.option.columns) == null ? void 0 : _a.filter((e) => e.filter).find((e) => e.field == key2);
60525
+ let value = filterParam[key2];
60526
+ switch ((_b = filterconfig == null ? void 0 : filterconfig.filter) == null ? void 0 : _b.type) {
60527
+ case "input":
60528
+ _queryWrapper.like(key2, value);
60529
+ break;
60530
+ case "select":
60531
+ if ((filterconfig == null ? void 0 : filterconfig.filter.multiple) === false) {
60532
+ _queryWrapper.eq(key2, value);
60533
+ } else {
60534
+ _queryWrapper.in(key2, value);
60535
+ }
60536
+ break;
60537
+ case "select":
60538
+ if ((filterconfig == null ? void 0 : filterconfig.filter.multiple) === false) {
60539
+ _queryWrapper.eq(key2, value);
60540
+ } else {
60541
+ _queryWrapper.in(key2, value);
60542
+ }
60543
+ break;
60544
+ case "daterange":
60545
+ let startDate = this.utilities.format(value[0], "yyyy-MM-DD");
60546
+ let EndDate = this.utilities.format(value[1], "yyyy-MM-DD");
60547
+ _queryWrapper.between(`date_format(${key2},'%Y-%m-%d')`, startDate, EndDate);
60548
+ break;
60549
+ case "numberrange":
60550
+ if (!this.utilities.isNull(value[0])) {
60551
+ _queryWrapper.ge(key2, Number(value[0]));
60552
+ }
60553
+ if (!this.utilities.isNull(value[1])) {
60554
+ _queryWrapper.le(key2, Number(value[1]));
60555
+ }
60556
+ break;
60557
+ default:
60558
+ _queryWrapper.eq(key2, value);
60559
+ break;
60560
+ }
60561
+ }
60562
+ return _queryWrapper;
60563
+ });
60564
+ /**
60565
+ * 加载表头筛选数据
60566
+ * @param _queryWrapper
60567
+ */
60568
+ __publicField2(this, "loadDataByHeaderFilter", async (_queryWrapper) => {
60569
+ this.queryWrapper.value = _queryWrapper;
60570
+ let options2 = this.getLoadDataOptions();
60571
+ this.loadDataing.value = true;
60572
+ const apiResult = options2.isPagination ? await this.props.option.api.getEntitiesPageDynamic(options2.page, options2.pageSize, _queryWrapper) : await this.props.option.api.getEntitiesDynamic(_queryWrapper);
60573
+ const result = this.utilities.parseApiResult(apiResult);
60574
+ options2.success(result);
60575
+ this.loadDataing.value = false;
60576
+ });
60577
+ /**
60578
+ * 刷新数据
60579
+ */
60580
+ __publicField2(this, "refreshData", async () => {
60581
+ const $table = this.xTable.value;
60582
+ $table.clearFilter();
60583
+ if (!this.utilities.isNull(this.readFunction)) {
60584
+ let _queryWrapper = QueryWrapper.create();
60585
+ if (this.defaultqueryWrapper) {
60586
+ _queryWrapper.querys = this.utilities.deepCopy(this.defaultqueryWrapper);
60587
+ }
60588
+ this.queryWrapper.value = _queryWrapper;
60589
+ this.loadDataing.value = true;
60590
+ await this.readFunction(this.getLoadDataOptions());
60591
+ this.loadDataing.value = false;
60592
+ } else {
60593
+ for (const data2 of this.datas.value) {
60594
+ delete data2.children;
60595
+ }
60596
+ $table.reloadData(this.datas.value);
60597
+ }
60598
+ });
60599
+ /**
60600
+ * 页码改变
60601
+ */
60602
+ __publicField2(this, "doPageChange", async (data2) => {
60603
+ nextTick(async () => {
60604
+ if (this.props.option.event && this.props.option.event.event_pageChangeBefore) {
60605
+ if (!this.props.option.event.event_pageChangeBefore()) {
60606
+ this.setPageIndex(this.pageIndexBefore.value);
60607
+ return;
60608
+ } else {
60609
+ this.setPageIndex(data2);
60610
+ }
60611
+ }
60612
+ if (!this.utilities.isNull(this.readFunction)) {
60613
+ this.loadDataing.value = true;
60614
+ await this.readFunction(this.getLoadDataOptions());
60615
+ this.loadDataing.value = false;
60616
+ }
60617
+ });
60618
+ });
60619
+ __publicField2(this, "doPageSizeChange", async (data2) => {
60620
+ nextTick(async () => {
60621
+ if (this.props.option.event && this.props.option.event.event_pageChangeBefore) {
60622
+ if (!this.props.option.event.event_pageChangeBefore()) {
60623
+ this.setPageIndex(this.pageIndexBefore.value);
60624
+ return;
60625
+ }
60626
+ }
60627
+ this.setPageSize(data2);
60628
+ this.setPageIndex(1);
60629
+ if (!this.utilities.isNull(this.readFunction)) {
60630
+ this.loadDataing.value = true;
60631
+ await this.readFunction(this.getLoadDataOptions());
60632
+ this.loadDataing.value = false;
60633
+ }
60634
+ });
60635
+ });
60636
+ //#endregion 加载数据 End
60637
+ //#region 工具栏及默认事件
60638
+ /**
60639
+ * 工具栏是否显示为按钮组
60640
+ */
60641
+ __publicField2(this, "isButtonGroup", ref());
60642
+ __publicField2(this, "maxShow", ref(2));
60643
+ /**
60644
+ * 判断是否有工具栏
60645
+ * @returns
60646
+ */
60647
+ __publicField2(this, "hasToolbar", () => {
60648
+ if (this.utilities.isNull(this.props.option.toolbars) || this.props.option.toolbars.length === 0) {
60649
+ return false;
60650
+ }
60651
+ return this.props.option.toolbars.some((e) => {
60652
+ return e.isShow == void 0 || (typeof e.isShow == "function" ? e.isShow() : e.isShow);
60653
+ });
60654
+ });
60655
+ /**
60656
+ * 判断是否有右侧工具栏
60657
+ * @returns
60658
+ */
60659
+ __publicField2(this, "hasRightToolbar", () => {
60660
+ if (this.utilities.isNull(this.props.option.rightToolbars) || this.props.option.rightToolbars.length === 0) {
60661
+ return false;
60662
+ }
60663
+ return this.props.option.rightToolbars.some((e) => {
60664
+ return e.isShow == void 0 || (typeof e.isShow == "function" ? e.isShow() : e.isShow);
60665
+ });
60666
+ });
60667
+ /**
60668
+ * 是否有分割线
60669
+ * @returns
60670
+ */
60671
+ __publicField2(this, "hasDivider", () => {
60672
+ return this.hasToolbar() && this.ctx.slots.default != void 0;
60673
+ });
60674
+ /**
60675
+ * 标题 Divider
60676
+ * @returns
60677
+ */
60678
+ __publicField2(this, "hasTitleDivider", () => {
60679
+ return this.hasToolbar() && this.hasTitle();
60680
+ });
60681
+ /**
60682
+ * 是否有标题
60683
+ * @returns
60684
+ */
60685
+ __publicField2(this, "hasTitle", () => {
60686
+ return !this.utilities.isNull(this.props.title);
60687
+ });
60688
+ /**
60689
+ * 设置工具栏按钮默认值
60690
+ * @param toolbars
60691
+ */
60692
+ __publicField2(this, "settingToolbarDefault", (toolbars) => {
60693
+ if (this.utilities.isNull(toolbars)) {
60694
+ return;
60695
+ }
60696
+ for (const item2 of toolbars) {
60697
+ switch (item2.name) {
60698
+ case "add":
60699
+ if (this.utilities.isNull(item2.onclick)) {
60700
+ item2.onclick = () => {
60701
+ this.doInsert();
60702
+ };
60703
+ }
60704
+ if (this.utilities.isNull(item2.icon)) {
60705
+ item2.icon = "md-add";
60706
+ }
60707
+ if (this.utilities.isNull(item2.type)) {
60708
+ item2.type = "primary";
60709
+ }
60710
+ if (this.utilities.isNull(item2.text)) {
60711
+ item2.text = "新增";
60712
+ }
60713
+ break;
60714
+ case "save":
60715
+ if (this.utilities.isNull(item2.onclick)) {
60716
+ item2.onclick = () => {
60717
+ this.doSave();
60718
+ };
60719
+ }
60720
+ if (this.utilities.isNull(item2.type)) {
60721
+ item2.type = "primary";
60722
+ }
60723
+ if (this.utilities.isNull(item2.icon)) {
60724
+ item2.icon = "md-checkmark";
60725
+ }
60726
+ if (this.utilities.isNull(item2.text)) {
60727
+ item2.text = "保存";
60728
+ }
60729
+ break;
60730
+ case "refresh":
60731
+ item2.isShow = () => {
60732
+ return !window["rightRefreshIsHide"];
60733
+ };
60734
+ if (this.utilities.isNull(item2.onclick)) {
60735
+ item2.onclick = () => {
60736
+ this.doRefresh();
60737
+ };
60738
+ }
60739
+ if (this.utilities.isNull(item2.icon)) {
60740
+ item2.icon = "md-refresh";
60741
+ }
60742
+ if (this.utilities.isNull(item2.text)) {
60743
+ item2.text = "刷新";
60744
+ }
60745
+ break;
60746
+ case "exportexcel":
60747
+ if (this.utilities.isNull(item2.onclick)) {
60748
+ item2.onclick = () => {
60749
+ this.doExportExcel();
60750
+ };
60751
+ }
60752
+ if (this.utilities.isNull(item2.type)) {
60753
+ item2.type = "primary";
60754
+ }
60755
+ if (this.utilities.isNull(item2.icon)) {
60756
+ item2.icon = "md-share-alt";
60757
+ }
60758
+ if (this.utilities.isNull(item2.text)) {
60759
+ item2.text = "导出";
60760
+ }
60761
+ break;
60762
+ }
60763
+ }
60764
+ });
60765
+ __publicField2(this, "getIsShowButton", (btn) => {
60766
+ let isshow = true;
60767
+ if (this.utilities.isNull(btn.isShow)) {
60768
+ isshow = true;
60769
+ } else {
60770
+ if (typeof btn.isShow == "boolean") {
60771
+ isshow = btn.isShow;
60772
+ } else {
60773
+ isshow = btn.isShow();
60774
+ }
60775
+ }
60776
+ return isshow;
60777
+ });
60778
+ /**
60779
+ * 获取添加的数据
60780
+ * @param row
60781
+ * @returns
60782
+ */
60783
+ __publicField2(this, "getAddData", (row) => {
60784
+ let record = Object.assign(
60785
+ {
60786
+ Id: -1 * (Date.now() - parseInt((Date.now() + "").substring(0, 4) + "000000000")),
60787
+ RootId: row.RootId,
60788
+ NodeLevel: row.NodeLevel + 1,
60789
+ FakeId: this.utilities.getUniqueCode(),
60790
+ FakePId: null
60791
+ },
60792
+ this.getDefaultValues()
60793
+ );
60794
+ this.intoGloablValue(record);
60795
+ if (row.Id > 0) {
60796
+ record.PId = row.Id;
60797
+ record.ParentPath = row.ParentPath + row.Id + "/";
60798
+ } else {
60799
+ record.PId = row.Id;
60800
+ record.FakePId = row.FakeId;
60801
+ }
60802
+ record = this.runEventAddRowBefore(record, row);
60803
+ return record;
60804
+ });
60805
+ /**
60806
+ * 执行新增孩子节点
60807
+ * @param row
60808
+ */
60809
+ __publicField2(this, "doAddChild", async (row) => {
60810
+ const $table = this.xTable.value;
60811
+ let record = Object.assign(
60812
+ {
60813
+ Id: -1 * (Date.now() - parseInt((Date.now() + "").substring(0, 4) + "000000000")),
60814
+ RootId: row.RootId,
60815
+ NodeLevel: row.NodeLevel + 1,
60816
+ FakeId: this.utilities.getUniqueCode(),
60817
+ FakePId: null
60818
+ },
60819
+ this.getDefaultValues()
60820
+ );
60821
+ this.intoGloablValue(record);
60822
+ if (row.Id > 0) {
60823
+ record.PId = row.Id;
60824
+ record.ParentPath = row.ParentPath + row.Id + "/";
60825
+ } else {
60826
+ record.PId = row.Id;
60827
+ record.FakePId = row.FakeId;
60828
+ }
60829
+ record = this.runEventAddRowBefore(record, row);
60830
+ const { row: newRow } = await $table.insert(record);
60831
+ await $table.setTreeExpand(row, true);
60832
+ await $table.setEditRow(newRow);
60833
+ this.updateTableSize();
60834
+ });
60835
+ /**
60836
+ * 执行添加节点
60837
+ */
60838
+ __publicField2(this, "doInsert", async () => {
60839
+ const $table = this.xTable.value;
60840
+ let record = Object.assign(
60841
+ {
60842
+ Id: -1 * (Date.now() - parseInt((Date.now() + "").substring(0, 4) + "000000000"))
60843
+ },
60844
+ this.getDefaultValues()
60845
+ );
60846
+ this.intoGloablValue(record);
60847
+ if (this.getIsTree()) {
60848
+ record.FakeId = this.utilities.getUniqueCode();
60849
+ record.FakePId = null;
60850
+ record.PId = 0;
60851
+ record.RootId = 0;
60852
+ record.NodeLevel = 1;
60853
+ record.ParentPath = "/";
60854
+ }
60855
+ record = this.runEventAddRowBefore(record, void 0);
60856
+ const { row: newRow } = await $table.insertAt(record, void 0);
60857
+ await $table.setEditRow(newRow);
60858
+ this.updateTableSize();
60859
+ });
60860
+ /**
60861
+ * 执行保存数据
60862
+ * @returns
60863
+ */
60864
+ __publicField2(this, "doSave", async () => {
60865
+ if (this.utilities.isNull(this.props.option.api)) {
60866
+ this.message.error("未绑定Api");
60867
+ return;
60868
+ }
60869
+ const saveDatas = this.getSaveDatas();
60870
+ if (saveDatas.length == 0) {
60871
+ this.message.warning("没有需要保存的数据");
60872
+ return;
60873
+ }
60874
+ if (this.props.option.event && this.props.option.event.event_saveBefore && !this.props.option.event.event_saveBefore(saveDatas)) {
60875
+ return;
60876
+ }
60877
+ if (!await this.validate()) {
60878
+ this.message.warning("校验失败!");
60879
+ return;
60880
+ }
60881
+ this.loadDataing.value = true;
60882
+ const apiResult = this.getIsTree() ? await this.props.option.api.saveTree(saveDatas) : await this.props.option.api.saves(saveDatas);
60883
+ const result = this.utilities.parseApiResult(apiResult);
60884
+ this.loadDataing.value = false;
60885
+ if (result > 0) {
60886
+ this.message.info("保存成功");
60887
+ this.doRefresh();
60888
+ } else {
60889
+ this.message.warning("保存失败");
60890
+ }
60891
+ if (this.props.option.event && this.props.option.event.event_saveAfter) {
60892
+ this.props.option.event.event_saveAfter(saveDatas, result);
60893
+ }
60894
+ });
60895
+ /**
60896
+ * 执行刷新
60897
+ */
60898
+ __publicField2(this, "doRefresh", () => {
60899
+ this.refreshData();
60900
+ });
60901
+ /**
60902
+ * 执行删除
60903
+ * @param row
60904
+ */
60905
+ __publicField2(this, "doDelete", (row) => {
60906
+ var _a;
60907
+ let doDelMsgKeyCol = (_a = this.props.option.columns) == null ? void 0 : _a.find((e) => e["isDelKey"]);
60908
+ let doDelMsgKey = doDelMsgKeyCol ? doDelMsgKeyCol.field : "";
60909
+ this.modal.confirm({
60910
+ title: "提示",
60911
+ content: `数据删除后不可恢复, 确定要删除${doDelMsgKey ? `【` + row[doDelMsgKey] + `】` : "该数据"}吗?`,
60912
+ onOk: async () => {
60913
+ if (this.utilities.isNull(row.Id)) {
60914
+ return;
60915
+ }
60916
+ if (row.Id <= 0) {
60917
+ this.xTable.value.remove(row);
60918
+ return;
60919
+ }
60920
+ if (this.utilities.isNull(this.props.option.api)) {
60921
+ this.message.error("未绑定Api");
60922
+ return;
60923
+ }
60924
+ const apiResult = await this.props.option.api.delete(row.Id);
60925
+ if (apiResult.code == 200) {
60926
+ this.message.success("删除成功!");
60927
+ this.refreshData();
60928
+ } else {
60929
+ this.message.error(`删除失败,${apiResult.msg}.`);
60930
+ }
60931
+ if (this.props.option.event && this.props.option.event.event_deleteAfter) {
60932
+ this.props.option.event.event_deleteAfter(row.Id, apiResult, row);
60933
+ }
60934
+ }
60935
+ });
60936
+ });
60937
+ /**
60938
+ * 导出excel
60939
+ */
60940
+ __publicField2(this, "doExportExcel", () => {
60941
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
60942
+ let datas = this.getDatas();
60943
+ let exportColumns = [];
60944
+ if ((_b = (_a = this.props.option.setting) == null ? void 0 : _a.exportExcelConfig) == null ? void 0 : _b.excelHeader) {
60945
+ exportColumns = (_c = this.props.option.columns) == null ? void 0 : _c.filter((e) => {
60946
+ var _a2, _b2, _c2;
60947
+ return (_c2 = (_b2 = (_a2 = this.props.option.setting) == null ? void 0 : _a2.exportExcelConfig) == null ? void 0 : _b2.excelHeader) == null ? void 0 : _c2.includes(e["title"]);
60948
+ });
60949
+ } else {
60950
+ exportColumns = (_d = this.props.option.columns) == null ? void 0 : _d.filter((e) => e["visible"] != false && !e.rowButtons);
60951
+ }
60952
+ let headers = exportColumns == null ? void 0 : exportColumns.map((e) => {
60953
+ return e.title ? e.title : e.colType == "seq" ? "序号" : "";
60954
+ });
60955
+ let contents = datas.map((e, index2) => {
60956
+ return exportColumns == null ? void 0 : exportColumns.map((x) => {
60957
+ return e[x.field] ? e[x.field] : x.colType == "seq" ? index2 + 1 : "";
60958
+ });
60959
+ });
60960
+ let exDatas = (_e = [headers]) == null ? void 0 : _e.concat(contents);
60961
+ let gridmergecells = (_f = this.xTable.value) == null ? void 0 : _f.getMergeCells();
60962
+ let merges = gridmergecells == null ? void 0 : gridmergecells.map((e) => {
60963
+ return {
60964
+ s: { r: e.row + 1, c: e.col },
60965
+ e: { r: e.row + 1 + (e.rowspan - 1), c: e.col + e.colspan - 1 }
60966
+ };
60967
+ });
60968
+ let setStyle2;
60969
+ if ((_h = (_g = this.props.option.setting) == null ? void 0 : _g.exportExcelConfig) == null ? void 0 : _h.setStyle) {
60970
+ setStyle2 = (_j = (_i = this.props.option.setting) == null ? void 0 : _i.exportExcelConfig) == null ? void 0 : _j.setStyle;
60971
+ } else {
60972
+ setStyle2 = (ws) => {
60973
+ for (const key2 in ws) {
60974
+ if (ws[key2] && typeof ws[key2] == "object") {
60975
+ ws[key2].s = {
60976
+ border: {
60977
+ //添加边框
60978
+ bottom: {
60979
+ style: "thin",
60980
+ color: "000000"
60981
+ },
60982
+ left: {
60983
+ style: "thin",
60984
+ color: "000000"
60985
+ },
60986
+ right: {
60987
+ style: "thin",
60988
+ color: "000000"
60989
+ },
60990
+ top: {
60991
+ style: "thin",
60992
+ color: "000000"
60993
+ }
60994
+ },
60995
+ //字体水平居中、垂直居中、自动换行、缩进
60996
+ alignment: {
60997
+ horizontal: "center",
60998
+ //水平居中
60999
+ vertical: "center",
61000
+ wrapText: 1,
61001
+ indent: 0
61002
+ },
61003
+ //字体类型、大小、是否加粗
61004
+ font: {
61005
+ //字体
61006
+ name: "宋体",
61007
+ sz: 12,
61008
+ bold: false
61009
+ }
61010
+ };
61011
+ }
61012
+ }
61013
+ };
61014
+ }
61015
+ let fileName = this.utilities.getCurrentDate("YYYY-MM-DD");
61016
+ if ((_l = (_k = this.props.option.setting) == null ? void 0 : _k.exportExcelConfig) == null ? void 0 : _l.fileName) {
61017
+ if (typeof ((_n = (_m = this.props.option.setting) == null ? void 0 : _m.exportExcelConfig) == null ? void 0 : _n.fileName) == "function") {
61018
+ fileName = (_p = (_o = this.props.option.setting) == null ? void 0 : _o.exportExcelConfig) == null ? void 0 : _p.fileName();
61019
+ } else {
61020
+ fileName = (_r = (_q = this.props.option.setting) == null ? void 0 : _q.exportExcelConfig) == null ? void 0 : _r.fileName;
61021
+ }
61022
+ }
61023
+ new ExcelHelper().downloadExcelAndSetStyle(exDatas, fileName + ".xlsx", merges, setStyle2);
61024
+ });
61025
+ /**
61026
+ * 河北项目需求---右侧刷新按钮改为和工具栏放一起
61027
+ * @returns
61028
+ */
61029
+ __publicField2(this, "getRefreshBtn", () => {
61030
+ var _a;
61031
+ if (!window["rightRefreshIsHide"]) {
61032
+ return null;
61033
+ } else {
61034
+ return (_a = this.props.option.rightToolbars) == null ? void 0 : _a.find((x) => x.name == "refresh");
61035
+ }
61036
+ });
61037
+ //#endregion 工具栏及默认事件 End
61038
+ //#region 公开方法
61039
+ /**
61040
+ * 获取元素数据
61041
+ * @returns
61042
+ */
61043
+ __publicField2(this, "getDatas", () => {
61044
+ return this.datas.value;
61045
+ });
61046
+ /**
61047
+ * 获取数据
61048
+ * @returns
61049
+ */
61050
+ __publicField2(this, "getNewDatas", () => {
61051
+ return this.xTable.value.getTableData().fullData;
61052
+ });
61053
+ /**
61054
+ * 获取复选框选中的数据
61055
+ * @returns
61056
+ */
61057
+ __publicField2(this, "getCheckboxDatas", () => {
61058
+ return this.xTable.value.getCheckboxRecords();
61059
+ });
61060
+ /**
61061
+ * 获取当前记录行
61062
+ * @returns
61063
+ */
61064
+ __publicField2(this, "getCurrentRecord", () => {
61065
+ return this.xTable.value.getCurrentRecord();
61066
+ });
61067
+ /**
61068
+ * 获取需要保存的数据
61069
+ * @returns
61070
+ */
61071
+ __publicField2(this, "getSaveDatas", () => {
61072
+ const $table = this.xTable.value;
61073
+ const { insertRecords, updateRecords } = $table.getRecordset();
61074
+ for (const item2 of updateRecords) {
61075
+ this.intoGloablValue(item2);
61076
+ }
61077
+ const saveDatas = [...JSON.parse(JSON.stringify(insertRecords)), ...JSON.parse(JSON.stringify(updateRecords))];
61078
+ return saveDatas;
61079
+ });
61080
+ /**
61081
+ * 获取XTable
61082
+ * @returns
61083
+ */
61084
+ __publicField2(this, "getXTable", () => {
61085
+ return this.xTable.value;
61086
+ });
61087
+ /**
61088
+ * 设置当前页
61089
+ * @param pageIndex
61090
+ */
61091
+ __publicField2(this, "setPageIndex", (pageIndex) => {
61092
+ this.pageIndex.value = pageIndex;
61093
+ this.pageIndexBefore.value = pageIndex;
61094
+ });
61095
+ /**
61096
+ * 获取当前页
61097
+ * @returns
61098
+ */
61099
+ __publicField2(this, "getPageIndex", () => {
61100
+ return this.pageIndex.value;
61101
+ });
61102
+ /**
61103
+ * 重新计算页
61104
+ * @param deleteNumber
61105
+ */
61106
+ __publicField2(this, "reCalcPageIndex", (deleteNumber) => {
61107
+ const datas = this.datas.value;
61108
+ if (datas.length - deleteNumber <= 0) {
61109
+ this.pageIndex.value--;
61110
+ }
61111
+ if (this.pageIndex.value <= 0) {
61112
+ this.pageIndex.value = 1;
61113
+ }
61114
+ });
61115
+ /**
61116
+ * 设置每页尺寸
61117
+ * @param pageSize
61118
+ */
61119
+ __publicField2(this, "setPageSize", (pageSize) => {
61120
+ this.props.option.setting.pageSize = pageSize;
61121
+ });
61122
+ /**
61123
+ * 移除行
61124
+ * @param row
61125
+ */
61126
+ __publicField2(this, "removeRow", (row) => {
61127
+ this.xTable.value.remove(row);
61128
+ });
61129
+ /**
61130
+ * 添加行
61131
+ * @param row
61132
+ */
61133
+ __publicField2(this, "addRow", async (row) => {
61134
+ const $table = this.xTable.value;
61135
+ let record = Object.assign(
61136
+ {
61137
+ Id: -1 * (Date.now() - parseInt((Date.now() + "").substring(0, 4) + "000000000"))
61138
+ },
61139
+ this.getDefaultValues(),
61140
+ row
61141
+ );
61142
+ this.intoGloablValue(record);
61143
+ record = this.runEventAddRowBefore(record, row);
61144
+ await $table.insert(record);
61145
+ this.updateTableSize();
61146
+ });
61147
+ /**
61148
+ * 修改行
61149
+ */
61150
+ __publicField2(this, "updateRow", async (rowId, data2) => {
61151
+ const $table = this.xTable.value;
61152
+ const row = $table.getRowById(rowId);
61153
+ for (const key2 in data2) {
61154
+ row[key2] = data2[key2];
61155
+ }
61156
+ this.updateTableSize();
61157
+ await $table.setEditRow(row);
61158
+ $table.clearEdit();
61159
+ });
61160
+ /**
61161
+ * 编辑校验
61162
+ * @returns
61163
+ */
61164
+ __publicField2(this, "validate", async () => {
61165
+ const $table = this.xTable.value;
61166
+ if ($table) {
61167
+ const errMap = await $table.validate();
61168
+ if (errMap) {
61169
+ return false;
61170
+ } else {
61171
+ return true;
61172
+ }
61173
+ } else {
61174
+ return false;
61175
+ }
61176
+ });
61177
+ /**
61178
+ * 修改表头筛选列的选项
61179
+ * @param field 列字段名
61180
+ * @param options 筛选项
61181
+ */
61182
+ __publicField2(this, "setFilter", (field, options2) => {
61183
+ this.xTable.value.setFilter(field, options2);
61184
+ });
61185
+ /**
61186
+ * 表尾数据赋值
61187
+ * @param datas
61188
+ */
61189
+ __publicField2(this, "setFooterData", (datas) => {
61190
+ this.footerData.value = datas;
61191
+ });
61192
+ /**
61193
+ * 临时合并单元格
61194
+ * @param mergeCells
61195
+ */
61196
+ __publicField2(this, "setMergeCells", (mergeCells) => {
61197
+ var _a;
61198
+ (_a = this.xTable.value) == null ? void 0 : _a.setMergeCells(mergeCells);
61199
+ });
61200
+ /**
61201
+ * 临时合并表尾
61202
+ * @param mergeCells
61203
+ */
61204
+ __publicField2(this, "setMergeFooterItems", (mergeCells) => {
61205
+ var _a;
61206
+ (_a = this.xTable.value) == null ? void 0 : _a.setMergeFooterItems(mergeCells);
61207
+ });
61208
+ /**
61209
+ * 导出excel
61210
+ * @param exportDatas 导出数据
61211
+ * @param fileName 导出文件名
61212
+ * @param merges 合并单元格配置
61213
+ * @param style 单元格样式
61214
+ */
61215
+ __publicField2(this, "exportExcel", (exportDatas, fileName, merges, style2) => {
61216
+ new ExcelHelper().downloadExcelAndSetStyle(exportDatas, fileName + ".xlsx", merges, style2);
61217
+ });
61218
+ this.props = props;
61219
+ this.ctx = ctx;
61220
+ CreatGridRenderer$1();
61221
+ this.useSearchPanel();
61222
+ this.useToolbar();
61223
+ }
61224
+ /**
61225
+ * 初始化查询面板
61226
+ */
61227
+ useSearchPanel() {
61228
+ this.showSearch = ref(this.getDefaultShowSearch());
61229
+ onMounted(() => {
61230
+ window.addEventListener("resize", () => {
61231
+ this.updateTableSize();
61232
+ });
61233
+ });
61234
+ onUnmounted(() => {
61235
+ window.removeEventListener("resize", () => {
61236
+ this.updateTableSize();
61237
+ });
61238
+ });
61239
+ }
61240
+ /**
61241
+ * 获取默认显示查询面板
61242
+ * @returns
61243
+ */
61244
+ getDefaultShowSearch() {
61245
+ if (this.utilities.isNull(this.props.option.setting)) {
61246
+ return false;
61247
+ }
61248
+ if (this.utilities.isNull(this.props.option.setting.searchConfig)) {
61249
+ return false;
61250
+ }
61251
+ if (this.utilities.isNull(this.props.option.setting.searchConfig.defaultShowSearch)) {
61252
+ return false;
61253
+ }
61254
+ return this.props.option.setting.searchConfig.defaultShowSearch;
61255
+ }
61256
+ /**
61257
+ * 更新Table Size
61258
+ */
61259
+ updateTableSize() {
61260
+ nextTick(() => {
61261
+ if (this.utilities.isNull(this.xTable.value)) {
61262
+ this.xTable.value.recalculate(true);
61263
+ }
61264
+ this.showTable.value = true;
61265
+ });
61266
+ }
61267
+ //#endregion 全局值 End
61268
+ //#region 表格列回调及初始化默认值
61269
+ /**
61270
+ * 获取默认值
61271
+ * @returns
61272
+ */
61273
+ getDefaultValues() {
61274
+ let defaultValue = {};
61275
+ if (!this.props.option.columns) {
61276
+ return defaultValue;
61277
+ }
61278
+ for (const column of this.props.option.columns) {
61279
+ if (column.defaultValue) {
61280
+ defaultValue[column.field] = column.defaultValue;
61281
+ }
61282
+ }
61283
+ return defaultValue;
61284
+ }
61285
+ /**
61286
+ * 初始化工具栏
61287
+ */
61288
+ useToolbar() {
61289
+ this.isButtonGroup = ref(this.getDefaultButtonGroup());
61290
+ this.maxShow.value = this.getDefaultMaxShow();
61291
+ watch(() => this.props.option.toolbars, () => {
61292
+ this.settingToolbarDefault(this.props.option.toolbars);
61293
+ });
61294
+ this.settingToolbarDefault(this.props.option.toolbars);
61295
+ watch(() => this.props.option.rightToolbars, () => {
61296
+ this.settingToolbarDefault(this.props.option.rightToolbars);
61297
+ });
61298
+ this.settingToolbarDefault(this.props.option.rightToolbars);
61299
+ }
61300
+ /**
61301
+ * 获取工具栏是否为按钮组
61302
+ * @returns
61303
+ */
61304
+ getDefaultButtonGroup() {
61305
+ if (this.utilities.isNull(this.props.option.setting)) {
61306
+ return false;
61307
+ }
61308
+ if (this.utilities.isNull(this.props.option.setting.toolbarConfig)) {
61309
+ return false;
61310
+ }
61311
+ return this.props.option.setting.toolbarConfig.isButtonGroup;
61312
+ }
61313
+ /**
61314
+ * 获取工具栏默认显示个数
61315
+ * @returns
61316
+ */
61317
+ getDefaultMaxShow() {
61318
+ if (this.utilities.isNull(this.props.option.setting)) {
61319
+ return 2;
61320
+ }
61321
+ if (this.utilities.isNull(this.props.option.setting.toolbarConfig)) {
61322
+ return 2;
61323
+ }
61324
+ return this.utilities.isNull(this.props.option.setting.toolbarConfig.maxShow) ? 2 : this.props.option.setting.toolbarConfig.maxShow;
61325
+ }
61326
+ /**
61327
+ * 运行添加行事件
61328
+ * @param row
61329
+ * @param parentRow
61330
+ * @returns
61331
+ */
61332
+ runEventAddRowBefore(row, parentRow) {
61333
+ if (this.utilities.isNull(this.props.option.event) || this.utilities.isNull(this.props.option.event.event_addRowBefore)) {
61334
+ return row;
61335
+ }
61336
+ return this.props.option.event.event_addRowBefore(row, parentRow);
61337
+ }
61338
+ //#endregion 公开方法 END
61339
+ };
61340
+ const GridV1_vue_vue_type_style_index_0_scoped_5ce83a1a_lang = "";
61341
+ const _withScopeId$3 = (n) => (pushScopeId("data-v-5ce83a1a"), n = n(), popScopeId(), n);
61342
+ const _hoisted_1$f = { class: "nv-crud nv-pos-r" };
61343
+ const _hoisted_2$c = { class: "grid-msg" };
61344
+ const _hoisted_3$a = { class: "nv-crud-body" };
61345
+ const _hoisted_4$8 = { class: "nv-crud-body-search" };
61346
+ const _hoisted_5$7 = {
61347
+ key: 0,
61348
+ class: "nv-crud-toolbar"
61349
+ };
61350
+ const _hoisted_6$4 = {
61351
+ key: 0,
61352
+ class: "nv-title"
61353
+ };
61354
+ const _hoisted_7$3 = {
61355
+ class: "nv-crud-body-table",
61356
+ ref: "crudTable"
61357
+ };
61358
+ const _hoisted_8$3 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "grid-msg" }, "加载中...", -1));
61359
+ const _hoisted_9$3 = {
61360
+ key: 0,
61361
+ class: "nv-crud-footer"
61362
+ };
61363
+ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
61364
+ var _a;
61365
+ const _component_Icon = resolveComponent("Icon");
61366
+ const _component_Spin = resolveComponent("Spin");
61367
+ const _component_search_com = resolveComponent("search-com");
61368
+ const _component_Divider = resolveComponent("Divider");
61369
+ const _component_toolbar = resolveComponent("toolbar");
61370
+ const _component_Space = resolveComponent("Space");
61371
+ const _component_Col = resolveComponent("Col");
61372
+ const _component_Button = resolveComponent("Button");
61373
+ const _component_Row = resolveComponent("Row");
61374
+ const _component_grid_column = resolveComponent("grid-column");
61375
+ const _component_vxe_table = resolveComponent("vxe-table");
61376
+ const _component_Page = resolveComponent("Page");
61377
+ return openBlock(), createElementBlock("div", _hoisted_1$f, [
61378
+ createVNode(_component_Spin, {
61379
+ fix: "",
61380
+ show: _ctx.doMethodLoading.show,
61381
+ style: { "z-index": "12" }
61382
+ }, {
61383
+ default: withCtx(() => [
61384
+ createVNode(_component_Icon, {
61385
+ type: "ios-loading",
61386
+ size: "24",
61387
+ class: "grid-icon-load"
61388
+ }),
61389
+ createElementVNode("span", _hoisted_2$c, toDisplayString(_ctx.doMethodLoading.text ? _ctx.doMethodLoading.text : "正在执行..."), 1)
61390
+ ]),
61391
+ _: 1
61392
+ }, 8, ["show"]),
61393
+ createElementVNode("div", _hoisted_3$a, [
61394
+ withDirectives(createElementVNode("div", _hoisted_4$8, [
61395
+ !_ctx.isShowSearchSlot ? (openBlock(), createBlock(_component_search_com, {
61396
+ key: 0,
61397
+ options: _ctx.option.searchOptions,
61398
+ btnSpan: _ctx.btnSpan,
61399
+ labelWidth: _ctx.labelWidth,
61400
+ onSearch: _ctx.doSearch
61401
+ }, null, 8, ["options", "btnSpan", "labelWidth", "onSearch"])) : createCommentVNode("", true),
61402
+ renderSlot(_ctx.$slots, "search", {}, void 0, true)
61403
+ ], 512), [
61404
+ [vShow, _ctx.showSearch]
61405
+ ]),
61406
+ _ctx.isShowSearchBtn || _ctx.hasToolbar() || _ctx.getRefreshBtn() || _ctx.hasRightToolbar() || _ctx.isHasSlot ? (openBlock(), createElementBlock("div", _hoisted_5$7, [
61407
+ createVNode(_component_Row, null, {
61408
+ default: withCtx(() => [
61409
+ createVNode(_component_Col, { flex: "auto" }, {
61410
+ default: withCtx(() => [
61411
+ createVNode(_component_Space, {
61412
+ wrap: "",
61413
+ class: "toolbar-space"
61414
+ }, {
61415
+ default: withCtx(() => [
61416
+ _ctx.hasTitle() ? (openBlock(), createElementBlock("div", _hoisted_6$4, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
61417
+ _ctx.hasTitleDivider() ? (openBlock(), createBlock(_component_Divider, {
61418
+ key: 1,
61419
+ type: "vertical"
61420
+ })) : createCommentVNode("", true),
61421
+ _ctx.hasToolbar() ? (openBlock(), createBlock(_component_toolbar, {
61422
+ key: 2,
61423
+ options: _ctx.option.toolbars,
61424
+ isButtonGroup: _ctx.isButtonGroup,
61425
+ maxShow: _ctx.maxShow
61426
+ }, null, 8, ["options", "isButtonGroup", "maxShow"])) : createCommentVNode("", true),
61427
+ _ctx.getRefreshBtn() ? (openBlock(), createElementBlock("div", {
61428
+ key: 3,
61429
+ onClick: _cache[0] || (_cache[0] = ($event) => {
61430
+ var _a2;
61431
+ return _ctx.getRefreshBtn().onclick ? (_a2 = _ctx.getRefreshBtn()) == null ? void 0 : _a2.onclick() : {};
61432
+ }),
61433
+ class: "refresh-btn-v1"
61434
+ }, [
61435
+ createVNode(_component_Icon, {
61436
+ type: "md-refresh",
61437
+ size: "18"
61438
+ })
61439
+ ])) : createCommentVNode("", true),
61440
+ _ctx.hasDivider() ? (openBlock(), createBlock(_component_Divider, {
61441
+ key: 4,
61442
+ type: "vertical"
61443
+ })) : createCommentVNode("", true),
61444
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
61445
+ ]),
61446
+ _: 3
61447
+ })
61448
+ ]),
61449
+ _: 3
61450
+ }),
61451
+ _ctx.hasRightToolbar() ? (openBlock(), createBlock(_component_Col, {
61452
+ key: 0,
61453
+ style: { "text-align": "right" }
61454
+ }, {
61455
+ default: withCtx(() => [
61456
+ createVNode(_component_Space, { wrap: "" }, {
61457
+ default: withCtx(() => [
61458
+ _ctx.isShowSearchBtn ? (openBlock(), createBlock(_component_Button, {
61459
+ key: 0,
61460
+ title: "查询",
61461
+ icon: "ios-search",
61462
+ onClick: _ctx.toggleShowSearch
61463
+ }, null, 8, ["onClick"])) : createCommentVNode("", true),
61464
+ createVNode(_component_toolbar, {
61465
+ options: _ctx.option.rightToolbars,
61466
+ isIconButton: true
61467
+ }, null, 8, ["options"])
61468
+ ]),
61469
+ _: 1
61470
+ })
61471
+ ]),
61472
+ _: 1
61473
+ })) : createCommentVNode("", true)
61474
+ ]),
61475
+ _: 3
61476
+ })
61477
+ ])) : createCommentVNode("", true),
59658
61478
  createElementVNode("div", _hoisted_7$3, [
59659
61479
  createVNode(_component_Spin, {
59660
61480
  fix: "",
@@ -59671,6 +61491,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
59671
61491
  _: 1
59672
61492
  }, 8, ["show"]),
59673
61493
  withDirectives(createVNode(_component_vxe_table, mergeProps(toHandlers(_ctx.gridEvents), {
61494
+ class: "table-radius-4",
59674
61495
  ref: "xTable",
59675
61496
  size: "small",
59676
61497
  height: "100%",
@@ -59766,7 +61587,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
59766
61587
  ])) : createCommentVNode("", true)
59767
61588
  ]);
59768
61589
  }
59769
- const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-cad0be75"]]);
61590
+ const GridV1 = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$k], ["__scopeId", "data-v-5ce83a1a"]]);
59770
61591
  const GridCellContent = defineComponent({
59771
61592
  name: "GridCellContent",
59772
61593
  props: {
@@ -60318,13 +62139,13 @@ class GridColumnInstance extends BaseInstance {
60318
62139
  }
60319
62140
  const GridColumn_vue_vue_type_style_index_0_lang = "";
60320
62141
  const GridColumn_vue_vue_type_style_index_1_scoped_d569c5cb_lang = "";
60321
- const _hoisted_1$d = { class: "gridColumn" };
60322
- const _hoisted_2$a = {
62142
+ const _hoisted_1$e = { class: "gridColumn" };
62143
+ const _hoisted_2$b = {
60323
62144
  key: 3,
60324
62145
  class: "nv-num-text"
60325
62146
  };
60326
- const _hoisted_3$8 = { key: 4 };
60327
- function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
62147
+ const _hoisted_3$9 = { key: 4 };
62148
+ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
60328
62149
  const _component_GridTitleContent = resolveComponent("GridTitleContent");
60329
62150
  const _component_grid_column = resolveComponent("grid-column", true);
60330
62151
  const _component_vxe_colgroup = resolveComponent("vxe-colgroup");
@@ -60345,7 +62166,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
60345
62166
  const _component_MileEdit = resolveComponent("MileEdit");
60346
62167
  const _component_Button = resolveComponent("Button");
60347
62168
  const _component_Space = resolveComponent("Space");
60348
- return openBlock(), createElementBlock("div", _hoisted_1$d, [
62169
+ return openBlock(), createElementBlock("div", _hoisted_1$e, [
60349
62170
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (column) => {
60350
62171
  return openBlock(), createElementBlock(Fragment, null, [
60351
62172
  _ctx.getHasColgroup(column) && _ctx.getVisible(column) ? (openBlock(), createBlock(_component_vxe_colgroup, {
@@ -60600,7 +62421,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
60600
62421
  modelValue: row[_ctx.getField(column)],
60601
62422
  "onUpdate:modelValue": ($event) => row[_ctx.getField(column)] = $event,
60602
62423
  disabled: true
60603
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : column.colType == "num" ? (openBlock(), createElementBlock("span", _hoisted_2$a, toDisplayString(row[_ctx.getField(column)]), 1)) : column.colType == "mile" ? (openBlock(), createElementBlock("span", _hoisted_3$8, toDisplayString(_ctx.formatMileValue(row[_ctx.getField(column)], (_a = column.mileConfig) == null ? void 0 : _a.prefix)), 1)) : (openBlock(), createBlock(_component_GridCellContent, {
62424
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])) : column.colType == "num" ? (openBlock(), createElementBlock("span", _hoisted_2$b, toDisplayString(row[_ctx.getField(column)]), 1)) : column.colType == "mile" ? (openBlock(), createElementBlock("span", _hoisted_3$9, toDisplayString(_ctx.formatMileValue(row[_ctx.getField(column)], (_a = column.mileConfig) == null ? void 0 : _a.prefix)), 1)) : (openBlock(), createBlock(_component_GridCellContent, {
60604
62425
  key: 5,
60605
62426
  column,
60606
62427
  row
@@ -60686,7 +62507,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
60686
62507
  }), 256))
60687
62508
  ]);
60688
62509
  }
60689
- const GridColumn = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$i], ["__scopeId", "data-v-d569c5cb"]]);
62510
+ const GridColumn = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$j], ["__scopeId", "data-v-d569c5cb"]]);
60690
62511
  const _sfc_main$h = defineComponent({
60691
62512
  name: "FilterDaterange",
60692
62513
  props: {
@@ -60726,15 +62547,15 @@ const _sfc_main$h = defineComponent({
60726
62547
  };
60727
62548
  }
60728
62549
  });
60729
- const _hoisted_1$c = { class: "nv-flex" };
60730
- const _hoisted_2$9 = {
62550
+ const _hoisted_1$d = { class: "nv-flex" };
62551
+ const _hoisted_2$a = {
60731
62552
  key: 0,
60732
62553
  style: { "font-size": "12px", "color": "#f00", "text-align": "center" }
60733
62554
  };
60734
- function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
62555
+ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
60735
62556
  const _component_DatePicker = resolveComponent("DatePicker");
60736
62557
  return openBlock(), createElementBlock("div", null, [
60737
- createElementVNode("div", _hoisted_1$c, [
62558
+ createElementVNode("div", _hoisted_1$d, [
60738
62559
  _ctx.filterDateRangeVal.option.data && _ctx.filterDateRangeVal.option.data.length > 0 ? (openBlock(), createBlock(_component_DatePicker, {
60739
62560
  key: 0,
60740
62561
  modelValue: _ctx.filterDateRangeVal.option.data,
@@ -60746,10 +62567,10 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
60746
62567
  onOnChange: _ctx.changeOptionEvent
60747
62568
  }, null, 8, ["modelValue", "onOnChange"])) : createCommentVNode("", true)
60748
62569
  ]),
60749
- _ctx.warningMsg.isShow ? (openBlock(), createElementBlock("div", _hoisted_2$9, "起始时间不能大于结束时间")) : createCommentVNode("", true)
62570
+ _ctx.warningMsg.isShow ? (openBlock(), createElementBlock("div", _hoisted_2$a, "起始时间不能大于结束时间")) : createCommentVNode("", true)
60750
62571
  ]);
60751
62572
  }
60752
- const FilterDaterange = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h]]);
62573
+ const FilterDaterange = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$i]]);
60753
62574
  const _sfc_main$g = defineComponent({
60754
62575
  name: "FilterDaterange",
60755
62576
  props: {
@@ -60792,16 +62613,16 @@ const _sfc_main$g = defineComponent({
60792
62613
  };
60793
62614
  }
60794
62615
  });
60795
- const _hoisted_1$b = { class: "nv-flex" };
60796
- const _hoisted_2$8 = /* @__PURE__ */ createElementVNode("span", null, " ~ ", -1);
60797
- const _hoisted_3$7 = {
62616
+ const _hoisted_1$c = { class: "nv-flex" };
62617
+ const _hoisted_2$9 = /* @__PURE__ */ createElementVNode("span", null, " ~ ", -1);
62618
+ const _hoisted_3$8 = {
60798
62619
  key: 0,
60799
62620
  style: { "font-size": "12px", "color": "#f00", "text-align": "center" }
60800
62621
  };
60801
- function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
62622
+ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
60802
62623
  const _component_vxe_input = resolveComponent("vxe-input");
60803
62624
  return openBlock(), createElementBlock("div", null, [
60804
- createElementVNode("div", _hoisted_1$b, [
62625
+ createElementVNode("div", _hoisted_1$c, [
60805
62626
  _ctx.filterDateRangeVal.option.data && _ctx.filterDateRangeVal.option.data.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
60806
62627
  createVNode(_component_vxe_input, {
60807
62628
  modelValue: _ctx.filterDateRangeVal.option.data[0],
@@ -60811,7 +62632,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
60811
62632
  style: { "width": "120px" },
60812
62633
  onChange: _ctx.changeOptionEvent
60813
62634
  }, null, 8, ["modelValue", "onChange"]),
60814
- _hoisted_2$8,
62635
+ _hoisted_2$9,
60815
62636
  createVNode(_component_vxe_input, {
60816
62637
  modelValue: _ctx.filterDateRangeVal.option.data[1],
60817
62638
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.filterDateRangeVal.option.data[1] = $event),
@@ -60822,10 +62643,10 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
60822
62643
  }, null, 8, ["modelValue", "onChange"])
60823
62644
  ], 64)) : createCommentVNode("", true)
60824
62645
  ]),
60825
- _ctx.warningMsg.isShow ? (openBlock(), createElementBlock("div", _hoisted_3$7, "起始值不能大于结束值")) : createCommentVNode("", true)
62646
+ _ctx.warningMsg.isShow ? (openBlock(), createElementBlock("div", _hoisted_3$8, "起始值不能大于结束值")) : createCommentVNode("", true)
60826
62647
  ]);
60827
62648
  }
60828
- const FilterNumberrange = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g]]);
62649
+ const FilterNumberrange = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$h]]);
60829
62650
  const CreatGridRenderer = () => {
60830
62651
  if (!VXETable.renderer.get("filterDaterange")) {
60831
62652
  VXETable.renderer.add("filterDaterange", {
@@ -62288,11 +64109,11 @@ let GridInstanceJava$1 = class GridInstanceJava2 extends BaseInstance {
62288
64109
  };
62289
64110
  const GridJava_vue_vue_type_style_index_0_scoped_9f5bd71e_lang = "";
62290
64111
  const _withScopeId$2 = (n) => (pushScopeId("data-v-9f5bd71e"), n = n(), popScopeId(), n);
62291
- const _hoisted_1$a = { class: "nv-crud nv-pos-r" };
62292
- const _hoisted_2$7 = { class: "grid-msg" };
62293
- const _hoisted_3$6 = { class: "nv-crud-body" };
62294
- const _hoisted_4$6 = { class: "nv-crud-body-search" };
62295
- const _hoisted_5$5 = {
64112
+ const _hoisted_1$b = { class: "nv-crud nv-pos-r" };
64113
+ const _hoisted_2$8 = { class: "grid-msg" };
64114
+ const _hoisted_3$7 = { class: "nv-crud-body" };
64115
+ const _hoisted_4$7 = { class: "nv-crud-body-search" };
64116
+ const _hoisted_5$6 = {
62296
64117
  key: 0,
62297
64118
  class: "nv-crud-toolbar"
62298
64119
  };
@@ -62309,7 +64130,7 @@ const _hoisted_9$2 = {
62309
64130
  key: 0,
62310
64131
  class: "nv-crud-footer"
62311
64132
  };
62312
- function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
64133
+ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
62313
64134
  var _a;
62314
64135
  const _component_Icon = resolveComponent("Icon");
62315
64136
  const _component_Spin = resolveComponent("Spin");
@@ -62323,7 +64144,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
62323
64144
  const _component_grid_column = resolveComponent("grid-column");
62324
64145
  const _component_vxe_table = resolveComponent("vxe-table");
62325
64146
  const _component_Page = resolveComponent("Page");
62326
- return openBlock(), createElementBlock("div", _hoisted_1$a, [
64147
+ return openBlock(), createElementBlock("div", _hoisted_1$b, [
62327
64148
  createVNode(_component_Spin, {
62328
64149
  fix: "",
62329
64150
  show: _ctx.doMethodLoading.show,
@@ -62335,12 +64156,12 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
62335
64156
  size: "24",
62336
64157
  class: "grid-icon-load"
62337
64158
  }),
62338
- createElementVNode("span", _hoisted_2$7, toDisplayString(_ctx.doMethodLoading.text ? _ctx.doMethodLoading.text : "正在执行..."), 1)
64159
+ createElementVNode("span", _hoisted_2$8, toDisplayString(_ctx.doMethodLoading.text ? _ctx.doMethodLoading.text : "正在执行..."), 1)
62339
64160
  ]),
62340
64161
  _: 1
62341
64162
  }, 8, ["show"]),
62342
- createElementVNode("div", _hoisted_3$6, [
62343
- withDirectives(createElementVNode("div", _hoisted_4$6, [
64163
+ createElementVNode("div", _hoisted_3$7, [
64164
+ withDirectives(createElementVNode("div", _hoisted_4$7, [
62344
64165
  !_ctx.isShowSearchSlot ? (openBlock(), createBlock(_component_search_com, {
62345
64166
  key: 0,
62346
64167
  options: _ctx.option.searchOptions,
@@ -62352,7 +64173,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
62352
64173
  ], 512), [
62353
64174
  [vShow, _ctx.showSearch]
62354
64175
  ]),
62355
- _ctx.isShowSearchBtn || _ctx.hasToolbar() || _ctx.getRefreshBtn() || _ctx.hasRightToolbar() || _ctx.isHasSlot ? (openBlock(), createElementBlock("div", _hoisted_5$5, [
64176
+ _ctx.isShowSearchBtn || _ctx.hasToolbar() || _ctx.getRefreshBtn() || _ctx.hasRightToolbar() || _ctx.isHasSlot ? (openBlock(), createElementBlock("div", _hoisted_5$6, [
62356
64177
  createVNode(_component_Row, null, {
62357
64178
  default: withCtx(() => [
62358
64179
  createVNode(_component_Col, { flex: "auto" }, {
@@ -62534,7 +64355,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
62534
64355
  ])) : createCommentVNode("", true)
62535
64356
  ]);
62536
64357
  }
62537
- const GridJava = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f], ["__scopeId", "data-v-9f5bd71e"]]);
64358
+ const GridJava = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$g], ["__scopeId", "data-v-9f5bd71e"]]);
62538
64359
  const propDefine$p = {
62539
64360
  width: {
62540
64361
  // Box 宽度
@@ -62656,6 +64477,92 @@ let BoxInstance$1 = class BoxInstance2 extends BaseInstance {
62656
64477
  //#endregion Box END
62657
64478
  };
62658
64479
  const Box_vue_vue_type_style_index_0_scoped_1277c62b_lang = "";
64480
+ const _hoisted_1$a = ["title"];
64481
+ const _hoisted_2$7 = {
64482
+ key: 0,
64483
+ class: "nv-box-head"
64484
+ };
64485
+ const _hoisted_3$6 = {
64486
+ key: 0,
64487
+ style: { "display": "inline" }
64488
+ };
64489
+ const _hoisted_4$6 = { class: "nv-box-head_span" };
64490
+ const _hoisted_5$5 = {
64491
+ key: 3,
64492
+ class: "nv-box-footer"
64493
+ };
64494
+ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
64495
+ const _component_Icon = resolveComponent("Icon");
64496
+ const _component_Divider = resolveComponent("Divider");
64497
+ const _component_Col = resolveComponent("Col");
64498
+ return openBlock(), createBlock(_component_Col, {
64499
+ style: normalizeStyle({ width: _ctx.currentWidth, height: "100%", "min-width": 0, flex: _ctx.currentWidth == "100%" ? 1 : "initial" })
64500
+ }, {
64501
+ default: withCtx(() => [
64502
+ createElementVNode("div", {
64503
+ class: normalizeClass(_ctx.isExpand ? "nv-box" : "nv-box nv-box_close"),
64504
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.doExpand && _ctx.doExpand(...args)),
64505
+ title: _ctx.isExpand ? "" : "点击展开"
64506
+ }, [
64507
+ _ctx.showHead ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
64508
+ _ctx.back ? (openBlock(), createBlock(_component_Icon, {
64509
+ key: 0,
64510
+ type: "md-arrow-back",
64511
+ onClick: _ctx.doBack
64512
+ }, null, 8, ["onClick"])) : createCommentVNode("", true),
64513
+ _ctx.back ? (openBlock(), createBlock(_component_Divider, {
64514
+ key: 1,
64515
+ type: "vertical"
64516
+ })) : createCommentVNode("", true),
64517
+ renderSlot(_ctx.$slots, "title", {}, () => [
64518
+ _ctx.title ? (openBlock(), createElementBlock("p", _hoisted_3$6, [
64519
+ _ctx.icon ? (openBlock(), createBlock(_component_Icon, {
64520
+ key: 0,
64521
+ type: _ctx.icon,
64522
+ class: "nv-box-head_icon"
64523
+ }, null, 8, ["type"])) : createCommentVNode("", true),
64524
+ createElementVNode("span", _hoisted_4$6, toDisplayString(_ctx.title), 1)
64525
+ ])) : createCommentVNode("", true)
64526
+ ], true)
64527
+ ])) : createCommentVNode("", true),
64528
+ _ctx.showExtra ? withDirectives((openBlock(), createElementBlock("div", {
64529
+ key: 1,
64530
+ class: "nv-box-extra",
64531
+ style: normalizeStyle(_ctx.extraStyles)
64532
+ }, [
64533
+ renderSlot(_ctx.$slots, "extra", {}, void 0, true)
64534
+ ], 4)), [
64535
+ [vShow, _ctx.isExpand]
64536
+ ]) : createCommentVNode("", true),
64537
+ _ctx.showArrow ? (openBlock(), createElementBlock("div", {
64538
+ key: 2,
64539
+ class: normalizeClass(_ctx.isExpand ? "nv-box-arrow" : "nv-box-arrow_close"),
64540
+ onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.doToggleExpand && _ctx.doToggleExpand(...args), ["stop"]))
64541
+ }, [
64542
+ createVNode(_component_Icon, {
64543
+ type: _ctx.isExpand ? "ios-arrow-down" : "ios-arrow-back"
64544
+ }, null, 8, ["type"])
64545
+ ], 2)) : createCommentVNode("", true),
64546
+ withDirectives(createElementVNode("div", {
64547
+ class: "nv-box-body",
64548
+ style: normalizeStyle(_ctx.bodyStyles)
64549
+ }, [
64550
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
64551
+ ], 4), [
64552
+ [vShow, _ctx.isExpand]
64553
+ ]),
64554
+ _ctx.showFooter ? withDirectives((openBlock(), createElementBlock("div", _hoisted_5$5, [
64555
+ renderSlot(_ctx.$slots, "footer", {}, void 0, true)
64556
+ ], 512)), [
64557
+ [vShow, _ctx.isExpand]
64558
+ ]) : createCommentVNode("", true)
64559
+ ], 10, _hoisted_1$a)
64560
+ ]),
64561
+ _: 3
64562
+ }, 8, ["style"]);
64563
+ }
64564
+ const Box = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$f], ["__scopeId", "data-v-1277c62b"]]);
64565
+ const BoxV1_vue_vue_type_style_index_0_scoped_39203af6_lang = "";
62659
64566
  const _hoisted_1$9 = ["title"];
62660
64567
  const _hoisted_2$6 = {
62661
64568
  key: 0,
@@ -62740,7 +64647,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
62740
64647
  _: 3
62741
64648
  }, 8, ["style"]);
62742
64649
  }
62743
- const Box = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e], ["__scopeId", "data-v-1277c62b"]]);
64650
+ const BoxV1 = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e], ["__scopeId", "data-v-39203af6"]]);
62744
64651
  const propDefine$o = {
62745
64652
  gutter: {
62746
64653
  // 栅格间的间距
@@ -115009,6 +116916,9 @@ function getCellTextInfo(cell, ctx, option) {
115009
116916
  }
115010
116917
  var vplus = textContent.textHeightAll - option.cellHeight;
115011
116918
  var hplus = textContent.textWidthAll - option.cellWidth;
116919
+ if (isNaN(cell.fs)) {
116920
+ cell.fs = 10;
116921
+ }
115012
116922
  var shrinkcontent = function shrinkcontent2() {
115013
116923
  if (cell.ct != void 0 && cell.ct.s != void 0) {
115014
116924
  cell.ct.s.map(function(rc) {
@@ -240327,6 +242237,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
240327
242237
  NvAFCaream,
240328
242238
  NvAFCareamBack,
240329
242239
  NvBox: Box,
242240
+ NvBoxV1: BoxV1,
240330
242241
  NvButton,
240331
242242
  NvComForm: ComForm,
240332
242243
  NvControlGroup: ControlGroup,
@@ -240335,6 +242246,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
240335
242246
  NvExcelImport: ExcelImport,
240336
242247
  NvGrid: Grid,
240337
242248
  NvGridJava: GridJava,
242249
+ NvGridV1: GridV1,
240338
242250
  NvIconSelect,
240339
242251
  NvList: List,
240340
242252
  NvLoading: Loading,
@@ -244555,6 +246467,7 @@ export {
244555
246467
  NvAFCaream,
244556
246468
  NvAFCareamBack,
244557
246469
  Box as NvBox,
246470
+ BoxV1 as NvBoxV1,
244558
246471
  NvButton,
244559
246472
  ComForm as NvComForm,
244560
246473
  ControlGroup as NvControlGroup,
@@ -244563,6 +246476,7 @@ export {
244563
246476
  ExcelImport as NvExcelImport,
244564
246477
  Grid as NvGrid,
244565
246478
  GridJava as NvGridJava,
246479
+ GridV1 as NvGridV1,
244566
246480
  NvIconSelect,
244567
246481
  List as NvList,
244568
246482
  Loading as NvLoading,