@fecp/designer 5.5.101 → 5.5.102

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 (87) hide show
  1. package/es/designer/package.json.mjs +1 -1
  2. package/es/designer/src/components/DocumentParam.vue.mjs +1 -1
  3. package/es/designer/src/components/ParamsConfig.vue2.mjs +1 -1
  4. package/es/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +1 -1
  5. package/es/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +1 -1
  6. package/es/designer/src/packages/dataLinkage/index.vue.mjs +1 -1
  7. package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
  8. package/es/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.mjs +1 -1
  9. package/es/designer/src/packages/form/property/approvalHistory.vue.mjs +1 -1
  10. package/es/designer/src/packages/form/property/contract.vue.mjs +1 -1
  11. package/es/designer/src/packages/form/property/subForm.vue.mjs +1 -1
  12. package/es/designer/src/packages/prod/index.vue.mjs +1 -1
  13. package/es/designer/src/packages/table/headerBtn.vue.mjs +1 -1
  14. package/es/designer.css +357 -68
  15. package/es/packages/mobile/index.mjs +4 -0
  16. package/es/packages/mobile/src/components/all.mjs +4 -0
  17. package/es/packages/mobile/src/components/custom/appDetail/AppDetail.vue.mjs +30 -7
  18. package/es/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.mjs +191 -0
  19. package/es/packages/mobile/src/components/custom/approvalBar/index.mjs +10 -0
  20. package/es/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.mjs +391 -0
  21. package/es/packages/mobile/src/components/custom/approvalList/index.mjs +10 -0
  22. package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +2 -18
  23. package/es/packages/mobile/src/components/dataDisplay/table/Table.vue.mjs +41 -9
  24. package/es/packages/mobile/src/components/form/field/Field.vue.mjs +38 -26
  25. package/es/packages/mobile/src/components/form/fieldArea/FieldArea.vue.mjs +4 -2
  26. package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs +1 -1
  27. package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs +1 -1
  28. package/es/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.mjs +1 -1
  29. package/es/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.mjs +1 -1
  30. package/es/packages/mobile/src/components/form/fieldIndustry/FieldIndustry.vue.mjs +38 -27
  31. package/es/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.mjs +58 -41
  32. package/es/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.mjs +1 -1
  33. package/es/packages/mobile/src/components/navigation/tabs/Tabs.vue.mjs +8 -3
  34. package/es/packages/mobile/src/composables/usePageEvents.mjs +80 -0
  35. package/es/packages/mobile/src/index.vue.mjs +8 -5
  36. package/es/packages/mobile/src/page.vue.mjs +150 -19
  37. package/es/packages/mobile/src/utils/datasource.mjs +12 -1
  38. package/es/packages/mobile/src/utils/eventFlow/actionHandlers.mjs +852 -0
  39. package/es/packages/mobile/src/utils/eventFlow/eventFlowHandler.mjs +94 -0
  40. package/es/packages/mobile/src/utils/eventFlowParser.mjs +396 -0
  41. package/es/packages/mobile/src/utils/formatterUtil.mjs +1 -0
  42. package/es/packages/mobile/src/utils/parseFilterConfig.mjs +98 -0
  43. package/es/packages/vue/src/components/table/Table.vue.mjs +11 -1
  44. package/lib/designer/package.json.js +1 -1
  45. package/lib/designer/src/components/DocumentParam.vue.js +1 -1
  46. package/lib/designer/src/components/ParamsConfig.vue2.js +1 -1
  47. package/lib/designer/src/layout/aside/HiddenFieldDialog.vue.js +1 -1
  48. package/lib/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
  49. package/lib/designer/src/packages/dataLinkage/index.vue.js +1 -1
  50. package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
  51. package/lib/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.js +1 -1
  52. package/lib/designer/src/packages/form/property/approvalHistory.vue.js +1 -1
  53. package/lib/designer/src/packages/form/property/contract.vue.js +1 -1
  54. package/lib/designer/src/packages/form/property/subForm.vue.js +1 -1
  55. package/lib/designer/src/packages/prod/index.vue.js +1 -1
  56. package/lib/designer/src/packages/table/headerBtn.vue.js +1 -1
  57. package/lib/designer.css +357 -68
  58. package/lib/packages/mobile/index.js +6 -2
  59. package/lib/packages/mobile/src/components/all.js +4 -0
  60. package/lib/packages/mobile/src/components/custom/appDetail/AppDetail.vue.js +29 -6
  61. package/lib/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.js +191 -0
  62. package/lib/packages/mobile/src/components/custom/approvalBar/index.js +10 -0
  63. package/lib/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.js +391 -0
  64. package/lib/packages/mobile/src/components/custom/approvalList/index.js +10 -0
  65. package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +2 -18
  66. package/lib/packages/mobile/src/components/dataDisplay/table/Table.vue.js +41 -9
  67. package/lib/packages/mobile/src/components/form/field/Field.vue.js +37 -25
  68. package/lib/packages/mobile/src/components/form/fieldArea/FieldArea.vue.js +4 -2
  69. package/lib/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.js +1 -1
  70. package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js +1 -1
  71. package/lib/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.js +1 -1
  72. package/lib/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.js +1 -1
  73. package/lib/packages/mobile/src/components/form/fieldIndustry/FieldIndustry.vue.js +37 -26
  74. package/lib/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.js +57 -40
  75. package/lib/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.js +1 -1
  76. package/lib/packages/mobile/src/components/navigation/tabs/Tabs.vue.js +8 -3
  77. package/lib/packages/mobile/src/composables/usePageEvents.js +80 -0
  78. package/lib/packages/mobile/src/index.vue.js +8 -5
  79. package/lib/packages/mobile/src/page.vue.js +149 -18
  80. package/lib/packages/mobile/src/utils/datasource.js +14 -3
  81. package/lib/packages/mobile/src/utils/eventFlow/actionHandlers.js +852 -0
  82. package/lib/packages/mobile/src/utils/eventFlow/eventFlowHandler.js +94 -0
  83. package/lib/packages/mobile/src/utils/eventFlowParser.js +396 -0
  84. package/lib/packages/mobile/src/utils/formatterUtil.js +1 -0
  85. package/lib/packages/mobile/src/utils/parseFilterConfig.js +98 -0
  86. package/lib/packages/vue/src/components/table/Table.vue.js +11 -1
  87. package/package.json +1 -1
@@ -1,7 +1,9 @@
1
- import { ref, computed, watch, resolveComponent, createElementBlock, openBlock, Fragment, createBlock, createCommentVNode, createElementVNode, normalizeProps, mergeProps, unref, createVNode, guardReactiveProps, isRef, withCtx, resolveDynamicComponent } from "vue";
1
+ import { ref, getCurrentInstance, computed, watch, onMounted, resolveComponent, createElementBlock, openBlock, Fragment, createBlock, createCommentVNode, createElementVNode, normalizeProps, mergeProps, unref, createVNode, guardReactiveProps, isRef, withCtx, resolveDynamicComponent, nextTick } from "vue";
2
2
  import "../../../node_modules/grid-layout-plus/es/index.mjs";
3
3
  import * as all from "./components/all.mjs";
4
4
  import { pageHistory } from "./utils/pageHistory.mjs";
5
+ import { usePageEvents } from "./composables/usePageEvents.mjs";
6
+ import hooks from "../node_modules/moment/dist/moment.mjs";
5
7
  /* empty css */
6
8
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
7
9
  import De from "../../../node_modules/grid-layout-plus/es/components/grid-layout.vue.mjs";
@@ -18,27 +20,35 @@ const _sfc_main = {
18
20
  },
19
21
  routePage: {
20
22
  type: Object
23
+ },
24
+ params: {
25
+ type: Object,
26
+ default: {}
21
27
  }
22
28
  },
23
- setup(__props) {
29
+ setup(__props, { expose: __expose }) {
30
+ var _a;
24
31
  const props = __props;
25
- const formData = ref({});
32
+ const configLoading = ref(true);
33
+ const instance = getCurrentInstance();
34
+ const ctx = instance.proxy;
35
+ const formData = ref(props.params);
26
36
  function getComp(type) {
27
37
  return all[type];
28
38
  }
39
+ const gridLayout = ref();
29
40
  const layoutData = computed(() => {
30
- var _a;
41
+ var _a2;
31
42
  if (Array.isArray(props.parentPage.layoutData)) {
32
- return ((_a = props.parentPage.layoutData) == null ? void 0 : _a.map((item) => {
33
- var _a2, _b;
43
+ return ((_a2 = props.parentPage.layoutData) == null ? void 0 : _a2.map((item) => {
44
+ var _a3, _b;
34
45
  item.isResizable = false;
35
- if ((_b = (_a2 = item.component) == null ? void 0 : _a2.props) == null ? void 0 : _b.autoHeight) {
46
+ if ((_b = (_a3 = item.component) == null ? void 0 : _a3.props) == null ? void 0 : _b.autoHeight) {
36
47
  item.class = "isAutoHeight";
37
48
  }
38
49
  return item;
39
50
  })) || [];
40
51
  }
41
- autoHeight;
42
52
  return props.parentPage.layoutData;
43
53
  });
44
54
  const tabbarActive = ref(0);
@@ -61,16 +71,135 @@ const _sfc_main = {
61
71
  watch(
62
72
  [() => props.parentPage, () => props.routePage],
63
73
  () => {
64
- var _a;
74
+ var _a2;
65
75
  childPage.value = props.routePage;
66
76
  if (props.parentPage.footerType == "tabbar") {
67
- tabbarActive.value = ((_a = props.routePage) == null ? void 0 : _a.id) || props.parentPage.tabbarConfig.tabbarOptions[0].pageId;
77
+ tabbarActive.value = ((_a2 = props.routePage) == null ? void 0 : _a2.id) || props.parentPage.tabbarConfig.tabbarOptions[0].pageId;
68
78
  }
69
79
  },
70
80
  {
71
81
  immediate: true
72
82
  }
73
83
  );
84
+ const fieldsData = ref([]);
85
+ const hiddenFields = ref(props.parentPage.hiddenFields || []);
86
+ if (Array.isArray(props.parentPage.layoutData)) {
87
+ fieldsData.value = ((_a = props.parentPage.layoutData) == null ? void 0 : _a.map((item) => {
88
+ var _a2;
89
+ return { id: item.component.id, ...(_a2 = item.component) == null ? void 0 : _a2.props };
90
+ })) || [];
91
+ }
92
+ const loadFormData = (state) => {
93
+ formData.value = props.params;
94
+ console.log("初始化赋值", formData.value);
95
+ };
96
+ onMounted(async () => {
97
+ loadFormData();
98
+ const pageEvents = usePageEvents(() => ({
99
+ pageEventConfig: props.parentPage.pageEventConfig,
100
+ fields: [...fieldsData.value, ...hiddenFields.value],
101
+ instance,
102
+ formData: formData.value,
103
+ localConfig: props.parentPage,
104
+ components: {
105
+ form: ctx
106
+ }
107
+ }));
108
+ if (pageEvents) {
109
+ pageEvents.handleBeforeUnmount();
110
+ pageEvents.handleUnmounted();
111
+ if (props.parentPage.pageEventConfig) {
112
+ const onCreatedEvent = props.parentPage.pageEventConfig.find(
113
+ (e) => e.name === "onCreated"
114
+ );
115
+ if (onCreatedEvent) {
116
+ console.log("🚀 页面 onCreated 事件触发");
117
+ try {
118
+ await pageEvents.executeEvent("onCreated");
119
+ } catch (error) {
120
+ }
121
+ }
122
+ }
123
+ }
124
+ configLoading.value = false;
125
+ });
126
+ const valueFormatMap = {
127
+ date: "YYYYMMDD",
128
+ week: "YYYYMMDD",
129
+ month: "YYYYMM",
130
+ year: "YYYY",
131
+ datetime: "YYYYMMDDHHmmss"
132
+ };
133
+ const formValueFormatMap = {
134
+ date: "YYYY/MM/DD",
135
+ week: "YYYY/MM/DD",
136
+ month: "YYYY/MM",
137
+ year: "YYYY",
138
+ datetime: "YYYY/MM/DD HH:mm:ss"
139
+ };
140
+ const setFormData = (data) => {
141
+ const processedData = { ...data };
142
+ const processField = (field) => {
143
+ const fieldName = field.fieldName;
144
+ const fieldType = field.fieldType;
145
+ if (!processedData.hasOwnProperty(fieldName)) {
146
+ return;
147
+ }
148
+ const value = processedData[fieldName];
149
+ if (fieldName && (fieldType === "checkbox" || fieldType === "multipleSelection" || fieldType === "cascader" || fieldType === "area" || fieldType === "industry")) {
150
+ let splitStr = "|";
151
+ if (fieldType === "cascader" || fieldType === "area" || fieldType === "industry") {
152
+ splitStr = ",";
153
+ }
154
+ if (typeof value === "string" && value.includes(splitStr)) {
155
+ processedData[fieldName] = value.split(splitStr);
156
+ } else if (typeof value === "string" && value !== "") {
157
+ processedData[fieldName] = [value];
158
+ } else if (value === "" || value === null || value === void 0) {
159
+ processedData[fieldName] = [];
160
+ }
161
+ processedData[fieldName] = processedData[fieldName].map((item) => {
162
+ if (item.indexOf(",") > -1) {
163
+ return item.split(",");
164
+ }
165
+ return item;
166
+ });
167
+ } else if (fieldName && fieldType === "date" && value) {
168
+ const valueFormat = valueFormatMap[field.dateType] || "YYYYMMDD";
169
+ const formValueFormat = formValueFormatMap[field.dateType] || "YYYY/MM/DD";
170
+ processedData[fieldName] = hooks(value, valueFormat).format(
171
+ formValueFormat
172
+ );
173
+ }
174
+ };
175
+ if (fieldsData.value) {
176
+ fieldsData.value.forEach((component) => {
177
+ processField(component);
178
+ });
179
+ }
180
+ if (hiddenFields.value && hiddenFields.value.length > 0) {
181
+ hiddenFields.value.forEach((field) => {
182
+ processField(field);
183
+ });
184
+ }
185
+ formData.value = { ...formData.value, ...processedData };
186
+ nextTick(() => {
187
+ var _a2;
188
+ layoutData.value.forEach((item) => {
189
+ const id = item.component.id;
190
+ const dom = document.getElementById(id);
191
+ const labelDom = dom == null ? void 0 : dom.querySelector(".van-field__label");
192
+ if (labelDom) {
193
+ let height = labelDom.offsetHeight + 20;
194
+ item.h = height / 10;
195
+ }
196
+ });
197
+ (_a2 = gridLayout.value) == null ? void 0 : _a2.resizeEvent();
198
+ });
199
+ };
200
+ __expose({
201
+ setFormData
202
+ });
74
203
  return (_ctx, _cache) => {
75
204
  const _component_FecMobileNavBar = resolveComponent("FecMobileNavBar");
76
205
  const _component_page = resolveComponent("page", true);
@@ -78,8 +207,8 @@ const _sfc_main = {
78
207
  const _component_FecMobileNoticeBar = resolveComponent("FecMobileNoticeBar");
79
208
  const _component_FecMobileDataStat = resolveComponent("FecMobileDataStat");
80
209
  const _component_FecMobileAppDetail = resolveComponent("FecMobileAppDetail");
81
- const _component_FecMobileActionBar = resolveComponent("FecMobileActionBar");
82
210
  const _component_FecMobileTabbar = resolveComponent("FecMobileTabbar");
211
+ const _component_FecMobileActionBar = resolveComponent("FecMobileActionBar");
83
212
  return openBlock(), createElementBlock(Fragment, null, [
84
213
  __props.parentPage.isNavBar ? (openBlock(), createBlock(_component_FecMobileNavBar, normalizeProps(mergeProps({ key: 0 }, __props.parentPage.navBarConfig)), null, 16)) : createCommentVNode("", true),
85
214
  createElementVNode("div", _hoisted_1, [
@@ -93,12 +222,13 @@ const _sfc_main = {
93
222
  createVNode(_component_FecMobileMenuGrid, normalizeProps(guardReactiveProps(__props.parentPage.layoutData.menuGridProps)), null, 16),
94
223
  createVNode(_component_FecMobileNoticeBar),
95
224
  createVNode(_component_FecMobileDataStat)
96
- ], 64)) : __props.parentPage.type == "approval" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
97
- createVNode(_component_FecMobileAppDetail, normalizeProps(guardReactiveProps(__props.parentPage.layoutData.appDetailProps)), null, 16),
98
- createVNode(_component_FecMobileActionBar, normalizeProps(guardReactiveProps(__props.parentPage.layoutData.actionBar)), null, 16)
99
- ], 64)) : (openBlock(), createBlock(unref(De), {
225
+ ], 64)) : __props.parentPage.type == "approval" ? (openBlock(), createBlock(_component_FecMobileAppDetail, mergeProps({ key: 1 }, __props.parentPage.layoutData.appDetailProps, {
226
+ actionBar: __props.parentPage.layoutData.actionBar,
227
+ params: __props.params
228
+ }), null, 16, ["actionBar", "params"])) : (openBlock(), createBlock(unref(De), {
100
229
  key: 2,
101
- ref: "gridLayout",
230
+ ref_key: "gridLayout",
231
+ ref: gridLayout,
102
232
  layout: unref(layoutData),
103
233
  "onUpdate:layout": _cache[0] || (_cache[0] = ($event) => isRef(layoutData) ? layoutData.value = $event : null),
104
234
  "row-height": rowHeight,
@@ -115,9 +245,10 @@ const _sfc_main = {
115
245
  modelValue: unref(formData)[component.props.fieldName],
116
246
  "onUpdate:modelValue": ($event) => unref(formData)[component.props.fieldName] = $event,
117
247
  dataSources: unref(currentPage).dataSources,
248
+ formData: unref(formData),
118
249
  compId: component.id,
119
- currentPage: unref(currentPage)
120
- }), null, 16, ["modelValue", "onUpdate:modelValue", "dataSources", "compId", "currentPage"]))
250
+ fields: [...unref(fieldsData), ...unref(hiddenFields)]
251
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "dataSources", "formData", "compId", "fields"]))
121
252
  ])
122
253
  ]),
123
254
  _: 1
@@ -134,7 +265,7 @@ const _sfc_main = {
134
265
  };
135
266
  }
136
267
  };
137
- const MobilePage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-afadefa2"]]);
268
+ const MobilePage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-726a6dad"]]);
138
269
  export {
139
270
  MobilePage as default
140
271
  };
@@ -2,8 +2,10 @@ import { reactive } from "vue";
2
2
  import { parseRouteParams } from "./parseRouteParams.mjs";
3
3
  import "../../../../node_modules/element-plus/es/index.mjs";
4
4
  /* empty css */
5
+ /* empty css */
5
6
  /* empty css */
6
7
  /* empty css */
8
+ import { ElLoading } from "../../../../node_modules/element-plus/es/components/loading/index.mjs";
7
9
  import { ElMessage } from "../../../../node_modules/element-plus/es/components/message/index.mjs";
8
10
  class DataSourceManager {
9
11
  constructor(options = {}) {
@@ -131,7 +133,16 @@ class DataSourceManager {
131
133
  this.loading = true;
132
134
  this.error = null;
133
135
  this.LoadingInstance.count++;
134
- if (this.LoadingInstance.count === 1) ;
136
+ if (this.LoadingInstance.count === 1) {
137
+ this.LoadingInstance.target = ElLoading.service({
138
+ fullscreen: true,
139
+ lock: true,
140
+ text: "拼命加载中",
141
+ // spinner: loadingSvg,
142
+ background: "rgba(0, 0, 0, 0)",
143
+ customClass: "h-loading"
144
+ });
145
+ }
135
146
  try {
136
147
  const params = this.buildRequestParams(extraParams);
137
148
  const requestConfig = this.getRequestConfig();