super-page-runtime 2.3.47-sit2 → 2.3.48
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 +136 -136
- package/dist/es/components/runtime/utils/events/event-util.js +121 -121
- package/dist/es/components/runtime/utils/events/print-label.js +34 -33
- package/dist/es/components/runtime/utils/events/standard-event.js +22 -22
- package/dist/es/components/runtime/utils/events/validator-util.js +209 -206
- package/dist/es/components/runtime/utils/i18n-util.js +12 -9
- package/dist/es/components/runtime/utils/page-init-util.js +47 -45
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- 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/home-chart-condition-render.vue.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +104 -99
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +11 -9
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix2.vue.js +2 -0
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime2.vue.js +5 -5
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime2.vue.js +11 -9
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime2.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime2.vue.js +21 -21
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime2.vue.js +5 -3
- package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime2.vue.js +3 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime2.vue.js +42 -41
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime2.vue.js +3 -1
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime2.vue.js +8 -6
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime2.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime2.vue.js +8 -7
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +11 -9
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +7 -6
- package/dist/es/components/runtime/views/super-page2.vue.js +99 -98
- package/package.json +2 -2
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { usePageContextStore as t } from "./page-store.js";
|
|
2
2
|
import { getEnableI18nState as e } from "agilebuilder-ui/src/utils/i18n-util";
|
|
3
|
-
import { useI18n as
|
|
4
|
-
let
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const u = `${
|
|
10
|
-
|
|
3
|
+
import { useI18n as r } from "vue-i18n";
|
|
4
|
+
let o = null, n = null;
|
|
5
|
+
const i = (i2, ...s) => {
|
|
6
|
+
n || (n = r());
|
|
7
|
+
const l = t().pageContext;
|
|
8
|
+
null === o && (o = !!e(l.systemCode));
|
|
9
|
+
const u = `${l.systemCode}.${i2}`;
|
|
10
|
+
if (n.te(u)) return n.t(u, s || []);
|
|
11
|
+
if (n.te(i2)) return n.t(i2, s || []);
|
|
12
|
+
const m = n.t(i2, s || []);
|
|
13
|
+
return m !== i2 ? m : i2;
|
|
11
14
|
};
|
|
12
15
|
export {
|
|
13
|
-
|
|
16
|
+
i as $t
|
|
14
17
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
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 n } from "./interfaces/page-design-types.js";
|
|
4
|
-
import { getFormPropName as i, getVariableValue as
|
|
4
|
+
import { getFormPropName as i, getVariableValue as r, formatVariableValue as s, setVariableValue as o } from "./page-helper-util.js";
|
|
5
5
|
import { getSessionCache as a } from "agilebuilder-ui/src/utils/auth";
|
|
6
6
|
import { functions as l } from "./api/page-expose-util.js";
|
|
7
|
-
import { isWorkflowPage as
|
|
7
|
+
import { isWorkflowPage as u, deepCopy as p } from "./common-util.js";
|
|
8
8
|
import { packageCustomValidator as d } from "./events/validator-util.js";
|
|
9
9
|
import { isMobileBrowser as c } from "agilebuilder-ui/src/utils/common-util";
|
|
10
10
|
function f(t2) {
|
|
@@ -12,7 +12,7 @@ function f(t2) {
|
|
|
12
12
|
(function(t3) {
|
|
13
13
|
return e.get(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + t3);
|
|
14
14
|
})(t2).then((e2) => {
|
|
15
|
-
e2 ?
|
|
15
|
+
e2 ? y().then((t3) => {
|
|
16
16
|
t3 && (e2.systemParam = h(t3)), g(e2.listViewTableName, e2.listViewTablePublishVersion).then((t4) => {
|
|
17
17
|
t4 ? (e2.contextParam = h(t4.contextParam), e2.branchFieldAuth = t4.branchFieldAuth, e2.isWorkflowEntity = t4.isWorkflowEntity, e2.dataTypeMaps = t4.dataTypeMaps, n2(e2)) : n2(null);
|
|
18
18
|
});
|
|
@@ -24,8 +24,8 @@ function f(t2) {
|
|
|
24
24
|
}
|
|
25
25
|
function m(e2, t2) {
|
|
26
26
|
return new Promise((n2, i2) => {
|
|
27
|
-
e2 ?
|
|
28
|
-
|
|
27
|
+
e2 ? y().then((r2) => {
|
|
28
|
+
r2 && (e2.systemParam = h(r2)), e2.tableRuntimes && Object.keys(e2.tableRuntimes).length > 0 ? R(e2, t2, e2.systemVersion).then((t3) => {
|
|
29
29
|
e2.contextParam = h(t3.contextParam), e2.branchFieldAuth = t3.branchFieldAuth, e2.isWorkflowEntity = t3.isWorkflowEntity, e2.dataTypeMaps = t3.dataTypeMaps, e2.superGridItems = t3.superGrids, n2(e2);
|
|
30
30
|
}).catch((e3) => {
|
|
31
31
|
i2(e3);
|
|
@@ -41,10 +41,10 @@ function g(t2, n2) {
|
|
|
41
41
|
let i2 = "";
|
|
42
42
|
return t2 && n2 && (i2 = "?listViewTableName=" + t2 + "&listViewTablePublishVersion=" + n2), e.get(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/runtime-param" + i2);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function y() {
|
|
45
45
|
return e.get(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/system-param");
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function b(e2) {
|
|
48
48
|
var _a, _b, _c;
|
|
49
49
|
if (null == e2) return null;
|
|
50
50
|
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, listCodesInitSearchForm: e2.listCodesInitSearchForm, formNoRuleCode: e2.props ? e2.props.formNoRuleCode : null, judgeHeavyList: w(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, allChartUuids: e2.allChartUuids, branchFieldAuth: e2.branchFieldAuth, isWorkflowEntityOrg: e2.isWorkflowEntityOrg, entity: { data: {}, task: {}, request: {}, page: {}, context: e2.contextParam, system: e2.systemParam }, propTitleMap: {} };
|
|
@@ -91,6 +91,7 @@ function w(e2) {
|
|
|
91
91
|
e3.duplicateFieldList && e3.duplicateFieldList.length > 0 && (e3.duplicateFieldList = e3.duplicateFieldList.map((e4) => "string" == typeof e4 ? { propDbName: e4 } : e4));
|
|
92
92
|
}), e2.props.judgeHeavyList) : null;
|
|
93
93
|
} catch (e3) {
|
|
94
|
+
console.error("getJudgeHeavyList error:", e3);
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
97
|
function P(e2) {
|
|
@@ -121,7 +122,7 @@ function E(e2, t2, n2) {
|
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
function v(e2, t2) {
|
|
124
|
-
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query)) {
|
|
125
|
+
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query, e2.query)) {
|
|
125
126
|
Object.assign(t2, e2.query);
|
|
126
127
|
k(e2.query.paramStoreId, t2);
|
|
127
128
|
}
|
|
@@ -154,32 +155,33 @@ function C(e2) {
|
|
|
154
155
|
function I(e2, t2) {
|
|
155
156
|
let n2, i2 = t2;
|
|
156
157
|
t2 || (n2 = e2.props.base ? e2.props.base : {}, i2 = n2.prop);
|
|
157
|
-
let
|
|
158
|
-
return t2 && !t2.startsWith("${") ?
|
|
158
|
+
let r2 = null;
|
|
159
|
+
return t2 && !t2.startsWith("${") ? r2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), r2 = i2.split("."), e2 && r2.length < 2 && (r2 = [e2.uuid])) : e2 && (r2 = ["page", e2.uuid]) : r2 = ["page", e2.uuid], r2 || e2 ? r2 : ["temp"];
|
|
159
160
|
}
|
|
160
161
|
function M(e2, t2, n2) {
|
|
161
162
|
var _a, _b;
|
|
162
|
-
const i2 = I(t2, n2),
|
|
163
|
-
if (null ==
|
|
164
|
-
let n3,
|
|
165
|
-
t2 && (n3 = t2.props.base ? t2.props.base : {},
|
|
166
|
-
const l2 =
|
|
163
|
+
const i2 = I(t2, n2), s2 = e2.entity;
|
|
164
|
+
if (null == s2.data.ID && null == s2.data.id) {
|
|
165
|
+
let n3, o2, a2 = false;
|
|
166
|
+
t2 && (n3 = t2.props.base ? t2.props.base : {}, o2 = t2.name, a2 = n3.multiple);
|
|
167
|
+
const l2 = r(s2, i2);
|
|
167
168
|
if (null == l2) {
|
|
168
|
-
const
|
|
169
|
-
if (
|
|
170
|
-
const t3 = S(e2,
|
|
171
|
-
if (j(t3)) O(
|
|
169
|
+
const r2 = n3 ? n3.defaultValue : null, l3 = Boolean((_a = t2 == null ? void 0 : t2.runtime) == null ? void 0 : _a.arrayValue);
|
|
170
|
+
if (r2) try {
|
|
171
|
+
const t3 = S(e2, r2, o2, a2);
|
|
172
|
+
if (j(t3)) O(s2, i2, t3, l3);
|
|
172
173
|
else if (((_b = n3.moreDefaultValue) == null ? void 0 : _b.length) > 0) {
|
|
173
174
|
const t4 = n3.moreDefaultValue;
|
|
174
175
|
for (let n4 = 0; n4 < t4.length; n4++) {
|
|
175
|
-
const
|
|
176
|
-
if (j(
|
|
177
|
-
O(
|
|
176
|
+
const r3 = S(e2, t4[n4], o2, a2);
|
|
177
|
+
if (j(r3)) {
|
|
178
|
+
O(s2, i2, r3, l3);
|
|
178
179
|
break;
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
182
|
}
|
|
182
183
|
} catch (e3) {
|
|
184
|
+
console.error("设置默认值出错:", i2, e3);
|
|
183
185
|
}
|
|
184
186
|
}
|
|
185
187
|
}
|
|
@@ -189,29 +191,29 @@ function j(e2) {
|
|
|
189
191
|
return null != e2 && "" !== e2;
|
|
190
192
|
}
|
|
191
193
|
function O(e2, t2, n2, i2) {
|
|
192
|
-
!Array.isArray(n2) || i2 ?
|
|
194
|
+
!Array.isArray(n2) || i2 ? o(e2, t2, n2) : o(e2, t2, n2.join(","));
|
|
193
195
|
}
|
|
194
196
|
function S(e2, t2, n2, i2) {
|
|
195
|
-
let
|
|
196
|
-
if (t2 && (
|
|
197
|
+
let r2;
|
|
198
|
+
if (t2 && (r2 = s(e2, t2), null != r2 && null != r2 && n2)) {
|
|
197
199
|
let e3 = false;
|
|
198
|
-
"checkbox" == n2 ? e3 = true : "select" == n2 && (e3 = i2), e3 && (
|
|
200
|
+
"checkbox" == n2 ? e3 = true : "select" == n2 && (e3 = i2), e3 && (r2 = (r2 + "").split(","));
|
|
199
201
|
}
|
|
200
|
-
return
|
|
202
|
+
return r2;
|
|
201
203
|
}
|
|
202
204
|
function T(e2, t2) {
|
|
203
205
|
var _a, _b;
|
|
204
206
|
if (false === ((_b = (_a = e2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.isPermission)) return "true";
|
|
205
207
|
const n2 = [];
|
|
206
208
|
if (e2.functionCodes && e2.functionCodes.length > 0) {
|
|
207
|
-
const i2 = e2.sourceTypes ? e2.sourceTypes : [],
|
|
208
|
-
for (let e3 = 0; e3 <
|
|
209
|
-
const
|
|
209
|
+
const i2 = e2.sourceTypes ? e2.sourceTypes : [], r2 = e2.functionCodes;
|
|
210
|
+
for (let e3 = 0; e3 < r2.length; e3++) {
|
|
211
|
+
const s2 = r2[e3], o2 = e3 < i2.length ? i2[e3] : "";
|
|
210
212
|
let a2 = "";
|
|
211
|
-
if ("service" ==
|
|
212
|
-
else if ("standard" ===
|
|
213
|
+
if ("service" == o2) a2 = s2;
|
|
214
|
+
else if ("standard" === o2) a2 = t2.code + "." + s2;
|
|
213
215
|
else {
|
|
214
|
-
a2 = "custom" === _(
|
|
216
|
+
a2 = "custom" === _(s2, t2).type ? s2 : t2.code + "." + s2;
|
|
215
217
|
}
|
|
216
218
|
n2.includes(a2) || n2.push(a2);
|
|
217
219
|
}
|
|
@@ -225,26 +227,26 @@ function _(e2, t2) {
|
|
|
225
227
|
}
|
|
226
228
|
return null;
|
|
227
229
|
}
|
|
228
|
-
function R(n2, i2,
|
|
229
|
-
const
|
|
230
|
+
function R(n2, i2, r2) {
|
|
231
|
+
const s2 = n2.tableRuntimes, o2 = t(i2);
|
|
230
232
|
let a2;
|
|
231
233
|
const l2 = n2.code;
|
|
232
|
-
return
|
|
234
|
+
return o2 && Object.keys(o2) > 0 && (a2 = JSON.stringify(o2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: s2, additionalParamMapJson: a2, pageCode: l2, publishVersion: r2, pageType: n2.pageType });
|
|
233
235
|
}
|
|
234
236
|
const x = ["button-detail", "print-label"];
|
|
235
237
|
function F(e2, t2, n2) {
|
|
236
238
|
var _a, _b;
|
|
237
|
-
const
|
|
238
|
-
let
|
|
239
|
-
if (
|
|
239
|
+
const r2 = t2.props && t2.props.base ? t2.props.base.prop : null, s2 = u(e2);
|
|
240
|
+
let o2 = false;
|
|
241
|
+
if (s2 && x.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
|
|
240
242
|
const n3 = e2.fieldPermissionMap.get("all_fields");
|
|
241
|
-
false === (n3 == null ? void 0 : n3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled",
|
|
243
|
+
false === (n3 == null ? void 0 : n3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", o2 = true);
|
|
242
244
|
}
|
|
243
|
-
if (
|
|
244
|
-
const a2 = i(
|
|
245
|
+
if (r2) {
|
|
246
|
+
const a2 = i(r2);
|
|
245
247
|
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[a2] || (e2.rules[a2] = []), t2.props.rules.forEach((e3) => {
|
|
246
248
|
d(e3), !n2 && e3 && e3.required && (e3.required = false);
|
|
247
|
-
}), e2.rules[a2] = t2.props.rules),
|
|
249
|
+
}), e2.rules[a2] = t2.props.rules), s2 && !o2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
|
|
248
250
|
const i2 = e2.fieldPermissionMap.get(a2);
|
|
249
251
|
if (!n2 && e2.workflowRules && (e2.workflowRules[a2] || e2.workflowRules.rules && e2.workflowRules.rules[a2])) {
|
|
250
252
|
let t3 = e2.workflowRules[a2];
|
|
@@ -269,7 +271,7 @@ function V(e2, t2) {
|
|
|
269
271
|
if (i2) if ("dynamicControlFormEdit" === n2) {
|
|
270
272
|
let n3 = i2.filter((e3) => "_all_fields" === e3.name || e3.name === t2);
|
|
271
273
|
if (n3 && n3.length > 0 && (n3 = n3.filter((e3) => "_all_fields" === e3.name), n3 && n3.length > 0)) {
|
|
272
|
-
const e3 =
|
|
274
|
+
const e3 = p(n3[0]);
|
|
273
275
|
e3.name = t2, n3 = [e3];
|
|
274
276
|
}
|
|
275
277
|
l.dynamicControlFormEdit(e2, n3, false);
|
|
@@ -279,7 +281,7 @@ function V(e2, t2) {
|
|
|
279
281
|
}
|
|
280
282
|
export {
|
|
281
283
|
V as controlObjectRenderState,
|
|
282
|
-
|
|
284
|
+
b as convertToPageContext,
|
|
283
285
|
S as getDefaultValue,
|
|
284
286
|
M as getFormModelFields,
|
|
285
287
|
I as getModelFields,
|
|
@@ -18,7 +18,7 @@ function p(t2, e2) {
|
|
|
18
18
|
}
|
|
19
19
|
function l(t2, e2, o2, i2) {
|
|
20
20
|
const r2 = !(!e2.props || !e2.props.base) && e2.props.base.showOperation, u2 = e2.btnList;
|
|
21
|
-
r2 && u2 && u2.forEach((e3) => {
|
|
21
|
+
e2.btnList, r2 && u2 && u2.forEach((e3) => {
|
|
22
22
|
const r3 = {}, u3 = Object.assign({}, e3.props.base);
|
|
23
23
|
if ("custom" === e3.name ? u3.customControl = u3.name : u3.elementType = "el-button", void 0 === e3.isPermission || e3.isPermission + "" == "true") {
|
|
24
24
|
const o3 = n(e3, t2);
|
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, openBlock as a, createBlock as u, withCtx as r, createElementBlock 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, openBlock as a, createBlock as u, withCtx as r, createElementBlock 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 ? (a(), u(f, { key: 0, modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t3[0] || (t3[0] = (l3) => e2.headerInfo.groupValue = l3) }, { default: r(() => [(a(true), n(d, null, p(e2.headerInfo.options, (e3) => (a(), u(h, { label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 256))]), _: 1 }, 8, ["modelValue"])) : "radio" == e2.headerInfo.groupComponent ? (a(true), n(d, { key: 1 }, p(e2.headerInfo.options, (l3) => (a(), u(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)) : (a(), u(b, { key: 2, modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t3[2] || (t3[2] = (l3) => e2.headerInfo.groupValue = l3) }, { default: r(() => [(a(true), n(d, null, p(e2.headerInfo.options, (e3) => (a(), u(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 n(), t("div",
|
|
54
|
+
const y2 = r("el-icon"), O2 = r("el-tooltip");
|
|
55
|
+
return n(), t("div", w, [a("div", x, [l(a("label", { style: i(e2.headerInfo.style) }, d(e2.headerInfo.title) + " ", 5), [[f, e2.headerInfo.title && (!e2.headerInfo.textAlign || "left" == e2.headerInfo.textAlign)]]), !e2.headerInfo.showDrill || e2.headerInfo.groupPosition && "left" != e2.headerInfo.groupPosition ? s("", true) : (n(), h(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 ? s("", true) : (n(), h(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"]))]), a("div", k, [l(a("label", { style: i(e2.headerInfo.style) }, d(e2.headerInfo.title) + " ", 5), [[f, e2.headerInfo.title && "center" == e2.headerInfo.textAlign]]), e2.headerInfo.showDrill && "center" == e2.headerInfo.groupPosition ? (n(), h(m, { key: 0, headerInfo: e2.headerInfo, onCloseDrill: S, ref_key: "drillObjRef", ref: D }, null, 8, ["headerInfo"])) : s("", true), e2.headerInfo.showGroup && "center" == e2.headerInfo.groupPosition ? (n(), h(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"])) : s("", true)]), a("div", j, [l(a("label", { style: i(e2.headerInfo.style) }, d(e2.headerInfo.title) + " ", 5), [[f, e2.headerInfo.title && "right" == e2.headerInfo.textAlign]]), e2.headerInfo.showDrill && "right" == e2.headerInfo.groupPosition ? (n(), h(m, { key: 0, headerInfo: e2.headerInfo, onCloseDrill: S, ref_key: "drillObjRef", ref: D }, null, 8, ["headerInfo"])) : s("", true), e2.headerInfo.showGroup && "right" == e2.headerInfo.groupPosition ? (n(), h(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"])) : s("", true)]), e2.pageContext.showHomepageSearch ? (n(), t("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"])])) : s("", true)]);
|
|
54
56
|
};
|
|
55
57
|
} });
|
|
56
58
|
export {
|
package/dist/es/components/runtime/views/assemblys/chart/common/home-chart-condition-render.vue.js
CHANGED
|
@@ -2,10 +2,10 @@ import { defineComponent as e, ref as t, markRaw as i, onUnmounted as n, resolve
|
|
|
2
2
|
import { deepCopy as C } from "../../../../utils/common-util.js";
|
|
3
3
|
import b from "agilebuilder-ui/src/utils/request";
|
|
4
4
|
import { updateOptionDatasources as k, updateChartDatasources as x, setValueForVariableName as S, setVariableValue as j, getFormPropName as O, getValueFromVariable as w } from "../../../../utils/page-helper-util.js";
|
|
5
|
-
import { initPageEvents as _, isShowComponent as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { getRuntimeComponentByName as
|
|
5
|
+
import { initPageEvents as _, isShowComponent as H } from "../../../../utils/events/event-util.js";
|
|
6
|
+
import J from "../../object-render.vue.js";
|
|
7
|
+
import N from "../../error-render.vue.js";
|
|
8
|
+
import { getRuntimeComponentByName as U } from "../../../../utils/assemblys-config.js";
|
|
9
9
|
import { addComponentRef as V, addComponentRefByCode as A } from "../../../../utils/global-refs.js";
|
|
10
10
|
import { getDefaultValue as E, controlObjectRenderState as P } from "../../../../utils/page-init-util.js";
|
|
11
11
|
import { ElLoading as D } from "element-plus";
|
|
@@ -68,15 +68,15 @@ const $ = { "element-loading-text": "加载中..." }, q = { style: { overflow: "
|
|
|
68
68
|
if (e3 && e3.designJson) {
|
|
69
69
|
L.value = {};
|
|
70
70
|
const n2 = JSON.parse(e3.designJson), a2 = window.frameElement;
|
|
71
|
-
L.value = n2.chartJson, a2 && (L.value.runtime.common.style.pc_style.height = a2.clientHeight + "px");
|
|
71
|
+
L.value = n2.chartJson, a2 && (a2.clientHeight, L.value.runtime.common.style.pc_style.height = a2.clientHeight + "px");
|
|
72
72
|
const l2 = { isTest: true, showHomepageSearch: false, name: e3.pageName, code: e3.pageCode, label: "", dimensions: "", version: 1, isWorkflowEntity: false, variables: n2.variables, systemCode: e3.systemCode, uuid: e3.uuid, allChartUuids: [], backendUrl: e3.backendUrl, rules: {}, pageType: "chart", beanName: n2.beanName, initChartServiceConfigs: [n2.initChartServiceConfigs], entity: { data: {}, task: {}, request: {}, page: {}, context: e3.contextParam, system: e3.systemParam } };
|
|
73
73
|
if (z.value = ((_a = L.value.pushHomepage) == null ? void 0 : _a.searchConditions) || [], n2.variables) {
|
|
74
74
|
const e4 = l2.entity.page;
|
|
75
75
|
for (const t2 of n2.variables) t2.name && (t2.isArrayElement ? e4[t2.name] = [] : t2.defaultValue ? e4[t2.name] = t2.defaultValue : e4[t2.name] = void 0);
|
|
76
76
|
}
|
|
77
|
-
n2.initOptionConfigs && n2.initOptionConfigs.length > 0 && k(l2, n2.initOptionConfigs, void 0), Z(l2), M.value = i(
|
|
77
|
+
n2.initOptionConfigs && n2.initOptionConfigs.length > 0 && k(l2, n2.initOptionConfigs, void 0), Z(l2), M.value = i(U(L.value.name));
|
|
78
78
|
const o2 = t(true);
|
|
79
|
-
null == M.value && (M.value =
|
|
79
|
+
null == M.value && (M.value = N, o2.value = false), _(n2, l2), R.value = l2, G.value = true, X.value = JSON.parse(JSON.stringify(R.value.entity)), function(e4, t2) {
|
|
80
80
|
if (!t2 || 0 == t2.length) return;
|
|
81
81
|
e4.initChartData = {}, e4.initChartData.data = C(e4.entity.data), e4.initChartData.page = C(e4.entity.page), t2 && t2.length > 0 && x(e4, t2, null, true);
|
|
82
82
|
}(R.value, [n2.initChartServiceConfigs]);
|
|
@@ -86,7 +86,7 @@ const $ = { "element-loading-text": "加载中..." }, q = { style: { overflow: "
|
|
|
86
86
|
}), n(() => {
|
|
87
87
|
}), (e3, t2) => {
|
|
88
88
|
const i2 = a("el-empty"), n2 = a("el-button"), C2 = a("el-col"), b2 = a("el-form"), k2 = l("loading");
|
|
89
|
-
return o((u(), r("div", $, [s("div", q, [z.value && 0 !== z.value.length ? c("", true) : (u(), p(i2, { key: 0, description: "未设置筛选条件", "image-size": 50 })), (u(), p(b2, { key: K.value }, { default: v(() => [(u(true), r(f, null, g(z.value, (e4) => (u(), p(
|
|
89
|
+
return o((u(), r("div", $, [s("div", q, [z.value && 0 !== z.value.length ? c("", true) : (u(), p(i2, { key: 0, description: "未设置筛选条件", "image-size": 50 })), (u(), p(b2, { key: K.value }, { default: v(() => [(u(true), r(f, null, g(z.value, (e4) => (u(), p(J, { key: e4.uuid, configure: e4, pageContext: m(R) }, null, 8, ["configure", "pageContext"]))), 128)), d(C2, { span: 24, style: { "text-align": "right", margin: "10px 0" } }, { default: v(() => [d(n2, { type: "primary", onClick: ee }, { default: v(() => [...t2[0] || (t2[0] = [h("查询", -1)])]), _: 1 }), d(n2, { type: "default", onClick: te }, { default: v(() => [...t2[1] || (t2[1] = [h("重置", -1)])]), _: 1 }), d(n2, { type: "primary", onClick: ie }, { default: v(() => [...t2[2] || (t2[2] = [h("保存为默认条件", -1)])]), _: 1 })]), _: 1 })]), _: 1 })), G.value && m(H)(L.value) ? (u(), p(y(M.value), { key: 1, ref: Y, style: { width: "100%", height: "300px" }, configure: L.value, pageContext: m(R) }, null, 8, ["configure", "pageContext"])) : c("", true)], 512)])), [[k2, B.value]]);
|
|
90
90
|
};
|
|
91
91
|
} });
|
|
92
92
|
export {
|