@fecp/designer 5.6.11 → 5.6.14

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 (29) hide show
  1. package/es/designer/package.json.mjs +1 -1
  2. package/es/designer/src/layout/index.vue.mjs +44 -38
  3. package/es/designer/src/packages/dialog/useDialogDialog.mjs +1 -1
  4. package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
  5. package/es/designer/src/packages/dialogGlobal/index.vue2.mjs +1 -0
  6. package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
  7. package/es/designer/src/packages/form/property/widgets.vue.mjs +2 -2
  8. package/es/designer/src/packages/importantDataChange/index.vue.mjs +1 -1
  9. package/es/designer.css +90 -87
  10. package/es/packages/mobile/src/index.vue.mjs +3 -3
  11. package/es/packages/vue/src/components/bus/approvalHistory/timeLine.vue.mjs +1 -1
  12. package/es/packages/vue/src/components/bus/flowChart/bpmnjs/component/timeline.vue.mjs +2 -2
  13. package/es/packages/vue/src/components/forms/form/Form.vue.mjs +15 -3
  14. package/es/packages/vue/src/utils/importantDataChange.mjs +0 -1
  15. package/lib/designer/package.json.js +1 -1
  16. package/lib/designer/src/layout/index.vue.js +61 -55
  17. package/lib/designer/src/packages/dialog/useDialogDialog.js +1 -1
  18. package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
  19. package/lib/designer/src/packages/dialogGlobal/index.vue2.js +1 -0
  20. package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
  21. package/lib/designer/src/packages/form/property/widgets.vue.js +2 -2
  22. package/lib/designer/src/packages/importantDataChange/index.vue.js +1 -1
  23. package/lib/designer.css +90 -87
  24. package/lib/packages/mobile/src/index.vue.js +3 -3
  25. package/lib/packages/vue/src/components/bus/approvalHistory/timeLine.vue.js +1 -1
  26. package/lib/packages/vue/src/components/bus/flowChart/bpmnjs/component/timeline.vue.js +2 -2
  27. package/lib/packages/vue/src/components/forms/form/Form.vue.js +14 -2
  28. package/lib/packages/vue/src/utils/importantDataChange.js +0 -1
  29. package/package.json +1 -1
@@ -144,12 +144,12 @@ const _sfc_main = {
144
144
  pageParams.value = JSON.parse(routeParams);
145
145
  }
146
146
  emitter.on("loadPage", ({ pageId, params }) => {
147
- loadPage(pageId);
148
147
  pageParams.value = params;
148
+ loadPage(pageId);
149
149
  });
150
150
  emitter.on("replaceLoadPage", ({ pageId, params }) => {
151
- loadPage(pageId, true);
152
151
  pageParams.value = params;
152
+ loadPage(pageId, true);
153
153
  });
154
154
  emitter.on("refreshPage", () => {
155
155
  refreshCurrentPage();
@@ -255,7 +255,7 @@ const _sfc_main = {
255
255
  };
256
256
  }
257
257
  };
258
- const MobileApp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3f56bbe1"]]);
258
+ const MobileApp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-32479e3c"]]);
259
259
  export {
260
260
  MobileApp as default
261
261
  };
@@ -26,7 +26,7 @@ const _hoisted_4 = {
26
26
  class: "appContent"
27
27
  };
28
28
  const _hoisted_5 = { class: "openTask" };
29
- const _hoisted_6 = { style: { "font-weight": "bold" } };
29
+ const _hoisted_6 = { style: { "font-weight": "bold", "flex": "1", "display": "flex", "width": "0", "margin-right": "12px" } };
30
30
  const _hoisted_7 = {
31
31
  key: 0,
32
32
  class: "appAssignee"
@@ -20,7 +20,7 @@ const _hoisted_5 = {
20
20
  class: "appContent"
21
21
  };
22
22
  const _hoisted_6 = { class: "openTask" };
23
- const _hoisted_7 = { style: { "font-weight": "bold" } };
23
+ const _hoisted_7 = { style: { "font-weight": "bold", "flex": "1", "display": "flex", "width": "0", "margin-right": "12px" } };
24
24
  const _hoisted_8 = {
25
25
  key: 0,
26
26
  class: "appAssignee"
@@ -251,7 +251,7 @@ const _sfc_main = {
251
251
  };
252
252
  }
253
253
  };
254
- const timeline = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4d562e1e"]]);
254
+ const timeline = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ce9dc48a"]]);
255
255
  export {
256
256
  timeline as default
257
257
  };
@@ -7,7 +7,7 @@ import "../../../../../../node_modules/element-plus/es/index.mjs";
7
7
  /* empty css */
8
8
  /* empty css */
9
9
  /* empty css */
10
- import { getCurrentInstance, ref, watch, onMounted, onBeforeUnmount, computed, provide, resolveDirective, withDirectives, createCommentVNode, createBlock, openBlock, normalizeClass, withCtx, createVNode, normalizeStyle, unref, createElementBlock, Fragment, renderList } from "vue";
10
+ import { getCurrentInstance, ref, watch, onMounted, onBeforeUnmount, computed, nextTick, provide, resolveDirective, withDirectives, createCommentVNode, createBlock, openBlock, normalizeClass, withCtx, createVNode, normalizeStyle, unref, createElementBlock, Fragment, renderList } from "vue";
11
11
  import "../../../../../../node_modules/grid-layout-plus/es/index.mjs";
12
12
  import { getCurrentVueInstance } from "../../../utils/getInstance.mjs";
13
13
  import getJsonAsyncUtil from "../../../utils/getJsonAsyncUtil.mjs";
@@ -161,9 +161,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
161
161
  }
162
162
  }
163
163
  );
164
+ let isSyncingToParent = false;
164
165
  watch(
165
166
  () => props.modelValue,
166
167
  (newVal, oldVal) => {
168
+ if (isSyncingToParent) return;
167
169
  if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
168
170
  loadFormData("change");
169
171
  }
@@ -929,8 +931,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
929
931
  }
930
932
  return result;
931
933
  };
934
+ let isApplyingLinkage = false;
932
935
  const applyLinkageEffectsForChangedFields = (changedFieldNames) => {
933
936
  var _a;
937
+ if (isApplyingLinkage) return;
938
+ isApplyingLinkage = true;
934
939
  const linkedConfig = localConfig.value.linkedConfig || {};
935
940
  const fields = [...fieldsData.value, ...hiddenFields.value];
936
941
  const relevantConfigs = filterRelevantLinkageConfigs(
@@ -953,7 +958,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
953
958
  value: formData.value,
954
959
  fieldsList: fields
955
960
  });
956
- formData.value[field.fieldName] = calcResult;
961
+ if (!isEqual(formData.value[field.fieldName], calcResult)) {
962
+ formData.value[field.fieldName] = calcResult;
963
+ }
957
964
  }
958
965
  });
959
966
  }
@@ -1069,6 +1076,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1069
1076
  const fieldsConfigArr = updatedLayoutData.filter((item) => !item.hidden);
1070
1077
  gridLayoutFieldsData.value = sortLayoutItems(fieldsConfigArr);
1071
1078
  (_a = gridLayout == null ? void 0 : gridLayout.value) == null ? void 0 : _a.resizeEvent();
1079
+ isApplyingLinkage = false;
1072
1080
  };
1073
1081
  function sortLayoutItems(arr) {
1074
1082
  return [...arr].sort((a, b) => {
@@ -1148,7 +1156,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1148
1156
  applyLinkageEffectsForChangedFields(changedFields);
1149
1157
  }
1150
1158
  prevFormData.value = { ...formData.value };
1159
+ isSyncingToParent = true;
1151
1160
  emit("update:modelValue", getFormData());
1161
+ nextTick(() => {
1162
+ isSyncingToParent = false;
1163
+ });
1152
1164
  },
1153
1165
  { deep: true }
1154
1166
  );
@@ -1318,7 +1330,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1318
1330
  };
1319
1331
  }
1320
1332
  });
1321
- const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5a2b92b9"]]);
1333
+ const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2a14b0ea"]]);
1322
1334
  export {
1323
1335
  _Form as default
1324
1336
  };
@@ -87,7 +87,6 @@ class ImportantDataChangeManager {
87
87
  }
88
88
  /**
89
89
  * 拉取所有配置组的变更日志
90
- * TODO: 替换 mock API 为真实后端接口
91
90
  */
92
91
  async fetchChanges() {
93
92
  const allRecords = [];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const version = "5.6.11";
3
+ const version = "5.6.14";
4
4
  const packageJson = {
5
5
  version
6
6
  };
@@ -11,21 +11,21 @@ require("../../../node_modules/element-plus/es/index.js");
11
11
  require("../../../node_modules/element-plus/theme-chalk/el-config-provider.css.js");
12
12
  const Vue = require("vue");
13
13
  const zhCn = require("../../../node_modules/element-plus/es/locale/lang/zh-cn.js");
14
- const index$7 = ;/* empty css */
15
- const index$6 = ;/* empty css */
16
- const index$8 = ;/* empty css */
17
- const index$3 = ;/* empty css */
18
- const index$2 = ;/* empty css */
19
- const index$1 = require("../store/index.js");
14
+ const index$5 = ;/* empty css */
15
+ const index$4 = ;/* empty css */
16
+ const index$6 = ;/* empty css */
17
+ const index$1 = ;/* empty css */
18
+ const index = ;/* empty css */
20
19
  const common = require("../packages/utils/common.js");
21
- const index = require("../api/index.js");
20
+ const index$8 = require("../api/index.js");
22
21
  const _default = require("../packages/table/default.js");
23
22
  const _default$1 = require("../packages/form/default.js");
23
+ const vuex_esmBundler = require("../../../node_modules/vuex/dist/vuex.esm-bundler.js");
24
24
  ;/* empty css */
25
25
  const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
26
- const index$4 = require("../../../node_modules/element-plus/es/components/config-provider/index.js");
27
- const index$5 = require("../../../node_modules/element-plus/es/components/container/index.js");
28
- const index$9 = require("../../../node_modules/element-plus/es/components/result/index.js");
26
+ const index$2 = require("../../../node_modules/element-plus/es/components/config-provider/index.js");
27
+ const index$3 = require("../../../node_modules/element-plus/es/components/container/index.js");
28
+ const index$7 = require("../../../node_modules/element-plus/es/components/result/index.js");
29
29
  const _hoisted_1 = {
30
30
  key: 1,
31
31
  class: "init-error-container"
@@ -33,52 +33,55 @@ const _hoisted_1 = {
33
33
  const _sfc_main = {
34
34
  __name: "index",
35
35
  setup(__props) {
36
+ const store = vuex_esmBundler.useStore();
36
37
  const currentInstance = Vue.getCurrentInstance();
37
38
  const ctx = currentInstance.proxy;
38
39
  const pkId = getUrlParam("pkId");
39
40
  const isInitd = Vue.ref(0);
40
41
  const compRef = Vue.ref(null);
41
- if (!pkId) {
42
- isInitd.value = -1;
43
- } else {
44
- index.default.login4dev(ctx.$http).then((data) => {
45
- index$1.default.commit("set_token", data.token);
46
- index$1.default.commit("set_refreshToken", data.refreshToken);
47
- index.default.getById(ctx.$http, pkId).then((data2) => {
48
- const templateName = data2.templateName;
49
- const templateKey = data2.templateKey;
50
- document.title = templateName || "表单设计器";
51
- if (data2.type == "table") {
52
- const tableOptions = Vue.ref({
53
- pkId,
54
- templateName,
55
- templateKey,
56
- ..._default.defaultTableConfig,
57
- ...JSON.parse(data2.context)
58
- });
59
- common.setEditConfigData(tableOptions.value);
60
- isInitd.value = 1;
61
- } else if (data2.type == "form") {
62
- const formOptions = Vue.ref({
63
- pkId,
64
- templateName,
65
- templateKey,
66
- ..._default$1.defaultFormConfig,
67
- ...JSON.parse(data2.context)
68
- });
69
- common.setEditConfigData(formOptions.value);
70
- isInitd.value = 1;
71
- }
72
- index$1.default.commit("set_editing_type", data2.type);
73
- });
74
- });
42
+ async function init() {
43
+ if (!pkId) {
44
+ isInitd.value = -1;
45
+ } else {
46
+ if (!store.getters.token) {
47
+ const resData = await index$8.default.login4dev(ctx.$http);
48
+ store.commit("set_token", resData.token);
49
+ store.commit("set_refreshToken", resData.refreshToken);
50
+ }
51
+ const data = await index$8.default.getById(ctx.$http, pkId);
52
+ const templateName = data.templateName;
53
+ const templateKey = data.templateKey;
54
+ document.title = templateName || "表单设计器";
55
+ if (data.type == "table") {
56
+ const tableOptions = Vue.ref({
57
+ pkId,
58
+ templateName,
59
+ templateKey,
60
+ ..._default.defaultTableConfig,
61
+ ...JSON.parse(data.context)
62
+ });
63
+ common.setEditConfigData(tableOptions.value);
64
+ isInitd.value = 1;
65
+ } else if (data.type == "form") {
66
+ const formOptions = Vue.ref({
67
+ pkId,
68
+ templateName,
69
+ templateKey,
70
+ ..._default$1.defaultFormConfig,
71
+ ...JSON.parse(data.context)
72
+ });
73
+ common.setEditConfigData(formOptions.value);
74
+ isInitd.value = 1;
75
+ }
76
+ store.commit("set_editing_type", data.type);
77
+ }
75
78
  }
76
79
  const editingArea = Vue.computed(() => {
77
- switch (index$1.default.getters.editingType) {
80
+ switch (store.getters.editingType) {
78
81
  case "table":
79
- return index$3.default;
82
+ return index$1.default;
80
83
  case "form":
81
- return index$2.default;
84
+ return index.default;
82
85
  }
83
86
  return null;
84
87
  });
@@ -97,11 +100,14 @@ const _sfc_main = {
97
100
  if (values.length === 0) return null;
98
101
  return values.length === 1 ? values[0] : values;
99
102
  }
103
+ Vue.onMounted(() => {
104
+ init();
105
+ });
100
106
  return (_ctx, _cache) => {
101
- const _component_el_config_provider = index$4.ElConfigProvider;
102
- const _component_el_main = index$5.ElMain;
103
- const _component_el_container = index$5.ElContainer;
104
- const _component_el_result = index$9.ElResult;
107
+ const _component_el_config_provider = index$2.ElConfigProvider;
108
+ const _component_el_main = index$3.ElMain;
109
+ const _component_el_container = index$3.ElContainer;
110
+ const _component_el_result = index$7.ElResult;
105
111
  return Vue.openBlock(), Vue.createBlock(_component_el_config_provider, { locale: Vue.unref(zhCn.default) }, {
106
112
  default: Vue.withCtx(() => [
107
113
  isInitd.value == 1 ? (Vue.openBlock(), Vue.createBlock(_component_el_container, {
@@ -109,10 +115,10 @@ const _sfc_main = {
109
115
  class: "fec-designer-container"
110
116
  }, {
111
117
  default: Vue.withCtx(() => [
112
- Vue.createVNode(Vue.unref(index$6.default)),
118
+ Vue.createVNode(Vue.unref(index$4.default)),
113
119
  Vue.createVNode(_component_el_container, { class: "inner-container" }, {
114
120
  default: Vue.withCtx(() => [
115
- Vue.createVNode(Vue.unref(index$7.default), { onOnFormDragMove: onFormDragMove }),
121
+ Vue.createVNode(Vue.unref(index$5.default), { onOnFormDragMove: onFormDragMove }),
116
122
  Vue.createVNode(_component_el_main, { class: "root-main" }, {
117
123
  default: Vue.withCtx(() => [
118
124
  Vue.createVNode(_component_el_config_provider, { locale: Vue.unref(zhCn.default) }, {
@@ -127,7 +133,7 @@ const _sfc_main = {
127
133
  ]),
128
134
  _: 1
129
135
  }),
130
- Vue.createVNode(Vue.unref(index$8.default))
136
+ Vue.createVNode(Vue.unref(index$6.default))
131
137
  ]),
132
138
  _: 1
133
139
  })
@@ -146,5 +152,5 @@ const _sfc_main = {
146
152
  };
147
153
  }
148
154
  };
149
- const layout = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-ae1b4337"]]);
155
+ const layout = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-10018284"]]);
150
156
  exports.default = layout;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index.vue.js");
3
+ const index = require("./index.vue2.js");
4
4
  const Vue = require("vue");
5
5
  function useDialogDialog() {
6
6
  const dialogDialogVisible = Vue.ref(false);
@@ -87,7 +87,7 @@ const widgets = require("../table/property/widgets.vue.js");
87
87
  require("../../../../node_modules/element-plus/theme-chalk/el-tab-pane.css.js");
88
88
  ;/* empty css */
89
89
  ;/* empty css */
90
- ;/* empty css */
90
+ ;/* empty css */
91
91
  ;/* empty css */
92
92
  ;/* empty css */
93
93
  ;/* empty css */
@@ -76,6 +76,7 @@ const widgets = require("../table/property/widgets.vue.js");
76
76
  ;/* empty css */
77
77
  ;/* empty css */
78
78
  ;/* empty css */
79
+ ;/* empty css */
79
80
  ;/* empty css */
80
81
  ;/* empty css */
81
82
  ;/* empty css */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index.vue.js");
3
+ const index = require("./index.vue2.js");
4
4
  const Vue = require("vue");
5
5
  function useDialogGlobalDialog() {
6
6
  const dialogGlobalDialogVisible = Vue.ref(false);
@@ -54,8 +54,8 @@ const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_exp
54
54
  require("../../../components/TemplateSelector.vue.js");
55
55
  require("../../table/default.js");
56
56
  ;/* empty css */
57
- ;/* empty css */
58
- ;/* empty css */
57
+ ;/* empty css */
58
+ ;/* empty css */
59
59
  require("../../../store/index.js");
60
60
  ;/* empty css */
61
61
  const index$2 = require("../../../../../node_modules/element-plus/es/components/collapse/index.js");
@@ -180,5 +180,5 @@ const _sfc_main = {
180
180
  };
181
181
  }
182
182
  };
183
- const ImportantDataChangeDialog = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-e3b38158"]]);
183
+ const ImportantDataChangeDialog = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-ed2c5a64"]]);
184
184
  exports.default = ImportantDataChangeDialog;