super-page-runtime 2.0.76 → 2.0.81

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 (27) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +10 -0
  2. package/dist/es/components/runtime/utils/api/api-util.d.ts +2 -2
  3. package/dist/es/components/runtime/utils/api/api-util.js +23 -14
  4. package/dist/es/components/runtime/utils/api/page-expose-util.js +136 -66
  5. package/dist/es/components/runtime/utils/common-util.d.ts +8 -0
  6. package/dist/es/components/runtime/utils/common-util.js +20 -0
  7. package/dist/es/components/runtime/utils/events/event-util.js +43 -2
  8. package/dist/es/components/runtime/utils/events/standard-event.js +84 -41
  9. package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -0
  10. package/dist/es/components/runtime/utils/events/validator-util.js +42 -55
  11. package/dist/es/components/runtime/utils/global-refs.d.ts +6 -0
  12. package/dist/es/components/runtime/utils/global-refs.js +11 -0
  13. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +1 -0
  14. package/dist/es/components/runtime/utils/page-helper-util.js +4 -6
  15. package/dist/es/components/runtime/utils/page-init-util.d.ts +3 -1
  16. package/dist/es/components/runtime/utils/page-init-util.js +71 -16
  17. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +9 -2
  18. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -1
  19. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +4 -2
  20. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +5 -17
  21. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -1
  22. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +3 -2
  23. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +35 -15
  24. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +2 -2
  25. package/dist/es/components/runtime/views/super-page.vue.js +10 -7
  26. package/dist/es/style.css +3 -0
  27. package/package.json +2 -2
@@ -1,15 +1,18 @@
1
1
  import http from "agilebuilder-ui/src/utils/request";
2
- import { useRoute } from "vue-router";
2
+ import "vue-router";
3
3
  import { getAdditionalParamMap } from "./events/standard-event.js";
4
4
  import { PageDimensions } from "./interfaces/page-design-types.js";
5
5
  import { setVariableValue, formatVariableValue, getFormPropName } from "./page-helper-util.js";
6
6
  import { getSessionCache } from "agilebuilder-ui/src/utils/auth";
7
+ import { functions } from "./api/page-expose-util.js";
8
+ import { deepCopy } from "./common-util.js";
7
9
  function queryPageDesignByCode(pageCode) {
8
10
  return http.get(
9
11
  window["$vueApp"].config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + pageCode
10
12
  );
11
13
  }
12
14
  function convertToPageContext(pageDesign, pageRequest) {
15
+ var _a;
13
16
  if (pageDesign == null) {
14
17
  return null;
15
18
  }
@@ -29,24 +32,23 @@ function convertToPageContext(pageDesign, pageRequest) {
29
32
  // 表格uuid集合
30
33
  listCodes: pageDesign.listCodes,
31
34
  // 当前页面中表格对应的数据表名集合,后台保存子表记录时需要
32
- formNoRuleCode: pageDesign.formNoRuleCode,
35
+ formNoRuleCode: pageDesign.props ? pageDesign.props.formNoRuleCode : null,
33
36
  // 表单编号规则
34
- judgeHeavyList: pageDesign.judgeHeavyList,
37
+ judgeHeavyList: pageDesign.props && pageDesign.props.judgeHeavyList.length > 0 ? pageDesign.props.judgeHeavyList : null,
35
38
  // 判重组合字段集合配置
36
- conversionCodes: pageDesign.conversionCodes,
37
- // 数据转换规则
39
+ // conversionCodes: pageDesign.conversionCodes, // 数据转换规则。按钮上配置的,此处不需要
38
40
  pageType: pageDesign.pageType,
39
41
  // 页面类型:form、list、chart
40
- beanName: pageDesign.beanName,
42
+ beanName: pageDesign.props ? pageDesign.props.beanName : null,
41
43
  // 业务处理类,继承CommonBaseService接口的类
42
- importBeanName: pageDesign.importBeanName,
44
+ importBeanName: pageDesign.props ? pageDesign.props.importBeanName : null,
43
45
  // 导入处理类,继承ImportDefinitionService接口的类
44
- notIdInitializationList: pageDesign.notIdInitializationList,
45
- // 无ID或taskId时初始条件配置
46
46
  subTablePageInfo: pageDesign.subTablePageInfo,
47
47
  // 列表分页信息,格式是:{列表编码: 每页显示多少条记录},表单页面中校验有分页的子表时提示使用,提示信息格式:第 {pageNum} 页第 {row} 行记录
48
48
  workflowCode: pageDesign.workflowCode,
49
49
  workflowVersion: pageDesign.workflowVersion,
50
+ refercePropMap: (_a = pageDesign.runtime) == null ? void 0 : _a.refercePropMap,
51
+ //当前表单页面中引用字段信息集合,get请求时需要使用,格式为{tableName:[字段名,.. ... ], tableName:[字段名,.. ... ]}
50
52
  entity: {
51
53
  data: {},
52
54
  task: {},
@@ -57,6 +59,15 @@ function convertToPageContext(pageDesign, pageRequest) {
57
59
  system: {}
58
60
  }
59
61
  };
62
+ if (pageDesign.props && pageDesign.props.notIdInitializationList) {
63
+ let notIdInitializationList = pageDesign.props.notIdInitializationList;
64
+ if (typeof notIdInitializationList === "string") {
65
+ notIdInitializationList = JSON.parse(notIdInitializationList);
66
+ }
67
+ if (notIdInitializationList.length > 0) {
68
+ pageContext["notIdInitializationList"] = notIdInitializationList;
69
+ }
70
+ }
60
71
  if (pageDesign.variables) {
61
72
  const pageObj = pageContext.entity.page;
62
73
  for (const variable of pageDesign.variables) {
@@ -90,10 +101,12 @@ function getPageDimensions() {
90
101
  function getRequestObject(pageRequest) {
91
102
  const requestObj = {};
92
103
  if (pageRequest) {
104
+ console.log("getRequestObject11----pageRequest=", pageRequest);
93
105
  const paramStoreId = pageRequest.paramStoreId;
94
106
  packageAdditionalMap(paramStoreId, requestObj);
95
107
  delete pageRequest.paramStoreId;
96
108
  Object.assign(requestObj, pageRequest);
109
+ console.log("getRequestObject22----requestObj=", requestObj);
97
110
  }
98
111
  let url = decodeURI(window.location.href);
99
112
  if (url && url.includes("?")) {
@@ -104,20 +117,23 @@ function getRequestObject(pageRequest) {
104
117
  requestObj[paramStrs[0]] = paramStrs.length > 1 ? paramStrs[1] : "";
105
118
  }
106
119
  }
107
- const route = useRoute();
120
+ if (requestObj["_t_"]) ;
121
+ return requestObj;
122
+ }
123
+ function packageAdditionalMapWithRoute(route, requestObj) {
124
+ console.log("packageAdditionalMapWithRoute----route=", route);
108
125
  if (route) {
109
126
  if (route.params) {
110
127
  Object.assign(requestObj, route.params);
111
128
  }
129
+ console.log("packageAdditionalMapWithRoute----route.query=", route.query);
112
130
  if (route.query) {
113
131
  Object.assign(requestObj, route.query);
114
132
  const paramStoreId = route.query.paramStoreId;
115
133
  packageAdditionalMap(paramStoreId, requestObj);
116
134
  }
135
+ console.log("packageAdditionalMapWithRoute----requestObj=", requestObj);
117
136
  }
118
- if (requestObj["_t_"])
119
- ;
120
- return requestObj;
121
137
  }
122
138
  function packageAdditionalMap(paramStoreId, requestObj) {
123
139
  if (paramStoreId) {
@@ -129,11 +145,10 @@ function packageAdditionalMap(paramStoreId, requestObj) {
129
145
  }
130
146
  }
131
147
  }
132
- function getModelFields(pageContext, formItemConfigure, prop) {
148
+ function getModelFields(formItemConfigure, prop) {
133
149
  if (!formItemConfigure) {
134
150
  return ["temp"];
135
151
  }
136
- pageContext.entity;
137
152
  let propsBase;
138
153
  let propName = prop;
139
154
  if (!prop) {
@@ -160,7 +175,7 @@ function getModelFields(pageContext, formItemConfigure, prop) {
160
175
  return fields;
161
176
  }
162
177
  function getFormModelFields(pageContext, formItemConfigure, prop) {
163
- const fields = getModelFields(pageContext, formItemConfigure, prop);
178
+ const fields = getModelFields(formItemConfigure, prop);
164
179
  const entity = pageContext.entity;
165
180
  if (entity.data.ID == void 0 && entity.data.id == void 0) {
166
181
  let propsBase;
@@ -294,12 +309,52 @@ function packageFormRules(pageContext, configure) {
294
309
  }
295
310
  }
296
311
  }
312
+ function controlObjectRenderState(pageContext, propName) {
313
+ if (pageContext.initInfo) {
314
+ const types = ["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"];
315
+ types.forEach((type) => {
316
+ const infos = pageContext.initInfo[type];
317
+ if (infos) {
318
+ if (type === "dynamicControlFormEdit") {
319
+ let settings = infos.filter((item) => item.name === "_all_fields" || item.name === propName);
320
+ if (settings && settings.length > 0) {
321
+ settings = settings.filter((item) => item.name === "_all_fields");
322
+ if (settings && settings.length > 0) {
323
+ const copySetting = deepCopy(settings[0]);
324
+ copySetting.name = propName;
325
+ settings = [copySetting];
326
+ }
327
+ }
328
+ functions.dynamicControlFormEdit(pageContext, settings, false);
329
+ } else if (type === "disableElement") {
330
+ if (infos.indexOf(propName) >= 0) {
331
+ functions.disableElement(pageContext, [propName], false);
332
+ }
333
+ } else if (type === "enableElement") {
334
+ if (infos.indexOf(propName) >= 0) {
335
+ functions.enableElement(pageContext, [propName], false);
336
+ }
337
+ } else if (type === "hideElement") {
338
+ if (infos.indexOf(propName) >= 0) {
339
+ functions.hideElement(pageContext, [propName], false);
340
+ }
341
+ } else if (type === "showElement") {
342
+ if (infos.indexOf(propName) >= 0) {
343
+ functions.showElement(pageContext, [propName], false);
344
+ }
345
+ }
346
+ }
347
+ });
348
+ }
349
+ }
297
350
  export {
351
+ controlObjectRenderState,
298
352
  convertToPageContext,
299
353
  getDefaultValue,
300
354
  getFormModelFields,
301
355
  getModelFields,
302
356
  getPermissionCodes,
357
+ packageAdditionalMapWithRoute,
303
358
  packageFormRules,
304
359
  queryPageDesignByCode,
305
360
  queryPageSuperGrids
@@ -13,10 +13,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
13
13
  const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
14
14
  const runtimeStyle = runtimeInfo.style;
15
15
  const runtimeClass = runtimeInfo.class;
16
+ function isDisable() {
17
+ return designProperty.value.state === "disabled" || isButtongLoading();
18
+ }
19
+ function isButtongLoading() {
20
+ return props.pageContext.canClick !== void 0 && props.pageContext.clickUuid !== void 0 ? !props.pageContext.canClick && props.pageContext.clickUuid === props.configure.uuid : false;
21
+ }
16
22
  return (_ctx, _cache) => {
17
23
  const _component_el_button = resolveComponent("el-button");
18
24
  return openBlock(), createBlock(_component_el_button, {
19
- disabled: designProperty.value.state === "disabled",
25
+ disabled: isDisable(),
20
26
  class: normalizeClass(unref(runtimeClass)),
21
27
  style: normalizeStyle(unref(runtimeStyle)),
22
28
  type: designProperty.value.type,
@@ -24,6 +30,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
30
  text: designProperty.value.text,
25
31
  round: designProperty.value.round,
26
32
  plain: designProperty.value.plain,
33
+ loading: isButtongLoading(),
27
34
  onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
28
35
  }, {
29
36
  default: withCtx(() => [
@@ -46,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
53
  ], 64)) : createCommentVNode("", true)
47
54
  ]),
48
55
  _: 1
49
- }, 8, ["disabled", "class", "style", "type", "size", "text", "round", "plain"]);
56
+ }, 8, ["disabled", "class", "style", "type", "size", "text", "round", "plain", "loading"]);
50
57
  };
51
58
  }
52
59
  });
@@ -29,10 +29,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
29
  const runtimeStyle = runtimeInfo.style;
30
30
  const runtimeClass = runtimeInfo.class;
31
31
  const entity = props.pageContext.entity ? props.pageContext.entity : {};
32
- let dynamicFields = getModelFields(props.pageContext, props.configure, prop);
32
+ let dynamicFields = getModelFields(props.configure, prop);
33
33
  const listViewShowFlag = ref(false);
34
34
  const baseURL = window["$vueApp"].config.globalProperties.baseURL;
35
35
  const listViewOptions = ref({
36
+ isSql: true,
36
37
  subTableData: null,
37
38
  extraParam: {},
38
39
  operations: {},
@@ -127,6 +127,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
127
127
  "start-placeholder": designProperty.value.placeholder,
128
128
  "end-placeholder": designProperty.value.endPlaceholder,
129
129
  format: designProperty.value.format,
130
+ "value-format": designProperty.value.valueFormat ? "x" : designProperty.value.valueFormat,
130
131
  modelValue: dynamicModelMethod.value,
131
132
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
132
133
  shortcuts: shortcuts.value,
@@ -136,7 +137,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
136
137
  onFocus: _cache[3] || (_cache[3] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
137
138
  onVisibleChange: _cache[4] || (_cache[4] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
138
139
  onPanelChange: _cache[5] || (_cache[5] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change"))
139
- }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "modelValue", "shortcuts", "type"])) : (openBlock(), createBlock(_component_el_date_picker, {
140
+ }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : (openBlock(), createBlock(_component_el_date_picker, {
140
141
  key: 1,
141
142
  clearable: designProperty.value.clearable,
142
143
  disabled: designProperty.value.state === "disabled",
@@ -150,12 +151,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
150
151
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => dynamicModelMethod.value = $event),
151
152
  shortcuts: shortcuts.value,
152
153
  type: designProperty.value.dateType,
154
+ "value-format": designProperty.value.valueFormat ? "x" : designProperty.value.valueFormat,
153
155
  onChange: _cache[7] || (_cache[7] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
154
156
  onBlur: _cache[8] || (_cache[8] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
155
157
  onFocus: _cache[9] || (_cache[9] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
156
158
  onVisibleChange: _cache[10] || (_cache[10] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
157
159
  onPanelChange: _cache[11] || (_cache[11] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change"))
158
- }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "modelValue", "shortcuts", "type"]))
160
+ }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "modelValue", "shortcuts", "type", "value-format"]))
159
161
  ]),
160
162
  _: 1
161
163
  }, 8, ["required", "class", "label-width", "style"]);
@@ -2,7 +2,7 @@ import { defineComponent, ref, resolveComponent, openBlock, createBlock, normali
2
2
  import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
3
3
  import { fileUploadBeforeUpload } from "../../../../utils/events/event-util.js";
4
4
  import http from "agilebuilder-ui/src/utils/request";
5
- import FsUploadNew from "agilebuilder-ui";
5
+ import { FsUploadNew } from "agilebuilder-ui";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "fileupload-runtime",
8
8
  props: {
@@ -23,16 +23,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
23
  const initPaths = getVariableValue(entity, pathFields);
24
24
  const fileList = ref([]);
25
25
  const fileInfo = ref({});
26
- const baseURL = window.$vueApp.config.globalProperties.baseURL;
27
- const baseAPI = window.$vueApp.config.globalProperties.baseAPI;
28
- let url = baseURL;
29
- if (!isPlateSys(props.pageContext.systemCode)) {
30
- url = baseAPI;
31
- }
32
26
  if (initPaths) {
33
27
  const uuids = initPaths.split(",");
34
28
  if (uuids.length > 0) {
35
- http.post(url + "/common/fs-upload/search-file-names").then((result) => {
29
+ const backendUrl = props.pageContext.backendUrl;
30
+ http.post(backendUrl + "/common/fs-upload/search-file-names", uuids).then((result) => {
36
31
  const names = [];
37
32
  for (let index = 0; index < uuids.length; index++) {
38
33
  const uuid = uuids[index];
@@ -74,13 +69,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
74
69
  setVariableValue(props.pageContext.entity, pathFields, uuids.join(","));
75
70
  setVariableValue(props.pageContext.entity, nameFields, names.join(","));
76
71
  };
77
- function isPlateSys(systemCode) {
78
- if (systemCode && (systemCode === "agilebuilder" || systemCode === "portal" || systemCode === "mms" || systemCode === "task" || systemCode === "wf" || systemCode === "dc" || systemCode === "mc" || systemCode === "mobile" || systemCode === "acs" || systemCode === "bs" || systemCode === "pcm")) {
79
- return true;
80
- } else {
81
- return false;
82
- }
83
- }
84
72
  return (_ctx, _cache) => {
85
73
  const _component_el_form_item = resolveComponent("el-form-item");
86
74
  return designProperty.value.tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
@@ -98,7 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
98
86
  ]),
99
87
  default: withCtx(() => [
100
88
  createVNode(unref(FsUploadNew), {
101
- disabled: designProperty.value.state == "disabled",
89
+ disabled: designProperty.value.state === "disabled",
102
90
  displayType: designProperty.value.displayType,
103
91
  accept: designProperty.value.accept,
104
92
  multiple: designProperty.value.multiple,
@@ -115,7 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
115
103
  _: 1
116
104
  }, 8, ["required", "class", "label-width", "style"])) : (openBlock(), createBlock(unref(FsUploadNew), {
117
105
  key: 1,
118
- disabled: designProperty.value.state == "disabled",
106
+ disabled: designProperty.value.state === "disabled",
119
107
  displayType: designProperty.value.displayType,
120
108
  accept: designProperty.value.accept,
121
109
  multiple: designProperty.value.multiple,
@@ -1,4 +1,7 @@
1
1
  import _sfc_main from "./placeholder-runtime.vue2.js";
2
+ /* empty css */
3
+ import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const placeholderRuntime = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a0860ff0"]]);
2
5
  export {
3
- _sfc_main as default
6
+ placeholderRuntime as default
4
7
  };
@@ -1,5 +1,6 @@
1
- import { defineComponent, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementVNode } from "vue";
2
- const _hoisted_1 = /* @__PURE__ */ createElementVNode("div", { style: { "width": "100%", "height": "100%" } }, " ", -1);
1
+ import { defineComponent, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, pushScopeId, popScopeId, createElementVNode } from "vue";
2
+ const _withScopeId = (n) => (pushScopeId("data-v-a0860ff0"), n = n(), popScopeId(), n);
3
+ const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { style: { "width": "100%", "height": "100%" } }, " ", -1));
3
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
4
5
  __name: "placeholder-runtime",
5
6
  props: {
@@ -3,8 +3,9 @@ import _sfc_main$1 from "./error-render.vue.js";
3
3
  import { getRuntimeComponentByName } from "../../utils/assemblys-config.js";
4
4
  import { PageDimensions } from "../../utils/interfaces/page-design-types.js";
5
5
  import { addComponentRef, addComponentRefByCode } from "../../utils/global-refs.js";
6
- import { getPermissionCodes, packageFormRules } from "../../utils/page-init-util.js";
7
- import { caculateShowCondition } from "../../utils/page-helper-util.js";
6
+ import { getPermissionCodes, packageFormRules, controlObjectRenderState } from "../../utils/page-init-util.js";
7
+ import { caculateShowCondition, getFormPropName } from "../../utils/page-helper-util.js";
8
+ import { getPropClassName } from "../../utils/common-util.js";
8
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
10
  __name: "object-render",
10
11
  props: {
@@ -12,6 +13,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
13
  configure: {}
13
14
  },
14
15
  setup(__props) {
16
+ var _a;
15
17
  const props = __props;
16
18
  if (props.configure.style == void 0) {
17
19
  props.configure.style = {};
@@ -24,17 +26,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
26
  let handleShowFlag = ref(true);
25
27
  let showFlag = ref(true);
26
28
  if (props.configure && props.configure.props) {
27
- if (props.configure.props.showConditions) {
28
- const showConditions = props.configure.props.showConditions;
29
- if (showConditions.length > 0) {
30
- showFlag = computed(() => {
31
- if (!handleShowFlag.value) {
32
- return false;
33
- }
34
- return caculateShowCondition(props.pageContext, props.configure, showConditions);
35
- });
29
+ let showConditions = [];
30
+ if ((_a = props.configure.props.base) == null ? void 0 : _a.showConditions) {
31
+ if (typeof props.configure.props.base.showConditions === "string") {
32
+ showConditions = JSON.parse(props.configure.props.base.showConditions);
33
+ } else {
34
+ showConditions = props.configure.props.base.showConditions;
36
35
  }
37
36
  }
37
+ showFlag = computed(() => {
38
+ var _a2;
39
+ if (!handleShowFlag.value) {
40
+ return false;
41
+ }
42
+ const state = (_a2 = props.configure.props.base) == null ? void 0 : _a2.state;
43
+ if (state && state === "hidden") {
44
+ return false;
45
+ }
46
+ return caculateShowCondition(props.pageContext, props.configure, showConditions);
47
+ });
38
48
  if (props.configure.props.editConditions) {
39
49
  const editConditions = props.configure.props.editConditions;
40
50
  if (editConditions.length > 0) {
@@ -58,9 +68,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
58
68
  const thisRef = ref(null);
59
69
  const runtimeStyle = ref({});
60
70
  const runtimeClass = ref("");
71
+ const propClassName = getPropClassName(props.configure);
72
+ if (propClassName) {
73
+ runtimeClass.value = propClassName;
74
+ }
61
75
  const commonRuntime = props.configure.runtime && props.configure.runtime.common ? props.configure.runtime.common : {};
62
76
  if (commonRuntime.class) {
63
- runtimeClass.value = commonRuntime.class;
77
+ runtimeClass.value += " " + commonRuntime.class;
64
78
  }
65
79
  if (commonRuntime.style) {
66
80
  Object.assign(runtimeStyle.value, commonRuntime.style);
@@ -97,9 +111,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
97
111
  if (props.configure.code) {
98
112
  addComponentRefByCode(props.pageContext, props.configure.code, thisRef);
99
113
  } else if (props.configure.props && props.configure.props.base) {
100
- const propsBase = props.configure.props.base;
101
- if (propsBase.prop) {
102
- let propName = propsBase.prop;
114
+ const propsBase2 = props.configure.props.base;
115
+ if (propsBase2.prop) {
116
+ let propName = propsBase2.prop;
103
117
  if (propName.startsWith("${")) {
104
118
  propName = propName.substring(2, propName.length - 1);
105
119
  }
@@ -109,6 +123,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
109
123
  addComponentRefByCode(props.pageContext, propName, thisRef);
110
124
  }
111
125
  }
126
+ const propsBase = props.configure.props ? props.configure.props.base : null;
127
+ if (propsBase && propsBase.prop) {
128
+ let propName = propsBase.prop;
129
+ propName = getFormPropName(propName);
130
+ controlObjectRenderState(props.pageContext, propName);
131
+ }
112
132
  }
113
133
  onMounted(() => {
114
134
  if (!thisRef.value || !thisRef.value.parentNode) {
@@ -20,8 +20,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  let activityNameColor = "";
21
21
  if (props.configure.props.base.showActivityName) {
22
22
  activityNameColor = props.configure.props.base.activityNameColor || "red";
23
- if (props.pageContext.entity && props.pageContext.entity.task && props.pageContext.entity.task.name) {
24
- taskName.value = props.pageContext.entity.task.name;
23
+ if (props.pageContext.entity && props.pageContext.entity.data) {
24
+ taskName.value = props.pageContext.entity.data["CURRENT_ACTIVITY_NAME"] || props.pageContext.entity.data["current_activity_name"];
25
25
  }
26
26
  }
27
27
  props.configure.items.forEach((item) => {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, onMounted, onUpdated, nextTick, onUnmounted, openBlock, createElementBlock, normalizeClass, normalizeStyle, Fragment, renderList, createBlock, unref, createCommentVNode, createElementVNode, watch } from "vue";
2
2
  import _sfc_main$1 from "./assemblys/object-render.vue.js";
3
3
  import { updateOptionDatasources, updateChartDatasources } from "../utils/page-helper-util.js";
4
- import { queryPageSuperGrids, queryPageDesignByCode, convertToPageContext } from "../utils/page-init-util.js";
4
+ import { queryPageSuperGrids, queryPageDesignByCode, convertToPageContext, packageAdditionalMapWithRoute } from "../utils/page-init-util.js";
5
5
  import { addComponentRef, removePageAllRef, initComponentRefState } from "../utils/global-refs.js";
6
6
  import { removeCustomFuncFromWindow, handleEvent, initPageEvents } from "../utils/events/event-util.js";
7
7
  import _sfc_main$2 from "./assemblys/common/export-form-report-dialog.vue.js";
@@ -19,6 +19,7 @@ import { useRoute, useRouter } from "vue-router";
19
19
  import { jumpToPage } from "agilebuilder-ui/src/utils/jump-page-utils";
20
20
  import { setSessionCache } from "agilebuilder-ui/src/utils/auth";
21
21
  import { deepCopy } from "../utils/common-util.js";
22
+ const _hoisted_1 = { class: "app-container" };
22
23
  const _sfc_main = /* @__PURE__ */ defineComponent({
23
24
  __name: "super-page",
24
25
  props: {
@@ -109,6 +110,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
109
110
  if (tempContext.isTest && props.dimensions) {
110
111
  tempContext.dimensions = props.dimensions;
111
112
  }
113
+ packageAdditionalMapWithRoute(route, tempContext.entity.request);
112
114
  pageContext.value = tempContext;
113
115
  if (pageContext.value == null) {
114
116
  return;
@@ -334,8 +336,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
334
336
  if (!_selectFile_.value) {
335
337
  return;
336
338
  }
337
- if (_selectFile_.value.value === "" || _selectFile_.value.value === null)
338
- return;
339
+ if (_selectFile_.value.value === "" || _selectFile_.value.value === null) return;
339
340
  const fileObj = _selectFile_.value.files[0];
340
341
  if (fileObj) {
341
342
  _selectFile_.value.value = null;
@@ -421,9 +422,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
421
422
  popPageSetting.parentPageVersion = parentPageContext.value.version;
422
423
  popPageSetting.isNewPage = true;
423
424
  if (jumpMode === "popup") {
424
- eventBus.$on(eventPageInfo.value + "close-dialog", (params) => {
425
- closeFunc(params);
426
- });
427
425
  jumpPageSetting.value = popPageSetting;
428
426
  isShowDialog.value = true;
429
427
  } else if (jumpMode === "refresh") {
@@ -432,6 +430,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
432
430
  query: popPageSetting
433
431
  });
434
432
  }
433
+ if (jumpMode === "popup" || jumpMode === "refresh") {
434
+ eventBus.$on(eventPageInfo.value + "close-dialog", (params) => {
435
+ closeFunc(params);
436
+ });
437
+ }
435
438
  } else {
436
439
  console.error("页面配置信息不存在");
437
440
  }
@@ -477,7 +480,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
477
480
  isShowDialog.value = false;
478
481
  }
479
482
  return (_ctx, _cache) => {
480
- return openBlock(), createElementBlock("div", null, [
483
+ return openBlock(), createElementBlock("div", _hoisted_1, [
481
484
  isShowPage.value ? (openBlock(), createElementBlock("div", {
482
485
  key: 0,
483
486
  ref_key: "thisRef",
@@ -0,0 +1,3 @@
1
+ .el-form-item[data-v-a0860ff0] {
2
+ margin-bottom: 0px;
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.0.76",
3
+ "version": "2.0.81",
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.55",
51
+ "agilebuilder-ui": "1.0.57",
52
52
  "axios": "^1.6.8",
53
53
  "cypress": "^13.6.6",
54
54
  "element-plus": "^2.6.1",