slw 0.9.73 → 0.9.75

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.
@@ -1,7 +1,7 @@
1
1
  var wi = Object.defineProperty;
2
2
  var xi = (H, Q, Z) => Q in H ? wi(H, Q, { enumerable: !0, configurable: !0, writable: !0, value: Z }) : H[Q] = Z;
3
3
  var Uo = (H, Q, Z) => (xi(H, typeof Q != "symbol" ? Q + "" : Q, Z), Z);
4
- import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, version as version$1, isRef, unref, computed, reactive, toRefs as toRefs$2, toRef as toRef$2, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive, defineComponent, shallowReactive, h as h$3, 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, normalizeProps, guardReactiveProps, createTextVNode, renderSlot, withModifiers, defineAsyncComponent, onActivated, isVNode, Comment, Text as Text$2, Transition, Teleport, render as render$1, cloneVNode, withDirectives, resolveDirective, vShow, camelize as camelize$2, createStaticVNode, createApp, onDeactivated } from "vue";
4
+ import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, version as version$1, isRef, unref, computed, reactive, toRefs as toRefs$2, toRef as toRef$2, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive, defineComponent, shallowReactive, h as h$3, Fragment, TransitionGroup, onUpdated, markRaw, isReadonly, onBeforeUpdate, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, withCtx, createElementVNode, createCommentVNode, renderList, createBlock, toRaw, mergeProps as mergeProps$1, resolveDynamicComponent, normalizeStyle, createSlots, toDisplayString, normalizeProps, guardReactiveProps, createTextVNode, renderSlot, withModifiers, defineAsyncComponent, onActivated, isVNode, Comment, Text as Text$2, Transition, Teleport, render as render$1, cloneVNode, withDirectives, resolveDirective, vShow, camelize as camelize$2, createStaticVNode, createApp, onDeactivated } from "vue";
5
5
  import { useRoute } from "vue-router";
6
6
  var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
7
7
  function getDefaultExportFromCjs(H) {
@@ -8525,7 +8525,7 @@ PictureUpload.name = "slw-picture-upload";
8525
8525
  PictureUpload.install = (H) => {
8526
8526
  H.component(PictureUpload.name, PictureUpload);
8527
8527
  };
8528
- const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScopeId$8 = (H) => (pushScopeId("data-v-c7bc17e1"), H = H(), popScopeId(), H), _hoisted_1$l1 = {
8528
+ const windowGrid_vue_vue_type_style_index_0_scoped_685b2c84_lang = "", _withScopeId$8 = (H) => (pushScopeId("data-v-685b2c84"), H = H(), popScopeId(), H), _hoisted_1$l1 = {
8529
8529
  class: "slw-window-grid-container",
8530
8530
  style: { height: "100%" }
8531
8531
  }, _hoisted_2$kY = /* @__PURE__ */ _withScopeId$8(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-main-area" }, null, -1)), _hoisted_3$hY = /* @__PURE__ */ _withScopeId$8(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-active-area" }, null, -1)), _hoisted_4$ay = /* @__PURE__ */ _withScopeId$8(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-copy-area" }, null, -1)), _hoisted_5$4Y = [
@@ -8551,7 +8551,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScop
8551
8551
  },
8552
8552
  emits: ["update:gridData", "jumpDesign"],
8553
8553
  setup(__props, { expose: __expose, emit }) {
8554
- 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"), $Modal = inject("$modal"), $qs = inject("$qs"), $ElMessage = inject("$ElMessage"), $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"), debounce = inject("$debounce"), router = inject("$router"), $externalFun = inject("$externalFun"), beginEdit = inject("$beginEdit"), route = useRoute();
8554
+ 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"), $Modal = inject("$modal"), $qs = inject("$qs"), $ElMessage = inject("$ElMessage"), $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"), debounce = inject("$debounce"), router = inject("$router"), $externalFun = inject("$externalFun"), beginEdit = inject("$beginEdit"), route = useRoute(), $components = inject("$components"), $componentsPath = inject("$componentsPath");
8555
8555
  let gridData = useVModel$1(props, "gridData", emit), rowIndex = ref(0), isImport = ref(!1), importUrl = ref(`${(axios == null ? void 0 : axios.baseUrl) || ""}/window/import`), importBtnId = ref(""), uploadConfig = ref({
8556
8556
  show: !1,
8557
8557
  dataId: "",
@@ -8565,6 +8565,8 @@ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScop
8565
8565
  { code: "contract", name: $T("收缩节点"), disabled: !1 }
8566
8566
  ]
8567
8567
  ]), editBtn = ref(null), exportButton = ref(null), uploadData = ref({}), queryTimeout = ref(null), formSelectMap = ref({}), isEditGridInitData = ref(!1);
8568
+ const otherItem = ref(), tableTop = ref();
8569
+ let otherItemComponent = shallowRef(), tableTopComponent = shallowRef();
8568
8570
  const preTag = computed(() => gridData.value.params.preTag || ""), computeExcelUrl = computed(() => {
8569
8571
  let H = getCurRegion();
8570
8572
  return H.params.newImportUrl ? H.params.newImportUrl : importUrl.value;
@@ -8579,12 +8581,18 @@ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScop
8579
8581
  let G = gridData.value.formConfig.items.filter((K) => K.folding).map((K) => K.field);
8580
8582
  if (G.length > 0) {
8581
8583
  let K = !1;
8582
- G.forEach((ee) => {
8583
- if (X[ee]) {
8584
+ for (let ee of G)
8585
+ if (X[ee] instanceof Array)
8586
+ if (X[ee].length > 0) {
8587
+ K = !0;
8588
+ break;
8589
+ } else
8590
+ continue;
8591
+ else if (X[ee]) {
8584
8592
  K = !0;
8585
- return;
8593
+ break;
8586
8594
  }
8587
- }), K && (H += " form-folding");
8595
+ K && (H += " form-folding");
8588
8596
  }
8589
8597
  }
8590
8598
  }
@@ -9237,6 +9245,8 @@ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScop
9237
9245
  }, getCheckedData = () => {
9238
9246
  const H = getCurRegion();
9239
9247
  return H ? H.getCheckboxRecords().concat(H.getCheckboxReserveRecords()) : null;
9248
+ }, clearCheckedReserveData = () => {
9249
+ getCurRegion().clearCheckboxReserve(), checkedGridOptions.value && (checkedGridOptions.value.data = []);
9240
9250
  }, headerCheckboxChange = ({ checked: H, row: Q, rowIndex: Z }) => {
9241
9251
  let X = getCheckedData();
9242
9252
  if (X.length > 0)
@@ -9297,16 +9307,16 @@ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScop
9297
9307
  getCurRegion().remove(H);
9298
9308
  }, exportCurrentData = async () => {
9299
9309
  exportButton.value ? getCurRegion().exportData() : $message.error($T("您没有导出数据权限!"));
9300
- }, exportData = async () => {
9310
+ }, exportData = async (H) => {
9301
9311
  if (exportButton.value) {
9302
- const H = Object.assign(
9312
+ const Q = Object.assign(
9303
9313
  {
9304
9314
  _button_id: exportButton.value._button_id
9305
9315
  },
9306
9316
  gridData.value.params.queryForm
9307
9317
  );
9308
- gridData.value.params.parentRowId && (H[gridData.value.params.parentRowId] = gridData.value.params.parentRowIdValue), await axios.export(
9309
- "/window/export?data=" + base64Encode(JSON.stringify(H)),
9318
+ gridData.value.params.parentRowId && (Q[gridData.value.params.parentRowId] = gridData.value.params.parentRowIdValue), H && (Q._file_name = H), await axios.export(
9319
+ "/window/export?data=" + base64Encode(JSON.stringify(Q)),
9310
9320
  {}
9311
9321
  ), exportButton.value.loading = !1;
9312
9322
  } else
@@ -9799,6 +9809,8 @@ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScop
9799
9809
  };
9800
9810
  }, headerProxyQuery = () => {
9801
9811
  evalEvent(gridData.value.params.formEvents.regionInit);
9812
+ }, headerFormReset = ({ data: H, $event: Q }) => {
9813
+ gridData.value.checkboxConfig.reserve && clearCheckedReserveData();
9802
9814
  }, setCheckboxRowColor = (H, Q = "#e6f7ff") => {
9803
9815
  let Z = getCurRegion();
9804
9816
  H && (Z = getRegion(H));
@@ -10053,6 +10065,8 @@ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScop
10053
10065
  Q.loadColumn(gridData.value.columns);
10054
10066
  }, allCheckboxFunList = [], addAllCheckboxFun = (H) => {
10055
10067
  allCheckboxFunList.push(H);
10068
+ }, setGridSlotsVuePath = async (H, Q) => {
10069
+ gridData.value.params.slotsVuePath || (gridData.value.params.slotsVuePath = {}), Q == "other_item" ? otherItemComponent.value = (await $components[`${$componentsPath}/${H}`]()).default : Q == "table_top" && (tableTopComponent.value = (await $components[`${$componentsPath}/${H}`]()).default), (otherItemComponent.value || tableTopComponent.value) && (gridData.value.params.slotsVuePath[Q] = H, await nextTick(), regionMap.value[Q + "-" + gridData.value.params.code + "-" + gridData.value.params.preTag] = Q == "other_item" ? otherItem.value : tableTop.value, regionMap.value[Q + "-" + gridData.value.params.code] = Q == "other_item" ? otherItem.value : tableTop.value, getCurRegion().recalculate(!0));
10056
10070
  };
10057
10071
  return onMounted(async () => {
10058
10072
  gridData.value.addListener && getCurRegion() && addListener(), gridData.value.type === "TREE_STRUCTURE" && (gridData.value.menuConfig = {
@@ -10125,7 +10139,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScop
10125
10139
  search(H);
10126
10140
  }, curRegion.value.getCheckedData = () => getCheckedData(), curRegion.value.getSelectRecord = () => getSelectRecord(), curRegion.value.setChecked = (H) => {
10127
10141
  setChecked(H);
10128
- }, curRegion.value.getParentRegion = () => getParentRegion(), curRegion.value.exportData = () => exportData(), curRegion.value.removeRow = (H) => removeRow(), curRegion.value.clearGrid = () => clearGrid(), curRegion.value.setCheckboxRowColor = (H, Q) => setCheckboxRowColor(H, Q), curRegion.value.setFormValue = (H, Q) => setFormValue(H, Q), curRegion.value.setRowCellColor = (H, Q, Z, X) => setRowCellColor(H, Q, Z, X), curRegion.value.setFormSelectOption = (H, Q, Z) => setFormSelectOption(H, Q, Z), curRegion.value.getFormSelectOption = (H, Q) => getFormSelectOption(H, Q), curRegion.value.setColumnFixed = (H, Q) => setColumnFixed(H, Q), curRegion.value.getQueryForm = (H) => getQueryForm(H), curRegion.value.setCurrentRowByRowIndex = (H, Q) => setCurrentRowByRowIndex(H, Q), curRegion.value.setUploadData = (H) => setUploadData(H), curRegion.value.setCheckMethod = (H) => setCheckMethod(H), curRegion.value.setButtonDisplay = (H, Q) => setButtonDisplay(H, Q), curRegion.value.addColumn = (H) => addColumn(H);
10142
+ }, curRegion.value.getParentRegion = () => getParentRegion(), curRegion.value.exportData = () => exportData(), curRegion.value.removeRow = (H) => removeRow(), curRegion.value.clearGrid = () => clearGrid(), curRegion.value.setCheckboxRowColor = (H, Q) => setCheckboxRowColor(H, Q), curRegion.value.setFormValue = (H, Q) => setFormValue(H, Q), curRegion.value.setRowCellColor = (H, Q, Z, X) => setRowCellColor(H, Q, Z, X), curRegion.value.setFormSelectOption = (H, Q, Z) => setFormSelectOption(H, Q, Z), curRegion.value.getFormSelectOption = (H, Q) => getFormSelectOption(H, Q), curRegion.value.setColumnFixed = (H, Q) => setColumnFixed(H, Q), curRegion.value.getQueryForm = (H) => getQueryForm(H), curRegion.value.setCurrentRowByRowIndex = (H, Q) => setCurrentRowByRowIndex(H, Q), curRegion.value.setUploadData = (H) => setUploadData(H), curRegion.value.setCheckMethod = (H) => setCheckMethod(H), curRegion.value.setButtonDisplay = (H, Q) => setButtonDisplay(H, Q), curRegion.value.addColumn = (H) => addColumn(H), curRegion.value.clearCheckedReserveData = () => clearCheckedReserveData();
10129
10143
  }), onUnmounted(() => {
10130
10144
  document.removeEventListener("mousedown", tableOutDestroyAreaBox), document.removeEventListener("mouseup", tbodymouseup), document.removeEventListener("paste", ctrlVPaste), document.removeEventListener("copy", ctrlCopyAndCut), document.removeEventListener("cut", ctrlCopyAndCut);
10131
10145
  }), __expose({ gridReload, reload }), (H, Q) => {
@@ -10151,6 +10165,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScop
10151
10165
  onCheckboxChange: headerCheckboxChange,
10152
10166
  onCheckboxAll: headerCheckboxChange,
10153
10167
  onProxyQuery: headerProxyQuery,
10168
+ onFormReset: headerFormReset,
10154
10169
  onCustom: headerCustomClick
10155
10170
  }), {
10156
10171
  scan_item: withCtx(({ data: se, property: ce }) => [
@@ -10168,12 +10183,21 @@ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScop
10168
10183
  _: 2
10169
10184
  }, 1032, ["modelValue", "onUpdate:modelValue"])
10170
10185
  ]),
10171
- other_item: withCtx(({ data: se, property: ce }) => [
10172
- createElementVNode("div", {
10173
- class: "other_item",
10174
- id: "other_item_" + unref(gridData).params.code
10175
- }, null, 8, _hoisted_7$14)
10176
- ]),
10186
+ other_item: withCtx(({ data: se, property: ce }) => {
10187
+ var de;
10188
+ return [
10189
+ createElementVNode("div", {
10190
+ class: "other_item",
10191
+ id: "other_item_" + unref(gridData).params.code
10192
+ }, [
10193
+ (de = unref(gridData).params.slotsVuePath) != null && de.other_item ? (openBlock(), createBlock(resolveDynamicComponent(unref(otherItemComponent)), {
10194
+ key: 0,
10195
+ ref_key: "otherItem",
10196
+ ref: otherItem
10197
+ }, null, 512)) : createCommentVNode("", !0)
10198
+ ], 8, _hoisted_7$14)
10199
+ ];
10200
+ }),
10177
10201
  operation: withCtx(({ row: se, rowIndex: ce }) => [
10178
10202
  (openBlock(!0), createElementBlock(Fragment, null, renderList(showButtons(ce, se), (de) => (openBlock(), createBlock(K, {
10179
10203
  key: de._button_id,
@@ -10215,12 +10239,21 @@ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScop
10215
10239
  } : void 0
10216
10240
  ]), 1032, ["iconComponent", "style", "onClick"]))), 128))
10217
10241
  ]),
10218
- top: withCtx(({}) => [
10219
- createElementVNode("div", {
10220
- class: "table_top_wrapper",
10221
- id: "table_top_" + unref(gridData).params.code
10222
- }, null, 8, _hoisted_9$n)
10223
- ]),
10242
+ top: withCtx(({}) => {
10243
+ var se;
10244
+ return [
10245
+ createElementVNode("div", {
10246
+ class: "table_top_wrapper",
10247
+ id: "table_top_" + unref(gridData).params.code
10248
+ }, [
10249
+ (se = unref(gridData).params.slotsVuePath) != null && se.table_top ? (openBlock(), createBlock(resolveDynamicComponent(unref(tableTopComponent)), {
10250
+ key: 0,
10251
+ ref_key: "tableTop",
10252
+ ref: tableTop
10253
+ }, null, 512)) : createCommentVNode("", !0)
10254
+ ], 8, _hoisted_9$n)
10255
+ ];
10256
+ }),
10224
10257
  checkbox_tool: withCtx(({}) => [
10225
10258
  computeCheckedData.value ? (openBlock(), createBlock(ne, {
10226
10259
  key: 0,
@@ -10353,7 +10386,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScop
10353
10386
  ]);
10354
10387
  };
10355
10388
  }
10356
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-c7bc17e1"]]);
10389
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-685b2c84"]]);
10357
10390
  WindowGrid.name = "slw-window-grid";
10358
10391
  WindowGrid.install = (H) => {
10359
10392
  H.component(WindowGrid.name, WindowGrid);
@@ -62484,7 +62517,7 @@ const windowDesigner_vue_vue_type_style_index_0_scoped_a3ebe962_lang = "", _with
62484
62517
  emits: ["update:type", "update:rootLayout", "update:viewData", "update:rowData"],
62485
62518
  setup(H, { emit: Q }) {
62486
62519
  const Z = H, X = defineAsyncComponent(
62487
- () => import("./index-36a5a76f.js")
62520
+ () => import("./index-41d0603f.js")
62488
62521
  );
62489
62522
  let G = useVModel(Z, "type", Q), K = useVModel(Z, "rootLayout", Q), ee = useVModel(Z, "viewData", Q), te = useVModel(Z, "rowData", Q), ne = ref(0), re = ref(null);
62490
62523
  re.value = createDesigner();
@@ -147493,7 +147526,7 @@ function reConsole() {
147493
147526
  }
147494
147527
  }
147495
147528
  console.info(
147496
- `%cSLW %cVer 0.9.73%c
147529
+ `%cSLW %cVer 0.9.75%c
147497
147530
  %c指引文档:%chttp://slwdoc.js.sforcecon.com:5900/%c
147498
147531
  %c启光文档:%chttp://docs.js.sforcecon.com:5900/notepad/view/592`,
147499
147532
  "color:#409EFF;font-size: 22px;font-weight:bolder;text-shadow: 2px 2px 4px #84c1ff;",
@@ -1,5 +1,5 @@
1
1
  import { pushScopeId as P, popScopeId as V, createElementVNode as h, resolveComponent as g, openBlock as o, createElementBlock as p, createBlock as f, normalizeClass as T, normalizeStyle as A, withModifiers as R, withCtx as r, renderSlot as q, createCommentVNode as _, Fragment as B, createVNode as s, mergeProps as k, renderList as j, toDisplayString as E, normalizeProps as K, guardReactiveProps as Q, resolveDynamicComponent as Z, defineAsyncComponent as $, computed as F, unref as D, withDirectives as ee, vShow as te } from "vue";
2
- import { _ as x, d as S, a as L, u as N } from "./index-9f50aec0.js";
2
+ import { _ as x, d as S, a as L, u as N } from "./index-1c295a78.js";
3
3
  import "vue-router";
4
4
  const I = {
5
5
  computed: {},
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as m } from "./index-9f50aec0.js";
1
+ import { i as m } from "./index-1c295a78.js";
2
2
  import "vue";
3
3
  import "vue-router";
4
4
  export {