super-page-runtime 2.1.57 → 2.1.62

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 (49) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +17 -14
  2. package/dist/es/components/runtime/utils/events/event-util.d.ts +1 -0
  3. package/dist/es/components/runtime/utils/events/event-util.js +4 -0
  4. package/dist/es/components/runtime/utils/events/standard-event.js +105 -37
  5. package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -1
  6. package/dist/es/components/runtime/utils/events/validator-util.js +2 -2
  7. package/dist/es/components/runtime/utils/table-utils.d.ts +1 -0
  8. package/dist/es/components/runtime/utils/table-utils.js +36 -1
  9. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +12 -2
  10. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -1
  11. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +14 -2
  12. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +16 -2
  13. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +11 -1
  14. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +13 -2
  15. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +4 -2
  16. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +11 -1
  17. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +11 -1
  18. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +11 -1
  19. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +11 -1
  20. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +14 -2
  21. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +11 -1
  22. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +30 -10
  23. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +9 -1
  24. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +13 -30
  25. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -1
  26. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +29 -2
  27. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +24 -2
  28. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +31 -2
  29. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -2
  30. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +21 -2
  31. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +26 -2
  32. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +29 -2
  33. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +27 -2
  34. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +32 -5
  35. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +29 -2
  36. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
  37. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +26 -4
  38. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +31 -5
  39. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +22 -3
  40. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +27 -2
  41. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +18 -1
  42. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +29 -4
  43. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +25 -2
  44. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +29 -2
  45. package/dist/es/components/runtime/views/super-page.vue.js +3 -3
  46. package/dist/es/i18n/langs/cn.js +3 -1
  47. package/dist/es/i18n/langs/en.js +3 -1
  48. package/dist/es/style.css +1 -1
  49. package/package.json +2 -2
@@ -1,7 +1,8 @@
1
- import { defineComponent, ref, resolveComponent, openBlock, createBlock, unref, isRef, normalizeStyle, normalizeClass, withCtx, createElementBlock, Fragment, renderList, createElementVNode, createCommentVNode, createTextVNode, toDisplayString } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, resolveComponent, openBlock, createBlock, unref, isRef, normalizeStyle, normalizeClass, withCtx, createElementBlock, Fragment, renderList, createElementVNode, createCommentVNode, createTextVNode, toDisplayString } from "vue";
2
2
  import _sfc_main$1 from "../../object-render.vue.js";
3
3
  import "../../../../utils/global-refs.js";
4
4
  import { $t } from "../../../../utils/i18n-util.js";
5
+ import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
5
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
7
  __name: "collapse-runtime",
7
8
  props: {
@@ -20,6 +21,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
21
  const runtimeStyle = runtimeInfo.style;
21
22
  const runtimeClass = runtimeInfo.class;
22
23
  const headerStyle = runtimeInfo.headerStyle;
24
+ onMounted(() => {
25
+ nextTick(() => {
26
+ handleAfterInitEvent(null, props.pageContext, props.configure, {
27
+ componentRef: thisRef.value,
28
+ entity: props.pageContext.entity.data,
29
+ pageData: props.pageContext.entity.page
30
+ });
31
+ });
32
+ });
23
33
  return (_ctx, _cache) => {
24
34
  const _component_SuperIcon = resolveComponent("SuperIcon");
25
35
  const _component_el_collapse_item = resolveComponent("el-collapse-item");
@@ -1,6 +1,7 @@
1
- import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, normalizeStyle, unref, createElementBlock, Fragment, renderList, createCommentVNode, createVNode, normalizeClass } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, resolveComponent, openBlock, createBlock, withCtx, normalizeStyle, unref, createElementBlock, Fragment, renderList, createCommentVNode, createVNode, normalizeClass } from "vue";
2
2
  import _sfc_main$1 from "../../object-render.vue.js";
3
3
  import "../../../../utils/global-refs.js";
4
+ import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
4
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
6
  __name: "container-runtime",
6
7
  props: {
@@ -15,6 +16,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
16
  const rightStyle = runtimeInfo.rightStyle;
16
17
  const mainStyle = runtimeInfo.style;
17
18
  const mainClass = runtimeInfo.class;
19
+ onMounted(() => {
20
+ nextTick(() => {
21
+ handleAfterInitEvent(null, props.pageContext, props.configure, {
22
+ componentRef: thisRef.value,
23
+ entity: props.pageContext.entity.data,
24
+ pageData: props.pageContext.entity.page
25
+ });
26
+ });
27
+ });
18
28
  return (_ctx, _cache) => {
19
29
  const _component_el_aside = resolveComponent("el-aside");
20
30
  const _component_el_main = resolveComponent("el-main");
@@ -1,6 +1,7 @@
1
- import { defineComponent, ref, resolveComponent, openBlock, createBlock, normalizeStyle, unref, normalizeClass, withCtx, createElementBlock, Fragment, renderList, withDirectives, createVNode, vShow } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, resolveComponent, openBlock, createBlock, normalizeStyle, unref, normalizeClass, withCtx, createElementBlock, Fragment, renderList, withDirectives, createVNode, vShow } from "vue";
2
2
  import _sfc_main$1 from "../../object-render.vue.js";
3
3
  import { PageDimensions } from "../../../../utils/interfaces/page-design-types.js";
4
+ import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
4
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
6
  __name: "flex-runtime",
6
7
  props: {
@@ -32,6 +33,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
33
  }
33
34
  }
34
35
  }
36
+ onMounted(() => {
37
+ nextTick(() => {
38
+ handleAfterInitEvent(null, props.pageContext, props.configure, {
39
+ componentRef: thisRef.value,
40
+ entity: props.pageContext.entity.data,
41
+ pageData: props.pageContext.entity.page
42
+ });
43
+ });
44
+ });
35
45
  return (_ctx, _cache) => {
36
46
  const _component_el_col = resolveComponent("el-col");
37
47
  const _component_el_row = resolveComponent("el-row");
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, createVNode, unref, normalizeStyle, normalizeClass, withCtx, toDisplayString, createCommentVNode, Fragment, renderList, createBlock } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, resolveComponent, openBlock, createElementBlock, createVNode, unref, normalizeStyle, normalizeClass, withCtx, toDisplayString, createCommentVNode, Fragment, renderList, createBlock } from "vue";
2
2
  import _sfc_main$1 from "../../object-render.vue.js";
3
3
  import "../../../../utils/global-refs.js";
4
4
  import "agilebuilder-ui/src/utils/common-util";
@@ -6,6 +6,7 @@ import "agilebuilder-ui/src/utils/util";
6
6
  import "agilebuilder-ui/src/utils/request";
7
7
  import "dayjs";
8
8
  import "agilebuilder-ui/src/utils/calculator/calculator-util";
9
+ import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
9
10
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
11
  __name: "form-runtime",
11
12
  props: {
@@ -22,11 +23,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
23
  const runtimeStyle = ref(runtimeInfo.style ? runtimeInfo.style : {});
23
24
  const runtimeClass = runtimeInfo.class;
24
25
  const titleStyle = ref(runtimeInfo.titleStyle ? runtimeInfo.titleStyle : {});
26
+ const thisRef = ref(null);
27
+ onMounted(() => {
28
+ nextTick(() => {
29
+ handleAfterInitEvent(null, props.pageContext, props.configure, {
30
+ componentRef: thisRef.value,
31
+ entity: props.pageContext.entity.data,
32
+ pageData: props.pageContext.entity.page
33
+ });
34
+ });
35
+ });
25
36
  return (_ctx, _cache) => {
26
37
  const _component_el_form = resolveComponent("el-form");
27
38
  return openBlock(), createElementBlock("div", null, [
28
39
  createVNode(_component_el_form, {
29
- ref: "thisRef",
40
+ ref_key: "thisRef",
41
+ ref: thisRef,
30
42
  "label-width": unref(runtimeProps).labelWidth,
31
43
  "label-position": unref(runtimeProps).labelPosition,
32
44
  size: unref(runtimeProps).componentSize,
@@ -1,5 +1,6 @@
1
- import { defineComponent, ref, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle } from "vue";
2
2
  import "../../../../utils/global-refs.js";
3
+ import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
3
4
  const _hoisted_1 = ["src"];
4
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
6
  __name: "iframe-runtime",
@@ -15,6 +16,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
16
  const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
16
17
  const runtimeStyle = runtimeInfo.style;
17
18
  const runtimeClass = runtimeInfo.class;
19
+ onMounted(() => {
20
+ nextTick(() => {
21
+ handleAfterInitEvent(null, props.pageContext, props.configure, {
22
+ componentRef: thisRef.value,
23
+ entity: props.pageContext.entity.data,
24
+ pageData: props.pageContext.entity.page
25
+ });
26
+ });
27
+ });
18
28
  return (_ctx, _cache) => {
19
29
  return openBlock(), createElementBlock("iframe", {
20
30
  ref_key: "thisRef",
@@ -1,8 +1,8 @@
1
- import { defineComponent, ref, openBlock, createBlock, unref, normalizeStyle, normalizeClass, withCtx, createElementBlock, Fragment, renderList, createCommentVNode, createElementVNode, toDisplayString } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, openBlock, createBlock, unref, normalizeStyle, normalizeClass, withCtx, createElementBlock, Fragment, renderList, createElementVNode, createCommentVNode, toDisplayString } from "vue";
2
2
  import { ElTabs, ElTabPane } from "element-plus";
3
3
  import _sfc_main$1 from "../../object-render.vue.js";
4
4
  import { SuperIcon } from "agilebuilder-ui";
5
- import { handleEvent } from "../../../../utils/events/event-util.js";
5
+ import { handleAfterInitEvent, handleEvent } from "../../../../utils/events/event-util.js";
6
6
  import { $t } from "../../../../utils/i18n-util.js";
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "tabs-runtime",
@@ -52,6 +52,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
52
52
  };
53
53
  return handleEvent(paneName, props.pageContext, props.configure, "edit", params);
54
54
  }
55
+ onMounted(() => {
56
+ nextTick(() => {
57
+ let tabsDom = [];
58
+ props.configure.items.forEach((item) => {
59
+ if (item.code) {
60
+ tabsDom.push(document.querySelector("." + item.code));
61
+ }
62
+ });
63
+ handleAfterInitEvent(null, props.pageContext, props.configure, {
64
+ componentRef: thisRef.value,
65
+ tabsDom,
66
+ entity: props.pageContext.entity.data,
67
+ pageData: props.pageContext.entity.page
68
+ });
69
+ });
70
+ });
55
71
  return (_ctx, _cache) => {
56
72
  return openBlock(), createBlock(unref(ElTabs), {
57
73
  ref_key: "thisRef",
@@ -75,15 +91,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
75
91
  name: item.index
76
92
  }, {
77
93
  label: withCtx(() => [
78
- item.iconType && item.iconValue ? (openBlock(), createBlock(unref(SuperIcon), {
79
- key: 0,
80
- iconType: item.iconType,
81
- iconValue: item.iconValue,
82
- style: { "margin-right": "2px" }
83
- }, null, 8, ["iconType", "iconValue"])) : createCommentVNode("", true),
84
94
  createElementVNode("span", {
85
- style: normalizeStyle(unref(headerStyle))
86
- }, toDisplayString(unref($t)(item.label)), 5)
95
+ class: normalizeClass(item.code)
96
+ }, [
97
+ item.iconType && item.iconValue ? (openBlock(), createBlock(unref(SuperIcon), {
98
+ key: 0,
99
+ iconType: item.iconType,
100
+ iconValue: item.iconValue,
101
+ style: { "margin-right": "2px" }
102
+ }, null, 8, ["iconType", "iconValue"])) : createCommentVNode("", true),
103
+ createElementVNode("span", {
104
+ style: normalizeStyle(unref(headerStyle))
105
+ }, toDisplayString(unref($t)(item.label)), 5)
106
+ ], 2)
87
107
  ]),
88
108
  default: withCtx(() => [
89
109
  createElementVNode("div", null, [
@@ -1,6 +1,7 @@
1
- import { defineComponent, ref, onMounted, onUnmounted, openBlock, createElementBlock, createElementVNode, normalizeClass, unref, normalizeStyle, Fragment, renderList, createBlock } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, onUnmounted, openBlock, createElementBlock, createElementVNode, normalizeClass, unref, normalizeStyle, Fragment, renderList, createBlock } from "vue";
2
2
  import _sfc_main$1 from "../../object-render.vue.js";
3
3
  import "../../../../utils/global-refs.js";
4
+ import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
4
5
  const _hoisted_1 = { class: "amb-widget-tools-parent" };
5
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
7
  __name: "tools-runtime",
@@ -21,6 +22,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
22
  });
22
23
  resizeObserver2.observe(thisRef.value.parentNode);
23
24
  }
25
+ nextTick(() => {
26
+ handleAfterInitEvent(null, props.pageContext, props.configure, {
27
+ componentRef: thisRef.value,
28
+ entity: props.pageContext.entity.data,
29
+ pageData: props.pageContext.entity.page
30
+ });
31
+ });
24
32
  });
25
33
  onUnmounted(() => {
26
34
  });
@@ -1,11 +1,11 @@
1
1
  import { defineComponent, ref, onMounted, watch, onUnmounted, resolveComponent, openBlock, createElementBlock, createVNode, unref } from "vue";
2
- import { setTableEvents, canExecuteButton, doAfterClickEvent, getEventNameByType, doBeforeClickEvent, getHandleEvent, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick } from "../../../../utils/events/event-util.js";
2
+ import { setTableEvents, canExecuteButton, doAfterClickEvent, doBeforeClickEvent, getEventNameByType, getEventFuncByType, getHandleEvent, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick } from "../../../../utils/events/event-util.js";
3
3
  import { getBaseUrl, getListCode, getRealRestApiPath, isWorkflowPage, isVariableInvalidValue } from "../../../../utils/common-util.js";
4
4
  import { getAdditionalParamMap, getSaveFormRequestWithRow, standardEvents } from "../../../../utils/events/standard-event.js";
5
5
  import { isPromise } from "agilebuilder-ui/src/utils/common-util";
6
- import { popupToPage } from "../../../../utils/table-utils.js";
6
+ import { getOperationButtons, popupToPage } from "../../../../utils/table-utils.js";
7
7
  import eventBus from "../../../../utils/eventBus.js";
8
- import { getPermissionCodes, getDefaultValue } from "../../../../utils/page-init-util.js";
8
+ import { getDefaultValue } from "../../../../utils/page-init-util.js";
9
9
  import { decomposeVariable, getSizeConfig } from "../../../../utils/page-helper-util.js";
10
10
  import { getRowStyleUtil, getCellStyleUtil, getHeaderCellStyleUtil } from "../../chart/table/chart-table-util.js";
11
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -187,32 +187,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
187
187
  }
188
188
  }
189
189
  function setOperationButtons(options) {
190
- const showOperation = configure.props && configure.props.base ? configure.props.base.showOperation : false;
191
- const operationButtonSettings = configure.btnList;
192
- console.log("configure.btnList===", configure.btnList, "configure====", configure);
193
- if (showOperation && operationButtonSettings) {
194
- const operationButtons = [];
195
- operationButtonSettings.forEach((buttonConfigure) => {
196
- const myButtonSet = {};
197
- const myButtonProps = Object.assign({}, buttonConfigure.props.base);
198
- myButtonProps.elementType = "el-button";
199
- if (buttonConfigure.isPermission === void 0 || buttonConfigure.isPermission + "" === "true") {
200
- const functionCodes = getPermissionCodes(buttonConfigure, props.pageContext);
201
- if (functionCodes) {
202
- myButtonProps.permission = functionCodes;
203
- }
204
- }
205
- myButtonProps.label = myButtonProps.title;
206
- myButtonProps.sourceButton = { uuid: buttonConfigure.uuid };
207
- myButtonSet["props"] = myButtonProps;
208
- myButtonSet["onClick"] = getOperationButtonClickEvent(buttonConfigure);
209
- operationButtons.push(myButtonSet);
210
- });
211
- if (!options.operations) {
212
- options.operations = {};
213
- }
214
- options.operations.operation = operationButtons;
190
+ const operationButtons = [];
191
+ if (!options.operations) {
192
+ options.operations = {};
215
193
  }
194
+ getOperationButtons(pageContext, configure, operationButtons, getOperationButtonClickEvent);
195
+ options.operations.operation = operationButtons;
216
196
  }
217
197
  function setTreeSetting(options) {
218
198
  const dataOrigin = configure.props ? configure.props.dataOrigin : {};
@@ -284,6 +264,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
284
264
  });
285
265
  }
286
266
  function getOperationButtonClickEvent(buttonConfigure) {
267
+ if (!buttonConfigure) {
268
+ return;
269
+ }
287
270
  let onClick;
288
271
  const eventName = getEventNameByType(buttonConfigure.events, "click");
289
272
  if (eventName) {
@@ -298,8 +281,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
298
281
  onClick = deleteRow;
299
282
  }
300
283
  if (!onClick) {
301
- onClick = function() {
302
- };
284
+ const eventFunc = getEventFuncByType(pageContext, buttonConfigure.events, "click");
285
+ onClick = eventFunc;
303
286
  }
304
287
  } else {
305
288
  operationButtonObj.value[buttonConfigure.uuid] = buttonConfigure;
@@ -3,7 +3,7 @@ import { setTableEvents, gridSelectRecord, gridSelectAllRecords, gridSelectionCh
3
3
  import { setVariableValue, getVariableValue, getSizeConfig } from "../../../../utils/page-helper-util.js";
4
4
  import { getModelFields, getDefaultValue } from "../../../../utils/page-init-util.js";
5
5
  import eventBus from "../../../../utils/eventBus.js";
6
- import { popupToPage } from "../../../../utils/table-utils.js";
6
+ import { popupToPage, getOperationButtons } from "../../../../utils/table-utils.js";
7
7
  import { getListCode, getBaseUrl } from "../../../../utils/common-util.js";
8
8
  import { getAdditionalParamMap } from "../../../../utils/events/standard-event.js";
9
9
  import { getRowStyleUtil, getCellStyleUtil, getHeaderCellStyleUtil } from "../../chart/table/chart-table-util.js";
@@ -291,6 +291,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
291
291
  };
292
292
  operations.push(removeButton);
293
293
  }
294
+ getOperationButtons(pageContext, configure, operations);
294
295
  return operations;
295
296
  }
296
297
  initializationSubTable();
@@ -1,7 +1,7 @@
1
- import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, Fragment, renderList } from "vue";
1
+ import { defineComponent, computed, ref, onMounted, nextTick, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, Fragment, renderList } from "vue";
2
2
  import { getVariableValue, setVariableValue, getOptionDatasFromPage, monitorFieldChange, autoSetAfterSelect, queryOptionDatasources } from "../../../../utils/page-helper-util.js";
3
3
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
4
- import { handleFormEvent } from "../../../../utils/events/event-util.js";
4
+ import { handleFormEvent, handleAfterInitEvent } from "../../../../utils/events/event-util.js";
5
5
  import { $t } from "../../../../utils/i18n-util.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "checkbox-runtime",
@@ -81,6 +81,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
81
81
  function updateOptions(newOptions) {
82
82
  listOptions.value = newOptions ? newOptions : [];
83
83
  }
84
+ const formItemRef = ref(null);
85
+ const componentRef = ref(null);
86
+ const titleRef = ref(null);
87
+ onMounted(() => {
88
+ nextTick(() => {
89
+ const value = dynamicModelMethod.value;
90
+ handleAfterInitEvent(
91
+ value,
92
+ props.pageContext,
93
+ props.configure,
94
+ {
95
+ formItemRef: formItemRef.value,
96
+ componentRef: componentRef.value,
97
+ titleRef: titleRef.value,
98
+ value,
99
+ entity: props.pageContext.entity.data,
100
+ pageData: props.pageContext.entity.page
101
+ }
102
+ );
103
+ });
104
+ });
84
105
  __expose({
85
106
  updateOptions
86
107
  });
@@ -89,6 +110,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
89
110
  const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
90
111
  const _component_el_form_item = resolveComponent("el-form-item");
91
112
  return openBlock(), createBlock(_component_el_form_item, {
113
+ ref_key: "formItemRef",
114
+ ref: formItemRef,
92
115
  class: normalizeClass(unref(runtimeClass)),
93
116
  "label-width": designProperty.value.labelWidth,
94
117
  style: normalizeStyle(unref(runtimeStyle))
@@ -96,11 +119,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
96
119
  label: withCtx(() => [
97
120
  designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
98
121
  key: 0,
122
+ ref_key: "titleRef",
123
+ ref: titleRef,
99
124
  style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
100
125
  }, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
101
126
  ]),
102
127
  default: withCtx(() => [
103
128
  createVNode(_component_el_checkbox_group, {
129
+ ref_key: "componentRef",
130
+ ref: componentRef,
104
131
  disabled: designProperty.value.state === "disabled",
105
132
  size: designProperty.value.size,
106
133
  onChange: designProperty.value.changeMethod,
@@ -1,7 +1,7 @@
1
- import { defineComponent, computed, ref, onMounted, onUnmounted, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, resolveDynamicComponent } from "vue";
1
+ import { defineComponent, computed, ref, onMounted, nextTick, onUnmounted, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, resolveDynamicComponent } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { getVariableValue, setVariableValue, formatVariableValue, getFormPropName, setVariableValueWithProp } from "../../../../utils/page-helper-util.js";
4
- import { handleEvent } from "../../../../utils/events/event-util.js";
4
+ import { handleAfterInitEvent, handleEvent } from "../../../../utils/events/event-util.js";
5
5
  import { updateFormItemEditState } from "../../../../utils/events/validator-util.js";
6
6
  import { getListCode } from "../../../../utils/common-util.js";
7
7
  import { getComponentRef } from "../../../../utils/global-refs.js";
@@ -86,6 +86,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
86
86
  dynamicFields && dynamicFields.length > 0 ? pageCode + "__" + dynamicFields.join("__") : null
87
87
  );
88
88
  const customRef = ref(null);
89
+ const formItemRef = ref(null);
90
+ const titleRef = ref(null);
89
91
  onMounted(() => {
90
92
  eventBus.$on(componentId.value + "-scanDone", (data) => {
91
93
  const value = data.result;
@@ -100,6 +102,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
100
102
  );
101
103
  customRef.value.pickFileDone(data);
102
104
  });
105
+ nextTick(() => {
106
+ const value = dynamicModelMethod.value;
107
+ handleAfterInitEvent(
108
+ value,
109
+ props.pageContext,
110
+ props.configure,
111
+ {
112
+ formItemRef: formItemRef.value,
113
+ componentRef: customRef.value,
114
+ titleRef: titleRef.value,
115
+ value,
116
+ entity: props.pageContext.entity.data,
117
+ pageData: props.pageContext.entity.page
118
+ }
119
+ );
120
+ });
103
121
  });
104
122
  function handleCustomEvent(eventType) {
105
123
  handleEvent(dynamicModelMethod.value, props.pageContext, props.configure, eventType);
@@ -112,6 +130,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
112
130
  const _component_el_form_item = resolveComponent("el-form-item");
113
131
  return designProperty.value.tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
114
132
  key: 0,
133
+ ref_key: "formItemRef",
134
+ ref: formItemRef,
115
135
  required: designProperty.value.required,
116
136
  class: normalizeClass(unref(runtimeClass)),
117
137
  "label-width": designProperty.value.labelWidth,
@@ -120,6 +140,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
120
140
  label: withCtx(() => [
121
141
  designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
122
142
  key: 0,
143
+ ref_key: "titleRef",
144
+ ref: titleRef,
123
145
  style: normalizeStyle({ ...unref(headerStyle) })
124
146
  }, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
125
147
  ]),
@@ -1,8 +1,8 @@
1
- import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { getDateShortCuts } from "../../../../utils/form/date-shortcuts.js";
4
4
  import { getValueFromVariable, setVariableValue, getVariableValue } from "../../../../utils/page-helper-util.js";
5
- import { getCustomFunc, handleFormEvent } from "../../../../utils/events/event-util.js";
5
+ import { handleAfterInitEvent, getCustomFunc, handleFormEvent } from "../../../../utils/events/event-util.js";
6
6
  import _sfc_main$1 from "../common/title-suffix-element.vue.js";
7
7
  import dayjs from "dayjs";
8
8
  import { $t } from "../../../../utils/i18n-util.js";
@@ -40,6 +40,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
40
  }
41
41
  }
42
42
  }
43
+ const formItemRef = ref(null);
44
+ const componentRef = ref(null);
45
+ const titleRef = ref(null);
46
+ onMounted(() => {
47
+ nextTick(() => {
48
+ const value = dynamicModelMethod.value;
49
+ handleAfterInitEvent(
50
+ value,
51
+ props.pageContext,
52
+ props.configure,
53
+ {
54
+ formItemRef: formItemRef.value,
55
+ componentRef: componentRef.value,
56
+ titleRef: titleRef.value,
57
+ value,
58
+ entity: props.pageContext.entity.data,
59
+ pageData: props.pageContext.entity.page
60
+ }
61
+ );
62
+ });
63
+ });
43
64
  function formatDate(value, formatStr) {
44
65
  if (!value) {
45
66
  return value;
@@ -140,6 +161,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
140
161
  const _component_el_date_picker = resolveComponent("el-date-picker");
141
162
  const _component_el_form_item = resolveComponent("el-form-item");
142
163
  return openBlock(), createBlock(_component_el_form_item, {
164
+ ref_key: "formItemRef",
165
+ ref: formItemRef,
143
166
  required: designProperty.value.required,
144
167
  class: normalizeClass(unref(runtimeClass)),
145
168
  "label-width": designProperty.value.labelWidth,
@@ -148,6 +171,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
148
171
  label: withCtx(() => [
149
172
  designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
150
173
  key: 0,
174
+ ref_key: "titleRef",
175
+ ref: titleRef,
151
176
  style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
152
177
  }, [
153
178
  designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
@@ -162,6 +187,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
162
187
  default: withCtx(() => [
163
188
  designProperty.value.dateType == "time" || designProperty.value.dateType == "timerange" ? (openBlock(), createBlock(_component_el_time_picker, {
164
189
  key: 0,
190
+ ref_key: "componentRef",
191
+ ref: componentRef,
165
192
  "is-range": designProperty.value.dateType == "timerange",
166
193
  style: { "width": "100%" },
167
194
  "range-separator": "-",
@@ -186,6 +213,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
186
213
  onClear: _cache[6] || (_cache[6] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "clear"))
187
214
  }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : (openBlock(), createBlock(_component_el_date_picker, {
188
215
  key: 1,
216
+ ref_key: "componentRef",
217
+ ref: componentRef,
189
218
  clearable: designProperty.value.clearable,
190
219
  style: { "width": "100%" },
191
220
  disabled: designProperty.value.state === "disabled",
@@ -1,8 +1,12 @@
1
- import { defineComponent, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
- import { handleFormEvent } from "../../../../utils/events/event-util.js";
3
+ import { handleAfterInitEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
4
4
  import _sfc_main$1 from "../common/title-suffix-element.vue.js";
5
5
  import { $t } from "../../../../utils/i18n-util.js";
6
+ import "agilebuilder-ui/src/utils/request";
7
+ import "dayjs";
8
+ import "agilebuilder-ui/src/utils/calculator/calculator-util";
9
+ import "../../../../utils/global-refs.js";
6
10
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
11
  __name: "depttree-runtime",
8
12
  props: {
@@ -24,6 +28,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
28
  const runtimeClass = runtimeInfo.class;
25
29
  const headerStyle = runtimeInfo.headerStyle;
26
30
  const titleExceedStyle = runtimeInfo.titleExceedStyle;
31
+ const formItemRef = ref(null);
32
+ const componentRef = ref(null);
33
+ const titleRef = ref(null);
34
+ onMounted(() => {
35
+ nextTick(() => {
36
+ const value = dataModel ? dataModel[fieldName] : null;
37
+ handleAfterInitEvent(
38
+ value,
39
+ props.pageContext,
40
+ props.configure,
41
+ {
42
+ formItemRef: formItemRef.value,
43
+ componentRef: componentRef.value,
44
+ titleRef: titleRef.value,
45
+ value,
46
+ entity: props.pageContext.entity.data,
47
+ pageData: props.pageContext.entity.page
48
+ }
49
+ );
50
+ });
51
+ });
27
52
  const autoSetFields = designProperty.value.autoSetFields ? designProperty.value.autoSetFields : [];
28
53
  function changeValue(value) {
29
54
  handleFormEvent(value, props.pageContext, props.configure, "change");
@@ -35,6 +60,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35
60
  const _component_OrganizationInput = resolveComponent("OrganizationInput");
36
61
  const _component_el_form_item = resolveComponent("el-form-item");
37
62
  return openBlock(), createBlock(_component_el_form_item, {
63
+ ref_key: "formItemRef",
64
+ ref: formItemRef,
38
65
  required: designProperty.value.required,
39
66
  class: normalizeClass(unref(runtimeClass)),
40
67
  "label-width": designProperty.value.labelWidth,
@@ -43,6 +70,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
43
70
  label: withCtx(() => [
44
71
  designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
45
72
  key: 0,
73
+ ref_key: "titleRef",
74
+ ref: titleRef,
46
75
  style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
47
76
  }, [
48
77
  designProperty.value.prefixType ? (openBlock(), createBlock(_sfc_main$1, {
@@ -56,6 +85,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
56
85
  ]),
57
86
  default: withCtx(() => [
58
87
  createVNode(_component_OrganizationInput, {
88
+ ref_key: "componentRef",
89
+ ref: componentRef,
59
90
  disabled: designProperty.value.state == "disabled",
60
91
  multiple: designProperty.value.multiple,
61
92
  treeType: designProperty.value.treeType,
@@ -1,6 +1,6 @@
1
- import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeStyle, toDisplayString } from "vue";
1
+ import { defineComponent, ref, computed, onMounted, nextTick, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeStyle, toDisplayString } from "vue";
2
2
  import { formatVariableValue } from "../../../../utils/page-helper-util.js";
3
- import { handleFormEvent } from "../../../../utils/events/event-util.js";
3
+ import { handleAfterInitEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "divider-runtime",
6
6
  props: {
@@ -20,9 +20,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  const resultValue = formatVariableValue(props.pageContext, contentVariable);
21
21
  return resultValue == void 0 || resultValue == null ? "" : resultValue;
22
22
  });
23
+ const componentRef = ref(null);
24
+ onMounted(() => {
25
+ nextTick(() => {
26
+ const content = dynamicValue.value;
27
+ handleAfterInitEvent(
28
+ content,
29
+ props.pageContext,
30
+ props.configure,
31
+ {
32
+ componentRef: componentRef.value,
33
+ value: content,
34
+ entity: props.pageContext.entity.data,
35
+ pageData: props.pageContext.entity.page
36
+ }
37
+ );
38
+ });
39
+ });
23
40
  return (_ctx, _cache) => {
24
41
  const _component_el_divider = resolveComponent("el-divider");
25
42
  return openBlock(), createBlock(_component_el_divider, {
43
+ ref_key: "componentRef",
44
+ ref: componentRef,
26
45
  direction: designProperty.value.direction,
27
46
  "border-style": designProperty.value.borderType,
28
47
  "content-position": designProperty.value.titlePosition,