super-page-runtime 2.1.33 → 2.1.37
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.
- package/dist/es/components/runtime/utils/api/page-expose-util.js +6 -1
- package/dist/es/components/runtime/utils/common-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/common-util.js +23 -0
- package/dist/es/components/runtime/utils/events/event-util.d.ts +5 -0
- package/dist/es/components/runtime/utils/events/event-util.js +16 -1
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +8 -1
- package/dist/es/components/runtime/utils/page-permission-util.js +5 -0
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +13 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +5 -1
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +4 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +16 -7
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +5 -3
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +7 -5
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +26 -5
- package/dist/es/components/runtime/views/super-page.vue.d.ts +4 -4
- package/dist/es/components/runtime/views/super-page.vue.js +34 -13
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ import http from "agilebuilder-ui/src/utils/request";
|
|
|
5
5
|
import { getAdditionalParamMap } from "../events/standard-event.js";
|
|
6
6
|
import { i18nValidatePropRulesMessage } from "../events/validator-util.js";
|
|
7
7
|
import { getBaseUrl } from "../common-util.js";
|
|
8
|
+
import { isMobileBrowser } from "agilebuilder-ui/src/utils/common-util";
|
|
8
9
|
const functions = {
|
|
9
10
|
/**
|
|
10
11
|
* 展示页面中的某个组件元素
|
|
@@ -300,10 +301,14 @@ const functions = {
|
|
|
300
301
|
getAdditionalParams(pageContext) {
|
|
301
302
|
return getAdditionalParamMap(pageContext);
|
|
302
303
|
},
|
|
303
|
-
//
|
|
304
|
+
// 获得某附加参数值
|
|
304
305
|
getAdditionalParamValue(pageContext, key) {
|
|
305
306
|
const param = getAdditionalParamMap(pageContext);
|
|
306
307
|
return param ? param[key] : null;
|
|
308
|
+
},
|
|
309
|
+
// 是否是移动端
|
|
310
|
+
isMobile() {
|
|
311
|
+
return isMobileBrowser();
|
|
307
312
|
}
|
|
308
313
|
};
|
|
309
314
|
function packageAllFeildsRules(pageContext, item) {
|
|
@@ -25,3 +25,4 @@ export declare function getWorkflowId(pageContext: any): any;
|
|
|
25
25
|
export declare function getPropClassName(configure: Component): any;
|
|
26
26
|
export declare function isNumber(numStr: any): boolean;
|
|
27
27
|
export declare function isWorkflowPage(pageContext: PageContext): boolean;
|
|
28
|
+
export declare function refreshMobileDialogType(jumpPageSetting: any, isMobile: boolean): void;
|
|
@@ -140,6 +140,28 @@ function isWorkflowPage(pageContext) {
|
|
|
140
140
|
}
|
|
141
141
|
return isWorkflow;
|
|
142
142
|
}
|
|
143
|
+
function refreshMobileDialogType(jumpPageSetting, isMobile) {
|
|
144
|
+
if (jumpPageSetting && isMobile) {
|
|
145
|
+
let openMode = jumpPageSetting.jumpPageMobileOpenMode;
|
|
146
|
+
if (!openMode) {
|
|
147
|
+
if (jumpPageSetting.jumpPageOpenMode) {
|
|
148
|
+
openMode = jumpPageSetting.jumpPageOpenMode;
|
|
149
|
+
if (openMode === "newTab") {
|
|
150
|
+
openMode = "refresh";
|
|
151
|
+
}
|
|
152
|
+
} else {
|
|
153
|
+
openMode = "refresh";
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (openMode === "refresh") {
|
|
157
|
+
jumpPageSetting.dialogType = "drawer";
|
|
158
|
+
jumpPageSetting.jumpPageWidth = "100%";
|
|
159
|
+
jumpPageSetting.isRefreshWhenClosePopup = true;
|
|
160
|
+
}
|
|
161
|
+
jumpPageSetting.jumpMode = openMode;
|
|
162
|
+
jumpPageSetting.jumpPageMobileOpenMode = openMode;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
143
165
|
export {
|
|
144
166
|
deepCopy,
|
|
145
167
|
getBaseUrl,
|
|
@@ -151,5 +173,6 @@ export {
|
|
|
151
173
|
isNumber,
|
|
152
174
|
isWorkflowPage,
|
|
153
175
|
packageTemplateFiles,
|
|
176
|
+
refreshMobileDialogType,
|
|
154
177
|
upperFirstCase
|
|
155
178
|
};
|
|
@@ -81,3 +81,8 @@ export declare function fileUploadBeforeUpload(params: any): any;
|
|
|
81
81
|
export declare function fileUploadUploaded(pageContext: any, configureObj: any, params: any): any;
|
|
82
82
|
export declare function fileUploadBeforeDelete(pageContext: any, configureObj: any, params: any): any;
|
|
83
83
|
export declare function fileUploadDeleted(pageContext: any, configureObj: any, params: any): any;
|
|
84
|
+
/**
|
|
85
|
+
* 当前按钮的点击事件是否是列表的 显示查询 事件。移动端时才需要显示这个按钮。
|
|
86
|
+
* @param configure 组件配置
|
|
87
|
+
*/
|
|
88
|
+
export declare function isShowComponent(configure: Component): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isPromise } from "agilebuilder-ui/src/utils/common-util";
|
|
1
|
+
import { isPromise, isMobileBrowser } from "agilebuilder-ui/src/utils/common-util";
|
|
2
2
|
import { judgeDataNumber, standardEvents, getAdditionalParamMap, dealAfterOperate } from "./standard-event.js";
|
|
3
3
|
import { validateDataModelFunc } from "./validator-util.js";
|
|
4
4
|
import { getComponentRef, getComponentRefByCode } from "../global-refs.js";
|
|
@@ -668,6 +668,20 @@ function headerClick(pageContext, configureObj, params) {
|
|
|
668
668
|
function fileUploadBeforeUpload(params) {
|
|
669
669
|
return getHandleEvent(null, params.pageContext, params.configureObj, "before-upload", params);
|
|
670
670
|
}
|
|
671
|
+
function isShowComponent(configure) {
|
|
672
|
+
let isShow = true;
|
|
673
|
+
const isMobile = isMobileBrowser();
|
|
674
|
+
if (!isMobile) {
|
|
675
|
+
const events = configure && configure.events ? configure.events : [];
|
|
676
|
+
if (events) {
|
|
677
|
+
const eventArr = events.filter((item) => item.name === "click" && item.isStandard && item.eventName && item.eventName === "showSearch");
|
|
678
|
+
if (eventArr && eventArr.length > 0) {
|
|
679
|
+
isShow = false;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
return isShow;
|
|
684
|
+
}
|
|
671
685
|
export {
|
|
672
686
|
appendDefaultMethods,
|
|
673
687
|
canExecuteButton,
|
|
@@ -690,6 +704,7 @@ export {
|
|
|
690
704
|
handleFormEvent,
|
|
691
705
|
headerClick,
|
|
692
706
|
initPageEvents,
|
|
707
|
+
isShowComponent,
|
|
693
708
|
removeCustomFuncFromWindow,
|
|
694
709
|
rowClick,
|
|
695
710
|
rowDblClick,
|
|
@@ -17,6 +17,7 @@ export declare const standardEvents: {
|
|
|
17
17
|
import: (params: any) => void;
|
|
18
18
|
export: (params: any) => Promise<unknown>;
|
|
19
19
|
search: (params: any) => void;
|
|
20
|
+
showSearch: (params: any) => void;
|
|
20
21
|
workflowSave: (params: any) => Promise<unknown>;
|
|
21
22
|
submitProcess: (params: any) => Promise<unknown>;
|
|
22
23
|
submitTask: (params: any) => Promise<unknown>;
|
|
@@ -103,12 +103,19 @@ const standardEvents = {
|
|
|
103
103
|
},
|
|
104
104
|
// 列表标准事件 查询search
|
|
105
105
|
search: function(params) {
|
|
106
|
-
console.log("列表标准事件
|
|
106
|
+
console.log("列表标准事件 刷新列表 search--params=", params);
|
|
107
107
|
const pageContext = params.pageContext;
|
|
108
108
|
const tableUuid = params.tableUuid;
|
|
109
109
|
const gridRef = getComponentRef(pageContext, tableUuid);
|
|
110
110
|
gridRef.refresh();
|
|
111
111
|
},
|
|
112
|
+
showSearch: function(params) {
|
|
113
|
+
console.log("列表标准事件 显示查询区域 showSearch--params=", params);
|
|
114
|
+
const pageContext = params.pageContext;
|
|
115
|
+
const tableUuid = params.tableUuid;
|
|
116
|
+
const gridRef = getComponentRef(pageContext, tableUuid);
|
|
117
|
+
gridRef.showMobileSearch();
|
|
118
|
+
},
|
|
112
119
|
// 流程表单标准事件 暂存workflowSave
|
|
113
120
|
workflowSave: function(params) {
|
|
114
121
|
console.log("流程表单标准事件 暂存workflowSave--params=", params);
|
|
@@ -50,6 +50,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
const superGridItems = pageContext.superGridItems;
|
|
51
51
|
const superGridSetting = superGridItems ? superGridItems[configure.uuid] : null;
|
|
52
52
|
console.log("superGridSetting1111===", superGridItems, superGridSetting);
|
|
53
|
+
const isCanShowMobileSearch = ref(false);
|
|
53
54
|
onMounted(() => {
|
|
54
55
|
window.addEventListener("message", recieveMessage);
|
|
55
56
|
eventBus.$on(
|
|
@@ -677,6 +678,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
677
678
|
function isDeleteChange(value) {
|
|
678
679
|
gridRef.value.isDeleteChange(value);
|
|
679
680
|
}
|
|
681
|
+
function showMobileSearch() {
|
|
682
|
+
if (isCanShowMobileSearch.value) {
|
|
683
|
+
gridRef.value.showMobileSearch();
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
function canShowMobileSearch(listCode2) {
|
|
687
|
+
isCanShowMobileSearch.value = true;
|
|
688
|
+
}
|
|
680
689
|
__expose({
|
|
681
690
|
refresh,
|
|
682
691
|
createRow,
|
|
@@ -685,7 +694,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
685
694
|
getSelectionIds,
|
|
686
695
|
getTableConfigure,
|
|
687
696
|
isDeleteChange,
|
|
688
|
-
validatorSunTableListData
|
|
697
|
+
validatorSunTableListData,
|
|
698
|
+
showMobileSearch
|
|
689
699
|
});
|
|
690
700
|
return (_ctx, _cache) => {
|
|
691
701
|
const _component_super_grid = resolveComponent("super-grid");
|
|
@@ -708,7 +718,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
708
718
|
onRowDblclick: rowDblClickEvent,
|
|
709
719
|
onHeaderClick: headerClickEvent,
|
|
710
720
|
onRefresh: clearSelections,
|
|
711
|
-
onNewOpenGridDialog: unref(popupToPage)
|
|
721
|
+
onNewOpenGridDialog: unref(popupToPage),
|
|
722
|
+
onCanShowMobileSearch: canShowMobileSearch
|
|
712
723
|
}, null, 8, ["url", "options", "code", "settings", "search-form-info", "list-toolbar-form-data", "onNewOpenGridDialog"])
|
|
713
724
|
]);
|
|
714
725
|
};
|
|
@@ -54,6 +54,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
54
|
gridRef.value.isDeleteChange(value);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
function showMobileSearch() {
|
|
58
|
+
gridRef.value.showMobileSearch();
|
|
59
|
+
}
|
|
57
60
|
__expose({
|
|
58
61
|
refresh,
|
|
59
62
|
createRow,
|
|
@@ -62,7 +65,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
65
|
getSelectionIds,
|
|
63
66
|
getTableConfigure,
|
|
64
67
|
isDeleteChange,
|
|
65
|
-
validatorSunTableListData
|
|
68
|
+
validatorSunTableListData,
|
|
69
|
+
showMobileSearch
|
|
66
70
|
});
|
|
67
71
|
return (_ctx, _cache) => {
|
|
68
72
|
return openBlock(), createElementBlock("div", null, [
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -82,13 +82,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
82
82
|
if (isRange) {
|
|
83
83
|
const values = [];
|
|
84
84
|
let value1 = getVariableValue(entity, dynamicFields);
|
|
85
|
-
values.push(value1);
|
|
85
|
+
values.push(formatDate(value1, designProperty.value.valueFormat));
|
|
86
86
|
let value2 = getVariableValue(entity, dynamicFields2);
|
|
87
|
-
values.push(value2);
|
|
87
|
+
values.push(formatDate(value2, designProperty.value.valueFormat));
|
|
88
88
|
return values;
|
|
89
89
|
} else {
|
|
90
90
|
let value1 = getVariableValue(entity, dynamicFields);
|
|
91
|
-
return value1;
|
|
91
|
+
return formatDate(value1, designProperty.value.valueFormat);
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
set(value) {
|
package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js
CHANGED
|
@@ -96,10 +96,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
96
96
|
"limit-file-size": designProperty.value.limitFileSize,
|
|
97
97
|
"file-info": fileInfo.value,
|
|
98
98
|
"file-list": fileList.value,
|
|
99
|
+
"system-code": _ctx.pageContext.systemCode,
|
|
99
100
|
"on-success": onSuccess,
|
|
100
101
|
"on-remove": onRemove,
|
|
101
102
|
"before-upload": beforeUpload
|
|
102
|
-
}, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "file-info", "file-list"])
|
|
103
|
+
}, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "file-info", "file-list", "system-code"])
|
|
103
104
|
]),
|
|
104
105
|
_: 1
|
|
105
106
|
}, 8, ["required", "class", "label-width", "style"])) : (openBlock(), createBlock(unref(FsUploadNew), {
|
|
@@ -114,10 +115,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
114
115
|
"limit-file-size": designProperty.value.limitFileSize,
|
|
115
116
|
"file-info": fileInfo.value,
|
|
116
117
|
"file-list": fileList.value,
|
|
118
|
+
"system-code": _ctx.pageContext.systemCode,
|
|
117
119
|
"on-success": onSuccess,
|
|
118
120
|
"on-remove": onRemove,
|
|
119
121
|
"before-upload": beforeUpload
|
|
120
|
-
}, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "file-info", "file-list"]));
|
|
122
|
+
}, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "file-info", "file-list", "system-code"]));
|
|
121
123
|
};
|
|
122
124
|
}
|
|
123
125
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, resolveComponent, openBlock,
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createElementVNode, toDisplayString, createBlock, withCtx, createCommentVNode, createTextVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue, formatValueByType } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { SuperIcon } from "agilebuilder-ui";
|
|
5
5
|
import { getCustomFunc, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
6
|
-
const _hoisted_1 = { style: { "
|
|
7
|
-
const _hoisted_2 =
|
|
6
|
+
const _hoisted_1 = { style: { "width": "100%", "text-align": "center", "font-weight": "700", "font-size": "24px", "margin-bottom": "20px" } };
|
|
7
|
+
const _hoisted_2 = { style: { "overflow": "hidden", "white-space": "nowrap" } };
|
|
8
|
+
const _hoisted_3 = ["title"];
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
10
|
__name: "label-runtime",
|
|
10
11
|
props: {
|
|
@@ -54,6 +55,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
55
|
resultValue = resultValue === void 0 || resultValue === null ? "" : resultValue;
|
|
55
56
|
return resultValue;
|
|
56
57
|
});
|
|
58
|
+
onMounted(() => {
|
|
59
|
+
});
|
|
57
60
|
function updateOptions(newOptions) {
|
|
58
61
|
listOptions.value = newOptions ? newOptions : [];
|
|
59
62
|
}
|
|
@@ -62,8 +65,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
65
|
});
|
|
63
66
|
return (_ctx, _cache) => {
|
|
64
67
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
65
|
-
return designProperty.value.
|
|
68
|
+
return designProperty.value.whetherTittle ? (openBlock(), createElementBlock("div", {
|
|
66
69
|
key: 0,
|
|
70
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
71
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
72
|
+
}, [
|
|
73
|
+
createElementVNode("div", _hoisted_1, toDisplayString(designProperty.value.title), 1)
|
|
74
|
+
], 6)) : designProperty.value.tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
|
|
75
|
+
key: 1,
|
|
67
76
|
required: designProperty.value.required ? true : false,
|
|
68
77
|
class: normalizeClass(unref(runtimeClass)),
|
|
69
78
|
"label-width": designProperty.value.labelWidth,
|
|
@@ -80,7 +89,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
89
|
style: { "display": "flex", "width": "100%", "justify-content": "space-between" },
|
|
81
90
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
|
|
82
91
|
}, [
|
|
83
|
-
createElementVNode("span",
|
|
92
|
+
createElementVNode("span", _hoisted_2, [
|
|
84
93
|
designProperty.value.preIconValue || designProperty.value.preText ? (openBlock(), createElementBlock("span", {
|
|
85
94
|
key: 0,
|
|
86
95
|
class: normalizeClass({
|
|
@@ -117,14 +126,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
117
126
|
]),
|
|
118
127
|
_: 1
|
|
119
128
|
}, 8, ["required", "class", "label-width", "style"])) : (openBlock(), createElementBlock("span", {
|
|
120
|
-
key:
|
|
129
|
+
key: 2,
|
|
121
130
|
style: { "display": "flex", "justify-content": "space-between" },
|
|
122
131
|
onClick: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
|
|
123
132
|
}, [
|
|
124
133
|
createElementVNode("span", {
|
|
125
134
|
style: { "overflow": "hidden", "white-space": "nowrap" },
|
|
126
135
|
title: dynamicValue.value
|
|
127
|
-
}, toDisplayString(designProperty.value.prefixIcon) + " " + toDisplayString(dynamicValue.value) + "222", 9,
|
|
136
|
+
}, toDisplayString(designProperty.value.prefixIcon) + " " + toDisplayString(dynamicValue.value) + "222", 9, _hoisted_3),
|
|
128
137
|
designProperty.value.suffixTxt ? (openBlock(), createElementBlock("span", {
|
|
129
138
|
key: 0,
|
|
130
139
|
class: normalizeClass(unref(appendClass)),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, markRaw, onMounted, resolveDirective, withDirectives, openBlock, createBlock, resolveDynamicComponent, normalizeStyle, normalizeClass, vShow,
|
|
1
|
+
import { defineComponent, ref, computed, markRaw, onMounted, resolveDirective, unref, withDirectives, openBlock, createBlock, resolveDynamicComponent, normalizeStyle, normalizeClass, vShow, createCommentVNode, nextTick } from "vue";
|
|
2
2
|
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";
|
|
@@ -6,6 +6,7 @@ import { addComponentRef, addComponentRefByCode } from "../../utils/global-refs.
|
|
|
6
6
|
import { getPermissionCodes, packageFormRules, controlObjectRenderState } from "../../utils/page-init-util.js";
|
|
7
7
|
import { caculateShowCondition, getFormPropName, getSizeConfig } from "../../utils/page-helper-util.js";
|
|
8
8
|
import { getPropClassName, isNumber } from "../../utils/common-util.js";
|
|
9
|
+
import { isShowComponent } from "../../utils/events/event-util.js";
|
|
9
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
11
|
__name: "object-render",
|
|
11
12
|
props: {
|
|
@@ -221,7 +222,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
221
222
|
};
|
|
222
223
|
return (_ctx, _cache) => {
|
|
223
224
|
const _directive_permission = resolveDirective("permission");
|
|
224
|
-
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(dynamicComponent.value), {
|
|
225
|
+
return unref(isShowComponent)(_ctx.configure) ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(dynamicComponent.value), {
|
|
226
|
+
key: 0,
|
|
225
227
|
ref: setComponentRef,
|
|
226
228
|
style: normalizeStyle(runtimeStyle.value),
|
|
227
229
|
class: normalizeClass(runtimeClass.value),
|
|
@@ -230,7 +232,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
230
232
|
}, null, 8, ["style", "class", "configure", "pageContext"])), [
|
|
231
233
|
[vShow, unref(showFlag)],
|
|
232
234
|
[_directive_permission, unref(permissionCodes) ? unref(permissionCodes) : "true"]
|
|
233
|
-
]);
|
|
235
|
+
]) : createCommentVNode("", true);
|
|
234
236
|
};
|
|
235
237
|
}
|
|
236
238
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, toDisplayString } from "vue";
|
|
1
|
+
import { defineComponent, ref, onMounted, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -9,6 +9,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
},
|
|
10
10
|
setup(__props, { expose: __expose }) {
|
|
11
11
|
const props = __props;
|
|
12
|
+
const showTaskName = ref(false);
|
|
12
13
|
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
13
14
|
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
14
15
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
@@ -16,10 +17,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
17
|
const runtimeClass = runtimeInfo.class;
|
|
17
18
|
const headerStyle = runtimeInfo.headerStyle;
|
|
18
19
|
let taskName = ref("");
|
|
19
|
-
ref(false);
|
|
20
20
|
if (props.pageContext.pageType === "form") {
|
|
21
21
|
if (props.pageContext.entity && props.pageContext.entity.data) {
|
|
22
22
|
taskName.value = props.pageContext.entity.data["CURRENT_ACTIVITY_NAME"] || props.pageContext.entity.data["current_activity_name"];
|
|
23
|
+
showTaskName.value = props.pageContext.entity.data["WORKFLOW_ID"] ? true : false;
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
onMounted(() => {
|
|
@@ -35,16 +36,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
36
|
setValue
|
|
36
37
|
});
|
|
37
38
|
return (_ctx, _cache) => {
|
|
38
|
-
return openBlock(), createElementBlock("
|
|
39
|
+
return showTaskName.value ? (openBlock(), createElementBlock("span", {
|
|
40
|
+
key: 0,
|
|
39
41
|
class: normalizeClass(unref(runtimeClass))
|
|
40
42
|
}, [
|
|
41
|
-
createElementVNode("
|
|
43
|
+
createElementVNode("span", {
|
|
42
44
|
style: normalizeStyle(unref(headerStyle))
|
|
43
45
|
}, [
|
|
44
46
|
createElementVNode("span", null, toDisplayString(designProperty.value.title), 1),
|
|
45
47
|
createElementVNode("span", null, toDisplayString(unref(taskName)), 1)
|
|
46
48
|
], 4)
|
|
47
|
-
], 2);
|
|
49
|
+
], 2)) : createCommentVNode("", true);
|
|
48
50
|
};
|
|
49
51
|
}
|
|
50
52
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createCommentVNode } from "vue";
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, createCommentVNode } from "vue";
|
|
2
2
|
import _sfc_main$1 from "./super-page.vue.js";
|
|
3
|
+
const _hoisted_1 = ["src"];
|
|
4
|
+
const _hoisted_2 = ["src"];
|
|
3
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
6
|
__name: "super-page-dialog",
|
|
5
7
|
props: {
|
|
@@ -25,7 +27,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
27
|
const overflow = ref(false);
|
|
26
28
|
const showPosition = ref("rtl");
|
|
27
29
|
const contentHeight = ref(null);
|
|
30
|
+
const isIframe = ref(false);
|
|
31
|
+
const pageUrl = ref(null);
|
|
28
32
|
if (myJumpPageSetting) {
|
|
33
|
+
console.log("弹出页面myJumpPageSetting=", myJumpPageSetting);
|
|
34
|
+
isIframe.value = myJumpPageSetting && myJumpPageSetting["_isIframe"] !== void 0 ? myJumpPageSetting["_isIframe"] : false;
|
|
35
|
+
pageUrl.value = myJumpPageSetting && myJumpPageSetting["_path"] ? myJumpPageSetting["_path"] : null;
|
|
29
36
|
dialogType.value = myJumpPageSetting && myJumpPageSetting["dialogType"] ? myJumpPageSetting["dialogType"] : "dialog";
|
|
30
37
|
draggable.value = myJumpPageSetting && myJumpPageSetting["draggable"] ? myJumpPageSetting["draggable"] : false;
|
|
31
38
|
overflow.value = myJumpPageSetting && myJumpPageSetting["overflow"] ? myJumpPageSetting["overflow"] : false;
|
|
@@ -75,11 +82,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
75
82
|
onClosed: _cache[4] || (_cache[4] = ($event) => emits("closed"))
|
|
76
83
|
}, {
|
|
77
84
|
default: withCtx(() => [
|
|
78
|
-
pageCode.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
85
|
+
!isIframe.value && pageCode.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
79
86
|
key: 0,
|
|
80
87
|
pageCode: pageCode.value,
|
|
81
88
|
pageRequest: pageRequest.value
|
|
82
|
-
}, null, 8, ["pageCode", "pageRequest"])) :
|
|
89
|
+
}, null, 8, ["pageCode", "pageRequest"])) : isIframe.value ? (openBlock(), createElementBlock("iframe", {
|
|
90
|
+
key: 1,
|
|
91
|
+
height: "98%",
|
|
92
|
+
width: "100%",
|
|
93
|
+
src: pageUrl.value,
|
|
94
|
+
frameborder: "0",
|
|
95
|
+
allowtransparency: "no"
|
|
96
|
+
}, null, 8, _hoisted_1)) : createCommentVNode("", true)
|
|
83
97
|
]),
|
|
84
98
|
_: 1
|
|
85
99
|
}, 8, ["modelValue", "title", "direction", "size"])) : (openBlock(), createBlock(_component_el_dialog, {
|
|
@@ -97,12 +111,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
97
111
|
onClosed: _cache[8] || (_cache[8] = ($event) => _ctx.$emit("closed"))
|
|
98
112
|
}, {
|
|
99
113
|
default: withCtx(() => [
|
|
100
|
-
pageCode.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
114
|
+
!isIframe.value && pageCode.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
101
115
|
key: 0,
|
|
102
116
|
pageCode: pageCode.value,
|
|
103
117
|
pageRequest: pageRequest.value,
|
|
104
118
|
contentHeight: contentHeight.value
|
|
105
|
-
}, null, 8, ["pageCode", "pageRequest", "contentHeight"])) :
|
|
119
|
+
}, null, 8, ["pageCode", "pageRequest", "contentHeight"])) : isIframe.value ? (openBlock(), createElementBlock("iframe", {
|
|
120
|
+
key: 1,
|
|
121
|
+
height: "98%",
|
|
122
|
+
width: "100%",
|
|
123
|
+
src: pageUrl.value,
|
|
124
|
+
frameborder: "0",
|
|
125
|
+
allowtransparency: "no"
|
|
126
|
+
}, null, 8, _hoisted_2)) : createCommentVNode("", true)
|
|
106
127
|
]),
|
|
107
128
|
_: 1
|
|
108
129
|
}, 8, ["title", "width", "draggable", "overflow"]));
|
|
@@ -14,8 +14,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
14
14
|
type: NumberConstructor;
|
|
15
15
|
required: false;
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
type:
|
|
17
|
+
dataId: {
|
|
18
|
+
type: NumberConstructor;
|
|
19
19
|
required: false;
|
|
20
20
|
};
|
|
21
21
|
pageDesign: {
|
|
@@ -64,8 +64,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
64
64
|
type: NumberConstructor;
|
|
65
65
|
required: false;
|
|
66
66
|
};
|
|
67
|
-
|
|
68
|
-
type:
|
|
67
|
+
dataId: {
|
|
68
|
+
type: NumberConstructor;
|
|
69
69
|
required: false;
|
|
70
70
|
};
|
|
71
71
|
pageDesign: {
|
|
@@ -18,7 +18,8 @@ import _sfc_main$5 from "./super-page-dialog.vue.js";
|
|
|
18
18
|
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
|
-
import { deepCopy, isNumber } from "../utils/common-util.js";
|
|
21
|
+
import { deepCopy, isNumber, refreshMobileDialogType } from "../utils/common-util.js";
|
|
22
|
+
import { isMobileBrowser } from "agilebuilder-ui/src/utils/common-util";
|
|
22
23
|
const _hoisted_1 = { class: "app-container" };
|
|
23
24
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
24
25
|
__name: "super-page",
|
|
@@ -39,8 +40,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
39
40
|
required: false
|
|
40
41
|
},
|
|
41
42
|
//表单数据ID
|
|
42
|
-
|
|
43
|
-
type:
|
|
43
|
+
dataId: {
|
|
44
|
+
type: Number,
|
|
44
45
|
required: false
|
|
45
46
|
},
|
|
46
47
|
//测试对象
|
|
@@ -110,6 +111,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
110
111
|
const buttonPageContext = ref(null);
|
|
111
112
|
const route = useRoute();
|
|
112
113
|
const pageKey = ref(0);
|
|
114
|
+
const isMobile = isMobileBrowser();
|
|
113
115
|
function initPageDesign(pageDesign) {
|
|
114
116
|
const tempContext = convertToPageContext(pageDesign, props.pageRequest);
|
|
115
117
|
tempContext.isTest = props.isTest;
|
|
@@ -245,7 +247,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
245
247
|
let myContentHeight = props.contentHeight;
|
|
246
248
|
if (!myContentHeight) {
|
|
247
249
|
const rect = parentNode.getBoundingClientRect();
|
|
248
|
-
|
|
250
|
+
console.log("setContextStyle-----isMobile=", isMobile);
|
|
251
|
+
if (!isMobile) {
|
|
252
|
+
myContentHeight = window.innerHeight - rect.y - 40;
|
|
253
|
+
} else {
|
|
254
|
+
myContentHeight = window.innerHeight - 78;
|
|
255
|
+
}
|
|
249
256
|
}
|
|
250
257
|
let heightStyle = myContentHeight;
|
|
251
258
|
if (isNumber(myContentHeight)) {
|
|
@@ -437,10 +444,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
437
444
|
function openDialog(configureObj, eventParams, myJumpPageSetting) {
|
|
438
445
|
getPopPageSetting(configureObj, eventParams, myJumpPageSetting).then((openPageParams) => {
|
|
439
446
|
if (openPageParams) {
|
|
447
|
+
const openPageParamsResult = deepCopy(openPageParams);
|
|
440
448
|
const myJumpPageSettingOrg = configureObj && configureObj["props"] && configureObj["props"].linkPage ? configureObj["props"].linkPage : null;
|
|
441
449
|
if (myJumpPageSettingOrg) {
|
|
442
450
|
Object.assign(openPageParams, deepCopy(myJumpPageSettingOrg));
|
|
443
451
|
}
|
|
452
|
+
refreshMobileDialogType(openPageParams, isMobile);
|
|
444
453
|
const jumpMode = openPageParams.jumpMode;
|
|
445
454
|
const popPageSetting = openPageParams;
|
|
446
455
|
if (!parentEventParams.value) {
|
|
@@ -450,16 +459,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
450
459
|
popPageSetting.parentPageCode = parentPageContext.value.code;
|
|
451
460
|
popPageSetting.parentPageVersion = parentPageContext.value.version;
|
|
452
461
|
popPageSetting.isNewPage = true;
|
|
453
|
-
if (jumpMode === "popup") {
|
|
454
|
-
jumpPageSetting.value = popPageSetting;
|
|
455
|
-
isShowDialog.value = true;
|
|
456
|
-
} else if (jumpMode === "refresh") {
|
|
457
|
-
router.push({
|
|
458
|
-
path: "/dsc/page",
|
|
459
|
-
query: popPageSetting
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
462
|
if (jumpMode === "popup" || jumpMode === "refresh") {
|
|
463
|
+
const linkType = popPageSetting.linkType;
|
|
464
|
+
if (parentPageContext.value.systemCode !== popPageSetting.customSystem || linkType && linkType === "url") {
|
|
465
|
+
if (jumpMode === "refresh") {
|
|
466
|
+
popPageSetting.dialogType = "drawer";
|
|
467
|
+
popPageSetting.jumpPageWidth = "100%";
|
|
468
|
+
}
|
|
469
|
+
popPageSetting._isIframe = true;
|
|
470
|
+
jumpPageSetting.value = popPageSetting;
|
|
471
|
+
isShowDialog.value = true;
|
|
472
|
+
} else {
|
|
473
|
+
popPageSetting._isIframe = false;
|
|
474
|
+
if (jumpMode === "popup") {
|
|
475
|
+
jumpPageSetting.value = popPageSetting;
|
|
476
|
+
isShowDialog.value = true;
|
|
477
|
+
} else if (jumpMode === "refresh") {
|
|
478
|
+
router.push({
|
|
479
|
+
path: "/dsc/page",
|
|
480
|
+
query: openPageParamsResult
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
}
|
|
463
484
|
eventBus.$on(eventPageInfo.value + "close-dialog", (params) => {
|
|
464
485
|
closeFunc(params);
|
|
465
486
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.37",
|
|
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.
|
|
51
|
+
"agilebuilder-ui": "1.0.71",
|
|
52
52
|
"axios": "^1.6.8",
|
|
53
53
|
"cypress": "^13.6.6",
|
|
54
54
|
"element-plus": "^2.6.1",
|