super-page-runtime 2.1.48 → 2.1.50-temp1

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 (31) hide show
  1. package/dist/es/components/runtime/utils/api/api-util.d.ts +1 -18
  2. package/dist/es/components/runtime/utils/api/api-util.js +2 -306
  3. package/dist/es/components/runtime/utils/api/page-expose-util.js +8 -1
  4. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +5 -1
  5. package/dist/es/components/runtime/utils/events/standard-event.d.ts +11 -1
  6. package/dist/es/components/runtime/utils/events/standard-event.js +333 -36
  7. package/dist/es/components/runtime/utils/events/validator-util.js +5 -25
  8. package/dist/es/components/runtime/utils/page-helper-util.d.ts +3 -1
  9. package/dist/es/components/runtime/utils/page-helper-util.js +22 -4
  10. package/dist/es/components/runtime/utils/page-init-util.js +1 -2
  11. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +4 -1
  12. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +3 -2
  13. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +491 -0
  14. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +44 -0
  15. package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +4 -0
  16. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +64 -0
  17. package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +4 -0
  18. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +247 -0
  19. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +4 -0
  20. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +318 -34
  21. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +1 -0
  22. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +46 -14
  23. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +28 -4
  24. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +3 -1
  25. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
  26. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +4 -1
  27. package/dist/es/components/runtime/views/super-page-dialog.vue.d.ts +4 -0
  28. package/dist/es/components/runtime/views/super-page-dialog.vue.js +5 -1
  29. package/dist/es/components/runtime/views/super-page.vue.js +4 -4
  30. package/package.json +2 -2
  31. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +0 -1
@@ -1,13 +1,14 @@
1
1
  import { defineComponent, ref, onMounted, watch, onUnmounted, resolveComponent, openBlock, createElementBlock, createVNode, unref } from "vue";
2
2
  import "agilebuilder-ui";
3
- import { setTableEvents, getEventFuncByType, canExecuteButton, doAfterClickEvent, getEventNameByType, doBeforeClickEvent, getHandleEvent, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick } from "../../../../utils/events/event-util.js";
3
+ import { setTableEvents, canExecuteButton, doAfterClickEvent, getEventNameByType, doBeforeClickEvent, getHandleEvent, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick } from "../../../../utils/events/event-util.js";
4
4
  import { getBaseUrl, getListCode, getRealRestApiPath } from "../../../../utils/common-util.js";
5
5
  import { getAdditionalParamMap, getSaveFormRequestWithRow, standardEvents } from "../../../../utils/events/standard-event.js";
6
6
  import { isPromise } from "agilebuilder-ui/src/utils/common-util";
7
7
  import { getDataTypeMapRequest, popupToPage } from "../../../../utils/table-utils.js";
8
8
  import eventBus from "../../../../utils/eventBus.js";
9
9
  import { getPermissionCodes, getDefaultValue } from "../../../../utils/page-init-util.js";
10
- import { getSizeConfig } from "../../../../utils/page-helper-util.js";
10
+ import { decomposeVariable, getSizeConfig } from "../../../../utils/page-helper-util.js";
11
+ import { getRowStyleUtil, getCellStyleUtil, getHeaderCellStyleUtil } from "../../chart/table/chart-table-util.js";
11
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
12
13
  __name: "main-table-runtime",
13
14
  props: {
@@ -88,12 +89,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
88
89
  searchGridData(props.pageContext.entity.data);
89
90
  }
90
91
  );
91
- watch(
92
- () => props.pageContext.entity.page,
93
- (searchFormData) => {
94
- searchGridData(props.pageContext.entity.page);
92
+ const linkageVariable = [];
93
+ if (configure.props.linkages && configure.props.linkages.length > 0) {
94
+ configure.props.linkages.forEach((linkage) => {
95
+ const variablePath = decomposeVariable(linkage.fieldName);
96
+ if (variablePath && variablePath.length > 1) {
97
+ linkageVariable.push(variablePath[1]);
98
+ }
99
+ });
100
+ if (linkageVariable.length > 0) {
101
+ linkageVariable.forEach((variable) => {
102
+ watch(
103
+ () => props.pageContext.entity.page[variable],
104
+ () => {
105
+ const values = getLinkageVariableValues();
106
+ searchGridData(values);
107
+ }
108
+ );
109
+ });
95
110
  }
96
- );
111
+ }
97
112
  onUnmounted(() => {
98
113
  eventBus.$off(eventPageInfo + "-close-component-page-dialog");
99
114
  eventBus.$off(eventPageInfo + "_close-dialog-get-entity");
@@ -151,7 +166,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
151
166
  tableClass: runtimeClass,
152
167
  tableStyle: runtimeStyle,
153
168
  pageContext,
154
- configureObj: configure
169
+ configureObj: configure,
170
+ backendUrl: baseURL,
171
+ cellStyleRender: getCellStyle,
172
+ rowStyleRender: getRowStyle,
173
+ titleStyleRender: getTitleStyle
155
174
  };
156
175
  setOperationButtons(options);
157
176
  setSortInfo(options);
@@ -251,10 +270,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
251
270
  const customEvents = pageContext.customEvents;
252
271
  if (customEvents) {
253
272
  options.eventCallBack = customEvents;
254
- const rowStyleEvent = getEventFuncByType(pageContext, tableEvents, "rowStyle");
255
- if (rowStyleEvent) {
256
- options.rowStyleRender = rowStyleEvent;
257
- }
258
273
  }
259
274
  }
260
275
  function enterSave({ rowIndex, column, row, orgRow }) {
@@ -568,8 +583,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
568
583
  if (!thisRefDom) {
569
584
  thisRefDom = gridRef.value;
570
585
  }
571
- const parentNode = thisRefDom.parentNode;
572
- if (!thisRefDom || !parentNode) {
586
+ if (!thisRefDom) {
573
587
  return;
574
588
  }
575
589
  const rect = thisRefDom.getBoundingClientRect();
@@ -698,6 +712,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
698
712
  function canShowMobileSearch(listCode2) {
699
713
  isCanShowMobileSearch.value = true;
700
714
  }
715
+ function getLinkageVariableValues() {
716
+ const values = {};
717
+ linkageVariable.forEach((variable) => {
718
+ values[variable] = props.pageContext.entity.page[variable];
719
+ });
720
+ return values;
721
+ }
722
+ function getRowStyle(data) {
723
+ return getRowStyleUtil(data, null, props);
724
+ }
725
+ function getCellStyle(data) {
726
+ return getCellStyleUtil(data, data.cellStyle, props);
727
+ }
728
+ function getTitleStyle(data) {
729
+ const cellTitleStyle = data.titleStyle;
730
+ const rowTitleStyle = props.configure.style.titleStyle;
731
+ return getHeaderCellStyleUtil(data, { cellTitleStyle, titleStyle: rowTitleStyle }, props);
732
+ }
701
733
  __expose({
702
734
  refresh,
703
735
  createRow,
@@ -4,8 +4,9 @@ import { getSizeConfig, getVariableValue, setVariableValue } from "../../../../u
4
4
  import { getModelFields, getDefaultValue } from "../../../../utils/page-init-util.js";
5
5
  import eventBus from "../../../../utils/eventBus.js";
6
6
  import { popupToPage } from "../../../../utils/table-utils.js";
7
- import { getListCode } from "../../../../utils/common-util.js";
7
+ import { getListCode, getBaseUrl } from "../../../../utils/common-util.js";
8
8
  import { getAdditionalParamMap } from "../../../../utils/events/standard-event.js";
9
+ import { getRowStyleUtil, getCellStyleUtil, getHeaderCellStyleUtil } from "../../chart/table/chart-table-util.js";
9
10
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
11
  __name: "sub-table-runtime",
11
12
  props: {
@@ -30,9 +31,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
31
  const runtimeClass = runtimeInfo.class;
31
32
  const entity = props.pageContext.entity ? props.pageContext.entity : {};
32
33
  let dynamicFields = getModelFields(props.configure, prop);
34
+ let baseURL = getBaseUrl(pageContext.backendUrl, pageContext.isTest);
35
+ if (!baseURL) {
36
+ baseURL = window["$vueApp"].config.globalProperties.baseURL;
37
+ }
33
38
  const listViewShowFlag = ref(false);
34
39
  let componentKey = ref(0);
35
- const baseURL = window["$vueApp"].config.globalProperties.baseURL;
36
40
  const listViewOptions = ref({
37
41
  isSql: true,
38
42
  subTableData: null,
@@ -44,8 +48,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
48
  pageContext,
45
49
  configureObj: configure,
46
50
  showPageArea: false,
47
- showOverflowTooltip: !!(configure.props && configure.props.otherSettings && (configure.props.otherSettings.isBreakLine === void 0 || configure.props.otherSettings.isBreakLine === false))
51
+ showRowForm: false,
52
+ showOverflowTooltip: !!(configure.props && configure.props.otherSettings && (configure.props.otherSettings.isBreakLine === void 0 || configure.props.otherSettings.isBreakLine === false)),
48
53
  // 单元格内容是否换行显示
54
+ backendUrl: baseURL,
55
+ cellStyleRender: getCellStyle,
56
+ rowStyleRender: getRowStyle,
57
+ titleStyleRender: getTitleStyle
49
58
  });
50
59
  if (runtimeStyle) {
51
60
  listViewOptions.value["tableStyle"] = runtimeStyle;
@@ -58,6 +67,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
58
67
  } else {
59
68
  listViewOptions.value.showPageArea = false;
60
69
  }
70
+ if (configure.props.base.showRowForm) {
71
+ listViewOptions.value.showRowForm = configure.props.base.showRowForm;
72
+ }
61
73
  const gridRef = ref(null);
62
74
  onMounted(() => {
63
75
  const tableUuid = configure.uuid;
@@ -112,6 +124,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
112
124
  listViewOptions.value["getFormData"] = getParentFormData;
113
125
  listViewOptions.value["getGridData"] = getGridData;
114
126
  listViewOptions.value.extraParam["subTableListViewCode"] = listCode;
127
+ listViewOptions.value.extraParam["beanName"] = pageContext.beanName;
115
128
  listViewOptions.value.extraParam["subtableSetting"] = configure.props && configure.props.otherSettings ? JSON.stringify(configure.props.otherSettings) : null;
116
129
  listViewOptions.value.extraParam["additionalParamMap"] = additionalParamMap;
117
130
  listViewOptions.value.extraParam["entityMap"] = pageContext.entity.data;
@@ -483,6 +496,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
483
496
  }
484
497
  }, 10);
485
498
  }
499
+ function getRowStyle(data) {
500
+ return getRowStyleUtil(data, null, props);
501
+ }
502
+ function getCellStyle(data) {
503
+ return getCellStyleUtil(data, data.cellStyle, props);
504
+ }
505
+ function getTitleStyle(data) {
506
+ const cellTitleStyle = data.titleStyle;
507
+ const rowTitleStyle = props.configure.style.titleStyle;
508
+ return getHeaderCellStyleUtil(data, { cellTitleStyle, titleStyle: rowTitleStyle }, props);
509
+ }
486
510
  __expose({
487
511
  createRow,
488
512
  getSelections,
@@ -500,7 +524,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
500
524
  key: 0,
501
525
  ref_key: "gridRef",
502
526
  ref: gridRef,
503
- url: unref(baseURL) + "/common/super-forms/sub-table",
527
+ url: unref(baseURL) + "/dsc/commons/sub-table",
504
528
  options: listViewOptions.value,
505
529
  code: unref(listCode),
506
530
  settings: unref(superGridSetting),
@@ -66,7 +66,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
66
66
  userAgent = "browser";
67
67
  }
68
68
  console.log("window.location.protocol---", window.location.protocol);
69
- const isShowScanIcon = ref(isMobile.value && scanEnable.value && window.location.protocol === "https:" ? true : false);
69
+ const isShowScanIcon = ref(
70
+ isMobile.value && scanEnable.value && window.location.protocol === "https:" ? true : false
71
+ );
70
72
  const isApk = isMobile.value && userAgent && userAgent === "app" ? true : false;
71
73
  let scanRuleSets = {};
72
74
  if (((_b = designProperty.value.scan) == null ? void 0 : _b.enable) && ((_c = designProperty.value.scan.ruleList) == null ? void 0 : _c.length) > 0) {
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from "./placeholder-runtime.vue2.js";
2
- import "./placeholder-runtime.vue3.js";
2
+ /* empty css */
3
3
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
4
  const placeholderRuntime = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a0860ff0"]]);
5
5
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode, renderList, createElementVNode } from "vue";
1
+ import { defineComponent, computed, ref, watch, onMounted, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode, renderList, createElementVNode } from "vue";
2
2
  import { getVariableValue, setVariableValue, getOptionDatasFromPage, queryOptionDatasources, autoSetAfterSelect } from "../../../../utils/page-helper-util.js";
3
3
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
4
4
  import { handleFormEvent } from "../../../../utils/events/event-util.js";
@@ -155,6 +155,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
155
155
  listOptions.value = newOptions ? newOptions : [];
156
156
  console.log("updateOptions", newOptions);
157
157
  }
158
+ onMounted(() => {
159
+ console.log("select-runtime onMounted");
160
+ });
158
161
  __expose({
159
162
  updateOptions
160
163
  });
@@ -12,6 +12,10 @@ interface MyProps {
12
12
  default: null;
13
13
  };
14
14
  isTest?: boolean;
15
+ customParams: {
16
+ type: Object;
17
+ default: null;
18
+ };
15
19
  }
16
20
  declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<MyProps>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
21
  close: (...args: any[]) => void;
@@ -8,7 +8,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  parentPageContext: {},
9
9
  parentPageEventParams: {},
10
10
  jumpPageSetting: {},
11
- isTest: { type: Boolean }
11
+ isTest: { type: Boolean },
12
+ customParams: {}
12
13
  },
13
14
  emits: ["open", "opened", "close", "closed"],
14
15
  setup(__props, { emit: __emit }) {
@@ -65,6 +66,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
65
66
  pageRequest.value["jumpMode"] = myJumpPageSetting ? myJumpPageSetting["jumpMode"] : null;
66
67
  pageRequest.value["id"] = dataId.value;
67
68
  pageRequest.value["taskId"] = taskId.value;
69
+ if (props.customParams) {
70
+ Object.assign(pageRequest.value, props.customParams);
71
+ }
68
72
  }
69
73
  return (_ctx, _cache) => {
70
74
  const _component_el_drawer = resolveComponent("el-drawer");
@@ -8,8 +8,8 @@ import _sfc_main$2 from "./assemblys/common/export-form-report-dialog.vue.js";
8
8
  import _sfc_main$3 from "./assemblys/common/task-informition-dialog.vue.js";
9
9
  import _sfc_main$4 from "./assemblys/common/remove-signer-dialog.vue.js";
10
10
  import eventBus from "../utils/eventBus.js";
11
- import { getFormData } from "../utils/api/api-util.js";
12
- import { getTaskInformitions, getRemoveSigner, exportFormReport, doImportFinally, doAddSigner, doCreateCopyTask, doAssign, doReturnTaskTo, doRemoveSigners, updateValuesWhenCloseDialog, refreshFormOrListPage, getAdditionalParamMap } from "../utils/events/standard-event.js";
11
+ import { getTaskInformitions, getRemoveSigner, getFormData, exportFormReport, doImportFinally, doAddSigner, doCreateCopyTask, doAssign, doReturnTaskTo, doRemoveSigners, updateValuesWhenCloseDialog, refreshFormOrListPage, getAdditionalParamMap } from "../utils/events/standard-event.js";
12
+ import "../utils/api/api-util.js";
13
13
  import { ElMessage } from "element-plus";
14
14
  import { useI18n } from "vue-i18n";
15
15
  import { DepartmentUserTree } from "agilebuilder-ui";
@@ -359,8 +359,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
359
359
  if (!_selectFile_.value) {
360
360
  return;
361
361
  }
362
- if (_selectFile_.value.value === "" || _selectFile_.value.value === null)
363
- return;
362
+ if (_selectFile_.value.value === "" || _selectFile_.value.value === null) return;
364
363
  const fileObj = _selectFile_.value.files[0];
365
364
  if (fileObj) {
366
365
  _selectFile_.value.value = null;
@@ -484,6 +483,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
484
483
  popPageSetting.dialogType = "drawer";
485
484
  popPageSetting.jumpPageWidth = "100%";
486
485
  }
486
+ debugger;
487
487
  jumpPageSetting.value = popPageSetting;
488
488
  isShowDialog.value = true;
489
489
  } else if (jumpMode === "refresh") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.1.48",
3
+ "version": "2.1.50-temp1",
4
4
  "description": "AgileBuilder super page runtime",
5
5
  "license": "ISC",
6
6
  "main": "dist/es/index.js",
@@ -48,7 +48,7 @@
48
48
  "@vitejs/plugin-vue-jsx": "^3.1.0",
49
49
  "@vue/eslint-config-prettier": "^8.0.0",
50
50
  "@vue/test-utils": "^2.4.4",
51
- "agilebuilder-ui": "1.0.83",
51
+ "agilebuilder-ui": "1.0.86",
52
52
  "axios": "^1.6.8",
53
53
  "cypress": "^13.6.6",
54
54
  "element-plus": "^2.6.1",