slw 0.5.997 → 0.5.999

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
@@ -1,7 +1,7 @@
1
1
  var Qo = Object.defineProperty;
2
2
  var qo = (Q, H, G) => H in Q ? Qo(Q, H, { enumerable: !0, configurable: !0, writable: !0, value: G }) : Q[H] = G;
3
3
  var Mo = (Q, H, G) => (qo(Q, typeof H != "symbol" ? H + "" : H, G), G);
4
- import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive, defineComponent, shallowReactive, h as h$2, Fragment, TransitionGroup, onUpdated, markRaw, isReadonly, onBeforeUpdate, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, withCtx, createElementVNode, createCommentVNode, renderList, createBlock, toRaw, mergeProps as mergeProps$1, normalizeStyle, createSlots, toDisplayString, resolveDynamicComponent, createTextVNode, renderSlot, withModifiers, isVNode, Comment, Text as Text$2, Transition, Teleport, render as render$1, cloneVNode, withDirectives, resolveDirective, vShow, camelize as camelize$1, createStaticVNode, createApp, onActivated, onDeactivated } from "vue";
4
+ import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive, defineComponent, shallowReactive, h as h$2, Fragment, TransitionGroup, onUpdated, markRaw, isReadonly, onBeforeUpdate, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, withCtx, createElementVNode, createCommentVNode, renderList, createBlock, toRaw, mergeProps as mergeProps$1, normalizeStyle, createSlots, toDisplayString, resolveDynamicComponent, createTextVNode, renderSlot, onActivated, withModifiers, isVNode, Comment, Text as Text$2, Transition, Teleport, render as render$1, cloneVNode, withDirectives, resolveDirective, vShow, camelize as camelize$1, createStaticVNode, createApp, onDeactivated } from "vue";
5
5
  var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6
6
  function getDefaultExportFromCjs(Q) {
7
7
  return Q && Q.__esModule && Object.prototype.hasOwnProperty.call(Q, "default") ? Q.default : Q;
@@ -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_e45797c7_lang = "", _withScopeId$3 = (Q) => (pushScopeId("data-v-e45797c7"), Q = Q(), popScopeId(), Q), _hoisted_1$kW = {
8514
+ const windowGrid_vue_vue_type_style_index_0_scoped_1e029ec8_lang = "", _withScopeId$3 = (Q) => (pushScopeId("data-v-1e029ec8"), 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 = [
@@ -8534,7 +8534,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_e45797c7_lang = "", _withScop
8534
8534
  },
8535
8535
  emits: ["update:gridData", "jumpDesign"],
8536
8536
  setup(__props, { expose: __expose, emit }) {
8537
- const props = __props, axios = inject("$axios"), hiprint = inject("$hiprint"), serverPrint = inject("$serverPrint"), regionMap = inject("$regionMap"), focusInput = inject("$focusInput"), base64Encode = inject("$base64Encode"), base64Decode = inject("$base64Decode"), $T = inject("$t"), httpHeaders = inject("$httpHeaders"), addGridClickEvent = inject("$addGridClickEvent"), showPreView = inject("$showPreView"), showPreViewClose = inject("$showPreViewClose"), preViewCloseCallback = inject("$preViewCloseCallback"), closePreModal = inject("$closePreModal"), rowDbClick = inject("$rowDbClick"), componentMapping = inject("$componentMapping"), $Modal = inject("$modal"), $qs = inject("$qs"), $vxeMessage = inject("$vxeMessage"), $vxeConfirm = inject("$vxeConfirm"), $vxeOpen = inject("$vxeOpen"), $vxeReadFile = inject("$vxeReadFile"), openModal = inject("$openModal"), closeModal = inject("$closeModal"), evalDefaultValue = inject("$evalDefaultValue"), callGridClickEvents = inject("$callGridClickEvents"), ElMessageBox = inject("$ElMessageBox");
8537
+ const props = __props, axios = inject("$axios"), hiprint = inject("$hiprint"), serverPrint = inject("$serverPrint"), regionMap = inject("$regionMap"), focusInput = inject("$focusInput"), base64Encode = inject("$base64Encode"), base64Decode = inject("$base64Decode"), $T = inject("$t"), httpHeaders = inject("$httpHeaders"), addGridClickEvent = inject("$addGridClickEvent"), showPreView = inject("$showPreView"), showPreViewClose = inject("$showPreViewClose"), preViewCloseCallback = inject("$preViewCloseCallback"), closePreModal = inject("$closePreModal"), rowDbClick = inject("$rowDbClick"), componentMapping = inject("$componentMapping"), $Modal = inject("$modal"), $qs = inject("$qs"), $vxeMessage = inject("$vxeMessage"), $vxeConfirm = inject("$vxeConfirm"), $vxeOpen = inject("$vxeOpen"), $vxeReadFile = inject("$vxeReadFile"), openModal = inject("$openModal"), closeModal = inject("$closeModal"), evalDefaultValue = inject("$evalDefaultValue"), callGridClickEvents = inject("$callGridClickEvents"), ElMessageBox = inject("$ElMessageBox"), addOnActivatedFun = inject("$addOnActivatedFun");
8538
8538
  let gridData = useVModel(props, "gridData", emit), rowIndex = ref(0), isImport = ref(!1), importUrl = ref(`${(axios == null ? void 0 : axios.baseUrl) || ""}/window/import`), importBtnId = ref(""), uploadConfig = ref({
8539
8539
  show: !1,
8540
8540
  dataId: "",
@@ -8660,7 +8660,9 @@ const windowGrid_vue_vue_type_style_index_0_scoped_e45797c7_lang = "", _withScop
8660
8660
  Object.entries(Z).forEach(([ae, le]) => {
8661
8661
  var se;
8662
8662
  if (le == null && (Z[ae] = null), Z[ae] instanceof Array) {
8663
- let ce = gridData.value.formConfig.items.filter((he) => he.field == ae)[0], de = (se = ce == null ? void 0 : ce.itemRender) == null ? void 0 : se.name;
8663
+ let ce = gridData.value.formConfig.items.filter(
8664
+ (he) => he.field == ae
8665
+ )[0], de = (se = ce == null ? void 0 : ce.itemRender) == null ? void 0 : se.name;
8664
8666
  if (["ElDateRangePicker", "ElDateTimeRangePicker"].includes(de)) {
8665
8667
  let he = XEUtils$1.clone(Z[ae], !0);
8666
8668
  Z[ae] = he[0], Z["end_" + ae] = he[1];
@@ -8669,7 +8671,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_e45797c7_lang = "", _withScop
8669
8671
  });
8670
8672
  let ee = getParentRegion(), te = null;
8671
8673
  ee && ee.params && (te = ee.params.subtableSearchExParams);
8672
- const ne = Object.assign({}, Z, K, te), re = G[0];
8674
+ const ne = Object.assign({}, Z, K, te, queryFormScanData.value), re = G[0];
8673
8675
  re && (ne.$_sort_column = re.property, ne.$_sort_type = re.order), X.forEach(({ property: ae, values: le }) => {
8674
8676
  ne[ae.toUpperCase()] = le.join(",");
8675
8677
  }), ne.page = H.currentPage, ne.limit = H.pageSize, ne._region_id = gridData.value.params._region_id, gridData.value.params.parentRowId && (ne[gridData.value.params.parentRowId] = gridData.value.params.parentRowIdValue), gridData.value.params.queryParams && Object.keys(gridData.value.params.queryParams).forEach((ae) => {
@@ -9711,23 +9713,33 @@ const windowGrid_vue_vue_type_style_index_0_scoped_e45797c7_lang = "", _withScop
9711
9713
  }
9712
9714
  }
9713
9715
  }, 500);
9714
- }, onScanIconClick = (Q, H) => {
9716
+ };
9717
+ let queryFormScanData = ref({});
9718
+ const onScanIconClick = (Q, H) => {
9715
9719
  const G = gridData.value.formConfig.items.filter(
9716
9720
  (X) => X.field == H
9717
9721
  )[0];
9718
9722
  G.itemRender.props.clickFunction && evalEvent(G.itemRender.props.clickFunction, Q, H);
9723
+ }, setFormScanValue = (Q, H) => {
9724
+ queryFormScanData.value[Q] = H;
9719
9725
  }, setFormValue = (Q, H) => {
9720
- let G = gridData.value.formConfig.items.filter((X) => X.field == Q)[0];
9726
+ let G = gridData.value.formConfig.items.filter(
9727
+ (X) => X.field == Q
9728
+ )[0];
9721
9729
  G && (G.itemRender.defaultValue = H);
9722
9730
  }, setFormSelectOption = (Q, H, G = []) => {
9723
9731
  let X = getCurRegion();
9724
9732
  Q && (X = getRegion(Q));
9725
- let Z = X.formConfig.items.filter((K) => K.field == H)[0];
9733
+ let Z = X.formConfig.items.filter(
9734
+ (K) => K.field == H
9735
+ )[0];
9726
9736
  Z && (Z.itemRender.options = G);
9727
9737
  }, getFormSelectOption = async (Q, H) => {
9728
9738
  let G = getCurRegion();
9729
9739
  Q && (G = getRegion(Q));
9730
- let X = G.formConfig.items.filter((K) => K.field == H)[0], Z = [];
9740
+ let X = G.formConfig.items.filter(
9741
+ (K) => K.field == H
9742
+ )[0], Z = [];
9731
9743
  if (X.querys) {
9732
9744
  const K = await axios.post(
9733
9745
  "/window/selector",
@@ -9747,6 +9759,16 @@ const windowGrid_vue_vue_type_style_index_0_scoped_e45797c7_lang = "", _withScop
9747
9759
  } else
9748
9760
  Z = X.itemRender.options;
9749
9761
  return Z;
9762
+ }, footerSum = (Q) => {
9763
+ const H = (X, Z) => {
9764
+ let K = 0;
9765
+ return X.forEach((ee) => {
9766
+ K += Number(ee[Z]);
9767
+ }), K;
9768
+ }, G = ({ columns: X, data: Z }) => [
9769
+ X.map((K, ee) => ee === 2 ? "和值" : Q.includes(K.field) ? H(Z, K.field) : "")
9770
+ ];
9771
+ gridData.value.showFooter = !0, gridData.value.footerMethod = G;
9750
9772
  };
9751
9773
  return onMounted(async () => {
9752
9774
  gridData.value.addListener && getCurRegion() && addListener(), gridData.value.type === "TREE_STRUCTURE" && (gridData.value.menuConfig = {
@@ -9767,7 +9789,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_e45797c7_lang = "", _withScop
9767
9789
  });
9768
9790
  }), gridData.value.formConfig.items.forEach((Q) => {
9769
9791
  var H, G, X;
9770
- if ((G = (H = Q == null ? void 0 : Q.itemRender) == null ? void 0 : H.events) != null && G.hasOwnProperty("change") && (Q.itemRender.events.change = search), Q.remoteSearch ? (Q.itemRender.props.remoteMethod = async (Z) => {
9792
+ if (Q.canScan && (queryFormScanData.value[Q.field] = ""), (G = (H = Q == null ? void 0 : Q.itemRender) == null ? void 0 : H.events) != null && G.hasOwnProperty("change") && (Q.itemRender.events.change = search), Q.remoteSearch ? (Q.itemRender.props.remoteMethod = async (Z) => {
9771
9793
  Z && (Q.itemRender.props.loading = !0, Q.itemRender.options = await remoteMethod(
9772
9794
  Z,
9773
9795
  Q.querys.id,
@@ -9847,8 +9869,8 @@ const windowGrid_vue_vue_type_style_index_0_scoped_e45797c7_lang = "", _withScop
9847
9869
  }), {
9848
9870
  scan_item: withCtx(({ data: ae, property: le }) => [
9849
9871
  createVNode(G, {
9850
- modelValue: ae[le],
9851
- "onUpdate:modelValue": (se) => ae[le] = se
9872
+ modelValue: unref(queryFormScanData)[le],
9873
+ "onUpdate:modelValue": (se) => unref(queryFormScanData)[le] = se
9852
9874
  }, {
9853
9875
  suffix: withCtx(() => [
9854
9876
  createElementVNode("i", {
@@ -9988,7 +10010,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_e45797c7_lang = "", _withScop
9988
10010
  ]);
9989
10011
  };
9990
10012
  }
9991
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-e45797c7"]]);
10013
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-1e029ec8"]]);
9992
10014
  WindowGrid.name = "slw-window-grid";
9993
10015
  WindowGrid.install = (Q) => {
9994
10016
  Q.component(WindowGrid.name, WindowGrid);
@@ -37022,7 +37044,7 @@ const pseudoClasses = /* @__PURE__ */ [
37022
37044
  function css$1() {
37023
37045
  return new LanguageSupport(cssLanguage, cssLanguage.data.of({ autocomplete: cssCompletionSource }));
37024
37046
  }
37025
- const windowForm_vue_vue_type_style_index_0_scoped_a62820bf_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-a62820bf"), Q = Q(), popScopeId(), Q), _hoisted_1$kV = { class: "slw-window-form" }, _hoisted_2$kR = {
37047
+ const windowForm_vue_vue_type_style_index_0_scoped_3b82697d_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-3b82697d"), Q = Q(), popScopeId(), Q), _hoisted_1$kV = { class: "slw-window-form" }, _hoisted_2$kR = {
37026
37048
  key: 0,
37027
37049
  style: { "text-align": "left", "font-size": "18px", "line-height": "30px", "font-weight": "bold", padding: "5px 30px 0 15px" }
37028
37050
  }, _hoisted_3$hS = ["onClick"], _sfc_main$5 = {
@@ -37040,7 +37062,7 @@ const windowForm_vue_vue_type_style_index_0_scoped_a62820bf_lang = "", _withScop
37040
37062
  setup(__props, { expose: __expose, emit: emits }) {
37041
37063
  const props = __props, componentMapping = inject("$componentMapping"), axios = inject("$axios"), hiprint = inject("$hiprint"), serverPrint = inject("$serverPrint"), showPreView = inject("$showPreView"), showPreViewClose = inject("$showPreViewClose"), preViewCloseCallback = inject("$preViewCloseCallback"), $Modal = inject("$modal"), $qs = inject("$qs"), $vxeMessage = inject("$vxeMessage"), base64Encode = inject("$base64Encode"), base64Decode = inject("$base64Decode"), $vxeConfirm = inject("$vxeConfirm"), $T = inject("$t"), openModal = inject("$openModal"), closeModal = inject("$closeModal"), focusInput = inject("$focusInput"), evalDefaultValue = inject("$evalDefaultValue");
37042
37064
  let regionMap = inject("$regionMap");
37043
- const ElMessageBox = inject("$ElMessageBox");
37065
+ const ElMessageBox = inject("$ElMessageBox"), addOnActivatedFun = inject("$addOnActivatedFun");
37044
37066
  let formConfig = useVModel(props, "formConfig", emits), formData = ref({}), fieldColumnMap = ref({}), formDataClone = ref({}), formLoading = ref(!1), queryTimeout = ref(null);
37045
37067
  const $modal = $Modal;
37046
37068
  let uploadConfig = ref({
@@ -37792,7 +37814,7 @@ const windowForm_vue_vue_type_style_index_0_scoped_a62820bf_lang = "", _withScop
37792
37814
  ]);
37793
37815
  };
37794
37816
  }
37795
- }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-a62820bf"]]);
37817
+ }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-3b82697d"]]);
37796
37818
  WindowForm.name = "slw-window-form";
37797
37819
  WindowForm.install = (Q) => {
37798
37820
  Q.component(WindowForm.name, WindowForm);
@@ -38424,7 +38446,7 @@ _sfc_main$2.name = "slw-preview-modal";
38424
38446
  _sfc_main$2.install = (Q) => {
38425
38447
  Q.component(_sfc_main$2.name, _sfc_main$2);
38426
38448
  };
38427
- const windowIndex_vue_vue_type_style_index_0_scoped_d1f16970_lang = "", _withScopeId = (Q) => (pushScopeId("data-v-d1f16970"), Q = Q(), popScopeId(), Q), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
38449
+ const windowIndex_vue_vue_type_style_index_0_scoped_f7fa9fa1_lang = "", _withScopeId = (Q) => (pushScopeId("data-v-f7fa9fa1"), Q = Q(), popScopeId(), Q), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
38428
38450
  __name: "window-index",
38429
38451
  props: {
38430
38452
  windowId: {
@@ -39236,6 +39258,19 @@ const windowIndex_vue_vue_type_style_index_0_scoped_d1f16970_lang = "", _withSco
39236
39258
  loadData(), settPageHeight(), document.addEventListener("keydown", ctrlSSave);
39237
39259
  }), onUnmounted(() => {
39238
39260
  document.removeEventListener("keydown", ctrlSSave);
39261
+ });
39262
+ const activatedList = [], addOnActivatedFun = (Q) => {
39263
+ activatedList.push(Q);
39264
+ };
39265
+ onActivated(() => {
39266
+ activatedList && activatedList.length > 0 && activatedList.forEach((Q) => {
39267
+ if (Q && typeof Q == "function")
39268
+ try {
39269
+ Q();
39270
+ } catch (H) {
39271
+ console.error(H);
39272
+ }
39273
+ });
39239
39274
  }), watch([() => props.windowId, () => props.queryParams], () => {
39240
39275
  loadData(), settPageHeight();
39241
39276
  });
@@ -39249,7 +39284,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_d1f16970_lang = "", _withSco
39249
39284
  focusInput(Q, H);
39250
39285
  }, 3 * 1e3);
39251
39286
  }
39252
- return provide("$showPreView", showPreView), provide("$showPreViewClose", showPreViewClose), provide("$preViewCloseCallback", preViewCloseCallback), provide("$openModal", openModal), provide("$closeModal", closeModal), provide("$closePreModal", closePreModal), provide("$rowDbClick", openEditWin), provide("$regionMap", regionMap), provide("$getRegion", getRegion), provide("$hiprint", hiprint), provide("$serverPrint", serverPrint), provide("$focusInput", focusInput), (Q, H) => {
39287
+ return provide("$showPreView", showPreView), provide("$showPreViewClose", showPreViewClose), provide("$preViewCloseCallback", preViewCloseCallback), provide("$openModal", openModal), provide("$closeModal", closeModal), provide("$closePreModal", closePreModal), provide("$rowDbClick", openEditWin), provide("$regionMap", regionMap), provide("$getRegion", getRegion), provide("$hiprint", hiprint), provide("$serverPrint", serverPrint), provide("$focusInput", focusInput), provide("$addOnActivatedFun", addOnActivatedFun), (Q, H) => {
39253
39288
  const G = resolveComponent("el-space"), X = resolveComponent("el-tab-pane"), Z = resolveComponent("el-tabs"), K = resolveComponent("el-scrollbar"), ee = resolveComponent("el-checkbox"), te = resolveComponent("arrow-back"), ne = resolveComponent("el-icon"), re = resolveComponent("el-button"), oe = resolveComponent("arrow-forward"), ae = resolveComponent("el-button-group"), le = resolveComponent("save"), se = resolveComponent("close"), ce = resolveComponent("el-dialog"), de = resolveComponent("window-index", !0);
39254
39289
  return openBlock(), createElementBlock("div", _hoisted_1$kR, [
39255
39290
  (openBlock(), createBlock(unref(WindowLayout), {
@@ -39530,7 +39565,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_d1f16970_lang = "", _withSco
39530
39565
  ]);
39531
39566
  };
39532
39567
  }
39533
- }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-d1f16970"]]);
39568
+ }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f7fa9fa1"]]);
39534
39569
  WindowIndex.name = "slw-window-index";
39535
39570
  WindowIndex.install = (Q) => {
39536
39571
  Q.component(WindowIndex.name, WindowIndex);
@@ -122297,7 +122332,7 @@ function reConsole() {
122297
122332
  }
122298
122333
  }
122299
122334
  console.info(
122300
- "%cSLW %cVer 0.5.997",
122335
+ "%cSLW %cVer 0.5.999",
122301
122336
  "color:#409EFF;font-size: 22px;font-weight:bolder",
122302
122337
  "color:#999;font-size: 12px"
122303
122338
  );