slw 0.9.39 → 0.9.41

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.
@@ -8524,7 +8524,7 @@ PictureUpload.name = "slw-picture-upload";
8524
8524
  PictureUpload.install = (Q) => {
8525
8525
  Q.component(PictureUpload.name, PictureUpload);
8526
8526
  };
8527
- const windowGrid_vue_vue_type_style_index_0_scoped_deefae39_lang = "", _withScopeId$8 = (Q) => (pushScopeId("data-v-deefae39"), Q = Q(), popScopeId(), Q), _hoisted_1$l1 = {
8527
+ const windowGrid_vue_vue_type_style_index_0_scoped_a3ca2627_lang = "", _withScopeId$8 = (Q) => (pushScopeId("data-v-a3ca2627"), Q = Q(), popScopeId(), Q), _hoisted_1$l1 = {
8528
8528
  class: "slw-window-grid-container",
8529
8529
  style: { height: "100%" }
8530
8530
  }, _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 = [
@@ -8547,7 +8547,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_deefae39_lang = "", _withScop
8547
8547
  },
8548
8548
  emits: ["update:gridData", "jumpDesign"],
8549
8549
  setup(__props, { expose: __expose, emit }) {
8550
- 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"), $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");
8550
+ 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"), $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"), route = inject("$route");
8551
8551
  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({
8552
8552
  show: !1,
8553
8553
  dataId: "",
@@ -8564,8 +8564,10 @@ const windowGrid_vue_vue_type_style_index_0_scoped_deefae39_lang = "", _withScop
8564
8564
  const preTag = computed(() => gridData.value.params.preTag || ""), computeExcelUrl = computed(() => {
8565
8565
  let Q = getCurRegion();
8566
8566
  return Q.params.newImportUrl ? Q.params.newImportUrl : importUrl.value;
8567
- }), showButtons = (Q) => gridData.value.toolbarConfig.buttons.filter(
8568
- (H) => H.showInGrid && (gridData.value.type === "TREE" || gridData.value.type === "TREE_STRUCTURE" || H.btnShowInGrid[Q])
8567
+ }), showButtons = (Q, H) => gridData.value.type === "TREE" || gridData.value.type === "TREE_STRUCTURE" ? gridData.value.toolbarConfig.buttons.filter(
8568
+ (G) => G.showInGrid && G.btnShowInGrid[H._INDEX]
8569
+ ) : gridData.value.toolbarConfig.buttons.filter(
8570
+ (G) => G.showInGrid && G.btnShowInGrid[Q]
8569
8571
  ), $modal = $Modal, $Message = ref({
8570
8572
  success(Q) {
8571
8573
  success(Q);
@@ -8607,6 +8609,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_deefae39_lang = "", _withScop
8607
8609
  const data = Object.assign({}, datax);
8608
8610
  let result = !1;
8609
8611
  try {
8612
+ (gridData.value.type === "TREE" || gridData.value.type === "TREE_STRUCTURE") && typeof data._CHILDS > "u" && (data._CHILDS = "undefined");
8610
8613
  for (const Q in data)
8611
8614
  displayStr = displayStr.replace(
8612
8615
  new RegExp("@" + Q + "@", "gi"),
@@ -8724,43 +8727,45 @@ const windowGrid_vue_vue_type_style_index_0_scoped_deefae39_lang = "", _withScop
8724
8727
  return oe.then((le) => {
8725
8728
  let se = {};
8726
8729
  if (le && le.data && le.data.result && le.data.data && le.data.data.length > 0) {
8727
- let ce = !1, de = 0;
8728
- le.data.data.forEach((fe, pe) => {
8729
- let me = 0;
8730
- gridData.value.toolbarConfig.buttons.forEach((ve) => {
8731
- if (typeof ve.type < "u") {
8732
- ve.btnLoad[pe] = !1;
8733
- const ge = ve.displayLogic ? displayLogic(ve.displayLogic, {
8734
- ...fe,
8735
- ...assembleParentData(gridData.value.params.parentData)
8736
- }) : !0, we = ve.showInGrid && ge, _e = !ve.showInGrid && ge;
8737
- if (ve.btnShowInGrid[pe] = we, ve.btnShow[pe] = _e, ce = ce || we, we)
8738
- if (ve.iconComponent)
8739
- me = me + 0.7;
8740
- else {
8741
- let xe = ve.name.match(/[\u4e00-\u9fa5]/g);
8742
- if (xe) {
8743
- let $e = Math.ceil(xe.length / 2);
8744
- me += $e;
8745
- } else {
8746
- let $e = Math.ceil(ve.name.length / 6);
8747
- me += $e;
8730
+ let ue = function(me) {
8731
+ me.forEach((ve, ge) => {
8732
+ let we = 0;
8733
+ gridData.value.toolbarConfig.buttons.forEach((_e) => {
8734
+ if (typeof _e.type < "u") {
8735
+ _e.btnLoad[he] = !1;
8736
+ const xe = _e.displayLogic ? displayLogic(_e.displayLogic, {
8737
+ ...ve,
8738
+ ...assembleParentData(gridData.value.params.parentData)
8739
+ }) : !0, $e = _e.showInGrid && xe, ke = !_e.showInGrid && xe;
8740
+ if (_e.btnShowInGrid[he] = $e, _e.btnShow[he] = ke, ce = ce || $e, $e)
8741
+ if (_e.iconComponent)
8742
+ we = we + 0.7;
8743
+ else {
8744
+ let Ce = _e.name.match(/[\u4e00-\u9fa5]/g);
8745
+ if (Ce) {
8746
+ let be = Math.ceil(Ce.length / 2);
8747
+ we += be;
8748
+ } else {
8749
+ let be = Math.ceil(_e.name.length / 6);
8750
+ we += be;
8751
+ }
8748
8752
  }
8749
- }
8750
- }
8751
- }), me > de && (de = me);
8752
- });
8753
- let he = !1;
8754
- gridData.value.columns.forEach((fe) => {
8755
- if (fe.colId == "_operation_" && fe.title == "操作") {
8756
- fe.width != de * 60 && de * 60 >= 60 && (he = !0, fe.width = de.toFixed(1) * 60);
8753
+ }
8754
+ }), we > de && (de = we), ve._INDEX = he, he++, ve._CHILDS && ve._CHILDS.length > 0 && ue(ve._CHILDS);
8755
+ });
8756
+ }, ce = !1, de = 0, he = 0;
8757
+ ue(le.data.data);
8758
+ let fe = !1;
8759
+ gridData.value.columns.forEach((me) => {
8760
+ if (me.colId == "_operation_" && me.title == "操作") {
8761
+ me.width != de * 60 && de * 60 >= 60 && (fe = !0, me.width = de.toFixed(1) * 60);
8757
8762
  return;
8758
8763
  }
8759
- }), he && getCurRegion().loadColumn(gridData.value.columns), gridData.value.params.rowIndex != null && (rowIndex.value = gridData.value.params.rowIndex), le.data.data.length > rowIndex.value ? se = le.data.data[rowIndex.value] : se = le.data.data[0];
8760
- const ue = getCurRegion();
8761
- if (ue) {
8762
- const fe = ue.getColumnById("_operation_");
8763
- fe && ce && ue.showColumn(fe);
8764
+ }), fe && getCurRegion().loadColumn(gridData.value.columns), gridData.value.params.rowIndex != null && (he = gridData.value.params.rowIndex), le.data.data.length > he ? se = le.data.data[he] : se = le.data.data[0];
8765
+ const pe = getCurRegion();
8766
+ if (pe) {
8767
+ const me = pe.getColumnById("_operation_");
8768
+ me && ce && pe.showColumn(me);
8764
8769
  }
8765
8770
  !isEditGridInitData.value && gridData.value.type === "EDIT_GRID" && editGridInitData(se);
8766
8771
  }
@@ -9912,6 +9917,18 @@ const windowGrid_vue_vue_type_style_index_0_scoped_deefae39_lang = "", _withScop
9912
9917
  Q && Q.formConfig.items.forEach((H) => {
9913
9918
  H.field ? H.folding = !1 : H.align == "right" && (H.collapseNode = !1);
9914
9919
  });
9920
+ }, headerCustomClick = ({ type: Q, $event: H }) => {
9921
+ if (Q == "confirm" || Q == "reset") {
9922
+ let G = getCurRegion().getColumns(), X = G.filter((K) => K.field).map((K) => K.field), Z = {
9923
+ _region_id: gridData.value.params._region_id,
9924
+ cols: G
9925
+ };
9926
+ axios.post("", Z).then((K) => {
9927
+ K.data.result || console.error(err);
9928
+ }).catch((K) => {
9929
+ console.error(K);
9930
+ });
9931
+ }
9915
9932
  };
9916
9933
  return onMounted(async () => {
9917
9934
  gridData.value.addListener && getCurRegion() && addListener(), gridData.value.type === "TREE_STRUCTURE" && (gridData.value.menuConfig = {
@@ -10009,7 +10026,8 @@ const windowGrid_vue_vue_type_style_index_0_scoped_deefae39_lang = "", _withScop
10009
10026
  onMenuClick: contextMenuClickEvent,
10010
10027
  onCheckboxChange: headerCheckboxChange,
10011
10028
  onCheckboxAll: headerCheckboxChange,
10012
- onProxyQuery: headerProxyQuery
10029
+ onProxyQuery: headerProxyQuery,
10030
+ onCustom: headerCustomClick
10013
10031
  }), {
10014
10032
  scan_item: withCtx(({ data: ae, property: le }) => [
10015
10033
  createVNode(G, {
@@ -10027,7 +10045,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_deefae39_lang = "", _withScop
10027
10045
  }, 1032, ["modelValue", "onUpdate:modelValue"])
10028
10046
  ]),
10029
10047
  operation: withCtx(({ row: ae, rowIndex: le }) => [
10030
- (openBlock(!0), createElementBlock(Fragment, null, renderList(showButtons(le), (se) => (openBlock(), createBlock(K, {
10048
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(showButtons(le, ae), (se) => (openBlock(), createBlock(K, {
10031
10049
  key: se._button_id,
10032
10050
  iconComponent: se.iconComponent,
10033
10051
  "auto-insert-space": "",
@@ -10155,7 +10173,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_deefae39_lang = "", _withScop
10155
10173
  ]);
10156
10174
  };
10157
10175
  }
10158
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-deefae39"]]);
10176
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-a3ca2627"]]);
10159
10177
  WindowGrid.name = "slw-window-grid";
10160
10178
  WindowGrid.install = (Q) => {
10161
10179
  Q.component(WindowGrid.name, WindowGrid);
@@ -42469,7 +42487,7 @@ var js = js$1.exports;
42469
42487
  })(Q);
42470
42488
  })(js$1);
42471
42489
  var jsExports = js$1.exports;
42472
- const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_vue_vue_type_style_index_0_scoped_194102ee_lang = "", _withScopeId$7 = (Q) => (pushScopeId("data-v-194102ee"), Q = Q(), popScopeId(), Q), _hoisted_1$l0 = { class: "slw-window-form" }, _hoisted_2$kX = {
42490
+ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_vue_vue_type_style_index_0_scoped_689a46f5_lang = "", _withScopeId$7 = (Q) => (pushScopeId("data-v-689a46f5"), Q = Q(), popScopeId(), Q), _hoisted_1$l0 = { class: "slw-window-form" }, _hoisted_2$kX = {
42473
42491
  key: 0,
42474
42492
  class: "form-header-box"
42475
42493
  }, _hoisted_3$hX = {
@@ -42490,7 +42508,7 @@ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
42490
42508
  setup(__props, { expose: __expose, emit: emits }) {
42491
42509
  const props = __props, 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");
42492
42510
  let regionMap = inject("$regionMap");
42493
- const ElMessageBox = inject("$ElMessageBox"), addOnActivatedFun = inject("$addOnActivatedFun"), debounce = inject("$debounce"), router = inject("$router");
42511
+ const ElMessageBox = inject("$ElMessageBox"), addOnActivatedFun = inject("$addOnActivatedFun"), debounce = inject("$debounce"), router = inject("$router"), route = inject("$route");
42494
42512
  let formConfig = useVModel$1(props, "formConfig", emits), gridData = ref(formConfig.value), formData = ref({}), fieldColumnMap = ref({}), formDataClone = ref({}), formLoading = ref(!1), queryTimeout = ref(null);
42495
42513
  const $modal = $Modal;
42496
42514
  let uploadConfig = ref({
@@ -43467,7 +43485,7 @@ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
43467
43485
  ]);
43468
43486
  };
43469
43487
  }
43470
- }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-194102ee"]]);
43488
+ }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-689a46f5"]]);
43471
43489
  WindowForm.name = "slw-window-form";
43472
43490
  WindowForm.install = (Q) => {
43473
43491
  Q.component(WindowForm.name, WindowForm);
@@ -59235,7 +59253,7 @@ const windowDesigner_vue_vue_type_style_index_0_scoped_a3ebe962_lang = "", _with
59235
59253
  emits: ["update:type", "update:rootLayout", "update:viewData", "update:rowData"],
59236
59254
  setup(Q, { emit: H }) {
59237
59255
  const G = Q, X = defineAsyncComponent(
59238
- () => import("./index-b177f775.js")
59256
+ () => import("./index-585b397f.js")
59239
59257
  );
59240
59258
  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);
59241
59259
  re.value = createDesigner();
@@ -144213,7 +144231,7 @@ const VXETableExport = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
144213
144231
  ), Q.provide("$components", H == null ? void 0 : H.components), Q.provide("$componentsPath", (H == null ? void 0 : H.componentsPath) || "/src/view"), Q.provide(
144214
144232
  "$message",
144215
144233
  Q.config.globalProperties.$message || VXETableExport.modal.message
144216
- ), Q.provide("$modal", VXETableExport.modal), Q.provide("$vxeMessage", VXETableExport.modal.message), Q.provide("$vxeConfirm", VXETableExport.modal.confirm), Q.provide("$vxeOpen", VXETableExport.modal.open), Q.provide("$vxeReadFile", VXETableExport.readFile), Q.provide("$ElMessageBox", Q.config.globalProperties.$msgbox), Q.provide("$router", Q.config.globalProperties.$router), initVxeRenderer(VXETableExport, G, X), initVxeFormater(VXETableExport), initVxeConfig(VXETableExport);
144234
+ ), Q.provide("$modal", VXETableExport.modal), Q.provide("$vxeMessage", VXETableExport.modal.message), Q.provide("$vxeConfirm", VXETableExport.modal.confirm), Q.provide("$vxeOpen", VXETableExport.modal.open), Q.provide("$vxeReadFile", VXETableExport.readFile), Q.provide("$ElMessageBox", Q.config.globalProperties.$msgbox), Q.provide("$router", Q.config.globalProperties.$router), Q.provide("$route", Q.config.globalProperties.$route), initVxeRenderer(VXETableExport, G, X), initVxeFormater(VXETableExport), initVxeConfig(VXETableExport);
144217
144235
  };
144218
144236
  function reConsole() {
144219
144237
  if (console !== null) {
@@ -144233,7 +144251,7 @@ function reConsole() {
144233
144251
  }
144234
144252
  }
144235
144253
  console.info(
144236
- `%cSLW %cVer 0.9.39%c
144254
+ `%cSLW %cVer 0.9.41%c
144237
144255
  %c指引文档:%chttp://slwdoc.js.sforcecon.com:5900/%c
144238
144256
  %c启光文档:%chttp://docs.js.sforcecon.com:5900/notepad/view/592`,
144239
144257
  "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-b1e7f74c.js";
2
+ import { _ as x, d as S, a as L, u as N } from "./index-3879aac5.js";
3
3
  const I = {
4
4
  computed: {},
5
5
  methods: {
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as a } from "./index-b1e7f74c.js";
1
+ import { i as a } from "./index-3879aac5.js";
2
2
  import "vue";
3
3
  export {
4
4
  a as default