super-page-runtime 2.3.4 → 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.
Files changed (56) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +60 -52
  2. package/dist/es/components/runtime/utils/barcode-util.js +5 -5
  3. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +45 -46
  4. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +14 -16
  5. package/dist/es/components/runtime/utils/charts/chart-util.js +24 -26
  6. package/dist/es/components/runtime/utils/common-util.d.ts +1 -1
  7. package/dist/es/components/runtime/utils/common-util.js +62 -47
  8. package/dist/es/components/runtime/utils/events/event-util.js +116 -116
  9. package/dist/es/components/runtime/utils/events/print-label.js +0 -1
  10. package/dist/es/components/runtime/utils/events/standard-event.js +465 -475
  11. package/dist/es/components/runtime/utils/events/validator-util.js +23 -23
  12. package/dist/es/components/runtime/utils/form/scan-util.js +3 -4
  13. package/dist/es/components/runtime/utils/page-helper-util.js +275 -275
  14. package/dist/es/components/runtime/utils/page-init-util.d.ts +1 -1
  15. package/dist/es/components/runtime/utils/page-init-util.js +51 -43
  16. package/dist/es/components/runtime/utils/page-store.js +10 -10
  17. package/dist/es/components/runtime/utils/table-utils.d.ts +14 -0
  18. package/dist/es/components/runtime/utils/table-utils.js +62 -37
  19. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +12 -16
  20. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +3 -3
  21. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -6
  22. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +20 -20
  23. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +14 -15
  24. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +11 -12
  25. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +17 -18
  26. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +18 -19
  27. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +8 -1
  28. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +3 -3
  29. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +6 -6
  30. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +20 -20
  31. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +8 -4
  32. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +23 -23
  33. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +1 -1
  34. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +63 -63
  35. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +35 -37
  36. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +116 -119
  37. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +24 -15
  38. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +1 -1
  39. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +69 -70
  40. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -1
  41. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +35 -34
  42. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +17 -17
  43. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +30 -27
  44. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +6 -6
  45. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -10
  46. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -1
  47. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
  48. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +2 -2
  49. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +63 -61
  50. package/dist/es/components/runtime/views/home-chart.vue.js +4 -4
  51. package/dist/es/components/runtime/views/super-page-dialog.vue.js +6 -6
  52. package/dist/es/components/runtime/views/super-page.vue.d.ts +2 -2
  53. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  54. package/dist/es/components/runtime/views/super-page.vue2.js +138 -140
  55. package/dist/es/style.css +82 -82
  56. package/package.json +2 -2
@@ -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;
@@ -6,14 +6,14 @@ 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 c } from "agilebuilder-ui/src/utils/common-util";
9
+ import { isMobileBrowser as f } from "agilebuilder-ui/src/utils/common-util";
10
10
  function m(t2) {
11
11
  return e.get(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + t2);
12
12
  }
13
- function f(e2) {
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 f(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 (c()) {
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");
@@ -57,25 +57,22 @@ function b(e2) {
57
57
  }
58
58
  function y(e2, t2) {
59
59
  if (e2) {
60
- console.log("packageAdditionalMapWithPageRequest----pageRequest=", e2), Object.assign(t2, e2);
61
- v(e2.paramStoreId, t2), delete e2.paramStoreId, console.log("packageAdditionalMapWithPageRequest----requestObj=", t2), e2.jumpMode && (t2.jumpMode = e2.jumpMode);
60
+ Object.assign(t2, e2);
61
+ w(e2.paramStoreId, t2), delete e2.paramStoreId, e2.jumpMode && (t2.jumpMode = e2.jumpMode);
62
62
  }
63
63
  }
64
64
  function h(e2, t2) {
65
- if (console.log("packageAdditionalMapWithRoute----route=", e2), e2) {
66
- if (e2.params && Object.assign(t2, e2.params), console.log("packageAdditionalMapWithRoute----route.query=", e2.query), e2.query) {
67
- Object.assign(t2, e2.query);
68
- v(e2.query.paramStoreId, t2);
69
- }
70
- console.log("packageAdditionalMapWithRoute----requestObj=", t2);
65
+ if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query, e2.query)) {
66
+ Object.assign(t2, e2.query);
67
+ w(e2.query.paramStoreId, t2);
71
68
  }
72
69
  }
73
- function v(e2, t2) {
70
+ function w(e2, t2) {
74
71
  if (e2) {
75
72
  const s2 = l(e2);
76
73
  if (s2) {
77
74
  const e3 = JSON.parse(s2);
78
- Object.assign(t2, e3), console.log("已获取到附加参数", e3);
75
+ Object.assign(t2, e3);
79
76
  }
80
77
  }
81
78
  }
@@ -85,7 +82,7 @@ function E(e2, t2) {
85
82
  let o2 = null;
86
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"];
87
84
  }
88
- function M(e2, t2, s2) {
85
+ function v(e2, t2, s2) {
89
86
  const i2 = E(t2, s2), r2 = e2.entity;
90
87
  if (null == r2.data.ID && null == r2.data.id) {
91
88
  let s3, l2, a2 = false;
@@ -94,14 +91,14 @@ function M(e2, t2, s2) {
94
91
  if (null == p2) {
95
92
  const t3 = s3 ? s3.defaultValue : null;
96
93
  if (t3) {
97
- const s4 = w(e2, t3, l2, a2);
94
+ const s4 = P(e2, t3, l2, a2);
98
95
  null != s4 && n(r2, i2, s4);
99
96
  }
100
97
  }
101
98
  }
102
99
  return i2;
103
100
  }
104
- function w(e2, t2, s2, i2) {
101
+ function P(e2, t2, s2, i2) {
105
102
  let o2;
106
103
  if (t2 && (o2 = r(e2, t2), null != o2 && null != o2 && s2)) {
107
104
  let e3 = false;
@@ -109,7 +106,7 @@ function w(e2, t2, s2, i2) {
109
106
  }
110
107
  return o2;
111
108
  }
112
- function P(e2, t2) {
109
+ function M(e2, t2) {
113
110
  const s2 = [];
114
111
  if (e2.autoPermissions) for (const i2 of e2.autoPermissions) s2.push(t2.code + "." + i2.simpleCode);
115
112
  if (e2.functionCodes) {
@@ -120,47 +117,58 @@ function P(e2, t2) {
120
117
  if ("service" == r2) l2 = n2;
121
118
  else if ("standard" === r2) l2 = t2.code + "." + n2;
122
119
  else {
123
- l2 = "custom" === j(n2, t2).type ? n2 : t2.code + "." + n2;
120
+ l2 = "custom" === k(n2, t2).type ? n2 : t2.code + "." + n2;
124
121
  }
125
122
  s2.includes(l2) || s2.push(l2);
126
123
  }
127
124
  }
128
125
  return s2.join(",");
129
126
  }
130
- function j(e2, t2) {
127
+ function k(e2, t2) {
131
128
  const s2 = t2.pagePermissions;
132
129
  if (s2 && s2.length > 0) {
133
130
  for (let t3 = 0; t3 < s2.length; t3++) if (s2[t3].simpleCode === e2) return s2[t3];
134
131
  }
135
132
  return null;
136
133
  }
137
- function C(s2, i2, o2) {
134
+ function j(s2, i2, o2) {
138
135
  const n2 = s2.tableRuntimes, r2 = t(i2);
139
136
  let l2;
140
137
  const a2 = i2.code;
141
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 });
142
139
  }
143
- const I = ["button-detail", "print-label"];
144
- function O(e2, t2) {
140
+ const C = ["button-detail", "print-label"];
141
+ function I(e2, t2, s2) {
145
142
  var _a, _b;
146
- const s2 = t2.props && t2.props.base ? t2.props.base.prop : null, o2 = p(e2);
147
- let n2 = false;
148
- if (o2 && I.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
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) {
149
146
  const s3 = e2.fieldPermissionMap.get("all_fields");
150
- false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", n2 = true);
147
+ false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", r2 = true);
151
148
  }
152
- if (s2) {
153
- const r2 = i(s2);
154
- if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[r2] || (e2.rules[r2] = []), t2.props.rules.forEach((e3) => {
155
- d(e3);
156
- }), e2.rules[r2] = t2.props.rules), o2 && !n2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
157
- const s3 = e2.fieldPermissionMap.get(r2);
158
- t2.runtime.props || (t2.runtime.props = {}), s3 ? false === s3.canEdit ? t2.runtime.props.state = "disabled" : s3.canEdit && (t2.runtime.props.state = "", t2.runtime.props.required = true) : t2.runtime.props.state = "";
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 = "";
159
167
  }
160
- ((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop: r2, events: t2.props.customRuleEvents }));
168
+ ((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop: l2, events: t2.props.customRuleEvents }));
161
169
  }
162
170
  }
163
- function k(e2, t2) {
171
+ function O(e2, t2) {
164
172
  if (e2.initInfo) {
165
173
  ["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"].forEach((s2) => {
166
174
  const i2 = e2.initInfo[s2];
@@ -176,16 +184,16 @@ function k(e2, t2) {
176
184
  }
177
185
  }
178
186
  export {
179
- k as controlObjectRenderState,
180
- f as convertToPageContext,
181
- w as getDefaultValue,
182
- M as getFormModelFields,
187
+ O as controlObjectRenderState,
188
+ c as convertToPageContext,
189
+ P as getDefaultValue,
190
+ v as getFormModelFields,
183
191
  E as getModelFields,
184
- P as getPermissionCodes,
192
+ M as getPermissionCodes,
185
193
  b as packageAdditionalMapWithLocationSearch,
186
194
  y as packageAdditionalMapWithPageRequest,
187
195
  h as packageAdditionalMapWithRoute,
188
- O as packageFormRules,
196
+ I as packageFormRules,
189
197
  m as queryPageDesignByCode,
190
- C as queryPageSuperGrids
198
+ j as queryPageSuperGrids
191
199
  };
@@ -1,18 +1,18 @@
1
1
  import { ref as e } from "vue";
2
- import { defineStore as o } from "pinia";
3
- import a from "./eventBus.js";
4
- const t = o("pageContextUtil", () => {
5
- const o2 = e({ systemCode: "", systemVersion: -1 }), t2 = e(false), n = e(false), u = e(false), l = e(0), d = e(0);
6
- return { pageContext: o2, setPageContext: function(e2) {
7
- o2.value = e2;
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
- d.value++, u.value = false;
12
- }, componentsTotalNmber: l, componentsLoadedNumber: d, setPageComponentsLoaded: function(e2) {
13
- t2.value = e2, t2.value && n.value && (a.$emit("pageLoaded"), u.value = true);
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 && (console.log("setpageLoaded+++++++++++++++++++", 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 e from "./eventBus.js";
5
- import { getPermissionCodes as t } from "./page-init-util.js";
6
- import { getCustomFunc as o } from "./events/event-util.js";
7
- import { $t as i } from "./i18n-util.js";
8
- import { ExpressionEvaluator as s } from "../views/assemblys/chart/table/chart-table-util.js";
9
- function n(t2) {
10
- const o2 = t2.pageContext && t2.pageContext.code;
11
- console.log("弹框显示页面--popupToPage====params=", t2), e.$emit(o2 + "_open-dialog", t2);
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 r(e2, t2) {
14
- const o2 = e2.tableName;
15
- if (!t2 && o2) return o2;
16
- let i2;
17
- return e2.tableRuntimes && t2 && e2.tableRuntimes[t2] && (i2 = JSON.parse(e2.tableRuntimes[t2].configure)), i2 && i2.props && i2.props.dataOrigin ? i2.props.dataOrigin.tableName : null;
14
+ function u(t2, e2) {
15
+ const i2 = t2.tableName;
16
+ if (!e2 && i2) return i2;
17
+ let o2;
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 u(e2, o2, s2, n2) {
20
- const r2 = !(!o2.props || !o2.props.base) && o2.props.base.showOperation, u2 = o2.btnList;
21
- console.log("configure.btnList===", o2.btnList, "configure====", o2), r2 && u2 && u2.forEach((o3) => {
22
- const r3 = {}, u3 = Object.assign({}, o3.props.base);
23
- if ("custom" === o3.name ? u3.customControl = u3.name : u3.elementType = "el-button", void 0 === o3.isPermission || o3.isPermission + "" == "true") {
24
- const i2 = t(o3, e2);
25
- i2 && (u3.permission = i2);
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 = i(u3.title), u3.sourceButton = { uuid: o3.uuid }, r3.props = u3, void 0 !== n2) {
28
- const e3 = n2(o3);
29
- r3.onClick = (e3 == null ? void 0 : e3.onClick) ?? e3, r3.eventName = e3 == null ? void 0 : e3.eventName;
28
+ if (u3.label = n(u3.title), u3.sourceButton = { uuid: e3.uuid }, r3.props = u3, void 0 !== s2) {
29
+ const t3 = s2(e3);
30
+ r3.onClick = (t3 == null ? void 0 : t3.onClick) ?? t3, r3.eventName = t3 == null ? void 0 : t3.eventName;
30
31
  }
31
- s2.push(r3);
32
+ i2.push(r3);
32
33
  });
33
34
  }
34
- function l(e2, t2, i2, n2) {
35
+ function p(i2, o2, n2, s2) {
35
36
  let r2;
36
- const u2 = i2 == null ? void 0 : i2.some((i3) => {
37
+ const u2 = n2 == null ? void 0 : n2.some((n3) => {
37
38
  let u3 = false;
38
- if (i3.scopeFunc) {
39
- const s2 = o(e2, i3.scopeFunc);
40
- if (s2) {
41
- s2.apply(s2, [{ pageContext: e2, configureObj: t2, row: n2 }]) && (u3 = true);
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 (i3.showCondition && i3.showCondition.length > 0) {
44
- s.evaluate(e2, i3.showCondition, n2) && (u3 = true);
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 = i3, true;
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
- l as expressJump,
52
- u as getOperationButtons,
53
- r as getTableNameByTableUuid,
54
- n as popupToPage
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
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as e, ref as r, onMounted as o, watch as t, createElementBlock as n, openBlock as i, normalizeClass as a, normalizeStyle as l, unref as s, withDirectives as u, createVNode as c, vShow as p } from "vue";
1
+ import { defineComponent as e, ref as r, onMounted as o, watch as t, createElementBlock as n, openBlock as a, normalizeClass as i, normalizeStyle as u, unref as s, withDirectives as l, createVNode as c, vShow as p } from "vue";
2
2
  import { getCustomTheme as f, initChartOption as g, monitorChartClickToVariable as m, clearChartSelected as h, exportCommonChart as d } from "../../../../utils/charts/chart-util.js";
3
- import { getChartDatasFromPage as v, updateChartDatasources as x, monitorFieldChange as C } from "../../../../utils/page-helper-util.js";
4
- import { updateChartOption as k } from "../../../../utils/charts/chart-columnline-util.js";
5
- import { doClickJumpPageEvent as I } from "../../../../utils/events/event-util.js";
3
+ import { getChartDatasFromPage as x, updateChartDatasources as v, monitorFieldChange as C } from "../../../../utils/page-helper-util.js";
4
+ import { updateChartOption as I } from "../../../../utils/charts/chart-columnline-util.js";
5
+ import { doClickJumpPageEvent as k } from "../../../../utils/events/event-util.js";
6
6
  import y from "../common/common-chart-header.vue.js";
7
7
  import { use as R } from "echarts/core";
8
8
  import { CanvasRenderer as j } from "echarts/renderers";
@@ -18,24 +18,21 @@ const A = e({ __name: "column-line-runtime", props: { pageContext: {}, configure
18
18
  "clearDrill" == F ? U.value && U.value.closeDrill && U.value.closeDrill(0) : "clickEvent" === F && Z(e3);
19
19
  }
20
20
  function Z(e3) {
21
- if (console.log("clik0", e3), e3.seriesIndex >= Q.series.length) return;
22
- console.log("clik1", e3);
23
- const r2 = Q.series[e3.seriesIndex].uuid;
24
- console.log("clik2", r2);
25
- const o2 = B[r2];
26
- if (console.log("clik3", o2), !o2) return;
21
+ if (e3.seriesIndex >= Q.series.length) return;
22
+ const r2 = Q.series[e3.seriesIndex].uuid, o2 = B[r2];
23
+ if (!o2) return;
27
24
  const t2 = { data: e3.data, dataIndex: e3.dataIndex, name: e3.name, seriesId: e3.seriesId, seriesIndex: e3.seriesIndex, seriesName: e3.seriesName, seriesType: e3.seriesType, value: e3.value };
28
- I(H.pageContext, o2, t2);
25
+ k(H.pageContext, o2, t2);
29
26
  }
30
27
  g(H.configure, Q), o(() => {
31
- const e3 = v(H.pageContext, H.configure);
28
+ const e3 = x(H.pageContext, H.configure);
32
29
  e3 && oe(e3), S.value && (z || Object.keys(B).length > 0) && S.value.chart.on("click", function(e4) {
33
30
  z ? U.value && U.value.drill && U.value.drill(e4, H.configure.cacheDatas) : Z(e4);
34
31
  }), !z && H.configure.clickSet && S.value && m(H.pageContext, H.configure, S.value.chart);
35
32
  });
36
33
  let $ = M.groupValue;
37
34
  function ee(e3) {
38
- L ? (true !== e3 && (L.autoRefresh = true), x(H.pageContext, [L], M.drillParams)) : console.log("无数据源配置,不需要查询!");
35
+ L && (true !== e3 && (L.autoRefresh = true), v(H.pageContext, [L], M.drillParams));
39
36
  }
40
37
  t(M, () => {
41
38
  $ != M.groupValue && ($ = M.groupValue, L && (L.services[0].groupValue = M.groupValue), ee(false));
@@ -43,14 +40,13 @@ const A = e({ __name: "column-line-runtime", props: { pageContext: {}, configure
43
40
  const re = M.monitorFields;
44
41
  function oe(e3) {
45
42
  var _a;
46
- if (e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
47
- e3.hasRender = true, L.autoRefresh || ($ = e3.groupValue, $ && "checkbox" !== M.groupComponent && ($ = $.join(",")), M.groupValue = $), L.autoRefresh && z || h(H.pageContext, H.configure, (_a = S.value) == null ? void 0 : _a.chart), L.autoRefresh = false, k(H.pageContext, H.configure, Q, e3);
43
+ e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender ? e3.hasRender = true : (e3.hasRender = true, L.autoRefresh || ($ = e3.groupValue, $ && "checkbox" !== M.groupComponent && ($ = $.join(",")), M.groupValue = $), L.autoRefresh && z || h(H.pageContext, H.configure, (_a = S.value) == null ? void 0 : _a.chart), L.autoRefresh = false, I(H.pageContext, H.configure, Q, e3));
48
44
  }
49
45
  return C(H.pageContext, re, () => {
50
46
  ee(true);
51
47
  }), A2({ updateChartDatas: oe, exportChart: function() {
52
48
  return d(S.value);
53
- }, chartOption: Q }), (e3, r2) => (i(), n("div", { style: l(s(J)), class: a([s(K), "amb-widget-chart amb-widget-flex"]), ref_key: "thisRef", ref: N }, [u(c(y, { ref_key: "headerRef", ref: U, headerInfo: s(M), configure: e3.configure, pageContext: e3.pageContext, onDrillEnd: Y }, null, 8, ["headerInfo", "configure", "pageContext"]), [[p, s(M).showHeader || e3.pageContext.showHomepageSearch]]), c(s(O), { ref_key: "chartRef", ref: S, theme: s(X), option: s(Q), autoresize: "" }, null, 8, ["theme", "option"])], 6));
49
+ }, chartOption: Q }), (e3, r2) => (a(), n("div", { style: u(s(J)), class: i([s(K), "amb-widget-chart amb-widget-flex"]), ref_key: "thisRef", ref: N }, [l(c(y, { ref_key: "headerRef", ref: U, headerInfo: s(M), configure: e3.configure, pageContext: e3.pageContext, onDrillEnd: Y }, null, 8, ["headerInfo", "configure", "pageContext"]), [[p, s(M).showHeader || e3.pageContext.showHomepageSearch]]), c(s(O), { ref_key: "chartRef", ref: S, theme: s(X), option: s(Q), autoresize: "" }, null, 8, ["theme", "option"])], 6));
54
50
  } });
55
51
  export {
56
52
  A as default
@@ -2,10 +2,10 @@ import { defineComponent as e, watch as l, resolveComponent as o, createBlock as
2
2
  const t = e({ __name: "common-chart-header-group", props: { headerInfo: { type: Object, required: true } }, setup(e2) {
3
3
  const t2 = e2;
4
4
  return l(t2.headerInfo, () => {
5
- console.log("props.headerInfo", t2.headerInfo);
5
+ t2.headerInfo;
6
6
  }), (l2, t3) => {
7
- const h = o("el-checkbox"), f = o("el-checkbox-group"), m = o("el-radio"), I = o("el-radio-button"), V = 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(V, { 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(I, { label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 256))]), _: 1 }, 8, ["modelValue"]));
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
9
  };
10
10
  } });
11
11
  export {
@@ -1,5 +1,5 @@
1
- import { defineComponent as e, ref as o, resolveComponent as r, createElementBlock as n, openBlock as t, createElementVNode as a, createCommentVNode as l, withDirectives as i, createBlock as d, normalizeStyle as f, toDisplayString as h, vShow as s, createVNode as c, withCtx as I, unref as p } from "vue";
2
- import { Search as u } from "@element-plus/icons-vue";
1
+ import { defineComponent as e, ref as o, resolveComponent as r, createElementBlock as n, openBlock as t, createElementVNode as a, createCommentVNode as l, withDirectives as i, createBlock as d, normalizeStyle as f, toDisplayString as h, vShow as s, createVNode as c, withCtx as I, unref as u } from "vue";
2
+ 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";
@@ -8,7 +8,7 @@ const w = { class: "amb-widget-chart-header" }, x = { class: "amb-widget-chart-h
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 (e3 >= o2) console.log("无效的取消操作,", e3, N.headerInfo.drillOptions);
11
+ if (e3 >= o2) N.headerInfo.drillOptions;
12
12
  else {
13
13
  for (let r2 = o2 - 1; r2 >= e3; r2--) N.headerInfo.drillOptions.splice(r2, 1);
14
14
  q(e3);
@@ -45,14 +45,14 @@ const w = { class: "amb-widget-chart-header" }, x = { class: "amb-widget-chart-h
45
45
  return P2({ drill: function(e3, o2) {
46
46
  const r2 = N.headerInfo.drillOptions.length;
47
47
  if (r2 + 1 >= N.headerInfo.options.length) {
48
- return F(o2 && e3.dataIndex < o2.length ? o2[e3.dataIndex] : void 0), console.log("钻取到最底层了!"), void R("drill-end", e3);
48
+ return F(o2 && e3.dataIndex < o2.length ? o2[e3.dataIndex] : void 0), void R("drill-end", e3);
49
49
  }
50
- console.log("props.headerInfo.options", r2, N.headerInfo.options);
50
+ N.headerInfo.options;
51
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 };
52
52
  N.headerInfo.drillOptions.push(a2), q(r2 + 1);
53
53
  }, closeDrill: S }), (o2, v2) => {
54
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(p(u))]), _: 1 })]), _: 1 }), c(b, { ref_key: "commonHomepageSearchRef", ref: A, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"])])) : l("", true)]);
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)]);
56
56
  };
57
57
  } });
58
58
  export {
@@ -5,59 +5,59 @@ import { ElLoading as y, ElMessage as C } from "element-plus";
5
5
  import S from "agilebuilder-ui/src/utils/request";
6
6
  import "agilebuilder-ui/src/utils/common-util";
7
7
  import "agilebuilder-ui/src/utils/util";
8
- import "agilebuilder-ui/src/utils/auth";
8
+ import "async-validator";
9
9
  import "../../../../utils/global-refs.js";
10
10
  import "../../../../utils/eventBus.js";
11
- import "axios";
12
- import "async-validator";
13
11
  import "../../../../utils/page-store.js";
14
12
  import "agilebuilder-ui/src/utils/i18n-util";
15
13
  import "vue-i18n";
14
+ import "agilebuilder-ui/src/utils/auth";
15
+ import "axios";
16
16
  import "../../../../utils/events/print-label.js";
17
- const b = { style: { overflow: "auto", height: "calc(100vh - 140px)" }, ref: "dialogBody" }, O = { class: "dialog-footer" }, x = e({ __name: "common-homepage-search", props: { configure: { type: Object, required: true }, pageContext: { type: Object, default: () => {
18
- } } }, setup(e2, { expose: x2 }) {
19
- const N = e2, _ = t(false), J = t({}), j = t(0);
17
+ const _ = { style: { overflow: "auto", height: "calc(100vh - 140px)" }, ref: "dialogBody" }, b = { class: "dialog-footer" }, O = e({ __name: "common-homepage-search", props: { configure: { type: Object, required: true }, pageContext: { type: Object, default: () => {
18
+ } } }, setup(e2, { expose: O2 }) {
19
+ const x = e2, N = t(false), J = t({}), j = t(0);
20
20
  let I;
21
21
  o(() => {
22
22
  I = setTimeout(() => {
23
- J.value = JSON.parse(JSON.stringify(N.pageContext.entity));
23
+ J.value = JSON.parse(JSON.stringify(x.pageContext.entity));
24
24
  }, 200);
25
25
  }), i(() => {
26
26
  I && clearTimeout(I);
27
27
  });
28
28
  const k = t([]), w = () => {
29
- _.value = false;
29
+ N.value = false;
30
30
  }, T = () => {
31
31
  const e3 = y.service({ lock: true, text: "Loading", background: "rgba(0, 0, 0, 0.7)" });
32
- v(N.pageContext, N.pageContext.initChartServiceConfigs, null, false).then(() => {
33
- _.value = false;
32
+ v(x.pageContext, x.pageContext.initChartServiceConfigs, null, false).then(() => {
33
+ N.value = false;
34
34
  }).finally(() => {
35
- _.value = false, e3.close();
35
+ N.value = false, e3.close();
36
36
  });
37
37
  };
38
38
  function H() {
39
- N.pageContext.entity = JSON.parse(JSON.stringify(J.value)), j.value++;
39
+ x.pageContext.entity = JSON.parse(JSON.stringify(J.value)), j.value++;
40
40
  }
41
41
  function A() {
42
42
  const e3 = {};
43
- N.pageContext.variables.forEach((t3) => {
43
+ x.pageContext.variables.forEach((t3) => {
44
44
  const o3 = "${page." + t3.name + "}";
45
- e3[o3] = h(N.pageContext.entity, o3, null);
45
+ e3[o3] = h(x.pageContext.entity, o3, null);
46
46
  });
47
47
  let t2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS"), o2 = {};
48
- t2 && (o2 = JSON.parse(t2)), o2[N.configure.homeChartSettingUserId] = e3;
48
+ t2 && (o2 = JSON.parse(t2)), o2[x.configure.homeChartSettingUserId] = e3;
49
49
  const i2 = JSON.stringify(e3);
50
- window.localStorage.setItem("HOME_MY_CHARTS_CONDITIONS", JSON.stringify(o2)), J.value = JSON.parse(JSON.stringify(N.pageContext.entity)), S.post(window.$vueApp.config.globalProperties.baseAPI + "/component/home-chart-settings/search-conditions", { id: N.configure.homeChartSettingUserId, searchConditionsJson: i2 }).then((e4) => {
50
+ window.localStorage.setItem("HOME_MY_CHARTS_CONDITIONS", JSON.stringify(o2)), J.value = JSON.parse(JSON.stringify(x.pageContext.entity)), S.post(window.$vueApp.config.globalProperties.baseAPI + "/component/home-chart-settings/search-conditions", { id: x.configure.homeChartSettingUserId, searchConditionsJson: i2 }).then((e4) => {
51
51
  C.success("保存成功"), T();
52
52
  });
53
53
  }
54
- return x2({ openSearch: () => {
55
- _.value = true, k.value = N.configure.pushHomepage.searchConditions;
54
+ return O2({ openSearch: () => {
55
+ N.value = true, k.value = x.configure.pushHomepage.searchConditions;
56
56
  } }), (t2, o2) => {
57
57
  const i2 = l("el-empty"), v2 = l("el-form"), h2 = l("el-button"), y2 = l("el-dialog");
58
- return r(), a(y2, { modelValue: _.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => _.value = e3), title: "筛选", close: w, "append-to-body": "", fullscreen: "", top: "40vh", append: "", width: "70%", draggable: "" }, { default: n(() => [u("div", b, [k.value && 0 !== k.value.length ? c("", true) : (r(), a(i2, { key: 0, description: "未设置筛选条件", "image-size": 50 })), (r(), a(v2, { key: j.value }, { default: n(() => [(r(true), g(m, null, d(k.value, (t3) => (r(), a(f, { key: t3.uuid, configure: t3, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"]))), 128))]), _: 1 }))], 512)]), footer: n(() => [u("div", O, [s(h2, { type: "primary", onClick: T }, { default: n(() => o2[1] || (o2[1] = [p(" 确定 ")])), _: 1 }), s(h2, { type: "default", onClick: H }, { default: n(() => o2[2] || (o2[2] = [p("重置")])), _: 1 }), s(h2, { type: "primary", onClick: A }, { default: n(() => o2[3] || (o2[3] = [p(" 保存为默认条件 ")])), _: 1 })])]), _: 1 }, 8, ["modelValue"]);
58
+ return r(), a(y2, { modelValue: N.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => N.value = e3), title: "筛选", close: w, "append-to-body": "", fullscreen: "", top: "40vh", append: "", width: "70%", draggable: "" }, { default: n(() => [u("div", _, [k.value && 0 !== k.value.length ? c("", true) : (r(), a(i2, { key: 0, description: "未设置筛选条件", "image-size": 50 })), (r(), a(v2, { key: j.value }, { default: n(() => [(r(true), g(m, null, d(k.value, (t3) => (r(), a(f, { key: t3.uuid, configure: t3, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"]))), 128))]), _: 1 }))], 512)]), footer: n(() => [u("div", b, [s(h2, { type: "primary", onClick: T }, { default: n(() => o2[1] || (o2[1] = [p(" 确定 ", -1)])), _: 1, __: [1] }), s(h2, { type: "default", onClick: H }, { default: n(() => o2[2] || (o2[2] = [p("重置", -1)])), _: 1, __: [2] }), s(h2, { type: "primary", onClick: A }, { default: n(() => o2[3] || (o2[3] = [p(" 保存为默认条件 ", -1)])), _: 1, __: [3] })])]), _: 1 }, 8, ["modelValue"]);
59
59
  };
60
60
  } });
61
61
  export {
62
- x as default
62
+ O as default
63
63
  };