@fecp/designer 5.6.10 → 5.6.13

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 (61) hide show
  1. package/es/designer/package.json.mjs +1 -1
  2. package/es/designer/src/components/DocumentParam.vue.mjs +1 -1
  3. package/es/designer/src/components/FieldSetMapping.vue2.mjs +11 -3
  4. package/es/designer/src/components/ParamsConfig.vue2.mjs +1 -1
  5. package/es/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +1 -1
  6. package/es/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +1 -1
  7. package/es/designer/src/packages/dataLinkage/index.vue.mjs +1 -1
  8. package/es/designer/src/packages/dialog/useDialogDialog.mjs +1 -1
  9. package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -0
  10. package/es/designer/src/packages/dialogGlobal/index.vue2.mjs +1 -0
  11. package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
  12. package/es/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.mjs +1 -1
  13. package/es/designer/src/packages/eventFlow/dialog/action/TableSelection.vue2.mjs +64 -0
  14. package/es/designer/src/packages/eventFlow/dialog/action/config.mjs +10 -0
  15. package/es/designer/src/packages/form/property/approvalHistory.vue.mjs +1 -1
  16. package/es/designer/src/packages/form/property/contract.vue.mjs +1 -1
  17. package/es/designer/src/packages/form/property/subForm.vue.mjs +1 -1
  18. package/es/designer/src/packages/form/property/widgets.vue.mjs +2 -2
  19. package/es/designer/src/packages/importantDataChange/index.vue.mjs +2 -2
  20. package/es/designer/src/packages/prod/index.vue.mjs +1 -1
  21. package/es/designer/src/packages/table/headerBtn.vue.mjs +2 -1
  22. package/es/designer.css +165 -151
  23. package/es/packages/mobile/src/index.vue.mjs +3 -3
  24. package/es/packages/vue/src/components/bus/approvalHistory/timeLine.vue.mjs +1 -1
  25. package/es/packages/vue/src/components/bus/flowChart/bpmnjs/component/timeline.vue.mjs +2 -2
  26. package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +13 -10
  27. package/es/packages/vue/src/components/forms/form/Form.vue.mjs +15 -3
  28. package/es/packages/vue/src/components/table/Table.vue.mjs +5 -1
  29. package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +43 -0
  30. package/es/packages/vue/src/utils/importantDataChange.mjs +0 -1
  31. package/lib/designer/package.json.js +1 -1
  32. package/lib/designer/src/components/DocumentParam.vue.js +1 -1
  33. package/lib/designer/src/components/FieldSetMapping.vue2.js +11 -3
  34. package/lib/designer/src/components/ParamsConfig.vue2.js +1 -1
  35. package/lib/designer/src/layout/aside/HiddenFieldDialog.vue.js +1 -1
  36. package/lib/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
  37. package/lib/designer/src/packages/dataLinkage/index.vue.js +1 -1
  38. package/lib/designer/src/packages/dialog/useDialogDialog.js +1 -1
  39. package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -0
  40. package/lib/designer/src/packages/dialogGlobal/index.vue2.js +1 -0
  41. package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
  42. package/lib/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.js +1 -1
  43. package/lib/designer/src/packages/eventFlow/dialog/action/TableSelection.vue2.js +64 -0
  44. package/lib/designer/src/packages/eventFlow/dialog/action/config.js +10 -0
  45. package/lib/designer/src/packages/form/property/approvalHistory.vue.js +1 -1
  46. package/lib/designer/src/packages/form/property/contract.vue.js +1 -1
  47. package/lib/designer/src/packages/form/property/subForm.vue.js +1 -1
  48. package/lib/designer/src/packages/form/property/widgets.vue.js +2 -2
  49. package/lib/designer/src/packages/importantDataChange/index.vue.js +2 -2
  50. package/lib/designer/src/packages/prod/index.vue.js +1 -1
  51. package/lib/designer/src/packages/table/headerBtn.vue.js +2 -1
  52. package/lib/designer.css +165 -151
  53. package/lib/packages/mobile/src/index.vue.js +3 -3
  54. package/lib/packages/vue/src/components/bus/approvalHistory/timeLine.vue.js +1 -1
  55. package/lib/packages/vue/src/components/bus/flowChart/bpmnjs/component/timeline.vue.js +2 -2
  56. package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +12 -9
  57. package/lib/packages/vue/src/components/forms/form/Form.vue.js +14 -2
  58. package/lib/packages/vue/src/components/table/Table.vue.js +5 -1
  59. package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +43 -0
  60. package/lib/packages/vue/src/utils/importantDataChange.js +0 -1
  61. package/package.json +1 -1
@@ -146,12 +146,12 @@ const _sfc_main = {
146
146
  pageParams.value = JSON.parse(routeParams);
147
147
  }
148
148
  eventBus.default.on("loadPage", ({ pageId, params }) => {
149
- loadPage(pageId);
150
149
  pageParams.value = params;
150
+ loadPage(pageId);
151
151
  });
152
152
  eventBus.default.on("replaceLoadPage", ({ pageId, params }) => {
153
- loadPage(pageId, true);
154
153
  pageParams.value = params;
154
+ loadPage(pageId, true);
155
155
  });
156
156
  eventBus.default.on("refreshPage", () => {
157
157
  refreshCurrentPage();
@@ -257,5 +257,5 @@ const _sfc_main = {
257
257
  };
258
258
  }
259
259
  };
260
- const MobileApp = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-3f56bbe1"]]);
260
+ const MobileApp = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-32479e3c"]]);
261
261
  exports.default = MobileApp;
@@ -28,7 +28,7 @@ const _hoisted_4 = {
28
28
  class: "appContent"
29
29
  };
30
30
  const _hoisted_5 = { class: "openTask" };
31
- const _hoisted_6 = { style: { "font-weight": "bold" } };
31
+ const _hoisted_6 = { style: { "font-weight": "bold", "flex": "1", "display": "flex", "width": "0", "margin-right": "12px" } };
32
32
  const _hoisted_7 = {
33
33
  key: 0,
34
34
  class: "appAssignee"
@@ -22,7 +22,7 @@ const _hoisted_5 = {
22
22
  class: "appContent"
23
23
  };
24
24
  const _hoisted_6 = { class: "openTask" };
25
- const _hoisted_7 = { style: { "font-weight": "bold" } };
25
+ const _hoisted_7 = { style: { "font-weight": "bold", "flex": "1", "display": "flex", "width": "0", "margin-right": "12px" } };
26
26
  const _hoisted_8 = {
27
27
  key: 0,
28
28
  class: "appAssignee"
@@ -253,5 +253,5 @@ const _sfc_main = {
253
253
  };
254
254
  }
255
255
  };
256
- const timeline = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-4d562e1e"]]);
256
+ const timeline = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-ce9dc48a"]]);
257
257
  exports.default = timeline;
@@ -318,6 +318,7 @@ const _sfc_main = {
318
318
  emit("confirm");
319
319
  }
320
320
  return (_ctx, _cache) => {
321
+ var _a;
321
322
  const _component_fec_table = Vue.resolveComponent("fec-table");
322
323
  const _component_fec_form = Vue.resolveComponent("fec-form");
323
324
  const _component_el_button = index$1.ElButton;
@@ -342,18 +343,20 @@ const _sfc_main = {
342
343
  draggable: true,
343
344
  "close-on-click-modal": false,
344
345
  "append-to-body": "",
345
- class: "fec-dialog-renderer"
346
+ class: Vue.normalizeClass(["fec-dialog-renderer", {
347
+ "fec-dialog-renderer-component": ((_a = __props.dialogConfig) == null ? void 0 : _a.contentSource) === "component"
348
+ }])
346
349
  }, {
347
350
  header: Vue.withCtx(() => {
348
- var _a;
351
+ var _a2;
349
352
  return [
350
353
  Vue.createElementVNode("div", _hoisted_1, [
351
- Vue.createElementVNode("span", null, Vue.toDisplayString(((_a = currentDialogConfig.value) == null ? void 0 : _a.dialogTitle) || "弹层"), 1)
354
+ Vue.createElementVNode("span", null, Vue.toDisplayString(((_a2 = currentDialogConfig.value) == null ? void 0 : _a2.dialogTitle) || "弹层"), 1)
352
355
  ])
353
356
  ];
354
357
  }),
355
358
  footer: Vue.withCtx(() => {
356
- var _a, _b, _c;
359
+ var _a2, _b, _c;
357
360
  return [
358
361
  Vue.createVNode(_component_el_button, { onClick: handleCancel }, {
359
362
  default: Vue.withCtx(() => _cache[3] || (_cache[3] = [
@@ -361,7 +364,7 @@ const _sfc_main = {
361
364
  ])),
362
365
  _: 1
363
366
  }),
364
- ((_a = __props.dialogConfig) == null ? void 0 : _a.contentSource) === "table" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 0 }, [
367
+ ((_a2 = __props.dialogConfig) == null ? void 0 : _a2.contentSource) === "table" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 0 }, [
365
368
  !__props.dialogConfig.isSubTableReadOnly && __props.dialogConfig.selectionMode != "none" ? (Vue.openBlock(), Vue.createBlock(_component_el_button, {
366
369
  key: 0,
367
370
  type: "primary",
@@ -388,10 +391,10 @@ const _sfc_main = {
388
391
  ];
389
392
  }),
390
393
  default: Vue.withCtx(() => {
391
- var _a, _b, _c, _d, _e;
394
+ var _a2, _b, _c, _d, _e;
392
395
  return [
393
396
  Vue.createElementVNode("div", {
394
- class: Vue.normalizeClass(["dialog-content-wrapper", "fec-dialog-" + ((_a = __props.dialogConfig) == null ? void 0 : _a.contentSource)]),
397
+ class: Vue.normalizeClass(["dialog-content-wrapper", "fec-dialog-" + ((_a2 = __props.dialogConfig) == null ? void 0 : _a2.contentSource)]),
395
398
  style: Vue.normalizeStyle(contentStyle.value)
396
399
  }, [
397
400
  ((_b = __props.dialogConfig) == null ? void 0 : _b.contentSource) === "table" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 0 }, [
@@ -436,9 +439,9 @@ const _sfc_main = {
436
439
  ];
437
440
  }),
438
441
  _: 1
439
- }, 8, ["modelValue", "width"]));
442
+ }, 8, ["modelValue", "width", "class"]));
440
443
  };
441
444
  }
442
445
  };
443
- const DialogRenderer = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-bb1d2a15"]]);
446
+ const DialogRenderer = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-2b0f2231"]]);
444
447
  exports.default = DialogRenderer;
@@ -163,9 +163,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
163
163
  }
164
164
  }
165
165
  );
166
+ let isSyncingToParent = false;
166
167
  Vue.watch(
167
168
  () => props.modelValue,
168
169
  (newVal, oldVal) => {
170
+ if (isSyncingToParent) return;
169
171
  if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
170
172
  loadFormData("change");
171
173
  }
@@ -931,8 +933,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
931
933
  }
932
934
  return result;
933
935
  };
936
+ let isApplyingLinkage = false;
934
937
  const applyLinkageEffectsForChangedFields = (changedFieldNames) => {
935
938
  var _a;
939
+ if (isApplyingLinkage) return;
940
+ isApplyingLinkage = true;
936
941
  const linkedConfig = localConfig.value.linkedConfig || {};
937
942
  const fields = [...fieldsData.value, ...hiddenFields.value];
938
943
  const relevantConfigs = filterRelevantLinkageConfigs(
@@ -955,7 +960,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
955
960
  value: formData.value,
956
961
  fieldsList: fields
957
962
  });
958
- formData.value[field.fieldName] = calcResult;
963
+ if (!common.isEqual(formData.value[field.fieldName], calcResult)) {
964
+ formData.value[field.fieldName] = calcResult;
965
+ }
959
966
  }
960
967
  });
961
968
  }
@@ -1071,6 +1078,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1071
1078
  const fieldsConfigArr = updatedLayoutData.filter((item) => !item.hidden);
1072
1079
  gridLayoutFieldsData.value = sortLayoutItems(fieldsConfigArr);
1073
1080
  (_a = gridLayout == null ? void 0 : gridLayout.value) == null ? void 0 : _a.resizeEvent();
1081
+ isApplyingLinkage = false;
1074
1082
  };
1075
1083
  function sortLayoutItems(arr) {
1076
1084
  return [...arr].sort((a, b) => {
@@ -1150,7 +1158,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1150
1158
  applyLinkageEffectsForChangedFields(changedFields);
1151
1159
  }
1152
1160
  prevFormData.value = { ...formData.value };
1161
+ isSyncingToParent = true;
1153
1162
  emit("update:modelValue", getFormData());
1163
+ Vue.nextTick(() => {
1164
+ isSyncingToParent = false;
1165
+ });
1154
1166
  },
1155
1167
  { deep: true }
1156
1168
  );
@@ -1320,5 +1332,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1320
1332
  };
1321
1333
  }
1322
1334
  });
1323
- const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-5a2b92b9"]]);
1335
+ const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-2a14b0ea"]]);
1324
1336
  exports.default = _Form;
@@ -889,6 +889,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
889
889
  const setFormData = (data) => {
890
890
  Object.assign(hiddenFormData.value, data);
891
891
  };
892
+ const getFormData = () => {
893
+ return hiddenFormData.value;
894
+ };
892
895
  __expose({
893
896
  tableRef,
894
897
  refresh,
@@ -899,6 +902,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
899
902
  exportData: handleExport,
900
903
  localConfig,
901
904
  setFormData,
905
+ getFormData,
902
906
  handleCustomBtnClick
903
907
  });
904
908
  return (_ctx, _cache) => {
@@ -1024,5 +1028,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1024
1028
  };
1025
1029
  }
1026
1030
  });
1027
- const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-79a7b787"]]);
1031
+ const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-28ff595c"]]);
1028
1032
  exports.default = _Table;
@@ -392,6 +392,47 @@ async function handleTableChildSelection(node, data, fields, context) {
392
392
  };
393
393
  }
394
394
  }
395
+ async function handleTableSelection(node, data, fields, context) {
396
+ var _a, _b, _c, _d, _e;
397
+ const basic = node.basic || {};
398
+ debugger;
399
+ const tableComponent = (_a = context.components) == null ? void 0 : _a.table;
400
+ const setFormDataMethod = (_c = (_b = tableComponent == null ? void 0 : tableComponent.$) == null ? void 0 : _b.exposed) == null ? void 0 : _c.setFormData;
401
+ const getSelectionMethod = (_e = (_d = tableComponent == null ? void 0 : tableComponent.$) == null ? void 0 : _d.exposed) == null ? void 0 : _e.getSelection;
402
+ if (typeof getSelectionMethod === "function") {
403
+ const rows = await getSelectionMethod();
404
+ const fieldMapping = basic.tableSelectionFieldMapping;
405
+ if (fieldMapping && Array.isArray(fieldMapping)) {
406
+ let formData = {};
407
+ fieldMapping.forEach((mapping) => {
408
+ const { field, value } = mapping;
409
+ const targetField = fields.find((item) => item.id == field);
410
+ if (!targetField) {
411
+ return {
412
+ success: false,
413
+ message: `未找到字段: ${field}`
414
+ };
415
+ }
416
+ const values = rows.map((row) => row[value]);
417
+ formData[targetField.fieldName] = values.join(",");
418
+ });
419
+ if (typeof setFormDataMethod === "function") {
420
+ setFormDataMethod(formData);
421
+ return {
422
+ success: true,
423
+ message: "赋值成功"
424
+ };
425
+ } else {
426
+ console.error("未找到列表组件的 setFormData 方法");
427
+ return {
428
+ success: false,
429
+ message: "列表组件未正确配置或 setFormData 方法未暴露",
430
+ shouldShowError: true
431
+ };
432
+ }
433
+ }
434
+ }
435
+ }
395
436
  async function handleTableRowDelete(node, data, fields, context) {
396
437
  var _a, _b, _c;
397
438
  console.log("[EventFlow] 执行表格行删除:", node.basic);
@@ -832,6 +873,7 @@ const defaultActionHandlers = {
832
873
  "table-row-delete": handleTableRowDelete,
833
874
  "table-child-refresh": handleTableChildRefresh,
834
875
  "table-child-selection": handleTableChildSelection,
876
+ "table-selection": handleTableSelection,
835
877
  "form-setValue": handleFormSetValue,
836
878
  "form-submit": handleFormSubmit,
837
879
  custom: handleCustomAction,
@@ -853,4 +895,5 @@ exports.handleTableChildRefresh = handleTableChildRefresh;
853
895
  exports.handleTableChildSelection = handleTableChildSelection;
854
896
  exports.handleTableRefresh = handleTableRefresh;
855
897
  exports.handleTableRowDelete = handleTableRowDelete;
898
+ exports.handleTableSelection = handleTableSelection;
856
899
  exports.handleUpload = handleUpload;
@@ -89,7 +89,6 @@ class ImportantDataChangeManager {
89
89
  }
90
90
  /**
91
91
  * 拉取所有配置组的变更日志
92
- * TODO: 替换 mock API 为真实后端接口
93
92
  */
94
93
  async fetchChanges() {
95
94
  const allRecords = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/designer",
3
- "version": "5.6.10",
3
+ "version": "5.6.13",
4
4
  "main": "lib/designer/index.js",
5
5
  "module": "es/designer/index.mjs",
6
6
  "files": [