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