slw 0.5.988 → 0.5.990

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_f0f3f800_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-f0f3f800"), Q = Q(), popScopeId(), Q), _hoisted_1$kW = {
8514
+ const windowGrid_vue_vue_type_style_index_0_scoped_7bf6b0d4_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-7bf6b0d4"), 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$2(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-main-area" }, null, -1)), _hoisted_3$hT = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-active-area" }, null, -1)), _hoisted_4$au = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-copy-area" }, null, -1)), _hoisted_5$4U = [
@@ -9684,15 +9684,37 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f0f3f800_lang = "", _withScop
9684
9684
  Q && (G = getRegion(Q));
9685
9685
  let X = G.getCheckboxRecords();
9686
9686
  setTimeout(() => {
9687
- let Z = G.$el.querySelector(".vxe-table--main-wrapper .vxe-table--body-wrapper table tbody");
9687
+ let Z = G.$el.querySelector(
9688
+ ".vxe-table--main-wrapper .vxe-table--body-wrapper table tbody"
9689
+ );
9688
9690
  if (Z.children.length > 0)
9689
9691
  for (let K of Z.children) {
9690
9692
  let ee = K.attributes.rowid.value;
9691
9693
  X.find((te) => te[G.rowId] == ee) && (K.style["background-color"] = H);
9692
9694
  }
9693
9695
  }, 500);
9696
+ }, setRowCellColor = (Q, H, G, X = "#e6f7ff") => {
9697
+ let Z = getCurRegion();
9698
+ Q && (Z = getRegion(Q)), setTimeout(() => {
9699
+ let K = Z.$el.querySelector(
9700
+ ".vxe-table--main-wrapper .vxe-table--body-wrapper table tbody"
9701
+ );
9702
+ if (K.children.length > 0) {
9703
+ for (let ee of K.children)
9704
+ if (ee.attributes.rowid.value == H) {
9705
+ for (let te of ee.children)
9706
+ if (te.attributes.class.value.includes(G.toUpperCase())) {
9707
+ te.style["background-color"] = X;
9708
+ return;
9709
+ }
9710
+ return;
9711
+ }
9712
+ }
9713
+ }, 500);
9694
9714
  }, onScanIconClick = (Q, H) => {
9695
- const G = gridData.value.formConfig.items.filter((X) => X.field == H)[0];
9715
+ const G = gridData.value.formConfig.items.filter(
9716
+ (X) => X.field == H
9717
+ )[0];
9696
9718
  G.itemRender.props.clickFunction && evalEvent(G.itemRender.props.clickFunction, Q, H);
9697
9719
  }, setFormValue = (Q, H) => {
9698
9720
  let G = gridData.value.formConfig.items.filter((X) => X.field == Q)[0];
@@ -9768,7 +9790,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f0f3f800_lang = "", _withScop
9768
9790
  search(Q);
9769
9791
  }, curRegion.value.getCheckedData = () => getCheckedData(), curRegion.value.getSelectRecord = () => getSelectRecord(), curRegion.value.setChecked = (Q) => {
9770
9792
  setChecked(Q);
9771
- }, curRegion.value.getParentRegion = () => getParentRegion(), curRegion.value.exportData = () => exportData(), curRegion.value.removeRow = (Q) => removeRow(), curRegion.value.clearGrid = () => clearGrid(), curRegion.value.setCheckboxRowColor = () => setCheckboxRowColor(), curRegion.value.setFormValue = () => setFormValue();
9793
+ }, curRegion.value.getParentRegion = () => getParentRegion(), curRegion.value.exportData = () => exportData(), curRegion.value.removeRow = (Q) => removeRow(), curRegion.value.clearGrid = () => clearGrid(), curRegion.value.setCheckboxRowColor = () => setCheckboxRowColor(), curRegion.value.setFormValue = () => setFormValue(), curRegion.value.setRowCellColor = () => setRowCellColor();
9772
9794
  }), onUnmounted(() => {
9773
9795
  document.removeEventListener("mousedown", tableOutDestroyAreaBox), document.removeEventListener("mouseup", tbodymouseup), document.removeEventListener("paste", ctrlVPaste), document.removeEventListener("copy", ctrlCopyAndCut), document.removeEventListener("cut", ctrlCopyAndCut);
9774
9796
  }), __expose({ gridReload, reload }), (Q, H) => {
@@ -9938,7 +9960,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f0f3f800_lang = "", _withScop
9938
9960
  ]);
9939
9961
  };
9940
9962
  }
9941
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-f0f3f800"]]);
9963
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-7bf6b0d4"]]);
9942
9964
  WindowGrid.name = "slw-window-grid";
9943
9965
  WindowGrid.install = (Q) => {
9944
9966
  Q.component(WindowGrid.name, WindowGrid);
@@ -37092,21 +37114,22 @@ const windowForm_vue_vue_type_style_index_0_lang = "", _hoisted_1$kV = { class:
37092
37114
  }), Q;
37093
37115
  });
37094
37116
  onMounted(async () => {
37117
+ var H;
37095
37118
  if (formConfig.value.params.linkUrl)
37096
37119
  return;
37097
37120
  formLoading.value = !0;
37098
37121
  let Q = !0;
37099
37122
  if (formConfig.value.formData) {
37100
37123
  formData.value = formConfig.value.formData, Q = formConfig.value.openType === "new";
37101
- for (const H in formConfig.value.columns)
37102
- formConfig.value.columns[H].dataType === "EDITOR" && formData.value[formConfig.value.columns[H].field] == null && (formData.value[formConfig.value.columns[H].field] = "");
37124
+ for (const G of formConfig.value.columns)
37125
+ G.dataType === "EDITOR" && formData.value[G.field] == null ? formData.value[G.field] = "" : ((H = G.itemRender) == null ? void 0 : H.name) == "ElSelect" && G.itemRender.props.multiple && (formData.value[G.field] = formData.value[G.field].split(","));
37103
37126
  } else
37104
- for (const H in formConfig.value.columns)
37105
- formConfig.value.columns[H].type !== "seq" && formConfig.value.columns[H].type !== "checkbox" && (formData.value[formConfig.value.columns[H].field] = "");
37106
- uploadConfig.value.dataId = formData.value[formConfig.value.rowId], uploadConfig.value.regionId = formConfig.value.params._region_id, uploadConfig.value.isHavePicUploadBtn = formConfig.value.params.isHavePicUploadBtn, uploadConfig.value.openType = formConfig.value.openType, computeNewLine(formConfig.value), formConfig.value.columns.forEach((H, G, X) => {
37107
- H.hasOwnProperty("field") && !H.hasOwnProperty("treeNode") && (H.events.change = onFieldChange, H.hasOwnProperty("search") && (H.events.search = remoteSearch), H.events.keyup = onFieldEnter, H.events.click = onFieldClick), (H == null ? void 0 : H.dataType) === "IMG" && (uploadConfig.value.isHaveImgField = !0);
37108
- }), formData.value._region_id = formConfig.value.params._region_id, await evalEvent(formConfig.value.params.formEvents.dataInit), await formInitData(formData.value, formConfig.value.params._region_id, Q), formConfig.value.params.queryParams && Object.keys(formConfig.value.params.queryParams).length > 0 && formConfig.value.params.queryParams.unQuery !== !0 && searchData(formConfig.value.params.queryParams), formConfig.value.columns.map((H) => {
37109
- H.hasOwnProperty("field") && !H.hasOwnProperty("treeNode") && (fieldColumnMap.value[H.field] = H);
37127
+ for (const G in formConfig.value.columns)
37128
+ formConfig.value.columns[G].type !== "seq" && formConfig.value.columns[G].type !== "checkbox" && (formData.value[formConfig.value.columns[G].field] = "");
37129
+ uploadConfig.value.dataId = formData.value[formConfig.value.rowId], uploadConfig.value.regionId = formConfig.value.params._region_id, uploadConfig.value.isHavePicUploadBtn = formConfig.value.params.isHavePicUploadBtn, uploadConfig.value.openType = formConfig.value.openType, computeNewLine(formConfig.value), formConfig.value.columns.forEach((G, X, Z) => {
37130
+ G.hasOwnProperty("field") && !G.hasOwnProperty("treeNode") && (G.events.change = onFieldChange, G.hasOwnProperty("search") && (G.events.search = remoteSearch), G.events.keyup = onFieldEnter, G.events.click = onFieldClick), (G == null ? void 0 : G.dataType) === "IMG" && (uploadConfig.value.isHaveImgField = !0);
37131
+ }), formData.value._region_id = formConfig.value.params._region_id, await evalEvent(formConfig.value.params.formEvents.dataInit), await formInitData(formData.value, formConfig.value.params._region_id, Q), formConfig.value.params.queryParams && Object.keys(formConfig.value.params.queryParams).length > 0 && formConfig.value.params.queryParams.unQuery !== !0 && searchData(formConfig.value.params.queryParams), formConfig.value.columns.map((G) => {
37132
+ G.hasOwnProperty("field") && !G.hasOwnProperty("treeNode") && (fieldColumnMap.value[G.field] = G);
37110
37133
  }), !formConfig.value.params.linkUrl && (formConfig.value.type === "FORM" ? (regionMap.value[formConfig.value.params.code + "-" + preTag.value] = form.value, regionMap.value[formConfig.value.params.code] = form.value) : regionMap.value["Edit-" + formConfig.value.params.code + "-" + preTag.value] = form.value, throwFunction(form.value), await evalEvent(formConfig.value.params.formEvents.regionInit), nextTick(() => {
37111
37134
  formDataClone.value = XEUtils$1.clone(toRaw(formData.value), !0);
37112
37135
  }), formLoading.value = !1);
@@ -37165,15 +37188,19 @@ const windowForm_vue_vue_type_style_index_0_lang = "", _hoisted_1$kV = { class:
37165
37188
  return;
37166
37189
  }
37167
37190
  let X = "/window/submit";
37168
- formConfig.value.openType === "new" && formConfig.value.params.newRequestPath && (X = formConfig.value.params.newRequestPath), formConfig.value.openType === "edit" && formConfig.value.params.editRequestPath && (X = formConfig.value.params.editRequestPath), formConfig.value.openType === "submit" && formConfig.value.params.submitRequestPath && (X = formConfig.value.params.submitRequestPath), axios.post(X, formData.value).then((Z) => {
37169
- emits("saveLoadingChange"), typeof Q < "u" && Q instanceof Object && (formConfig.value.showEdit = !Z.data.result, showPreViewClose()), $vxeMessage({
37170
- content: Z.data.msg,
37171
- status: Z.data.result ? "success" : "error",
37191
+ formConfig.value.openType === "new" && formConfig.value.params.newRequestPath && (X = formConfig.value.params.newRequestPath), formConfig.value.openType === "edit" && formConfig.value.params.editRequestPath && (X = formConfig.value.params.editRequestPath), formConfig.value.openType === "submit" && formConfig.value.params.submitRequestPath && (X = formConfig.value.params.submitRequestPath);
37192
+ let Z = XEUtils$1.clone(toRaw(formData.value), !0);
37193
+ for (let K in Z)
37194
+ Z[K] instanceof Array && (Z[K] = Z[K].toString());
37195
+ axios.post(X, Z).then((K) => {
37196
+ emits("saveLoadingChange"), typeof Q < "u" && Q instanceof Object && (formConfig.value.showEdit = !K.data.result, showPreViewClose()), $vxeMessage({
37197
+ content: K.data.msg,
37198
+ status: K.data.result ? "success" : "error",
37172
37199
  zIndex: 3e3
37173
- }), Z.data.result && (uploadConfig.value.isHaveImgField && !uploadConfig.value.dataId && updatePictureDataId(Z.data.id), evalEvent(
37200
+ }), K.data.result && (uploadConfig.value.isHaveImgField && !uploadConfig.value.dataId && updatePictureDataId(K.data.id), evalEvent(
37174
37201
  formConfig.value.params.formEvents.afterSubmit,
37175
37202
  formData.value,
37176
- Z.data
37203
+ K.data
37177
37204
  ), typeof Q < "u" && (Q instanceof Object || Q === !0) && emits(
37178
37205
  "gridReload",
37179
37206
  formData.value._region_id,
@@ -37181,8 +37208,8 @@ const windowForm_vue_vue_type_style_index_0_lang = "", _hoisted_1$kV = { class:
37181
37208
  )), nextTick(() => {
37182
37209
  formDataClone.value = XEUtils$1.clone(toRaw(formData.value), !0);
37183
37210
  });
37184
- }).catch((Z) => {
37185
- emits("saveLoadingChange"), console.error(Z);
37211
+ }).catch((K) => {
37212
+ emits("saveLoadingChange"), console.error(K);
37186
37213
  }).finally(() => {
37187
37214
  });
37188
37215
  } else {
@@ -37221,7 +37248,7 @@ const windowForm_vue_vue_type_style_index_0_lang = "", _hoisted_1$kV = { class:
37221
37248
  setData(Q);
37222
37249
  }, setValue = async (Q, H) => {
37223
37250
  let G = formConfig.value.columns.filter((X) => X.field == Q.toUpperCase())[0];
37224
- G.remoteSearch ? (G.itemRender.options = await remoteMethod(
37251
+ G != null && G.remoteSearch ? (G.itemRender.options = await remoteMethod(
37225
37252
  H,
37226
37253
  G.id,
37227
37254
  G.selectorId
@@ -38350,7 +38377,7 @@ _sfc_main$2.name = "slw-preview-modal";
38350
38377
  _sfc_main$2.install = (Q) => {
38351
38378
  Q.component(_sfc_main$2.name, _sfc_main$2);
38352
38379
  };
38353
- const windowIndex_vue_vue_type_style_index_0_scoped_adf36f9a_lang = "", _withScopeId = (Q) => (pushScopeId("data-v-adf36f9a"), Q = Q(), popScopeId(), Q), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
38380
+ const windowIndex_vue_vue_type_style_index_0_scoped_9f348366_lang = "", _withScopeId = (Q) => (pushScopeId("data-v-9f348366"), Q = Q(), popScopeId(), Q), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
38354
38381
  __name: "window-index",
38355
38382
  props: {
38356
38383
  windowId: {
@@ -38700,7 +38727,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_adf36f9a_lang = "", _withSco
38700
38727
  visible: !K[se].hide,
38701
38728
  folding: se > 2,
38702
38729
  events: {},
38703
- canScan: K[se].canScan || !1
38730
+ canScan: K[se].canScan
38704
38731
  // 支持扫码
38705
38732
  };
38706
38733
  switch (K[se].dataType) {
@@ -38949,6 +38976,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_adf36f9a_lang = "", _withSco
38949
38976
  });
38950
38977
  let pe = {}, fe = {
38951
38978
  field: ce,
38979
+ className: ce,
38952
38980
  dataType: oe[se].dataType,
38953
38981
  title: de,
38954
38982
  visible: oe[se].displayGrid,
@@ -39455,7 +39483,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_adf36f9a_lang = "", _withSco
39455
39483
  ]);
39456
39484
  };
39457
39485
  }
39458
- }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-adf36f9a"]]);
39486
+ }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-9f348366"]]);
39459
39487
  WindowIndex.name = "slw-window-index";
39460
39488
  WindowIndex.install = (Q) => {
39461
39489
  Q.component(WindowIndex.name, WindowIndex);
@@ -122222,7 +122250,7 @@ function reConsole() {
122222
122250
  }
122223
122251
  }
122224
122252
  console.info(
122225
- "%cSLW %cVer 0.5.987",
122253
+ "%cSLW %cVer 0.5.990",
122226
122254
  "color:#409EFF;font-size: 22px;font-weight:bolder",
122227
122255
  "color:#999;font-size: 12px"
122228
122256
  );