slw 0.8.5 → 0.8.6

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/lib/index.js CHANGED
@@ -8511,7 +8511,7 @@ PictureUpload.name = "slw-picture-upload";
8511
8511
  PictureUpload.install = (Q) => {
8512
8512
  Q.component(PictureUpload.name, PictureUpload);
8513
8513
  };
8514
- const windowGrid_vue_vue_type_style_index_0_scoped_516f3b2e_lang = "", _withScopeId$3 = (Q) => (pushScopeId("data-v-516f3b2e"), Q = Q(), popScopeId(), Q), _hoisted_1$kW = {
8514
+ const windowGrid_vue_vue_type_style_index_0_scoped_125e7a8a_lang = "", _withScopeId$3 = (Q) => (pushScopeId("data-v-125e7a8a"), Q = Q(), popScopeId(), Q), _hoisted_1$kW = {
8515
8515
  class: "slw-window-grid-container",
8516
8516
  style: { height: "100%" }
8517
8517
  }, _hoisted_2$kS = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-main-area" }, null, -1)), _hoisted_3$hT = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-active-area" }, null, -1)), _hoisted_4$au = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-copy-area" }, null, -1)), _hoisted_5$4U = [
@@ -8548,7 +8548,10 @@ const windowGrid_vue_vue_type_style_index_0_scoped_516f3b2e_lang = "", _withScop
8548
8548
  { code: "contract", name: $T("收缩节点"), disabled: !1 }
8549
8549
  ]
8550
8550
  ]), editBtn = ref(null), exportButton = ref(null), uploadData = ref({}), queryTimeout = ref(null), formSelectMap = ref({}), isEditGridInitData = ref(!1);
8551
- const preTag = computed(() => gridData.value.params.preTag || ""), showButtons = (Q) => gridData.value.toolbarConfig.buttons.filter(
8551
+ const preTag = computed(() => gridData.value.params.preTag || ""), computeExcelUrl = computed(() => {
8552
+ let Q = getCurRegion();
8553
+ return Q.params.newImportUrl ? Q.params.newImportUrl : importUrl.value;
8554
+ }), showButtons = (Q) => gridData.value.toolbarConfig.buttons.filter(
8552
8555
  (H) => H.showInGrid && (gridData.value.type === "TREE" || gridData.value.type === "TREE_STRUCTURE" || H.btnShowInGrid[Q])
8553
8556
  ), $modal = $Modal, $Message = ref({
8554
8557
  success(Q) {
@@ -8889,7 +8892,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_516f3b2e_lang = "", _withScop
8889
8892
  });
8890
8893
  const K = {}, ee = gridData.value.columns;
8891
8894
  for (let ne = 0; ne < ee.length; ne++)
8892
- ee[ne].editRender && (K[ee[ne].field] = "");
8895
+ ee[ne].editRender && (K[ee[ne].field] = ee[ne].editRender.name == "ElInputNumber" ? null : "");
8893
8896
  if (gridData.value.params.parentRowId && (K[gridData.value.params.parentRowId] = gridData.value.params.parentRowIdValue), K._button_id = Q._button_id, gridData.value.type === "EDIT_GRID") {
8894
8897
  const ne = getGrid();
8895
8898
  K._region_id = gridData.value.params._region_id;
@@ -9206,7 +9209,8 @@ const windowGrid_vue_vue_type_style_index_0_scoped_516f3b2e_lang = "", _withScop
9206
9209
  }, importSuccess = (Q, H) => {
9207
9210
  Q.result && (isImport.value = !1, reload()), $vxeMessage({ content: Q.msg, status: "info", zIndex: 3e3 });
9208
9211
  }, downTemplate = () => {
9209
- axios.download("/window/downloadTemplate", {
9212
+ let Q = getCurRegion(), H = Q.params.newDownTemplateUrl ? Q.params.newDownTemplateUrl : "/window/downloadTemplate";
9213
+ axios.download(H, {
9210
9214
  _region_id: gridData.value.params._region_id
9211
9215
  });
9212
9216
  }, confirm = (Q, H) => {
@@ -9797,6 +9801,14 @@ const windowGrid_vue_vue_type_style_index_0_scoped_516f3b2e_lang = "", _withScop
9797
9801
  const { form: X } = H.getProxyInfo();
9798
9802
  return X;
9799
9803
  }
9804
+ }, setImportUrl = (Q) => {
9805
+ const H = ref(`${(axios == null ? void 0 : axios.baseUrl) || ""}${Q}`);
9806
+ let X = getCurRegion();
9807
+ X.params.newImportUrl = H.value;
9808
+ }, setDownTemplateUrl = (Q) => {
9809
+ const H = Q;
9810
+ let X = getCurRegion();
9811
+ X.params.newDownTemplateUrl = H;
9800
9812
  };
9801
9813
  return onMounted(async () => {
9802
9814
  gridData.value.addListener && getCurRegion() && addListener(), gridData.value.type === "TREE_STRUCTURE" && (gridData.value.menuConfig = {
@@ -9999,7 +10011,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_516f3b2e_lang = "", _withScop
9999
10011
  ref: "uploadExcel",
10000
10012
  type: "drag",
10001
10013
  drag: "",
10002
- action: unref(importUrl),
10014
+ action: computeExcelUrl.value,
10003
10015
  headers: unref(httpHeaders)(),
10004
10016
  accept: ".xls,.xlsx",
10005
10017
  data: unref(uploadData),
@@ -10038,7 +10050,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_516f3b2e_lang = "", _withScop
10038
10050
  ]);
10039
10051
  };
10040
10052
  }
10041
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-516f3b2e"]]);
10053
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-125e7a8a"]]);
10042
10054
  WindowGrid.name = "slw-window-grid";
10043
10055
  WindowGrid.install = (Q) => {
10044
10056
  Q.component(WindowGrid.name, WindowGrid);
@@ -38875,7 +38887,7 @@ var js = js$1.exports;
38875
38887
  })(Q);
38876
38888
  })(js$1);
38877
38889
  var jsExports = js$1.exports;
38878
- const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_vue_vue_type_style_index_0_scoped_f7624df7_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-f7624df7"), Q = Q(), popScopeId(), Q), _hoisted_1$kV = { class: "slw-window-form" }, _hoisted_2$kR = {
38890
+ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_vue_vue_type_style_index_0_scoped_3bc1a474_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-3bc1a474"), Q = Q(), popScopeId(), Q), _hoisted_1$kV = { class: "slw-window-form" }, _hoisted_2$kR = {
38879
38891
  key: 0,
38880
38892
  style: { "text-align": "left", "font-size": "18px", "line-height": "30px", "font-weight": "bold", padding: "5px 30px 0 15px" }
38881
38893
  }, _hoisted_3$hS = ["onClick"], _sfc_main$5 = {
@@ -39537,6 +39549,14 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
39537
39549
  (G) => G.field == Q.toUpperCase()
39538
39550
  )[0], X = [];
39539
39551
  return H && (X = H.itemRender.options), X;
39552
+ }, setFieldName = (Q, H) => {
39553
+ let X = formConfig.value.columns.filter(
39554
+ (G) => G.field == Q.toUpperCase()
39555
+ )[0];
39556
+ if (X) {
39557
+ const G = X.itemRender.props.unitName ? H + "(" + X.itemRender.props.unitName + ")" : H;
39558
+ X.title = G;
39559
+ }
39540
39560
  }, footerSum = () => {
39541
39561
  }, throwFunction = (Q) => {
39542
39562
  Q.getData = () => getData(), Q.submitData = () => submitData(), Q.getValue = (H) => getValue(H), Q.setValue = (H, X) => setValue(H, X);
@@ -39609,7 +39629,7 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
39609
39629
  }, 1032, ["modelValue", "onUpdate:modelValue", "onKeyup", "onChange"])
39610
39630
  ]),
39611
39631
  key: "1"
39612
- } : ne.itemRender.props.suffixIcon || ne.itemRender.props.prefixIcon ? {
39632
+ } : ne.itemRender.props.suffixIconfont || ne.itemRender.props.prefixIconfont ? {
39613
39633
  name: "default",
39614
39634
  fn: withCtx(() => [
39615
39635
  createVNode(X, {
@@ -39618,21 +39638,25 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
39618
39638
  onKeyup: (re) => onIconInputEnter(ne, re),
39619
39639
  onChange: (re) => onIconInputChange(ne)
39620
39640
  }, createSlots({ _: 2 }, [
39621
- ne.itemRender.props.suffixIcon ? {
39641
+ ne.itemRender.props.suffixIconfont ? {
39622
39642
  name: "suffix",
39623
39643
  fn: withCtx(() => [
39624
39644
  createElementVNode("i", {
39625
- class: normalizeClass("iconfont " + ne.itemRender.props.suffixIcon),
39645
+ class: normalizeClass(
39646
+ "iconfont " + ne.itemRender.props.suffixIconfont
39647
+ ),
39626
39648
  onClick: (re) => onIconClick(ne),
39627
39649
  style: { cursor: "pointer" }
39628
39650
  }, null, 10, ["onClick"])
39629
39651
  ]),
39630
39652
  key: "0"
39631
- } : ne.itemRender.props.prefixIcon ? {
39653
+ } : ne.itemRender.props.prefixIconfont ? {
39632
39654
  name: "prefix",
39633
39655
  fn: withCtx(() => [
39634
39656
  createElementVNode("i", {
39635
- class: normalizeClass("iconfont " + ne.itemRender.props.prefixIcon),
39657
+ class: normalizeClass(
39658
+ "iconfont " + ne.itemRender.props.prefixIconfont
39659
+ ),
39636
39660
  onClick: (re) => onIconClick(ne),
39637
39661
  style: { cursor: "pointer" }
39638
39662
  }, null, 10, ["onClick"])
@@ -39733,7 +39757,7 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
39733
39757
  ]);
39734
39758
  };
39735
39759
  }
39736
- }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-f7624df7"]]);
39760
+ }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-3bc1a474"]]);
39737
39761
  WindowForm.name = "slw-window-form";
39738
39762
  WindowForm.install = (Q) => {
39739
39763
  Q.component(WindowForm.name, WindowForm);
@@ -124315,7 +124339,7 @@ function reConsole() {
124315
124339
  }
124316
124340
  }
124317
124341
  console.info(
124318
- "%cSLW %cVer 0.8.5",
124342
+ "%cSLW %cVer 0.8.6",
124319
124343
  "color:#409EFF;font-size: 22px;font-weight:bolder",
124320
124344
  "color:#999;font-size: 12px"
124321
124345
  );