@fecp/designer 5.5.91 → 5.5.93
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/designer/package.json.mjs +1 -1
- package/es/designer.css +55 -43
- package/es/packages/mobile/index.mjs +2 -0
- package/es/packages/mobile/src/components/all.mjs +2 -0
- package/es/packages/mobile/src/components/custom/appDetail/AppDetail.vue.mjs +33 -0
- package/es/packages/mobile/src/components/custom/appDetail/index.mjs +10 -0
- package/es/packages/mobile/src/components/navigation/tabs/Tabs.vue.mjs +9 -10
- package/es/packages/mobile/src/index.vue.mjs +21 -6
- package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +1 -2
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +6 -3
- package/es/packages/vue/src/utils/datasource.mjs +10 -7
- package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +5 -1
- package/es/packages/vue/src/utils/eventFlow/eventFlowHandler.mjs +5 -7
- package/lib/designer/package.json.js +1 -1
- package/lib/designer.css +55 -43
- package/lib/packages/mobile/index.js +4 -2
- package/lib/packages/mobile/src/components/all.js +2 -0
- package/lib/packages/mobile/src/components/custom/appDetail/AppDetail.vue.js +33 -0
- package/lib/packages/mobile/src/components/custom/appDetail/index.js +10 -0
- package/lib/packages/mobile/src/components/navigation/tabs/Tabs.vue.js +8 -9
- package/lib/packages/mobile/src/index.vue.js +21 -6
- package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +1 -2
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +6 -3
- package/lib/packages/vue/src/utils/datasource.js +10 -7
- package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +5 -1
- package/lib/packages/vue/src/utils/eventFlow/eventFlowHandler.js +5 -7
- package/package.json +1 -1
|
@@ -70,6 +70,7 @@ import { MobileTabbarItem } from "./src/components/navigation/tabbarItem/index.m
|
|
|
70
70
|
import { MobileTreeSelect } from "./src/components/navigation/treeSelect/index.mjs";
|
|
71
71
|
import { MobileLayout } from "./src/components/layout/layout/index.mjs";
|
|
72
72
|
import { MobileTimeLineFilter } from "./src/components/custom/timeLineFilter/index.mjs";
|
|
73
|
+
import { MobileAppDetail } from "./src/components/custom/appDetail/index.mjs";
|
|
73
74
|
import { closeDialog, showConfirmDialog, showDialog } from "./node_modules/vant/es/dialog/function-call.mjs";
|
|
74
75
|
import { showImagePreview } from "./node_modules/vant/es/image-preview/function-call.mjs";
|
|
75
76
|
import { closeNotify, showNotify } from "./node_modules/vant/es/notify/function-call.mjs";
|
|
@@ -85,6 +86,7 @@ const index = {
|
|
|
85
86
|
export {
|
|
86
87
|
MobileActionBar,
|
|
87
88
|
MobileActionSheet,
|
|
89
|
+
MobileAppDetail,
|
|
88
90
|
MobileBackTop,
|
|
89
91
|
MobileButton,
|
|
90
92
|
MobileCard,
|
|
@@ -66,9 +66,11 @@ import { MobileTabbarItem } from "./navigation/tabbarItem/index.mjs";
|
|
|
66
66
|
import { MobileTreeSelect } from "./navigation/treeSelect/index.mjs";
|
|
67
67
|
import { MobileLayout } from "./layout/layout/index.mjs";
|
|
68
68
|
import { MobileTimeLineFilter } from "./custom/timeLineFilter/index.mjs";
|
|
69
|
+
import { MobileAppDetail } from "./custom/appDetail/index.mjs";
|
|
69
70
|
export {
|
|
70
71
|
MobileActionBar,
|
|
71
72
|
MobileActionSheet,
|
|
73
|
+
MobileAppDetail,
|
|
72
74
|
MobileBackTop,
|
|
73
75
|
MobileButton,
|
|
74
76
|
MobileCard,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createElementBlock, createCommentVNode, openBlock, createElementVNode } from "vue";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const _hoisted_1 = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "route-wrapper"
|
|
7
|
+
};
|
|
8
|
+
const _sfc_main = {
|
|
9
|
+
__name: "AppDetail",
|
|
10
|
+
props: {
|
|
11
|
+
isDev: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false
|
|
14
|
+
},
|
|
15
|
+
//任务对象+流程变量
|
|
16
|
+
data: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: {}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(__props) {
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
return __props.isDev ? (openBlock(), createElementBlock("div", _hoisted_1, _cache[0] || (_cache[0] = [
|
|
24
|
+
createElementVNode("div", { class: "route-hint" }, "根据配置动态显示审批详情页面", -1),
|
|
25
|
+
createElementVNode("div", { class: "route-hint" }, "传递 任务对象+流程变量 到页面中", -1)
|
|
26
|
+
]))) : createCommentVNode("", true);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const _AppDetail = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6cf862c9"]]);
|
|
31
|
+
export {
|
|
32
|
+
_AppDetail as default
|
|
33
|
+
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
|
-
import { computed, createElementBlock, openBlock, normalizeStyle, unref, createVNode, createElementVNode,
|
|
8
|
+
import { computed, createElementBlock, openBlock, normalizeStyle, unref, createVNode, createElementVNode, isRef, withCtx, Fragment, renderList, createBlock, mergeProps, renderSlot } from "vue";
|
|
9
9
|
/* empty css */
|
|
10
10
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
11
11
|
import { Tabs } from "../../../../node_modules/vant/es/tabs/index.mjs";
|
|
@@ -59,23 +59,22 @@ const _sfc_main = {
|
|
|
59
59
|
class: "fec-tabs-container",
|
|
60
60
|
style: normalizeStyle("height:" + unref(compHeight))
|
|
61
61
|
}, [
|
|
62
|
-
createVNode(_component_van_tabs,
|
|
62
|
+
createVNode(_component_van_tabs, {
|
|
63
|
+
sticky: "",
|
|
63
64
|
class: "fec-tabs",
|
|
64
65
|
active: unref(activeName),
|
|
65
|
-
"onUpdate:active": _cache[0] || (_cache[0] = ($event) => isRef(activeName) ? activeName.value = $event : null)
|
|
66
|
-
|
|
67
|
-
ellipsis: ""
|
|
68
|
-
}), {
|
|
66
|
+
"onUpdate:active": _cache[0] || (_cache[0] = ($event) => isRef(activeName) ? activeName.value = $event : null)
|
|
67
|
+
}, {
|
|
69
68
|
default: withCtx(() => [
|
|
70
69
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item) => {
|
|
71
70
|
return openBlock(), createBlock(_component_van_tab, mergeProps({ ref_for: true }, item, {
|
|
72
|
-
"
|
|
73
|
-
|
|
71
|
+
replace: "",
|
|
72
|
+
"show-zero-badge": false
|
|
74
73
|
}), null, 16);
|
|
75
74
|
}), 256))
|
|
76
75
|
]),
|
|
77
76
|
_: 1
|
|
78
|
-
},
|
|
77
|
+
}, 8, ["active"]),
|
|
79
78
|
createElementVNode("div", _hoisted_1, [
|
|
80
79
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
81
80
|
])
|
|
@@ -83,7 +82,7 @@ const _sfc_main = {
|
|
|
83
82
|
};
|
|
84
83
|
}
|
|
85
84
|
};
|
|
86
|
-
const _Tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
85
|
+
const _Tabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a014f592"]]);
|
|
87
86
|
export {
|
|
88
87
|
_Tabs as default
|
|
89
88
|
};
|
|
@@ -25,6 +25,10 @@ const _sfc_main = {
|
|
|
25
25
|
appId: {
|
|
26
26
|
type: String,
|
|
27
27
|
default: ""
|
|
28
|
+
},
|
|
29
|
+
pageKey: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
28
32
|
}
|
|
29
33
|
},
|
|
30
34
|
setup(__props) {
|
|
@@ -33,6 +37,7 @@ const _sfc_main = {
|
|
|
33
37
|
const ctx = currentInstance.proxy;
|
|
34
38
|
const pageList = ref({});
|
|
35
39
|
const configLoading = ref(true);
|
|
40
|
+
const noTargetPage = ref(false);
|
|
36
41
|
const loadConfig = async () => {
|
|
37
42
|
var _a, _b;
|
|
38
43
|
if (!props.appId) {
|
|
@@ -42,12 +47,20 @@ const _sfc_main = {
|
|
|
42
47
|
try {
|
|
43
48
|
let option = await api.getAppById(ctx.$http, props.appId);
|
|
44
49
|
pageList.value = ((_a = JSON.parse(option.pageConfig)) == null ? void 0 : _a.pageConfig) || [];
|
|
45
|
-
let homePage = pageList.value.find((page) => page.isHome);
|
|
46
|
-
if (!homePage) {
|
|
47
|
-
homePage = (_b = pageList.value) == null ? void 0 : _b[0];
|
|
48
|
-
}
|
|
49
50
|
pageHistory.clear();
|
|
50
51
|
console.log("🚀 ~ pageList ~ pageList.value:", pageList.value);
|
|
52
|
+
let homePage;
|
|
53
|
+
if (props.pageKey) {
|
|
54
|
+
homePage = pageList.value.find((page) => page.isHome);
|
|
55
|
+
if (!homePage) {
|
|
56
|
+
noTargetPage.value = true;
|
|
57
|
+
}
|
|
58
|
+
} else {
|
|
59
|
+
homePage = pageList.value.find((page) => page.isHome);
|
|
60
|
+
if (!homePage) {
|
|
61
|
+
homePage = (_b = pageList.value) == null ? void 0 : _b[0];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
51
64
|
let pageId = homePage.id;
|
|
52
65
|
if (homePage.footerType == "tabbar") {
|
|
53
66
|
pageId = homePage.tabbarConfig.tabbarOptions[0].pageId;
|
|
@@ -76,7 +89,9 @@ const _sfc_main = {
|
|
|
76
89
|
routePage.value = null;
|
|
77
90
|
}
|
|
78
91
|
pageHistory.push(targetPage);
|
|
92
|
+
noTargetPage.value = false;
|
|
79
93
|
} else {
|
|
94
|
+
noTargetPage.value = true;
|
|
80
95
|
currentPage.value = null;
|
|
81
96
|
routePage.value = null;
|
|
82
97
|
}
|
|
@@ -112,7 +127,7 @@ const _sfc_main = {
|
|
|
112
127
|
ref: "fecMobileAppRef"
|
|
113
128
|
}, {
|
|
114
129
|
default: withCtx(() => [
|
|
115
|
-
unref(
|
|
130
|
+
!unref(noTargetPage) ? (openBlock(), createBlock(unref(MobilePage), {
|
|
116
131
|
key: 0,
|
|
117
132
|
parentPage: unref(currentPage),
|
|
118
133
|
routePage: unref(routePage)
|
|
@@ -127,7 +142,7 @@ const _sfc_main = {
|
|
|
127
142
|
};
|
|
128
143
|
}
|
|
129
144
|
};
|
|
130
|
-
const MobileApp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
145
|
+
const MobileApp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-67de5a65"]]);
|
|
131
146
|
export {
|
|
132
147
|
MobileApp as default
|
|
133
148
|
};
|
|
@@ -865,7 +865,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
865
865
|
});
|
|
866
866
|
}
|
|
867
867
|
if (linkedConfig.options) {
|
|
868
|
-
result.options = linkedConfig.options
|
|
868
|
+
result.options = linkedConfig.options.filter((item) => {
|
|
869
|
+
return changedFieldIds.some(
|
|
870
|
+
(fieldId) => checkFieldInFilterConfig(item.filterConfig, fieldId)
|
|
871
|
+
);
|
|
872
|
+
});
|
|
869
873
|
}
|
|
870
874
|
if (linkedConfig.visibility) {
|
|
871
875
|
result.visibility = linkedConfig.visibility;
|
|
@@ -923,7 +927,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
923
927
|
layoutFieldItem.component.optionConfig.options = oriOptions.filter(
|
|
924
928
|
(item2) => optionsOpt.includes(item2.value)
|
|
925
929
|
);
|
|
926
|
-
formData.value[layoutFieldItem.component.fieldName] = "";
|
|
927
930
|
}
|
|
928
931
|
});
|
|
929
932
|
}
|
|
@@ -1271,7 +1274,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1271
1274
|
};
|
|
1272
1275
|
}
|
|
1273
1276
|
});
|
|
1274
|
-
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1277
|
+
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d12d82a2"]]);
|
|
1275
1278
|
export {
|
|
1276
1279
|
_Form as default
|
|
1277
1280
|
};
|
|
@@ -26,6 +26,7 @@ class DataSourceManager {
|
|
|
26
26
|
this.data = reactive({});
|
|
27
27
|
this.contextData = options.data || null;
|
|
28
28
|
this.fields = options.fields || [];
|
|
29
|
+
this.notShowMessage = options.notShowMessage || false;
|
|
29
30
|
this.events = {
|
|
30
31
|
loaded: [],
|
|
31
32
|
error: []
|
|
@@ -153,21 +154,23 @@ class DataSourceManager {
|
|
|
153
154
|
response = await this.http.get(url, { params });
|
|
154
155
|
break;
|
|
155
156
|
case "post":
|
|
156
|
-
if (
|
|
157
|
-
response = await this.http.
|
|
157
|
+
if (this.notShowMessage) {
|
|
158
|
+
response = await this.http.postNoMessage(url, params);
|
|
159
|
+
} else if (currentDs.contentType === "formData") {
|
|
160
|
+
response = await this.http.postForm(url, params);
|
|
158
161
|
} else if (currentDs.contentType === "download") {
|
|
159
|
-
await this.http.download(url, params
|
|
162
|
+
await this.http.download(url, params);
|
|
160
163
|
} else if (currentDs.contentType === "upload") {
|
|
161
|
-
response = await this.http.upload(url, params
|
|
164
|
+
response = await this.http.upload(url, params);
|
|
162
165
|
} else {
|
|
163
|
-
response = await this.http.post(url, params
|
|
166
|
+
response = await this.http.post(url, params);
|
|
164
167
|
}
|
|
165
168
|
break;
|
|
166
169
|
case "put":
|
|
167
170
|
if (currentDs.contentType === "formData") {
|
|
168
|
-
response = await this.http.putForm(url, params
|
|
171
|
+
response = await this.http.putForm(url, params);
|
|
169
172
|
} else {
|
|
170
|
-
response = await this.http.put(url, params
|
|
173
|
+
response = await this.http.put(url, params);
|
|
171
174
|
}
|
|
172
175
|
break;
|
|
173
176
|
case "delete":
|
|
@@ -142,8 +142,11 @@ async function handlePageGoBack(node, data, fields, context) {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
async function handleApiCall(node, data, fields, context, params) {
|
|
145
|
+
var _a;
|
|
145
146
|
console.log("[EventFlow] 执行API调用:", node.basic);
|
|
146
147
|
const basic = node.basic || {};
|
|
148
|
+
const metadata = context.metadata || {};
|
|
149
|
+
const isApproval = ((_a = metadata == null ? void 0 : metadata.item) == null ? void 0 : _a.isApproval) || false;
|
|
147
150
|
if (!basic.dataSourceId) {
|
|
148
151
|
return {
|
|
149
152
|
success: false,
|
|
@@ -165,7 +168,8 @@ async function handleApiCall(node, data, fields, context, params) {
|
|
|
165
168
|
currentDataSourceId: basic.dataSourceId,
|
|
166
169
|
showSuccessMessage: basic.showSuccessMessage,
|
|
167
170
|
data,
|
|
168
|
-
fields
|
|
171
|
+
fields,
|
|
172
|
+
notShowMessage: isApproval
|
|
169
173
|
});
|
|
170
174
|
try {
|
|
171
175
|
const result = await dataSourceManager.fetch();
|
|
@@ -9,7 +9,6 @@ async function executeEventFlow(params) {
|
|
|
9
9
|
onSuccess,
|
|
10
10
|
onError,
|
|
11
11
|
row,
|
|
12
|
-
item,
|
|
13
12
|
metadata
|
|
14
13
|
} = params;
|
|
15
14
|
if (!eventFlow) {
|
|
@@ -50,7 +49,7 @@ function createEventFlowHandler(options = {}) {
|
|
|
50
49
|
components = {},
|
|
51
50
|
metadata = {}
|
|
52
51
|
} = options;
|
|
53
|
-
return async function handleEvent(row,
|
|
52
|
+
return async function handleEvent(row, item2, eventConfig) {
|
|
54
53
|
if (eventConfig && eventConfig.eventFlow) {
|
|
55
54
|
return await executeEventFlow({
|
|
56
55
|
eventFlow: eventConfig.eventFlow,
|
|
@@ -61,13 +60,12 @@ function createEventFlowHandler(options = {}) {
|
|
|
61
60
|
onSuccess,
|
|
62
61
|
onError,
|
|
63
62
|
row,
|
|
64
|
-
item
|
|
65
|
-
metadata
|
|
63
|
+
metadata: { ...metadata, item: item2 }
|
|
66
64
|
});
|
|
67
65
|
}
|
|
68
66
|
};
|
|
69
67
|
}
|
|
70
|
-
function getEventHandlers(
|
|
68
|
+
function getEventHandlers(item2, row, eventHandler, eventConfigs) {
|
|
71
69
|
const handlers = {};
|
|
72
70
|
if (!eventConfigs) {
|
|
73
71
|
return handlers;
|
|
@@ -75,7 +73,7 @@ function getEventHandlers(item, row, eventHandler, eventConfigs) {
|
|
|
75
73
|
eventConfigs.forEach((eventConfig) => {
|
|
76
74
|
if (!eventConfig.name) return;
|
|
77
75
|
const eventName = eventConfig.name.toLowerCase();
|
|
78
|
-
handlers[eventName] = () => eventHandler(row,
|
|
76
|
+
handlers[eventName] = () => eventHandler(row, item2, eventConfig);
|
|
79
77
|
});
|
|
80
78
|
return handlers;
|
|
81
79
|
}
|
|
@@ -83,7 +81,7 @@ function useEventFlow(options = {}) {
|
|
|
83
81
|
const handleEvent = createEventFlowHandler(options);
|
|
84
82
|
return {
|
|
85
83
|
handleEvent,
|
|
86
|
-
getEventHandlers: (
|
|
84
|
+
getEventHandlers: (item2, row, eventConfig) => getEventHandlers(item2, row, handleEvent, eventConfig)
|
|
87
85
|
};
|
|
88
86
|
}
|
|
89
87
|
export {
|