agilebuilder-ui 1.1.65-tmp23 → 1.1.65-tmp24

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.
Files changed (80) hide show
  1. package/dist/index.full.min.js +462 -281
  2. package/dist/style.css +181 -175
  3. package/es/chat-embed/src/chat-sender.vue.mjs +1 -1
  4. package/es/chat-embed/src/chat-sender.vue2.mjs +26 -28
  5. package/es/chat-embed/src/index.vue.mjs +1 -1
  6. package/es/chat-embed/src/index.vue2.mjs +29 -29
  7. package/es/department-tree-mobile/src/department-tree-inline-app.vue.mjs +68 -68
  8. package/es/department-tree-mobile/src/department-tree-service.mjs +20 -18
  9. package/es/department-tree-mobile/src/dept-result.vue.mjs +12 -11
  10. package/es/department-user-tree-inline/src/department-user-single-tree-inline.vue.mjs +3 -3
  11. package/es/department-user-tree-inline/src/department-user-tree-inline.vue.mjs +6 -6
  12. package/es/department-user-tree-inline/src/department-user-tree-single-service.mjs +1 -1
  13. package/es/fs-preview/src/fs-preview.vue.mjs +26 -18
  14. package/es/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.mjs +1 -1
  15. package/es/fs-upload-new/src/file-upload-mobile/file-upload-input.vue.mjs +1 -1
  16. package/es/index.mjs +2 -1
  17. package/es/src/components/Card/index.mjs +34 -31
  18. package/es/src/components/Scrollbar/index.vue.mjs +6 -6
  19. package/es/src/i18n/langs/cn.mjs +1 -1
  20. package/es/src/i18n/langs/en.mjs +1 -1
  21. package/es/src/utils/common-util.mjs +47 -39
  22. package/es/style.css +738 -732
  23. package/es/super-grid/src/apis.mjs +199 -173
  24. package/es/super-grid/src/components/mobile-table-card.mjs +53 -53
  25. package/es/super-grid/src/normal-column-content.vue.mjs +12 -12
  26. package/es/super-grid/src/normal-column.vue.mjs +4 -5
  27. package/es/super-grid/src/search-button.vue.mjs +4 -2
  28. package/es/super-grid/src/search-form-dialog.vue.mjs +22 -11
  29. package/es/super-grid/src/search-form-item.vue.mjs +5 -5
  30. package/es/super-grid/src/search-form-mobile.vue.mjs +19 -19
  31. package/es/super-grid/src/search-form-open.vue.mjs +5 -3
  32. package/es/super-grid/src/search-form-ordinarySearch.vue.mjs +3 -1
  33. package/es/super-grid/src/search-form.vue.mjs +19 -13
  34. package/es/super-grid/src/super-grid.vue.mjs +271 -209
  35. package/es/super-grid/src/utils.mjs +346 -300
  36. package/es/utils/organization.mjs +24 -11
  37. package/lib/chat-embed/src/chat-sender.vue.cjs +1 -1
  38. package/lib/chat-embed/src/chat-sender.vue2.cjs +44 -46
  39. package/lib/chat-embed/src/index.vue.cjs +1 -1
  40. package/lib/chat-embed/src/index.vue2.cjs +14 -14
  41. package/lib/department-tree-mobile/src/department-tree-inline-app.vue.cjs +58 -58
  42. package/lib/department-tree-mobile/src/department-tree-service.cjs +10 -8
  43. package/lib/department-tree-mobile/src/dept-result.vue.cjs +10 -10
  44. package/lib/department-user-tree-inline/src/department-user-single-tree-inline.vue.cjs +16 -16
  45. package/lib/department-user-tree-inline/src/department-user-tree-inline.vue.cjs +5 -5
  46. package/lib/department-user-tree-inline/src/department-user-tree-single-service.cjs +1 -1
  47. package/lib/fs-preview/src/fs-preview.vue.cjs +13 -5
  48. package/lib/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.cjs +1 -1
  49. package/lib/fs-upload-new/src/file-upload-mobile/file-upload-input.vue.cjs +13 -13
  50. package/lib/index.cjs +7 -7
  51. package/lib/src/components/Card/index.cjs +14 -11
  52. package/lib/src/components/Scrollbar/index.vue.cjs +2 -2
  53. package/lib/src/i18n/langs/cn.cjs +1 -1
  54. package/lib/src/i18n/langs/en.cjs +1 -1
  55. package/lib/src/utils/common-util.cjs +24 -17
  56. package/lib/style.css +665 -659
  57. package/lib/super-grid/src/apis.cjs +190 -164
  58. package/lib/super-grid/src/components/mobile-table-card.cjs +37 -37
  59. package/lib/super-grid/src/normal-column-content.vue.cjs +2 -2
  60. package/lib/super-grid/src/normal-column.vue.cjs +10 -11
  61. package/lib/super-grid/src/search-button.vue.cjs +3 -1
  62. package/lib/super-grid/src/search-form-dialog.vue.cjs +19 -8
  63. package/lib/super-grid/src/search-form-item.vue.cjs +2 -2
  64. package/lib/super-grid/src/search-form-mobile.vue.cjs +7 -7
  65. package/lib/super-grid/src/search-form-open.vue.cjs +7 -5
  66. package/lib/super-grid/src/search-form-ordinarySearch.vue.cjs +3 -1
  67. package/lib/super-grid/src/search-form.vue.cjs +15 -10
  68. package/lib/super-grid/src/super-grid.vue.cjs +220 -158
  69. package/lib/super-grid/src/utils.cjs +349 -274
  70. package/lib/utils/organization.cjs +35 -24
  71. package/package.json +1 -1
  72. package/src/components/Card/index.jsx +12 -2
  73. package/src/components/Scrollbar/index.vue +165 -154
  74. package/src/i18n/langs/cn.js +10 -2
  75. package/src/i18n/langs/en.js +10 -2
  76. package/src/styles/index.scss +9 -2
  77. package/src/styles/theme/default.scss +18 -13
  78. package/src/styles/theme/tiffany-blue-mobile/home.scss +44 -1
  79. package/src/utils/auth-api.js +1 -0
  80. package/src/utils/common-util.js +13 -0
@@ -2,10 +2,10 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const e = require("../../utils/gogocodeTransfer.cjs"), t = require("./store.cjs"), i = require("./utils.cjs"), a = require("./formValidatorUtil.cjs");
4
4
  require("vue");
5
- const o = require("../../src/utils/util.cjs"), n = require("./eventBus.cjs"), s = require("../../src/utils/common-util.cjs"), l = require("../../src/utils/jump-page-utils.cjs"), r = require("../../src/utils/guid.cjs"), d = require("element-plus"), g = { toolbarRefresh(e2, t2, i2, a2) {
5
+ const o = require("../../src/utils/util.cjs"), s = require("./eventBus.cjs"), n = require("../../src/utils/common-util.cjs"), l = require("../../src/utils/jump-page-utils.cjs"), r = require("../../src/utils/guid.cjs"), d = require("element-plus"), u = { toolbarRefresh(e2, t2, i2, a2) {
6
6
  return this.toolbarFieldParam = i2, this.refresh(e2, t2, i2, a2);
7
7
  }, refresh(e2, i2, a2, o2) {
8
- return new Promise((i3, n2) => {
8
+ return new Promise((i3, s2) => {
9
9
  if (o2) {
10
10
  t.get(this.code).options.subTableData = null;
11
11
  }
@@ -13,14 +13,14 @@ const o = require("../../src/utils/util.cjs"), n = require("./eventBus.cjs"), s
13
13
  if (null != e2 && e2 instanceof Array && e2.length > 0)
14
14
  if (this.$refs.sf) {
15
15
  let t2 = this.$refs.sf.packageSearchParam();
16
- t2 && t2.length > 0 ? a2 && a2.length > 0 && (1 === t2.length && (t2[0].leftBracket = "(", t2[0].rightBracket = ")"), "or" === t2[t2.length - 1].joinSign && (t2[t2.length - 1].joinSign = "and"), Array.prototype.push.apply(t2, a2)) : a2 && (t2 = [], t2 = a2), this.search(t2, false, e2).then(() => i3()).catch((e3) => n2(e3));
16
+ t2 && t2.length > 0 ? a2 && a2.length > 0 && (1 === t2.length && (t2[0].leftBracket = "(", t2[0].rightBracket = ")"), "or" === t2[t2.length - 1].joinSign && (t2[t2.length - 1].joinSign = "and"), Array.prototype.push.apply(t2, a2)) : a2 && (t2 = [], t2 = a2), this.search(t2, false, e2).then(() => i3()).catch((e3) => s2(e3));
17
17
  } else
18
- this.search(a2, false, e2).then(() => i3()).catch((e3) => n2(e3));
18
+ this.search(a2, false, e2).then(() => i3()).catch((e3) => s2(e3));
19
19
  else if (this.$refs.sf) {
20
20
  let e3 = this.$refs.sf.packageSearchParam();
21
- e3 && e3.length > 0 ? a2 && a2.length > 0 && (1 === e3.length && (e3[0].leftBracket = "(", e3[0].rightBracket = ")"), "or" === e3[e3.length - 1].joinSign && (e3[e3.length - 1].joinSign = "and"), Array.prototype.push.apply(e3, a2)) : a2 && (e3 = [], e3 = a2), this.search(e3, false).then(() => i3()).catch((e4) => n2(e4));
21
+ e3 && e3.length > 0 ? a2 && a2.length > 0 && (1 === e3.length && (e3[0].leftBracket = "(", e3[0].rightBracket = ")"), "or" === e3[e3.length - 1].joinSign && (e3[e3.length - 1].joinSign = "and"), Array.prototype.push.apply(e3, a2)) : a2 && (e3 = [], e3 = a2), this.search(e3, false).then(() => i3()).catch((e4) => s2(e4));
22
22
  } else
23
- this.search(a2, false).then(() => i3()).catch((e3) => n2(e3));
23
+ this.search(a2, false).then(() => i3()).catch((e3) => s2(e3));
24
24
  else
25
25
  i3();
26
26
  });
@@ -31,116 +31,127 @@ const o = require("../../src/utils/util.cjs"), n = require("./eventBus.cjs"), s
31
31
  }, getSearchForm() {
32
32
  const e2 = t.get(this.code);
33
33
  return e2.searchForm ? e2.searchForm : [];
34
- }, createRow(a2, s2, l2, r2) {
34
+ }, createRow(a2, n2, l2, r2) {
35
35
  let d2 = -1;
36
- return r2 && r2.rowIndex > -1 && (d2 = r2.rowIndex + 1), new Promise((r3, g2) => {
36
+ return r2 && r2.rowIndex > -1 && (d2 = r2.rowIndex + 1), new Promise((r3, u2) => {
37
37
  var _a, _b, _c;
38
38
  a2 || (a2 = t.get("_list_code"));
39
- const u2 = t.get(a2), p = u2.gridData;
40
- if ((_b = (_a = u2.superGrid) == null ? void 0 : _a.clearSort) == null ? void 0 : _b.call(_a), u2.lineEdit && u2.lineEdit.editable && void 0 !== u2.loaded && true === u2.loaded) {
39
+ const g2 = t.get(a2), p = g2.gridData;
40
+ if ((_b = (_a = g2.superGrid) == null ? void 0 : _a.clearSort) == null ? void 0 : _b.call(_a), g2.lineEdit && g2.lineEdit.editable && void 0 !== g2.loaded && true === g2.loaded) {
41
41
  let t2 = true;
42
42
  if (i.isEditOptionFunction("beforeInsertRow", a2)) {
43
- const e2 = u2.isSubTableShowPage, i2 = u2.pagination && u2.pagination.pageSize, a3 = this.isMobile;
44
- t2 = u2.pageContext ? u2.options.lineEditOptions.beforeInsertRow.call(this, { gridData: e2 ? u2.subTableData : u2.gridData, rowIndex: u2.$rowIndex, isMobile: a3, baseURL: this.baseURL, totalData: e2 ? u2.gridData : null, pageSize: i2, additionalParamMap: u2.additionalParamMap, row: s2, pageContext: u2.pageContext, configureObj: u2.configureObj }) : u2.options.lineEditOptions.beforeInsertRow.call(this, e2 ? u2.subTableData : u2.gridData, u2.$rowIndex, a3, this.baseURL, e2 ? u2.gridData : null, i2, u2.additionalParamMap, s2);
43
+ const e2 = g2.isSubTableShowPage, i2 = g2.pagination && g2.pagination.pageSize, a3 = this.isMobile;
44
+ t2 = g2.pageContext ? g2.options.lineEditOptions.beforeInsertRow.call(this, { gridData: e2 ? g2.subTableData : g2.gridData, rowIndex: g2.$rowIndex, isMobile: a3, baseURL: this.baseURL, totalData: e2 ? g2.gridData : null, pageSize: i2, additionalParamMap: g2.additionalParamMap, row: n2, pageContext: g2.pageContext, configureObj: g2.configureObj }) : g2.options.lineEditOptions.beforeInsertRow.call(this, e2 ? g2.subTableData : g2.gridData, g2.$rowIndex, a3, this.baseURL, e2 ? g2.gridData : null, i2, g2.additionalParamMap, n2);
45
45
  }
46
46
  if (void 0 === t2 || true === t2) {
47
- if (u2.options && u2.options.isFormSubTable) {
48
- let t4 = u2.gridData;
49
- void 0 !== u2.isSubTableShowPage && true === u2.isSubTableShowPage && (t4 = u2.subTableData);
47
+ if (g2.options && g2.options.isFormSubTable) {
48
+ let t4 = g2.gridData;
49
+ void 0 !== g2.isSubTableShowPage && true === g2.isSubTableShowPage && (t4 = g2.subTableData);
50
50
  const i2 = t4.filter((e2) => void 0 !== e2.$editing && true === e2.$editing);
51
51
  i2 && i2.length > 0 && i2.forEach((t5) => {
52
- o.setEntityFieldValue(t5, "$editing", false), e.$emit(n, "un-edit", { row: t5 });
53
- }), u2.isEditRow = false;
52
+ o.setEntityFieldValue(t5, "$editing", false), e.$emit(s, "un-edit", { row: t5 });
53
+ }), g2.isEditRow = false;
54
54
  } else {
55
- if (!i.isLastEditRowSave(a2) || void 0 !== u2.isCreateRow && true === u2.isCreateRow)
56
- return window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.pleaseSaveLine", { row: u2.$rowIndex + 1 }), type: "warning" }), void g2(new Error("please save line"));
57
- if (void 0 !== u2.$rowIndex && null !== u2.$rowIndex && u2.$rowIndex < u2.gridData.length) {
58
- const e2 = u2.gridData[u2.$rowIndex];
59
- o.setEntityFieldValue(e2, "$editing", false), u2.isEditRow = false;
55
+ if (!i.isLastEditRowSave(a2) || void 0 !== g2.isCreateRow && true === g2.isCreateRow)
56
+ return window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.pleaseSaveLine", { row: g2.$rowIndex + 1 }), type: "warning" }), void u2(new Error("please save line"));
57
+ if (void 0 !== g2.$rowIndex && null !== g2.$rowIndex && g2.$rowIndex < g2.gridData.length) {
58
+ const e2 = g2.gridData[g2.$rowIndex];
59
+ o.setEntityFieldValue(e2, "$editing", false), g2.isEditRow = false;
60
60
  }
61
61
  }
62
- if (false === i.parseSubTableActionCondition(u2, this.parentFormData, {}, (_c = u2.options.actionPermission) == null ? void 0 : _c.addCondition))
63
- return window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.canntAddTip"), type: "warning" }), void g2(new Error("can not create"));
64
- if (s2 = this.getNewRow(u2.defaultValueColumns, u2.additionalParamMap, u2.contextParameter, s2, a2, l2 ? l2.getDefaultValueFunc : null), o.setEntityFieldValue(s2, "$editing", true), u2.isEditRow = true, u2.options && u2.options.isFormSubTable) {
65
- if (void 0 !== u2.isSubTableShowPage && true === u2.isSubTableShowPage)
66
- if (u2.isChangePage = true, d2 >= 0) {
67
- const e2 = (this.currentPage - 1) * this.pageSize + d2;
68
- u2.addRowIndex = e2 + 1, u2.subTableData.splice(e2, 0, s2);
62
+ if (false === i.parseSubTableActionCondition(g2, this.parentFormData, {}, (_c = g2.options.actionPermission) == null ? void 0 : _c.addCondition))
63
+ return window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.canntAddTip"), type: "warning" }), void u2(new Error("can not create"));
64
+ if (n2 = this.getNewRow(g2.defaultValueColumns, g2.additionalParamMap, g2.contextParameter, n2, a2, l2 ? l2.getDefaultValueFunc : null), o.setEntityFieldValue(n2, "$editing", true), g2.isEditRow = true, g2.options && g2.options.isFormSubTable) {
65
+ if (void 0 !== g2.isSubTableShowPage && true === g2.isSubTableShowPage ? g2.isChangePage = true : g2.isAddRow = true, d2 >= 0) {
66
+ const e2 = (this.currentPage - 1) * this.pageSize + d2;
67
+ g2.addRowIndex = e2 + 1, g2.isSubSearch && g2.subTableDataSearch ? (g2.subTableDataSearch.splice(e2, 0, n2), g2.subTableData.splice(e2, 0, n2)) : g2.subTableData.splice(e2, 0, n2);
68
+ } else {
69
+ if (g2.isSubSearch && g2.subTableDataSearch) {
70
+ let e2 = g2.subTableDataSearch.length;
71
+ e2 <= 0 && (e2 = -1), g2.subTableDataSearch.splice(e2, 0, n2), g2.subTableData.splice(e2, 0, n2);
69
72
  } else {
70
- let e2 = u2.subTableData.length;
71
- e2 <= 0 && (e2 = -1), u2.subTableData.splice(e2, 0, s2), u2.addRowIndex = u2.subTableData.length;
73
+ let e2 = g2.subTableData.length;
74
+ e2 <= 0 && (e2 = -1), g2.subTableData.splice(e2, 0, n2);
72
75
  }
73
- else
74
- d2 >= 0 ? p.splice(d2, 0, s2) : p.splice(p.length, 0, s2), u2.lineEdit.editingCell && (u2.lineEdit.editingCell.row = p.length);
75
- u2.$rowIndex = p.length, this.$nextTick(() => {
76
+ g2.addRowIndex = g2.subTableData.length;
77
+ }
78
+ g2.$rowIndex = p.length, this.isMobile || this.$nextTick(() => {
76
79
  i.scrollYToBottom(a2);
77
80
  });
78
81
  } else
79
- p.splice(0, 0, s2), u2.lineEdit.editingCell && (u2.lineEdit.editingCell.row = 0), u2.$rowIndex = 0;
80
- const t3 = Object.assign({}, s2);
81
- if (d2 >= 0 ? u2.orgGridData.splice(d2, 0, t3) : u2.orgGridData.splice(0, 0, t3), u2.lineEdit.editingCell || (u2.lineEdit.editingCell = {}, u2.lineEdit.validateErrorField = ""), i.isEditOptionFunction("afterInsertRow", a2)) {
82
- const e2 = u2.isSubTableShowPage, t4 = u2.pagination && u2.pagination.pageSize, i2 = this.isMobile;
83
- u2.pageContext ? u2.options.lineEditOptions.afterInsertRow.call(this, { gridData: e2 ? u2.subTableData : u2.gridData, rowIndex: u2.$rowIndex, isMobile: i2, baseURL: this.baseURL, totalData: e2 ? u2.gridData : null, pageSize: t4, additionalParamMap: u2.additionalParamMap, pageContext: u2.pageContext, configureObj: u2.configureObj }) : u2.options.lineEditOptions.afterInsertRow.call(this, e2 ? u2.subTableData : u2.gridData, u2.$rowIndex, i2, this.baseURL, e2 ? u2.gridData : null, t4, u2.additionalParamMap);
82
+ p.splice(0, 0, n2), g2.lineEdit.editingCell && (g2.lineEdit.editingCell.row = 0), g2.$rowIndex = 0;
83
+ const t3 = Object.assign({}, n2);
84
+ if (d2 >= 0 ? g2.orgGridData.splice(d2, 0, t3) : g2.orgGridData.splice(0, 0, t3), g2.lineEdit.editingCell || (g2.lineEdit.editingCell = {}, g2.lineEdit.validateErrorField = ""), i.isEditOptionFunction("afterInsertRow", a2)) {
85
+ const e2 = g2.isSubTableShowPage, t4 = g2.pagination && g2.pagination.pageSize, i2 = this.isMobile;
86
+ g2.pageContext ? g2.options.lineEditOptions.afterInsertRow.call(this, { gridData: e2 ? g2.subTableData : g2.gridData, rowIndex: g2.$rowIndex, isMobile: i2, baseURL: this.baseURL, totalData: e2 ? g2.gridData : null, pageSize: t4, additionalParamMap: g2.additionalParamMap, pageContext: g2.pageContext, configureObj: g2.configureObj }) : g2.options.lineEditOptions.afterInsertRow.call(this, e2 ? g2.subTableData : g2.gridData, g2.$rowIndex, i2, this.baseURL, e2 ? g2.gridData : null, t4, g2.additionalParamMap);
84
87
  }
85
- u2.isCreateRow = true, r3(s2);
88
+ g2.isCreateRow = true, r3(n2);
86
89
  } else
87
- g2(new Error("can not create"));
90
+ u2(new Error("can not create"));
88
91
  } else
89
- g2(new Error("list not editable or data not loaded completely"));
92
+ u2(new Error("list not editable or data not loaded completely"));
90
93
  });
91
- }, getNewRow(e2, i2, a2, n2, s2, l2) {
92
- n2 || (n2 = {}), s2 || (s2 = t.get("_list_code"));
93
- const d2 = t.get(s2);
94
- if (d2 && d2.allColumns && this.setColumnsDefaultValue(d2.allColumns, n2, d2, l2), e2 && e2.length > 0)
95
- for (var g2 = 0; g2 < e2.length; g2++) {
96
- const t2 = e2[g2];
94
+ }, getNewRow(e2, i2, a2, s2, n2, l2) {
95
+ s2 || (s2 = {}), n2 || (n2 = t.get("_list_code"));
96
+ const d2 = t.get(n2);
97
+ if (d2 && d2.allColumns && this.setColumnsDefaultValue(d2.allColumns, s2, d2, l2), e2 && e2.length > 0)
98
+ for (var u2 = 0; u2 < e2.length; u2++) {
99
+ const t2 = e2[u2];
97
100
  if (t2 && t2.prop) {
98
- const e3 = o.getEntityFieldValue(n2, t2.prop);
101
+ const e3 = o.getEntityFieldValue(s2, t2.prop);
99
102
  if ("$selection" !== t2.prop && "$index" !== t2.prop && t2.defaultValue && "" !== t2.defaultValue && (void 0 === e3 || "" === e3 || null === e3)) {
100
103
  let e4;
101
- e4 = d2.pageContext ? o.getPropValueNew(t2.defaultValue, d2.pageContext) : o.getPropValue(t2.defaultValue, n2, i2, a2), o.setEntityFieldValue(n2, t2.prop, e4);
104
+ e4 = d2.pageContext ? o.getPropValueNew(t2.defaultValue, d2.pageContext) : o.getPropValue(t2.defaultValue, s2, i2, a2), o.setEntityFieldValue(s2, t2.prop, e4);
102
105
  }
103
106
  }
104
107
  }
105
- return { $rowDataGuId: r.getGuId(), ...n2 };
108
+ return { $rowDataGuId: r.getGuId(), ...s2 };
106
109
  }, setColumnsDefaultValue(e2, t2, i2, a2) {
107
- for (let n2 = 0; n2 < e2.length; n2++) {
108
- const s2 = e2[n2], l2 = s2.prop;
110
+ for (let s2 = 0; s2 < e2.length; s2++) {
111
+ const n2 = e2[s2], l2 = n2.prop;
109
112
  if ("$index" !== l2 && "$selection" !== l2 && "operation" !== l2) {
110
- if (s2.hasOwnProperty("children"))
111
- this.setChildrenColumnsDefaultValue(s2.children, t2);
113
+ if (n2.hasOwnProperty("children"))
114
+ this.setChildrenColumnsDefaultValue(n2.children, t2, i2, a2);
112
115
  else if (void 0 === t2[l2]) {
113
- const e3 = s2.defaultValue;
114
- let n3 = null;
115
- a2 && (n3 = a2(i2.pageContext, e3, null, null), void 0 === n3 && (n3 = null)), o.setEntityFieldValue(t2, l2, n3);
116
+ let e3 = this.getColumnDefaultValue(n2, i2, a2);
117
+ o.setEntityFieldValue(t2, l2, e3);
116
118
  }
117
119
  }
118
120
  }
119
121
  o.setEntityFieldValue(t2, "$editing", false);
120
- }, setChildrenColumnsDefaultValue(e2, t2) {
121
- for (let i2 = 0; i2 < e2.length; i2++) {
122
- const a2 = e2[i2], n2 = a2.prop;
123
- a2.hasOwnProperty("children") ? this.setChildrenColumnsDefaultValue(a2.children, t2) : void 0 === t2[n2] && "operation" !== n2 && o.setEntityFieldValue(t2, n2, null);
122
+ }, setChildrenColumnsDefaultValue(e2, t2, i2, a2) {
123
+ for (let s2 = 0; s2 < e2.length; s2++) {
124
+ const n2 = e2[s2], l2 = n2.prop;
125
+ if (n2.hasOwnProperty("children"))
126
+ this.setChildrenColumnsDefaultValue(n2.children, t2, i2, a2);
127
+ else if (void 0 === t2[l2] && "operation" !== l2) {
128
+ let e3 = this.getColumnDefaultValue(n2, i2, a2);
129
+ o.setEntityFieldValue(t2, l2, e3);
130
+ }
124
131
  }
132
+ }, getColumnDefaultValue(e2, t2, i2) {
133
+ const a2 = e2.defaultValue;
134
+ let o2 = null;
135
+ return i2 && (o2 = i2(t2.pageContext, a2, null, null), void 0 === o2 && (o2 = null)), o2;
125
136
  }, isLastEditRowSaveMessage(e2) {
126
137
  e2 || (e2 = t.get("_list_code"));
127
138
  const a2 = t.get(e2);
128
139
  return !!i.isLastEditRowSave(e2) || (window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.pleaseSaveLine", { row: a2.$rowIndex + 1 }), type: "warning" }), false);
129
140
  }, confirmBeforeSwitchingRow(e2, a2) {
130
141
  e2 || (e2 = t.get("_list_code"));
131
- const { t: n2 } = o.getI18n(), s2 = t.get(e2).$rowIndex;
132
- i.isLastEditRowSave(e2) || d.ElMessageBox.confirm(n2("superGrid.rowEditMessageBox.content"), n2("superGrid.rowEditMessageBox.title"), { distinguishCancelAndClose: true, confirmButtonText: n2("superGrid.rowEditMessageBox.confirmButton"), cancelButtonText: n2("superGrid.rowEditMessageBox.cancelButton"), showClose: true, beforeClose: (t2, i2, o2) => {
133
- "confirm" === t2 ? this.saveRow(s2, e2).then((e3) => {
142
+ const { t: s2 } = o.getI18n(), n2 = t.get(e2).$rowIndex;
143
+ i.isLastEditRowSave(e2) || d.ElMessageBox.confirm(s2("superGrid.rowEditMessageBox.content"), s2("superGrid.rowEditMessageBox.title"), { distinguishCancelAndClose: true, confirmButtonText: s2("superGrid.rowEditMessageBox.confirmButton"), cancelButtonText: s2("superGrid.rowEditMessageBox.cancelButton"), showClose: true, beforeClose: (t2, i2, o2) => {
144
+ "confirm" === t2 ? this.saveRow(n2, e2).then((e3) => {
134
145
  a2 == null ? void 0 : a2("confirm"), o2();
135
- }) : "cancel" === t2 ? (this.restoreCurrentRow(s2, e2), a2 == null ? void 0 : a2("cancel"), o2()) : "close" === t2 && o2();
146
+ }) : "cancel" === t2 ? (this.restoreCurrentRow(n2, e2), a2 == null ? void 0 : a2("cancel"), o2()) : "close" === t2 && o2();
136
147
  } });
137
- }, editRow(e2, a2, n2, l2) {
148
+ }, editRow(e2, a2, s2, l2) {
138
149
  a2 || (a2 = t.get("_list_code"));
139
150
  const r2 = t.get(a2);
140
151
  if (r2 && r2.lineEdit && r2.lineEdit.editable) {
141
152
  if (void 0 !== r2.$rowIndex && null !== r2.$rowIndex && r2.$rowIndex !== e2) {
142
153
  if (void 0 === r2.options.lineEditOptions.autoSave || i.isHasEditOption("autoSave", a2) && true === r2.options.lineEditOptions.autoSave) {
143
- if (!n2)
154
+ if (!s2)
144
155
  return void this.saveRow(r2.$rowIndex, a2).then((t3) => {
145
156
  this.editRow(e2, a2, true);
146
157
  });
@@ -149,10 +160,10 @@ const o = require("../../src/utils/util.cjs"), n = require("./eventBus.cjs"), s
149
160
  }
150
161
  let t2 = true;
151
162
  if (!l2 && i.isEditOptionFunction("beforeEdit", a2)) {
152
- const o2 = r2.isSubTableShowPage, n3 = r2.pagination && r2.pagination.pageSize;
153
- t2 = r2.options.lineEditOptions.beforeEdit.call(this, { gridData: o2 ? r2.subTableData : r2.gridData, listCode: a2, entity: r2.gridData[e2], row: r2.gridData[e2], rowIndex: e2, columns: r2.columns, isMobile: false, pageGridData: o2 ? r2.gridData : null, pageSize: n3, additionalParamMap: i.getAdditionalParamMap(r2), pageContext: r2.pageContext, configureObj: r2.configureObj });
163
+ const o2 = r2.isSubTableShowPage, s3 = r2.pagination && r2.pagination.pageSize;
164
+ t2 = r2.options.lineEditOptions.beforeEdit.call(this, { gridData: o2 ? r2.subTableData : r2.gridData, listCode: a2, entity: r2.gridData[e2], row: r2.gridData[e2], rowIndex: e2, columns: r2.columns, isMobile: false, pageGridData: o2 ? r2.gridData : null, pageSize: s3, additionalParamMap: i.getAdditionalParamMap(r2), pageContext: r2.pageContext, configureObj: r2.configureObj });
154
165
  }
155
- s.isPromise(t2) ? t2.then((t3) => {
166
+ n.isPromise(t2) ? t2.then((t3) => {
156
167
  void 0 !== t3 && true !== t3 || this.doEditRow(r2, e2);
157
168
  }) : void 0 !== t2 && true !== t2 || this.doEditRow(r2, e2);
158
169
  }
@@ -172,56 +183,56 @@ const o = require("../../src/utils/util.cjs"), n = require("./eventBus.cjs"), s
172
183
  });
173
184
  }, 100);
174
185
  });
175
- }, saveCurrentRow(s2, l2) {
186
+ }, saveCurrentRow(n2, l2) {
176
187
  return new Promise((r2, d2) => {
177
188
  l2 || (l2 = t.get("_list_code"));
178
- const g2 = t.get(l2);
179
- if (g2.lineEdit && g2.lineEdit.editable) {
180
- if (void 0 === g2.gridData[s2].$editing || false === g2.gridData[s2].$editing)
181
- return void window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.noNeedToSaveRow", { row: s2 + 1 }), type: "warning" });
182
- if (g2.$rowIndex !== s2 && !i.isLastEditRowSave(l2))
183
- return void window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.pleaseSaveLine", { row: g2.$rowIndex + 1 }), type: "warning" });
184
- if (g2.$lastSaveRowIndex = null, void 0 !== g2.isHasDynamic && false === g2.isHasDynamic && !g2.lineEdit.urlToSaveRow && !i.isHasEditOption("urlToSaveRow", l2) && !i.isEditOptionFunction("saveRow", l2))
189
+ const u2 = t.get(l2);
190
+ if (u2.lineEdit && u2.lineEdit.editable) {
191
+ if (void 0 === u2.gridData[n2].$editing || false === u2.gridData[n2].$editing)
192
+ return void window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.noNeedToSaveRow", { row: n2 + 1 }), type: "warning" });
193
+ if (u2.$rowIndex !== n2 && !i.isLastEditRowSave(l2))
194
+ return void window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.pleaseSaveLine", { row: u2.$rowIndex + 1 }), type: "warning" });
195
+ if (u2.$lastSaveRowIndex = null, void 0 !== u2.isHasDynamic && false === u2.isHasDynamic && !u2.lineEdit.urlToSaveRow && !i.isHasEditOption("urlToSaveRow", l2) && !i.isEditOptionFunction("saveRow", l2))
185
196
  return void window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.pleaseSetURLToSaveRowInformation"), type: "warning" });
186
- if (!g2.canSaveRow)
197
+ if (!u2.canSaveRow)
187
198
  return;
188
- g2.canSaveRow = false;
189
- const t2 = g2.gridData[s2];
190
- let u2 = true;
191
- i.isHasEditOption("isEnableValidate", l2) && (u2 = g2.options.lineEditOptions.isEnableValidate);
199
+ u2.canSaveRow = false;
200
+ const t2 = u2.gridData[n2];
201
+ let g2 = true;
202
+ i.isHasEditOption("isEnableValidate", l2) && (g2 = u2.options.lineEditOptions.isEnableValidate);
192
203
  let p = true;
193
- if (true === u2 && (p = a.validator(t2, l2, s2)), true === p) {
204
+ if (true === g2 && (p = a.validator(t2, l2, n2)), true === p) {
194
205
  let a2 = true;
195
- if (i.isEditOptionFunction("beforeSave", l2) && (a2 = g2.pageContext ? g2.options.lineEditOptions.beforeSave.call(this, { row: t2, columns: g2.columns, additionalParamMap: g2.additionalParamMap, pageContext: g2.pageContext, configureObj: g2.configureObj }) : g2.options.lineEditOptions.beforeSave.call(this, t2, g2.columns, g2.additionalParamMap)), void 0 === a2 || true === a2) {
196
- e.$emit(n, "un-edit", { row: t2 });
197
- const a3 = i.getAdditionalParamMap(g2);
198
- let u3;
199
- if (i.isEditOptionFunction("saveRow", l2) && (u3 = g2.pageContext ? g2.options.lineEditOptions.saveRow.call(this, { row: t2, columns: g2.columns, dataTypeMap: g2.$dataTypeMap, dynamicColumnInfo: g2.dynamicColumnInfo, additionalParamMap: a3, mainDefaultValueColumns: g2.mainDefaultValueColumns, pageContext: g2.pageContext, configureObj: g2.configureObj }) : g2.options.lineEditOptions.saveRow.call(this, t2, g2.columns, g2.$dataTypeMap, g2.dynamicColumnInfo, a3, g2.mainDefaultValueColumns)), !u3 && g2.lineEdit && g2.lineEdit.urlToSaveRow) {
200
- let e2 = g2.lineEdit.urlToSaveRow;
201
- i.isHasEditOption("urlToSaveRow", l2) && (e2 = g2.options.lineEditOptions.urlToSaveRow), u3 = window.$vueApp.config.globalProperties.$http.post(window.$vueApp.config.globalProperties.baseURL + e2, t2);
206
+ if (i.isEditOptionFunction("beforeSave", l2) && (a2 = u2.pageContext ? u2.options.lineEditOptions.beforeSave.call(this, { row: t2, columns: u2.columns, additionalParamMap: u2.additionalParamMap, pageContext: u2.pageContext, configureObj: u2.configureObj }) : u2.options.lineEditOptions.beforeSave.call(this, t2, u2.columns, u2.additionalParamMap)), void 0 === a2 || true === a2) {
207
+ e.$emit(s, "un-edit", { row: t2 });
208
+ const a3 = i.getAdditionalParamMap(u2);
209
+ let g3;
210
+ if (i.isEditOptionFunction("saveRow", l2) && (g3 = u2.pageContext ? u2.options.lineEditOptions.saveRow.call(this, { row: t2, columns: u2.columns, dataTypeMap: u2.$dataTypeMap, dynamicColumnInfo: u2.dynamicColumnInfo, additionalParamMap: a3, mainDefaultValueColumns: u2.mainDefaultValueColumns, pageContext: u2.pageContext, configureObj: u2.configureObj }) : u2.options.lineEditOptions.saveRow.call(this, t2, u2.columns, u2.$dataTypeMap, u2.dynamicColumnInfo, a3, u2.mainDefaultValueColumns)), !g3 && u2.lineEdit && u2.lineEdit.urlToSaveRow) {
211
+ let e2 = u2.lineEdit.urlToSaveRow;
212
+ i.isHasEditOption("urlToSaveRow", l2) && (e2 = u2.options.lineEditOptions.urlToSaveRow), g3 = window.$vueApp.config.globalProperties.$http.post(window.$vueApp.config.globalProperties.baseURL + e2, t2);
202
213
  }
203
- if (void 0 !== g2.isHasDynamic && true === g2.isHasDynamic && !u3) {
204
- const e2 = "/common/dynamic-values", i2 = { mainTableName: g2.basicInfo && g2.basicInfo.tableName ? g2.basicInfo.tableName : "", row: t2, dynamicColumnInfo: g2.dynamicColumnInfo, additionalParamMap: a3, dataTypeMap: g2.$dataTypeMap, dynamicServiceName: g2.dynamicServiceName, mainDefaultValueColumns: g2.mainDefaultValueColumns };
205
- u3 = window.$vueApp.config.globalProperties.$http.post(window.$vueApp.config.globalProperties.baseURL + e2, i2);
214
+ if (void 0 !== u2.isHasDynamic && true === u2.isHasDynamic && !g3) {
215
+ const e2 = "/common/dynamic-values", i2 = { mainTableName: u2.basicInfo && u2.basicInfo.tableName ? u2.basicInfo.tableName : "", row: t2, dynamicColumnInfo: u2.dynamicColumnInfo, additionalParamMap: a3, dataTypeMap: u2.$dataTypeMap, dynamicServiceName: u2.dynamicServiceName, mainDefaultValueColumns: u2.mainDefaultValueColumns };
216
+ g3 = window.$vueApp.config.globalProperties.$http.post(window.$vueApp.config.globalProperties.baseURL + e2, i2);
206
217
  }
207
- u3 ? u3.then((e2) => {
208
- this.afterSave(g2, s2, l2, e2, t2).then((e3) => {
218
+ g3 ? g3.then((e2) => {
219
+ this.afterSave(u2, n2, l2, e2, t2).then((e3) => {
209
220
  r2(e3);
210
221
  }).catch((e3) => {
211
222
  d2(e3);
212
223
  });
213
224
  }).catch((e2) => {
214
- g2.canSaveRow = true, i.isEditOptionFunction("saveError", l2) && g2.options.lineEditOptions.saveError.call(this, t2, g2.columns, s2, e2), d2(e2);
215
- }) : (g2.canSaveRow = true, d2(o.getI18n().t("saveRowRequest is undefined")));
225
+ u2.canSaveRow = true, i.isEditOptionFunction("saveError", l2) && u2.options.lineEditOptions.saveError.call(this, t2, u2.columns, n2, e2), d2(e2);
226
+ }) : (u2.canSaveRow = true, d2(o.getI18n().t("saveRowRequest is undefined")));
216
227
  } else
217
- g2.canSaveRow = true, d2(o.getI18n().t("superGrid.theReturnValueOfTheBeforesaveCallbackMethodIsFalse"));
228
+ u2.canSaveRow = true, d2(o.getI18n().t("superGrid.theReturnValueOfTheBeforesaveCallbackMethodIsFalse"));
218
229
  } else
219
- g2.canSaveRow = true, d2(o.getI18n().t("imatrixUIMessage.validationFailed"));
230
+ u2.canSaveRow = true, d2(o.getI18n().t("imatrixUIMessage.validationFailed"));
220
231
  }
221
232
  });
222
- }, afterSave(e2, t2, a2, n2, s2) {
233
+ }, afterSave(e2, t2, a2, s2, n2) {
223
234
  return new Promise((l2, r2) => {
224
- e2.isCreateRow = false, e2.canSaveRow = true, e2.$rowIndex = null, e2.isEditRow = false, e2.$lastSaveRowIndex = t2, window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.lineSavedSuccessfully", { row: t2 + 1 }), type: "success" }), (void 0 === e2.options.lineEditOptions.aftersaveIsCancelEditState || i.isHasEditOption("aftersaveIsCancelEditState", a2) && true === e2.options.lineEditOptions.aftersaveIsCancelEditState) && (o.setEntityFieldValue(s2, "$editing", false), e2.isEditRow = false), i.isEditOptionFunction("saveSuccess", a2) && (e2.pageContext ? e2.options.lineEditOptions.saveSuccess.call(this, { data: n2, columns: e2.columns, rowIndex: t2, row: s2, additionalParamMap: e2.additionalParamMap, pageContext: e2.pageContext, configureObj: e2.configureObj }) : e2.options.lineEditOptions.saveSuccess.call(this, n2, e2.columns, t2, s2, e2.additionalParamMap), e2.options.lineEditOptions.saveSuccess.call(this, n2, e2.columns, t2, s2, e2.additionalParamMap)), Object.assign(e2.orgGridData[t2], n2), Object.assign(e2.gridData[t2], n2), this.refresh(false, true).then(() => {
235
+ e2.isCreateRow = false, e2.canSaveRow = true, e2.$rowIndex = null, e2.isEditRow = false, e2.$lastSaveRowIndex = t2, window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.lineSavedSuccessfully", { row: t2 + 1 }), type: "success" }), (void 0 === e2.options.lineEditOptions.aftersaveIsCancelEditState || i.isHasEditOption("aftersaveIsCancelEditState", a2) && true === e2.options.lineEditOptions.aftersaveIsCancelEditState) && (o.setEntityFieldValue(n2, "$editing", false), e2.isEditRow = false), i.isEditOptionFunction("saveSuccess", a2) && (e2.pageContext ? e2.options.lineEditOptions.saveSuccess.call(this, { data: s2, columns: e2.columns, rowIndex: t2, row: n2, additionalParamMap: e2.additionalParamMap, pageContext: e2.pageContext, configureObj: e2.configureObj }) : e2.options.lineEditOptions.saveSuccess.call(this, s2, e2.columns, t2, n2, e2.additionalParamMap), e2.options.lineEditOptions.saveSuccess.call(this, s2, e2.columns, t2, n2, e2.additionalParamMap)), Object.assign(e2.orgGridData[t2], s2), Object.assign(e2.gridData[t2], s2), this.refresh(false, true).then(() => {
225
236
  (void 0 === e2.options.lineEditOptions.aftersaveIsCreateRow || e2.options.lineEditOptions.aftersaveIsCreateRow) && this.createRow(a2), l2({ rowIndex: t2, listCode: a2 });
226
237
  }).catch((e3) => r2(e3));
227
238
  });
@@ -231,42 +242,42 @@ const o = require("../../src/utils/util.cjs"), n = require("./eventBus.cjs"), s
231
242
  });
232
243
  }, restoreCurrentRow(e2, a2) {
233
244
  a2 || (a2 = t.get("_list_code"));
234
- const n2 = t.get(a2);
235
- if (n2.lineEdit && n2.lineEdit.editable) {
236
- if (null !== n2.$rowIndex && n2.$rowIndex !== e2 && !i.isLastEditRowSave(a2))
237
- return void window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.pleaseSaveLine", { row: n2.$rowIndex + 1 }), type: "warning" });
238
- const t2 = null !== n2.$lastSaveRowIndex && n2.$lastSaveRowIndex === e2 && void 0 !== n2.gridData[e2].id;
239
- let s2 = true;
245
+ const s2 = t.get(a2);
246
+ if (s2.lineEdit && s2.lineEdit.editable) {
247
+ if (null !== s2.$rowIndex && s2.$rowIndex !== e2 && !i.isLastEditRowSave(a2))
248
+ return void window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.pleaseSaveLine", { row: s2.$rowIndex + 1 }), type: "warning" });
249
+ const t2 = null !== s2.$lastSaveRowIndex && s2.$lastSaveRowIndex === e2 && void 0 !== s2.gridData[e2].id;
250
+ let n2 = true;
240
251
  if (i.isEditOptionFunction("beforeRestoreValidate", a2)) {
241
- const i2 = n2.isSubTableShowPage, a3 = n2.pagination && n2.pagination.pageSize, o2 = this.isMobile;
242
- s2 = n2.options.lineEditOptions.beforeRestoreValidate.call(this, { rowIndex: e2, gridData: i2 ? n2.subTableData : n2.gridData, entity: n2.gridData[e2], isMobile: o2, baseURL: this.baseURL, isEditing: !t2, pageGridData: i2 ? n2.gridData : null, pageSize: a3, additionalParamMap: n2.additionalParamMap, pageContext: n2.pageContext, configureObj: n2.configureObj });
252
+ const i2 = s2.isSubTableShowPage, a3 = s2.pagination && s2.pagination.pageSize, o2 = this.isMobile;
253
+ n2 = s2.options.lineEditOptions.beforeRestoreValidate.call(this, { rowIndex: e2, gridData: i2 ? s2.subTableData : s2.gridData, entity: s2.gridData[e2], isMobile: o2, baseURL: this.baseURL, isEditing: !t2, pageGridData: i2 ? s2.gridData : null, pageSize: a3, additionalParamMap: s2.additionalParamMap, pageContext: s2.pageContext, configureObj: s2.configureObj });
243
254
  }
244
- if (void 0 !== s2 && true !== s2)
255
+ if (void 0 !== n2 && true !== n2)
245
256
  return;
246
257
  if (true === t2)
247
258
  return void window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.lineNoNeedToUndoEdit", { row: e2 + 1 }), type: "warning" });
248
259
  let l2 = true;
249
260
  if (i.isEditOptionFunction("beforeRestore", a2)) {
250
- const i2 = n2.isSubTableShowPage, a3 = n2.pagination && n2.pagination.pageSize, o2 = this.isMobile;
251
- l2 = n2.options.lineEditOptions.beforeRestore.call(this, { rowIndex: e2, gridData: i2 ? n2.subTableData : n2.gridData, entity: n2.gridData[e2], isMobile: o2, baseURL: window.$vueApp.config.globalProperties.baseURL, isEditing: !t2, pageGridData: i2 ? n2.gridData : null, pageSize: a3, additionalParamMap: n2.additionalParamMap, pageContext: n2.pageContext, configureObj: n2.configureObj });
261
+ const i2 = s2.isSubTableShowPage, a3 = s2.pagination && s2.pagination.pageSize, o2 = this.isMobile;
262
+ l2 = s2.options.lineEditOptions.beforeRestore.call(this, { rowIndex: e2, gridData: i2 ? s2.subTableData : s2.gridData, entity: s2.gridData[e2], isMobile: o2, baseURL: window.$vueApp.config.globalProperties.baseURL, isEditing: !t2, pageGridData: i2 ? s2.gridData : null, pageSize: a3, additionalParamMap: s2.additionalParamMap, pageContext: s2.pageContext, configureObj: s2.configureObj });
252
263
  }
253
264
  if (void 0 === l2 || true === l2) {
254
- if (n2.orgGridData[e2].id || n2.orgGridData[e2].ID) {
255
- const t3 = JSON.parse(JSON.stringify(n2.orgGridData[e2]));
256
- if (void 0 !== n2.isSubTableShowPage && true === n2.isSubTableShowPage) {
265
+ if (s2.orgGridData[e2].id || s2.orgGridData[e2].ID) {
266
+ const t3 = JSON.parse(JSON.stringify(s2.orgGridData[e2]));
267
+ if (void 0 !== s2.isSubTableShowPage && true === s2.isSubTableShowPage) {
257
268
  const t4 = (this.currentPage - 1) * this.pageSize + e2;
258
- n2.subTableData[t4] = n2.gridData[e2];
269
+ s2.subTableData[t4] = s2.gridData[e2];
259
270
  }
260
- window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.lineCancelledSuccessfully", { row: e2 + 1 }), type: "success" }), (void 0 === n2.options.lineEditOptions.afterRestoreIsCancelEditState || i.isHasEditOption("afterRestoreIsCancelEditState", a2) && true === n2.options.lineEditOptions.afterRestoreIsCancelEditState) && (t3.$editing = false, n2.isEditRow = false), this.restoreCurrentRowTimer = setTimeout(() => {
261
- n2.gridData[e2] = t3;
271
+ window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.lineCancelledSuccessfully", { row: e2 + 1 }), type: "success" }), (void 0 === s2.options.lineEditOptions.afterRestoreIsCancelEditState || i.isHasEditOption("afterRestoreIsCancelEditState", a2) && true === s2.options.lineEditOptions.afterRestoreIsCancelEditState) && (t3.$editing = false, s2.isEditRow = false), this.restoreCurrentRowTimer = setTimeout(() => {
272
+ s2.gridData[e2] = t3;
262
273
  }, 100);
263
274
  } else
264
275
  this.deleteRow(e2, a2, true);
265
- n2.$rowIndex = null, n2.isCreateRow = false, i.isEditOptionFunction("afterRestore", a2) && (n2.pageContext ? n2.options.lineEditOptions.afterRestore.call(this, { rowIndex: e2, row: n2.orgGridData[e2], additionalParamMap: n2.additionalParamMap, pageContext: n2.pageContext, configureObj: n2.configureObj }) : n2.options.lineEditOptions.afterRestore.call(this, e2, n2.orgGridData[e2], n2.additionalParamMap));
276
+ s2.$rowIndex = null, s2.isCreateRow = false, i.isEditOptionFunction("afterRestore", a2) && (s2.pageContext ? s2.options.lineEditOptions.afterRestore.call(this, { rowIndex: e2, row: s2.orgGridData[e2], additionalParamMap: s2.additionalParamMap, pageContext: s2.pageContext, configureObj: s2.configureObj }) : s2.options.lineEditOptions.afterRestore.call(this, e2, s2.orgGridData[e2], s2.additionalParamMap));
266
277
  }
267
278
  }
268
- }, deleteRow(e2, a2, n2) {
269
- return new Promise((s2, l2) => {
279
+ }, deleteRow(e2, a2, s2) {
280
+ return new Promise((n2, l2) => {
270
281
  var _a, _b;
271
282
  a2 || (a2 = t.get("_list_code"));
272
283
  const r2 = t.get(a2);
@@ -278,35 +289,41 @@ const o = require("../../src/utils/util.cjs"), n = require("./eventBus.cjs"), s
278
289
  if (void 0 === d2 || true === d2) {
279
290
  if (!this.wfSubTableDeleteRowConditionParse(r2, this.parentFormData, r2.gridData[e2]))
280
291
  return;
281
- if (void 0 !== r2.isSubTableShowPage && true === r2.isSubTableShowPage) {
292
+ if (r2.options && r2.options.isFormSubTable) {
282
293
  r2.isDelete = true;
283
- const t2 = (this.currentPage - 1) * this.pageSize + e2;
284
- r2.subTableData.splice(t2, 1);
294
+ let t2 = e2;
295
+ if (this.isMobile || (t2 = (this.currentPage - 1) * this.pageSize + e2), r2.isSubSearch && r2.subTableDataSearch) {
296
+ const e3 = r2.subTableDataSearch[t2];
297
+ r2.subTableDataSearch.splice(t2, 1);
298
+ const i2 = r2.subTableData.findIndex((t3) => e3.$rowDataGuId && t3.$rowDataGuId && e3.$rowDataGuId === t3.$rowDataGuId);
299
+ -1 !== i2 && r2.subTableData.splice(i2, 1);
300
+ } else
301
+ r2.subTableData.splice(t2, 1);
285
302
  } else
286
303
  r2.gridData.splice(e2, 1), r2.orgGridData.splice(e2, 1);
287
- if (r2.$lastSaveRowIndex = null, r2.$rowIndex = null, r2.isEditRow = false, window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.deleteSuccessful"), type: "success" }), 0 === r2.gridData.length && r2.options && null !== r2.options.isDefaultShowEdit && void 0 !== r2.options.isDefaultShowEdit && true === r2.options.isDefaultShowEdit && this.createRow(a2), r2.isMulitiSelect && ((_b = (_a = r2.superGrid) == null ? void 0 : _a.clearSelection) == null ? void 0 : _b.call(_a)), r2.isCreateRow = false, (void 0 === n2 || !n2) && i.isEditOptionFunction("afterDelete", a2)) {
304
+ if (r2.$lastSaveRowIndex = null, r2.$rowIndex = null, r2.isEditRow = false, window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.deleteSuccessful"), type: "success" }), 0 === r2.gridData.length && r2.options && null !== r2.options.isDefaultShowEdit && void 0 !== r2.options.isDefaultShowEdit && true === r2.options.isDefaultShowEdit && this.createRow(a2), r2.isMulitiSelect && ((_b = (_a = r2.superGrid) == null ? void 0 : _a.clearSelection) == null ? void 0 : _b.call(_a)), r2.isCreateRow = false, (void 0 === s2 || !s2) && i.isEditOptionFunction("afterDelete", a2)) {
288
305
  const t2 = r2.isSubTableShowPage, i2 = r2.pagination && r2.pagination.pageSize, a3 = this.isMobile;
289
306
  r2.pageContext ? r2.options.lineEditOptions.afterDelete.call(this, { rowIndex: e2, row: r2.orgGridData[e2], gridData: t2 ? r2.subTableData : r2.gridData, isMobile: a3, baseURL: this.baseURL, totalData: t2 ? r2.gridData : null, pageSize: i2, additionalParamMap: r2.additionalParamMap, pageContext: r2.pageContext, configureObj: r2.configureObj }) : r2.options.lineEditOptions.afterDelete.call(this, e2, r2.orgGridData[e2], t2 ? r2.subTableData : r2.gridData, a3, this.baseURL, t2 ? r2.gridData : null, i2, r2.additionalParamMap);
290
307
  }
291
308
  }
292
- s2();
309
+ n2();
293
310
  });
294
311
  }, getDeleteIndexes(e2, t2, i2) {
295
312
  const a2 = [];
296
313
  return e2.forEach((e3, o2) => {
297
314
  if (a2.length !== t2.length) {
298
- for (const n2 of t2)
299
- if (e3[i2] === n2[i2]) {
315
+ for (const s2 of t2)
316
+ if (e3[i2] === s2[i2]) {
300
317
  a2.push(o2);
301
318
  break;
302
319
  }
303
320
  }
304
321
  }), a2.sort((e3, t3) => t3 - e3);
305
- }, batchDeleteSubTableRowApi(e2, a2, n2) {
306
- return new Promise((s2, l2) => {
322
+ }, batchDeleteSubTableRowApi(e2, a2, s2) {
323
+ return new Promise((n2, l2) => {
307
324
  var _a, _b;
308
325
  if (!(a2 = a2 || []).length)
309
- return window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("imatrixUIMessage.pleaseSelectDeleteData"), type: "warning" }), void s2();
326
+ return window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("imatrixUIMessage.pleaseSelectDeleteData"), type: "warning" }), void n2();
310
327
  e2 = e2 || t.get("_list_code");
311
328
  const r2 = t.get(e2);
312
329
  let d2 = true;
@@ -317,14 +334,14 @@ const o = require("../../src/utils/util.cjs"), n = require("./eventBus.cjs"), s
317
334
  if (void 0 === d2 || true === d2) {
318
335
  let t2 = [];
319
336
  if (void 0 !== r2.isSubTableShowPage && true === r2.isSubTableShowPage) {
320
- r2.isDelete = true, t2 = this.getDeleteIndexes(r2.subTableData, a2, n2);
337
+ r2.isDelete = true, t2 = this.getDeleteIndexes(r2.subTableData, a2, s2);
321
338
  for (const e3 of t2) {
322
339
  if (!this.wfSubTableDeleteRowConditionParse(r2, this.parentFormData, r2.subTableData[e3]))
323
340
  return;
324
341
  r2.subTableData.splice(e3, 1);
325
342
  }
326
343
  } else {
327
- t2 = this.getDeleteIndexes(r2.gridData, a2, n2);
344
+ t2 = this.getDeleteIndexes(r2.gridData, a2, s2);
328
345
  for (const e3 of t2) {
329
346
  if (!this.wfSubTableDeleteRowConditionParse(r2, this.parentFormData, r2.gridData[e3]))
330
347
  return;
@@ -336,14 +353,14 @@ const o = require("../../src/utils/util.cjs"), n = require("./eventBus.cjs"), s
336
353
  r2.pageContext ? r2.options.lineEditOptions.afterDelete.call(this, { deleteRows: a2, gridData: e3 ? r2.subTableData : r2.gridData, isMobile: i2, baseURL: this.baseURL, totalData: e3 ? r2.gridData : null, pageSize: t3, additionalParamMap: r2.additionalParamMap, pageContext: r2.pageContext, configureObj: r2.configureObj }) : r2.options.lineEditOptions.afterDelete.call(this, a2, e3 ? r2.subTableData : r2.gridData, i2, this.baseURL, e3 ? r2.gridData : null, t3, r2.additionalParamMap);
337
354
  }
338
355
  }
339
- s2();
356
+ n2();
340
357
  });
341
358
  }, focus(e2, t2) {
342
359
  i.setCurrentRow(e2, t2);
343
360
  }, getGridData(e2) {
344
361
  e2 || (e2 = t.get("_list_code"));
345
362
  const i2 = t.get(e2);
346
- return i2.isSubTableShowPage ? i2.subTableData : i2.gridData;
363
+ return i2.options && i2.options.isFormSubTable ? i2.subTableData : i2.gridData;
347
364
  }, getColumns(e2) {
348
365
  e2 || (e2 = t.get("_list_code"));
349
366
  return t.get(e2).columns;
@@ -373,7 +390,7 @@ const o = require("../../src/utils/util.cjs"), n = require("./eventBus.cjs"), s
373
390
  for (let i3 = 0; i3 < t2.length; i3++) {
374
391
  const a3 = t2[i3];
375
392
  if (void 0 !== a3.$editing && true === a3.$editing) {
376
- o.setEntityFieldValue(a3, "$editing", false), e.$emit(n, "un-edit", { row: a3 });
393
+ o.setEntityFieldValue(a3, "$editing", false), e.$emit(s, "un-edit", { row: a3 });
377
394
  break;
378
395
  }
379
396
  }
@@ -381,30 +398,29 @@ const o = require("../../src/utils/util.cjs"), n = require("./eventBus.cjs"), s
381
398
  }, closePageDialog(e2) {
382
399
  if (this.jumpPageSetting, this.jumpPageSetting) {
383
400
  const i2 = t.get(this.code), a2 = this.jumpPageSetting.closeEvent, o2 = this.jumpPageSetting.row;
384
- let n2;
385
- if (i2.options.eventCallBack && a2 && null !== a2 && i2.options.eventCallBack[a2] && (n2 = i2.options.eventCallBack[a2]), n2) {
401
+ let s2;
402
+ if (i2.options.eventCallBack && a2 && null !== a2 && i2.options.eventCallBack[a2] && (s2 = i2.options.eventCallBack[a2]), s2) {
386
403
  const t2 = { params: i2.additionalParamMap, additionalParamMap: i2.additionalParamMap, entity: o2 };
387
- e2 && (t2.eventParams = { popEntity: e2.entity, popPageCode: e2.pageCode, pageCode: this.pageCode }), n2.call(this, t2), e2.jumpInfo && "closeWindowAndRefresh" === e2.jumpInfo.successOperation && this.refresh();
404
+ e2 && (t2.eventParams = { popEntity: e2.entity, popPageCode: e2.pageCode, pageCode: this.pageCode }), s2.call(this, t2), e2.jumpInfo && "closeWindowAndRefresh" === e2.jumpInfo.successOperation && this.refresh();
388
405
  }
389
- const s2 = this.jumpPageSetting.isRefreshWhenClosePopup;
390
- if (void 0 !== s2 && true === s2) {
406
+ const n2 = this.jumpPageSetting.isRefreshWhenClosePopup;
407
+ if (void 0 !== n2 && true === n2) {
391
408
  const e3 = t.get(this.code);
392
409
  this.search(e3.searchForm);
393
410
  }
394
411
  }
395
412
  this.isShowPageDialog = false, this.jumpPageSetting = null;
396
413
  }, updateValues(e2, i2, a2) {
397
- const o2 = t.get(this.code), n2 = a2;
398
- if (null != n2 && n2 < this.gridData.length) {
414
+ const o2 = t.get(this.code), s2 = a2;
415
+ if (null != s2 && s2 < this.gridData.length) {
399
416
  const t2 = false === this.isSql || o2.options && (void 0 !== o2.options.isAdministerListView && true === o2.options.isAdministerListView || void 0 !== o2.options.isFormSubTable && true === o2.options.isFormSubTable), a3 = this.tableName;
400
- l.updateWithPageValue(e2, i2, this.jumpPageSetting, this.gridData[n2], a3, !t2);
401
- const s2 = this.jumpPageSetting && this.jumpPageSetting.updateValueEvent ? this.jumpPageSetting.updateValueEvent : null;
417
+ l.updateWithPageValue(e2, i2, this.jumpPageSetting, this.gridData[s2], a3, !t2);
418
+ const n2 = this.jumpPageSetting && this.jumpPageSetting.updateValueEvent ? this.jumpPageSetting.updateValueEvent : null;
402
419
  let r2;
403
- o2.options.eventCallBack && s2 && null !== s2 && o2.options.eventCallBack[s2] && (r2 = o2.options.eventCallBack[s2]), r2 && r2.call(this, { sourceModel: e2, sourceTableName: i2, jumpPageSetting: this.jumpPageSetting, entity: this.gridData[n2], targetTableName: a3, isNeedReplaceFieldName: !t2, additionalParamMap: o2.additionalParamMap });
420
+ o2.options.eventCallBack && n2 && null !== n2 && o2.options.eventCallBack[n2] && (r2 = o2.options.eventCallBack[n2]), r2 && r2.call(this, { sourceModel: e2, sourceTableName: i2, jumpPageSetting: this.jumpPageSetting, entity: this.gridData[s2], targetTableName: a3, isNeedReplaceFieldName: !t2, additionalParamMap: o2.additionalParamMap });
404
421
  }
405
422
  }, refreshChildData(e2, i2, a2) {
406
- const o2 = t.get(e2);
407
- null == a2 || false === a2 ? (o2.gridData = i2, this.gridData = i2) : (o2.subTableData = i2, this.subTableData = i2);
423
+ t.get(e2).subTableData = i2, this.subTableData = i2;
408
424
  }, getDefaultValueColumns(e2) {
409
425
  const i2 = {}, a2 = t.get(e2).defaultValueColumns;
410
426
  return a2 && a2.length > 0 && a2.forEach((e3) => {
@@ -416,33 +432,43 @@ const o = require("../../src/utils/util.cjs"), n = require("./eventBus.cjs"), s
416
432
  const o2 = t.get(a2);
417
433
  if (!i2)
418
434
  return;
419
- let n2 = {};
420
- o2.options.customRules && (n2 = JSON.parse(JSON.stringify(o2.options.customRules))), i2.forEach((e3) => {
435
+ let s2 = {};
436
+ o2.options.customRules && (s2 = JSON.parse(JSON.stringify(o2.options.customRules))), i2.forEach((e3) => {
421
437
  const t2 = JSON.parse(JSON.stringify(e3)), i3 = e3.name;
422
438
  let a3;
423
- n2[i3] || (n2[i3] = {}), a3 = n2[i3].rules, t2.rules && (a3 || (a3 = []), a3 = a3.concat(t2.rules)), t2.rules = a3, o2.options.customRules || (o2.options.customRules = {}), t2.beforeValidate = e3.beforeValidate, o2.options.customRules[i3] = t2;
439
+ s2[i3] || (s2[i3] = {}), a3 = s2[i3].rules, t2.rules && (a3 || (a3 = []), a3 = a3.concat(t2.rules)), t2.rules = a3, o2.options.customRules || (o2.options.customRules = {}), t2.beforeValidate = e3.beforeValidate, o2.options.customRules[i3] = t2;
424
440
  });
425
441
  }, doLayout(e2, i2) {
426
442
  i2 || (i2 = this.code);
427
- const a2 = t.get(i2).hiddenColumns;
443
+ let a2 = false;
444
+ const o2 = t.get(i2).hiddenColumns;
428
445
  if (e2 && e2.length > 0) {
429
- let t2 = a2;
430
- t2 || (t2 = []), 0 === t2.length ? t2 = e2 : e2.forEach((e3) => {
431
- t2.indexOf(e3) < 0 && t2.push(e3);
432
- }), this.options.hiddenColumns = t2;
433
- } else
434
- this.options.hiddenColumns = a2;
446
+ const t2 = e2[0];
447
+ let i3;
448
+ t2 && "string" == typeof t2 && (a2 = true), a2 ? (i3 = [], e2.forEach((e3) => {
449
+ if (e3 && "string" == typeof e3) {
450
+ let t3 = { prop: e3, show: false };
451
+ i3.push(t3);
452
+ }
453
+ })) : i3 = e2, this.options.updateColumnsInfo = i3;
454
+ } else {
455
+ let e3;
456
+ o2 && (e3 = [], o2.forEach((t2) => {
457
+ let i3 = { prop: t2, show: false };
458
+ e3.push(i3);
459
+ })), this.options.updateColumnsInfo = e3;
460
+ }
435
461
  this.$refs && this.$refs.superGrid && this.$refs.superGrid.doLayout();
436
462
  }, getCustomFunc(e2) {
437
463
  window.$PageUtil.getCustomFunc(this.pageContext, e2);
438
464
  }, addRequiredClass(e2, i2, a2, o2) {
439
- const n2 = t.get(i2);
440
- this.isFormSubTable && this.isSubTableShowPage && (a2 -= 1, o2 !== this.currentPage && (this.currentPage = o2, this.changePage(o2))), n2.gridData[a2].validateErrorField = e2;
465
+ const s2 = t.get(i2);
466
+ this.isFormSubTable && this.isSubTableShowPage && (a2 -= 1, o2 !== this.currentPage && (this.currentPage = o2, this.changePage(o2))), s2.gridData[a2].validateErrorField = e2;
441
467
  }, handleSearch(e2, t2) {
442
468
  const i2 = this.packageSearchParamNormalType(e2, t2);
443
469
  this.doSearch(i2);
444
470
  }, wfSubTableDeleteRowConditionParse: (e2, t2, a2) => {
445
471
  var _a;
446
472
  return false !== i.parseSubTableActionCondition(e2, t2, a2, (_a = e2.options.actionPermission) == null ? void 0 : _a.deleteCondition) || (window.$vueApp.config.globalProperties.$message({ showClose: true, message: o.getI18n().t("superGrid.rowCanntDeleteTip"), type: "warning" }), false);
447
- } }, u = { data: () => ({ toolbarFieldParam: null, showSearch: false, isMobile: false, baseURL: "", currentPage: 1, pageSize: 10, code: "", pageCode: "", jumpPageSetting: null, isShowPageDialog: false, gridData: [], subTableData: [], searchForm: [], options: {}, lineEdit: null, loaded: false, configureObj: {}, additionalParamMap: {}, basicInfo: {}, dynamicColumnInfo: {}, $dataTypeMap: {}, mainDefaultValueColumns: [], dynamicServiceName: "", isHasDynamic: false, isMulitiSelect: false, sql: false, restoreCurrentRowTimer: null }), methods: { ...g } };
448
- exports.apisMixin = u, exports.default = g;
473
+ } }, g = { data: () => ({ toolbarFieldParam: null, showSearch: false, isMobile: n.isMobileBrowser(), baseURL: "", currentPage: 1, pageSize: 10, code: "", pageCode: "", jumpPageSetting: null, isShowPageDialog: false, gridData: [], subTableData: [], searchForm: [], options: {}, lineEdit: null, loaded: false, configureObj: {}, additionalParamMap: {}, basicInfo: {}, dynamicColumnInfo: {}, $dataTypeMap: {}, mainDefaultValueColumns: [], dynamicServiceName: "", isHasDynamic: false, isMulitiSelect: false, sql: false, restoreCurrentRowTimer: null }), methods: { ...u } };
474
+ exports.apisMixin = g, exports.default = u;