@fecp/designer 5.6.29 → 5.6.31

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 (118) hide show
  1. package/es/_virtual/_commonjsHelpers.mjs +25 -0
  2. package/es/_virtual/index.mjs +4 -4
  3. package/es/_virtual/index2.mjs +2 -5
  4. package/es/_virtual/index3.mjs +5 -3
  5. package/es/_virtual/index4.mjs +5 -2
  6. package/es/_virtual/index5.mjs +3 -2
  7. package/es/_virtual/index6.mjs +4 -0
  8. package/es/_virtual/index7.mjs +4 -0
  9. package/es/config-dev.js +2 -0
  10. package/es/designer/package.json.mjs +1 -1
  11. package/es/designer/src/axios/config.mjs +10 -3
  12. package/es/designer/src/axios/crypto.mjs +1 -5
  13. package/es/designer/src/packages/aiForm/AiDiffTable.vue.mjs +152 -0
  14. package/es/designer/src/packages/aiForm/api.mjs +21 -0
  15. package/es/designer/src/packages/aiForm/apply.mjs +153 -0
  16. package/es/designer/src/packages/aiForm/compressConfig.mjs +69 -0
  17. package/es/designer/src/packages/aiForm/constants.mjs +184 -0
  18. package/es/designer/src/packages/aiForm/diff.mjs +140 -0
  19. package/es/designer/src/packages/aiForm/index.vue.mjs +301 -0
  20. package/es/designer/src/packages/aiForm/normalizeFieldList.mjs +138 -0
  21. package/es/designer/src/packages/aiForm/parseAiResult.mjs +245 -0
  22. package/es/designer/src/packages/aiForm/prompt.mjs +130 -0
  23. package/es/designer/src/packages/aiForm/useAiFormDrawer.mjs +16 -0
  24. package/es/designer/src/packages/dataSource/dataSource.vue.mjs +45 -30
  25. package/es/designer/src/packages/form/headerBtn.vue.mjs +4 -1
  26. package/es/designer/src/packages/form/index.vue.mjs +16 -2
  27. package/es/designer/src/packages/utils/datasource.mjs +14 -1
  28. package/es/designer.css +523 -232
  29. package/es/node_modules/@braintree/sanitize-url/dist/index.mjs +1 -1
  30. package/es/node_modules/diagram-js/lib/model/index.mjs +1 -1
  31. package/es/node_modules/element-plus/es/utils/vue/icon.mjs +1 -1
  32. package/es/node_modules/highlight.js/es/index.mjs +1 -1
  33. package/es/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-LMCZKHZV.mjs +1 -1
  34. package/es/node_modules/mermaid/dist/chunks/mermaid.core/chunk-32BRIVSS.mjs +1 -1
  35. package/es/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICXQ74PX.mjs +1 -1
  36. package/es/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-OUVF2IWQ.mjs +1 -1
  37. package/es/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-EOCWNBFH.mjs +1 -1
  38. package/es/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-23GEKE2U.mjs +1 -1
  39. package/es/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-NO4QXBWP.mjs +1 -1
  40. package/es/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-DBY2YBRQ.mjs +1 -1
  41. package/es/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-2N3HPSRC.mjs +1 -1
  42. package/es/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-6OUMAXLB.mjs +1 -1
  43. package/es/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-G3AALYLV.mjs +1 -1
  44. package/es/node_modules/object-refs/index.mjs +1 -1
  45. package/es/packages/mobile/src/axios/config.mjs +8 -4
  46. package/es/packages/mobile/src/components/ai/MarkdownRenderer/MarkdownRenderer.vue.mjs +1 -1
  47. package/es/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.mjs +53 -13
  48. package/es/packages/mobile/src/components/custom/approvalBar/FlowUserSelect.vue.mjs +215 -0
  49. package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +19 -15
  50. package/es/packages/mobile/src/utils/datasource.mjs +14 -1
  51. package/es/packages/mobile/src/utils/formatterUtil.mjs +24 -12
  52. package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +75 -8
  53. package/es/packages/vue/src/components/dialog/index.mjs +2 -1
  54. package/es/packages/vue/src/components/forms/form/Form.vue.mjs +10 -49
  55. package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +2 -12
  56. package/es/packages/vue/src/components/forms/roleSelect/RoleSelect.vue.mjs +9 -3
  57. package/es/packages/vue/src/components/forms/userSelect/UserSelect.vue.mjs +9 -3
  58. package/es/packages/vue/src/components/table/Table.vue.mjs +119 -11
  59. package/es/packages/vue/src/utils/datasource.mjs +14 -1
  60. package/lib/_virtual/_commonjsHelpers.js +25 -0
  61. package/lib/_virtual/index.js +4 -4
  62. package/lib/_virtual/index2.js +3 -6
  63. package/lib/_virtual/index3.js +6 -4
  64. package/lib/_virtual/index4.js +6 -3
  65. package/lib/_virtual/index5.js +3 -2
  66. package/lib/_virtual/index6.js +4 -0
  67. package/lib/_virtual/index7.js +4 -0
  68. package/lib/config-dev.js +2 -0
  69. package/lib/designer/package.json.js +1 -1
  70. package/lib/designer/src/axios/config.js +10 -3
  71. package/lib/designer/src/axios/crypto.js +0 -4
  72. package/lib/designer/src/packages/aiForm/AiDiffTable.vue.js +152 -0
  73. package/lib/designer/src/packages/aiForm/api.js +21 -0
  74. package/lib/designer/src/packages/aiForm/apply.js +153 -0
  75. package/lib/designer/src/packages/aiForm/compressConfig.js +69 -0
  76. package/lib/designer/src/packages/aiForm/constants.js +184 -0
  77. package/lib/designer/src/packages/aiForm/diff.js +140 -0
  78. package/lib/designer/src/packages/aiForm/index.vue.js +301 -0
  79. package/lib/designer/src/packages/aiForm/normalizeFieldList.js +138 -0
  80. package/lib/designer/src/packages/aiForm/parseAiResult.js +245 -0
  81. package/lib/designer/src/packages/aiForm/prompt.js +130 -0
  82. package/lib/designer/src/packages/aiForm/useAiFormDrawer.js +16 -0
  83. package/lib/designer/src/packages/dataSource/dataSource.vue.js +44 -29
  84. package/lib/designer/src/packages/form/headerBtn.vue.js +4 -1
  85. package/lib/designer/src/packages/form/index.vue.js +15 -1
  86. package/lib/designer/src/packages/utils/datasource.js +14 -1
  87. package/lib/designer.css +523 -232
  88. package/lib/node_modules/@braintree/sanitize-url/dist/index.js +1 -1
  89. package/lib/node_modules/diagram-js/lib/model/index.js +1 -1
  90. package/lib/node_modules/highlight.js/es/index.js +1 -1
  91. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-LMCZKHZV.js +1 -1
  92. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/chunk-32BRIVSS.js +1 -1
  93. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICXQ74PX.js +1 -1
  94. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-OUVF2IWQ.js +1 -1
  95. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-EOCWNBFH.js +1 -1
  96. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-23GEKE2U.js +1 -1
  97. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-NO4QXBWP.js +1 -1
  98. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-DBY2YBRQ.js +1 -1
  99. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-2N3HPSRC.js +1 -1
  100. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-6OUMAXLB.js +1 -1
  101. package/lib/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-G3AALYLV.js +1 -1
  102. package/lib/node_modules/object-refs/index.js +1 -1
  103. package/lib/packages/mobile/src/axios/config.js +8 -4
  104. package/lib/packages/mobile/src/components/ai/MarkdownRenderer/MarkdownRenderer.vue.js +1 -1
  105. package/lib/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.js +52 -12
  106. package/lib/packages/mobile/src/components/custom/approvalBar/FlowUserSelect.vue.js +215 -0
  107. package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +19 -15
  108. package/lib/packages/mobile/src/utils/datasource.js +14 -1
  109. package/lib/packages/mobile/src/utils/formatterUtil.js +24 -12
  110. package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +75 -8
  111. package/lib/packages/vue/src/components/dialog/index.js +2 -1
  112. package/lib/packages/vue/src/components/forms/form/Form.vue.js +9 -48
  113. package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +1 -11
  114. package/lib/packages/vue/src/components/forms/roleSelect/RoleSelect.vue.js +9 -3
  115. package/lib/packages/vue/src/components/forms/userSelect/UserSelect.vue.js +9 -3
  116. package/lib/packages/vue/src/components/table/Table.vue.js +118 -10
  117. package/lib/packages/vue/src/utils/datasource.js +14 -1
  118. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { __exports as dist } from "../../../../_virtual/index5.mjs";
1
+ import { __exports as dist } from "../../../../_virtual/index7.mjs";
2
2
  import { __require as requireConstants } from "./constants.mjs";
3
3
  var hasRequiredDist;
4
4
  function requireDist() {
@@ -1,6 +1,6 @@
1
1
  import { assign } from "../../../min-dash/dist/index.esm.mjs";
2
2
  import e from "../../../inherits-browser/dist/index.es.mjs";
3
- import Refs from "../../../../_virtual/index2.mjs";
3
+ import Refs from "../../../../_virtual/index4.mjs";
4
4
  var parentRefs = new Refs({ name: "children", enumerable: true, collection: true }, { name: "parent" }), labelRefs = new Refs({ name: "labels", enumerable: true, collection: true }, { name: "labelTarget" }), attacherRefs = new Refs({ name: "attachers", collection: true }, { name: "host" }), outgoingRefs = new Refs({ name: "outgoing", collection: true }, { name: "source" }), incomingRefs = new Refs({ name: "incoming", collection: true }, { name: "target" });
5
5
  function Base() {
6
6
  Object.defineProperty(this, "businessObject", {
@@ -1,5 +1,5 @@
1
1
  import { definePropType } from "./props/runtime.mjs";
2
- import { CircleClose as circle_close_default, CircleCheck as circle_check_default, Loading as loading_default, CircleCloseFilled as circle_close_filled_default, WarningFilled as warning_filled_default, InfoFilled as info_filled_default, SuccessFilled as success_filled_default, Close as close_default } from "../../../../@element-plus/icons-vue/dist/index.mjs";
2
+ import { CircleClose as circle_close_default, CircleCheck as circle_check_default, Loading as loading_default, InfoFilled as info_filled_default, CircleCloseFilled as circle_close_filled_default, WarningFilled as warning_filled_default, SuccessFilled as success_filled_default, Close as close_default } from "../../../../@element-plus/icons-vue/dist/index.mjs";
3
3
  const iconPropType = definePropType([
4
4
  String,
5
5
  Object,
@@ -1,4 +1,4 @@
1
- import HighlightJS from "../../../_virtual/index.mjs";
1
+ import HighlightJS from "../../../_virtual/index3.mjs";
2
2
  export {
3
3
  HighlightJS,
4
4
  HighlightJS as default
@@ -6,7 +6,7 @@ import { log } from "./chunk-X3CZISLH.mjs";
6
6
  import { __name } from "./chunk-Y2CYZVJY.mjs";
7
7
  import "../../../../d3-transition/src/selection/index.mjs";
8
8
  import "../../../../d3-zoom/src/transform.mjs";
9
- import { d as distExports } from "../../../../../_virtual/index3.mjs";
9
+ import { d as distExports } from "../../../../../_virtual/index5.mjs";
10
10
  import select from "../../../../d3-selection/src/select.mjs";
11
11
  var parser = function() {
12
12
  var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
@@ -1,6 +1,6 @@
1
1
  import { lineBreakRegex } from "./chunk-WYO6CB5R.mjs";
2
2
  import { __name } from "./chunk-Y2CYZVJY.mjs";
3
- import { d as distExports } from "../../../../../_virtual/index3.mjs";
3
+ import { d as distExports } from "../../../../../_virtual/index5.mjs";
4
4
  import "../../../../d3-transition/src/selection/index.mjs";
5
5
  import "../../../../d3-zoom/src/transform.mjs";
6
6
  import select from "../../../../d3-selection/src/select.mjs";
@@ -2,7 +2,7 @@ var _a;
2
2
  import { assignWithDepth_default, directiveRegex, sanitizeDirective, detectType, common_default } from "./chunk-WYO6CB5R.mjs";
3
3
  import { log } from "./chunk-X3CZISLH.mjs";
4
4
  import { __name } from "./chunk-Y2CYZVJY.mjs";
5
- import { d as distExports } from "../../../../../_virtual/index3.mjs";
5
+ import { d as distExports } from "../../../../../_virtual/index5.mjs";
6
6
  import "../../../../d3-transition/src/selection/index.mjs";
7
7
  import "../../../../d3-zoom/src/transform.mjs";
8
8
  import { memoize } from "../../../../es-toolkit/dist/compat/function/memoize.mjs";
@@ -5,7 +5,7 @@ import "../../../../d3-zoom/src/transform.mjs";
5
5
  import "./chunk-WYO6CB5R.mjs";
6
6
  import "../../../../../_virtual/dayjs.min.mjs";
7
7
  import "./chunk-FWX5IMBZ.mjs";
8
- import "../../../../../_virtual/index3.mjs";
8
+ import "../../../../../_virtual/index5.mjs";
9
9
  import "./chunk-52WLFC77.mjs";
10
10
  import "./chunk-ZGVPDNZ5.mjs";
11
11
  import "./chunk-7BUUIJ7U.mjs";
@@ -5,7 +5,7 @@ import "../../../../d3-zoom/src/transform.mjs";
5
5
  import "./chunk-WYO6CB5R.mjs";
6
6
  import "../../../../../_virtual/dayjs.min.mjs";
7
7
  import "./chunk-FWX5IMBZ.mjs";
8
- import "../../../../../_virtual/index3.mjs";
8
+ import "../../../../../_virtual/index5.mjs";
9
9
  import "./chunk-52WLFC77.mjs";
10
10
  import "./chunk-ZGVPDNZ5.mjs";
11
11
  import "./chunk-7BUUIJ7U.mjs";
@@ -5,7 +5,7 @@ import "./chunk-WYO6CB5R.mjs";
5
5
  import "../../../../../_virtual/dayjs.min.mjs";
6
6
  import "./chunk-ZIRB5QZD.mjs";
7
7
  import "./chunk-FWX5IMBZ.mjs";
8
- import "../../../../../_virtual/index3.mjs";
8
+ import "../../../../../_virtual/index5.mjs";
9
9
  import "./chunk-52WLFC77.mjs";
10
10
  import "./chunk-ZGVPDNZ5.mjs";
11
11
  import "./chunk-7BUUIJ7U.mjs";
@@ -2,7 +2,7 @@ import { utils_default } from "./chunk-ICXQ74PX.mjs";
2
2
  import { getAccDescription, setAccDescription, getDiagramTitle, setDiagramTitle, getAccTitle, setAccTitle, getConfig2, configureSvgSize, common_default, clear } from "./chunk-WYO6CB5R.mjs";
3
3
  import { log } from "./chunk-X3CZISLH.mjs";
4
4
  import { __name } from "./chunk-Y2CYZVJY.mjs";
5
- import { d as distExports } from "../../../../../_virtual/index3.mjs";
5
+ import { d as distExports } from "../../../../../_virtual/index5.mjs";
6
6
  import dayjs2 from "../../../../../_virtual/dayjs.min.mjs";
7
7
  import dayjsIsoWeek from "../../../../../_virtual/isoWeek.mjs";
8
8
  import dayjsCustomParseFormat from "../../../../../_virtual/customParseFormat.mjs";
@@ -8,7 +8,7 @@ import { log } from "./chunk-X3CZISLH.mjs";
8
8
  import { __name } from "./chunk-Y2CYZVJY.mjs";
9
9
  import "../../../../d3-transition/src/selection/index.mjs";
10
10
  import "../../../../d3-zoom/src/transform.mjs";
11
- import { d as distExports } from "../../../../../_virtual/index3.mjs";
11
+ import { d as distExports } from "../../../../../_virtual/index5.mjs";
12
12
  import select from "../../../../d3-selection/src/select.mjs";
13
13
  var parser = function() {
14
14
  var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
@@ -5,7 +5,7 @@ import "../../../../d3-zoom/src/transform.mjs";
5
5
  import { getConfig2, configureSvgSize, common_default, getUrl } from "./chunk-WYO6CB5R.mjs";
6
6
  import { log } from "./chunk-X3CZISLH.mjs";
7
7
  import "./chunk-FWX5IMBZ.mjs";
8
- import "../../../../../_virtual/index3.mjs";
8
+ import "../../../../../_virtual/index5.mjs";
9
9
  import "./chunk-52WLFC77.mjs";
10
10
  import "./chunk-ZGVPDNZ5.mjs";
11
11
  import "./chunk-7BUUIJ7U.mjs";
@@ -5,7 +5,7 @@ import "../../../../d3-zoom/src/transform.mjs";
5
5
  import "./chunk-WYO6CB5R.mjs";
6
6
  import "../../../../../_virtual/dayjs.min.mjs";
7
7
  import "./chunk-FWX5IMBZ.mjs";
8
- import "../../../../../_virtual/index3.mjs";
8
+ import "../../../../../_virtual/index5.mjs";
9
9
  import "./chunk-52WLFC77.mjs";
10
10
  import "./chunk-ZGVPDNZ5.mjs";
11
11
  import "./chunk-7BUUIJ7U.mjs";
@@ -6,7 +6,7 @@ import "./chunk-WYO6CB5R.mjs";
6
6
  import "../../../../../_virtual/dayjs.min.mjs";
7
7
  import "./chunk-ZIRB5QZD.mjs";
8
8
  import "./chunk-FWX5IMBZ.mjs";
9
- import "../../../../../_virtual/index3.mjs";
9
+ import "../../../../../_virtual/index5.mjs";
10
10
  import "./chunk-52WLFC77.mjs";
11
11
  import "./chunk-ZGVPDNZ5.mjs";
12
12
  import "./chunk-7BUUIJ7U.mjs";
@@ -1,4 +1,4 @@
1
- import { __module as objectRefs } from "../../_virtual/index4.mjs";
1
+ import { __module as objectRefs } from "../../_virtual/index6.mjs";
2
2
  import { __require as requireRefs } from "./lib/refs.mjs";
3
3
  import { __require as requireCollection } from "./lib/collection.mjs";
4
4
  var hasRequiredObjectRefs;
@@ -5,16 +5,19 @@ const axios = () => {
5
5
  withCredentials: false
6
6
  });
7
7
  const pendingMap = /* @__PURE__ */ new Map();
8
+ const isExternalUrl = (url) => /^https?:\/\//i.test(url || "");
8
9
  service.interceptors.request.use(
9
10
  (config) => {
10
11
  removePending(config);
11
12
  addPending(config);
12
- if (config.url != "/login") {
13
+ if (!isExternalUrl(config.url) && config.url != "/login") {
13
14
  config.headers.token = sessionStorage.getItem("token");
14
15
  config.headers.refreshToken = sessionStorage.getItem("refreshToken");
15
16
  }
16
- config.headers.crypto = false;
17
- config.headers.sig = false;
17
+ if (!isExternalUrl(config.url)) {
18
+ config.headers.crypto = false;
19
+ config.headers.sig = false;
20
+ }
18
21
  return config;
19
22
  },
20
23
  (error) => {
@@ -35,11 +38,12 @@ const axios = () => {
35
38
  return responseData;
36
39
  },
37
40
  async (error) => {
41
+ var _a, _b;
38
42
  error.config && removePending(error.config);
39
43
  if (axios$1.isCancel(error)) {
40
44
  return console.error("请求的重复请求:" + error.message);
41
45
  }
42
- if (error.response.config.responseType == "blob") {
46
+ if (((_b = (_a = error.response) == null ? void 0 : _a.config) == null ? void 0 : _b.responseType) == "blob") {
43
47
  let reader = new FileReader();
44
48
  reader.onload = function(event) {
45
49
  let data = JSON.parse(reader.result);
@@ -1,6 +1,6 @@
1
1
  import { ref, computed, watch, nextTick, createElementBlock, openBlock } from "vue";
2
2
  import MarkdownIt from "../../../../../../node_modules/markdown-it/lib/index.mjs";
3
- import HighlightJS from "../../../../../../_virtual/index.mjs";
3
+ import HighlightJS from "../../../../../../_virtual/index3.mjs";
4
4
  import purify from "../../../../../../node_modules/dompurify/dist/purify.es.mjs";
5
5
  /* empty css */
6
6
  /* empty css */
@@ -21,10 +21,11 @@ import { findPageById } from "../../../utils/common.mjs";
21
21
  import { pageHistory } from "../../../utils/pageHistory.mjs";
22
22
  import emitter from "../../../utils/eventBus.mjs";
23
23
  import MobilePage from "../../../page.vue.mjs";
24
+ import FlowUserSelect from "./FlowUserSelect.vue.mjs";
24
25
  import { useStore } from "../../../../../../node_modules/vuex/dist/vuex.esm-bundler.mjs";
25
26
  /* empty css */
26
27
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
27
- import { showLoadingToast, showFailToast, showSuccessToast, closeToast } from "../../../../../../node_modules/vant/es/toast/function-call.mjs";
28
+ import { showLoadingToast, closeToast, showFailToast, showSuccessToast } from "../../../../../../node_modules/vant/es/toast/function-call.mjs";
28
29
  import "../../../../../../node_modules/vant/es/toast/index.mjs";
29
30
  import { ActionBar } from "../../../../../../node_modules/vant/es/action-bar/index.mjs";
30
31
  import { ActionBarButton } from "../../../../../../node_modules/vant/es/action-bar-button/index.mjs";
@@ -82,6 +83,10 @@ const _sfc_main = {
82
83
  const showOtherPop = ref(false);
83
84
  const showOpinionPicker = ref(false);
84
85
  const showTargetNodePicker = ref(false);
86
+ const showFlowUserSelect = ref(false);
87
+ const flowUserAssignees = ref([]);
88
+ const flowUserTitle = ref("选择处理人");
89
+ const pendingCommitData = ref(null);
85
90
  const opinionForm = reactive({
86
91
  approveId: "",
87
92
  approveIdea: "",
@@ -237,6 +242,9 @@ const _sfc_main = {
237
242
  variables: {}
238
243
  };
239
244
  console.log("🚀 ~ submitOpinion ~ commitData:", commitData);
245
+ doCommit(commitData);
246
+ }
247
+ function doCommit(commitData) {
240
248
  showLoadingToast({
241
249
  message: "提交中...",
242
250
  forbidClick: true,
@@ -246,23 +254,48 @@ const _sfc_main = {
246
254
  "/" + window.$servers.base + "/flow/flowApproveDetail/doCommit",
247
255
  commitData,
248
256
  false
249
- ).then((data) => {
250
- if (data && data.needOper) {
251
- showFailToast("待开发:需要人工操作的节点");
257
+ ).then((res) => {
258
+ closeToast();
259
+ if (res && res.needOper) {
260
+ handleNeedOper(commitData, res);
252
261
  } else {
253
- showSuccessToast("提交成功");
254
- showOtherPop.value = false;
255
- showAgreePop.value = false;
256
- emitter.emit("refreshFlowCutNum");
257
- setTimeout(() => goBack(), 800);
262
+ onCommitSuccess();
258
263
  }
259
- }).finally(() => {
264
+ }).catch((err) => {
260
265
  closeToast();
266
+ throw err;
261
267
  });
262
268
  }
269
+ function handleNeedOper(commitData, res) {
270
+ console.log("🚀 ~ handleNeedOper ~ res:", res);
271
+ const taskNodeList = res.taskList || [];
272
+ if (!taskNodeList.length) {
273
+ showFailToast("提交失败:未返回需要指定处理人的节点");
274
+ return;
275
+ }
276
+ const taskNode = taskNodeList[0] || {};
277
+ pendingCommitData.value = commitData;
278
+ flowUserAssignees.value = taskNode.assigneeList || [];
279
+ flowUserTitle.value = taskNode.name ? `选择 [${taskNode.name}] 处理人` : "选择处理人";
280
+ showFlowUserSelect.value = true;
281
+ }
282
+ function onFlowUserConfirm(users) {
283
+ const opNos = (users || []).map((u) => u.opNo).filter(Boolean);
284
+ if (!opNos.length) return;
285
+ showFlowUserSelect.value = false;
286
+ const commitData = pendingCommitData.value || {};
287
+ doCommit({ ...commitData, nextUser: opNos.join(",") });
288
+ }
289
+ function onCommitSuccess() {
290
+ showSuccessToast("提交成功");
291
+ showOtherPop.value = false;
292
+ showAgreePop.value = false;
293
+ emitter.emit("refreshFlowCutNum");
294
+ setTimeout(() => goBack(), 800);
295
+ }
263
296
  const goBack = () => {
264
297
  emitter.emit("approvalCallback");
265
- if (!route.query.pageKey == "approveDetail") {
298
+ if (route.query.pageKey != "approveDetail") {
266
299
  pageHistory.back();
267
300
  }
268
301
  };
@@ -451,12 +484,19 @@ const _sfc_main = {
451
484
  }, null, 8, ["columns"])
452
485
  ]),
453
486
  _: 1
454
- }, 8, ["show"])
487
+ }, 8, ["show"]),
488
+ createVNode(FlowUserSelect, {
489
+ show: unref(showFlowUserSelect),
490
+ "onUpdate:show": _cache[12] || (_cache[12] = ($event) => isRef(showFlowUserSelect) ? showFlowUserSelect.value = $event : null),
491
+ title: unref(flowUserTitle),
492
+ assignees: unref(flowUserAssignees),
493
+ onConfirm: onFlowUserConfirm
494
+ }, null, 8, ["show", "title", "assignees"])
455
495
  ], 64);
456
496
  };
457
497
  }
458
498
  };
459
- const _ApprovalBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-942e7e66"]]);
499
+ const _ApprovalBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3579b6b9"]]);
460
500
  export {
461
501
  _ApprovalBar as default
462
502
  };
@@ -0,0 +1,215 @@
1
+ /* empty css */
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
8
+ /* empty css */
9
+ /* empty css */
10
+ /* empty css */
11
+ /* empty css */
12
+ /* empty css */
13
+ /* empty css */
14
+ import { ref, watch, computed, createBlock, openBlock, unref, isRef, withCtx, createElementVNode, toDisplayString, createVNode, createElementBlock, createCommentVNode, Fragment, renderList, normalizeClass, withModifiers, createTextVNode } from "vue";
15
+ /* empty css */
16
+ import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
17
+ import { Popup } from "../../../../../../node_modules/vant/es/popup/index.mjs";
18
+ import { Search } from "../../../../../../node_modules/vant/es/search/index.mjs";
19
+ import { Checkbox } from "../../../../../../node_modules/vant/es/checkbox/index.mjs";
20
+ import { Empty } from "../../../../../../node_modules/vant/es/empty/index.mjs";
21
+ import { Button } from "../../../../../../node_modules/vant/es/button/index.mjs";
22
+ const _hoisted_1 = { class: "fec-flow-user-select" };
23
+ const _hoisted_2 = { class: "fec-flow-user-select-header" };
24
+ const _hoisted_3 = { class: "fec-flow-user-select-title" };
25
+ const _hoisted_4 = { class: "fec-flow-user-select-search" };
26
+ const _hoisted_5 = { class: "fec-flow-user-select-list" };
27
+ const _hoisted_6 = ["onClick"];
28
+ const _hoisted_7 = { class: "fec-flow-user-select-avatar" };
29
+ const _hoisted_8 = { class: "fec-flow-user-select-info" };
30
+ const _hoisted_9 = { class: "fec-flow-user-select-name" };
31
+ const _hoisted_10 = {
32
+ key: 0,
33
+ class: "fec-flow-user-select-sub"
34
+ };
35
+ const _hoisted_11 = {
36
+ key: 0,
37
+ class: "fec-flow-user-select-empty"
38
+ };
39
+ const _hoisted_12 = { class: "fec-flow-user-select-footer" };
40
+ const _hoisted_13 = { class: "fec-flow-user-select-summary" };
41
+ const _hoisted_14 = { class: "fec-flow-user-select-summary-count" };
42
+ const _hoisted_15 = { class: "fec-flow-user-select-summary-list" };
43
+ const _sfc_main = {
44
+ __name: "FlowUserSelect",
45
+ props: {
46
+ // 是否显示弹窗
47
+ show: {
48
+ type: Boolean,
49
+ default: false
50
+ },
51
+ // 弹窗标题
52
+ title: {
53
+ type: String,
54
+ default: "选择处理人"
55
+ },
56
+ // 节点候选人(流程返回的 taskNodeList[n].assigneeList)
57
+ assignees: {
58
+ type: Array,
59
+ default: () => []
60
+ }
61
+ },
62
+ emits: ["update:show", "confirm"],
63
+ setup(__props, { emit: __emit }) {
64
+ const props = __props;
65
+ const emit = __emit;
66
+ const searchKeyword = ref("");
67
+ const selectedList = ref([]);
68
+ const popupShow = ref(props.show);
69
+ watch(
70
+ () => props.show,
71
+ (v) => {
72
+ popupShow.value = v;
73
+ }
74
+ );
75
+ watch(popupShow, (v) => {
76
+ emit("update:show", v);
77
+ if (!v) resetState();
78
+ });
79
+ watch(
80
+ () => props.assignees,
81
+ () => {
82
+ resetState();
83
+ }
84
+ );
85
+ function resetState() {
86
+ searchKeyword.value = "";
87
+ selectedList.value = [];
88
+ }
89
+ const total = computed(() => (props.assignees || []).length);
90
+ const filteredList = computed(() => {
91
+ const kw = (searchKeyword.value || "").trim().toLowerCase();
92
+ const list = props.assignees || [];
93
+ if (!kw) return list;
94
+ return list.filter(
95
+ (item) => (item.opName || "").toLowerCase().includes(kw) || (item.opNo || "").toLowerCase().includes(kw)
96
+ );
97
+ });
98
+ function isSelected(item) {
99
+ return selectedList.value.some((u) => u.opNo === item.opNo);
100
+ }
101
+ function toggleSelect(item) {
102
+ const idx = selectedList.value.findIndex((u) => u.opNo === item.opNo);
103
+ if (idx > -1) {
104
+ selectedList.value.splice(idx, 1);
105
+ } else {
106
+ selectedList.value.push({ ...item });
107
+ }
108
+ }
109
+ function onConfirm() {
110
+ if (!selectedList.value.length) return;
111
+ emit("confirm", [...selectedList.value]);
112
+ }
113
+ function getInitial(item) {
114
+ const name = item.opName || "";
115
+ if (!name) return "?";
116
+ return name.length <= 2 ? name : name.slice(-2);
117
+ }
118
+ return (_ctx, _cache) => {
119
+ const _component_van_search = Search;
120
+ const _component_van_checkbox = Checkbox;
121
+ const _component_van_empty = Empty;
122
+ const _component_van_button = Button;
123
+ const _component_van_popup = Popup;
124
+ return openBlock(), createBlock(_component_van_popup, {
125
+ show: unref(popupShow),
126
+ "onUpdate:show": _cache[1] || (_cache[1] = ($event) => isRef(popupShow) ? popupShow.value = $event : null),
127
+ position: "bottom",
128
+ style: { height: "80%" },
129
+ round: "",
130
+ closeable: "",
131
+ "close-icon-position": "top-left",
132
+ teleport: "body"
133
+ }, {
134
+ default: withCtx(() => [
135
+ createElementVNode("div", _hoisted_1, [
136
+ createElementVNode("div", _hoisted_2, [
137
+ createElementVNode("span", _hoisted_3, toDisplayString(__props.title), 1)
138
+ ]),
139
+ createElementVNode("div", _hoisted_4, [
140
+ createVNode(_component_van_search, {
141
+ modelValue: unref(searchKeyword),
142
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchKeyword) ? searchKeyword.value = $event : null),
143
+ shape: "round",
144
+ placeholder: "请输入姓名/工号",
145
+ clearable: ""
146
+ }, null, 8, ["modelValue"])
147
+ ]),
148
+ createElementVNode("div", _hoisted_5, [
149
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredList), (item) => {
150
+ return openBlock(), createElementBlock("div", {
151
+ key: item.opNo,
152
+ class: normalizeClass(["fec-flow-user-select-item", { "is-selected": isSelected(item) }]),
153
+ onClick: ($event) => toggleSelect(item)
154
+ }, [
155
+ createVNode(_component_van_checkbox, {
156
+ "model-value": isSelected(item),
157
+ shape: "square",
158
+ onClick: withModifiers(($event) => toggleSelect(item), ["stop"]),
159
+ class: "fec-flow-user-select-check"
160
+ }, null, 8, ["model-value", "onClick"]),
161
+ createElementVNode("div", _hoisted_7, toDisplayString(getInitial(item)), 1),
162
+ createElementVNode("div", _hoisted_8, [
163
+ createElementVNode("div", _hoisted_9, [
164
+ createElementVNode("span", null, toDisplayString(item.opName), 1)
165
+ ]),
166
+ item.opNo ? (openBlock(), createElementBlock("div", _hoisted_10, toDisplayString(item.opNo), 1)) : createCommentVNode("", true)
167
+ ])
168
+ ], 10, _hoisted_6);
169
+ }), 128)),
170
+ !unref(filteredList).length ? (openBlock(), createElementBlock("div", _hoisted_11, [
171
+ createVNode(_component_van_empty, {
172
+ "image-size": "80",
173
+ description: "暂无数据"
174
+ })
175
+ ])) : createCommentVNode("", true)
176
+ ]),
177
+ createElementVNode("div", _hoisted_12, [
178
+ createElementVNode("div", _hoisted_13, [
179
+ _cache[2] || (_cache[2] = createElementVNode("span", { class: "fec-flow-user-select-summary-label" }, "已选择(", -1)),
180
+ createElementVNode("span", _hoisted_14, toDisplayString(unref(selectedList).length), 1),
181
+ _cache[3] || (_cache[3] = createElementVNode("span", { class: "fec-flow-user-select-summary-label" }, "):", -1)),
182
+ createElementVNode("div", _hoisted_15, [
183
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(selectedList), (u) => {
184
+ return openBlock(), createElementBlock("span", {
185
+ key: u.opNo,
186
+ class: "fec-flow-user-select-summary-chip"
187
+ }, toDisplayString(getInitial(u)), 1);
188
+ }), 128))
189
+ ])
190
+ ]),
191
+ createVNode(_component_van_button, {
192
+ type: "primary",
193
+ round: "",
194
+ size: "small",
195
+ class: "fec-flow-user-select-confirm",
196
+ disabled: unref(selectedList).length === 0,
197
+ onClick: onConfirm
198
+ }, {
199
+ default: withCtx(() => [
200
+ createTextVNode(" 确定 (" + toDisplayString(unref(selectedList).length) + "/" + toDisplayString(unref(total)) + ") ", 1)
201
+ ]),
202
+ _: 1
203
+ }, 8, ["disabled"])
204
+ ])
205
+ ])
206
+ ]),
207
+ _: 1
208
+ }, 8, ["show"]);
209
+ };
210
+ }
211
+ };
212
+ const FlowUserSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-33c2e94f"]]);
213
+ export {
214
+ FlowUserSelect as default
215
+ };
@@ -6,6 +6,7 @@ import { createDataSource } from "../../../utils/datasource.mjs";
6
6
  import VueRender from "../../../utils/idea/VueRender.vue.mjs";
7
7
  import CardLayoutRenderer from "./CardLayoutRenderer.vue.mjs";
8
8
  import { selectFormatter, multipleFormatter, dateFormatter, textFormatter } from "../../../utils/formatterUtil.mjs";
9
+ import { cloneDeep } from "../../../utils/common.mjs";
9
10
  /* empty css */
10
11
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
11
12
  import { List } from "../../../../../../node_modules/vant/es/list/index.mjs";
@@ -166,13 +167,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
166
167
  watch(
167
168
  () => props.columns,
168
169
  async () => {
169
- formattedColumns.value = null;
170
- if (rawTableData.value.length > 0) {
171
- await formattedTableData();
172
- tableData.value = parseTableData(
173
- rawTableData.value.map((item) => ({ ...item }))
174
- );
170
+ if (rawTableData.value.length == 0) {
171
+ formattedColumns.value = null;
172
+ return;
175
173
  }
174
+ await formattedTableData();
175
+ tableData.value = parseTableData(
176
+ rawTableData.value.map((item) => ({ ...item }))
177
+ );
176
178
  },
177
179
  { deep: true }
178
180
  );
@@ -229,9 +231,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
229
231
  await dataSourceManager.value.fetch(searchData.value);
230
232
  const data = ((_a = dataSourceManager.value) == null ? void 0 : _a.getData().list) || [];
231
233
  rawTableData.value.push(...data.map((item) => ({ ...item })));
232
- tableData.value.push(
233
- ...parseTableData(data.map((item) => ({ ...item })))
234
- );
234
+ tableData.value.push(...parseTableData(data.map((item) => ({ ...item }))));
235
235
  if (tableData.value.length == 0 && isDesigner) {
236
236
  tableData.value = [{}];
237
237
  }
@@ -265,7 +265,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
265
265
  const dictionaryOptions = ref({});
266
266
  async function formattedTableData() {
267
267
  var _a, _b;
268
- const columns = [...props.columns];
268
+ const columns = cloneDeep(props.columns);
269
269
  const fieldDataSources = /* @__PURE__ */ new Set();
270
270
  const dictionaryKeys = /* @__PURE__ */ new Set();
271
271
  for (const col of columns) {
@@ -302,9 +302,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
302
302
  console.error(`Failed to load data source ${dataSourceId}:`, error2);
303
303
  }
304
304
  }
305
- if (dictionaryKeys.size > 0) {
305
+ const pendingDictKeys = Array.from(dictionaryKeys).filter(
306
+ (key) => !dictionaryOptions.value[key]
307
+ );
308
+ if (pendingDictKeys.length > 0) {
306
309
  try {
307
- const keyName = Array.from(dictionaryKeys).join(",");
310
+ const keyName = pendingDictKeys.join(",");
308
311
  const response = await ctx.$http.postFormMobile(
309
312
  "/" + window.$servers.base + "/parm/sysParmDic/getDicListByKey",
310
313
  {
@@ -366,7 +369,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
366
369
  function parseTableData(tableData2) {
367
370
  const list = [...tableData2];
368
371
  list.forEach((row) => {
369
- formattedColumns.value.forEach((col) => {
372
+ var _a;
373
+ (_a = formattedColumns.value) == null ? void 0 : _a.forEach((col) => {
370
374
  let value = row[col.fieldName];
371
375
  if (col.dataType == "select") {
372
376
  if (isEmpty(value)) {
@@ -387,7 +391,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
387
391
  if (isEmpty(value)) {
388
392
  value = emptyHandler(col.emptyFormatter);
389
393
  }
390
- value = textFormatter(value, col.dataFormatter);
394
+ value = textFormatter(value, col.dataFormatter, true);
391
395
  }
392
396
  row[col.fieldName] = value;
393
397
  });
@@ -473,7 +477,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
473
477
  };
474
478
  }
475
479
  });
476
- const _CardList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a0ad2a21"]]);
480
+ const _CardList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-16df1428"]]);
477
481
  export {
478
482
  _CardList as default
479
483
  };