super-page-runtime 2.1.50-temp1 → 2.1.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +110 -3
  2. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +7 -0
  3. package/dist/es/components/runtime/utils/charts/chart-util.js +14 -0
  4. package/dist/es/components/runtime/utils/common-util.d.ts +1 -0
  5. package/dist/es/components/runtime/utils/common-util.js +4 -0
  6. package/dist/es/components/runtime/utils/events/event-util.d.ts +1 -0
  7. package/dist/es/components/runtime/utils/events/event-util.js +14 -1
  8. package/dist/es/components/runtime/utils/events/standard-event.js +5 -2
  9. package/dist/es/components/runtime/utils/events/validator-util.js +25 -5
  10. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +1 -0
  11. package/dist/es/components/runtime/utils/page-helper-util.d.ts +18 -0
  12. package/dist/es/components/runtime/utils/page-helper-util.js +25 -5
  13. package/dist/es/components/runtime/utils/page-init-util.js +5 -2
  14. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +1 -1
  15. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +2 -1
  16. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +64 -0
  17. package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +4 -0
  18. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +83 -20
  19. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +1 -1
  20. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +102 -35
  21. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +7 -1
  22. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +7 -1
  23. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +1 -0
  24. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
  25. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +1 -0
  26. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +49 -26
  27. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +18 -8
  28. package/dist/es/components/runtime/views/super-page.vue.js +2 -1
  29. package/package.json +2 -2
@@ -1,9 +1,10 @@
1
- import { defineComponent, ref, onMounted, resolveComponent, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, withDirectives, createVNode, vShow, withCtx, Fragment, renderList, createBlock, watch, h } from "vue";
1
+ import { defineComponent, ref, onMounted, resolveComponent, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, withDirectives, createVNode, vShow, withCtx, Fragment, renderList, createBlock, createCommentVNode, watch, h } from "vue";
2
2
  import _sfc_main$1 from "../common/common-chart-header.vue.js";
3
- import { getChartDatasFromPage, isPromise, getValueFromVariable } from "../../../../utils/page-helper-util.js";
3
+ import { getChartDatasFromPage, isPromise, getValueFromVariable, setValueForVariableName, updateChartDatasourcesByComponent } from "../../../../utils/page-helper-util.js";
4
4
  import { getCustomFunc } from "../../../../utils/events/event-util.js";
5
5
  import _sfc_main$2 from "./group-column.vue.js";
6
6
  import _sfc_main$3 from "./normal-column.vue.js";
7
+ import _sfc_main$4 from "./table-pageination.vue.js";
7
8
  import { getSummaryTitleColumn, getSummaryDataColumn, rowDataToColumn, getColumnToRowTableConfig, colDataToRow, computeFormula, summaryStatistics, replacePlaceholders, getHeaderCellStyleUtil, getRowStyleUtil, getCellStyleUtil, getIndexColumn } from "./chart-table-util.js";
8
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
10
  __name: "table-runtime",
@@ -42,6 +43,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
43
  const groupSummaryDataRowIndex = [];
43
44
  const columnStyleSourceConfig = ref({});
44
45
  const dataFormulaMapping = ref({});
46
+ const total = ref(0);
47
+ let tmpTableData = [];
45
48
  if (!props.configure.props.modelCustom) {
46
49
  if (!isEnableGroupHeader.value) {
47
50
  tableColumnsConfig.value = props.configure.items;
@@ -83,7 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
83
86
  watch(
84
87
  () => path.reduce((obj, key) => obj[key], props.pageContext.entity),
85
88
  (newVal) => {
86
- loadTable(JSON.parse(JSON.stringify(newVal)));
89
+ loadTable(JSON.parse(JSON.stringify(newVal)), null);
87
90
  }
88
91
  );
89
92
  }
@@ -124,7 +127,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
124
127
  }
125
128
  }
126
129
  }
127
- let tmpTableData = [];
128
130
  if (props.configure.props.dataOrigin.dataSource === "service" && resultData.result) {
129
131
  tmpTableData = resultData.result[props.configure.props.dataOrigin.service.serviceDataField];
130
132
  } else if (props.configure.props.dataOrigin.dataSource === "variable") {
@@ -135,16 +137,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
135
137
  );
136
138
  }
137
139
  if (tmpTableData) {
138
- loadTable(tmpTableData);
140
+ loadTable(tmpTableData, resultData);
139
141
  }
140
142
  }
141
- function loadTable(tmpTableData) {
143
+ function loadTable(tmpTableData2, resultData) {
144
+ var _a2;
142
145
  if (enableTransition("rowToColumn")) {
143
- tmpTableData = rowDataToColumn(tmpTableData, props.configure);
146
+ tmpTableData2 = rowDataToColumn(tmpTableData2, props.configure);
144
147
  if (!isEnableGroupHeader.value) {
145
148
  const updatedColumnConfig = updateColumnConfig(
146
149
  tableColumnsConfig.value,
147
- tmpTableData,
150
+ tmpTableData2,
148
151
  props.configure.props.dataOrigin.rowToColumn.titleColumns,
149
152
  props.configure.props.dataOrigin.rowToColumn.dataColumns
150
153
  );
@@ -154,26 +157,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
154
157
  if (!isEnableGroupHeader.value) {
155
158
  tableColumnsConfig.value = getColumnToRowTableConfig(props.configure);
156
159
  }
157
- tmpTableData = colDataToRow(tmpTableData, props.configure);
160
+ tmpTableData2 = colDataToRow(tmpTableData2, props.configure);
158
161
  }
159
162
  if (props.configure.props.dataOrigin.dataFormatting) {
160
163
  const func = getCustomFunc(props.pageContext, props.configure.props.dataOrigin.dataFormatting);
161
164
  if (func) {
162
- const resultValue = func.apply(func, [{ tableData: tmpTableData }]);
165
+ const resultValue = func.apply(func, [{ tableData: tmpTableData2 }]);
163
166
  if (resultValue) {
164
- tmpTableData = resultValue;
167
+ tmpTableData2 = resultValue;
165
168
  }
166
169
  }
167
170
  }
168
- if (Object.keys(dataFormulaMapping.value).length > 0 && tmpTableData && tmpTableData.length > 0) {
169
- tmpTableData.forEach((item) => {
171
+ if (Object.keys(dataFormulaMapping.value).length > 0 && tmpTableData2 && tmpTableData2.length > 0) {
172
+ tmpTableData2.forEach((item) => {
170
173
  Object.keys(dataFormulaMapping.value).forEach((key) => {
171
174
  const formula = dataFormulaMapping.value[key];
172
175
  item[key] = computeFormula(item, formula);
173
176
  });
174
177
  });
175
178
  }
176
- tableData.value = tmpTableData;
179
+ if ((_a2 = props.configure.pageination) == null ? void 0 : _a2.enable) {
180
+ tableDataPageination(resultData);
181
+ } else {
182
+ tableData.value = tmpTableData2;
183
+ }
177
184
  if (props.configure.props.highOrder.groupField && props.configure.props.highOrder.groupField.length > 0) {
178
185
  const groupField = props.configure.props.highOrder.groupField;
179
186
  tableData.value = groupAndAddTotals(tableData.value, groupField);
@@ -234,7 +241,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
234
241
  }
235
242
  }
236
243
  } else {
237
- if (highOrder && highOrder.mergeColumn) ;
244
+ if (highOrder && highOrder.mergeColumn)
245
+ ;
238
246
  if (highOrder && highOrder.mergeRow && highOrder.mergeRow.includes(property)) {
239
247
  if (rowIndex === 0) {
240
248
  return {
@@ -327,18 +335,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
327
335
  const groupResult = Object.values(groupedData);
328
336
  for (let i = 0; i < groupResult.length; i++) {
329
337
  const group = groupResult[i];
330
- const total = {};
338
+ const total2 = {};
331
339
  summaryColumns == null ? void 0 : summaryColumns.forEach((column) => {
332
340
  const prop = column.props.base.prop;
333
341
  const res = summaryStatistics(groupSummaryColumns.value[prop], group, prop, props.pageContext);
334
- total[prop] = res;
342
+ total2[prop] = res;
335
343
  });
336
344
  result.push(...group);
337
345
  groupColumns == null ? void 0 : groupColumns.forEach((column) => {
338
346
  const prop = column.props.base.prop;
339
- total[prop] = replacePlaceholders(column.props.base.summaryTitle, group[0]);
347
+ total2[prop] = replacePlaceholders(column.props.base.summaryTitle, group[0]);
340
348
  });
341
- result.push(total);
349
+ result.push(total2);
342
350
  groupSummaryDataRowIndex.push(result.length - 1);
343
351
  }
344
352
  return result;
@@ -351,6 +359,53 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
351
359
  }
352
360
  }
353
361
  }
362
+ function tableDataPageination(resultData) {
363
+ if (props.configure.pageination.type === "frontend") {
364
+ total.value = tmpTableData.length;
365
+ frontendPageination(1, props.configure.pageination.pageSize);
366
+ } else if (props.configure.pageination.type === "backend") {
367
+ tableData.value = tmpTableData;
368
+ if (props.configure.pageination.totalFrom) {
369
+ total.value = resultData.result[props.configure.pageination.totalFrom];
370
+ }
371
+ }
372
+ }
373
+ function pageChange(currentPage, pageSize) {
374
+ if (props.configure.pageination.type === "frontend") {
375
+ frontendPageination(currentPage, pageSize);
376
+ } else {
377
+ backendPageination(currentPage, pageSize);
378
+ }
379
+ }
380
+ function pageSizeChange(currentPage, pageSize) {
381
+ if (props.configure.pageination.type === "frontend") {
382
+ frontendPageination(currentPage, pageSize);
383
+ } else {
384
+ backendPageination(currentPage, pageSize);
385
+ }
386
+ }
387
+ function frontendPageination(currentPage, pageSize) {
388
+ if (tmpTableData) {
389
+ tableData.value = tmpTableData.slice((currentPage - 1) * pageSize, currentPage * pageSize);
390
+ }
391
+ }
392
+ function backendPageination(currentPage, pageSize) {
393
+ if (props.configure.pageination.currentPageSet) {
394
+ setValueForVariableName(
395
+ props.pageContext.entity,
396
+ props.configure.pageination.currentPageSet,
397
+ currentPage
398
+ );
399
+ }
400
+ if (props.configure.pageination.pageSizeSet) {
401
+ setValueForVariableName(
402
+ props.pageContext.entity,
403
+ props.configure.pageination.pageSizeSet,
404
+ pageSize
405
+ );
406
+ }
407
+ updateChartDatasourcesByComponent(props.pageContext, props.configure.uuid);
408
+ }
354
409
  function exportChart() {
355
410
  }
356
411
  __expose({
@@ -408,7 +463,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
408
463
  }), 128))
409
464
  ]),
410
465
  _: 1
411
- }, 8, ["data", "show-summary", "stripe"])
466
+ }, 8, ["data", "show-summary", "stripe"]),
467
+ __props.configure.pageination && __props.configure.pageination.enable ? (openBlock(), createBlock(_sfc_main$4, {
468
+ key: 0,
469
+ configure: __props.configure,
470
+ "table-data": tableData.value,
471
+ total: total.value,
472
+ onPageChange: pageChange,
473
+ onPageSizeChange: pageSizeChange
474
+ }, null, 8, ["configure", "table-data", "total"])) : createCommentVNode("", true)
412
475
  ], 6);
413
476
  };
414
477
  }
@@ -15,6 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  const runtimeStyle = ref(runtimeInfo.style ? runtimeInfo.style : {});
16
16
  const runtimeClass = runtimeInfo.class;
17
17
  onMounted(() => {
18
+ console.log("tools-runtime.vue-onMounted");
18
19
  if (thisRef.value && thisRef.value.parentNode) {
19
20
  const resizeObserver2 = new ResizeObserver((entries) => {
20
21
  for (let entry of entries) {
@@ -23,7 +24,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
24
  });
24
25
  resizeObserver2.observe(thisRef.value.parentNode);
25
26
  }
26
- console.log("tools-runtime onMounted");
27
27
  });
28
28
  onUnmounted(() => {
29
29
  });
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, onMounted, watch, onUnmounted, resolveComponent, openBlock, createElementBlock, createVNode, unref } from "vue";
2
2
  import "agilebuilder-ui";
3
3
  import { setTableEvents, canExecuteButton, doAfterClickEvent, getEventNameByType, doBeforeClickEvent, getHandleEvent, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick } from "../../../../utils/events/event-util.js";
4
- import { getBaseUrl, getListCode, getRealRestApiPath } from "../../../../utils/common-util.js";
4
+ import { getBaseUrl, getListCode, getRealRestApiPath, isVariableInvalidValue } 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";
@@ -9,6 +9,7 @@ import eventBus from "../../../../utils/eventBus.js";
9
9
  import { getPermissionCodes, getDefaultValue } from "../../../../utils/page-init-util.js";
10
10
  import { decomposeVariable, getSizeConfig } from "../../../../utils/page-helper-util.js";
11
11
  import { getRowStyleUtil, getCellStyleUtil, getHeaderCellStyleUtil } from "../../chart/table/chart-table-util.js";
12
+ import "../../../../utils/global-refs.js";
12
13
  const _sfc_main = /* @__PURE__ */ defineComponent({
13
14
  __name: "main-table-runtime",
14
15
  props: {
@@ -40,7 +41,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
41
  const operationButtonObj = ref({});
41
42
  const listOptions = ref({});
42
43
  listOptions.value = getOptions();
43
- const gridRef = ref(null);
44
+ const gridRef = ref();
44
45
  const urlToListData = getUrlToListData();
45
46
  const listCode = getListCode(pageContext.code, pageContext.version, configure.uuid);
46
47
  const myPageCode = pageContext.code;
@@ -52,6 +53,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
52
53
  const superGridSetting = superGridItems ? superGridItems[configure.uuid] : null;
53
54
  console.log("superGridSetting1111===", superGridItems, superGridSetting);
54
55
  const isCanShowMobileSearch = ref(false);
56
+ const linkageVariable = [];
55
57
  onMounted(() => {
56
58
  window.addEventListener("message", recieveMessage);
57
59
  eventBus.$on(
@@ -89,26 +91,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
89
91
  searchGridData(props.pageContext.entity.data);
90
92
  }
91
93
  );
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
- });
110
- }
111
- }
112
94
  onUnmounted(() => {
113
95
  eventBus.$off(eventPageInfo + "-close-component-page-dialog");
114
96
  eventBus.$off(eventPageInfo + "_close-dialog-get-entity");
@@ -148,7 +130,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
148
130
  esc: escRestorRow
149
131
  },
150
132
  indexContinuous: configure.props && configure.props.otherSettings ? configure.props.otherSettings.serialNumberContinuous : false,
151
- initSearch: configure.props && configure.props.base.initializationQuery ? configure.props.base.initializationQuery : true,
133
+ initSearch: configure.props && configure.props.dataOrigin.initializationQuery === false ? false : true,
152
134
  // 初始化时是否查询,默认是查询
153
135
  resizeHeight: resizeListHeight,
154
136
  pageCode: pageContext.code,
@@ -174,7 +156,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
174
156
  };
175
157
  setOperationButtons(options);
176
158
  setSortInfo(options);
177
- myGetDataTypeMap();
159
+ const getDataTypeMap = myGetDataTypeMap();
160
+ if (getDataTypeMap) {
161
+ getDataTypeMap.then(() => {
162
+ if (configure.props.linkages && configure.props.linkages.length > 0) {
163
+ configure.props.linkages.forEach((linkage) => {
164
+ const variablePath = decomposeVariable(linkage.fieldName);
165
+ if (variablePath && variablePath.length > 1) {
166
+ linkageVariable.push(variablePath[1]);
167
+ }
168
+ });
169
+ if (linkageVariable.length > 0) {
170
+ addLinkageWatch();
171
+ }
172
+ }
173
+ });
174
+ }
178
175
  setTreeSetting(options);
179
176
  setGridEvents(options);
180
177
  return options;
@@ -195,7 +192,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
195
192
  if (!backendUrl && !tableName) {
196
193
  return;
197
194
  }
198
- getDataTypeMapRequest(backendUrl, tableName, pageContext.isTest).then((result) => {
195
+ return getDataTypeMapRequest(backendUrl, tableName, pageContext.isTest).then((result) => {
199
196
  if (!pageContext["dataTypeMaps"]) {
200
197
  pageContext["dataTypeMaps"] = {};
201
198
  }
@@ -504,6 +501,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
504
501
  }
505
502
  function searchGridData(data) {
506
503
  if (!pageContext["dataTypeMaps"] || !pageContext["dataTypeMaps"][tableName]) {
504
+ console.log("!pageContext['dataTypeMaps'] || !pageContext['dataTypeMaps'][tableName]");
507
505
  return;
508
506
  }
509
507
  const dataTypeObj = pageContext["dataTypeMaps"][tableName];
@@ -553,6 +551,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
553
551
  }
554
552
  }
555
553
  }
554
+ console.log("toolbarRefresh");
556
555
  gridRef.value.toolbarRefresh(null, null, toolbarFieldParam);
557
556
  }
558
557
  function resizeListHeight(params) {
@@ -599,7 +598,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
599
598
  rowIndex,
600
599
  button
601
600
  };
602
- debugger;
603
601
  const buttonConfigure = operationButtonObj.value[button.sourceButton.uuid];
604
602
  const tableConfigure = configure;
605
603
  buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
@@ -712,6 +710,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
712
710
  function canShowMobileSearch(listCode2) {
713
711
  isCanShowMobileSearch.value = true;
714
712
  }
713
+ function getRowStyle(data) {
714
+ return getRowStyleUtil(data, [], props);
715
+ }
716
+ function getCellStyle(data) {
717
+ return getCellStyleUtil(data, data.cellStyle, props);
718
+ }
719
+ function getTitleStyle(data) {
720
+ const cellTitleStyle = data.titleStyle;
721
+ const rowTitleStyle = props.configure.style.titleStyle;
722
+ return getHeaderCellStyleUtil(
723
+ data,
724
+ { cellTitleStyle, titleStyle: rowTitleStyle },
725
+ props
726
+ );
727
+ }
715
728
  function getLinkageVariableValues() {
716
729
  const values = {};
717
730
  linkageVariable.forEach((variable) => {
@@ -719,16 +732,69 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
719
732
  });
720
733
  return values;
721
734
  }
722
- function getRowStyle(data) {
723
- return getRowStyleUtil(data, null, props);
735
+ function addLinkageWatch() {
736
+ if (props.pageContext.toolsInputComponents && props.pageContext.toolsInputComponents.length > 0) {
737
+ let waitComponentRenderProps = [];
738
+ props.pageContext.toolsInputComponents.forEach((componentItem) => {
739
+ const isLinkComponent = configure.props.linkages.some(
740
+ (linkage) => linkage.fieldName === componentItem.prop
741
+ );
742
+ if (isLinkComponent && componentItem.defaultValue) {
743
+ const variablePath = decomposeVariable(componentItem.prop);
744
+ if (variablePath && variablePath.length > 1) {
745
+ waitComponentRenderProps.push(variablePath[1]);
746
+ }
747
+ }
748
+ });
749
+ if (waitComponentRenderProps.length === 0) {
750
+ linkageVariableWatch();
751
+ } else {
752
+ const values = getLinkageVariableValues();
753
+ waitComponentRenderProps = waitComponentRenderProps.filter((unsetVariable) => {
754
+ return isVariableInvalidValue(values, unsetVariable);
755
+ });
756
+ if (waitComponentRenderProps.length === 0) {
757
+ searchGridData(values);
758
+ linkageVariableWatch();
759
+ } else {
760
+ linkageVariable.forEach((variable) => {
761
+ watch(
762
+ () => props.pageContext.entity.page[variable],
763
+ () => {
764
+ const values2 = getLinkageVariableValues();
765
+ if (waitComponentRenderProps.length === 0) {
766
+ searchGridData(values2);
767
+ } else {
768
+ waitComponentRenderProps = waitComponentRenderProps.filter((unsetVariable) => {
769
+ return isVariableInvalidValue(values2, unsetVariable);
770
+ });
771
+ if (waitComponentRenderProps.length === 0) {
772
+ searchGridData(values2);
773
+ }
774
+ }
775
+ },
776
+ { immediate: true }
777
+ );
778
+ });
779
+ }
780
+ }
781
+ }
724
782
  }
725
- function getCellStyle(data) {
726
- return getCellStyleUtil(data, data.cellStyle, props);
783
+ function linkageVariableWatch() {
784
+ linkageVariable.forEach((variable) => {
785
+ watch(
786
+ () => props.pageContext.entity.page[variable],
787
+ () => {
788
+ const values = getLinkageVariableValues();
789
+ searchGridData(values);
790
+ }
791
+ );
792
+ });
727
793
  }
728
- function getTitleStyle(data) {
729
- const cellTitleStyle = data.titleStyle;
730
- const rowTitleStyle = props.configure.style.titleStyle;
731
- return getHeaderCellStyleUtil(data, { cellTitleStyle, titleStyle: rowTitleStyle }, props);
794
+ function getTableSelectOptions() {
795
+ if (gridRef.value) {
796
+ return gridRef.value.getTableSelectOptions(listCode);
797
+ }
732
798
  }
733
799
  __expose({
734
800
  refresh,
@@ -739,7 +805,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
739
805
  getTableConfigure,
740
806
  isDeleteChange,
741
807
  validatorSunTableListData,
742
- showMobileSearch
808
+ showMobileSearch,
809
+ getTableSelectOptions
743
810
  });
744
811
  return (_ctx, _cache) => {
745
812
  const _component_super_grid = resolveComponent("super-grid");
@@ -507,6 +507,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
507
507
  const rowTitleStyle = props.configure.style.titleStyle;
508
508
  return getHeaderCellStyleUtil(data, { cellTitleStyle, titleStyle: rowTitleStyle }, props);
509
509
  }
510
+ function getTableSelectOptions() {
511
+ if (gridRef.value) {
512
+ return gridRef.value.getTableSelectOptions(listCode);
513
+ }
514
+ }
510
515
  __expose({
511
516
  createRow,
512
517
  getSelections,
@@ -515,7 +520,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
515
520
  getTableConfigure,
516
521
  validatorSunTableListData,
517
522
  getValue,
518
- setValue
523
+ setValue,
524
+ getTableSelectOptions
519
525
  });
520
526
  return (_ctx, _cache) => {
521
527
  const _component_super_grid = resolveComponent("super-grid");
@@ -57,6 +57,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
57
57
  function showMobileSearch() {
58
58
  gridRef.value.showMobileSearch();
59
59
  }
60
+ function getTableSelectOptions() {
61
+ if (gridRef.value) {
62
+ return gridRef.value.getTableSelectOptions();
63
+ }
64
+ }
60
65
  __expose({
61
66
  refresh,
62
67
  createRow,
@@ -66,7 +71,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
66
71
  getTableConfigure,
67
72
  isDeleteChange,
68
73
  validatorSunTableListData,
69
- showMobileSearch
74
+ showMobileSearch,
75
+ getTableSelectOptions
70
76
  });
71
77
  return (_ctx, _cache) => {
72
78
  return openBlock(), createElementBlock("div", null, [
@@ -38,6 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38
38
  return getVariableValue(entity, dynamicFields);
39
39
  },
40
40
  set(value) {
41
+ value = value.trim();
41
42
  setVariableValue(entity, dynamicFields, value);
42
43
  }
43
44
  });
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from "./placeholder-runtime.vue2.js";
2
- /* empty css */
2
+ import "./placeholder-runtime.vue3.js";
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, ref, watch, onMounted, onBeforeUnmount, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createElementVNode } from "vue";
1
+ import { defineComponent, ref, watch, onMounted, onBeforeUnmount, resolveComponent, openBlock, createElementBlock, Fragment, createBlock, normalizeClass, unref, normalizeStyle, withCtx, toDisplayString, createCommentVNode, createElementVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { formatVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
4
  import Quill from "quill";
@@ -6,6 +6,7 @@ import "quill/dist/quill.snow.css";
6
6
  import { handleFormEvent } from "../../../../utils/events/event-util.js";
7
7
  import http from "agilebuilder-ui/src/utils/request";
8
8
  import { $t } from "../../../../utils/i18n-util.js";
9
+ import { getToken } from "agilebuilder-ui/src/utils/auth";
9
10
  const _hoisted_1 = { style: { "width": "100%", "height": "100%" } };
10
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
11
12
  __name: "richtext-runtime",
@@ -104,6 +105,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
104
105
  quill.container.style.height = newHeight + "px";
105
106
  }
106
107
  }
108
+ const previewList = ref([]);
109
+ const showViewer = ref(false);
107
110
  onMounted(() => {
108
111
  var _a;
109
112
  quill = new Quill(quillEditorRef.value, option.value);
@@ -129,7 +132,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
129
132
  for (let i2 = 0; i2 < images.length; i2++) {
130
133
  const img = images[i2];
131
134
  if (img.src === dataurl) {
132
- img.src = res.url;
135
+ img.src = res.url + "&jwt=" + getToken();
133
136
  }
134
137
  }
135
138
  }
@@ -141,6 +144,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
141
144
  }
142
145
  setVariableValue(entity, dynamicFields, quill.root.innerHTML);
143
146
  });
147
+ const editorContainer = quill.container;
148
+ editorContainer.addEventListener("click", function(event) {
149
+ if (event.target.localName === "img") {
150
+ previewList.value = [];
151
+ let imgSrc = event.target.src;
152
+ previewList.value.push(imgSrc);
153
+ showViewer.value = true;
154
+ }
155
+ });
144
156
  updateEditorHeight();
145
157
  });
146
158
  onBeforeUnmount(() => {
@@ -181,30 +193,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
181
193
  }
182
194
  return (_ctx, _cache) => {
183
195
  const _component_el_form_item = resolveComponent("el-form-item");
184
- return designProperty.value.tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
185
- key: 0,
186
- required: designProperty.value.required,
187
- class: normalizeClass(unref(runtimeClass)),
188
- "label-width": designProperty.value.labelWidth,
189
- style: normalizeStyle(unref(runtimeStyle))
190
- }, {
191
- label: withCtx(() => [
192
- designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
193
- key: 0,
194
- style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
195
- }, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
196
- ]),
197
- default: withCtx(() => [
198
- createElementVNode("div", _hoisted_1, [
199
- createElementVNode("div", {
200
- ref_key: "quillEditorRef",
201
- ref: quillEditorRef,
202
- style: { "width": "100%" }
203
- }, null, 512)
204
- ])
205
- ]),
206
- _: 1
207
- }, 8, ["required", "class", "label-width", "style"])) : createCommentVNode("", true);
196
+ const _component_el_image_viewer = resolveComponent("el-image-viewer");
197
+ return openBlock(), createElementBlock(Fragment, null, [
198
+ designProperty.value.tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
199
+ key: 0,
200
+ required: designProperty.value.required,
201
+ class: normalizeClass(unref(runtimeClass)),
202
+ "label-width": designProperty.value.labelWidth,
203
+ style: normalizeStyle(unref(runtimeStyle))
204
+ }, {
205
+ label: withCtx(() => [
206
+ designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
207
+ key: 0,
208
+ style: normalizeStyle({ ...unref(headerStyle), ...unref(titleExceedStyle) })
209
+ }, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
210
+ ]),
211
+ default: withCtx(() => [
212
+ createElementVNode("div", _hoisted_1, [
213
+ createElementVNode("div", {
214
+ ref_key: "quillEditorRef",
215
+ ref: quillEditorRef,
216
+ style: { "width": "100%" }
217
+ }, null, 512)
218
+ ])
219
+ ]),
220
+ _: 1
221
+ }, 8, ["required", "class", "label-width", "style"])) : createCommentVNode("", true),
222
+ showViewer.value ? (openBlock(), createBlock(_component_el_image_viewer, {
223
+ key: 1,
224
+ "hide-on-click-modal": "",
225
+ onClose: _cache[0] || (_cache[0] = () => {
226
+ showViewer.value = false;
227
+ }),
228
+ "url-list": previewList.value
229
+ }, null, 8, ["url-list"])) : createCommentVNode("", true)
230
+ ], 64);
208
231
  };
209
232
  }
210
233
  });