super-page-runtime 2.1.50 → 2.1.57
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 +110 -3
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +12 -3
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +24 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +18 -1
- package/dist/es/components/runtime/utils/common-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/common-util.js +6 -5
- package/dist/es/components/runtime/utils/events/event-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/event-util.js +17 -4
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +6 -4
- package/dist/es/components/runtime/utils/events/validator-util.js +2 -1
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +1 -0
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +18 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +23 -5
- package/dist/es/components/runtime/utils/page-init-util.js +14 -10
- package/dist/es/components/runtime/utils/table-utils.js +3 -7
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -1
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +5 -3
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +108 -46
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +64 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +106 -20
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +0 -2
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +107 -53
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +25 -8
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +18 -3
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +0 -3
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +0 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +3 -12
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +49 -26
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +19 -12
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +3 -5
- package/dist/es/components/runtime/views/super-page.vue.js +88 -26
- package/package.json +2 -2
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -45,8 +45,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
return value;
|
|
46
46
|
}
|
|
47
47
|
if (formatStr) {
|
|
48
|
-
console.log("formatStr", formatStr);
|
|
49
|
-
console.log("before", value);
|
|
50
48
|
try {
|
|
51
49
|
const convertValue = dayjs(value);
|
|
52
50
|
let value2 = null;
|
|
@@ -55,7 +53,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
53
|
} else {
|
|
56
54
|
value2 = dayjs(value).format(formatStr);
|
|
57
55
|
}
|
|
58
|
-
console.log("after", value2);
|
|
59
56
|
return value2;
|
|
60
57
|
} catch (e) {
|
|
61
58
|
console.error("日期值格式化错误", e);
|
package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js
CHANGED
|
@@ -24,9 +24,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
const pathFields = getFieldsByVariable(propsBase.prop);
|
|
25
25
|
const nameFields = getFieldsByVariable(propsBase.propName);
|
|
26
26
|
const pageCode = props.pageContext.code;
|
|
27
|
-
console.log("pathFields-----", pathFields, "pageCode=", pageCode, "propsBase.prop=", propsBase.prop);
|
|
28
27
|
const componentId = ref(pathFields ? pageCode + "__" + pathFields.join("__") : null);
|
|
29
|
-
console.log("componentId-----", componentId.value);
|
|
30
28
|
const initPaths = getVariableValue(entity, pathFields);
|
|
31
29
|
const fileUploadRef = ref(null);
|
|
32
30
|
const fileList = ref([]);
|
package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js
CHANGED
|
@@ -21,23 +21,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
22
22
|
const isMobile = ref(isMobileBrowser());
|
|
23
23
|
const pageCode = props.pageContext.code;
|
|
24
|
-
console.log(
|
|
25
|
-
"pathFields-----",
|
|
26
|
-
dynamicFields,
|
|
27
|
-
"pageCode=",
|
|
28
|
-
pageCode,
|
|
29
|
-
"props.configure=",
|
|
30
|
-
props.configure
|
|
31
|
-
);
|
|
32
24
|
const componentId = ref(
|
|
33
25
|
dynamicFields && dynamicFields.length > 0 ? pageCode + "__" + dynamicFields.join("__") : null
|
|
34
26
|
);
|
|
35
|
-
console.log("componentId-----", componentId.value);
|
|
36
27
|
const dynamicModelMethod = computed({
|
|
37
28
|
get() {
|
|
38
29
|
return getVariableValue(entity, dynamicFields);
|
|
39
30
|
},
|
|
40
31
|
set(value) {
|
|
32
|
+
value = value.trim();
|
|
41
33
|
setVariableValue(entity, dynamicFields, value);
|
|
42
34
|
}
|
|
43
35
|
});
|
|
@@ -65,11 +57,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
57
|
} else {
|
|
66
58
|
userAgent = "browser";
|
|
67
59
|
}
|
|
68
|
-
|
|
60
|
+
const isApk = isMobile.value && userAgent && userAgent === "app" ? true : false;
|
|
69
61
|
const isShowScanIcon = ref(
|
|
70
|
-
isMobile.value && scanEnable.value && window.location.protocol === "https:" ? true : false
|
|
62
|
+
isApk && scanEnable.value || isMobile.value && scanEnable.value && window.location.protocol === "https:" ? true : false
|
|
71
63
|
);
|
|
72
|
-
const isApk = isMobile.value && userAgent && userAgent === "app" ? true : false;
|
|
73
64
|
let scanRuleSets = {};
|
|
74
65
|
if (((_b = designProperty.value.scan) == null ? void 0 : _b.enable) && ((_c = designProperty.value.scan.ruleList) == null ? void 0 : _c.length) > 0) {
|
|
75
66
|
setScanRuleSets();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, onMounted, onBeforeUnmount, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx,
|
|
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
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, computed, watch, onMounted, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode, renderList, createElementVNode } from "vue";
|
|
2
2
|
import { getVariableValue, setVariableValue, getOptionDatasFromPage, queryOptionDatasources, autoSetAfterSelect } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
4
4
|
import { handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
@@ -16,33 +16,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
const props = __props;
|
|
17
17
|
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
18
18
|
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
19
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
20
|
+
const runtimeStyle = runtimeInfo.style;
|
|
21
|
+
const runtimeClass = runtimeInfo.class;
|
|
22
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
23
|
+
const titleExceedStyle = runtimeInfo.titleExceedStyle;
|
|
24
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
19
25
|
const dynamicModelMethod = computed({
|
|
20
26
|
get() {
|
|
21
27
|
let val = getVariableValue(entity, dynamicFields);
|
|
22
|
-
console.log("select组件----dynamicModelMethod---get-111-val", val);
|
|
23
28
|
if (val !== void 0 && val !== null) {
|
|
24
29
|
val = val + "";
|
|
25
30
|
}
|
|
26
|
-
|
|
31
|
+
if (designProperty.value.multiple) {
|
|
32
|
+
if (val) {
|
|
33
|
+
val = val.split(",");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
27
36
|
return val;
|
|
28
37
|
},
|
|
29
38
|
set(value) {
|
|
30
|
-
|
|
39
|
+
if (designProperty.value.multiple) {
|
|
40
|
+
if (value && value.length > 0) {
|
|
41
|
+
value = value.join(",");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
31
44
|
setVariableValue(entity, dynamicFields, value);
|
|
32
45
|
}
|
|
33
46
|
});
|
|
34
|
-
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
35
|
-
const runtimeStyle = runtimeInfo.style;
|
|
36
|
-
const runtimeClass = runtimeInfo.class;
|
|
37
|
-
const headerStyle = runtimeInfo.headerStyle;
|
|
38
|
-
const titleExceedStyle = runtimeInfo.titleExceedStyle;
|
|
39
|
-
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
40
47
|
const listOptions = ref(designProperty.value.options ? designProperty.value.options : []);
|
|
41
48
|
const cacheOptions = getOptionDatasFromPage(props.pageContext, props.configure);
|
|
42
49
|
if (cacheOptions.length > 0) {
|
|
43
50
|
listOptions.value = cacheOptions;
|
|
44
51
|
}
|
|
45
|
-
console.log("select组件----listOptions.value=", listOptions.value);
|
|
46
52
|
const queryLoadingFlag = ref(false);
|
|
47
53
|
const dataOrigin = props.configure.props && props.configure.props.dataOrigin ? props.configure.props.dataOrigin : {};
|
|
48
54
|
const valueType = dataOrigin.optionValueSetType;
|
|
@@ -153,8 +159,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
153
159
|
}
|
|
154
160
|
function updateOptions(newOptions) {
|
|
155
161
|
listOptions.value = newOptions ? newOptions : [];
|
|
156
|
-
console.log("updateOptions", newOptions);
|
|
157
162
|
}
|
|
163
|
+
onMounted(() => {
|
|
164
|
+
});
|
|
158
165
|
__expose({
|
|
159
166
|
updateOptions
|
|
160
167
|
});
|
|
@@ -14,13 +14,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
configure: {}
|
|
15
15
|
},
|
|
16
16
|
setup(__props) {
|
|
17
|
-
var _a;
|
|
17
|
+
var _a, _b;
|
|
18
18
|
const props = __props;
|
|
19
19
|
if (props.configure.style == void 0) {
|
|
20
20
|
props.configure.style = {};
|
|
21
21
|
}
|
|
22
22
|
const permissionCodes = getPermissionCodes(props.configure, props.pageContext);
|
|
23
|
-
console.log("Object-Render---permissionCodes=", permissionCodes);
|
|
24
23
|
if (props.configure && props.configure.props && props.configure.props.base) {
|
|
25
24
|
props.configure.props.base.functionCode = permissionCodes;
|
|
26
25
|
}
|
|
@@ -51,13 +50,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
|
-
console.log("obj-render-dynamicShowFlag", dynamicShowFlag);
|
|
55
53
|
return dynamicShowFlag;
|
|
56
54
|
});
|
|
57
55
|
const propConfigure = props.configure;
|
|
58
56
|
propConfigure._dynamicShowFlag = showFlag;
|
|
59
|
-
if (props.configure.props.editConditions) {
|
|
60
|
-
const editConditions = props.configure.props.editConditions;
|
|
57
|
+
if ((_b = props.configure.props.base) == null ? void 0 : _b.editConditions) {
|
|
58
|
+
const editConditions = props.configure.props.base.editConditions;
|
|
61
59
|
if (editConditions.length > 0) {
|
|
62
60
|
const runtime = props.configure.runtime ? props.configure.runtime : {};
|
|
63
61
|
const property = runtime.props ? runtime.props : {};
|
|
@@ -3,7 +3,7 @@ import _sfc_main$1 from "./assemblys/object-render.vue.js";
|
|
|
3
3
|
import { updateOptionDatasources, updateChartDatasources } from "../utils/page-helper-util.js";
|
|
4
4
|
import { queryPageSuperGrids, queryPageDesignByCode, convertToPageContext, packageAdditionalMapWithRoute } from "../utils/page-init-util.js";
|
|
5
5
|
import { addComponentRef, removePageAllRef, initComponentRefState } from "../utils/global-refs.js";
|
|
6
|
-
import { removeCustomFuncFromWindow, handleEvent, initPageEvents } from "../utils/events/event-util.js";
|
|
6
|
+
import { removeCustomFuncFromWindow, handleEvent, initPageEvents, getCustomFunc } from "../utils/events/event-util.js";
|
|
7
7
|
import _sfc_main$2 from "./assemblys/common/export-form-report-dialog.vue.js";
|
|
8
8
|
import _sfc_main$3 from "./assemblys/common/task-informition-dialog.vue.js";
|
|
9
9
|
import _sfc_main$4 from "./assemblys/common/remove-signer-dialog.vue.js";
|
|
@@ -17,10 +17,11 @@ import { i18nValidateRulesMessage } from "../utils/events/validator-util.js";
|
|
|
17
17
|
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
|
-
import { setSessionCache } from "agilebuilder-ui/src/utils/auth";
|
|
20
|
+
import { setSessionCache, getUsername } from "agilebuilder-ui/src/utils/auth";
|
|
21
21
|
import { deepCopy, isNumber, refreshMobileDialogType } from "../utils/common-util.js";
|
|
22
22
|
import { isMobileBrowser } from "agilebuilder-ui/src/utils/common-util";
|
|
23
23
|
import { usePageContextStore } from "../utils/page-store.js";
|
|
24
|
+
import imatrixUiStore from "agilebuilder-ui/src/store";
|
|
24
25
|
const _hoisted_1 = { class: "app-container" };
|
|
25
26
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
26
27
|
__name: "super-page",
|
|
@@ -236,7 +237,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
236
237
|
pageContext2.initChartData = {};
|
|
237
238
|
pageContext2.initChartData.data = deepCopy(pageContext2.entity.data);
|
|
238
239
|
pageContext2.initChartData.page = deepCopy(pageContext2.entity.page);
|
|
239
|
-
console.log("pageContext.chartConfigs:", chartConfigs);
|
|
240
240
|
if (chartConfigs && chartConfigs.length > 0) {
|
|
241
241
|
updateChartDatasources(pageContext2, chartConfigs, null, true);
|
|
242
242
|
}
|
|
@@ -271,8 +271,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
271
271
|
setTimeout(() => {
|
|
272
272
|
initPageDesign(props.pageDesign).then(() => {
|
|
273
273
|
if (props.pageDesign.tableRuntimes && Object.keys(props.pageDesign.tableRuntimes).length > 0) {
|
|
274
|
-
queryPageSuperGrids(props.pageDesign, pageContext.value, props.publishVersion).then((
|
|
275
|
-
pageContext.value.
|
|
274
|
+
queryPageSuperGrids(props.pageDesign, pageContext.value, props.publishVersion).then((result) => {
|
|
275
|
+
pageContext.value.isWorkflowEntity = result.isWorkflowEntity;
|
|
276
|
+
pageContext.value.dataTypeMaps = result.dataTypeMaps;
|
|
277
|
+
pageContext.value.superGridItems = result.superGrids;
|
|
276
278
|
}).catch((error) => {
|
|
277
279
|
console.log("queryPageSuperGrids error", error);
|
|
278
280
|
}).finally(() => {
|
|
@@ -443,6 +445,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
443
445
|
}
|
|
444
446
|
});
|
|
445
447
|
}
|
|
448
|
+
function getCurrentUserPermissionsWhenPopPageDiff(popPageSetting, jumpMode) {
|
|
449
|
+
const loginName = getUsername();
|
|
450
|
+
return new Promise((resolve, reject) => {
|
|
451
|
+
if (loginName) {
|
|
452
|
+
debugger;
|
|
453
|
+
if ((jumpMode === "popup" || isMobile) && parentPageContext.value.systemCode !== popPageSetting.customSystem) {
|
|
454
|
+
const systemCode = popPageSetting.customSystem;
|
|
455
|
+
imatrixUiStore.dispatch("getCurrentUserPermissions", { loginName, systemCode }).then(() => {
|
|
456
|
+
resolve(true);
|
|
457
|
+
}).catch(() => {
|
|
458
|
+
console.log("获得用户权限失败");
|
|
459
|
+
resolve(true);
|
|
460
|
+
});
|
|
461
|
+
} else {
|
|
462
|
+
resolve(true);
|
|
463
|
+
}
|
|
464
|
+
} else {
|
|
465
|
+
resolve(true);
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
}
|
|
446
469
|
const router = useRouter();
|
|
447
470
|
function openDialog(configureObj, eventParams, myJumpPageSetting) {
|
|
448
471
|
getPopPageSetting(configureObj, eventParams, myJumpPageSetting).then((openPageParams) => {
|
|
@@ -469,31 +492,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
469
492
|
popPageSetting.isNewPage = true;
|
|
470
493
|
if (jumpMode === "popup" || jumpMode === "refresh") {
|
|
471
494
|
const linkType = popPageSetting.linkType;
|
|
472
|
-
|
|
473
|
-
popPageSetting.
|
|
474
|
-
|
|
475
|
-
popPageSetting.dialogType = "drawer";
|
|
476
|
-
popPageSetting.jumpPageWidth = "100%";
|
|
477
|
-
}
|
|
478
|
-
jumpPageSetting.value = popPageSetting;
|
|
479
|
-
isShowDialog.value = true;
|
|
480
|
-
} else {
|
|
481
|
-
popPageSetting._isIframe = false;
|
|
482
|
-
if (jumpMode === "popup" || isMobile && jumpMode === "refresh") {
|
|
495
|
+
getCurrentUserPermissionsWhenPopPageDiff(popPageSetting, jumpMode).then(() => {
|
|
496
|
+
if (isMobile && (parentPageContext.value.systemCode !== popPageSetting.customSystem || linkType && linkType === "url")) {
|
|
497
|
+
popPageSetting._isIframe = true;
|
|
483
498
|
if (jumpMode === "refresh") {
|
|
484
499
|
popPageSetting.dialogType = "drawer";
|
|
485
500
|
popPageSetting.jumpPageWidth = "100%";
|
|
486
501
|
}
|
|
487
|
-
debugger;
|
|
488
502
|
jumpPageSetting.value = popPageSetting;
|
|
489
503
|
isShowDialog.value = true;
|
|
490
|
-
} else
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
504
|
+
} else {
|
|
505
|
+
popPageSetting._isIframe = false;
|
|
506
|
+
if (jumpMode === "popup" || isMobile && jumpMode === "refresh") {
|
|
507
|
+
if (jumpMode === "refresh") {
|
|
508
|
+
popPageSetting.dialogType = "drawer";
|
|
509
|
+
popPageSetting.jumpPageWidth = "100%";
|
|
510
|
+
}
|
|
511
|
+
jumpPageSetting.value = popPageSetting;
|
|
512
|
+
isShowDialog.value = true;
|
|
513
|
+
} else if (jumpMode === "refresh") {
|
|
514
|
+
router.push({
|
|
515
|
+
path: "/dsc/page",
|
|
516
|
+
query: popPageSetting
|
|
517
|
+
});
|
|
518
|
+
}
|
|
495
519
|
}
|
|
496
|
-
}
|
|
520
|
+
});
|
|
497
521
|
eventBus.$on(eventPageInfo.value + "close-dialog", (params) => {
|
|
498
522
|
closeFunc(params);
|
|
499
523
|
});
|
|
@@ -504,6 +528,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
504
528
|
});
|
|
505
529
|
}
|
|
506
530
|
function closeFunc(params) {
|
|
531
|
+
debugger;
|
|
507
532
|
const jumpMode = params.jumpMode;
|
|
508
533
|
if (jumpMode && jumpMode === "popup" || isMobile && jumpMode === "refresh") {
|
|
509
534
|
closeDialog(params);
|
|
@@ -512,6 +537,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
512
537
|
}
|
|
513
538
|
}
|
|
514
539
|
function closeDialog(params) {
|
|
540
|
+
debugger;
|
|
541
|
+
const closeEventName = jumpPageSetting.value.closeEvent;
|
|
542
|
+
const isRefreshWhenClosePopup = jumpPageSetting.value.isRefreshWhenClosePopup;
|
|
515
543
|
let dataModel;
|
|
516
544
|
let sourceTableName;
|
|
517
545
|
if (params) {
|
|
@@ -528,20 +556,54 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
528
556
|
}
|
|
529
557
|
}
|
|
530
558
|
const targetTableName = parentPageContext.value.tableName;
|
|
531
|
-
|
|
559
|
+
let currentParentConfigureObj;
|
|
560
|
+
const columnProp = parentEventParams.value.columnProp ? parentEventParams.value.columnProp : null;
|
|
561
|
+
if (columnProp) {
|
|
562
|
+
const columnConfigures = parentConfigureObj.value.items.filter(
|
|
563
|
+
(column) => {
|
|
564
|
+
var _a, _b, _c, _d;
|
|
565
|
+
return ((_b = (_a = column.props) == null ? void 0 : _a.base) == null ? void 0 : _b.prop) && ((_d = (_c = column.props) == null ? void 0 : _c.base) == null ? void 0 : _d.prop) === columnProp;
|
|
566
|
+
}
|
|
567
|
+
);
|
|
568
|
+
currentParentConfigureObj = columnConfigures && columnConfigures.length > 0 ? columnConfigures[0] : null;
|
|
569
|
+
} else {
|
|
570
|
+
currentParentConfigureObj = parentConfigureObj.value;
|
|
571
|
+
}
|
|
572
|
+
handleEvent(null, parentPageContext.value, currentParentConfigureObj, "closePopup", {
|
|
532
573
|
sourceModel: dataModel,
|
|
533
574
|
sourceTableName,
|
|
534
575
|
jumpPageSetting,
|
|
535
576
|
entity: parentPageContext.value.entity.data,
|
|
536
|
-
targetTableName
|
|
577
|
+
targetTableName,
|
|
578
|
+
pageContext: pageContext.value,
|
|
579
|
+
parentPageContext: parentPageContext.value,
|
|
580
|
+
parentConfigureObj: currentParentConfigureObj,
|
|
581
|
+
columnProp
|
|
537
582
|
});
|
|
538
|
-
|
|
583
|
+
handleCloseDialogEvent(closeEventName, columnProp, currentParentConfigureObj);
|
|
584
|
+
refreshFormOrListPage(parentPageContext.value, parentConfigureObj.value, isRefreshWhenClosePopup);
|
|
539
585
|
parentPageContext.value = null;
|
|
540
586
|
parentConfigureObj.value = null;
|
|
541
587
|
parentEventParams.value = null;
|
|
542
588
|
eventBus.$off(eventPageInfo.value + "close-dialog");
|
|
543
589
|
isShowDialog.value = false;
|
|
544
590
|
}
|
|
591
|
+
function handleCloseDialogEvent(closeEventName, columnProp, currentParentConfigureObj) {
|
|
592
|
+
if (closeEventName) {
|
|
593
|
+
const func = getCustomFunc(parentPageContext.value, closeEventName);
|
|
594
|
+
if (func) {
|
|
595
|
+
func.apply(func, [
|
|
596
|
+
{
|
|
597
|
+
pageContext: pageContext.value,
|
|
598
|
+
parentPageContext: parentPageContext.value,
|
|
599
|
+
parentConfigureObj: currentParentConfigureObj,
|
|
600
|
+
jumpPageSetting,
|
|
601
|
+
columnProp
|
|
602
|
+
}
|
|
603
|
+
]);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
545
607
|
function pickFileDone(data) {
|
|
546
608
|
let componentId = data.componentId;
|
|
547
609
|
let listCode = data.listCode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.57",
|
|
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.89",
|
|
52
52
|
"axios": "^1.6.8",
|
|
53
53
|
"cypress": "^13.6.6",
|
|
54
54
|
"element-plus": "^2.6.1",
|