@fecp/designer 5.5.120 → 5.6.1

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 (139) hide show
  1. package/es/designer/package.json.mjs +1 -1
  2. package/es/designer/src/assets/logo.png.mjs +1 -1
  3. package/es/designer/src/components/EventConfigButton.vue.mjs +2 -2
  4. package/es/designer/src/packages/dataSource/index.vue.mjs +3 -3
  5. package/es/designer/src/packages/dialog/index.vue2.mjs +15 -15
  6. package/es/designer/src/packages/dialogGlobal/index.vue2.mjs +15 -16
  7. package/es/designer/src/packages/event/pageEvent.vue.mjs +1 -1
  8. package/es/designer/src/packages/form/index.vue.mjs +2 -2
  9. package/es/designer/src/packages/form/property/contract.vue.mjs +15 -1
  10. package/es/designer/src/packages/form/property/pageFooterBtn.vue.mjs +2 -2
  11. package/es/designer/src/packages/form/property/pageHeaderBtn.vue.mjs +2 -2
  12. package/es/designer/src/packages/form/property/widgets.vue.mjs +4 -4
  13. package/es/designer/src/packages/table/property/customBtn.vue.mjs +2 -2
  14. package/es/designer/src/packages/table/property/optBtn.vue.mjs +2 -2
  15. package/es/designer/src/packages/table/property/widgets.vue.mjs +2 -2
  16. package/es/designer.css +611 -520
  17. package/es/logo.ico +0 -0
  18. package/es/packages/mobile/index.mjs +2 -0
  19. package/es/packages/mobile/src/api/index.mjs +1 -1
  20. package/es/packages/mobile/src/assets/images/baseRate.png.mjs +1 -1
  21. package/es/packages/mobile/src/assets/images/home-bg.png.mjs +1 -1
  22. package/es/packages/mobile/src/assets/images/rentCalc.png.mjs +1 -1
  23. package/es/packages/mobile/src/assets/images/user.png.mjs +4 -0
  24. package/es/packages/mobile/src/components/all.mjs +2 -0
  25. package/es/packages/mobile/src/components/custom/appDetail/AppDetail.vue.mjs +63 -44
  26. package/es/packages/mobile/src/components/custom/appTimeLine/AppTimeLine.vue.mjs +9 -5
  27. package/es/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.mjs +134 -71
  28. package/es/packages/mobile/src/components/custom/approvalList/ApprovalCard.vue.mjs +3 -3
  29. package/es/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.mjs +36 -26
  30. package/es/packages/mobile/src/components/custom/customCode/CustomCode.vue.mjs +60 -0
  31. package/es/packages/mobile/src/components/custom/customCode/index.mjs +10 -0
  32. package/es/packages/mobile/src/components/custom/document/Document.vue.mjs +3 -3
  33. package/es/packages/mobile/src/components/custom/userSelect/UserSelect.vue.mjs +3 -3
  34. package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +189 -8
  35. package/es/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.mjs +109 -47
  36. package/es/packages/mobile/src/components/dataDisplay/mine/Mine.vue.mjs +33 -9
  37. package/es/packages/mobile/src/components/dataDisplay/rentCalcResult/RentCalcResult.vue.mjs +39 -79
  38. package/es/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.mjs +10 -2
  39. package/es/packages/mobile/src/components/form/field/Field.vue.mjs +167 -32
  40. package/es/packages/mobile/src/components/form/fieldArea/FieldArea.vue.mjs +3 -2
  41. package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs +13 -15
  42. package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs +10 -10
  43. package/es/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.mjs +7 -23
  44. package/es/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.mjs +14 -26
  45. package/es/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.mjs +14 -15
  46. package/es/packages/mobile/src/components/form/fieldIndustry/FieldIndustry.vue.mjs +6 -19
  47. package/es/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.mjs +9 -25
  48. package/es/packages/mobile/src/components/form/fieldRadio/FieldRadio.vue.mjs +8 -24
  49. package/es/packages/mobile/src/components/form/search/Search.vue.mjs +16 -7
  50. package/es/packages/mobile/src/components/form/uploader/Uploader.vue.mjs +2 -2
  51. package/es/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.mjs +13 -5
  52. package/es/packages/mobile/src/components/navigation/tabs/Tabs.vue.mjs +61 -26
  53. package/es/packages/mobile/src/index.vue.mjs +21 -4
  54. package/es/packages/mobile/src/page.vue.mjs +342 -138
  55. package/es/packages/mobile/src/utils/common.mjs +21 -0
  56. package/es/packages/mobile/src/utils/datasource.mjs +4 -4
  57. package/es/packages/mobile/src/utils/eventFlow/actionHandlers.mjs +35 -22
  58. package/es/packages/mobile/src/utils/formatterUtil.mjs +4 -24
  59. package/es/packages/mobile/src/utils/formulajs/calculate.mjs +11 -5
  60. package/es/packages/mobile/src/utils/optionUtil.mjs +4 -29
  61. package/es/packages/mobile/src/utils/pageHistory.mjs +16 -0
  62. package/es/packages/mobile/src/utils/validation.mjs +129 -0
  63. package/es/packages/vue/src/components/bus/contract/Contract.vue.mjs +12 -1
  64. package/es/packages/vue/src/components/forms/form/Form.vue.mjs +5 -2
  65. package/es/packages/vue/src/components/forms/number/Number.vue.mjs +3 -2
  66. package/es/packages/vue/src/components/forms/roleSelect/RoleSelect.vue.mjs +2 -2
  67. package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +20 -26
  68. package/es/packages/vue/src/components/forms/userSelect/UserSelect.vue.mjs +2 -2
  69. package/es/packages/vue/src/components/table/Table.vue.mjs +5 -2
  70. package/es/packages/vue/src/components/table/TableColumn.vue.mjs +10 -8
  71. package/es/packages/vue/src/directive/auth.mjs +2 -1
  72. package/es/packages/vue/src/utils/parseRouteParams.mjs +2 -2
  73. package/lib/designer/package.json.js +1 -1
  74. package/lib/designer/src/assets/logo.png.js +1 -1
  75. package/lib/designer/src/components/EventConfigButton.vue.js +2 -2
  76. package/lib/designer/src/packages/dataSource/index.vue.js +3 -3
  77. package/lib/designer/src/packages/dialog/index.vue2.js +15 -15
  78. package/lib/designer/src/packages/dialogGlobal/index.vue2.js +15 -16
  79. package/lib/designer/src/packages/event/pageEvent.vue.js +1 -1
  80. package/lib/designer/src/packages/form/index.vue.js +2 -2
  81. package/lib/designer/src/packages/form/property/contract.vue.js +15 -1
  82. package/lib/designer.css +611 -520
  83. package/lib/logo.ico +0 -0
  84. package/lib/packages/mobile/index.js +4 -2
  85. package/lib/packages/mobile/src/api/index.js +1 -1
  86. package/lib/packages/mobile/src/assets/images/baseRate.png.js +1 -1
  87. package/lib/packages/mobile/src/assets/images/home-bg.png.js +1 -1
  88. package/lib/packages/mobile/src/assets/images/rentCalc.png.js +1 -1
  89. package/lib/packages/mobile/src/assets/images/user.png.js +4 -0
  90. package/lib/packages/mobile/src/components/all.js +2 -0
  91. package/lib/packages/mobile/src/components/custom/appDetail/AppDetail.vue.js +62 -43
  92. package/lib/packages/mobile/src/components/custom/appTimeLine/AppTimeLine.vue.js +9 -5
  93. package/lib/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.js +137 -74
  94. package/lib/packages/mobile/src/components/custom/approvalList/ApprovalCard.vue.js +3 -3
  95. package/lib/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.js +36 -26
  96. package/lib/packages/mobile/src/components/custom/customCode/CustomCode.vue.js +60 -0
  97. package/lib/packages/mobile/src/components/custom/customCode/index.js +10 -0
  98. package/lib/packages/mobile/src/components/custom/document/Document.vue.js +3 -3
  99. package/lib/packages/mobile/src/components/custom/userSelect/UserSelect.vue.js +3 -3
  100. package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +189 -8
  101. package/lib/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.js +109 -47
  102. package/lib/packages/mobile/src/components/dataDisplay/mine/Mine.vue.js +38 -14
  103. package/lib/packages/mobile/src/components/dataDisplay/rentCalcResult/RentCalcResult.vue.js +39 -79
  104. package/lib/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.js +10 -2
  105. package/lib/packages/mobile/src/components/form/field/Field.vue.js +165 -30
  106. package/lib/packages/mobile/src/components/form/fieldArea/FieldArea.vue.js +3 -2
  107. package/lib/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.js +13 -15
  108. package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js +9 -9
  109. package/lib/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.js +6 -22
  110. package/lib/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.js +13 -25
  111. package/lib/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.js +13 -14
  112. package/lib/packages/mobile/src/components/form/fieldIndustry/FieldIndustry.vue.js +6 -19
  113. package/lib/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.js +8 -24
  114. package/lib/packages/mobile/src/components/form/fieldRadio/FieldRadio.vue.js +7 -23
  115. package/lib/packages/mobile/src/components/form/search/Search.vue.js +16 -7
  116. package/lib/packages/mobile/src/components/form/uploader/Uploader.vue.js +2 -2
  117. package/lib/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.js +13 -5
  118. package/lib/packages/mobile/src/components/navigation/tabs/Tabs.vue.js +64 -29
  119. package/lib/packages/mobile/src/index.vue.js +20 -3
  120. package/lib/packages/mobile/src/page.vue.js +341 -137
  121. package/lib/packages/mobile/src/utils/common.js +21 -0
  122. package/lib/packages/mobile/src/utils/datasource.js +4 -4
  123. package/lib/packages/mobile/src/utils/eventFlow/actionHandlers.js +35 -22
  124. package/lib/packages/mobile/src/utils/formatterUtil.js +3 -23
  125. package/lib/packages/mobile/src/utils/formulajs/calculate.js +11 -5
  126. package/lib/packages/mobile/src/utils/optionUtil.js +3 -28
  127. package/lib/packages/mobile/src/utils/pageHistory.js +16 -0
  128. package/lib/packages/mobile/src/utils/validation.js +129 -0
  129. package/lib/packages/vue/src/components/bus/contract/Contract.vue.js +12 -1
  130. package/lib/packages/vue/src/components/forms/form/Form.vue.js +5 -2
  131. package/lib/packages/vue/src/components/forms/number/Number.vue.js +3 -2
  132. package/lib/packages/vue/src/components/forms/roleSelect/RoleSelect.vue.js +2 -2
  133. package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +20 -26
  134. package/lib/packages/vue/src/components/forms/userSelect/UserSelect.vue.js +2 -2
  135. package/lib/packages/vue/src/components/table/Table.vue.js +5 -2
  136. package/lib/packages/vue/src/components/table/TableColumn.vue.js +10 -8
  137. package/lib/packages/vue/src/directive/auth.js +2 -1
  138. package/lib/packages/vue/src/utils/parseRouteParams.js +2 -2
  139. package/package.json +1 -1
@@ -70,7 +70,7 @@ class DataSourceManager {
70
70
  if (this.sortRules && this.sortRules.length > 0) {
71
71
  params.sortRules = JSON.stringify(this.sortRules);
72
72
  }
73
- return { ...this.initSearchData, ...params, ...extraParams };
73
+ return { ...this.initSearchData, ...params, ...extraParams, isMobile: true };
74
74
  }
75
75
  /**
76
76
  * 根据内容类型处理请求数据
@@ -101,7 +101,7 @@ class DataSourceManager {
101
101
  const currentDs = this.getCurrentDataSource();
102
102
  if (!currentDs) return {};
103
103
  const config = {
104
- url: `/${currentDs.serverName}${currentDs.url}`,
104
+ url: `/${window.$servers[currentDs.serverName]}${currentDs.url}`,
105
105
  method: currentDs.method
106
106
  };
107
107
  if (currentDs.contentType === "formData") {
@@ -157,13 +157,13 @@ class DataSourceManager {
157
157
  break;
158
158
  case "post":
159
159
  if (currentDs.contentType === "formData") {
160
- response = await this.http.postForm(url, params, false);
160
+ response = await this.http.postFormMobile(url, params, false, false);
161
161
  } else if (currentDs.contentType === "download") {
162
162
  await this.http.download(url, params, false);
163
163
  } else if (currentDs.contentType === "upload") {
164
164
  response = await this.http.upload(url, params, false);
165
165
  } else {
166
- response = await this.http.post(url, params, false);
166
+ response = await this.http.postMobile(url, params, false);
167
167
  }
168
168
  break;
169
169
  case "put":
@@ -12,9 +12,17 @@ require("../../../../../node_modules/element-plus/es/index.js");
12
12
  ;/* empty css */
13
13
  ;/* empty css */
14
14
  const index = require("../../../../../node_modules/element-plus/es/components/message-box/index.js");
15
+ const functionCall = require("../../../../../node_modules/vant/es/toast/function-call.js");
16
+ require("../../../../../node_modules/vant/es/toast/index.js");
17
+ const functionCall$1 = require("../../../../../node_modules/vant/es/dialog/function-call.js");
18
+ require("../../../../../node_modules/vant/es/dialog/index.js");
15
19
  async function handlePageJump(node, data, fields, context) {
20
+ var _a, _b, _c;
16
21
  const basic = node.basic || {};
17
- const params = parseRouteParams.parseRouteParams(basic.routeParams, data, fields);
22
+ const formComponent = (_a = context.components) == null ? void 0 : _a.form;
23
+ const getFormDataMethod = (_c = (_b = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _b.exposed) == null ? void 0 : _c.getFormData;
24
+ let formData = getFormDataMethod();
25
+ const params = parseRouteParams.parseRouteParams(basic.routeParams, { ...formData, ...data }, fields);
18
26
  if (basic.pageId) {
19
27
  if (basic.canNotGoBack === true) {
20
28
  eventBus.default.emit("replaceLoadPage", { pageId: basic.pageId, params });
@@ -118,26 +126,19 @@ async function handleApiCall(node, data, fields, context, params) {
118
126
  }
119
127
  async function handleConfirm(node, data, fields, context) {
120
128
  const basic = node.basic || {};
121
- const config = {
122
- messageType: basic.messageType || "warning",
123
- title: basic.title || "确认操作",
124
- message: basic.message || "确定要执行此操作吗?",
125
- confirmText: basic.confirmText || "确定",
126
- cancelText: basic.cancelText || "取消",
127
- showCancel: basic.showCancel !== false,
128
- confirmAction: basic.confirmAction || "continue",
129
- cancelAction: basic.cancelAction || "stop"
130
- };
131
129
  try {
132
- await index.ElMessageBox.confirm(config.message, config.title, {
133
- confirmButtonText: config.confirmText,
134
- cancelButtonText: config.cancelText,
135
- type: config.messageType,
136
- showCancelButton: config.showCancel,
137
- draggable: true,
138
- showClose: false
139
- });
140
- if (config.confirmAction === "stop") {
130
+ if (basic.showCancel) {
131
+ await functionCall$1.showConfirmDialog({
132
+ title: basic.title,
133
+ message: basic.message
134
+ });
135
+ } else {
136
+ await functionCall$1.showDialog({
137
+ title: basic.title,
138
+ message: basic.message
139
+ });
140
+ }
141
+ if (basic.confirmAction === "stop") {
141
142
  return {
142
143
  success: false,
143
144
  message: "用户确认后停止执行",
@@ -172,8 +173,20 @@ async function handleMessage(node, data, fields, context) {
172
173
  };
173
174
  }
174
175
  if (node.basic) {
175
- node.basic.messageType || "info";
176
- node.basic.message || "操作成功";
176
+ const messageType = node.basic.messageType || "info";
177
+ const message = node.basic.message || "操作成功";
178
+ switch (messageType) {
179
+ case "success":
180
+ functionCall.showSuccessToast(message);
181
+ break;
182
+ case "error":
183
+ functionCall.showFailToast(message);
184
+ break;
185
+ case "info":
186
+ default:
187
+ functionCall.showToast(message);
188
+ break;
189
+ }
177
190
  }
178
191
  return {
179
192
  success: true,
@@ -47,7 +47,6 @@ const dateFormatter = (value, dateType, formatterType) => {
47
47
  return dateValue.format(textFormat);
48
48
  };
49
49
  const textFormatter = (value, dataFormatter) => {
50
- console.log("🚀 ~ textFormatter ~ dataFormatter:", dataFormatter);
51
50
  switch (dataFormatter) {
52
51
  case "money(yuan)":
53
52
  case "money(wanyuan)":
@@ -74,6 +73,9 @@ const textFormatter = (value, dataFormatter) => {
74
73
  }
75
74
  };
76
75
  const moneyFormatter = (value, dataFormatter) => {
76
+ if (!value) {
77
+ return value;
78
+ }
77
79
  let moneyValue;
78
80
  switch (dataFormatter) {
79
81
  case "money(yuan)":
@@ -91,27 +93,6 @@ const moneyFormatter = (value, dataFormatter) => {
91
93
  }
92
94
  return XEUtils.commafy(moneyValue, { digits: 2 });
93
95
  };
94
- const textFormatter4Input = (value, dataFormatter) => {
95
- if (!value) {
96
- return value;
97
- }
98
- switch (dataFormatter) {
99
- case "money(yuan)":
100
- case "money(wanyuan)":
101
- case "money(yi)":
102
- return XEUtils.toNumberString(XEUtils.toNumber(value)).replace(
103
- /\B(?=(\d{3})+(?!\d))/g,
104
- ","
105
- );
106
- case "bankCard":
107
- return XEUtils.toValueString(value.replace(/\s+/g, "")).replace(
108
- /\B(?=(\d{4})+(?!\d))/g,
109
- " "
110
- );
111
- default:
112
- return value;
113
- }
114
- };
115
96
  const reverseTextFormatter = (value, dataFormatter) => {
116
97
  if (!value) {
117
98
  return value;
@@ -182,4 +163,3 @@ exports.reverseMoneyFormatter = reverseMoneyFormatter;
182
163
  exports.reverseTextFormatter = reverseTextFormatter;
183
164
  exports.selectFormatter = selectFormatter;
184
165
  exports.textFormatter = textFormatter;
185
- exports.textFormatter4Input = textFormatter4Input;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const functionCore = require("./functionCore.js");
4
+ const XEUtils = require("xe-utils");
4
5
  require("vue");
5
6
  function calculate(params) {
6
7
  const { text, value = {}, fieldsList = [] } = params;
@@ -28,11 +29,16 @@ function calculate(params) {
28
29
  const fieldItem = fieldsList.find((item) => item.fieldName == enCode);
29
30
  if (fieldItem) {
30
31
  switch (fieldItem.fieldType) {
31
- case "number":
32
- if (!data) {
33
- data = 0;
34
- } else {
35
- Number(data);
32
+ case "text":
33
+ switch (fieldItem.dataFormatter) {
34
+ case "money(yuan)":
35
+ case "money(wanyuan)":
36
+ case "money(yi)":
37
+ case "percent":
38
+ case "thousand":
39
+ case "tenThousand":
40
+ data = XEUtils.toNumber(data);
41
+ break;
36
42
  }
37
43
  break;
38
44
  case "switch":
@@ -27,8 +27,8 @@ const getOptions = ({
27
27
  resolve([]);
28
28
  break;
29
29
  }
30
- const response = await ctx.$http.postForm(
31
- "/base-server/parm/sysParmDic/getDicListByKey",
30
+ const response = await ctx.$http.postFormMobile(
31
+ "/" + window.$servers.base + "/parm/sysParmDic/getDicListByKey",
32
32
  {
33
33
  keyName: dictionaryValue
34
34
  },
@@ -78,33 +78,9 @@ const getOptions = ({
78
78
  }
79
79
  });
80
80
  };
81
- const getTreeOptions = ({
82
- optionType,
83
- dataSource,
84
- dataSourceParams,
85
- staticOptions,
86
- optionsFieldNames
87
- }) => {
88
- return new Promise((resolve, reject) => {
89
- switch (optionType) {
90
- case "static":
91
- resolve(staticOptions);
92
- case "library":
93
- const dataSourceRef = useDataSource(dataSource);
94
- dataSourceRef == null ? void 0 : dataSourceRef.load(dataSourceParams || {}).then((res) => {
95
- var _a;
96
- const data = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.records) || (res == null ? void 0 : res.data) || res || [];
97
- resolve(data);
98
- }).catch((err) => {
99
- console.error(err);
100
- });
101
- break;
102
- }
103
- });
104
- };
105
81
  const getParmDicMapByKeys = async (dicKeys) => {
106
82
  const http = index.default();
107
- const res = await http.postForm(
83
+ const res = await http.postFormMobile(
108
84
  `${baseUrl}/parm/sysParmDic/getDicListByKey`,
109
85
  {
110
86
  keyName: dicKeys
@@ -114,4 +90,3 @@ const getParmDicMapByKeys = async (dicKeys) => {
114
90
  };
115
91
  exports.getOptions = getOptions;
116
92
  exports.getParmDicMapByKeys = getParmDicMapByKeys;
117
- exports.getTreeOptions = getTreeOptions;
@@ -41,6 +41,7 @@ class PageHistory {
41
41
  if (this.history.length > 0 && this.history[this.history.length - 1].id == page.id) {
42
42
  return;
43
43
  }
44
+ this.setWmpTitle(page.name);
44
45
  this.history.push({
45
46
  id: page.id,
46
47
  name: page.name || "",
@@ -61,6 +62,7 @@ class PageHistory {
61
62
  this.push(page);
62
63
  return;
63
64
  }
65
+ this.setWmpTitle(page.name);
64
66
  this.history[this.history.length - 1] = {
65
67
  id: page.id,
66
68
  name: page.name || "",
@@ -83,6 +85,7 @@ class PageHistory {
83
85
  const pageId = prevPage ? prevPage.id : null;
84
86
  const params = prevPage ? prevPage.params : null;
85
87
  if (pageId) {
88
+ this.setWmpTitle(prevPage.name);
86
89
  eventBus.default.emit("loadPage", { pageId, params });
87
90
  }
88
91
  }
@@ -117,6 +120,19 @@ class PageHistory {
117
120
  this.history = [];
118
121
  this.saveHistory();
119
122
  }
123
+ /**
124
+ * 设置微信小程序标题
125
+ */
126
+ setWmpTitle(title) {
127
+ if (window.wx && wx.miniProgram) {
128
+ wx.miniProgram.postMessage({
129
+ data: {
130
+ type: "setTitle",
131
+ title
132
+ }
133
+ });
134
+ }
135
+ }
120
136
  }
121
137
  const pageHistory = new PageHistory();
122
138
  exports.default = pageHistory;
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const parseFilterConfig = require("./parseFilterConfig.js");
4
+ const VALIDATION_RULES = {
5
+ // 身份证
6
+ idCard: {
7
+ pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
8
+ message: "请输入正确的身份证号码"
9
+ },
10
+ // 统一社会信用代码
11
+ creditCode: {
12
+ pattern: /^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/,
13
+ message: "请输入正确的统一社会信用代码"
14
+ },
15
+ // 邮编
16
+ zipCode: {
17
+ pattern: /^[1-9]\d{5}$/,
18
+ message: "请输入正确的邮政编码"
19
+ },
20
+ // 传真
21
+ fax: {
22
+ pattern: /^\d{3,4}-?\d{7,8}$/,
23
+ message: "请输入正确的传真号码"
24
+ },
25
+ // 银行卡号
26
+ bankCard: {
27
+ pattern: /^[1-9]\d{15,18}$/,
28
+ message: "请输入正确的银行卡号"
29
+ },
30
+ // 邮箱
31
+ email: {
32
+ pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,
33
+ message: "请输入正确的邮箱地址"
34
+ },
35
+ // 手机
36
+ mobile: {
37
+ pattern: /^1[3-9]\d{9}$/,
38
+ message: "请输入正确的手机号码"
39
+ },
40
+ // 座机
41
+ phone: {
42
+ pattern: /^0\d{2,3}-?\d{7,8}$/,
43
+ message: "请输入正确的座机号码"
44
+ },
45
+ // 手机+座机
46
+ mobilePhone: {
47
+ pattern: /^(1[3-9]\d{9})|(0\d{2,3}-?\d{7,8})$/,
48
+ message: "请输入正确的联系电话"
49
+ }
50
+ };
51
+ function generateFieldRules(component, formData, fields) {
52
+ const rules = [];
53
+ if (!component.fieldName) {
54
+ return rules;
55
+ }
56
+ if (component.required) {
57
+ rules.push({
58
+ required: true,
59
+ message: component.requiredMessage || `请录入${component.label}`,
60
+ trigger: "blur"
61
+ });
62
+ }
63
+ if (component.validationType && component.validationType !== "none") {
64
+ if (component.validationType === "regex" && component.validationPattern) {
65
+ try {
66
+ const validator = (_rule, _value, callback) => {
67
+ try {
68
+ const isMatch = parseFilterConfig.checkFilterMatch(component.validationPattern, formData.value, fields);
69
+ if (!isMatch) {
70
+ callback(new Error(component.validationMessage || "校验失败"));
71
+ } else {
72
+ callback();
73
+ }
74
+ } catch (error) {
75
+ console.error("Validation function error:", error);
76
+ callback(new Error(component.validationMessage || "校验函数执行出错"));
77
+ }
78
+ };
79
+ rules.push({
80
+ validator,
81
+ trigger: "change"
82
+ });
83
+ } catch (e) {
84
+ console.error("Invalid validation pattern:", component.validationPattern, e);
85
+ }
86
+ } else if (component.validationType === "custom" && component.customValidator) {
87
+ try {
88
+ const validator = createCustomValidator(component.customValidator);
89
+ if (validator) {
90
+ rules.push({
91
+ validator,
92
+ trigger: "blur"
93
+ });
94
+ }
95
+ } catch (e) {
96
+ console.error("Invalid custom validator:", e);
97
+ }
98
+ } else if (VALIDATION_RULES[component.validationType]) {
99
+ const rule = VALIDATION_RULES[component.validationType];
100
+ rules.push({
101
+ pattern: rule.pattern,
102
+ message: component.validationMessage || rule.message,
103
+ trigger: "blur"
104
+ });
105
+ }
106
+ }
107
+ return rules;
108
+ }
109
+ function createCustomValidator(validatorStr) {
110
+ if (!validatorStr || typeof validatorStr !== "string") {
111
+ return null;
112
+ }
113
+ try {
114
+ const validator = new Function("return " + validatorStr)();
115
+ if (typeof validator === "function") {
116
+ return (rule, value, callback) => {
117
+ try {
118
+ validator(rule, value, callback);
119
+ } catch (error) {
120
+ callback(new Error("校验函数执行出错: " + error.message));
121
+ }
122
+ };
123
+ }
124
+ } catch (e) {
125
+ console.error("Failed to create validator from string:", e);
126
+ }
127
+ return null;
128
+ }
129
+ exports.generateFieldRules = generateFieldRules;
@@ -31,10 +31,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
31
31
  const ctx = getInstance.getCurrentVueInstance();
32
32
  Vue.ref("");
33
33
  const formData = Vue.inject("formData");
34
+ const getFormData = Vue.inject("getFormData");
34
35
  Vue.inject("rowHeight");
35
36
  Vue.inject("gridLayout");
36
37
  Vue.inject("gridLayoutFieldsData");
37
38
  const setFormItemHeight = Vue.inject("setFormItemHeight");
39
+ const handleEvent = Vue.inject("handleEvent");
38
40
  const fieldsData = props.localConfig.fieldsData.map((item) => {
39
41
  return item.component;
40
42
  });
@@ -76,6 +78,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
76
78
  visibleData
77
79
  });
78
80
  }
81
+ function savaFuncCallback() {
82
+ var _a;
83
+ handleEvent.value(
84
+ getFormData(),
85
+ config,
86
+ (_a = config.callbackEventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
87
+ );
88
+ }
79
89
  return (_ctx, _cache) => {
80
90
  return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
81
91
  (Vue.openBlock(), Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(currentComponent)), {
@@ -86,7 +96,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
86
96
  modeNo: __props.config.busSubject,
87
97
  genType: __props.config.genType,
88
98
  parmList: Vue.unref(parsedParams),
89
- onLoaded: loaded
99
+ onLoaded: loaded,
100
+ savaData: savaFuncCallback
90
101
  }, null, 40, ["id", "mode", "busNo", "contNo", "modeNo", "genType", "parmList"]))
91
102
  ]);
92
103
  };
@@ -49,6 +49,7 @@ const RightAnchorNav = require("./RightAnchorNav.vue.js");
49
49
  const parseFilterConfig = require("../../../utils/parseFilterConfig.js");
50
50
  const moment = require("../../../../../../node_modules/moment/dist/moment.js");
51
51
  const eventBus = require("../../../utils/eventBus.js");
52
+ const vuex_esmBundler = require("../../../../../../node_modules/vuex/dist/vuex.esm-bundler.js");
52
53
  ;/* empty css */
53
54
  const index = require("../../../../../../node_modules/element-plus/es/hooks/use-locale/index.js");
54
55
  const index$1 = require("../../../../../../node_modules/element-plus/es/components/message/index.js");
@@ -114,6 +115,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
114
115
  "layoutUpdated"
115
116
  ],
116
117
  setup(__props, { expose: __expose, emit: __emit }) {
118
+ const store = vuex_esmBundler.useStore();
119
+ window.$user = store.getters.user;
117
120
  const props = __props;
118
121
  index.useLocale();
119
122
  const emit = __emit;
@@ -322,7 +325,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
322
325
  try {
323
326
  const keyName = Array.from(dictionaryKeys).join(",");
324
327
  const response = await ctx.$http.postForm(
325
- "/base-server/parm/sysParmDic/getDicListByKey",
328
+ "/" + window.$servers.base + "/parm/sysParmDic/getDicListByKey",
326
329
  {
327
330
  keyName
328
331
  }
@@ -1289,5 +1292,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1289
1292
  };
1290
1293
  }
1291
1294
  });
1292
- const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-48f97717"]]);
1295
+ const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-3ee0473d"]]);
1293
1296
  exports.default = _Form;
@@ -197,7 +197,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
197
197
  if (showThousandsSeparator.value) {
198
198
  value = formatNumberWithComma(value);
199
199
  }
200
- return value;
200
+ return (value == null ? void 0 : value.toString()) || "";
201
201
  };
202
202
  const showThousandsSeparator = Vue.computed(() => {
203
203
  return props.format == "yuan" || props.format == "wan" || props.format == "million";
@@ -451,6 +451,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
451
451
  disabled: __props.disabled,
452
452
  readonly: __props.readonly,
453
453
  formatter,
454
+ maxlength: 15,
454
455
  parser,
455
456
  onBlur: handleBlur,
456
457
  onInput: handleInput
@@ -506,5 +507,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
506
507
  };
507
508
  }
508
509
  });
509
- const _Number = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-01611195"]]);
510
+ const _Number = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-93ac5b02"]]);
510
511
  exports.default = _Number;
@@ -70,7 +70,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
70
70
  customTableConfig.dataSources.push({
71
71
  id: "roleSelectDataSourceId",
72
72
  name: "角色选择数据源",
73
- serverName: "base-server",
73
+ serverName: window.$servers.base,
74
74
  url: "/sysRole/findByPageV5",
75
75
  method: "post",
76
76
  contentType: "json",
@@ -126,5 +126,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
126
126
  };
127
127
  }
128
128
  });
129
- const _RoleSelect = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-3f845d75"]]);
129
+ const _RoleSelect = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-aacdc4d9"]]);
130
130
  exports.default = _RoleSelect;
@@ -155,19 +155,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
155
155
  }, Vue.createSlots({
156
156
  default: Vue.withCtx(() => [
157
157
  __props.formMode != "query" ? (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, { key: 0 }, Vue.renderList(Vue.unref(rightButtons), (btn) => {
158
- return Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, null, [
159
- btn.btnType == "custom" ? (Vue.openBlock(), Vue.createBlock(_component_el_button, {
160
- key: btn.id,
161
- link: "",
162
- type: "primary",
163
- onClick: ($event) => handleClick(btn, $event)
164
- }, {
165
- default: Vue.withCtx(() => [
166
- Vue.createTextVNode(Vue.toDisplayString(btn.label), 1)
167
- ]),
168
- _: 2
169
- }, 1032, ["onClick"])) : Vue.createCommentVNode("", true)
170
- ], 64);
158
+ return Vue.openBlock(), Vue.createBlock(_component_el_button, {
159
+ link: "",
160
+ type: "primary",
161
+ onClick: ($event) => handleClick(btn, $event)
162
+ }, {
163
+ default: Vue.withCtx(() => [
164
+ Vue.createTextVNode(Vue.toDisplayString(btn.label), 1)
165
+ ]),
166
+ _: 2
167
+ }, 1032, ["onClick"]);
171
168
  }), 256)) : Vue.createCommentVNode("", true)
172
169
  ]),
173
170
  _: 2
@@ -176,19 +173,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
176
173
  name: "left",
177
174
  fn: Vue.withCtx(() => [
178
175
  __props.formMode != "query" ? (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, { key: 0 }, Vue.renderList(Vue.unref(leftButtons), (btn) => {
179
- return Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, null, [
180
- btn.btnType == "custom" ? (Vue.openBlock(), Vue.createBlock(_component_el_button, {
181
- key: btn.id,
182
- link: "",
183
- type: "primary",
184
- onClick: ($event) => handleClick(btn, $event)
185
- }, {
186
- default: Vue.withCtx(() => [
187
- Vue.createTextVNode(Vue.toDisplayString(btn.label), 1)
188
- ]),
189
- _: 2
190
- }, 1032, ["onClick"])) : Vue.createCommentVNode("", true)
191
- ], 64);
176
+ return Vue.openBlock(), Vue.createBlock(_component_el_button, {
177
+ link: "",
178
+ type: "primary",
179
+ onClick: ($event) => handleClick(btn, $event)
180
+ }, {
181
+ default: Vue.withCtx(() => [
182
+ Vue.createTextVNode(Vue.toDisplayString(btn.label), 1)
183
+ ]),
184
+ _: 2
185
+ }, 1032, ["onClick"]);
192
186
  }), 256)) : Vue.createCommentVNode("", true)
193
187
  ]),
194
188
  key: "0"
@@ -70,7 +70,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
70
70
  customTableConfig.dataSources.push({
71
71
  id: "userSelectDataSourceId",
72
72
  name: "用户选择数据源",
73
- serverName: "base-server",
73
+ serverName: window.$servers.base,
74
74
  url: "/user/sysUser/findByPageV5",
75
75
  method: "post",
76
76
  contentType: "json",
@@ -126,5 +126,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
126
126
  };
127
127
  }
128
128
  });
129
- const _UserSelect = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-0cc70898"]]);
129
+ const _UserSelect = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-06dfa7f6"]]);
130
130
  exports.default = _UserSelect;
@@ -44,6 +44,7 @@ const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_exp
44
44
  const getJsonAsyncUtil = require("../../utils/getJsonAsyncUtil.js");
45
45
  const eventBus = require("../../utils/eventBus.js");
46
46
  const decimal = require("../../../../../node_modules/decimal.js/decimal.js");
47
+ const vuex_esmBundler = require("../../../../../node_modules/vuex/dist/vuex.esm-bundler.js");
47
48
  ;/* empty css */
48
49
  const index = require("../../../../../node_modules/element-plus/es/components/container/index.js");
49
50
  const index$1 = require("../../../../../node_modules/element-plus/es/components/message/index.js");
@@ -141,6 +142,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
141
142
  "height-loaded"
142
143
  ],
143
144
  setup(__props, { expose: __expose, emit: __emit }) {
145
+ const store = vuex_esmBundler.useStore();
146
+ window.$user = store.getters.user;
144
147
  const props = __props;
145
148
  const emit = __emit;
146
149
  const fecTableContainerRef = Vue.ref(null);
@@ -437,7 +440,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
437
440
  try {
438
441
  const keyName = Array.from(dictionaryKeys).join(",");
439
442
  const response = await ctx.$http.postForm(
440
- "/base-server/parm/sysParmDic/getDicListByKey",
443
+ "/" + window.$servers.base + "/parm/sysParmDic/getDicListByKey",
441
444
  {
442
445
  keyName
443
446
  }
@@ -1111,5 +1114,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1111
1114
  };
1112
1115
  }
1113
1116
  });
1114
- const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-199fae66"]]);
1117
+ const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-7f4898b0"]]);
1115
1118
  exports.default = _Table;