@fecp/designer 5.5.105 → 5.5.108

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 (35) hide show
  1. package/es/_virtual/exceljs.min.mjs +7 -0
  2. package/es/_virtual/exceljs.min2.mjs +4 -0
  3. package/es/designer/package.json.mjs +1 -1
  4. package/es/designer/src/packages/dialog/useDialogDialog.mjs +1 -1
  5. package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
  6. package/es/designer/src/packages/form/property/widgets.vue.mjs +2 -2
  7. package/es/designer.css +126 -95
  8. package/es/node_modules/@vxe-ui/plugin-export-xlsx/es/index.esm.mjs +809 -0
  9. package/es/node_modules/exceljs/dist/exceljs.min.mjs +23129 -0
  10. package/es/packages/mobile/node_modules/vant/es/tag/Tag.mjs +80 -0
  11. package/es/packages/mobile/node_modules/vant/es/tag/index.mjs +8 -0
  12. package/es/packages/mobile/src/components/custom/approvalList/ApprovalCard.vue.mjs +139 -0
  13. package/es/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.mjs +116 -300
  14. package/es/packages/vue/index.mjs +6 -1
  15. package/es/packages/vue/src/components/layout/Layout.vue.mjs +8 -3
  16. package/es/packages/vue/src/components/table/Table.vue.mjs +125 -4
  17. package/es/packages/vue/src/components/table/TableColumn.vue.mjs +6 -115
  18. package/lib/_virtual/exceljs.min.js +7 -0
  19. package/lib/_virtual/exceljs.min2.js +4 -0
  20. package/lib/designer/package.json.js +1 -1
  21. package/lib/designer/src/packages/dialog/useDialogDialog.js +1 -1
  22. package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
  23. package/lib/designer/src/packages/form/property/widgets.vue.js +2 -2
  24. package/lib/designer.css +126 -95
  25. package/lib/node_modules/@vxe-ui/plugin-export-xlsx/es/index.esm.js +809 -0
  26. package/lib/node_modules/exceljs/dist/exceljs.min.js +23129 -0
  27. package/lib/packages/mobile/node_modules/vant/es/tag/Tag.js +80 -0
  28. package/lib/packages/mobile/node_modules/vant/es/tag/index.js +7 -0
  29. package/lib/packages/mobile/src/components/custom/approvalList/ApprovalCard.vue.js +139 -0
  30. package/lib/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.js +119 -303
  31. package/lib/packages/vue/index.js +5 -0
  32. package/lib/packages/vue/src/components/layout/Layout.vue.js +8 -3
  33. package/lib/packages/vue/src/components/table/Table.vue.js +125 -4
  34. package/lib/packages/vue/src/components/table/TableColumn.vue.js +6 -115
  35. package/package.json +1 -1
@@ -41,6 +41,7 @@ import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
41
41
  /* empty css */
42
42
  import getJsonAsyncUtil from "../../utils/getJsonAsyncUtil.mjs";
43
43
  import emitter from "../../utils/eventBus.mjs";
44
+ import { Decimal } from "../../../../../node_modules/decimal.js/decimal.mjs";
44
45
  /* empty css */
45
46
  import { ElContainer } from "../../../../../node_modules/element-plus/es/components/container/index.mjs";
46
47
  import { ElMessage } from "../../../../../node_modules/element-plus/es/components/message/index.mjs";
@@ -694,9 +695,18 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
694
695
  }
695
696
  }
696
697
  const exportConfig = reactive({
697
- modes: ["current", "selected", "all", "empty"],
698
- original: false
698
+ type: "xlsx",
699
+ types: ["csv", "html", "xml", "txt", "xlsx"],
700
+ modes: ["current", "all", "empty"],
701
+ original: false,
702
+ excludeFields: ["operationCol"],
703
+ beforeExportMethod: ({ options }) => {
704
+ if (options.mode == "all") ;
705
+ }
699
706
  });
707
+ if (props.selectMode == "multiple" || localConfig.value.selectMode == "multiple") {
708
+ exportConfig.modes = ["current", "selected", "all", "empty"];
709
+ }
700
710
  const handleExport = () => {
701
711
  const $table = tableRef.value;
702
712
  if ($table) {
@@ -846,6 +856,116 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
846
856
  },
847
857
  { deep: true }
848
858
  );
859
+ const formatCellValue = (row, field) => {
860
+ const value = row[field.fieldName];
861
+ if (value === null || value === void 0) return "";
862
+ switch (field.fieldType) {
863
+ case "number":
864
+ let numValue = Number(value);
865
+ if (isNaN(numValue)) return value;
866
+ switch (field.format) {
867
+ case "wan":
868
+ numValue = new Decimal(numValue).div(new Decimal(1e4)).toNumber();
869
+ break;
870
+ case "million":
871
+ numValue = new Decimal(numValue).div(new Decimal(1e6)).toNumber();
872
+ break;
873
+ case "percentage":
874
+ numValue = new Decimal(numValue).mul(new Decimal(100)).toNumber();
875
+ break;
876
+ case "permillage":
877
+ numValue = new Decimal(numValue).mul(new Decimal(1e3)).toNumber();
878
+ break;
879
+ case "permillion":
880
+ numValue = new Decimal(numValue).mul(new Decimal(1e4)).toNumber();
881
+ break;
882
+ }
883
+ if (field.hasDecimalPlaces && field.decimalPlaces !== void 0) {
884
+ numValue = Number(numValue.toFixed(field.decimalPlaces));
885
+ }
886
+ if (field.format == "yuan" || field.format == "wan" || field.format == "million") {
887
+ const formatted = numValue.toLocaleString("en-US", {
888
+ minimumFractionDigits: field.hasDecimalPlaces && field.decimalPlaces !== void 0 ? field.decimalPlaces : 0,
889
+ maximumFractionDigits: field.hasDecimalPlaces && field.decimalPlaces !== void 0 ? field.decimalPlaces : 20
890
+ });
891
+ return formatted;
892
+ }
893
+ return numValue;
894
+ case "select":
895
+ case "multipleSelection":
896
+ if (field.optionConfig) {
897
+ let options = [];
898
+ let displayField = "label";
899
+ let valueField = "value";
900
+ if (field.optionConfig.optionSource === "custom" && field.optionConfig.options) {
901
+ options = field.optionConfig.options;
902
+ displayField = "label";
903
+ valueField = "value";
904
+ } else if (field.optionConfig.optionSource === "dataSource" && field.optionConfig.dataSourceValue) {
905
+ options = dataSourceOptions.value[field.optionConfig.dataSourceValue] || [];
906
+ displayField = field.optionConfig.displayField || "label";
907
+ valueField = field.optionConfig.valueField || "value";
908
+ } else if (field.optionConfig.optionSource === "dictionary" && field.optionConfig.dictionaryValue) {
909
+ options = dictionaryOptions.value[field.optionConfig.dictionaryValue] || [];
910
+ displayField = "optName";
911
+ valueField = "optCode";
912
+ }
913
+ if (typeof value === "string" && value.includes("|")) {
914
+ const values = value.split("|");
915
+ const displayValues = values.map((val) => {
916
+ const option2 = options.find((opt) => opt[valueField] == val);
917
+ return option2 ? option2[displayField] : val;
918
+ });
919
+ return displayValues.join(", ");
920
+ }
921
+ const option = options.find((opt) => opt[valueField] == value);
922
+ return option ? option[displayField] : value;
923
+ }
924
+ return value;
925
+ case "date":
926
+ return formatDate(value, field.dateType);
927
+ case "switch":
928
+ return value ? "是" : "否";
929
+ default:
930
+ return value;
931
+ }
932
+ };
933
+ const formatDate = (value, type) => {
934
+ if (!value) return "";
935
+ let date;
936
+ if (typeof value === "string" && /^\d{8}$/.test(value)) {
937
+ const year2 = value.substring(0, 4);
938
+ const month2 = value.substring(4, 6);
939
+ const day2 = value.substring(6, 8);
940
+ date = /* @__PURE__ */ new Date(`${year2}-${month2}-${day2}`);
941
+ } else {
942
+ date = new Date(value);
943
+ }
944
+ if (isNaN(date.getTime())) return value;
945
+ const year = date.getFullYear();
946
+ const month = String(date.getMonth() + 1).padStart(2, "0");
947
+ const day = String(date.getDate()).padStart(2, "0");
948
+ const hours = String(date.getHours()).padStart(2, "0");
949
+ const minutes = String(date.getMinutes()).padStart(2, "0");
950
+ const seconds = String(date.getSeconds()).padStart(2, "0");
951
+ const getWeekNumber = (d) => {
952
+ const oneJan = new Date(d.getFullYear(), 0, 1);
953
+ const numberOfDays = Math.floor((d - oneJan) / (24 * 60 * 60 * 1e3));
954
+ return Math.ceil((d.getDay() + 1 + numberOfDays) / 7);
955
+ };
956
+ const week = getWeekNumber(date);
957
+ const formatMap = {
958
+ date: `${year}-${month}-${day}`,
959
+ "datetime-minute": `${year}-${month}-${day} ${hours}:${minutes}`,
960
+ datetime: `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`,
961
+ time: `${hours}:${minutes}:${seconds}`,
962
+ year: `${year}`,
963
+ month: `${year}-${month}`,
964
+ week: `${year}-${week}`,
965
+ dates: `${year}-${month}-${day}`
966
+ };
967
+ return formatMap[type] || formatMap.date;
968
+ };
849
969
  onUnmounted(() => {
850
970
  if (dataSourceManager.value) {
851
971
  dataSourceManager.value.destroy();
@@ -958,7 +1078,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
958
1078
  readonly: __props.readonly,
959
1079
  isDialog: __props.isDialog,
960
1080
  hiddenFormData: hiddenFormData.value,
961
- btnRollbackEvent: __props.btnRollbackEvent
1081
+ btnRollbackEvent: __props.btnRollbackEvent,
1082
+ formatCellValue
962
1083
  }, createSlots({ _: 2 }, [
963
1084
  renderList(fieldsData.value, (field) => {
964
1085
  return {
@@ -988,7 +1109,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
988
1109
  };
989
1110
  }
990
1111
  });
991
- const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2a67aa02"]]);
1112
+ const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-199fae66"]]);
992
1113
  export {
993
1114
  _Table as default
994
1115
  };
@@ -28,7 +28,6 @@ import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
28
28
  /* empty css */
29
29
  /* empty css */
30
30
  /* empty css */
31
- import { Decimal } from "../../../../../node_modules/decimal.js/decimal.mjs";
32
31
  /* empty css */
33
32
  import { ElLink } from "../../../../../node_modules/element-plus/es/components/link/index.mjs";
34
33
  import { ElIcon } from "../../../../../node_modules/element-plus/es/components/icon/index.mjs";
@@ -115,7 +114,8 @@ const _sfc_main = {
115
114
  btnRollbackEvent: {
116
115
  type: Object,
117
116
  default: {}
118
- }
117
+ },
118
+ formatCellValue: Function
119
119
  },
120
120
  setup(__props) {
121
121
  const props = __props;
@@ -138,116 +138,6 @@ const _sfc_main = {
138
138
  }
139
139
  return field.width;
140
140
  };
141
- const formatCellValue = (row, field) => {
142
- const value = row[field.fieldName];
143
- if (value === null || value === void 0) return "";
144
- switch (field.fieldType) {
145
- case "number":
146
- let numValue = Number(value);
147
- if (isNaN(numValue)) return value;
148
- switch (field.format) {
149
- case "wan":
150
- numValue = new Decimal(numValue).div(new Decimal(1e4)).toNumber();
151
- break;
152
- case "million":
153
- numValue = new Decimal(numValue).div(new Decimal(1e6)).toNumber();
154
- break;
155
- case "percentage":
156
- numValue = new Decimal(numValue).mul(new Decimal(100)).toNumber();
157
- break;
158
- case "permillage":
159
- numValue = new Decimal(numValue).mul(new Decimal(1e3)).toNumber();
160
- break;
161
- case "permillion":
162
- numValue = new Decimal(numValue).mul(new Decimal(1e4)).toNumber();
163
- break;
164
- }
165
- if (field.hasDecimalPlaces && field.decimalPlaces !== void 0) {
166
- numValue = Number(numValue.toFixed(field.decimalPlaces));
167
- }
168
- if (field.format == "yuan" || field.format == "wan" || field.format == "million") {
169
- const formatted = numValue.toLocaleString("en-US", {
170
- minimumFractionDigits: field.hasDecimalPlaces && field.decimalPlaces !== void 0 ? field.decimalPlaces : 0,
171
- maximumFractionDigits: field.hasDecimalPlaces && field.decimalPlaces !== void 0 ? field.decimalPlaces : 20
172
- });
173
- return formatted;
174
- }
175
- return numValue;
176
- case "select":
177
- case "multipleSelection":
178
- if (field.optionConfig) {
179
- let options = [];
180
- let displayField = "label";
181
- let valueField = "value";
182
- if (field.optionConfig.optionSource === "custom" && field.optionConfig.options) {
183
- options = field.optionConfig.options;
184
- displayField = "label";
185
- valueField = "value";
186
- } else if (field.optionConfig.optionSource === "dataSource" && field.optionConfig.dataSourceValue) {
187
- options = props.dataSourceOptions[field.optionConfig.dataSourceValue] || [];
188
- displayField = field.optionConfig.displayField || "label";
189
- valueField = field.optionConfig.valueField || "value";
190
- } else if (field.optionConfig.optionSource === "dictionary" && field.optionConfig.dictionaryValue) {
191
- options = props.dictionaryOptions[field.optionConfig.dictionaryValue] || [];
192
- displayField = "optName";
193
- valueField = "optCode";
194
- }
195
- if (typeof value === "string" && value.includes("|")) {
196
- const values = value.split("|");
197
- const displayValues = values.map((val) => {
198
- const option2 = options.find((opt) => opt[valueField] == val);
199
- return option2 ? option2[displayField] : val;
200
- });
201
- return displayValues.join(", ");
202
- }
203
- const option = options.find((opt) => opt[valueField] == value);
204
- return option ? option[displayField] : value;
205
- }
206
- return value;
207
- case "date":
208
- return formatDate(value, field.dateType);
209
- case "switch":
210
- return value ? "是" : "否";
211
- default:
212
- return value;
213
- }
214
- };
215
- const formatDate = (value, type) => {
216
- if (!value) return "";
217
- let date;
218
- if (typeof value === "string" && /^\d{8}$/.test(value)) {
219
- const year2 = value.substring(0, 4);
220
- const month2 = value.substring(4, 6);
221
- const day2 = value.substring(6, 8);
222
- date = /* @__PURE__ */ new Date(`${year2}-${month2}-${day2}`);
223
- } else {
224
- date = new Date(value);
225
- }
226
- if (isNaN(date.getTime())) return value;
227
- const year = date.getFullYear();
228
- const month = String(date.getMonth() + 1).padStart(2, "0");
229
- const day = String(date.getDate()).padStart(2, "0");
230
- const hours = String(date.getHours()).padStart(2, "0");
231
- const minutes = String(date.getMinutes()).padStart(2, "0");
232
- const seconds = String(date.getSeconds()).padStart(2, "0");
233
- const getWeekNumber = (d) => {
234
- const oneJan = new Date(d.getFullYear(), 0, 1);
235
- const numberOfDays = Math.floor((d - oneJan) / (24 * 60 * 60 * 1e3));
236
- return Math.ceil((d.getDay() + 1 + numberOfDays) / 7);
237
- };
238
- const week = getWeekNumber(date);
239
- const formatMap = {
240
- date: `${year}-${month}-${day}`,
241
- "datetime-minute": `${year}-${month}-${day} ${hours}:${minutes}`,
242
- datetime: `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`,
243
- time: `${hours}:${minutes}:${seconds}`,
244
- year: `${year}`,
245
- month: `${year}-${month}`,
246
- week: `${year}-${week}`,
247
- dates: `${year}-${month}-${day}`
248
- };
249
- return formatMap[type] || formatMap.date;
250
- };
251
141
  const handleCopy = (row, field) => {
252
142
  const value = row[field.fieldName];
253
143
  navigator.clipboard.writeText(value).then(() => {
@@ -397,11 +287,11 @@ const _sfc_main = {
397
287
  onClick: ($event) => handleButtonClick(row, field, field.linkConfig)
398
288
  }, {
399
289
  default: withCtx(() => [
400
- createTextVNode(toDisplayString(formatCellValue(row, field)), 1)
290
+ createTextVNode(toDisplayString(__props.formatCellValue(row, field)), 1)
401
291
  ]),
402
292
  _: 2
403
293
  }, 1032, ["onClick"])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
404
- createTextVNode(toDisplayString(formatCellValue(row, field)), 1)
294
+ createTextVNode(toDisplayString(__props.formatCellValue(row, field)), 1)
405
295
  ], 64)),
406
296
  field.suffix ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(field.suffix), 1)) : createCommentVNode("", true),
407
297
  field.canCopy ? (openBlock(), createBlock(_component_el_icon, {
@@ -421,6 +311,7 @@ const _sfc_main = {
421
311
  }), 128)),
422
312
  !__props.readonly && shouldShowOptColumn.value ? (openBlock(), createBlock(unref(VxeColumn), {
423
313
  key: 3,
314
+ field: "operationCol",
424
315
  title: "操作",
425
316
  width: optColumnWidth.value,
426
317
  fixed: "right",
@@ -448,7 +339,7 @@ const _sfc_main = {
448
339
  };
449
340
  }
450
341
  };
451
- const TableColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5eaca99e"]]);
342
+ const TableColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-336afafd"]]);
452
343
  export {
453
344
  TableColumn as default
454
345
  };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const _commonjsHelpers = require("./_commonjsHelpers.js");
4
+ const exceljs_min = require("../node_modules/exceljs/dist/exceljs.min.js");
5
+ var exceljs_minExports = exceljs_min.__require();
6
+ const ExcelJS = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(exceljs_minExports);
7
+ exports.default = ExcelJS;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ var exceljs_min = { exports: {} };
4
+ exports.__module = exceljs_min;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const version = "5.5.105";
3
+ const version = "5.5.108";
4
4
  const packageJson = {
5
5
  version
6
6
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index.vue.js");
3
+ const index = require("./index.vue2.js");
4
4
  const Vue = require("vue");
5
5
  function useDialogDialog() {
6
6
  const dialogDialogVisible = Vue.ref(false);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index.vue.js");
3
+ const index = require("./index.vue2.js");
4
4
  const Vue = require("vue");
5
5
  function useDialogGlobalDialog() {
6
6
  const dialogGlobalDialogVisible = Vue.ref(false);
@@ -54,8 +54,8 @@ const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_exp
54
54
  require("../../../components/TemplateSelector.vue.js");
55
55
  require("../../table/default.js");
56
56
  ;/* empty css */
57
- ;/* empty css */
58
- ;/* empty css */
57
+ ;/* empty css */
58
+ ;/* empty css */
59
59
  require("../../../store/index.js");
60
60
  ;/* empty css */
61
61
  const index$2 = require("../../../../../node_modules/element-plus/es/components/collapse/index.js");