@fecp/designer 5.6.36 → 5.6.37

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.
@@ -1,4 +1,4 @@
1
- const version = "5.6.36";
1
+ const version = "5.6.37";
2
2
  const packageJson = {
3
3
  version
4
4
  };
@@ -23,10 +23,10 @@ import { getEditConfigData, setEditConfigData, setSelectedItem, setHoverItem, ge
23
23
  import { throttle as eo } from "../../../../node_modules/@vexip-ui/utils/dist/index.mjs";
24
24
  import { defaultProperty } from "./aside/index.mjs";
25
25
  import { aiMarks } from "../aiForm/aiMarks.mjs";
26
- /* empty css */
27
- import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
28
26
  /* empty css */
29
27
  /* empty css */
28
+ /* empty css */
29
+ import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
30
30
  import { ElScrollbar } from "../../../../node_modules/element-plus/es/components/scrollbar/index.mjs";
31
31
  import { ElForm } from "../../../../node_modules/element-plus/es/components/form/index.mjs";
32
32
  import De from "../../../../node_modules/grid-layout-plus/es/components/grid-layout.vue.mjs";
package/es/designer.css CHANGED
@@ -6916,10 +6916,10 @@ body,
6916
6916
  }
6917
6917
  .selectionSummary .summary-item[data-v-d37b4cca] {
6918
6918
  flex-shrink: 0;
6919
- }.cell-content .cell-text[data-v-fac941fe] {
6919
+ }.cell-content .cell-text[data-v-b4612c25] {
6920
6920
  display: inline-block;
6921
6921
  }
6922
- .cell-content .copy-icon[data-v-fac941fe] {
6922
+ .cell-content .copy-icon[data-v-b4612c25] {
6923
6923
  cursor: pointer;
6924
6924
  color: #909399;
6925
6925
  font-size: 14px;
@@ -6927,13 +6927,13 @@ body,
6927
6927
  top: 4px;
6928
6928
  margin-left: 4px;
6929
6929
  }
6930
- .cell-content .copy-icon[data-v-fac941fe]:hover {
6930
+ .cell-content .copy-icon[data-v-b4612c25]:hover {
6931
6931
  color: #409eff;
6932
6932
  }
6933
- .cell-link[data-v-fac941fe] {
6933
+ .cell-link[data-v-b4612c25] {
6934
6934
  max-width: 100%;
6935
6935
  }
6936
- .cell-link[data-v-fac941fe] .el-link__inner {
6936
+ .cell-link[data-v-b4612c25] .el-link__inner {
6937
6937
  display: inline-block;
6938
6938
  max-width: 100%;
6939
6939
  overflow: hidden;
@@ -7237,12 +7237,12 @@ body,
7237
7237
  white-space: nowrap;
7238
7238
  overflow: hidden;
7239
7239
  text-overflow: ellipsis;
7240
- }.fec-table[data-v-cec18beb] {
7240
+ }.fec-table[data-v-e66cf49b] {
7241
7241
  height: 100%;
7242
7242
  flex-grow: 1;
7243
7243
  padding: 0 16px;
7244
7244
  }
7245
- .fec-table-container[data-v-cec18beb] {
7245
+ .fec-table-container[data-v-e66cf49b] {
7246
7246
  width: 100%;
7247
7247
  background: #fff;
7248
7248
  box-sizing: border-box;
@@ -7252,91 +7252,91 @@ body,
7252
7252
  overflow: hidden;
7253
7253
  flex-grow: 1;
7254
7254
  }
7255
- .fec-table-container .fec-vxe-table[data-v-cec18beb] {
7255
+ .fec-table-container .fec-vxe-table[data-v-e66cf49b] {
7256
7256
  flex: 1;
7257
7257
  min-height: 0;
7258
7258
  overflow: hidden;
7259
7259
  margin-bottom: 16px;
7260
7260
  }
7261
- .fec-table-container[data-v-cec18beb] .vxe-table {
7261
+ .fec-table-container[data-v-e66cf49b] .vxe-table {
7262
7262
  font-size: 14px;
7263
7263
  font-family: inherit;
7264
7264
  }
7265
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-sort--asc-btn,
7266
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-sort--desc-btn {
7265
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-sort--asc-btn,
7266
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-sort--desc-btn {
7267
7267
  color: #dcdcdc;
7268
7268
  }
7269
- .fec-table-container[data-v-cec18beb] .vxe-table .serverSort .vxe-sort--asc-btn,
7270
- .fec-table-container[data-v-cec18beb] .vxe-table .serverSort .vxe-sort--desc-btn {
7269
+ .fec-table-container[data-v-e66cf49b] .vxe-table .serverSort .vxe-sort--asc-btn,
7270
+ .fec-table-container[data-v-e66cf49b] .vxe-table .serverSort .vxe-sort--desc-btn {
7271
7271
  color: #d3edf9;
7272
7272
  }
7273
- .fec-table-container[data-v-cec18beb] .vxe-table .serverSort .sort--active {
7273
+ .fec-table-container[data-v-e66cf49b] .vxe-table .serverSort .sort--active {
7274
7274
  color: var(--el-color-primary);
7275
7275
  }
7276
- .fec-table-container[data-v-cec18beb] .vxe-table .sort--active {
7276
+ .fec-table-container[data-v-e66cf49b] .vxe-table .sort--active {
7277
7277
  color: var(--el-color-primary);
7278
7278
  }
7279
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--body-wrapper {
7279
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--body-wrapper {
7280
7280
  overflow: auto;
7281
7281
  }
7282
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--body,
7283
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--header,
7284
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--footer {
7282
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--body,
7283
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--header,
7284
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--footer {
7285
7285
  width: 100% !important;
7286
7286
  }
7287
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-header--column {
7287
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-header--column {
7288
7288
  background-color: #fff;
7289
7289
  }
7290
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-header--column .vxe-cell {
7290
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-header--column .vxe-cell {
7291
7291
  height: 40px !important;
7292
7292
  min-height: 40px !important;
7293
7293
  color: #333;
7294
7294
  }
7295
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--header-inner-wrapper {
7295
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--header-inner-wrapper {
7296
7296
  height: 40px !important;
7297
7297
  }
7298
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-body--column .vxe-cell {
7298
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-body--column .vxe-cell {
7299
7299
  padding: 6px !important;
7300
7300
  min-height: 32px !important;
7301
7301
  color: #666;
7302
7302
  font-size: 13px;
7303
7303
  }
7304
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-body--column .c--tooltip,
7305
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-body--column .c--title {
7304
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-body--column .c--tooltip,
7305
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-body--column .c--title {
7306
7306
  height: 32px !important;
7307
7307
  min-height: 32px !important;
7308
7308
  }
7309
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--border-line {
7309
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--border-line {
7310
7310
  border: none;
7311
7311
  border-bottom: 1px solid #ebeef5;
7312
7312
  border-top: 1px solid #ebeef5;
7313
7313
  }
7314
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--scroll-y-handle-appearance,
7315
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--scroll-y-wrapper:after {
7314
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--scroll-y-handle-appearance,
7315
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--scroll-y-wrapper:after {
7316
7316
  border: none !important;
7317
7317
  }
7318
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--scroll-y-top-corner {
7318
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--scroll-y-top-corner {
7319
7319
  display: none !important;
7320
7320
  }
7321
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-cell--sort {
7321
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-cell--sort {
7322
7322
  font-size: 14px;
7323
7323
  }
7324
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-body--column,
7325
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-footer--column,
7326
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-header--column,
7327
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-body--column,
7328
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-footer--column,
7329
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-header--column {
7324
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-body--column,
7325
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-footer--column,
7326
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-header--column,
7327
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-body--column,
7328
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-footer--column,
7329
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-header--column {
7330
7330
  background-image: linear-gradient(#ebeef5, #ebeef5) !important;
7331
7331
  }
7332
- .fec-table-container[data-v-cec18beb] .vxe-table .el-button.is-disabled {
7332
+ .fec-table-container[data-v-e66cf49b] .vxe-table .el-button.is-disabled {
7333
7333
  color: #ccc !important;
7334
7334
  }
7335
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--scroll-x-handle-appearance,
7336
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--scroll-x-right-corner {
7335
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--scroll-x-handle-appearance,
7336
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--scroll-x-right-corner {
7337
7337
  display: none !important;
7338
7338
  }
7339
- .fec-table-sub[data-v-cec18beb] .vxe-table .vxe-table--border-line {
7339
+ .fec-table-sub[data-v-e66cf49b] .vxe-table .vxe-table--border-line {
7340
7340
  border-top: none;
7341
7341
  }
7342
7342
  .fec-layout-card[data-v-a6236024] {
@@ -277,13 +277,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
277
277
  return total + (isNaN(value) ? 0 : value);
278
278
  }, 0);
279
279
  if (isNaN(sum)) {
280
- footerRow[fieldName] = " ";
280
+ footerRow[fieldName] = "";
281
281
  } else {
282
282
  const field = fieldsData.value.find((f) => f.fieldName == fieldName);
283
- footerRow[fieldName] = formatSummaryValue(sum, field) || " ";
283
+ footerRow[fieldName] = formatSummaryValue(sum, field) ?? "";
284
284
  }
285
285
  } else {
286
- footerRow[fieldName] = " ";
286
+ footerRow[fieldName] = "";
287
287
  }
288
288
  });
289
289
  } else if (mode === "all") {
@@ -293,12 +293,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
293
293
  const sum = allSummaryData.value[fieldName];
294
294
  if (sum != void 0 && sum != null) {
295
295
  const field = fieldsData.value.find((f) => f.fieldName == fieldName);
296
- footerRow[fieldName] = formatSummaryValue(sum, field) || " ";
296
+ footerRow[fieldName] = formatSummaryValue(sum, field) ?? "";
297
297
  } else {
298
- footerRow[fieldName] = " ";
298
+ footerRow[fieldName] = "";
299
299
  }
300
300
  } else {
301
- footerRow[fieldName] = " ";
301
+ footerRow[fieldName] = "";
302
302
  }
303
303
  });
304
304
  }
@@ -777,7 +777,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
777
777
  summaryResult[fieldName] = sum;
778
778
  });
779
779
  fieldsData.value.forEach((item) => {
780
- if (!summaryResult[item.fieldName]) {
780
+ if (summaryResult[item.fieldName] === void 0) {
781
781
  summaryResult[item.fieldName] = "";
782
782
  }
783
783
  });
@@ -1108,7 +1108,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1108
1108
  isDialog: __props.isDialog,
1109
1109
  hiddenFormData: hiddenFormData.value,
1110
1110
  btnRollbackEvent: __props.btnRollbackEvent,
1111
- formatCellValue: formatCellValue$1
1111
+ formatCellValue: formatCellValue$1,
1112
+ "summary-config": summaryConfig.value,
1113
+ "summary-all-data": allSummaryData.value,
1114
+ "format-summary-value": formatSummaryValue
1112
1115
  }, createSlots({ _: 2 }, [
1113
1116
  renderList(fieldsData.value, (field) => {
1114
1117
  return {
@@ -1118,7 +1121,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1118
1121
  ])
1119
1122
  };
1120
1123
  })
1121
- ]), 1032, ["fields-data", "show-index", "select-mode", "is-opt-btns", "opt-btns", "mode-key", "modes", "data-source-options", "dictionary-options", "localConfig", "table-ref", "table-data", "readonly", "isDialog", "hiddenFormData", "btnRollbackEvent"])
1124
+ ]), 1032, ["fields-data", "show-index", "select-mode", "is-opt-btns", "opt-btns", "mode-key", "modes", "data-source-options", "dictionary-options", "localConfig", "table-ref", "table-data", "readonly", "isDialog", "hiddenFormData", "btnRollbackEvent", "summary-config", "summary-all-data"])
1122
1125
  ];
1123
1126
  }),
1124
1127
  _: 3
@@ -1138,7 +1141,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1138
1141
  };
1139
1142
  }
1140
1143
  });
1141
- const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cec18beb"]]);
1144
+ const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e66cf49b"]]);
1142
1145
  export {
1143
1146
  _Table as default
1144
1147
  };
@@ -115,7 +115,18 @@ const _sfc_main = {
115
115
  type: Object,
116
116
  default: {}
117
117
  },
118
- formatCellValue: Function
118
+ formatCellValue: Function,
119
+ // 合计配置:{ enabled, mode, summaryFields }
120
+ summaryConfig: {
121
+ type: Object,
122
+ default: () => ({})
123
+ },
124
+ // 全量模式的合计结果:{ [fieldName]: sum }
125
+ summaryAllData: {
126
+ type: Object,
127
+ default: () => ({})
128
+ },
129
+ formatSummaryValue: Function
119
130
  },
120
131
  setup(__props) {
121
132
  const props = __props;
@@ -132,6 +143,46 @@ const _sfc_main = {
132
143
  }
133
144
  return fields;
134
145
  });
146
+ const fieldMap = computed(() => {
147
+ const map = {};
148
+ (props.fieldsData || []).forEach((field) => {
149
+ map[field.fieldName] = field;
150
+ });
151
+ return map;
152
+ });
153
+ const exportCellLabel = ({ row, column }) => {
154
+ const field = fieldMap.value[column.field];
155
+ if (!field) return "";
156
+ let label = props.formatCellValue ? props.formatCellValue(row, field) : row[field.fieldName];
157
+ if (label === null || label === void 0) label = "";
158
+ if (typeof label === "string" && label.trim() === "") return "";
159
+ if (field.prefix) label = `${field.prefix}${label}`;
160
+ if (field.suffix) label = `${label}${field.suffix}`;
161
+ return label;
162
+ };
163
+ const footerExportCell = ({ options, column }) => {
164
+ var _a;
165
+ const config = props.summaryConfig || {};
166
+ if (!config.enabled) return "";
167
+ const field = fieldMap.value[column.field];
168
+ if (!field) return "";
169
+ const firstVisible = (props.fieldsData || []).find((item) => item.isShow);
170
+ if (firstVisible && firstVisible.fieldName === field.fieldName) return "合计";
171
+ const summaryFields = config.summaryFields || [];
172
+ if (!summaryFields.includes(field.fieldName)) return "";
173
+ const format = (value) => props.formatSummaryValue ? props.formatSummaryValue(value, field) ?? "" : value;
174
+ if ((options == null ? void 0 : options.mode) !== "all" && config.mode === "all") {
175
+ const sum2 = (_a = props.summaryAllData) == null ? void 0 : _a[field.fieldName];
176
+ if (sum2 === void 0 || sum2 === null) return "";
177
+ return format(sum2);
178
+ }
179
+ const list = (options == null ? void 0 : options.data) || [];
180
+ const sum = list.reduce((total, row) => {
181
+ const value = parseFloat(row == null ? void 0 : row[field.fieldName]);
182
+ return total + (isNaN(value) ? 0 : value);
183
+ }, 0);
184
+ return format(sum);
185
+ };
135
186
  const getColumnWidth = (field) => {
136
187
  if (field.widthMode === "auto") {
137
188
  return void 0;
@@ -270,6 +321,8 @@ const _sfc_main = {
270
321
  "header-align": field.headerAlign,
271
322
  sortable: field.sortRule && field.sortRule != "none",
272
323
  resizable: false,
324
+ "export-method": exportCellLabel,
325
+ "footer-export-method": footerExportCell,
273
326
  "show-header-overflow": "",
274
327
  "show-footer-overflow": "",
275
328
  "show-overflow": field.isOverflowWrap ? false : "tooltip",
@@ -340,7 +393,7 @@ const _sfc_main = {
340
393
  };
341
394
  }
342
395
  };
343
- const TableColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fac941fe"]]);
396
+ const TableColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b4612c25"]]);
344
397
  export {
345
398
  TableColumn as default
346
399
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const version = "5.6.36";
3
+ const version = "5.6.37";
4
4
  const packageJson = {
5
5
  version
6
6
  };
@@ -25,10 +25,10 @@ const common = require("../utils/common.js");
25
25
  const index$1 = require("../../../../node_modules/@vexip-ui/utils/dist/index.js");
26
26
  const index = require("./aside/index.js");
27
27
  const aiMarks = require("../aiForm/aiMarks.js");
28
- ;/* empty css */
29
- const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.js");
30
28
  ;/* empty css */
31
29
  ;/* empty css */
30
+ ;/* empty css */
31
+ const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.js");
32
32
  const index$2 = require("../../../../node_modules/element-plus/es/components/scrollbar/index.js");
33
33
  const index$3 = require("../../../../node_modules/element-plus/es/components/form/index.js");
34
34
  const gridLayout_vue = require("../../../../node_modules/grid-layout-plus/es/components/grid-layout.vue.js");
package/lib/designer.css CHANGED
@@ -6916,10 +6916,10 @@ body,
6916
6916
  }
6917
6917
  .selectionSummary .summary-item[data-v-d37b4cca] {
6918
6918
  flex-shrink: 0;
6919
- }.cell-content .cell-text[data-v-fac941fe] {
6919
+ }.cell-content .cell-text[data-v-b4612c25] {
6920
6920
  display: inline-block;
6921
6921
  }
6922
- .cell-content .copy-icon[data-v-fac941fe] {
6922
+ .cell-content .copy-icon[data-v-b4612c25] {
6923
6923
  cursor: pointer;
6924
6924
  color: #909399;
6925
6925
  font-size: 14px;
@@ -6927,13 +6927,13 @@ body,
6927
6927
  top: 4px;
6928
6928
  margin-left: 4px;
6929
6929
  }
6930
- .cell-content .copy-icon[data-v-fac941fe]:hover {
6930
+ .cell-content .copy-icon[data-v-b4612c25]:hover {
6931
6931
  color: #409eff;
6932
6932
  }
6933
- .cell-link[data-v-fac941fe] {
6933
+ .cell-link[data-v-b4612c25] {
6934
6934
  max-width: 100%;
6935
6935
  }
6936
- .cell-link[data-v-fac941fe] .el-link__inner {
6936
+ .cell-link[data-v-b4612c25] .el-link__inner {
6937
6937
  display: inline-block;
6938
6938
  max-width: 100%;
6939
6939
  overflow: hidden;
@@ -7237,12 +7237,12 @@ body,
7237
7237
  white-space: nowrap;
7238
7238
  overflow: hidden;
7239
7239
  text-overflow: ellipsis;
7240
- }.fec-table[data-v-cec18beb] {
7240
+ }.fec-table[data-v-e66cf49b] {
7241
7241
  height: 100%;
7242
7242
  flex-grow: 1;
7243
7243
  padding: 0 16px;
7244
7244
  }
7245
- .fec-table-container[data-v-cec18beb] {
7245
+ .fec-table-container[data-v-e66cf49b] {
7246
7246
  width: 100%;
7247
7247
  background: #fff;
7248
7248
  box-sizing: border-box;
@@ -7252,91 +7252,91 @@ body,
7252
7252
  overflow: hidden;
7253
7253
  flex-grow: 1;
7254
7254
  }
7255
- .fec-table-container .fec-vxe-table[data-v-cec18beb] {
7255
+ .fec-table-container .fec-vxe-table[data-v-e66cf49b] {
7256
7256
  flex: 1;
7257
7257
  min-height: 0;
7258
7258
  overflow: hidden;
7259
7259
  margin-bottom: 16px;
7260
7260
  }
7261
- .fec-table-container[data-v-cec18beb] .vxe-table {
7261
+ .fec-table-container[data-v-e66cf49b] .vxe-table {
7262
7262
  font-size: 14px;
7263
7263
  font-family: inherit;
7264
7264
  }
7265
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-sort--asc-btn,
7266
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-sort--desc-btn {
7265
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-sort--asc-btn,
7266
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-sort--desc-btn {
7267
7267
  color: #dcdcdc;
7268
7268
  }
7269
- .fec-table-container[data-v-cec18beb] .vxe-table .serverSort .vxe-sort--asc-btn,
7270
- .fec-table-container[data-v-cec18beb] .vxe-table .serverSort .vxe-sort--desc-btn {
7269
+ .fec-table-container[data-v-e66cf49b] .vxe-table .serverSort .vxe-sort--asc-btn,
7270
+ .fec-table-container[data-v-e66cf49b] .vxe-table .serverSort .vxe-sort--desc-btn {
7271
7271
  color: #d3edf9;
7272
7272
  }
7273
- .fec-table-container[data-v-cec18beb] .vxe-table .serverSort .sort--active {
7273
+ .fec-table-container[data-v-e66cf49b] .vxe-table .serverSort .sort--active {
7274
7274
  color: var(--el-color-primary);
7275
7275
  }
7276
- .fec-table-container[data-v-cec18beb] .vxe-table .sort--active {
7276
+ .fec-table-container[data-v-e66cf49b] .vxe-table .sort--active {
7277
7277
  color: var(--el-color-primary);
7278
7278
  }
7279
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--body-wrapper {
7279
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--body-wrapper {
7280
7280
  overflow: auto;
7281
7281
  }
7282
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--body,
7283
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--header,
7284
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--footer {
7282
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--body,
7283
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--header,
7284
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--footer {
7285
7285
  width: 100% !important;
7286
7286
  }
7287
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-header--column {
7287
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-header--column {
7288
7288
  background-color: #fff;
7289
7289
  }
7290
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-header--column .vxe-cell {
7290
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-header--column .vxe-cell {
7291
7291
  height: 40px !important;
7292
7292
  min-height: 40px !important;
7293
7293
  color: #333;
7294
7294
  }
7295
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--header-inner-wrapper {
7295
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--header-inner-wrapper {
7296
7296
  height: 40px !important;
7297
7297
  }
7298
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-body--column .vxe-cell {
7298
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-body--column .vxe-cell {
7299
7299
  padding: 6px !important;
7300
7300
  min-height: 32px !important;
7301
7301
  color: #666;
7302
7302
  font-size: 13px;
7303
7303
  }
7304
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-body--column .c--tooltip,
7305
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-body--column .c--title {
7304
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-body--column .c--tooltip,
7305
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-body--column .c--title {
7306
7306
  height: 32px !important;
7307
7307
  min-height: 32px !important;
7308
7308
  }
7309
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--border-line {
7309
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--border-line {
7310
7310
  border: none;
7311
7311
  border-bottom: 1px solid #ebeef5;
7312
7312
  border-top: 1px solid #ebeef5;
7313
7313
  }
7314
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--scroll-y-handle-appearance,
7315
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--scroll-y-wrapper:after {
7314
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--scroll-y-handle-appearance,
7315
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--scroll-y-wrapper:after {
7316
7316
  border: none !important;
7317
7317
  }
7318
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--scroll-y-top-corner {
7318
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--scroll-y-top-corner {
7319
7319
  display: none !important;
7320
7320
  }
7321
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-cell--sort {
7321
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-cell--sort {
7322
7322
  font-size: 14px;
7323
7323
  }
7324
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-body--column,
7325
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-footer--column,
7326
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-header--column,
7327
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-body--column,
7328
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-footer--column,
7329
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-header--column {
7324
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-body--column,
7325
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-footer--column,
7326
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-header--column,
7327
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-body--column,
7328
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-footer--column,
7329
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-header--column {
7330
7330
  background-image: linear-gradient(#ebeef5, #ebeef5) !important;
7331
7331
  }
7332
- .fec-table-container[data-v-cec18beb] .vxe-table .el-button.is-disabled {
7332
+ .fec-table-container[data-v-e66cf49b] .vxe-table .el-button.is-disabled {
7333
7333
  color: #ccc !important;
7334
7334
  }
7335
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--scroll-x-handle-appearance,
7336
- .fec-table-container[data-v-cec18beb] .vxe-table .vxe-table--scroll-x-right-corner {
7335
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--scroll-x-handle-appearance,
7336
+ .fec-table-container[data-v-e66cf49b] .vxe-table .vxe-table--scroll-x-right-corner {
7337
7337
  display: none !important;
7338
7338
  }
7339
- .fec-table-sub[data-v-cec18beb] .vxe-table .vxe-table--border-line {
7339
+ .fec-table-sub[data-v-e66cf49b] .vxe-table .vxe-table--border-line {
7340
7340
  border-top: none;
7341
7341
  }
7342
7342
  .fec-layout-card[data-v-a6236024] {
@@ -279,13 +279,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
279
279
  return total + (isNaN(value) ? 0 : value);
280
280
  }, 0);
281
281
  if (isNaN(sum)) {
282
- footerRow[fieldName] = " ";
282
+ footerRow[fieldName] = "";
283
283
  } else {
284
284
  const field = fieldsData.value.find((f) => f.fieldName == fieldName);
285
- footerRow[fieldName] = formatSummaryValue(sum, field) || " ";
285
+ footerRow[fieldName] = formatSummaryValue(sum, field) ?? "";
286
286
  }
287
287
  } else {
288
- footerRow[fieldName] = " ";
288
+ footerRow[fieldName] = "";
289
289
  }
290
290
  });
291
291
  } else if (mode === "all") {
@@ -295,12 +295,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
295
295
  const sum = allSummaryData.value[fieldName];
296
296
  if (sum != void 0 && sum != null) {
297
297
  const field = fieldsData.value.find((f) => f.fieldName == fieldName);
298
- footerRow[fieldName] = formatSummaryValue(sum, field) || " ";
298
+ footerRow[fieldName] = formatSummaryValue(sum, field) ?? "";
299
299
  } else {
300
- footerRow[fieldName] = " ";
300
+ footerRow[fieldName] = "";
301
301
  }
302
302
  } else {
303
- footerRow[fieldName] = " ";
303
+ footerRow[fieldName] = "";
304
304
  }
305
305
  });
306
306
  }
@@ -779,7 +779,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
779
779
  summaryResult[fieldName] = sum;
780
780
  });
781
781
  fieldsData.value.forEach((item) => {
782
- if (!summaryResult[item.fieldName]) {
782
+ if (summaryResult[item.fieldName] === void 0) {
783
783
  summaryResult[item.fieldName] = "";
784
784
  }
785
785
  });
@@ -1110,7 +1110,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1110
1110
  isDialog: __props.isDialog,
1111
1111
  hiddenFormData: hiddenFormData.value,
1112
1112
  btnRollbackEvent: __props.btnRollbackEvent,
1113
- formatCellValue: formatCellValue$1
1113
+ formatCellValue: formatCellValue$1,
1114
+ "summary-config": summaryConfig.value,
1115
+ "summary-all-data": allSummaryData.value,
1116
+ "format-summary-value": formatSummaryValue
1114
1117
  }, vue.createSlots({ _: 2 }, [
1115
1118
  vue.renderList(fieldsData.value, (field) => {
1116
1119
  return {
@@ -1120,7 +1123,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1120
1123
  ])
1121
1124
  };
1122
1125
  })
1123
- ]), 1032, ["fields-data", "show-index", "select-mode", "is-opt-btns", "opt-btns", "mode-key", "modes", "data-source-options", "dictionary-options", "localConfig", "table-ref", "table-data", "readonly", "isDialog", "hiddenFormData", "btnRollbackEvent"])
1126
+ ]), 1032, ["fields-data", "show-index", "select-mode", "is-opt-btns", "opt-btns", "mode-key", "modes", "data-source-options", "dictionary-options", "localConfig", "table-ref", "table-data", "readonly", "isDialog", "hiddenFormData", "btnRollbackEvent", "summary-config", "summary-all-data"])
1124
1127
  ];
1125
1128
  }),
1126
1129
  _: 3
@@ -1140,5 +1143,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1140
1143
  };
1141
1144
  }
1142
1145
  });
1143
- const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-cec18beb"]]);
1146
+ const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-e66cf49b"]]);
1144
1147
  exports.default = _Table;
@@ -117,7 +117,18 @@ const _sfc_main = {
117
117
  type: Object,
118
118
  default: {}
119
119
  },
120
- formatCellValue: Function
120
+ formatCellValue: Function,
121
+ // 合计配置:{ enabled, mode, summaryFields }
122
+ summaryConfig: {
123
+ type: Object,
124
+ default: () => ({})
125
+ },
126
+ // 全量模式的合计结果:{ [fieldName]: sum }
127
+ summaryAllData: {
128
+ type: Object,
129
+ default: () => ({})
130
+ },
131
+ formatSummaryValue: Function
121
132
  },
122
133
  setup(__props) {
123
134
  const props = __props;
@@ -134,6 +145,46 @@ const _sfc_main = {
134
145
  }
135
146
  return fields;
136
147
  });
148
+ const fieldMap = vue.computed(() => {
149
+ const map = {};
150
+ (props.fieldsData || []).forEach((field) => {
151
+ map[field.fieldName] = field;
152
+ });
153
+ return map;
154
+ });
155
+ const exportCellLabel = ({ row, column }) => {
156
+ const field = fieldMap.value[column.field];
157
+ if (!field) return "";
158
+ let label = props.formatCellValue ? props.formatCellValue(row, field) : row[field.fieldName];
159
+ if (label === null || label === void 0) label = "";
160
+ if (typeof label === "string" && label.trim() === "") return "";
161
+ if (field.prefix) label = `${field.prefix}${label}`;
162
+ if (field.suffix) label = `${label}${field.suffix}`;
163
+ return label;
164
+ };
165
+ const footerExportCell = ({ options, column }) => {
166
+ var _a;
167
+ const config = props.summaryConfig || {};
168
+ if (!config.enabled) return "";
169
+ const field = fieldMap.value[column.field];
170
+ if (!field) return "";
171
+ const firstVisible = (props.fieldsData || []).find((item) => item.isShow);
172
+ if (firstVisible && firstVisible.fieldName === field.fieldName) return "合计";
173
+ const summaryFields = config.summaryFields || [];
174
+ if (!summaryFields.includes(field.fieldName)) return "";
175
+ const format = (value) => props.formatSummaryValue ? props.formatSummaryValue(value, field) ?? "" : value;
176
+ if ((options == null ? void 0 : options.mode) !== "all" && config.mode === "all") {
177
+ const sum2 = (_a = props.summaryAllData) == null ? void 0 : _a[field.fieldName];
178
+ if (sum2 === void 0 || sum2 === null) return "";
179
+ return format(sum2);
180
+ }
181
+ const list = (options == null ? void 0 : options.data) || [];
182
+ const sum = list.reduce((total, row) => {
183
+ const value = parseFloat(row == null ? void 0 : row[field.fieldName]);
184
+ return total + (isNaN(value) ? 0 : value);
185
+ }, 0);
186
+ return format(sum);
187
+ };
137
188
  const getColumnWidth = (field) => {
138
189
  if (field.widthMode === "auto") {
139
190
  return void 0;
@@ -272,6 +323,8 @@ const _sfc_main = {
272
323
  "header-align": field.headerAlign,
273
324
  sortable: field.sortRule && field.sortRule != "none",
274
325
  resizable: false,
326
+ "export-method": exportCellLabel,
327
+ "footer-export-method": footerExportCell,
275
328
  "show-header-overflow": "",
276
329
  "show-footer-overflow": "",
277
330
  "show-overflow": field.isOverflowWrap ? false : "tooltip",
@@ -342,5 +395,5 @@ const _sfc_main = {
342
395
  };
343
396
  }
344
397
  };
345
- const TableColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-fac941fe"]]);
398
+ const TableColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-b4612c25"]]);
346
399
  exports.default = TableColumn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/designer",
3
- "version": "5.6.36",
3
+ "version": "5.6.37",
4
4
  "main": "lib/designer/index.js",
5
5
  "module": "es/designer/index.mjs",
6
6
  "files": [