@fecp/designer 5.5.104 → 5.5.106

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.
@@ -207,6 +207,7 @@ const _sfc_main = {
207
207
  const _component_FecMobileNoticeBar = resolveComponent("FecMobileNoticeBar");
208
208
  const _component_FecMobileDataStat = resolveComponent("FecMobileDataStat");
209
209
  const _component_FecMobileAppDetail = resolveComponent("FecMobileAppDetail");
210
+ const _component_FecMobileApprovalList = resolveComponent("FecMobileApprovalList");
210
211
  const _component_FecMobileTabbar = resolveComponent("FecMobileTabbar");
211
212
  const _component_FecMobileActionBar = resolveComponent("FecMobileActionBar");
212
213
  return openBlock(), createElementBlock(Fragment, null, [
@@ -225,8 +226,8 @@ const _sfc_main = {
225
226
  ], 64)) : __props.parentPage.type == "approval" ? (openBlock(), createBlock(_component_FecMobileAppDetail, mergeProps({ key: 1 }, __props.parentPage.layoutData.appDetailProps, {
226
227
  actionBar: __props.parentPage.layoutData.actionBar,
227
228
  params: __props.params
228
- }), null, 16, ["actionBar", "params"])) : (openBlock(), createBlock(unref(De), {
229
- key: 2,
229
+ }), null, 16, ["actionBar", "params"])) : __props.parentPage.type == "flowList" ? (openBlock(), createBlock(_component_FecMobileApprovalList, { key: 2 })) : (openBlock(), createBlock(unref(De), {
230
+ key: 3,
230
231
  ref_key: "gridLayout",
231
232
  ref: gridLayout,
232
233
  layout: unref(layoutData),
@@ -265,7 +266,7 @@ const _sfc_main = {
265
266
  };
266
267
  }
267
268
  };
268
- const MobilePage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-726a6dad"]]);
269
+ const MobilePage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e6130bde"]]);
269
270
  export {
270
271
  MobilePage as default
271
272
  };
@@ -2,11 +2,16 @@ import * as all from "./src/components/all.mjs";
2
2
  import * as index from "../mobile/index.mjs";
3
3
  import zh_cn_default from "../../node_modules/element-plus/es/locale/lang/zh-cn.mjs";
4
4
  import element_plus_default from "../../node_modules/element-plus/es/index.mjs";
5
- import VxeUIBase from "vxe-pc-ui";
5
+ import VxeUIBase, { VxeUI } from "vxe-pc-ui";
6
+ import { VxeUIPluginExportXLSX } from "../../node_modules/@vxe-ui/plugin-export-xlsx/es/index.esm.mjs";
7
+ import ExcelJS from "../../_virtual/exceljs.min.mjs";
6
8
  /* empty css */
7
9
  /* empty css */
8
10
  import layout from "./src/directive/layout.mjs";
9
11
  import auth from "./src/directive/auth.mjs";
12
+ VxeUI.use(VxeUIPluginExportXLSX, {
13
+ ExcelJS
14
+ });
10
15
  const fecVue = {
11
16
  install: (app) => {
12
17
  for (let c in all) {
@@ -1289,7 +1289,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1289
1289
  };
1290
1290
  }
1291
1291
  });
1292
- const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ae7b77e4"]]);
1292
+ const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-712c6915"]]);
1293
1293
  export {
1294
1294
  _Form as default
1295
1295
  };
@@ -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.104";
3
+ const version = "5.5.106";
4
4
  const packageJson = {
5
5
  version
6
6
  };