@xjw_/vue3-npm-system 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import Cookies from "js-cookie";
2
2
  import axios from "axios";
3
3
  import { ElMessage, ElInput, ElOption, ElCascader, ElDatePicker, ElSelect } from "element-plus";
4
- import { defineComponent, computed, openBlock, createElementBlock, mergeProps, createElementVNode, ref, watch, resolveComponent, createBlock, provide, withCtx, createVNode, normalizeStyle, renderSlot, inject, normalizeClass, createCommentVNode, Fragment, renderList, createSlots, getCurrentInstance, toDisplayString, useSlots, onMounted, unref, withKeys, createTextVNode, withDirectives, resolveDynamicComponent, vShow, nextTick, normalizeProps, guardReactiveProps } from "vue";
4
+ import { defineComponent, computed, openBlock, createElementBlock, mergeProps, createElementVNode, ref, watch, resolveComponent, createBlock, provide, withCtx, createVNode, normalizeStyle, renderSlot, inject, normalizeClass, createCommentVNode, Fragment, renderList, createSlots, getCurrentInstance, toDisplayString, useSlots, onMounted, unref, withKeys, createTextVNode, withDirectives, resolveDynamicComponent, vShow, nextTick, normalizeProps, guardReactiveProps, reactive } from "vue";
5
5
  function debounce$1(func, wait) {
6
6
  let timeout = null;
7
7
  return function(...args) {
@@ -282,8 +282,8 @@ const directives = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
282
282
  registerDirectives,
283
283
  throttle
284
284
  }, Symbol.toStringTag, { value: "Module" }));
285
- const _hoisted_1$4 = ["href", "xlink:href"];
286
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
285
+ const _hoisted_1$5 = ["href", "xlink:href"];
286
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
287
287
  __name: "SvgIcon",
288
288
  props: {
289
289
  iconClass: {
@@ -324,7 +324,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
324
324
  createElementVNode("use", {
325
325
  href: iconName.value,
326
326
  "xlink:href": iconName.value
327
- }, null, 8, _hoisted_1$4)
327
+ }, null, 8, _hoisted_1$5)
328
328
  ], 16));
329
329
  };
330
330
  }
@@ -336,8 +336,8 @@ const _export_sfc = (sfc, props) => {
336
336
  }
337
337
  return target;
338
338
  };
339
- const SvgIcon = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-bc56d70e"]]);
340
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
339
+ const SvgIcon = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-bc56d70e"]]);
340
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
341
341
  __name: "XDatePicker",
342
342
  props: {
343
343
  type: {
@@ -544,8 +544,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
544
544
  };
545
545
  }
546
546
  });
547
- const XDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-264a8a79"]]);
548
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
547
+ const XDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-264a8a79"]]);
548
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
549
549
  __name: "XElForm",
550
550
  props: {
551
551
  model: {
@@ -686,8 +686,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
686
686
  };
687
687
  }
688
688
  });
689
- const XElForm = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-441b419b"]]);
690
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
689
+ const XElForm = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-441b419b"]]);
690
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
691
691
  __name: "XElFormItem",
692
692
  props: {
693
693
  label: {
@@ -770,8 +770,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
770
770
  };
771
771
  }
772
772
  });
773
- const XElFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-50c1c717"]]);
774
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
773
+ const XElFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-50c1c717"]]);
774
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
775
775
  __name: "XElOption",
776
776
  props: {
777
777
  label: {
@@ -831,7 +831,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
831
831
  };
832
832
  }
833
833
  });
834
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
834
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
835
835
  __name: "XElSelect",
836
836
  props: {
837
837
  modelValue: {
@@ -954,8 +954,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
954
954
  };
955
955
  }
956
956
  });
957
- const _hoisted_1$3 = { class: "x-pagination" };
958
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
957
+ const _hoisted_1$4 = { class: "x-pagination" };
958
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
959
959
  __name: "XPagination",
960
960
  props: {
961
961
  currentPage: {
@@ -1013,7 +1013,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1013
1013
  }
1014
1014
  return (_ctx, _cache) => {
1015
1015
  const _component_el_pagination = resolveComponent("el-pagination");
1016
- return openBlock(), createElementBlock("div", _hoisted_1$3, [
1016
+ return openBlock(), createElementBlock("div", _hoisted_1$4, [
1017
1017
  createVNode(_component_el_pagination, {
1018
1018
  "current-page": internalCurrentPage.value,
1019
1019
  "page-size": internalPageSize.value,
@@ -1027,8 +1027,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1027
1027
  };
1028
1028
  }
1029
1029
  });
1030
- const XPagination = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-bd405b6e"]]);
1031
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1030
+ const XPagination = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-bd405b6e"]]);
1031
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1032
1032
  __name: "XVxeTable",
1033
1033
  props: {
1034
1034
  tableData: { type: Array, default: () => [] },
@@ -1292,15 +1292,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1292
1292
  };
1293
1293
  }
1294
1294
  });
1295
- const XVxeTable = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-9111013e"]]);
1296
- const _hoisted_1$2 = { class: "x-report-table" };
1297
- const _hoisted_2$2 = { class: "report-header" };
1298
- const _hoisted_3$2 = { class: "report-title" };
1299
- const _hoisted_4$2 = { class: "report-actions" };
1300
- const _hoisted_5$2 = ["onClick"];
1301
- const _hoisted_6$2 = { class: "report-text-primary" };
1302
- const _hoisted_7$2 = { class: "report-text-primary" };
1303
- const _hoisted_8$2 = { class: "report-text-primary" };
1295
+ const XVxeTable = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-9111013e"]]);
1296
+ const _hoisted_1$3 = { class: "x-report-table" };
1297
+ const _hoisted_2$3 = { class: "report-header" };
1298
+ const _hoisted_3$3 = { class: "report-title" };
1299
+ const _hoisted_4$3 = { class: "report-actions" };
1300
+ const _hoisted_5$3 = ["onClick"];
1301
+ const _hoisted_6$3 = { class: "report-text-primary" };
1302
+ const _hoisted_7$3 = { class: "report-text-primary" };
1303
+ const _hoisted_8$3 = { class: "report-text-primary" };
1304
1304
  const _hoisted_9$1 = { class: "report-flex report-justify-between" };
1305
1305
  const _hoisted_10$1 = { class: "" };
1306
1306
  const _hoisted_11$1 = { class: "" };
@@ -1320,7 +1320,7 @@ const _hoisted_24 = { key: 0 };
1320
1320
  const _hoisted_25 = { class: "" };
1321
1321
  const _hoisted_26 = { class: "" };
1322
1322
  const _hoisted_27 = { class: "" };
1323
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1323
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1324
1324
  __name: "XReportTable",
1325
1325
  props: {
1326
1326
  tableData: { type: Array, default: () => [] },
@@ -1523,32 +1523,32 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1523
1523
  getTableInstance
1524
1524
  });
1525
1525
  return (_ctx, _cache) => {
1526
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
1527
- createElementVNode("div", _hoisted_2$2, [
1528
- createElementVNode("h2", _hoisted_3$2, toDisplayString(displayTitle.value), 1),
1529
- createElementVNode("div", _hoisted_4$2, [
1526
+ return openBlock(), createElementBlock("div", _hoisted_1$3, [
1527
+ createElementVNode("div", _hoisted_2$3, [
1528
+ createElementVNode("h2", _hoisted_3$3, toDisplayString(displayTitle.value), 1),
1529
+ createElementVNode("div", _hoisted_4$3, [
1530
1530
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.customButtons, (btn, index2) => {
1531
1531
  return openBlock(), createElementBlock("div", {
1532
1532
  key: index2,
1533
1533
  class: "action-item report-cursor-pointer",
1534
1534
  onClick: ($event) => handleCustomBtn(index2, btn)
1535
1535
  }, [
1536
- createElementVNode("span", _hoisted_6$2, toDisplayString(btn), 1)
1537
- ], 8, _hoisted_5$2);
1536
+ createElementVNode("span", _hoisted_6$3, toDisplayString(btn), 1)
1537
+ ], 8, _hoisted_5$3);
1538
1538
  }), 128)),
1539
1539
  __props.showPrint ? (openBlock(), createElementBlock("div", {
1540
1540
  key: 0,
1541
1541
  class: "action-item report-cursor-pointer",
1542
1542
  onClick: _cache[0] || (_cache[0] = ($event) => printReport(1))
1543
1543
  }, [
1544
- createElementVNode("span", _hoisted_7$2, toDisplayString(__props.printText), 1)
1544
+ createElementVNode("span", _hoisted_7$3, toDisplayString(__props.printText), 1)
1545
1545
  ])) : createCommentVNode("", true),
1546
1546
  __props.printText1 ? (openBlock(), createElementBlock("div", {
1547
1547
  key: 1,
1548
1548
  class: "action-item report-cursor-pointer",
1549
1549
  onClick: _cache[1] || (_cache[1] = ($event) => printReport(2))
1550
1550
  }, [
1551
- createElementVNode("span", _hoisted_8$2, toDisplayString(__props.printText1), 1)
1551
+ createElementVNode("span", _hoisted_8$3, toDisplayString(__props.printText1), 1)
1552
1552
  ])) : createCommentVNode("", true),
1553
1553
  __props.showExport ? (openBlock(), createElementBlock("div", {
1554
1554
  key: 2,
@@ -1642,30 +1642,30 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1642
1642
  };
1643
1643
  }
1644
1644
  });
1645
- const XReportTable = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-00481d7c"]]);
1646
- const _hoisted_1$1 = {
1645
+ const XReportTable = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-00481d7c"]]);
1646
+ const _hoisted_1$2 = {
1647
1647
  key: 0,
1648
1648
  class: "search-top"
1649
1649
  };
1650
- const _hoisted_2$1 = { class: "search-top__inner" };
1651
- const _hoisted_3$1 = { class: "search-top__row" };
1652
- const _hoisted_4$1 = {
1650
+ const _hoisted_2$2 = { class: "search-top__inner" };
1651
+ const _hoisted_3$2 = { class: "search-top__row" };
1652
+ const _hoisted_4$2 = {
1653
1653
  key: 0,
1654
1654
  class: "search-top__label"
1655
1655
  };
1656
- const _hoisted_5$1 = {
1656
+ const _hoisted_5$2 = {
1657
1657
  key: 1,
1658
1658
  class: "search-top-input"
1659
1659
  };
1660
- const _hoisted_6$1 = {
1660
+ const _hoisted_6$2 = {
1661
1661
  key: 0,
1662
1662
  class: "search-top-extra-item"
1663
1663
  };
1664
- const _hoisted_7$1 = {
1664
+ const _hoisted_7$2 = {
1665
1665
  key: 0,
1666
1666
  class: "search-top-extra-label"
1667
1667
  };
1668
- const _hoisted_8$1 = { class: "search-top-extra-content" };
1668
+ const _hoisted_8$2 = { class: "search-top-extra-content" };
1669
1669
  const _hoisted_9 = {
1670
1670
  key: 1,
1671
1671
  class: "search-top-extra-item"
@@ -1687,7 +1687,7 @@ const _hoisted_14 = { class: "search-top-extra-content" };
1687
1687
  const _hoisted_15 = { class: "search-top__actions" };
1688
1688
  const _hoisted_16 = { class: "search-form__buttons" };
1689
1689
  const _hoisted_17 = { class: "search-form__buttons" };
1690
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1690
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1691
1691
  __name: "XSearchBar",
1692
1692
  props: {
1693
1693
  modelValue: {
@@ -1941,11 +1941,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1941
1941
  class: "search",
1942
1942
  style: normalizeStyle({ paddingBottom: __props.paddingBottom })
1943
1943
  }, [
1944
- __props.showSearch ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
1945
- createElementVNode("div", _hoisted_2$1, [
1946
- createElementVNode("div", _hoisted_3$1, [
1947
- __props.showInput ? (openBlock(), createElementBlock("span", _hoisted_4$1, "快捷搜索 ")) : createCommentVNode("", true),
1948
- __props.showInput ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
1944
+ __props.showSearch ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
1945
+ createElementVNode("div", _hoisted_2$2, [
1946
+ createElementVNode("div", _hoisted_3$2, [
1947
+ __props.showInput ? (openBlock(), createElementBlock("span", _hoisted_4$2, "快捷搜索 ")) : createCommentVNode("", true),
1948
+ __props.showInput ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
1949
1949
  createVNode(unref(ElInput), {
1950
1950
  type: "text",
1951
1951
  onKeyup: withKeys(searchParentList, ["enter"]),
@@ -1978,9 +1978,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1978
1978
  class: normalizeClass([{ "search-top-extra--ml": __props.showInput }, "search-top-extra"])
1979
1979
  }, [
1980
1980
  renderSlot(_ctx.$slots, "default", {}, void 0, true),
1981
- unref(slots).text1 ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
1982
- __props.text1 ? (openBlock(), createElementBlock("span", _hoisted_7$1, toDisplayString(__props.text1) + ":", 1)) : createCommentVNode("", true),
1983
- createElementVNode("div", _hoisted_8$1, [
1981
+ unref(slots).text1 ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
1982
+ __props.text1 ? (openBlock(), createElementBlock("span", _hoisted_7$2, toDisplayString(__props.text1) + ":", 1)) : createCommentVNode("", true),
1983
+ createElementVNode("div", _hoisted_8$2, [
1984
1984
  renderSlot(_ctx.$slots, "text1", {}, void 0, true)
1985
1985
  ])
1986
1986
  ])) : createCommentVNode("", true),
@@ -2156,22 +2156,22 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2156
2156
  };
2157
2157
  }
2158
2158
  });
2159
- const XSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-0c479461"]]);
2160
- const _hoisted_1 = { class: "x-split-layout__sidebar-menu" };
2161
- const _hoisted_2 = ["onClick"];
2162
- const _hoisted_3 = { class: "x-split-layout__menu-icon" };
2163
- const _hoisted_4 = { class: "x-split-layout__menu-label" };
2164
- const _hoisted_5 = { class: "x-split-layout__content" };
2165
- const _hoisted_6 = {
2159
+ const XSearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-0c479461"]]);
2160
+ const _hoisted_1$1 = { class: "x-split-layout__sidebar-menu" };
2161
+ const _hoisted_2$1 = ["onClick"];
2162
+ const _hoisted_3$1 = { class: "x-split-layout__menu-icon" };
2163
+ const _hoisted_4$1 = { class: "x-split-layout__menu-label" };
2164
+ const _hoisted_5$1 = { class: "x-split-layout__content" };
2165
+ const _hoisted_6$1 = {
2166
2166
  key: 0,
2167
2167
  class: "x-split-layout__content-header"
2168
2168
  };
2169
- const _hoisted_7 = { class: "x-split-layout__content-title" };
2170
- const _hoisted_8 = {
2169
+ const _hoisted_7$1 = { class: "x-split-layout__content-title" };
2170
+ const _hoisted_8$1 = {
2171
2171
  key: 1,
2172
2172
  class: "x-split-layout__content-footer"
2173
2173
  };
2174
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2174
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2175
2175
  __name: "XSplitLayout",
2176
2176
  props: {
2177
2177
  height: { type: String, default: "100%" },
@@ -2288,7 +2288,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2288
2288
  }), 128))
2289
2289
  ], true)
2290
2290
  ], 4)) : createCommentVNode("", true),
2291
- createElementVNode("div", _hoisted_1, [
2291
+ createElementVNode("div", _hoisted_1$1, [
2292
2292
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.menuItems, (item, index2) => {
2293
2293
  return openBlock(), createElementBlock("div", {
2294
2294
  key: index2,
@@ -2300,26 +2300,26 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2300
2300
  index: index2,
2301
2301
  active: activeIndex.value === index2
2302
2302
  }, () => [
2303
- createElementVNode("span", _hoisted_3, [
2303
+ createElementVNode("span", _hoisted_3$1, [
2304
2304
  createElementVNode("span", {
2305
2305
  class: normalizeClass(["x-split-layout__menu-dot", { "is-active-dot": activeIndex.value === index2 }])
2306
2306
  }, null, 2)
2307
2307
  ]),
2308
- createElementVNode("span", _hoisted_4, toDisplayString(item[__props.menuLabelKey]), 1)
2308
+ createElementVNode("span", _hoisted_4$1, toDisplayString(item[__props.menuLabelKey]), 1)
2309
2309
  ], true),
2310
2310
  renderSlot(_ctx.$slots, "menu-item-right", {
2311
2311
  item,
2312
2312
  index: index2,
2313
2313
  active: activeIndex.value === index2
2314
2314
  }, void 0, true)
2315
- ], 10, _hoisted_2);
2315
+ ], 10, _hoisted_2$1);
2316
2316
  }), 128))
2317
2317
  ]),
2318
2318
  renderSlot(_ctx.$slots, "sidebar-right", {}, void 0, true)
2319
2319
  ], 4),
2320
- createElementVNode("div", _hoisted_5, [
2321
- showContentHeader.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
2322
- createElementVNode("div", _hoisted_7, [
2320
+ createElementVNode("div", _hoisted_5$1, [
2321
+ showContentHeader.value ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
2322
+ createElementVNode("div", _hoisted_7$1, [
2323
2323
  renderSlot(_ctx.$slots, "content-title", {}, () => [
2324
2324
  createElementVNode("span", null, toDisplayString(currentContentTitle.value), 1)
2325
2325
  ], true)
@@ -2338,7 +2338,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2338
2338
  }, void 0, true)
2339
2339
  ], 4)
2340
2340
  ], 2),
2341
- showActions.value ? (openBlock(), createElementBlock("div", _hoisted_8, [
2341
+ showActions.value ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
2342
2342
  renderSlot(_ctx.$slots, "actions", {}, () => [
2343
2343
  createVNode(_component_el_button, { onClick: handleCancel }, {
2344
2344
  default: withCtx(() => _cache[0] || (_cache[0] = [
@@ -2374,8 +2374,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2374
2374
  };
2375
2375
  }
2376
2376
  });
2377
- const XSplitLayout = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-c57f39a8"]]);
2378
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2377
+ const XSplitLayout = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-c57f39a8"]]);
2378
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2379
2379
  __name: "XSwitch",
2380
2380
  props: {
2381
2381
  modelValue: {
@@ -2463,7 +2463,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2463
2463
  };
2464
2464
  }
2465
2465
  });
2466
- const _sfc_main = /* @__PURE__ */ defineComponent({
2466
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2467
2467
  __name: "XVxeColumn",
2468
2468
  props: {
2469
2469
  title: {
@@ -2549,20 +2549,540 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2549
2549
  };
2550
2550
  }
2551
2551
  });
2552
- const XVxeColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8ace2083"]]);
2552
+ const XVxeColumn = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-8ace2083"]]);
2553
+ function createSearchApi(serverBaseURL) {
2554
+ const request = createRequest({ baseURL: serverBaseURL });
2555
+ return {
2556
+ // 获取设置的列表
2557
+ listByCurrentUser(data) {
2558
+ return request({
2559
+ url: "/plugin/system/field/user/listByCurrentUser",
2560
+ method: "post",
2561
+ data: { systemId: "1233849248630274", systemName: "进销存", ...data }
2562
+ });
2563
+ },
2564
+ // 新增系统
2565
+ sysSave(data) {
2566
+ return request({ url: "/plugin/system/save", method: "post", data });
2567
+ },
2568
+ // 查询系统
2569
+ sysList(data) {
2570
+ return request({ url: "/plugin/system/list", method: "post", data });
2571
+ },
2572
+ // 新增模块、页面
2573
+ moduleSave(data) {
2574
+ return request({ url: "/plugin/module/save", method: "post", data });
2575
+ },
2576
+ // 获取模块、页面
2577
+ moduleList(data) {
2578
+ return request({ url: "/plugin/module/list", method: "post", params: data });
2579
+ },
2580
+ // 新增页面字段
2581
+ saveOrUpdate(data) {
2582
+ return request({ url: "/plugin/system/field/saveOrUpdate", method: "post", data });
2583
+ }
2584
+ };
2585
+ }
2586
+ const _hoisted_1 = { class: "search-bar-config" };
2587
+ const _hoisted_2 = { class: "section" };
2588
+ const _hoisted_3 = { class: "section__body" };
2589
+ const _hoisted_4 = { class: "section" };
2590
+ const _hoisted_5 = { class: "section__body" };
2591
+ const _hoisted_6 = { class: "section" };
2592
+ const _hoisted_7 = { class: "section__body section__body--grid" };
2593
+ const _hoisted_8 = { class: "section__body section__body--grid" };
2594
+ const _sfc_main = /* @__PURE__ */ defineComponent({
2595
+ __name: "SearchBar",
2596
+ props: {
2597
+ serverBaseURL: {
2598
+ type: String,
2599
+ required: true
2600
+ },
2601
+ systemId: {
2602
+ type: String,
2603
+ required: true
2604
+ }
2605
+ },
2606
+ setup(__props) {
2607
+ const props = __props;
2608
+ const api = createSearchApi(props.serverBaseURL);
2609
+ const formRef = ref();
2610
+ const form1Ref = ref();
2611
+ const form2Ref = ref();
2612
+ const form = reactive({
2613
+ systemName: "",
2614
+ status: 1
2615
+ });
2616
+ const form1 = reactive({
2617
+ moduleCode: "",
2618
+ moduleName: "",
2619
+ status: 1
2620
+ });
2621
+ const fieldTypeOptions = [
2622
+ { label: "文本框", value: "el-input" },
2623
+ { label: "下拉框", value: "el-select" },
2624
+ { label: "日期选择器", value: "el-date-picker" },
2625
+ { label: "级联选择器", value: "el-cascader" },
2626
+ { label: "部门选择", value: "h-select-tree-dep" },
2627
+ { label: "所选组织名称", value: "h-select-org" }
2628
+ ];
2629
+ const form2 = reactive({
2630
+ attribute: "",
2631
+ fieldJavaName: "",
2632
+ fieldName: "",
2633
+ fieldType: "el-input",
2634
+ isRequire: "0",
2635
+ moduleId: "",
2636
+ dictKey: "",
2637
+ selType: "3",
2638
+ status: 1,
2639
+ isCache: false
2640
+ });
2641
+ const rules = reactive({});
2642
+ const rules1 = reactive({});
2643
+ const rules2 = reactive({});
2644
+ const moduleList = ref([]);
2645
+ watch(() => form2.fieldName, () => handleFieldChange(), { immediate: true });
2646
+ watch(() => form2.fieldType, () => handleFieldChange(), { immediate: true });
2647
+ watch(() => form2.selType, () => selTypeFieldChange(), { immediate: true });
2648
+ function selTypeFieldChange() {
2649
+ const newVal = form2.selType;
2650
+ if (newVal === "1") {
2651
+ form2.dictKey = JSON.stringify({ type: "dict", label: "dictLabel", value: "dictValue", key: "" }, null, 2);
2652
+ } else if (newVal === "2") {
2653
+ form2.dictKey = JSON.stringify({ type: "compound", label: "label", value: "value", url: "" }, null, 2);
2654
+ } else {
2655
+ form2.dictKey = JSON.stringify({ type: "normal", label: "label", value: "value", key: "" }, null, 2);
2656
+ }
2657
+ }
2658
+ function handleFieldChange() {
2659
+ const newVal = form2.fieldType;
2660
+ if (newVal === "el-input") {
2661
+ form2.attribute = JSON.stringify({ placeholder: "请输入" + form2.fieldName, clearable: true }, null, 2);
2662
+ form2.dictKey = "{}";
2663
+ } else if (newVal === "el-select") {
2664
+ form2.attribute = JSON.stringify({ placeholder: "请选择" + form2.fieldName, filterable: true, clearable: true }, null, 2);
2665
+ } else if (newVal === "el-date-picker") {
2666
+ if (form2.fieldName.indexOf("日期") > -1) {
2667
+ form2.attribute = JSON.stringify({ type: "date", placeholder: "请选择" + form2.fieldName, "value-format": "YYYY-MM-DD", clearable: true }, null, 2);
2668
+ } else {
2669
+ form2.attribute = JSON.stringify({ type: "date", placeholder: "请选择" + form2.fieldName, "value-format": "YYYY-MM-DD HH:mm:ss", clearable: true }, null, 2);
2670
+ }
2671
+ } else if (newVal === "h-select-org") {
2672
+ form2.fieldName = "所选组织名称";
2673
+ form2.fieldJavaName = "orgIds";
2674
+ form2.attribute = JSON.stringify({ placeholder: "请选择" + form2.fieldName, filterable: true, multiple: true, disabled: false, clearable: false }, null, 2);
2675
+ } else {
2676
+ form2.attribute = "{}";
2677
+ }
2678
+ }
2679
+ function getModuleList() {
2680
+ api.moduleList({ systemId: props.systemId }).then((res) => {
2681
+ moduleList.value = res.data;
2682
+ if (moduleList.value.length > 0) {
2683
+ form2.moduleId = moduleList.value[moduleList.value.length - 1].id;
2684
+ }
2685
+ });
2686
+ }
2687
+ function subSys() {
2688
+ var _a;
2689
+ (_a = formRef.value) == null ? void 0 : _a.validate((valid) => {
2690
+ if (valid) {
2691
+ api.sysSave(form).then(() => {
2692
+ ElMessage.success("保存成功");
2693
+ });
2694
+ }
2695
+ });
2696
+ }
2697
+ function subSys1() {
2698
+ var _a;
2699
+ (_a = form1Ref.value) == null ? void 0 : _a.validate((valid) => {
2700
+ if (valid) {
2701
+ form1.systemId = props.systemId;
2702
+ api.moduleSave(form1).then(() => {
2703
+ ElMessage.success("保存成功");
2704
+ getModuleList();
2705
+ });
2706
+ }
2707
+ });
2708
+ }
2709
+ function subSys2() {
2710
+ var _a;
2711
+ (_a = form2Ref.value) == null ? void 0 : _a.validate((valid) => {
2712
+ if (valid) {
2713
+ const data = JSON.parse(JSON.stringify(form2));
2714
+ data.systemId = props.systemId;
2715
+ api.saveOrUpdate({ fieldList: [data] }).then(() => {
2716
+ ElMessage.success("保存成功");
2717
+ form2.fieldJavaName = "";
2718
+ if (!form2.isCache) {
2719
+ form2.fieldName = "";
2720
+ }
2721
+ });
2722
+ }
2723
+ });
2724
+ }
2725
+ onMounted(() => {
2726
+ getModuleList();
2727
+ });
2728
+ return (_ctx, _cache) => {
2729
+ const _component_el_input = resolveComponent("el-input");
2730
+ const _component_el_form_item = resolveComponent("el-form-item");
2731
+ const _component_el_button = resolveComponent("el-button");
2732
+ const _component_el_form = resolveComponent("el-form");
2733
+ const _component_el_option = resolveComponent("el-option");
2734
+ const _component_el_select = resolveComponent("el-select");
2735
+ const _component_el_checkbox = resolveComponent("el-checkbox");
2736
+ return openBlock(), createElementBlock("div", _hoisted_1, [
2737
+ createVNode(_component_el_form, {
2738
+ rules,
2739
+ model: form,
2740
+ ref_key: "formRef",
2741
+ ref: formRef,
2742
+ "label-suffix": ":",
2743
+ "hide-required-asterisk": "",
2744
+ "show-message": ""
2745
+ }, {
2746
+ default: withCtx(() => [
2747
+ createElementVNode("div", _hoisted_2, [
2748
+ _cache[13] || (_cache[13] = createElementVNode("div", { class: "section__title" }, "系统配置", -1)),
2749
+ createElementVNode("div", _hoisted_3, [
2750
+ createVNode(_component_el_form_item, {
2751
+ label: "系统名称",
2752
+ prop: "systemName",
2753
+ class: "form-item--auto"
2754
+ }, {
2755
+ default: withCtx(() => [
2756
+ createVNode(_component_el_input, {
2757
+ modelValue: form.systemName,
2758
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => form.systemName = $event),
2759
+ placeholder: "请输入系统名称"
2760
+ }, null, 8, ["modelValue"])
2761
+ ]),
2762
+ _: 1
2763
+ }),
2764
+ createVNode(_component_el_form_item, { class: "form-item--btn" }, {
2765
+ default: withCtx(() => [
2766
+ createVNode(_component_el_button, {
2767
+ type: "primary",
2768
+ onClick: subSys
2769
+ }, {
2770
+ default: withCtx(() => _cache[12] || (_cache[12] = [
2771
+ createTextVNode("提交")
2772
+ ])),
2773
+ _: 1,
2774
+ __: [12]
2775
+ })
2776
+ ]),
2777
+ _: 1
2778
+ })
2779
+ ])
2780
+ ])
2781
+ ]),
2782
+ _: 1
2783
+ }, 8, ["rules", "model"]),
2784
+ createVNode(_component_el_form, {
2785
+ rules: rules1,
2786
+ model: form1,
2787
+ ref_key: "form1Ref",
2788
+ ref: form1Ref,
2789
+ "label-suffix": ":",
2790
+ "hide-required-asterisk": "",
2791
+ "show-message": ""
2792
+ }, {
2793
+ default: withCtx(() => [
2794
+ createElementVNode("div", _hoisted_4, [
2795
+ _cache[15] || (_cache[15] = createElementVNode("div", { class: "section__title" }, "模块/页面配置", -1)),
2796
+ createElementVNode("div", _hoisted_5, [
2797
+ createVNode(_component_el_form_item, {
2798
+ label: "模块/页面code",
2799
+ prop: "moduleCode",
2800
+ class: "form-item--auto"
2801
+ }, {
2802
+ default: withCtx(() => [
2803
+ createVNode(_component_el_input, {
2804
+ modelValue: form1.moduleCode,
2805
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form1.moduleCode = $event),
2806
+ placeholder: "请输入"
2807
+ }, null, 8, ["modelValue"])
2808
+ ]),
2809
+ _: 1
2810
+ }),
2811
+ createVNode(_component_el_form_item, {
2812
+ label: "模块/页面名称",
2813
+ prop: "moduleName",
2814
+ class: "form-item--auto"
2815
+ }, {
2816
+ default: withCtx(() => [
2817
+ createVNode(_component_el_input, {
2818
+ modelValue: form1.moduleName,
2819
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => form1.moduleName = $event),
2820
+ placeholder: "请输入"
2821
+ }, null, 8, ["modelValue"])
2822
+ ]),
2823
+ _: 1
2824
+ }),
2825
+ createVNode(_component_el_form_item, { class: "form-item--btn" }, {
2826
+ default: withCtx(() => [
2827
+ createVNode(_component_el_button, {
2828
+ type: "primary",
2829
+ onClick: subSys1
2830
+ }, {
2831
+ default: withCtx(() => _cache[14] || (_cache[14] = [
2832
+ createTextVNode("提交")
2833
+ ])),
2834
+ _: 1,
2835
+ __: [14]
2836
+ })
2837
+ ]),
2838
+ _: 1
2839
+ })
2840
+ ])
2841
+ ])
2842
+ ]),
2843
+ _: 1
2844
+ }, 8, ["rules", "model"]),
2845
+ createVNode(_component_el_form, {
2846
+ rules: rules2,
2847
+ model: form2,
2848
+ ref_key: "form2Ref",
2849
+ ref: form2Ref,
2850
+ "label-suffix": ":",
2851
+ "hide-required-asterisk": "",
2852
+ "show-message": ""
2853
+ }, {
2854
+ default: withCtx(() => [
2855
+ createElementVNode("div", _hoisted_6, [
2856
+ _cache[18] || (_cache[18] = createElementVNode("div", { class: "section__title" }, "字段配置", -1)),
2857
+ createElementVNode("div", _hoisted_7, [
2858
+ createVNode(_component_el_form_item, {
2859
+ label: "模块/页面",
2860
+ prop: "moduleId"
2861
+ }, {
2862
+ default: withCtx(() => [
2863
+ createVNode(_component_el_select, {
2864
+ clearable: "",
2865
+ filterable: "",
2866
+ modelValue: form2.moduleId,
2867
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => form2.moduleId = $event),
2868
+ placeholder: "请选择"
2869
+ }, {
2870
+ default: withCtx(() => [
2871
+ (openBlock(true), createElementBlock(Fragment, null, renderList(moduleList.value, (item, index2) => {
2872
+ return openBlock(), createBlock(_component_el_option, {
2873
+ key: index2,
2874
+ label: item.moduleName,
2875
+ value: item.id
2876
+ }, null, 8, ["label", "value"]);
2877
+ }), 128))
2878
+ ]),
2879
+ _: 1
2880
+ }, 8, ["modelValue"])
2881
+ ]),
2882
+ _: 1
2883
+ }),
2884
+ createVNode(_component_el_form_item, {
2885
+ label: "字段名称",
2886
+ prop: "fieldName"
2887
+ }, {
2888
+ default: withCtx(() => [
2889
+ createVNode(_component_el_input, {
2890
+ modelValue: form2.fieldName,
2891
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => form2.fieldName = $event),
2892
+ placeholder: "请输入"
2893
+ }, null, 8, ["modelValue"])
2894
+ ]),
2895
+ _: 1
2896
+ }),
2897
+ createVNode(_component_el_form_item, {
2898
+ label: "字段Java名称",
2899
+ prop: "fieldJavaName"
2900
+ }, {
2901
+ default: withCtx(() => [
2902
+ createVNode(_component_el_input, {
2903
+ modelValue: form2.fieldJavaName,
2904
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => form2.fieldJavaName = $event),
2905
+ placeholder: "请输入"
2906
+ }, null, 8, ["modelValue"])
2907
+ ]),
2908
+ _: 1
2909
+ }),
2910
+ createVNode(_component_el_form_item, {
2911
+ label: "字段类型",
2912
+ prop: "fieldType"
2913
+ }, {
2914
+ default: withCtx(() => [
2915
+ createVNode(_component_el_select, {
2916
+ clearable: "",
2917
+ filterable: "",
2918
+ modelValue: form2.fieldType,
2919
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => form2.fieldType = $event),
2920
+ placeholder: "请选择"
2921
+ }, {
2922
+ default: withCtx(() => [
2923
+ (openBlock(), createElementBlock(Fragment, null, renderList(fieldTypeOptions, (item, index2) => {
2924
+ return createVNode(_component_el_option, {
2925
+ key: index2,
2926
+ label: item.label,
2927
+ value: item.value
2928
+ }, null, 8, ["label", "value"]);
2929
+ }), 64))
2930
+ ]),
2931
+ _: 1
2932
+ }, 8, ["modelValue"])
2933
+ ]),
2934
+ _: 1
2935
+ }),
2936
+ ["el-cascader", "el-select"].includes(form2.fieldType) ? (openBlock(), createBlock(_component_el_form_item, {
2937
+ key: 0,
2938
+ label: "下拉框类别",
2939
+ prop: "selType"
2940
+ }, {
2941
+ default: withCtx(() => [
2942
+ createVNode(_component_el_select, {
2943
+ clearable: "",
2944
+ filterable: "",
2945
+ modelValue: form2.selType,
2946
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => form2.selType = $event),
2947
+ placeholder: "请选择"
2948
+ }, {
2949
+ default: withCtx(() => [
2950
+ createVNode(_component_el_option, {
2951
+ label: "字典下拉框",
2952
+ value: "1"
2953
+ }),
2954
+ createVNode(_component_el_option, {
2955
+ label: "复合型下拉框",
2956
+ value: "2"
2957
+ }),
2958
+ createVNode(_component_el_option, {
2959
+ label: "普通下拉框",
2960
+ value: "3"
2961
+ })
2962
+ ]),
2963
+ _: 1
2964
+ }, 8, ["modelValue"])
2965
+ ]),
2966
+ _: 1
2967
+ })) : createCommentVNode("", true),
2968
+ createVNode(_component_el_form_item, {
2969
+ label: "是否必填",
2970
+ prop: "isRequire"
2971
+ }, {
2972
+ default: withCtx(() => [
2973
+ createVNode(_component_el_select, {
2974
+ clearable: "",
2975
+ filterable: "",
2976
+ modelValue: form2.isRequire,
2977
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => form2.isRequire = $event),
2978
+ placeholder: "请选择"
2979
+ }, {
2980
+ default: withCtx(() => [
2981
+ createVNode(_component_el_option, {
2982
+ label: "是",
2983
+ value: "1"
2984
+ }),
2985
+ createVNode(_component_el_option, {
2986
+ label: "否",
2987
+ value: "0"
2988
+ })
2989
+ ]),
2990
+ _: 1
2991
+ }, 8, ["modelValue"])
2992
+ ]),
2993
+ _: 1
2994
+ }),
2995
+ createVNode(_component_el_form_item, {
2996
+ label: "是否缓存",
2997
+ prop: "isCache"
2998
+ }, {
2999
+ default: withCtx(() => [
3000
+ createVNode(_component_el_checkbox, {
3001
+ modelValue: form2.isCache,
3002
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => form2.isCache = $event)
3003
+ }, {
3004
+ default: withCtx(() => _cache[16] || (_cache[16] = [
3005
+ createTextVNode("缓存")
3006
+ ])),
3007
+ _: 1,
3008
+ __: [16]
3009
+ }, 8, ["modelValue"])
3010
+ ]),
3011
+ _: 1
3012
+ })
3013
+ ]),
3014
+ createElementVNode("div", _hoisted_8, [
3015
+ createVNode(_component_el_form_item, {
3016
+ label: "字段属性",
3017
+ prop: "attribute",
3018
+ class: "form-item--span2"
3019
+ }, {
3020
+ default: withCtx(() => [
3021
+ createVNode(_component_el_input, {
3022
+ modelValue: form2.attribute,
3023
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => form2.attribute = $event),
3024
+ placeholder: "请输入",
3025
+ type: "textarea",
3026
+ rows: 3
3027
+ }, null, 8, ["modelValue"])
3028
+ ]),
3029
+ _: 1
3030
+ }),
3031
+ createVNode(_component_el_form_item, {
3032
+ label: "额外属性",
3033
+ prop: "dictKey",
3034
+ class: "form-item--span2"
3035
+ }, {
3036
+ default: withCtx(() => [
3037
+ createVNode(_component_el_input, {
3038
+ modelValue: form2.dictKey,
3039
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => form2.dictKey = $event),
3040
+ placeholder: "请输入",
3041
+ type: "textarea",
3042
+ rows: 3
3043
+ }, null, 8, ["modelValue"])
3044
+ ]),
3045
+ _: 1
3046
+ }),
3047
+ createVNode(_component_el_form_item, { class: "form-item--btn" }, {
3048
+ default: withCtx(() => [
3049
+ createVNode(_component_el_button, {
3050
+ type: "primary",
3051
+ onClick: subSys2
3052
+ }, {
3053
+ default: withCtx(() => _cache[17] || (_cache[17] = [
3054
+ createTextVNode("提交")
3055
+ ])),
3056
+ _: 1,
3057
+ __: [17]
3058
+ })
3059
+ ]),
3060
+ _: 1
3061
+ })
3062
+ ])
3063
+ ])
3064
+ ]),
3065
+ _: 1
3066
+ }, 8, ["rules", "model"])
3067
+ ]);
3068
+ };
3069
+ }
3070
+ });
3071
+ const XSearchBarConfig = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e465bd38"]]);
2553
3072
  const components = {
2554
3073
  XDatePicker,
2555
3074
  XElForm,
2556
3075
  XElFormItem,
2557
- XElOption: _sfc_main$8,
2558
- XElSelect: _sfc_main$7,
3076
+ XElOption: _sfc_main$9,
3077
+ XElSelect: _sfc_main$8,
2559
3078
  XPagination,
2560
3079
  XReportTable,
2561
3080
  XSearchBar,
2562
3081
  XSplitLayout,
2563
- XSwitch: _sfc_main$1,
3082
+ XSwitch: _sfc_main$2,
2564
3083
  XVxeColumn,
2565
- XVxeTable
3084
+ XVxeTable,
3085
+ XSearchBarConfig
2566
3086
  };
2567
3087
  const install = (app) => {
2568
3088
  Object.keys(components).forEach((key) => {
@@ -2584,13 +3104,14 @@ export {
2584
3104
  XDatePicker,
2585
3105
  XElForm,
2586
3106
  XElFormItem,
2587
- _sfc_main$8 as XElOption,
2588
- _sfc_main$7 as XElSelect,
3107
+ _sfc_main$9 as XElOption,
3108
+ _sfc_main$8 as XElSelect,
2589
3109
  XPagination,
2590
3110
  XReportTable,
2591
3111
  XSearchBar,
3112
+ XSearchBarConfig,
2592
3113
  XSplitLayout,
2593
- _sfc_main$1 as XSwitch,
3114
+ _sfc_main$2 as XSwitch,
2594
3115
  XVxeColumn,
2595
3116
  XVxeTable,
2596
3117
  index as default,