slw 0.5.994 → 0.5.996

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_e7c84c01_lang = "", _withScopeId$3 = (Q) => (pushScopeId("data-v-e7c84c01"), Q = Q(), popScopeId(), Q), _hoisted_1$kW = {
8514
+ const windowGrid_vue_vue_type_style_index_0_scoped_e45797c7_lang = "", _withScopeId$3 = (Q) => (pushScopeId("data-v-e45797c7"), 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 = [
@@ -9724,6 +9724,29 @@ const windowGrid_vue_vue_type_style_index_0_scoped_e7c84c01_lang = "", _withScop
9724
9724
  Q && (X = getRegion(Q));
9725
9725
  let Z = X.formConfig.items.filter((K) => K.field == H)[0];
9726
9726
  Z && (Z.itemRender.options = G);
9727
+ }, getFormSelectOption = async (Q, H) => {
9728
+ let G = getCurRegion();
9729
+ Q && (G = getRegion(Q));
9730
+ let X = G.formConfig.items.filter((K) => K.field == H)[0], Z = [];
9731
+ if (X.querys) {
9732
+ const K = await axios.post(
9733
+ "/window/selector",
9734
+ $qs.stringify({
9735
+ _region_id: G.params._region_id,
9736
+ _field_id: X.querys.id,
9737
+ _select_id: X.querys.selectorId
9738
+ })
9739
+ );
9740
+ K.data.result && K.data.data && (Z = K.data.data.map((ee) => Object.assign(
9741
+ {
9742
+ value: ee.VALUE,
9743
+ label: ee.NAME
9744
+ },
9745
+ ee
9746
+ )));
9747
+ } else
9748
+ Z = X.itemRender.options;
9749
+ return Z;
9727
9750
  };
9728
9751
  return onMounted(async () => {
9729
9752
  gridData.value.addListener && getCurRegion() && addListener(), gridData.value.type === "TREE_STRUCTURE" && (gridData.value.menuConfig = {
@@ -9795,7 +9818,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_e7c84c01_lang = "", _withScop
9795
9818
  search(Q);
9796
9819
  }, curRegion.value.getCheckedData = () => getCheckedData(), curRegion.value.getSelectRecord = () => getSelectRecord(), curRegion.value.setChecked = (Q) => {
9797
9820
  setChecked(Q);
9798
- }, 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(), curRegion.value.setFormSelectOption = () => setFormSelectOption();
9821
+ }, 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(), curRegion.value.setFormSelectOption = () => setFormSelectOption(), curRegion.value.getFormSelectOption = () => getFormSelectOption();
9799
9822
  }), onUnmounted(() => {
9800
9823
  document.removeEventListener("mousedown", tableOutDestroyAreaBox), document.removeEventListener("mouseup", tbodymouseup), document.removeEventListener("paste", ctrlVPaste), document.removeEventListener("copy", ctrlCopyAndCut), document.removeEventListener("cut", ctrlCopyAndCut);
9801
9824
  }), __expose({ gridReload, reload }), (Q, H) => {
@@ -9965,7 +9988,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_e7c84c01_lang = "", _withScop
9965
9988
  ]);
9966
9989
  };
9967
9990
  }
9968
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-e7c84c01"]]);
9991
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-e45797c7"]]);
9969
9992
  WindowGrid.name = "slw-window-grid";
9970
9993
  WindowGrid.install = (Q) => {
9971
9994
  Q.component(WindowGrid.name, WindowGrid);
@@ -36999,7 +37022,7 @@ const pseudoClasses = /* @__PURE__ */ [
36999
37022
  function css$1() {
37000
37023
  return new LanguageSupport(cssLanguage, cssLanguage.data.of({ autocomplete: cssCompletionSource }));
37001
37024
  }
37002
- const windowForm_vue_vue_type_style_index_0_scoped_001b8de1_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-001b8de1"), Q = Q(), popScopeId(), Q), _hoisted_1$kV = { class: "slw-window-form" }, _hoisted_2$kR = {
37025
+ const windowForm_vue_vue_type_style_index_0_scoped_746b7ba2_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-746b7ba2"), Q = Q(), popScopeId(), Q), _hoisted_1$kV = { class: "slw-window-form" }, _hoisted_2$kR = {
37003
37026
  key: 0,
37004
37027
  style: { "text-align": "left", "font-size": "18px", "line-height": "30px", "font-weight": "bold", padding: "5px 30px 0 15px" }
37005
37028
  }, _hoisted_3$hS = ["onClick"], _sfc_main$5 = {
@@ -37101,7 +37124,13 @@ const windowForm_vue_vue_type_style_index_0_scoped_001b8de1_lang = "", _withScop
37101
37124
  }
37102
37125
  return Q;
37103
37126
  }), buttons = computed(() => formConfig.value.toolbarConfig.buttons.filter(
37104
- (Q) => typeof Q.code < "u" && Q.type != "EDIT" && Q.type != "DELETE" && Q.type != "NEW" && !(uploadConfig.value.isHaveImgField && Q.type == "PIC_UPLOAD")
37127
+ (Q) => {
37128
+ let H = !0;
37129
+ return Q.displayLogic && (H = displayLogic(Q.displayLogic, {
37130
+ ...formData.value,
37131
+ ...assembleParentData()
37132
+ })), typeof Q.code < "u" && Q.type != "EDIT" && Q.type != "DELETE" && Q.type != "NEW" && !(uploadConfig.value.isHaveImgField && Q.type == "PIC_UPLOAD") && H;
37133
+ }
37105
37134
  )), formSelectMap = computed(() => {
37106
37135
  let Q = {};
37107
37136
  return formConfig.value.columns.forEach((H) => {
@@ -37133,7 +37162,7 @@ const windowForm_vue_vue_type_style_index_0_scoped_001b8de1_lang = "", _withScop
37133
37162
  formConfig.value.columns[G].type !== "seq" && formConfig.value.columns[G].type !== "checkbox" && (formData.value[formConfig.value.columns[G].field] = "");
37134
37163
  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) => {
37135
37164
  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);
37136
- }), 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) => {
37165
+ }), 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), form.value.params = formConfig.value.params, 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) => {
37137
37166
  G.hasOwnProperty("field") && !G.hasOwnProperty("treeNode") && (fieldColumnMap.value[G.field] = G);
37138
37167
  }), !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(() => {
37139
37168
  formDataClone.value = XEUtils$1.clone(toRaw(formData.value), !0);
@@ -37758,7 +37787,7 @@ const windowForm_vue_vue_type_style_index_0_scoped_001b8de1_lang = "", _withScop
37758
37787
  ]);
37759
37788
  };
37760
37789
  }
37761
- }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-001b8de1"]]);
37790
+ }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-746b7ba2"]]);
37762
37791
  WindowForm.name = "slw-window-form";
37763
37792
  WindowForm.install = (Q) => {
37764
37793
  Q.component(WindowForm.name, WindowForm);
@@ -122263,7 +122292,7 @@ function reConsole() {
122263
122292
  }
122264
122293
  }
122265
122294
  console.info(
122266
- "%cSLW %cVer 0.5.994",
122295
+ "%cSLW %cVer 0.5.996",
122267
122296
  "color:#409EFF;font-size: 22px;font-weight:bolder",
122268
122297
  "color:#999;font-size: 12px"
122269
122298
  );