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