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