super-page-runtime 2.3.4-sit1 → 2.3.5-rc1
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 +35 -27
- package/dist/es/components/runtime/utils/common-util.d.ts +1 -1
- package/dist/es/components/runtime/utils/common-util.js +62 -47
- package/dist/es/components/runtime/utils/events/event-util.js +3 -3
- package/dist/es/components/runtime/utils/events/print-label.js +26 -25
- package/dist/es/components/runtime/utils/events/standard-event.js +21 -19
- package/dist/es/components/runtime/utils/events/validator-util.js +23 -23
- package/dist/es/components/runtime/utils/page-init-util.d.ts +1 -1
- package/dist/es/components/runtime/utils/page-init-util.js +60 -48
- package/dist/es/components/runtime/utils/page-store.js +10 -10
- package/dist/es/components/runtime/utils/table-utils.d.ts +14 -0
- package/dist/es/components/runtime/utils/table-utils.js +57 -32
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +8 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +20 -20
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +8 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +15 -10
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +6 -6
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +3 -2
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +8 -4
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -25
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -0
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +10 -9
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +48 -48
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +24 -15
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +29 -29
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +23 -22
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +50 -49
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +5 -3
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +69 -67
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +1 -0
- package/dist/es/components/runtime/views/super-page.vue.d.ts +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +12 -11
- package/dist/es/style.css +82 -82
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "async-validator";
|
|
2
2
|
import { ElMessage as t } from "element-plus";
|
|
3
|
-
import { getComponentRefByCode as n,
|
|
3
|
+
import { getComponentRefByCode as n, getComponentRef as s, getAllComponentRefs as r } from "../global-refs.js";
|
|
4
4
|
import { getI18n as i } from "agilebuilder-ui/src/utils/util";
|
|
5
5
|
import { getAdditionalParamMap as l } from "./standard-event.js";
|
|
6
6
|
import { isPromise as o } from "agilebuilder-ui/src/utils/common-util";
|
|
@@ -94,17 +94,17 @@ function p(e2, n2, s2) {
|
|
|
94
94
|
}
|
|
95
95
|
function g(e2) {
|
|
96
96
|
return new Promise((t2, n2) => {
|
|
97
|
-
const
|
|
97
|
+
const r2 = [], i2 = e2.customValidatorUuids;
|
|
98
98
|
i2 && i2.forEach((t3) => {
|
|
99
|
-
const n3 =
|
|
100
|
-
n3 && n3.validator &&
|
|
101
|
-
}),
|
|
99
|
+
const n3 = s(e2, t3);
|
|
100
|
+
n3 && n3.validator && r2.push(n3.validator());
|
|
101
|
+
}), r2 && r2.length > 0 ? Promise.all(r2).then((e3) => {
|
|
102
102
|
e3.includes(false) ? t2(false) : t2(true);
|
|
103
103
|
}) : t2(true);
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
function b(e2, t2, n2) {
|
|
107
|
-
return new Promise((
|
|
107
|
+
return new Promise((r2, l2) => {
|
|
108
108
|
const a2 = JSON.parse(JSON.stringify(e2));
|
|
109
109
|
if (n2 && 0 !== Object.keys(n2).length) {
|
|
110
110
|
if (true === c(a2, n2, null, null)) {
|
|
@@ -113,7 +113,7 @@ function b(e2, t2, n2) {
|
|
|
113
113
|
const t3 = e4.tableUuids;
|
|
114
114
|
if (!t3) return true;
|
|
115
115
|
for (let n3 = 0; n3 < t3.length; n3++) {
|
|
116
|
-
const
|
|
116
|
+
const r3 = t3[n3], i2 = s(e4, r3);
|
|
117
117
|
if (i2) {
|
|
118
118
|
if (!i2.validatorSunTableListData()) return false;
|
|
119
119
|
}
|
|
@@ -124,33 +124,33 @@ function b(e2, t2, n2) {
|
|
|
124
124
|
const e4 = function(e5) {
|
|
125
125
|
const t3 = [];
|
|
126
126
|
e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((n3) => {
|
|
127
|
-
n3.events.forEach((
|
|
128
|
-
const
|
|
129
|
-
t3.push(
|
|
127
|
+
n3.events.forEach((s2) => {
|
|
128
|
+
const r3 = e5.customEvents[s2];
|
|
129
|
+
t3.push(r3.apply(r3, [{ prop: n3.prop, pageContext: e5 }]));
|
|
130
130
|
});
|
|
131
131
|
});
|
|
132
132
|
if (t3 && t3.length > 0) return new Promise((e6, n3) => {
|
|
133
|
-
const
|
|
133
|
+
const s2 = [], r3 = [];
|
|
134
134
|
t3.forEach((e7) => {
|
|
135
|
-
o(e7) ?
|
|
136
|
-
}),
|
|
135
|
+
o(e7) ? s2.push(e7) : r3.push(e7);
|
|
136
|
+
}), r3.includes(false) && e6(false), s2.length > 0 ? Promise.all(s2).then((t4) => {
|
|
137
137
|
t4.includes(false) ? e6(false) : e6(true);
|
|
138
138
|
}).catch((t4) => {
|
|
139
|
-
e6(false);
|
|
139
|
+
console.error(t4), e6(false);
|
|
140
140
|
}) : e6(true);
|
|
141
141
|
});
|
|
142
142
|
return null;
|
|
143
143
|
}(t2);
|
|
144
144
|
e4 && o(e4) ? e4.then((e5) => {
|
|
145
145
|
e5 ? g(t2).then((e6) => {
|
|
146
|
-
|
|
147
|
-
}) :
|
|
146
|
+
r2(e6);
|
|
147
|
+
}) : r2(false);
|
|
148
148
|
}) : g(t2).then((e5) => {
|
|
149
|
-
|
|
149
|
+
r2(e5);
|
|
150
150
|
});
|
|
151
151
|
} else l2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
152
152
|
} else l2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
153
|
-
} else
|
|
153
|
+
} else r2(true);
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
function h(e2, t2) {
|
|
@@ -212,19 +212,19 @@ function R(e2) {
|
|
|
212
212
|
E(e2, { disabled: true });
|
|
213
213
|
}
|
|
214
214
|
function E(e2, t2) {
|
|
215
|
-
const n2 =
|
|
215
|
+
const n2 = r(e2);
|
|
216
216
|
if (n2) for (const e3 in n2) {
|
|
217
217
|
const s2 = n2[e3];
|
|
218
218
|
O(s2 ? s2.value : s2, t2);
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
function k(e2, t2,
|
|
221
|
+
function k(e2, t2, r2) {
|
|
222
222
|
var _a;
|
|
223
223
|
let i2, l2;
|
|
224
|
-
if (
|
|
224
|
+
if (r2 ? (i2 = n(e2, r2), l2 = i2 ? i2.getTableUuid() : null) : (l2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = l2 ? s(e2, l2) : null), !i2) return;
|
|
225
225
|
const o2 = e2.code, u2 = e2.version, f2 = a(o2, u2, l2);
|
|
226
|
-
if (((_a = e2.workflowRules) == null ? void 0 : _a.subRules) && e2.workflowRules.subRules[
|
|
227
|
-
const n2 = e2.workflowRules.subRules[
|
|
226
|
+
if (((_a = e2.workflowRules) == null ? void 0 : _a.subRules) && e2.workflowRules.subRules[r2]) {
|
|
227
|
+
const n2 = e2.workflowRules.subRules[r2];
|
|
228
228
|
t2.forEach((e3) => {
|
|
229
229
|
n2[e3.name] = e3;
|
|
230
230
|
});
|
|
@@ -44,5 +44,5 @@ export declare function getPermissionCodes(configure: Component, pageContext: Pa
|
|
|
44
44
|
* @returns
|
|
45
45
|
*/
|
|
46
46
|
export declare function queryPageSuperGrids(pageDesign: any, pageContext: any, publishVersion: any): Promise<any>;
|
|
47
|
-
export declare function packageFormRules(pageContext: PageContext, configure: any): void;
|
|
47
|
+
export declare function packageFormRules(pageContext: PageContext, configure: any, isHasPermission: boolean): void;
|
|
48
48
|
export declare function controlObjectRenderState(pageContext: PageContext, propName: string): void;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import e from "agilebuilder-ui/src/utils/request";
|
|
2
2
|
import { getAdditionalParamMap as t } from "./events/standard-event.js";
|
|
3
3
|
import { PageDimensions as s } from "./interfaces/page-design-types.js";
|
|
4
|
-
import { getFormPropName as i, getVariableValue as
|
|
4
|
+
import { getFormPropName as i, getVariableValue as o, setVariableValue as n, formatVariableValue as r } from "./page-helper-util.js";
|
|
5
5
|
import { getSessionCache as l } from "agilebuilder-ui/src/utils/auth";
|
|
6
6
|
import { functions as a } from "./api/page-expose-util.js";
|
|
7
7
|
import { isWorkflowPage as p, deepCopy as u } from "./common-util.js";
|
|
8
8
|
import { packageCustomValidator as d } from "./events/validator-util.js";
|
|
9
|
-
import { isMobileBrowser as
|
|
10
|
-
function
|
|
9
|
+
import { isMobileBrowser as f } from "agilebuilder-ui/src/utils/common-util";
|
|
10
|
+
function m(t2) {
|
|
11
11
|
return e.get(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + t2);
|
|
12
12
|
}
|
|
13
13
|
function c(e2) {
|
|
14
14
|
var _a, _b, _c;
|
|
15
15
|
if (null == e2) return null;
|
|
16
|
-
const t2 = { uuid: e2.uuid, name: e2.name, label: e2.label, code: e2.code, version: e2.version, dimensions: e2.dimensions, systemCode: e2.systemCode, systemVersion: e2.systemVersion, backendUrl: e2.backendUrl, rules: {}, tableUuids: e2.tableUuids, listCodesMap: e2.listCodesMap, formNoRuleCode: e2.props ? e2.props.formNoRuleCode : null, judgeHeavyList: g(e2), pageType: e2.pageType, beanName: e2.props ? e2.props.beanName : null, importBeanName: e2.props ? e2.props.importBeanName : null, subTablePageInfo: e2.subTablePageInfo, workflowCode: e2.workflowCode, workflowVersion: e2.workflowVersion, refercePropMap: (_a = e2.runtime) == null ? void 0 : _a.refercePropMap, subTableWatchProps: e2.subTableWatchProps, dataTypeMaps: e2.dataTypeMaps, isWorkflowEntity: void 0 !== ((_b = e2.props) == null ? void 0 : _b.activeWorkflow) ? (_c = e2.props) == null ? void 0 : _c.activeWorkflow : e2.isWorkflowEntity, allChartUuids: e2.allChartUuids, entity: { data: {}, task: {}, request: {}, page: {}, context: e2.contextParam, system: e2.systemParam } };
|
|
16
|
+
const t2 = { uuid: e2.uuid, name: e2.name, label: e2.label, code: e2.code, version: e2.version, dimensions: e2.dimensions, systemCode: e2.systemCode, systemVersion: e2.systemVersion, backendUrl: e2.backendUrl, rules: {}, tableUuids: e2.tableUuids, listCodesMap: e2.listCodesMap, formNoRuleCode: e2.props ? e2.props.formNoRuleCode : null, judgeHeavyList: g(e2), pageType: e2.pageType, beanName: e2.props ? e2.props.beanName : null, importBeanName: e2.props ? e2.props.importBeanName : null, subTablePageInfo: e2.subTablePageInfo, workflowCode: e2.workflowCode, workflowVersion: e2.workflowVersion, refercePropMap: (_a = e2.runtime) == null ? void 0 : _a.refercePropMap, subTableWatchProps: e2.subTableWatchProps, dataTypeMaps: e2.dataTypeMaps, isWorkflowEntity: void 0 !== ((_b = e2.props) == null ? void 0 : _b.activeWorkflow) ? (_c = e2.props) == null ? void 0 : _c.activeWorkflow : e2.isWorkflowEntity, allChartUuids: e2.allChartUuids, branchFieldAuth: e2.branchFieldAuth, entity: { data: {}, task: {}, request: {}, page: {}, context: e2.contextParam, system: e2.systemParam } };
|
|
17
17
|
if (e2.props && e2.props.notIdInitializationList) {
|
|
18
18
|
let s2 = e2.props.notIdInitializationList;
|
|
19
19
|
"string" == typeof s2 && (s2 = JSON.parse(s2)), s2.length > 0 && (t2.notIdInitializationList = s2);
|
|
@@ -23,7 +23,7 @@ function c(e2) {
|
|
|
23
23
|
for (const t3 of e2.variables) t3.name && (t3.isArrayElement ? s2[t3.name] = [] : t3.defaultValue ? s2[t3.name] = t3.defaultValue : s2[t3.name] = void 0);
|
|
24
24
|
}
|
|
25
25
|
return function(e3) {
|
|
26
|
-
if (
|
|
26
|
+
if (f()) {
|
|
27
27
|
e3.entity.page._isMobile = "true";
|
|
28
28
|
const t3 = navigator ? navigator.userAgent : null;
|
|
29
29
|
t3 ? t3.indexOf(" uni-app ") > 0 ? (e3.entity.page._isMobileApp = "true", e3.entity.page._isMobileBrowser = "false") : (e3.entity.page._isMobileApp = "false", e3.entity.page._isMobileBrowser = "true") : (e3.entity.page._isMobileApp = "false", e3.entity.page._isMobileBrowser = "false");
|
|
@@ -40,6 +40,7 @@ function g(e2) {
|
|
|
40
40
|
e3.duplicateFieldList && e3.duplicateFieldList.length > 0 && (e3.duplicateFieldList = e3.duplicateFieldList.map((e4) => "string" == typeof e4 ? { propDbName: e4 } : e4));
|
|
41
41
|
}), e2.props.judgeHeavyList) : null;
|
|
42
42
|
} catch (e3) {
|
|
43
|
+
console.error("getJudgeHeavyList error:", e3);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
function b(e2) {
|
|
@@ -57,16 +58,16 @@ function b(e2) {
|
|
|
57
58
|
function y(e2, t2) {
|
|
58
59
|
if (e2) {
|
|
59
60
|
Object.assign(t2, e2);
|
|
60
|
-
|
|
61
|
+
w(e2.paramStoreId, t2), delete e2.paramStoreId, e2.jumpMode && (t2.jumpMode = e2.jumpMode);
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
function h(e2, t2) {
|
|
64
|
-
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query)) {
|
|
65
|
+
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query, e2.query)) {
|
|
65
66
|
Object.assign(t2, e2.query);
|
|
66
|
-
|
|
67
|
+
w(e2.query.paramStoreId, t2);
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
+
function w(e2, t2) {
|
|
70
71
|
if (e2) {
|
|
71
72
|
const s2 = l(e2);
|
|
72
73
|
if (s2) {
|
|
@@ -78,85 +79,96 @@ function v(e2, t2) {
|
|
|
78
79
|
function E(e2, t2) {
|
|
79
80
|
let s2, i2 = t2;
|
|
80
81
|
t2 || (s2 = e2.props.base ? e2.props.base : {}, i2 = s2.prop);
|
|
81
|
-
let
|
|
82
|
-
return t2 && !t2.startsWith("${") ?
|
|
82
|
+
let o2 = null;
|
|
83
|
+
return t2 && !t2.startsWith("${") ? o2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), o2 = i2.split("."), e2 && o2.length < 2 && (o2 = [e2.uuid])) : e2 && (o2 = ["page", e2.uuid]) : o2 = ["page", e2.uuid], o2 || e2 ? o2 : ["temp"];
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
+
function v(e2, t2, s2) {
|
|
85
86
|
const i2 = E(t2, s2), r2 = e2.entity;
|
|
86
87
|
if (null == r2.data.ID && null == r2.data.id) {
|
|
87
88
|
let s3, l2, a2 = false;
|
|
88
89
|
t2 && (s3 = t2.props.base ? t2.props.base : {}, l2 = t2.name, a2 = s3.multiple);
|
|
89
|
-
const p2 =
|
|
90
|
+
const p2 = o(r2, i2);
|
|
90
91
|
if (null == p2) {
|
|
91
92
|
const t3 = s3 ? s3.defaultValue : null;
|
|
92
93
|
if (t3) {
|
|
93
94
|
const s4 = P(e2, t3, l2, a2);
|
|
94
|
-
null != s4 &&
|
|
95
|
+
null != s4 && n(r2, i2, s4);
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
return i2;
|
|
99
100
|
}
|
|
100
101
|
function P(e2, t2, s2, i2) {
|
|
101
|
-
let
|
|
102
|
-
if (t2 && (
|
|
102
|
+
let o2;
|
|
103
|
+
if (t2 && (o2 = r(e2, t2), null != o2 && null != o2 && s2)) {
|
|
103
104
|
let e3 = false;
|
|
104
|
-
"checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = i2), e3 && (
|
|
105
|
+
"checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = i2), e3 && (o2 = (o2 + "").split(","));
|
|
105
106
|
}
|
|
106
|
-
return
|
|
107
|
+
return o2;
|
|
107
108
|
}
|
|
108
109
|
function M(e2, t2) {
|
|
109
110
|
const s2 = [];
|
|
110
111
|
if (e2.autoPermissions) for (const i2 of e2.autoPermissions) s2.push(t2.code + "." + i2.simpleCode);
|
|
111
112
|
if (e2.functionCodes) {
|
|
112
|
-
const i2 = e2.sourceTypes ? e2.sourceTypes : [],
|
|
113
|
-
for (let e3 = 0; e3 <
|
|
114
|
-
const
|
|
113
|
+
const i2 = e2.sourceTypes ? e2.sourceTypes : [], o2 = e2.functionCodes;
|
|
114
|
+
for (let e3 = 0; e3 < o2.length; e3++) {
|
|
115
|
+
const n2 = o2[e3], r2 = e3 < i2.length ? i2[e3] : "";
|
|
115
116
|
let l2 = "";
|
|
116
|
-
if ("service" == r2) l2 =
|
|
117
|
-
else if ("standard" === r2) l2 = t2.code + "." +
|
|
117
|
+
if ("service" == r2) l2 = n2;
|
|
118
|
+
else if ("standard" === r2) l2 = t2.code + "." + n2;
|
|
118
119
|
else {
|
|
119
|
-
l2 = "custom" ===
|
|
120
|
+
l2 = "custom" === k(n2, t2).type ? n2 : t2.code + "." + n2;
|
|
120
121
|
}
|
|
121
122
|
s2.includes(l2) || s2.push(l2);
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
return s2.join(",");
|
|
125
126
|
}
|
|
126
|
-
function
|
|
127
|
+
function k(e2, t2) {
|
|
127
128
|
const s2 = t2.pagePermissions;
|
|
128
129
|
if (s2 && s2.length > 0) {
|
|
129
130
|
for (let t3 = 0; t3 < s2.length; t3++) if (s2[t3].simpleCode === e2) return s2[t3];
|
|
130
131
|
}
|
|
131
132
|
return null;
|
|
132
133
|
}
|
|
133
|
-
function
|
|
134
|
-
const
|
|
134
|
+
function j(s2, i2, o2) {
|
|
135
|
+
const n2 = s2.tableRuntimes, r2 = t(i2);
|
|
135
136
|
let l2;
|
|
136
137
|
const a2 = i2.code;
|
|
137
|
-
return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes:
|
|
138
|
+
return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: n2, additionalParamMapJson: l2, pageCode: a2, publishVersion: o2, pageType: s2.pageType });
|
|
138
139
|
}
|
|
139
|
-
const
|
|
140
|
-
function
|
|
140
|
+
const C = ["button-detail", "print-label"];
|
|
141
|
+
function I(e2, t2, s2) {
|
|
141
142
|
var _a, _b;
|
|
142
|
-
const
|
|
143
|
-
let
|
|
144
|
-
if (n2 &&
|
|
143
|
+
const o2 = t2.props && t2.props.base ? t2.props.base.prop : null, n2 = p(e2);
|
|
144
|
+
let r2 = false;
|
|
145
|
+
if (n2 && C.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
|
|
145
146
|
const s3 = e2.fieldPermissionMap.get("all_fields");
|
|
146
|
-
false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled",
|
|
147
|
+
false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", r2 = true);
|
|
147
148
|
}
|
|
148
|
-
if (
|
|
149
|
-
const
|
|
150
|
-
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[
|
|
151
|
-
d(e3);
|
|
152
|
-
}), e2.rules[
|
|
153
|
-
const
|
|
154
|
-
|
|
149
|
+
if (o2) {
|
|
150
|
+
const l2 = i(o2);
|
|
151
|
+
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[l2] || (e2.rules[l2] = []), t2.props.rules.forEach((e3) => {
|
|
152
|
+
d(e3), !s2 && e3 && e3.required && (e3.required = false);
|
|
153
|
+
}), e2.rules[l2] = t2.props.rules), n2 && !r2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
|
|
154
|
+
const i2 = e2.fieldPermissionMap.get(l2);
|
|
155
|
+
if (!s2 && e2.workflowRules && (e2.workflowRules[l2] || e2.workflowRules.rules && e2.workflowRules.rules[l2])) {
|
|
156
|
+
let t3 = e2.workflowRules[l2];
|
|
157
|
+
if (!t3 && e2.workflowRules.rules && (t3 = e2.workflowRules.rules[l2]), t3 && Array.isArray(t3) && t3.length > 0) for (let e3 = 0; e3 < t3.length; e3++) {
|
|
158
|
+
const s3 = t3[e3];
|
|
159
|
+
if (s3 && s3.required) {
|
|
160
|
+
s3.required = false;
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
else t3 && t3.required && (t3.required = false);
|
|
165
|
+
}
|
|
166
|
+
t2.runtime.props || (t2.runtime.props = {}), i2 ? (!s2 && i2.canEdit && (i2.canEdit = false), false === i2.canEdit ? t2.runtime.props.state = "disabled" : i2.canEdit && (t2.runtime.props.state = "", t2.runtime.props.required = true)) : t2.runtime.props.state = "";
|
|
155
167
|
}
|
|
156
|
-
((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop:
|
|
168
|
+
((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop: l2, events: t2.props.customRuleEvents }));
|
|
157
169
|
}
|
|
158
170
|
}
|
|
159
|
-
function
|
|
171
|
+
function O(e2, t2) {
|
|
160
172
|
if (e2.initInfo) {
|
|
161
173
|
["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"].forEach((s2) => {
|
|
162
174
|
const i2 = e2.initInfo[s2];
|
|
@@ -172,16 +184,16 @@ function _(e2, t2) {
|
|
|
172
184
|
}
|
|
173
185
|
}
|
|
174
186
|
export {
|
|
175
|
-
|
|
187
|
+
O as controlObjectRenderState,
|
|
176
188
|
c as convertToPageContext,
|
|
177
189
|
P as getDefaultValue,
|
|
178
|
-
|
|
190
|
+
v as getFormModelFields,
|
|
179
191
|
E as getModelFields,
|
|
180
192
|
M as getPermissionCodes,
|
|
181
193
|
b as packageAdditionalMapWithLocationSearch,
|
|
182
194
|
y as packageAdditionalMapWithPageRequest,
|
|
183
195
|
h as packageAdditionalMapWithRoute,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
196
|
+
I as packageFormRules,
|
|
197
|
+
m as queryPageDesignByCode,
|
|
198
|
+
j as queryPageSuperGrids
|
|
187
199
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { ref as e } from "vue";
|
|
2
|
-
import { defineStore as
|
|
3
|
-
import
|
|
4
|
-
const t =
|
|
5
|
-
const
|
|
6
|
-
return { pageContext:
|
|
7
|
-
|
|
2
|
+
import { defineStore as a } from "pinia";
|
|
3
|
+
import o from "./eventBus.js";
|
|
4
|
+
const t = a("pageContextUtil", () => {
|
|
5
|
+
const a2 = e({ systemCode: "", systemVersion: -1 }), t2 = e(false), n = e(false), u = e(false), l = e(0), v = e(0);
|
|
6
|
+
return { pageContext: a2, setPageContext: function(e2) {
|
|
7
|
+
a2.value = e2;
|
|
8
8
|
}, countComponentsTotalNmber: function() {
|
|
9
9
|
l.value++, t2.value = false, u.value = false;
|
|
10
10
|
}, countComponentsLoadedNumber: function() {
|
|
11
|
-
|
|
12
|
-
}, componentsTotalNmber: l, componentsLoadedNumber:
|
|
13
|
-
t2.value = e2, t2.value && n.value && (
|
|
11
|
+
v.value++, u.value = false;
|
|
12
|
+
}, componentsTotalNmber: l, componentsLoadedNumber: v, setPageComponentsLoaded: function(e2) {
|
|
13
|
+
t2.value = e2, t2.value && n.value && (o.$emit("pageLoaded"), u.value = true);
|
|
14
14
|
}, setFormPageDataLoadState: function(e2) {
|
|
15
|
-
n.value = e2, t2.value && n.value && (u.value = true);
|
|
15
|
+
n.value = e2, t2.value && n.value && (t2.value, n.value, u.value = true);
|
|
16
16
|
}, formPageDataLoaded: n, pageComponentsLoaded: t2, restorePageLoadState: function() {
|
|
17
17
|
t2.value = false, n.value = false, u.value = false;
|
|
18
18
|
}, pageLoaded: u, getPageLoaded: function() {
|
|
@@ -18,3 +18,17 @@ export declare function getDistanceToAppContainer(tableDivRef: any): {
|
|
|
18
18
|
distanceToTop: number;
|
|
19
19
|
distanceToBottom: number;
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* 是否有字段的权限
|
|
23
|
+
* @param pageContext
|
|
24
|
+
* @param fieldName
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
export declare function isHasFieldAuth(pageContext: any, configure: any): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 是否有字段的权限
|
|
30
|
+
* @param pageContext
|
|
31
|
+
* @param fieldName
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
export declare function isHasFieldPermissionAuth(pageContext: any, tableName: any, fieldName: any): boolean;
|
|
@@ -1,55 +1,80 @@
|
|
|
1
1
|
import "agilebuilder-ui/src/utils/common-util";
|
|
2
2
|
import "agilebuilder-ui/src/utils/util";
|
|
3
|
+
import { ExpressionEvaluator as t } from "../views/assemblys/chart/table/chart-table-util.js";
|
|
4
|
+
import { getCustomFunc as e } from "./events/event-util.js";
|
|
3
5
|
import "agilebuilder-ui/src/utils/request";
|
|
4
|
-
import
|
|
5
|
-
import { getPermissionCodes as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
t.$emit(i2 + "_open-dialog", e2);
|
|
6
|
+
import i from "./eventBus.js";
|
|
7
|
+
import { getPermissionCodes as o } from "./page-init-util.js";
|
|
8
|
+
import { $t as n } from "./i18n-util.js";
|
|
9
|
+
import { getFormPropName as s } from "./page-helper-util.js";
|
|
10
|
+
function r(t2) {
|
|
11
|
+
const e2 = t2.pageContext && t2.pageContext.code;
|
|
12
|
+
i.$emit(e2 + "_open-dialog", t2);
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
+
function u(t2, e2) {
|
|
14
15
|
const i2 = t2.tableName;
|
|
15
16
|
if (!e2 && i2) return i2;
|
|
16
17
|
let o2;
|
|
17
18
|
return t2.tableRuntimes && e2 && t2.tableRuntimes[e2] && (o2 = JSON.parse(t2.tableRuntimes[e2].configure)), o2 && o2.props && o2.props.dataOrigin ? o2.props.dataOrigin.tableName : null;
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
const r2 = !(!
|
|
21
|
-
r2 && u2 && u2.forEach((
|
|
22
|
-
const r3 = {}, u3 = Object.assign({},
|
|
23
|
-
if ("custom" ===
|
|
24
|
-
const
|
|
25
|
-
|
|
20
|
+
function l(t2, e2, i2, s2) {
|
|
21
|
+
const r2 = !(!e2.props || !e2.props.base) && e2.props.base.showOperation, u2 = e2.btnList;
|
|
22
|
+
e2.btnList, r2 && u2 && u2.forEach((e3) => {
|
|
23
|
+
const r3 = {}, u3 = Object.assign({}, e3.props.base);
|
|
24
|
+
if ("custom" === e3.name ? u3.customControl = u3.name : u3.elementType = "el-button", void 0 === e3.isPermission || e3.isPermission + "" == "true") {
|
|
25
|
+
const i3 = o(e3, t2);
|
|
26
|
+
i3 && (u3.permission = i3);
|
|
26
27
|
}
|
|
27
|
-
if (u3.label =
|
|
28
|
-
const t3 =
|
|
28
|
+
if (u3.label = n(u3.title), u3.sourceButton = { uuid: e3.uuid }, r3.props = u3, void 0 !== s2) {
|
|
29
|
+
const t3 = s2(e3);
|
|
29
30
|
r3.onClick = (t3 == null ? void 0 : t3.onClick) ?? t3, r3.eventName = t3 == null ? void 0 : t3.eventName;
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
+
i2.push(r3);
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function p(i2, o2, n2, s2) {
|
|
35
36
|
let r2;
|
|
36
|
-
const u2 =
|
|
37
|
+
const u2 = n2 == null ? void 0 : n2.some((n3) => {
|
|
37
38
|
let u3 = false;
|
|
38
|
-
if (
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
|
|
39
|
+
if (n3.scopeFunc) {
|
|
40
|
+
const t2 = e(i2, n3.scopeFunc);
|
|
41
|
+
if (t2) {
|
|
42
|
+
t2.apply(t2, [{ pageContext: i2, configureObj: o2, row: s2 }]) && (u3 = true);
|
|
42
43
|
}
|
|
43
|
-
} else if (
|
|
44
|
-
|
|
44
|
+
} else if (n3.showCondition && n3.showCondition.length > 0) {
|
|
45
|
+
t.evaluate(i2, n3.showCondition, s2) && (u3 = true);
|
|
45
46
|
} else u3 = true;
|
|
46
|
-
if (u3) return r2 =
|
|
47
|
+
if (u3) return r2 = n3, true;
|
|
47
48
|
});
|
|
48
49
|
return { show: u2, toPage: r2 };
|
|
49
50
|
}
|
|
51
|
+
function a(t2, e2) {
|
|
52
|
+
var _a;
|
|
53
|
+
const i2 = t2.tableName;
|
|
54
|
+
let o2 = "";
|
|
55
|
+
const n2 = (_a = e2 == null ? void 0 : e2.props) == null ? void 0 : _a.base;
|
|
56
|
+
if (n2 && n2.prop) {
|
|
57
|
+
const t3 = n2.prop;
|
|
58
|
+
o2 = s(t3);
|
|
59
|
+
}
|
|
60
|
+
return c(t2, i2, o2);
|
|
61
|
+
}
|
|
62
|
+
function c(t2, e2, i2) {
|
|
63
|
+
if (!i2 || !e2) return true;
|
|
64
|
+
const o2 = t2.branchFieldAuth;
|
|
65
|
+
if (o2) {
|
|
66
|
+
const t3 = o2.hasAuthFields;
|
|
67
|
+
if (t3 && t3[e2] && t3[e2].indexOf(i2) >= 0) return true;
|
|
68
|
+
const n2 = o2.allAuthFields;
|
|
69
|
+
if (n2 && n2[e2] && n2[e2].indexOf(i2) >= 0) return false;
|
|
70
|
+
}
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
50
73
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
74
|
+
p as expressJump,
|
|
75
|
+
l as getOperationButtons,
|
|
76
|
+
u as getTableNameByTableUuid,
|
|
77
|
+
a as isHasFieldAuth,
|
|
78
|
+
c as isHasFieldPermissionAuth,
|
|
79
|
+
r as popupToPage
|
|
55
80
|
};
|
package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { defineComponent as e, watch as l, resolveComponent as o, createBlock as a, createElementBlock as u, openBlock as r, withCtx as
|
|
2
|
-
const t = e({ __name: "common-chart-header-group", props: { headerInfo: { type: Object, required: true } }, setup
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
})
|
|
1
|
+
import { defineComponent as e, watch as l, resolveComponent as o, createBlock as a, createElementBlock as u, openBlock as r, withCtx as n, Fragment as d, renderList as p } from "vue";
|
|
2
|
+
const t = e({ __name: "common-chart-header-group", props: { headerInfo: { type: Object, required: true } }, setup(e2) {
|
|
3
|
+
const t2 = e2;
|
|
4
|
+
return l(t2.headerInfo, () => {
|
|
5
|
+
t2.headerInfo;
|
|
6
|
+
}), (l2, t3) => {
|
|
7
|
+
const h = o("el-checkbox"), f = o("el-checkbox-group"), m = o("el-radio"), V = o("el-radio-button"), b = o("el-radio-group");
|
|
8
|
+
return "checkbox" == e2.headerInfo.groupComponent ? (r(), a(f, { key: 0, modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t3[0] || (t3[0] = (l3) => e2.headerInfo.groupValue = l3) }, { default: n(() => [(r(true), u(d, null, p(e2.headerInfo.options, (e3) => (r(), a(h, { label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 256))]), _: 1 }, 8, ["modelValue"])) : "radio" == e2.headerInfo.groupComponent ? (r(true), u(d, { key: 1 }, p(e2.headerInfo.options, (l3) => (r(), a(m, { modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t3[1] || (t3[1] = (l4) => e2.headerInfo.groupValue = l4), value: l3.value, label: l3.label }, null, 8, ["modelValue", "value", "label"]))), 256)) : (r(), a(b, { key: 2, modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t3[2] || (t3[2] = (l3) => e2.headerInfo.groupValue = l3) }, { default: n(() => [(r(true), u(d, null, p(e2.headerInfo.options, (e3) => (r(), a(V, { label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 256))]), _: 1 }, 8, ["modelValue"]));
|
|
9
|
+
};
|
|
10
|
+
} });
|
|
7
11
|
export {
|
|
8
12
|
t as default
|
|
9
13
|
};
|
|
@@ -3,12 +3,13 @@ import { Search as p } from "@element-plus/icons-vue";
|
|
|
3
3
|
import g from "./common-chart-header-group.vue.js";
|
|
4
4
|
import m from "./common-chart-header-breadcrumb.vue.js";
|
|
5
5
|
import b from "./common-homepage-search.vue.js";
|
|
6
|
-
import { setVariableValueWithProp as v, getValueFromSource as y, setValueForVariableName as
|
|
7
|
-
const
|
|
6
|
+
import { setVariableValueWithProp as v, getValueFromSource as y, setValueForVariableName as O } from "../../../../utils/page-helper-util.js";
|
|
7
|
+
const w = { class: "amb-widget-chart-header" }, x = { class: "amb-widget-chart-header-item" }, k = { class: "amb-widget-chart-header-item amb-widget-chart-header-center" }, j = { class: "amb-widget-chart-header-item" }, C = { key: 0, class: "amb-widget-chart-header-item" }, P = e({ __name: "common-chart-header", props: { headerInfo: { type: Object, required: true }, configure: { type: Object, required: true }, pageContext: { type: Object, required: true } }, emits: ["drill-end"], setup(e2, { expose: P2, emit: _ }) {
|
|
8
8
|
const N = e2, D = o(null), A = o(), R = _;
|
|
9
9
|
function S(e3) {
|
|
10
10
|
const o2 = N.headerInfo.drillOptions.length;
|
|
11
|
-
if (
|
|
11
|
+
if (e3 >= o2) N.headerInfo.drillOptions;
|
|
12
|
+
else {
|
|
12
13
|
for (let r2 = o2 - 1; r2 >= e3; r2--) N.headerInfo.drillOptions.splice(r2, 1);
|
|
13
14
|
q(e3);
|
|
14
15
|
}
|
|
@@ -34,7 +35,7 @@ const x = { class: "amb-widget-chart-header" }, O = { class: "amb-widget-chart-h
|
|
|
34
35
|
for (let e4 of o2.variables) {
|
|
35
36
|
if (!e4.fieldName || !e4.variable) continue;
|
|
36
37
|
const o3 = y(r2, e4.fieldName, void 0);
|
|
37
|
-
|
|
38
|
+
O(N.pageContext.entity, e4.variable, o3);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
N.headerInfo.drillOptions || (N.headerInfo.drillOptions = []);
|
|
@@ -46,11 +47,12 @@ const x = { class: "amb-widget-chart-header" }, O = { class: "amb-widget-chart-h
|
|
|
46
47
|
if (r2 + 1 >= N.headerInfo.options.length) {
|
|
47
48
|
return F(o2 && e3.dataIndex < o2.length ? o2[e3.dataIndex] : void 0), void R("drill-end", e3);
|
|
48
49
|
}
|
|
50
|
+
N.headerInfo.options;
|
|
49
51
|
const n2 = N.headerInfo.options[r2], t2 = o2 && e3.dataIndex < o2.length ? o2[e3.dataIndex] : null, a2 = { fieldName: n2.target ? n2.target.replace(".", "_") : "", rawFieldName: n2.target ? n2.target : "", label: e3.name, value: e3.name, data: t2 };
|
|
50
52
|
N.headerInfo.drillOptions.push(a2), q(r2 + 1);
|
|
51
53
|
}, closeDrill: S }), (o2, v2) => {
|
|
52
|
-
const y2 = r("el-icon"),
|
|
53
|
-
return t(), n("div",
|
|
54
|
+
const y2 = r("el-icon"), O2 = r("el-tooltip");
|
|
55
|
+
return t(), n("div", w, [a("div", x, [i(a("label", { style: f(e2.headerInfo.style) }, h(e2.headerInfo.title) + " ", 5), [[s, e2.headerInfo.title && (!e2.headerInfo.textAlign || "left" == e2.headerInfo.textAlign)]]), !e2.headerInfo.showDrill || e2.headerInfo.groupPosition && "left" != e2.headerInfo.groupPosition ? l("", true) : (t(), d(m, { key: 0, ref_key: "drillObjRef", ref: D, headerInfo: e2.headerInfo, onCloseDrill: S }, null, 8, ["headerInfo"])), !e2.headerInfo.showGroup || e2.headerInfo.groupPosition && "left" != e2.headerInfo.groupPosition ? l("", true) : (t(), d(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"]))]), a("div", k, [i(a("label", { style: f(e2.headerInfo.style) }, h(e2.headerInfo.title) + " ", 5), [[s, e2.headerInfo.title && "center" == e2.headerInfo.textAlign]]), e2.headerInfo.showDrill && "center" == e2.headerInfo.groupPosition ? (t(), d(m, { key: 0, headerInfo: e2.headerInfo, onCloseDrill: S, ref_key: "drillObjRef", ref: D }, null, 8, ["headerInfo"])) : l("", true), e2.headerInfo.showGroup && "center" == e2.headerInfo.groupPosition ? (t(), d(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"])) : l("", true)]), a("div", j, [i(a("label", { style: f(e2.headerInfo.style) }, h(e2.headerInfo.title) + " ", 5), [[s, e2.headerInfo.title && "right" == e2.headerInfo.textAlign]]), e2.headerInfo.showDrill && "right" == e2.headerInfo.groupPosition ? (t(), d(m, { key: 0, headerInfo: e2.headerInfo, onCloseDrill: S, ref_key: "drillObjRef", ref: D }, null, 8, ["headerInfo"])) : l("", true), e2.headerInfo.showGroup && "right" == e2.headerInfo.groupPosition ? (t(), d(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"])) : l("", true)]), e2.pageContext.showHomepageSearch ? (t(), n("div", C, [c(O2, { content: "打开查询弹窗", effect: "light" }, { default: I(() => [c(y2, { onClick: G }, { default: I(() => [c(u(p))]), _: 1 })]), _: 1 }), c(b, { ref_key: "commonHomepageSearchRef", ref: A, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"])])) : l("", true)]);
|
|
54
56
|
};
|
|
55
57
|
} });
|
|
56
58
|
export {
|