@fecp/designer 5.5.69 → 5.5.70

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 (43) 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/form/property/widgets.vue.mjs +1 -5
  13. package/es/designer/src/packages/prod/index.vue.mjs +1 -1
  14. package/es/designer/src/packages/table/headerBtn.vue.mjs +1 -1
  15. package/es/designer.css +85 -97
  16. package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +32 -11
  17. package/es/packages/mobile/src/components/dataDisplay/menuGrid/MenuGrid.vue.mjs +1 -1
  18. package/es/packages/mobile/src/index.vue.mjs +29 -34
  19. package/es/packages/mobile/src/page.vue.mjs +39 -25
  20. package/es/packages/mobile/src/utils/pageHistory.mjs +17 -10
  21. package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +2 -2
  22. package/lib/designer/package.json.js +1 -1
  23. package/lib/designer/src/components/DocumentParam.vue.js +1 -1
  24. package/lib/designer/src/components/ParamsConfig.vue2.js +1 -1
  25. package/lib/designer/src/layout/aside/HiddenFieldDialog.vue.js +1 -1
  26. package/lib/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
  27. package/lib/designer/src/packages/dataLinkage/index.vue.js +1 -1
  28. package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
  29. package/lib/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.js +1 -1
  30. package/lib/designer/src/packages/form/property/approvalHistory.vue.js +1 -1
  31. package/lib/designer/src/packages/form/property/contract.vue.js +1 -1
  32. package/lib/designer/src/packages/form/property/subForm.vue.js +1 -1
  33. package/lib/designer/src/packages/form/property/widgets.vue.js +1 -5
  34. package/lib/designer/src/packages/prod/index.vue.js +1 -1
  35. package/lib/designer/src/packages/table/headerBtn.vue.js +1 -1
  36. package/lib/designer.css +85 -97
  37. package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +32 -11
  38. package/lib/packages/mobile/src/components/dataDisplay/menuGrid/MenuGrid.vue.js +1 -1
  39. package/lib/packages/mobile/src/index.vue.js +29 -34
  40. package/lib/packages/mobile/src/page.vue.js +38 -24
  41. package/lib/packages/mobile/src/utils/pageHistory.js +17 -10
  42. package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +2 -2
  43. package/package.json +1 -1
@@ -9,9 +9,17 @@ const VueRender = require("../../../utils/idea/VueRender.vue.js");
9
9
  ;/* empty css */
10
10
  const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
11
11
  const index = require("../../../../node_modules/vant/es/list/index.js");
12
- const _sfc_main = {
12
+ const _sfc_main = /* @__PURE__ */ Object.assign({
13
+ inheritAttrs: false
14
+ }, {
13
15
  __name: "CardList",
14
16
  props: {
17
+ compId: {
18
+ type: String
19
+ },
20
+ currentPage: {
21
+ type: Object
22
+ },
15
23
  modelValue: {
16
24
  type: Array,
17
25
  default: []
@@ -63,6 +71,10 @@ const _sfc_main = {
63
71
  quickFilter: {
64
72
  type: Array,
65
73
  default: []
74
+ },
75
+ autoHeight: {
76
+ type: Boolean,
77
+ default: false
66
78
  }
67
79
  },
68
80
  setup(__props) {
@@ -70,14 +82,23 @@ const _sfc_main = {
70
82
  const currentInstance = Vue.getCurrentInstance();
71
83
  const ctx = currentInstance.proxy;
72
84
  const listRef = Vue.ref();
73
- let isDesigner = false;
74
85
  Vue.onMounted(() => {
75
- var _a, _b;
76
- const device = (_b = (_a = listRef.value) == null ? void 0 : _a.$el) == null ? void 0 : _b.closest(".device-content");
77
- if (device) {
78
- isDesigner = true;
79
- }
86
+ var _a, _b, _c, _d, _e;
87
+ (_b = (_a = listRef.value) == null ? void 0 : _a.$el) == null ? void 0 : _b.closest(".device-content");
80
88
  initDataSourceManager();
89
+ if (props.compId) {
90
+ if (props.autoHeight) {
91
+ const component = (_c = props.currentPage.layoutData) == null ? void 0 : _c.find(
92
+ (f) => {
93
+ var _a2;
94
+ return ((_a2 = f.component) == null ? void 0 : _a2.id) == props.compId;
95
+ }
96
+ );
97
+ const wrapperDom = (_e = (_d = listRef.value) == null ? void 0 : _d.$el) == null ? void 0 : _e.closest(".grid-wrapper");
98
+ const wrapperHeight = wrapperDom.offsetHeight;
99
+ component.h = wrapperHeight / 10;
100
+ }
101
+ }
81
102
  });
82
103
  function eventHandler(funcName, rowData) {
83
104
  console.log("🚀 ~ eventHandler ~ funcName, rowData:", funcName, rowData);
@@ -106,7 +127,7 @@ const _sfc_main = {
106
127
  });
107
128
  dataSourceManager.value.on("error", (err) => {
108
129
  });
109
- if (dataSourceManager.value && isDesigner) {
130
+ if (dataSourceManager.value) {
110
131
  tableData.value = [];
111
132
  if (props.disabledLoad) {
112
133
  tableData.value = [];
@@ -119,7 +140,7 @@ const _sfc_main = {
119
140
  }
120
141
  }
121
142
  function onLoad() {
122
- if (dataSourceManager.value && isDesigner) {
143
+ if (dataSourceManager.value) {
123
144
  loading.value = true;
124
145
  pageNo++;
125
146
  call();
@@ -199,6 +220,6 @@ const _sfc_main = {
199
220
  ], 64);
200
221
  };
201
222
  }
202
- };
203
- const _CardList = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-77da18e2"]]);
223
+ });
224
+ const _CardList = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-20941c4a"]]);
204
225
  exports.default = _CardList;
@@ -119,5 +119,5 @@ const _sfc_main = {
119
119
  };
120
120
  }
121
121
  };
122
- const _MenuGrid = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-bde7e748"]]);
122
+ const _MenuGrid = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-cf276af8"]]);
123
123
  exports.default = _MenuGrid;
@@ -34,7 +34,6 @@ const _sfc_main = {
34
34
  const currentInstance = Vue.getCurrentInstance();
35
35
  const ctx = currentInstance.proxy;
36
36
  const pageList = Vue.ref({});
37
- const layoutData = Vue.ref([]);
38
37
  const configLoading = Vue.ref(true);
39
38
  const loadConfig = async () => {
40
39
  var _a, _b;
@@ -49,9 +48,13 @@ const _sfc_main = {
49
48
  if (!homePage) {
50
49
  homePage = (_b = pageList.value) == null ? void 0 : _b[0];
51
50
  }
51
+ pageHistory.pageHistory.clear();
52
52
  console.log("🚀 ~ pageList ~ pageList.value:", pageList.value);
53
- loadPage(homePage);
54
- pageHistory.pageHistory.init(homePage);
53
+ let pageId = homePage.id;
54
+ if (homePage.footerType == "tabbar") {
55
+ pageId = homePage.tabbarConfig.tabbarOptions[0].pageId;
56
+ }
57
+ loadPage(pageId);
55
58
  } catch (error) {
56
59
  console.error("加载配置失败:", error);
57
60
  index$3.ElMessage.error("加载配置失败");
@@ -59,34 +62,8 @@ const _sfc_main = {
59
62
  configLoading.value = false;
60
63
  }
61
64
  };
62
- const currentPage = Vue.ref({});
63
- function loadPage(page2) {
64
- currentPage.value = { ...page2 };
65
- layoutData.value = [...page2.layoutData].sort((a, b) => {
66
- if (a.y !== b.y) {
67
- return a.y - b.y;
68
- }
69
- return a.x - b.x;
70
- });
71
- layoutData.value.forEach((item) => item.isResizable = false);
72
- }
73
- function findPageById(pageList2, pageId) {
74
- for (const item of pageList2) {
75
- if (item.id == pageId) {
76
- return item;
77
- }
78
- if (item.children && item.children.length > 0) {
79
- const found = findPageById(item.children, pageId);
80
- if (found) {
81
- found.parentPage = item;
82
- return found;
83
- }
84
- }
85
- }
86
- return null;
87
- }
88
- const routePage = Vue.ref(null);
89
- eventBus.default.on("loadPage", (pageId) => {
65
+ const currentPage = Vue.ref(null);
66
+ function loadPage(pageId) {
90
67
  var _a;
91
68
  if (((_a = currentPage.value) == null ? void 0 : _a.id) == pageId) {
92
69
  return;
@@ -105,6 +82,24 @@ const _sfc_main = {
105
82
  currentPage.value = null;
106
83
  routePage.value = null;
107
84
  }
85
+ }
86
+ function findPageById(pageList2, pageId) {
87
+ for (const item of pageList2) {
88
+ if (item.id == pageId) {
89
+ return item;
90
+ }
91
+ if (item.children && item.children.length > 0) {
92
+ const found = findPageById(item.children, pageId);
93
+ if (found) {
94
+ return { ...found, parentPage: item };
95
+ }
96
+ }
97
+ }
98
+ return null;
99
+ }
100
+ const routePage = Vue.ref(null);
101
+ eventBus.default.on("loadPage", (pageId) => {
102
+ loadPage(pageId);
108
103
  });
109
104
  Vue.onMounted(() => {
110
105
  loadConfig();
@@ -121,9 +116,9 @@ const _sfc_main = {
121
116
  default: Vue.withCtx(() => [
122
117
  Vue.unref(currentPage) ? (Vue.openBlock(), Vue.createBlock(Vue.unref(page.default), {
123
118
  key: 0,
124
- currentPage: Vue.unref(currentPage),
119
+ parentPage: Vue.unref(currentPage),
125
120
  routePage: Vue.unref(routePage)
126
- }, null, 8, ["currentPage", "routePage"])) : (Vue.openBlock(), Vue.createBlock(_component_van_empty, {
121
+ }, null, 8, ["parentPage", "routePage"])) : (Vue.openBlock(), Vue.createBlock(_component_van_empty, {
127
122
  key: 1,
128
123
  image: "search",
129
124
  description: "页面找不到了"
@@ -134,5 +129,5 @@ const _sfc_main = {
134
129
  };
135
130
  }
136
131
  };
137
- const MobileApp = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-78e0cbef"]]);
132
+ const MobileApp = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-e580f40a"]]);
138
133
  exports.default = MobileApp;
@@ -3,6 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const Vue = require("vue");
4
4
  require("../../../node_modules/grid-layout-plus/es/index.js");
5
5
  const all = require("./components/all.js");
6
+ const pageHistory = require("./utils/pageHistory.js");
6
7
  ;/* empty css */
7
8
  const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
8
9
  const gridLayout_vue = require("../../../node_modules/grid-layout-plus/es/components/grid-layout.vue.js");
@@ -13,7 +14,7 @@ const rowHeight = 10;
13
14
  const _sfc_main = {
14
15
  __name: "page",
15
16
  props: {
16
- currentPage: {
17
+ parentPage: {
17
18
  type: Object,
18
19
  required: true
19
20
  },
@@ -29,13 +30,13 @@ const _sfc_main = {
29
30
  }
30
31
  const layoutData = Vue.computed(() => {
31
32
  var _a;
32
- if (Array.isArray(props.currentPage.layoutData)) {
33
- return ((_a = props.currentPage.layoutData) == null ? void 0 : _a.map((item) => {
33
+ if (Array.isArray(props.parentPage.layoutData)) {
34
+ return ((_a = props.parentPage.layoutData) == null ? void 0 : _a.map((item) => {
34
35
  item.isResizable = false;
35
36
  return item;
36
37
  })) || [];
37
38
  }
38
- return props.currentPage.layoutData;
39
+ return props.parentPage.layoutData;
39
40
  });
40
41
  const tabbarActive = Vue.ref(0);
41
42
  const childPage = Vue.ref(null);
@@ -43,19 +44,30 @@ const _sfc_main = {
43
44
  if (!pageId) {
44
45
  return;
45
46
  }
46
- const page = props.currentPage.children.find((item) => item.id == pageId);
47
+ const page = props.parentPage.children.find((item) => item.id == pageId);
47
48
  if (!page) ;
48
49
  else {
49
50
  childPage.value = page;
51
+ pageHistory.pageHistory.replace(page);
50
52
  }
51
53
  console.log("🚀 ~ onTabbarChange ~ page:", page);
52
54
  }
53
- Vue.onMounted(() => {
54
- if (props.currentPage.footerType == "tabbar") {
55
- tabbarActive.value = props.currentPage.tabbarConfig.tabbarOptions[0].pageId;
56
- onTabbarChange(tabbarActive.value);
57
- }
55
+ const currentPage = Vue.computed(() => {
56
+ return childPage.value || props.parentPage || {};
58
57
  });
58
+ Vue.watch(
59
+ [() => props.parentPage, () => props.routePage],
60
+ () => {
61
+ var _a;
62
+ childPage.value = props.routePage;
63
+ if (props.parentPage.footerType == "tabbar") {
64
+ tabbarActive.value = ((_a = props.routePage) == null ? void 0 : _a.id) || props.parentPage.tabbarConfig.tabbarOptions[0].pageId;
65
+ }
66
+ },
67
+ {
68
+ immediate: true
69
+ }
70
+ );
59
71
  return (_ctx, _cache) => {
60
72
  const _component_FecMobileNavBar = Vue.resolveComponent("FecMobileNavBar");
61
73
  const _component_page = Vue.resolveComponent("page", true);
@@ -65,19 +77,19 @@ const _sfc_main = {
65
77
  const _component_FecMobileTabbar = Vue.resolveComponent("FecMobileTabbar");
66
78
  const _component_FecMobileActionBar = Vue.resolveComponent("FecMobileActionBar");
67
79
  return Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, null, [
68
- __props.currentPage.isNavBar ? (Vue.openBlock(), Vue.createBlock(_component_FecMobileNavBar, Vue.normalizeProps(Vue.mergeProps({ key: 0 }, __props.currentPage.navBarConfig)), null, 16)) : Vue.createCommentVNode("", true),
80
+ __props.parentPage.isNavBar ? (Vue.openBlock(), Vue.createBlock(_component_FecMobileNavBar, Vue.normalizeProps(Vue.mergeProps({ key: 0 }, __props.parentPage.navBarConfig)), null, 16)) : Vue.createCommentVNode("", true),
69
81
  Vue.createElementVNode("div", _hoisted_1, [
70
- __props.currentPage.footerType == "tabbar" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 0 }, [
71
- __props.routePage || Vue.unref(childPage) ? (Vue.openBlock(), Vue.createBlock(_component_page, {
82
+ __props.parentPage.footerType == "tabbar" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 0 }, [
83
+ Vue.unref(childPage) ? (Vue.openBlock(), Vue.createBlock(_component_page, {
72
84
  key: 0,
73
- currentPage: __props.routePage || Vue.unref(childPage)
74
- }, null, 8, ["currentPage"])) : Vue.createCommentVNode("", true)
85
+ parentPage: Vue.unref(childPage)
86
+ }, null, 8, ["parentPage"])) : Vue.createCommentVNode("", true)
75
87
  ], 64)) : (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 1 }, [
76
- __props.currentPage.type == "home" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 0 }, [
77
- Vue.createVNode(_component_FecMobileMenuGrid, Vue.normalizeProps(Vue.guardReactiveProps(__props.currentPage.layoutData.menuGridProps)), null, 16),
88
+ __props.parentPage.type == "home" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 0 }, [
89
+ Vue.createVNode(_component_FecMobileMenuGrid, Vue.normalizeProps(Vue.guardReactiveProps(__props.parentPage.layoutData.menuGridProps)), null, 16),
78
90
  Vue.createVNode(_component_FecMobileNoticeBar),
79
91
  Vue.createVNode(_component_FecMobileDataStat)
80
- ], 64)) : __props.currentPage.type == "approval" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 1 }, [], 64)) : (Vue.openBlock(), Vue.createBlock(Vue.unref(gridLayout_vue.default), {
92
+ ], 64)) : __props.parentPage.type == "approval" ? (Vue.openBlock(), Vue.createElementBlock(Vue.Fragment, { key: 1 }, [], 64)) : (Vue.openBlock(), Vue.createBlock(Vue.unref(gridLayout_vue.default), {
81
93
  key: 2,
82
94
  ref: "gridLayout",
83
95
  layout: Vue.unref(layoutData),
@@ -95,23 +107,25 @@ const _sfc_main = {
95
107
  (Vue.openBlock(), Vue.createBlock(Vue.resolveDynamicComponent(getComp(component.fieldType)), Vue.mergeProps(component.props, {
96
108
  modelValue: Vue.unref(formData)[component.props.fieldName],
97
109
  "onUpdate:modelValue": ($event) => Vue.unref(formData)[component.props.fieldName] = $event,
98
- dataSources: _ctx.dataSources
99
- }), null, 16, ["modelValue", "onUpdate:modelValue", "dataSources"]))
110
+ dataSources: Vue.unref(currentPage).dataSources,
111
+ compId: component.id,
112
+ currentPage: Vue.unref(currentPage)
113
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "dataSources", "compId", "currentPage"]))
100
114
  ])
101
115
  ]),
102
116
  _: 1
103
117
  }, 8, ["layout"]))
104
118
  ], 64))
105
119
  ]),
106
- __props.currentPage.footerType == "tabbar" ? (Vue.openBlock(), Vue.createBlock(_component_FecMobileTabbar, Vue.mergeProps({
120
+ __props.parentPage.footerType == "tabbar" ? (Vue.openBlock(), Vue.createBlock(_component_FecMobileTabbar, Vue.mergeProps({
107
121
  key: 1,
108
122
  modelValue: Vue.unref(tabbarActive),
109
123
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => Vue.isRef(tabbarActive) ? tabbarActive.value = $event : null)
110
- }, __props.currentPage.tabbarConfig, { onChange: onTabbarChange }), null, 16, ["modelValue"])) : Vue.createCommentVNode("", true),
111
- __props.currentPage.footerType == "actionBar" ? (Vue.openBlock(), Vue.createBlock(_component_FecMobileActionBar, Vue.normalizeProps(Vue.mergeProps({ key: 2 }, __props.currentPage.actionBarConfig)), null, 16)) : Vue.createCommentVNode("", true)
124
+ }, __props.parentPage.tabbarConfig, { onChange: onTabbarChange }), null, 16, ["modelValue"])) : Vue.createCommentVNode("", true),
125
+ __props.parentPage.footerType == "actionBar" ? (Vue.openBlock(), Vue.createBlock(_component_FecMobileActionBar, Vue.normalizeProps(Vue.mergeProps({ key: 2 }, __props.parentPage.actionBarConfig)), null, 16)) : Vue.createCommentVNode("", true)
112
126
  ], 64);
113
127
  };
114
128
  }
115
129
  };
116
- const MobilePage = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-08632dac"]]);
130
+ const MobilePage = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-71059c96"]]);
117
131
  exports.default = MobilePage;
@@ -51,6 +51,23 @@ class PageHistory {
51
51
  }
52
52
  this.saveHistory();
53
53
  }
54
+ replace(page) {
55
+ if (!page || !page.id) {
56
+ console.warn("页面配置无效,无法替换");
57
+ return;
58
+ }
59
+ if (this.history.length === 0) {
60
+ this.push(page);
61
+ return;
62
+ }
63
+ this.history[this.history.length - 1] = {
64
+ id: page.id,
65
+ name: page.name || "",
66
+ timestamp: Date.now(),
67
+ data: page
68
+ };
69
+ this.saveHistory();
70
+ }
54
71
  /**
55
72
  * 后退到上一个页面
56
73
  * @returns {Object|null} 返回上一个页面的配置,如果无法后退则返回 null
@@ -95,16 +112,6 @@ class PageHistory {
95
112
  this.history = [];
96
113
  this.saveHistory();
97
114
  }
98
- /**
99
- * 初始化或重置历史记录(仅包含首页)
100
- * @param {Object} homePage - 首页配置
101
- */
102
- init(homePage) {
103
- this.clear();
104
- if (homePage) {
105
- this.push(homePage);
106
- }
107
- }
108
115
  }
109
116
  const pageHistory = new PageHistory();
110
117
  exports.default = pageHistory;
@@ -183,7 +183,7 @@ async function handleApiCall(node, data, fields, context, params) {
183
183
  success: false,
184
184
  message: error.message || "API调用失败",
185
185
  error,
186
- shouldShowError: true
186
+ shouldShowError: false
187
187
  // API 调用失败需要提示错误
188
188
  };
189
189
  } finally {
@@ -777,7 +777,7 @@ async function handleUpload(node, data, fields, context) {
777
777
  return {
778
778
  success: false,
779
779
  message: "上传失败",
780
- shouldShowError: true
780
+ shouldShowError: false
781
781
  };
782
782
  }
783
783
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/designer",
3
- "version": "5.5.69",
3
+ "version": "5.5.70",
4
4
  "main": "lib/designer/index.js",
5
5
  "module": "es/designer/index.mjs",
6
6
  "files": [