super-page-runtime 2.1.57 → 2.1.60

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 (46) 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 +100 -36
  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 -0
  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/container/card/card-runtime.vue2.js +11 -1
  14. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +11 -1
  15. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +11 -1
  16. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +11 -1
  17. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +14 -2
  18. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +11 -1
  19. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +30 -10
  20. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +9 -1
  21. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +13 -30
  22. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -1
  23. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +29 -2
  24. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +24 -2
  25. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +31 -2
  26. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -2
  27. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +21 -2
  28. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +26 -2
  29. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +29 -2
  30. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +27 -2
  31. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +32 -5
  32. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +29 -2
  33. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
  34. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +26 -4
  35. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +29 -2
  36. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +22 -3
  37. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +27 -2
  38. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +18 -1
  39. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +29 -4
  40. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +25 -2
  41. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +29 -2
  42. package/dist/es/components/runtime/views/super-page.vue.js +3 -2
  43. package/dist/es/i18n/langs/cn.js +3 -1
  44. package/dist/es/i18n/langs/en.js +3 -1
  45. package/dist/es/style.css +1 -1
  46. package/package.json +2 -2
@@ -3,7 +3,7 @@ import { getComponentRefByCode, getComponentRef } from "../global-refs.js";
3
3
  import eventBus from "../eventBus.js";
4
4
  import http from "agilebuilder-ui/src/utils/request";
5
5
  import { getAdditionalParamMap, refreshPage } from "../events/standard-event.js";
6
- import { updateFormItemEditState, dsiabledAllFields } from "../events/validator-util.js";
6
+ import { updateFormItemEditState, disabledAllFields } from "../events/validator-util.js";
7
7
  import { getBaseUrl, deepCopy } from "../common-util.js";
8
8
  import { isMobileBrowser } from "agilebuilder-ui/src/utils/common-util";
9
9
  import { getFormModelFields, getModelFields } from "../page-init-util.js";
@@ -180,8 +180,8 @@ const functions = {
180
180
  * 禁用所有字段
181
181
  * @param pageContext 页面上下文
182
182
  */
183
- dsiabledAllFields(pageContext) {
184
- dsiabledAllFields(pageContext);
183
+ disabledAllFields(pageContext) {
184
+ disabledAllFields(pageContext);
185
185
  },
186
186
  /**
187
187
  * 控制表格编辑权限
@@ -215,7 +215,7 @@ const functions = {
215
215
  params.requestParams = getAdditionalParamMap(pageContext);
216
216
  }
217
217
  if (!params.taskParamMap) {
218
- params.requestParams = pageContext.entity.task;
218
+ params.taskParamMap = pageContext.entity.task;
219
219
  }
220
220
  let baseUrl = pageContext.backendUrl;
221
221
  if (!baseUrl) {
@@ -227,8 +227,7 @@ const functions = {
227
227
  eventBus.$emit(pageContext.code + "_open-dialog", {
228
228
  pageContext,
229
229
  eventParams: openParam.eventParams,
230
- configureObj: { props: { linkPage: openParam } },
231
- jumpPageSetting: openParam.jumpPageSetting
230
+ configureObj: { props: { linkPage: openParam } }
232
231
  });
233
232
  },
234
233
  /**
@@ -317,9 +316,13 @@ const functions = {
317
316
  isMobile() {
318
317
  return isMobileBrowser();
319
318
  },
320
- // 根据编码获取组件引用对象
319
+ // 根据获取组件引用对象
320
+ getComponentRefByProp(pageContext, prop) {
321
+ return getComponentRefByCode(pageContext, prop);
322
+ },
323
+ // 根据组件唯一编码获取组件引用对象
321
324
  getComponentRefByCode(pageContext, code) {
322
- return getComponentRefByCode(pageContext, code);
325
+ return getComponentRef(pageContext, code);
323
326
  },
324
327
  // 获得表单数据查看信息,例如:下拉框选项名等
325
328
  getFormViewData(pageContext) {
@@ -327,7 +330,7 @@ const functions = {
327
330
  const entity = pageContext.entity ? pageContext.entity : {};
328
331
  const viewEntity = deepCopy(entity);
329
332
  const optionSourceMap = getOptionDatasSourceMap(pageContext);
330
- for (let uuid in optionSourceMap) {
333
+ for (const uuid in optionSourceMap) {
331
334
  const cacheOptions = getComponentOptionDatasFromPage(pageContext, uuid);
332
335
  const componentRef = getComponentRef(pageContext, uuid);
333
336
  if (componentRef) {
@@ -335,7 +338,7 @@ const functions = {
335
338
  if (componentConfigure) {
336
339
  if (((_b = (_a = componentConfigure.props) == null ? void 0 : _a.dataOrigin) == null ? void 0 : _b.optionValueSetType) && (((_d = (_c = componentConfigure.props) == null ? void 0 : _c.dataOrigin) == null ? void 0 : _d.optionValueSetType) === "static" || ((_f = (_e = componentConfigure.props) == null ? void 0 : _e.dataOrigin) == null ? void 0 : _f.optionValueSetType) === "optionGroup")) {
337
340
  if (componentConfigure.name && (componentConfigure.name === "select" && ((_h = (_g = componentConfigure.props) == null ? void 0 : _g.base) == null ? void 0 : _h.multiple) || componentConfigure.name === "checkbox")) {
338
- let dynamicFields = getFormModelFields(pageContext, componentConfigure);
341
+ const dynamicFields = getFormModelFields(pageContext, componentConfigure);
339
342
  const propValue = getVariableValue(viewEntity, dynamicFields);
340
343
  if (propValue) {
341
344
  const propValues = propValue.split(",");
@@ -343,7 +346,7 @@ const functions = {
343
346
  setVariableValue(viewEntity, dynamicFields, label);
344
347
  }
345
348
  } else {
346
- let dynamicFields = getFormModelFields(pageContext, componentConfigure);
349
+ const dynamicFields = getFormModelFields(pageContext, componentConfigure);
347
350
  const propValue = getVariableValue(viewEntity, dynamicFields);
348
351
  const label = getSelectShowLable(propValue, cacheOptions);
349
352
  setVariableValue(viewEntity, dynamicFields, label);
@@ -353,7 +356,7 @@ const functions = {
353
356
  }
354
357
  }
355
358
  const listCodesMap = pageContext.listCodesMap;
356
- for (let listCode in listCodesMap) {
359
+ for (const listCode in listCodesMap) {
357
360
  let tableUuid;
358
361
  if (listCode.indexOf("__") > 0) {
359
362
  tableUuid = listCode.substring(listCode.lastIndexOf("__") + "__".length);
@@ -363,7 +366,7 @@ const functions = {
363
366
  if (componentRef) {
364
367
  const componentConfigure = componentRef.getConfigure();
365
368
  const prop = componentConfigure.code ? componentConfigure.code : listCode;
366
- let dynamicFields = getModelFields(componentConfigure, prop);
369
+ const dynamicFields = getModelFields(componentConfigure, prop);
367
370
  const gridData = getVariableValue(viewEntity, dynamicFields);
368
371
  const subTableOptions = componentRef.getTableSelectOptions(listCode);
369
372
  packageSubTableShowLable(subTableOptions, gridData);
@@ -420,7 +423,7 @@ function getSingleSelectShowLable(propValue, propSelectOptions) {
420
423
  for (let i = 0; i < propSelectOptions.length; i++) {
421
424
  const optValue = propSelectOptions[i].value;
422
425
  const optLabel = propSelectOptions[i].label ? propSelectOptions[i].label : propSelectOptions[i].name;
423
- if (propValue + "" === optValue + "" && (optLabel !== void 0 && optLabel !== null)) {
426
+ if (propValue + "" === optValue + "" && optLabel !== void 0 && optLabel !== null) {
424
427
  showLabel = optLabel;
425
428
  break;
426
429
  }
@@ -25,6 +25,7 @@ export declare function appendDefaultMethods(func: any, pageContext: PageContext
25
25
  export declare function removeCustomFuncFromWindow(pageDesign: PageDesign): void;
26
26
  export declare function handleEvent($event: any, pageContext: PageContext, configure: Component, eventType: string, otherParams?: object): any;
27
27
  export declare function handleFormEvent($event: any, pageContext: PageContext, configure: Component, eventType: string, otherParams?: object): any;
28
+ export declare function handleAfterInitEvent($event: any, pageContext: PageContext, configure: Component, otherParams?: object): any;
28
29
  export declare function getHandleEvent($event: any, pageContext: PageContext, configure: Component, eventType: string, otherParams?: object): any;
29
30
  export declare function getTableUuid(pageContext: PageContext, configure: Component): any;
30
31
  export declare function handleEventByEventName(pageContext: PageContext, configure: Component, eventName: string, otherParams?: object): any;
@@ -109,6 +109,9 @@ function handleFormEvent($event, pageContext, configure, eventType, otherParams)
109
109
  }
110
110
  return handleEventUtil($event, pageContext, configure, eventType, true, otherParams, true);
111
111
  }
112
+ function handleAfterInitEvent($event, pageContext, configure, otherParams) {
113
+ return handleFormEvent($event, pageContext, configure, "afterInit", otherParams);
114
+ }
112
115
  function getHandleEvent($event, pageContext, configure, eventType, otherParams) {
113
116
  return handleEventUtil($event, pageContext, configure, eventType, false, otherParams, false);
114
117
  }
@@ -712,6 +715,7 @@ export {
712
715
  gridSelectAllRecords,
713
716
  gridSelectRecord,
714
717
  gridSelectionChange,
718
+ handleAfterInitEvent,
715
719
  handleChartEvent,
716
720
  handleEvent,
717
721
  handleFormEvent,
@@ -9,7 +9,7 @@ import axios from "axios";
9
9
  import { getTableUuid, handleEvent, doAfterClickEvent } from "./event-util.js";
10
10
  import { setStoreInfo } from "../store-util.js";
11
11
  import { getPermissionCodes, getDefaultValue, getModelFields } from "../page-init-util.js";
12
- import { updateChartDatasources, getVariableValue, setVariableValue } from "../page-helper-util.js";
12
+ import { updateChartDatasources, caculateShowCondition, getVariableValue, setVariableValue } from "../page-helper-util.js";
13
13
  import printLabelUtil from "./print-label.js";
14
14
  import { getTableNameByTableUuid } from "../table-utils.js";
15
15
  import { packageCustomRules, getWorkflowRules } from "./validator-util.js";
@@ -745,7 +745,12 @@ function dealAfterWithList(pageContext, configureObj, row, successTip) {
745
745
  }
746
746
  function refreshFormOrListPage(pageContext, configureObj, isRefreshWhenClosePopup) {
747
747
  let successOperation = isRefreshWhenClosePopup ? "refresh" : configureObj.props.base.successOperation;
748
- console.log("refreshFormOrListPage22=====successOperation=", successOperation, "isRefreshWhenClosePopup=", isRefreshWhenClosePopup);
748
+ console.log(
749
+ "refreshFormOrListPage22=====successOperation=",
750
+ successOperation,
751
+ "isRefreshWhenClosePopup=",
752
+ isRefreshWhenClosePopup
753
+ );
749
754
  const buttonForPageType = getPageType(pageContext, configureObj);
750
755
  console.log("refreshFormOrListPage22=====buttonForPageType=", buttonForPageType);
751
756
  if (buttonForPageType && buttonForPageType === "list" && !successOperation) {
@@ -948,8 +953,8 @@ function downloadTemplateFunc(params) {
948
953
  let templateUUID;
949
954
  let templateShowPath;
950
955
  if (templateFilesResult && templateFilesResult.length > 0) {
951
- templateUUID = templateFilesResult[0].templateUUID;
952
- templateShowPath = templateFilesResult[0].templateShowPath;
956
+ templateUUID = templateFilesResult[0].templateUuid;
957
+ templateShowPath = templateFilesResult[0].templateName;
953
958
  }
954
959
  const systemCode = pageContext.systemCode;
955
960
  const backendUrl = pageContext.backendUrl;
@@ -1255,7 +1260,7 @@ function getWorkflowSaveParams(params) {
1255
1260
  param["isWorkflowEntity"] = true;
1256
1261
  return param;
1257
1262
  }
1258
- function workflowSaveFunc(params) {
1263
+ async function workflowSaveFunc(params) {
1259
1264
  return new Promise((resolve, reject) => {
1260
1265
  const pageContext = params.pageContext;
1261
1266
  const dataModel = pageContext.entity.data;
@@ -1385,44 +1390,103 @@ function submitProcessFunc(params) {
1385
1390
  }
1386
1391
  });
1387
1392
  }
1388
- function completeTaskFunc(params, operationResult) {
1393
+ async function completeTaskFunc(params, operationResult) {
1394
+ let validateOpinionResult = await validateOpinion(params);
1389
1395
  return new Promise((resolve, reject) => {
1390
- const pageContext = params.pageContext;
1391
- const systemCode = pageContext.systemCode;
1392
- const backendUrl = pageContext.backendUrl;
1393
- let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/complete-tasks";
1394
- path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1395
- if (!path) {
1396
- ElMessage({
1397
- showClose: true,
1398
- type: "warning",
1399
- message: getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1396
+ var _a;
1397
+ if (validateOpinionResult) {
1398
+ const pageContext = params.pageContext;
1399
+ const systemCode = pageContext.systemCode;
1400
+ const backendUrl = pageContext.backendUrl;
1401
+ const opinion = validateOpinionResult === true ? (_a = pageContext.completeTaskParam) == null ? void 0 : _a.opinion : validateOpinionResult;
1402
+ let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/complete-tasks";
1403
+ path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1404
+ if (!path) {
1405
+ ElMessage({
1406
+ showClose: true,
1407
+ type: "warning",
1408
+ message: getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1409
+ });
1410
+ return;
1411
+ }
1412
+ const param = getWorkflowSaveParams(params);
1413
+ param["completeTaskParam"] = {
1414
+ operationResult,
1415
+ taskId: pageContext.completeTaskParam ? pageContext.completeTaskParam.taskId : null,
1416
+ opinion: opinion ? opinion : null
1417
+ };
1418
+ const request = http.post(path, param);
1419
+ request.then((commonEntity) => {
1420
+ let result = true;
1421
+ if (commonEntity) {
1422
+ result = dealCompleteTaskParam(
1423
+ commonEntity,
1424
+ false,
1425
+ pageContext,
1426
+ params,
1427
+ operationResult
1428
+ );
1429
+ }
1430
+ if (result === true) {
1431
+ ElMessage({
1432
+ showClose: true,
1433
+ type: "success",
1434
+ message: getI18n().t("superPageRuntimeMessage.successfulCompleteTask")
1435
+ });
1436
+ }
1437
+ resolve(true);
1438
+ }).catch((error) => {
1439
+ reject(error);
1400
1440
  });
1401
- return;
1441
+ } else {
1442
+ resolve(true);
1402
1443
  }
1403
- const param = getWorkflowSaveParams(params);
1404
- param["completeTaskParam"] = {
1405
- operationResult,
1406
- taskId: pageContext.completeTaskParam ? pageContext.completeTaskParam.taskId : null,
1407
- opinion: pageContext.completeTaskParam ? pageContext.completeTaskParam.opinion : null
1408
- };
1409
- const request = http.post(path, param);
1410
- request.then((commonEntity) => {
1411
- let result = true;
1412
- if (commonEntity) {
1413
- result = dealCompleteTaskParam(commonEntity, false, pageContext, params, operationResult);
1444
+ });
1445
+ }
1446
+ function validateOpinion(params) {
1447
+ return new Promise((resolve, reject) => {
1448
+ var _a, _b, _c, _d;
1449
+ const configureObj = params.configureObj;
1450
+ if (configureObj) {
1451
+ let isOpinionRequired = false;
1452
+ if ((_b = (_a = configureObj.props) == null ? void 0 : _a.base) == null ? void 0 : _b.isMustOpinion) {
1453
+ isOpinionRequired = true;
1414
1454
  }
1415
- if (result === true) {
1416
- ElMessage({
1417
- showClose: true,
1418
- type: "success",
1419
- message: getI18n().t("superPageRuntimeMessage.successfulCompleteTask")
1455
+ if (isOpinionRequired === true) {
1456
+ const pageContext = params.pageContext;
1457
+ const mustOpinionConditions = (_d = (_c = configureObj.props) == null ? void 0 : _c.base) == null ? void 0 : _d.mustOpinionConditions;
1458
+ isOpinionRequired = caculateShowCondition(pageContext, configureObj, mustOpinionConditions);
1459
+ }
1460
+ if (isOpinionRequired === true) {
1461
+ ElMessageBox.prompt(
1462
+ getI18n().t("superPageRuntimeMessage.pleaseInputOpinion"),
1463
+ getI18n().t("superPageRuntimeMessage.opinion"),
1464
+ {
1465
+ confirmButtonText: getI18n().t("superPageRuntimeMessage.sure"),
1466
+ cancelButtonText: getI18n().t("superPageRuntimeMessage.cancel"),
1467
+ // 输入框类型
1468
+ inputType: "textarea",
1469
+ inputValue: null,
1470
+ closeOnClickModal: false,
1471
+ inputValidator: (value) => {
1472
+ if (value && value.trim()) {
1473
+ return true;
1474
+ } else {
1475
+ return getI18n().t("superPageRuntimeMessage.pleaseInputOpinion");
1476
+ }
1477
+ }
1478
+ }
1479
+ ).then(({ value }) => {
1480
+ resolve(value);
1481
+ }).catch(() => {
1482
+ resolve(false);
1420
1483
  });
1484
+ } else {
1485
+ resolve(true);
1421
1486
  }
1487
+ } else {
1422
1488
  resolve(true);
1423
- }).catch((error) => {
1424
- reject(error);
1425
- });
1489
+ }
1426
1490
  });
1427
1491
  }
1428
1492
  function assignTask(params) {
@@ -14,6 +14,6 @@ export declare function i18nValidateRulesMessage(rules: any): {};
14
14
  export declare function i18nValidatePropRulesMessage(propRules: any, isResetMessage: boolean): void;
15
15
  export declare function getWorkflowRules(pageContext: any): any;
16
16
  export declare function updateFormItemEditState(pageContext: PageContext, customRules: any[]): void;
17
- export declare function dsiabledAllFields(pageContext: PageContext): void;
17
+ export declare function disabledAllFields(pageContext: PageContext): void;
18
18
  export declare function dynamicControlTableEdit(pageContext: PageContext, customRules: any[]): void;
19
19
  export declare function updateComponentDisplayState(ref: any, item: any): void;
@@ -507,7 +507,7 @@ function updateFormItemEditState(pageContext, customRules) {
507
507
  updateComponentDisplayState(ref, item);
508
508
  });
509
509
  }
510
- function dsiabledAllFields(pageContext) {
510
+ function disabledAllFields(pageContext) {
511
511
  getAllComponentRefs(pageContext).forEach((ref) => {
512
512
  updateComponentDisplayState(ref, { disabled: true });
513
513
  });
@@ -530,7 +530,7 @@ function updateComponentDisplayState(ref, item) {
530
530
  }
531
531
  }
532
532
  export {
533
- dsiabledAllFields,
533
+ disabledAllFields,
534
534
  getWorkflowRules,
535
535
  i18nValidatePropRulesMessage,
536
536
  i18nValidateRulesMessage,
@@ -1,3 +1,4 @@
1
1
  export declare function getDataTypeMapRequest(backendUrl: any, tableName: any, isTest?: boolean): any;
2
2
  export declare function popupToPage(params: any): void;
3
3
  export declare function getTableNameByTableUuid(pageContext: any, tableUuid: any): any;
4
+ export declare function getOperationButtons(pageContext: any, configure: any, operations: any, clickEventFunc?: Function): void;
@@ -2,6 +2,8 @@ import "agilebuilder-ui/src/utils/common-util";
2
2
  import "agilebuilder-ui/src/utils/util";
3
3
  import "agilebuilder-ui/src/utils/request";
4
4
  import eventBus from "./eventBus.js";
5
+ import { getPermissionCodes } from "./page-init-util.js";
6
+ import { getEventFuncByType } from "./events/event-util.js";
5
7
  function popupToPage(params) {
6
8
  const pageCode = params.pageContext && params.pageContext.code;
7
9
  console.log("弹框显示页面--popupToPage====params=", params);
@@ -18,7 +20,41 @@ function getTableNameByTableUuid(pageContext, tableUuid) {
18
20
  }
19
21
  return tableConfigure && tableConfigure.props && tableConfigure.props.dataOrigin ? tableConfigure.props.dataOrigin.tableName : null;
20
22
  }
23
+ function getOperationButtons(pageContext, configure, operations, clickEventFunc) {
24
+ const showOperation = configure.props && configure.props.base ? configure.props.base.showOperation : false;
25
+ const operationButtonSettings = configure.btnList;
26
+ console.log("configure.btnList===", configure.btnList, "configure====", configure);
27
+ if (showOperation && operationButtonSettings) {
28
+ operationButtonSettings.forEach((buttonConfigure) => {
29
+ const myButtonSet = {};
30
+ const myButtonProps = Object.assign({}, buttonConfigure.props.base);
31
+ if (buttonConfigure.name === "custom") {
32
+ myButtonProps.customControl = myButtonProps.name;
33
+ } else {
34
+ myButtonProps.elementType = "el-button";
35
+ }
36
+ if (buttonConfigure.isPermission === void 0 || buttonConfigure.isPermission + "" === "true") {
37
+ const functionCodes = getPermissionCodes(buttonConfigure, pageContext);
38
+ if (functionCodes) {
39
+ myButtonProps.permission = functionCodes;
40
+ }
41
+ }
42
+ myButtonProps.label = myButtonProps.title;
43
+ myButtonProps.sourceButton = { uuid: buttonConfigure.uuid };
44
+ myButtonSet["props"] = myButtonProps;
45
+ debugger;
46
+ if (clickEventFunc !== void 0) {
47
+ myButtonSet["onClick"] = clickEventFunc(buttonConfigure);
48
+ } else {
49
+ const eventFunc = getEventFuncByType(pageContext, buttonConfigure.events, "click");
50
+ myButtonSet["onClick"] = eventFunc;
51
+ }
52
+ operations.push(myButtonSet);
53
+ });
54
+ }
55
+ }
21
56
  export {
57
+ getOperationButtons,
22
58
  getTableNameByTableUuid,
23
59
  popupToPage
24
60
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent, ref, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, unref, normalizeStyle, withCtx, Fragment, createTextVNode, toDisplayString, createCommentVNode, createBlock } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, unref, normalizeStyle, withCtx, Fragment, createTextVNode, toDisplayString, createCommentVNode, createBlock } from "vue";
2
2
  import { SuperIcon } from "agilebuilder-ui";
3
- import { handleEvent } from "../../../../utils/events/event-util.js";
3
+ import { handleAfterInitEvent, handleEvent } from "../../../../utils/events/event-util.js";
4
4
  import { $t } from "../../../../utils/i18n-util.js";
5
5
  const _hoisted_1 = { class: "page-runtime-header-btn" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -21,12 +21,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
21
  function isButtongLoading() {
22
22
  return props.pageContext.canClick !== void 0 && props.pageContext.clickUuid !== void 0 ? !props.pageContext.canClick && props.pageContext.clickUuid === props.configure.uuid : false;
23
23
  }
24
+ const componentRef = ref(null);
24
25
  onMounted(() => {
26
+ nextTick(() => {
27
+ handleAfterInitEvent(null, props.pageContext, props.configure, {
28
+ componentRef: componentRef.value,
29
+ entity: props.pageContext.entity.data,
30
+ pageData: props.pageContext.entity.page
31
+ });
32
+ });
25
33
  });
26
34
  return (_ctx, _cache) => {
27
35
  const _component_el_button = resolveComponent("el-button");
28
36
  return openBlock(), createElementBlock("span", _hoisted_1, [
29
37
  createVNode(_component_el_button, {
38
+ ref_key: "componentRef",
39
+ ref: componentRef,
30
40
  disabled: isDisable(),
31
41
  class: normalizeClass(unref(runtimeClass)),
32
42
  style: normalizeStyle(unref(runtimeStyle)),
@@ -1,5 +1,6 @@
1
- import { defineComponent, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, renderList } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, renderList } from "vue";
2
2
  import _sfc_main$1 from "../../object-render.vue.js";
3
+ import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
3
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
4
5
  __name: "buttongroup-runtime",
5
6
  props: {
@@ -11,9 +12,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
12
  const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
12
13
  const runtimeStyle = runtimeInfo.style;
13
14
  const runtimeClass = runtimeInfo.class;
15
+ const componentRef = ref(null);
16
+ onMounted(() => {
17
+ nextTick(() => {
18
+ handleAfterInitEvent(null, props.pageContext, props.configure, {
19
+ componentRef: componentRef.value,
20
+ entity: props.pageContext.entity.data,
21
+ pageData: props.pageContext.entity.page
22
+ });
23
+ });
24
+ });
14
25
  return (_ctx, _cache) => {
15
26
  const _component_el_button_group = resolveComponent("el-button-group");
16
27
  return openBlock(), createBlock(_component_el_button_group, {
28
+ ref_key: "componentRef",
29
+ ref: componentRef,
17
30
  class: normalizeClass(unref(runtimeClass)),
18
31
  style: normalizeStyle(unref(runtimeStyle))
19
32
  }, {
@@ -1,7 +1,7 @@
1
- import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
1
+ import { defineComponent, ref, computed, onMounted, nextTick, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
2
2
  import { ArrowDown } from "@element-plus/icons-vue";
3
3
  import { formatVariableValue } from "../../../../utils/page-helper-util.js";
4
- import { handleEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
4
+ import { handleAfterInitEvent, handleEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
5
5
  import { $t } from "../../../../utils/i18n-util.js";
6
6
  const _hoisted_1 = { key: 1 };
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -53,6 +53,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
53
53
  handleFormEvent(isVisible, props.pageContext, props.configure, "menuHidden");
54
54
  }
55
55
  }
56
+ const componentRef = ref(null);
57
+ onMounted(() => {
58
+ nextTick(() => {
59
+ handleAfterInitEvent(null, props.pageContext, props.configure, {
60
+ componentRef: componentRef.value,
61
+ entity: props.pageContext.entity.data,
62
+ pageData: props.pageContext.entity.page
63
+ });
64
+ });
65
+ });
56
66
  return (_ctx, _cache) => {
57
67
  const _component_el_button = resolveComponent("el-button");
58
68
  const _component_el_icon = resolveComponent("el-icon");
@@ -61,6 +71,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
71
  const _component_el_dropdown_menu = resolveComponent("el-dropdown-menu");
62
72
  const _component_el_dropdown = resolveComponent("el-dropdown");
63
73
  return openBlock(), createBlock(_component_el_dropdown, {
74
+ ref_key: "componentRef",
75
+ ref: componentRef,
64
76
  class: normalizeClass(unref(runtimeClass)),
65
77
  style: normalizeStyle(unref(runtimeStyle)),
66
78
  placement: designProperty.value.placement,
@@ -1,6 +1,6 @@
1
- import { defineComponent, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
2
2
  import "agilebuilder-ui";
3
- import { handleEvent } from "../../../../utils/events/event-util.js";
3
+ import { handleAfterInitEvent, handleEvent } from "../../../../utils/events/event-util.js";
4
4
  import _sfc_main$1 from "../button/button-runtime.vue2.js";
5
5
  import { $t } from "../../../../utils/i18n-util.js";
6
6
  const _hoisted_1 = { key: 1 };
@@ -20,6 +20,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  }
21
21
  const runtimeStyle = runtimeInfo.style;
22
22
  const runtimeClass = runtimeInfo.class;
23
+ const componentRef = ref(null);
24
+ onMounted(() => {
25
+ nextTick(() => {
26
+ if (showDropdown.value) {
27
+ handleAfterInitEvent(null, props.pageContext, props.configure, {
28
+ componentRef: componentRef.value,
29
+ entity: props.pageContext.entity.data,
30
+ pageData: props.pageContext.entity.page
31
+ });
32
+ }
33
+ });
34
+ });
23
35
  return (_ctx, _cache) => {
24
36
  const _component_el_button = resolveComponent("el-button");
25
37
  const _component_ArrowDown = resolveComponent("ArrowDown");
@@ -34,6 +46,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
46
  pageContext: _ctx.pageContext
35
47
  }, null, 8, ["configure", "pageContext"])) : (openBlock(), createBlock(_component_el_dropdown, {
36
48
  key: 1,
49
+ ref_key: "componentRef",
50
+ ref: componentRef,
37
51
  class: normalizeClass(unref(runtimeClass)),
38
52
  style: normalizeStyle(unref(runtimeStyle)),
39
53
  placement: designProperty.value.placement,
@@ -1,8 +1,9 @@
1
- import { defineComponent, ref, openBlock, createBlock, unref, normalizeStyle, normalizeClass, createSlots, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from "vue";
1
+ import { defineComponent, ref, onMounted, nextTick, openBlock, createBlock, unref, normalizeStyle, normalizeClass, createSlots, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from "vue";
2
2
  import { ElCard } from "element-plus";
3
3
  import { SuperIcon } from "agilebuilder-ui";
4
4
  import _sfc_main$1 from "../../object-render.vue.js";
5
5
  import { $t } from "../../../../utils/i18n-util.js";
6
+ import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
6
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
8
  __name: "card-runtime",
8
9
  props: {
@@ -23,6 +24,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
24
  function test() {
24
25
  props.configure.props.title = "teee";
25
26
  }
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
+ });
26
36
  __expose({
27
37
  test
28
38
  });
@@ -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");