super-page-runtime 2.2.92-sit1 → 2.2.92-sit4

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.
@@ -6,7 +6,14 @@ import { PageContext, Component } from './interfaces/page-design-types';
6
6
  * @param pageContext
7
7
  * @returns
8
8
  */
9
- export declare function getComponentOptionConfigs(component: Component, pageContext: PageContext): any;
9
+ export declare function getComponentOptionConfigs(component: Component, pageContext: PageContext, systemCode: any, systemVersion: any): any;
10
+ /**
11
+ * 获取选项组类需要查询的配置信息
12
+ * @param component
13
+ * @param pageContext
14
+ * @returns
15
+ */
16
+ export declare function getComponentOptionConfigsBase(component: Component, systemCode: any, systemVersion: any): any;
10
17
  /**
11
18
  * 初始化需要查询数据的信息
12
19
  * @param component
@@ -4,31 +4,34 @@ import { executeExpression } from "agilebuilder-ui/src/utils/calculator/calculat
4
4
  import { getComponentRef } from "./global-refs.js";
5
5
  import { watch } from "vue";
6
6
  import { deepCopy, getBaseUrl } from "./common-util.js";
7
- function getComponentOptionConfigs(t, e) {
7
+ function getComponentOptionConfigs(t, e, o, n) {
8
+ return getComponentOptionConfigsBase(t, (e == null ? void 0 : e.systemCode) ? e.systemCode : o, (e == null ? void 0 : e.systemVersion) ? e == null ? void 0 : e.systemVersion : n);
9
+ }
10
+ function getComponentOptionConfigsBase(t, e, o) {
8
11
  if (!t.props || !t.props.dataOrigin) return;
9
12
  if (t.name && "table" === t.name) return;
10
- const o = t.props.dataOrigin, n = { uuid: t.uuid };
11
- if ("optionGroup" == o.optionValueSetType) n.type = "optionGroup", n.props = { code: o.optionGroup };
12
- else if ("dynamicData" == o.optionValueSetType) n.type = "dynamicData", n.filterType = o.filterType, n.props = { code: o.dynamicDataSourceCode };
13
- else if ("dataTable" == o.optionValueSetType) {
14
- n.filterType = o.filterType;
15
- const t2 = getTableQueryInfo(o, e);
16
- Object.assign(n, t2);
17
- } else if ("service" == o.optionValueSetType) {
18
- n.filterType = o.filterType;
19
- const t2 = getServiceQueryInfo(o, e);
20
- Object.assign(n, t2);
13
+ const n = t.props.dataOrigin, a = { uuid: t.uuid };
14
+ if ("optionGroup" == n.optionValueSetType) a.type = "optionGroup", a.props = { code: n.optionGroup };
15
+ else if ("dynamicData" == n.optionValueSetType) a.type = "dynamicData", a.filterType = n.filterType, a.props = { code: n.dynamicDataSourceCode };
16
+ else if ("dataTable" == n.optionValueSetType) {
17
+ a.filterType = n.filterType;
18
+ const t2 = getTableQueryInfo(n, e, o);
19
+ Object.assign(a, t2);
20
+ } else if ("service" == n.optionValueSetType) {
21
+ a.filterType = n.filterType;
22
+ const t2 = getServiceQueryInfo(n, e, o);
23
+ Object.assign(a, t2);
21
24
  }
22
- return n.type ? n : void 0;
25
+ return a.type ? a : void 0;
23
26
  }
24
- function getTableQueryInfo(t, e) {
25
- const o = { type: "dataTable" };
26
- if (o.props = { tableName: t.tableName, systemCode: t.tableSysCode ? t.tableSysCode : e.systemCode, systemVersion: t.tableSysCode ? t.tableSysVersion : e.systemVersion }, t.sortFields) {
27
+ function getTableQueryInfo(t, e, o) {
28
+ const n = { type: "dataTable" };
29
+ if (n.valueLabelSwitch = !!t.valueLabelSwitch, n.props = { tableName: t.tableName, systemCode: t.tableSysCode ? t.tableSysCode : e, systemVersion: t.tableSysVersion ? t.tableSysVersion : o }, t.sortFields) {
27
30
  const e2 = [];
28
31
  for (const o2 of t.sortFields) o2.name && e2.push({ prop: o2.name, order: o2.type ? o2.type : "asc" });
29
- o.props.sorts = e2;
32
+ n.props.sorts = e2;
30
33
  }
31
- const n = [];
34
+ const a = [];
32
35
  if (t.filterList) {
33
36
  const e2 = [];
34
37
  for (const o2 of t.filterList) {
@@ -36,29 +39,29 @@ function getTableQueryInfo(t, e) {
36
39
  o2.propDbName || (o2.propDbName = o2.propName);
37
40
  const t2 = {};
38
41
  Object.assign(t2, o2);
39
- const a2 = getParamNames(o2.propValue);
40
- for (const t3 of a2) t3 && (t3.startsWith("${data.") || t3.startsWith("${task.") || t3.startsWith("${page.")) && (n.includes(t3) || n.push(t3));
42
+ const n2 = getParamNames(o2.propValue);
43
+ for (const t3 of n2) t3 && (t3.startsWith("${data.") || t3.startsWith("${task.") || t3.startsWith("${page.")) && (a.includes(t3) || a.push(t3));
41
44
  o2.propValue, e2.push(t2);
42
45
  }
43
- o.props.searchForm = e2;
46
+ n.props.searchForm = e2;
44
47
  }
45
- o.props.monitorFields = n;
46
- const a = [];
47
- if (t.tableValueField && (o.props.valueField = t.tableValueField), t.tableLableField && -1 == a.indexOf(t.tableLableField) && (o.props.lableField = t.tableLableField), t.autoSets) for (const e2 of t.autoSets) e2.source && -1 == a.indexOf(e2.source) && a.push(e2.source);
48
- return o.props.queryFields = a, o.props.pageSize = t.displayQuantity, o;
49
- }
50
- function getServiceQueryInfo(t, e) {
51
- const o = { type: "service" };
52
- if (o.props = { serivceCode: t.serviceCode, systemCode: t.tableSysCode ? t.tableSysCode : e.systemCode, systemVersion: t.tableSysCode ? t.tableSysCode : e.systemCode }, t.serviceInputs) {
48
+ n.props.monitorFields = a;
49
+ const r = [];
50
+ if (t.tableValueField && (n.props.valueField = t.tableValueField), t.tableLableField && -1 == r.indexOf(t.tableLableField) && (n.props.lableField = t.tableLableField), t.autoSets) for (const e2 of t.autoSets) e2.source && -1 == r.indexOf(e2.source) && r.push(e2.source);
51
+ return n.props.queryFields = r, n.props.pageSize = t.displayQuantity, n;
52
+ }
53
+ function getServiceQueryInfo(t, e, o) {
54
+ const n = { type: "service" };
55
+ if (n.valueLabelSwitch = !!t.valueLabelSwitch, n.props = { serivceCode: t.serviceCode, systemCode: t.tableSysCode ? t.tableSysCode : e, systemVersion: t.tableSysVersion ? t.tableSysVersion : o }, t.serviceInputs) {
53
56
  const e2 = [];
54
57
  for (const o2 of t.serviceInputs) {
55
58
  if (!o2.name || o2.value) continue;
56
59
  const t2 = {};
57
60
  Object.assign(t2, o2), e2.push(t2);
58
61
  }
59
- o.props.inputs = e2;
62
+ n.props.inputs = e2;
60
63
  }
61
- return o.props.dataSetField = t.serviceDataSetField, o.props.valueField = t.serviceValueField, o.props.labelField = t.serviceLabelField, o;
64
+ return n.props.dataSetField = t.serviceDataSetField, n.props.valueField = t.serviceValueField, n.props.labelField = t.serviceLabelField, n;
62
65
  }
63
66
  function updateChartDatasources(t, e, o, n) {
64
67
  return new Promise((a, r) => {
@@ -358,6 +361,7 @@ export {
358
361
  formatVariableValue,
359
362
  getChartDatasFromPage,
360
363
  getComponentOptionConfigs,
364
+ getComponentOptionConfigsBase,
361
365
  getComponentOptionDatasFromPage,
362
366
  getFormPropName,
363
367
  getModelFieldFromPageContext,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.2.92-sit1",
3
+ "version": "2.2.92-sit4",
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.1.35-sit1",
51
+ "agilebuilder-ui": "1.1.35-sit2",
52
52
  "axios": "^1.6.8",
53
53
  "cypress": "^13.6.6",
54
54
  "element-plus": "^2.6.1",