slw 0.9.42 → 0.9.44

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.
@@ -8296,12 +8296,12 @@ function useWindowSize$1(Q = {}) {
8296
8296
  }
8297
8297
  return { width: ee, height: te };
8298
8298
  }
8299
- const pictureUpload_vue_vue_type_style_index_0_scoped_dddba6c9_lang = "", _export_sfc = (Q, H) => {
8299
+ const pictureUpload_vue_vue_type_style_index_0_scoped_c0fb6e20_lang = "", _export_sfc = (Q, H) => {
8300
8300
  const G = Q.__vccOpts || Q;
8301
8301
  for (const [X, Z] of H)
8302
8302
  G[X] = Z;
8303
8303
  return G;
8304
- }, _withScopeId$9 = (Q) => (pushScopeId("data-v-dddba6c9"), Q = Q(), popScopeId(), Q), _hoisted_1$l2 = { class: "upload-list-box" }, _hoisted_2$kZ = {
8304
+ }, _withScopeId$9 = (Q) => (pushScopeId("data-v-c0fb6e20"), Q = Q(), popScopeId(), Q), _hoisted_1$l2 = { class: "upload-list-box" }, _hoisted_2$kZ = {
8305
8305
  key: 0,
8306
8306
  class: "thumbnail"
8307
8307
  }, _hoisted_3$hZ = { class: "el-upload-list__item-actions" }, _hoisted_4$az = ["onClick"], _hoisted_5$4Z = {
@@ -8391,7 +8391,7 @@ const pictureUpload_vue_vue_type_style_index_0_scoped_dddba6c9_lang = "", _expor
8391
8391
  });
8392
8392
  }, ge = (_e, xe) => {
8393
8393
  let $e = new XMLHttpRequest();
8394
- $e.responseType = "blob", $e.open("get", xe, !0), $e.setRequestHeader("saToken", X().saToken), $e.onreadystatechange = (ke) => {
8394
+ $e.responseType = "blob", $e.open("get", xe, !0), $e.setRequestHeader("saToken", X().saToken), $e.setRequestHeader("TOKEN", X().TOKEN), $e.onreadystatechange = (ke) => {
8395
8395
  $e.readyState == XMLHttpRequest.DONE && $e.status == 200 && (_e.src = URL.createObjectURL($e.response), _e.onload = () => {
8396
8396
  URL.revokeObjectURL(_e.src);
8397
8397
  });
@@ -8482,7 +8482,7 @@ const pictureUpload_vue_vue_type_style_index_0_scoped_dddba6c9_lang = "", _expor
8482
8482
  type: "card",
8483
8483
  autoplay: !1,
8484
8484
  "indicator-position": "outside",
8485
- height: "40vh"
8485
+ height: "45vh"
8486
8486
  }, {
8487
8487
  default: withCtx(() => [
8488
8488
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(ae), (De) => (openBlock(), createBlock(Ee, {
@@ -8492,7 +8492,7 @@ const pictureUpload_vue_vue_type_style_index_0_scoped_dddba6c9_lang = "", _expor
8492
8492
  createElementVNode("img", {
8493
8493
  ref_for: !0,
8494
8494
  ref: (Ve) => ue(Ve, De.id),
8495
- style: { "max-height": "100%" },
8495
+ style: { "max-height": "100%", "max-width": "100%" },
8496
8496
  alt: "Preview Image"
8497
8497
  }, null, 512),
8498
8498
  G.uploadConfig.openType != "view" ? (openBlock(), createElementBlock("span", _hoisted_5$4Z, [
@@ -8520,12 +8520,12 @@ const pictureUpload_vue_vue_type_style_index_0_scoped_dddba6c9_lang = "", _expor
8520
8520
  ], 64);
8521
8521
  };
8522
8522
  }
8523
- }, PictureUpload = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-dddba6c9"]]);
8523
+ }, PictureUpload = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-c0fb6e20"]]);
8524
8524
  PictureUpload.name = "slw-picture-upload";
8525
8525
  PictureUpload.install = (Q) => {
8526
8526
  Q.component(PictureUpload.name, PictureUpload);
8527
8527
  };
8528
- const windowGrid_vue_vue_type_style_index_0_scoped_8b22b7ee_lang = "", _withScopeId$8 = (Q) => (pushScopeId("data-v-8b22b7ee"), Q = Q(), popScopeId(), Q), _hoisted_1$l1 = {
8528
+ const windowGrid_vue_vue_type_style_index_0_scoped_f53c04dc_lang = "", _withScopeId$8 = (Q) => (pushScopeId("data-v-f53c04dc"), Q = Q(), popScopeId(), Q), _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 = [
@@ -9019,6 +9019,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_8b22b7ee_lang = "", _withScop
9019
9019
  break;
9020
9020
  case "IMPORT":
9021
9021
  isImport.value = !0, importBtnId.value = Q._button_id, uploadData.value = {
9022
+ rowId: getSelectRecord()[gridData.value.rowId],
9022
9023
  _region_id: gridData.value.params._region_id,
9023
9024
  _button_id: importBtnId.value
9024
9025
  }, gridData.value.params.parentRowId && (uploadData.value[gridData.value.params.parentRowId] = gridData.value.params.parentRowIdValue);
@@ -9858,10 +9859,13 @@ const windowGrid_vue_vue_type_style_index_0_scoped_8b22b7ee_lang = "", _withScop
9858
9859
  G.params.newDownTemplateUrl = H;
9859
9860
  }, beforeExcelUpload = async (Q) => {
9860
9861
  let H = getCurRegion();
9861
- return H.params.beforeUploadFn ? await H.params.beforeUploadFn() : !0;
9862
+ return H.params.addUploadData && (uploadData.value = Object.assign(uploadData.value, H.params.addUploadData)), H.params.beforeUploadFn ? await H.params.beforeUploadFn() : !0;
9862
9863
  }, setBeforeUploadFn = (Q) => {
9863
9864
  let H = getCurRegion();
9864
9865
  H.params.beforeUploadFn = Q;
9866
+ }, setUploadData = (Q) => {
9867
+ let H = getCurRegion();
9868
+ H.params.addUploadData = Object.assign({}, Q);
9865
9869
  }, editGridFunList = [];
9866
9870
  let oldInsertRecords = null;
9867
9871
  const addEditGridDataChangeFun = (Q) => {
@@ -10002,7 +10006,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_8b22b7ee_lang = "", _withScop
10002
10006
  search(Q);
10003
10007
  }, curRegion.value.getCheckedData = () => getCheckedData(), curRegion.value.getSelectRecord = () => getSelectRecord(), curRegion.value.setChecked = (Q) => {
10004
10008
  setChecked(Q);
10005
- }, curRegion.value.getParentRegion = () => getParentRegion(), curRegion.value.exportData = () => exportData(), curRegion.value.removeRow = (Q) => removeRow(), curRegion.value.clearGrid = () => clearGrid(), curRegion.value.setCheckboxRowColor = (Q, H) => setCheckboxRowColor(Q, H), curRegion.value.setFormValue = (Q, H) => setFormValue(Q, H), curRegion.value.setRowCellColor = (Q, H, G, X) => setRowCellColor(Q, H, G, X), curRegion.value.setFormSelectOption = (Q, H, G) => setFormSelectOption(Q, H, G), curRegion.value.getFormSelectOption = (Q, H) => getFormSelectOption(Q, H), curRegion.value.setColumnFixed = (Q, H) => setColumnFixed(Q, H), curRegion.value.getQueryForm = (Q) => getQueryForm(Q), curRegion.value.setCurrentRowByRowIndex = (Q, H) => setCurrentRowByRowIndex(Q, H);
10009
+ }, curRegion.value.getParentRegion = () => getParentRegion(), curRegion.value.exportData = () => exportData(), curRegion.value.removeRow = (Q) => removeRow(), curRegion.value.clearGrid = () => clearGrid(), curRegion.value.setCheckboxRowColor = (Q, H) => setCheckboxRowColor(Q, H), curRegion.value.setFormValue = (Q, H) => setFormValue(Q, H), curRegion.value.setRowCellColor = (Q, H, G, X) => setRowCellColor(Q, H, G, X), curRegion.value.setFormSelectOption = (Q, H, G) => setFormSelectOption(Q, H, G), curRegion.value.getFormSelectOption = (Q, H) => getFormSelectOption(Q, H), curRegion.value.setColumnFixed = (Q, H) => setColumnFixed(Q, H), curRegion.value.getQueryForm = (Q) => getQueryForm(Q), curRegion.value.setCurrentRowByRowIndex = (Q, H) => setCurrentRowByRowIndex(Q, H), curRegion.value.setUploadData = (Q) => setUploadData(Q);
10006
10010
  }), onUnmounted(() => {
10007
10011
  document.removeEventListener("mousedown", tableOutDestroyAreaBox), document.removeEventListener("mouseup", tbodymouseup), document.removeEventListener("paste", ctrlVPaste), document.removeEventListener("copy", ctrlCopyAndCut), document.removeEventListener("cut", ctrlCopyAndCut);
10008
10012
  }), __expose({ gridReload, reload }), (Q, H) => {
@@ -10174,7 +10178,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_8b22b7ee_lang = "", _withScop
10174
10178
  ]);
10175
10179
  };
10176
10180
  }
10177
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-8b22b7ee"]]);
10181
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-f53c04dc"]]);
10178
10182
  WindowGrid.name = "slw-window-grid";
10179
10183
  WindowGrid.install = (Q) => {
10180
10184
  Q.component(WindowGrid.name, WindowGrid);
@@ -42488,7 +42492,7 @@ var js = js$1.exports;
42488
42492
  })(Q);
42489
42493
  })(js$1);
42490
42494
  var jsExports = js$1.exports;
42491
- const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_vue_vue_type_style_index_0_scoped_cf319331_lang = "", _withScopeId$7 = (Q) => (pushScopeId("data-v-cf319331"), Q = Q(), popScopeId(), Q), _hoisted_1$l0 = { class: "slw-window-form" }, _hoisted_2$kX = {
42495
+ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_vue_vue_type_style_index_0_scoped_d4d8ec11_lang = "", _withScopeId$7 = (Q) => (pushScopeId("data-v-d4d8ec11"), Q = Q(), popScopeId(), Q), _hoisted_1$l0 = { class: "slw-window-form" }, _hoisted_2$kX = {
42492
42496
  key: 0,
42493
42497
  class: "form-header-box"
42494
42498
  }, _hoisted_3$hX = {
@@ -42522,7 +42526,7 @@ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
42522
42526
  // 是否拥有 图片上传 的按钮
42523
42527
  openType: "",
42524
42528
  fileList: []
42525
- }), filePreviewList = ref([]), editorFocusField = ref("");
42529
+ }), fieldPreviewMap = ref({}), editorFocusField = ref("");
42526
42530
  const localEditorViews = shallowRef({}), handleReady = (Q, H) => {
42527
42531
  localEditorViews[Q] = H.view;
42528
42532
  }, $Message = ref({
@@ -42674,7 +42678,7 @@ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
42674
42678
  for (const Z in formConfig.value.columns)
42675
42679
  formConfig.value.columns[Z].type !== "seq" && formConfig.value.columns[Z].type !== "checkbox" && (formData.value[formConfig.value.columns[Z].field] = "");
42676
42680
  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((Z, K, ee) => {
42677
- Z.hasOwnProperty("field") && !Z.hasOwnProperty("treeNode") && (Z.events.change = onFieldChange, Z.hasOwnProperty("search") && (Z.events.search = remoteSearch), Z.events.keyup = onFieldEnter, Z.events.click = onFieldClick), (Z == null ? void 0 : Z.dataType) === "IMG" && (uploadConfig.value.isHaveImgField = !0);
42681
+ Z.hasOwnProperty("field") && !Z.hasOwnProperty("treeNode") && (Z.events.change = onFieldChange, Z.hasOwnProperty("search") && (Z.events.search = remoteSearch), Z.events.keyup = onFieldEnter, Z.events.click = onFieldClick), (Z == null ? void 0 : Z.dataType) === "IMG" && (uploadConfig.value.isHaveImgField = !0, fieldPreviewMap.value[Z.field] = []);
42678
42682
  }), 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((Z) => {
42679
42683
  Z.hasOwnProperty("field") && !Z.hasOwnProperty("treeNode") && (fieldColumnMap.value[Z.field] = Z);
42680
42684
  }), !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(() => {
@@ -43156,8 +43160,12 @@ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
43156
43160
  );
43157
43161
  return Q.data.result && Q.data.list.length > 0 ? (uploadConfig.value.fileList = Q.data.list, !0) : (formLoading.value = !1, !1);
43158
43162
  }, updatePictureDataId = (Q) => {
43159
- let H = filePreviewList.value.map((G) => G.id).toString();
43160
- axios.post(`/dataFile/update/${Q}`, { fileIds: H }).then((G) => {
43163
+ let H = [];
43164
+ Object.values(fieldPreviewMap.value).forEach((G) => {
43165
+ G.forEach((X) => {
43166
+ H.push(X.id);
43167
+ });
43168
+ }), axios.post(`/dataFile/update/${Q}`, { fileIds: H.toString() }).then((G) => {
43161
43169
  var X;
43162
43170
  (X = G == null ? void 0 : G.data) != null && X.result || $message.error(G.msg);
43163
43171
  });
@@ -43413,9 +43421,9 @@ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
43413
43421
  fn: withCtx(() => [
43414
43422
  createVNode(unref(PictureUpload), {
43415
43423
  uploadConfig: unref(uploadConfig),
43416
- filePreviewList: unref(filePreviewList),
43417
- "onUpdate:filePreviewList": H[0] || (H[0] = (re) => isRef(filePreviewList) ? filePreviewList.value = re : filePreviewList = re)
43418
- }, null, 8, ["uploadConfig", "filePreviewList"])
43424
+ filePreviewList: unref(fieldPreviewMap)[ne.field],
43425
+ "onUpdate:filePreviewList": (re) => unref(fieldPreviewMap)[ne.field] = re
43426
+ }, null, 8, ["uploadConfig", "filePreviewList", "onUpdate:filePreviewList"])
43419
43427
  ]),
43420
43428
  key: "3"
43421
43429
  } : void 0
@@ -43466,7 +43474,7 @@ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
43466
43474
  ref: "pictureUploadModal",
43467
43475
  width: "20%",
43468
43476
  modelValue: unref(uploadConfig).show,
43469
- "onUpdate:modelValue": H[2] || (H[2] = (ne) => unref(uploadConfig).show = ne),
43477
+ "onUpdate:modelValue": H[0] || (H[0] = (ne) => unref(uploadConfig).show = ne),
43470
43478
  "z-index": 1e3,
43471
43479
  draggable: "",
43472
43480
  "append-to-body": "",
@@ -43475,18 +43483,14 @@ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
43475
43483
  title: unref($T)("图片上传")
43476
43484
  }, {
43477
43485
  default: withCtx(() => [
43478
- createVNode(unref(PictureUpload), {
43479
- uploadConfig: unref(uploadConfig),
43480
- filePreviewList: unref(filePreviewList),
43481
- "onUpdate:filePreviewList": H[1] || (H[1] = (ne) => isRef(filePreviewList) ? filePreviewList.value = ne : filePreviewList = ne)
43482
- }, null, 8, ["uploadConfig", "filePreviewList"])
43486
+ createVNode(unref(PictureUpload), { uploadConfig: unref(uploadConfig) }, null, 8, ["uploadConfig"])
43483
43487
  ]),
43484
43488
  _: 1
43485
43489
  }, 8, ["modelValue", "title"])
43486
43490
  ]);
43487
43491
  };
43488
43492
  }
43489
- }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-cf319331"]]);
43493
+ }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-d4d8ec11"]]);
43490
43494
  WindowForm.name = "slw-window-form";
43491
43495
  WindowForm.install = (Q) => {
43492
43496
  Q.component(WindowForm.name, WindowForm);
@@ -59254,7 +59258,7 @@ const windowDesigner_vue_vue_type_style_index_0_scoped_a3ebe962_lang = "", _with
59254
59258
  emits: ["update:type", "update:rootLayout", "update:viewData", "update:rowData"],
59255
59259
  setup(Q, { emit: H }) {
59256
59260
  const G = Q, X = defineAsyncComponent(
59257
- () => import("./index-c537657b.js")
59261
+ () => import("./index-f68fbf0e.js")
59258
59262
  );
59259
59263
  let Z = useVModel(G, "type", H), K = useVModel(G, "rootLayout", H), ee = useVModel(G, "viewData", H), te = useVModel(G, "rowData", H), ne = ref(0), re = ref(null);
59260
59264
  re.value = createDesigner();
@@ -144252,7 +144256,7 @@ function reConsole() {
144252
144256
  }
144253
144257
  }
144254
144258
  console.info(
144255
- `%cSLW %cVer 0.9.42%c
144259
+ `%cSLW %cVer 0.9.44%c
144256
144260
  %c指引文档:%chttp://slwdoc.js.sforcecon.com:5900/%c
144257
144261
  %c启光文档:%chttp://docs.js.sforcecon.com:5900/notepad/view/592`,
144258
144262
  "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-bdaea8f8.js";
2
+ import { _ as x, d as S, a as L, u as N } from "./index-3776a8b7.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-bdaea8f8.js";
1
+ import { i as m } from "./index-3776a8b7.js";
2
2
  import "vue";
3
3
  import "vue-router";
4
4
  export {