@ecan-bi/pivot-table 1.0.67 → 1.0.68
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/DrillModal-d4c40db4.mjs +229 -0
- package/dist/DrillModal-d4c40db4.mjs.map +1 -0
- package/dist/{index-0c084163.mjs → index-635d9326.mjs} +6485 -6349
- package/dist/index-635d9326.mjs.map +1 -0
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +30 -30
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/types/pivotTable/PivotDetail.vue.d.ts +10 -2
- package/types/pivotTable/PivotTable.vue.d.ts +7 -0
- package/dist/DrillModal-4ae81051.mjs +0 -304
- package/dist/DrillModal-4ae81051.mjs.map +0 -1
- package/dist/index-0c084163.mjs.map +0 -1
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/*! @ecan-bi/pivot-table@1.0.68 */
|
|
2
|
+
import { defineComponent as ne, inject as W, ref as f, reactive as ie, computed as se, unref as t, watch as ae, resolveComponent as L, openBlock as M, createBlock as U, withCtx as q, createElementVNode as z, toDisplayString as J, createVNode as X, normalizeClass as A, createElementBlock as re, normalizeStyle as de, mergeProps as ce, createCommentVNode as ue, nextTick as Y } from "vue";
|
|
3
|
+
import { _ as me, B as fe, S as pe, C as he, E as ge, n as Z, d as ve } from "./index-635d9326.mjs";
|
|
4
|
+
import { cloneDeep as Ce } from "lodash-es";
|
|
5
|
+
import "dayjs";
|
|
6
|
+
import "axios";
|
|
7
|
+
import "ant-design-vue";
|
|
8
|
+
import "ant-design-vue/es/input-number/style";
|
|
9
|
+
import "ant-design-vue/es/form/style";
|
|
10
|
+
import "echarts";
|
|
11
|
+
import "vuedraggable";
|
|
12
|
+
const be = ne({
|
|
13
|
+
name: "DrillModal",
|
|
14
|
+
props: {
|
|
15
|
+
scaleValue: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => ({
|
|
18
|
+
widthScale: 1,
|
|
19
|
+
heightScale: 1
|
|
20
|
+
})
|
|
21
|
+
},
|
|
22
|
+
isIframeMode: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
components: {
|
|
28
|
+
BorderOutlined: fe,
|
|
29
|
+
SwitcherOutlined: pe,
|
|
30
|
+
CloseOutlined: he,
|
|
31
|
+
EcanPivotTable: ge
|
|
32
|
+
},
|
|
33
|
+
setup(e, { expose: p }) {
|
|
34
|
+
const K = {
|
|
35
|
+
IN: "属于",
|
|
36
|
+
NOT_IN: "不属于",
|
|
37
|
+
LIKE: "包含",
|
|
38
|
+
NOT_LIKE: "不包含",
|
|
39
|
+
"LIKE%": "开头是",
|
|
40
|
+
"%LIKE": "结尾是",
|
|
41
|
+
EQUAL: "等于",
|
|
42
|
+
LESS: "小于",
|
|
43
|
+
LESS_EQUAL: "小于等于",
|
|
44
|
+
GREATER: "大于",
|
|
45
|
+
GREATER_EQUAL: "大于等于",
|
|
46
|
+
NOT_EQUAL: "不等于"
|
|
47
|
+
}, D = 0.37, N = 0.6, O = 0.97, F = 0.9, h = `dmodal_${Z(6)}`, $ = () => document.querySelector("#ProviderConfig > #container") || document.body, w = W("theme", "light"), g = f({}), y = f([]), x = W("indicatorUrl", ""), j = f([]), v = f(!1), C = f({}), _ = ie({
|
|
48
|
+
keyName: "",
|
|
49
|
+
visible: !1,
|
|
50
|
+
columns: [],
|
|
51
|
+
title: ""
|
|
52
|
+
}), B = f([]), P = f(), ee = se(() => {
|
|
53
|
+
let o = `drill-modal ${h}`;
|
|
54
|
+
return v.value && (o += " full"), t(w) && (o += ` ${t(w)}`), o;
|
|
55
|
+
}), I = (o) => {
|
|
56
|
+
const l = document.querySelector(`.${h} .ant-modal-header`);
|
|
57
|
+
if (l)
|
|
58
|
+
if (o)
|
|
59
|
+
l.addEventListener("mousedown", H);
|
|
60
|
+
else {
|
|
61
|
+
const r = l.parentElement;
|
|
62
|
+
r && (r.style.left = "", r.style.top = ""), l.removeEventListener("mousedown", H);
|
|
63
|
+
}
|
|
64
|
+
}, R = (o) => {
|
|
65
|
+
const l = document.querySelector(`.${h} .ant-modal-header`);
|
|
66
|
+
l && (o ? l.addEventListener("dblclick", k) : l.removeEventListener("dblclick", k));
|
|
67
|
+
}, H = (o) => {
|
|
68
|
+
ve(o, `.${h} .ant-modal-header`);
|
|
69
|
+
}, k = () => {
|
|
70
|
+
v.value = !v.value, Y(() => {
|
|
71
|
+
v.value ? (t(C).width = parseFloat(t(g).width) * O + "px", t(C).height = (e.isIframeMode ? parseFloat(t(g).height) : window.screen.height) * F + "px", I(!1)) : (t(C).width = parseFloat(t(g).width) * D + "px", t(C).height = (e.isIframeMode ? parseFloat(t(g).height) : window.screen.height) * N + "px", I(!0));
|
|
72
|
+
});
|
|
73
|
+
}, oe = () => {
|
|
74
|
+
v.value = !1, R(!1), I(!1);
|
|
75
|
+
}, le = ({ drillDimension: o, drillFieldData: l, usedDimensionFields: r, tableProps: c, splitSymbol: i }) => {
|
|
76
|
+
const T = Ce(c), { graphicConfig: d, allDimensions: E, pageConfig: s } = T, b = Z(6), n = [];
|
|
77
|
+
B.value = [...r, o.label], E.value = E, s.value = s;
|
|
78
|
+
const a = d.indicators.filter((m) => m.show).map((m) => m.label);
|
|
79
|
+
a != null && a.length && (_.title = `下钻:${a.join("、")}`);
|
|
80
|
+
for (const m of l) {
|
|
81
|
+
const u = E.find((G) => [G.title, G.label].includes(m.dimensionKey)), S = m.value.split(i);
|
|
82
|
+
let Q = m.value;
|
|
83
|
+
S != null && S.length && (Q = S[S.length - 1]), n.push({
|
|
84
|
+
conditionKey: u.label,
|
|
85
|
+
conditionLabel: u.title || u.label,
|
|
86
|
+
conditionName: u.name,
|
|
87
|
+
conditionValueType: u.genericType,
|
|
88
|
+
indexCode: u.indexCode,
|
|
89
|
+
typeGuid: u.typeGuid,
|
|
90
|
+
indexCodeNum: u.indexCodeNum,
|
|
91
|
+
rule: "EQUAL",
|
|
92
|
+
dataType: "",
|
|
93
|
+
customValue: Q
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
d.queryColumnList = [o], n != null && n.length && (d.controlList || (d.controlList = []), d.controlList.push(...n), d.controlList = [
|
|
97
|
+
{
|
|
98
|
+
join: "&&",
|
|
99
|
+
conditions: d.controlList
|
|
100
|
+
}
|
|
101
|
+
]), C.value = {
|
|
102
|
+
...T,
|
|
103
|
+
id: b,
|
|
104
|
+
keyName: `透视表_${b}`,
|
|
105
|
+
position: "relative",
|
|
106
|
+
top: 0,
|
|
107
|
+
left: 0,
|
|
108
|
+
width: parseFloat(t(s).width) * D + "px",
|
|
109
|
+
height: (e.isIframeMode ? parseFloat(t(s).height) : window.screen.height) * N + "px",
|
|
110
|
+
graphicConfig: d
|
|
111
|
+
}, _.visible = !0, Y(() => {
|
|
112
|
+
t(P).refreshData(), R(!0), I(!0);
|
|
113
|
+
});
|
|
114
|
+
}, te = ({ type: o, data: l }) => {
|
|
115
|
+
if (o === "11" && l) {
|
|
116
|
+
const {
|
|
117
|
+
indicatorList: r = [],
|
|
118
|
+
queryColumns: c = []
|
|
119
|
+
} = l, T = r.concat(c).filter((s) => s.conditions || s.filter), d = V(T, "conditions", !0), E = V(l.sqlConditions, "sqlConditions", !1);
|
|
120
|
+
j.value = d.concat(E).map((s) => {
|
|
121
|
+
const b = t(y).find((a) => a.label === s.label);
|
|
122
|
+
let n = s.fieldValue;
|
|
123
|
+
if (n && typeof n == "string") {
|
|
124
|
+
const a = n.split(",");
|
|
125
|
+
(a == null ? void 0 : a.length) > 3 && (n = a.slice(0, 3).join(",") + "等");
|
|
126
|
+
} else
|
|
127
|
+
n || (n = '""');
|
|
128
|
+
return `${(b == null ? void 0 : b.title) || s.label} ${K[s.rule]} ${n}`;
|
|
129
|
+
}) || [];
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
function V(o, l, r) {
|
|
133
|
+
const c = [];
|
|
134
|
+
for (const i of o)
|
|
135
|
+
i[l] ? c.push(...V(i[l], l, r)) : i.filter ? c.push({
|
|
136
|
+
...i.filter,
|
|
137
|
+
label: i.label
|
|
138
|
+
}) : (!r || i.dataType !== "component" && !(i.fieldValue.startsWith("${") && i.fieldValue.endsWith("}"))) && c.push(i);
|
|
139
|
+
return c;
|
|
140
|
+
}
|
|
141
|
+
return ae(_.visible, (o) => {
|
|
142
|
+
window.modalShow && window.modalShow(o);
|
|
143
|
+
}), p({
|
|
144
|
+
showModal: le
|
|
145
|
+
}), {
|
|
146
|
+
theme: w,
|
|
147
|
+
wrapClassName: ee,
|
|
148
|
+
conditionInfo: j,
|
|
149
|
+
drillInfo: _,
|
|
150
|
+
pivotTableConfig: C,
|
|
151
|
+
indicatorUrl: x,
|
|
152
|
+
isIndFullScreen: v,
|
|
153
|
+
usedDimensionFields: B,
|
|
154
|
+
pivotTableRef: P,
|
|
155
|
+
toggleFullScreen: k,
|
|
156
|
+
onDetailCancel: oe,
|
|
157
|
+
onPivotTableChange: te,
|
|
158
|
+
getContainer: $
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
}), we = ["title"];
|
|
162
|
+
function ye(e, p, K, D, N, O) {
|
|
163
|
+
const F = L("close-outlined"), h = L("switcher-outlined"), $ = L("border-outlined"), w = L("ecan-pivot-table"), g = L("a-modal");
|
|
164
|
+
return M(), U(g, {
|
|
165
|
+
"wrap-class-name": e.wrapClassName,
|
|
166
|
+
visible: e.drillInfo.visible,
|
|
167
|
+
"onUpdate:visible": p[1] || (p[1] = (y) => e.drillInfo.visible = y),
|
|
168
|
+
width: "60%",
|
|
169
|
+
footer: null,
|
|
170
|
+
maskClosable: !1,
|
|
171
|
+
destroyOnClose: !0,
|
|
172
|
+
getContainer: e.getContainer,
|
|
173
|
+
onCancel: e.onDetailCancel
|
|
174
|
+
}, {
|
|
175
|
+
title: q(() => [
|
|
176
|
+
z("div", {
|
|
177
|
+
class: "modal-title",
|
|
178
|
+
title: e.conditionInfo.join("、")
|
|
179
|
+
}, J(e.drillInfo.title) + " " + J(e.conditionInfo.join("、")), 9, we)
|
|
180
|
+
]),
|
|
181
|
+
closeIcon: q(() => [
|
|
182
|
+
X(F, {
|
|
183
|
+
class: A(["modal-icon", e.theme])
|
|
184
|
+
}, null, 8, ["class"])
|
|
185
|
+
]),
|
|
186
|
+
default: q(() => [
|
|
187
|
+
z("div", {
|
|
188
|
+
class: "zoom-btn",
|
|
189
|
+
onClick: p[0] || (p[0] = (...y) => e.toggleFullScreen && e.toggleFullScreen(...y))
|
|
190
|
+
}, [
|
|
191
|
+
e.isIndFullScreen ? (M(), U(h, {
|
|
192
|
+
key: 0,
|
|
193
|
+
class: A(["modal-icon", e.theme])
|
|
194
|
+
}, null, 8, ["class"])) : (M(), U($, {
|
|
195
|
+
key: 1,
|
|
196
|
+
class: A(["modal-icon", e.theme])
|
|
197
|
+
}, null, 8, ["class"]))
|
|
198
|
+
]),
|
|
199
|
+
e.drillInfo.visible ? (M(), re("div", {
|
|
200
|
+
key: 0,
|
|
201
|
+
style: de({
|
|
202
|
+
position: "relative",
|
|
203
|
+
width: e.pivotTableConfig.width,
|
|
204
|
+
height: e.pivotTableConfig.height
|
|
205
|
+
})
|
|
206
|
+
}, [
|
|
207
|
+
X(w, ce({ ref: "pivotTableRef" }, e.pivotTableConfig, {
|
|
208
|
+
theme: e.theme,
|
|
209
|
+
fullMode: !1,
|
|
210
|
+
allowDrill: !0,
|
|
211
|
+
showFullScreen: !1,
|
|
212
|
+
showClear: !1,
|
|
213
|
+
isAllowSaveConfig: !1,
|
|
214
|
+
indicatorUrl: e.indicatorUrl,
|
|
215
|
+
relateKeyName: e.drillInfo.keyName,
|
|
216
|
+
usedDimensionFields: e.usedDimensionFields,
|
|
217
|
+
scaleValue: e.scaleValue,
|
|
218
|
+
onTableChange: e.onPivotTableChange
|
|
219
|
+
}), null, 16, ["theme", "indicatorUrl", "relateKeyName", "usedDimensionFields", "scaleValue", "onTableChange"])
|
|
220
|
+
], 4)) : ue("", !0)
|
|
221
|
+
]),
|
|
222
|
+
_: 1
|
|
223
|
+
}, 8, ["wrap-class-name", "visible", "getContainer", "onCancel"]);
|
|
224
|
+
}
|
|
225
|
+
const $e = /* @__PURE__ */ me(be, [["render", ye], ["__scopeId", "data-v-412e66d4"]]);
|
|
226
|
+
export {
|
|
227
|
+
$e as default
|
|
228
|
+
};
|
|
229
|
+
//# sourceMappingURL=DrillModal-d4c40db4.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrillModal-d4c40db4.mjs","sources":["../src/component/DrillModal.vue"],"sourcesContent":["<template>\r\n <a-modal\r\n :wrap-class-name=\"wrapClassName\"\r\n v-model:visible=\"drillInfo.visible\"\r\n width=\"60%\"\r\n :footer=\"null\"\r\n :maskClosable=\"false\"\r\n :destroyOnClose=\"true\"\r\n :getContainer=\"getContainer\"\r\n @cancel=\"onDetailCancel\"\r\n >\r\n <template #title>\r\n <div class=\"modal-title\" :title=\"conditionInfo.join('、')\">\r\n {{ drillInfo.title }} {{ conditionInfo.join('、') }}\r\n </div>\r\n </template>\r\n <template #closeIcon>\r\n <close-outlined class=\"modal-icon\" :class=\"theme\" />\r\n </template>\r\n <div class=\"zoom-btn\" @click=\"toggleFullScreen\">\r\n <switcher-outlined class=\"modal-icon\" :class=\"theme\" v-if=\"isIndFullScreen\"/>\r\n <border-outlined class=\"modal-icon\" :class=\"theme\" v-else />\r\n </div>\r\n <div\r\n v-if=\"drillInfo.visible\"\r\n :style=\"{\r\n position: 'relative',\r\n width: pivotTableConfig.width,\r\n height: pivotTableConfig.height\r\n }\"\r\n >\r\n <ecan-pivot-table\r\n ref=\"pivotTableRef\"\r\n v-bind=\"pivotTableConfig\"\r\n :theme=\"theme\"\r\n :fullMode=\"false\"\r\n :allowDrill=\"true\"\r\n :showFullScreen=\"false\"\r\n :showClear=\"false\"\r\n :isAllowSaveConfig=\"false\"\r\n :indicatorUrl=\"indicatorUrl\"\r\n :relateKeyName=\"drillInfo.keyName\"\r\n :usedDimensionFields=\"usedDimensionFields\"\r\n :scaleValue=\"scaleValue\"\r\n @tableChange=\"onPivotTableChange\"\r\n />\r\n </div>\r\n </a-modal>\r\n</template>\r\n\r\n<script>\r\nimport { defineComponent, reactive, ref, unref, nextTick, watch, inject, computed } from 'vue'\r\nimport {\r\n BorderOutlined,\r\n SwitcherOutlined,\r\n CloseOutlined\r\n} from '@ant-design/icons-vue'\r\nimport { dragModalAction } from '@/utils/util'\r\nimport { nanoid } from 'nanoid'\r\nimport EcanPivotTable from '../pivotTable'\r\nimport { cloneDeep } from 'lodash-es'\r\nexport default defineComponent({\r\n name: 'DrillModal',\r\n props: {\r\n scaleValue: {\r\n type: Object,\r\n default: () => ({\r\n widthScale: 1,\r\n heightScale: 1\r\n })\r\n },\r\n isIframeMode: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n components: {\r\n BorderOutlined,\r\n SwitcherOutlined,\r\n CloseOutlined,\r\n EcanPivotTable\r\n },\r\n setup (props, { expose }) {\r\n const ruleMap = {\r\n IN: '属于',\r\n NOT_IN: '不属于',\r\n LIKE: '包含',\r\n NOT_LIKE: '不包含',\r\n 'LIKE%': '开头是',\r\n '%LIKE': '结尾是',\r\n EQUAL: '等于',\r\n LESS: '小于',\r\n LESS_EQUAL: '小于等于',\r\n GREATER: '大于',\r\n GREATER_EQUAL: '大于等于',\r\n NOT_EQUAL: '不等于'\r\n }\r\n const noramlWidthScale = 0.37\r\n const noramlHeightScale = 0.6\r\n const fullModalWidthScale = 0.97\r\n const fullModalHeightScale = 0.9\r\n const uniqueClass = `dmodal_${nanoid(6)}`\r\n\r\n // const getContainer = inject('getContainer', () => {})\r\n const getContainer = () => document.querySelector('#ProviderConfig > #container') || document.body\r\n const theme = inject('theme', 'light')\r\n const pageConfig = ref({})\r\n const allDimensions = ref([])\r\n const indicatorUrl = inject('indicatorUrl', '')\r\n const conditionInfo = ref([])\r\n const isIndFullScreen = ref(false)\r\n const pivotTableConfig = ref({})\r\n const drillInfo = reactive({\r\n keyName: '',\r\n visible: false,\r\n columns: [],\r\n title: ''\r\n })\r\n const usedDimensionFields = ref([])\r\n const pivotTableRef = ref()\r\n\r\n const wrapClassName = computed(() => {\r\n let result = `drill-modal ${uniqueClass}`\r\n if (isIndFullScreen.value) {\r\n result += ' full'\r\n }\r\n if (unref(theme)) {\r\n result += ` ${unref(theme)}`\r\n }\r\n return result\r\n })\r\n\r\n const bindModalMoveEvent = (flag) => {\r\n const modalHeader = document.querySelector(`.${uniqueClass} .ant-modal-header`)\r\n if (modalHeader) {\r\n if (flag) {\r\n modalHeader.addEventListener('mousedown', onModalMouseDown)\r\n } else {\r\n const modalEl = modalHeader.parentElement\r\n if (modalEl) {\r\n modalEl.style.left = ''\r\n modalEl.style.top = ''\r\n }\r\n modalHeader.removeEventListener('mousedown', onModalMouseDown)\r\n }\r\n }\r\n }\r\n\r\n const bindModalHeaderClickEvent = (flag) => {\r\n const modalHeader = document.querySelector(`.${uniqueClass} .ant-modal-header`)\r\n if (modalHeader) {\r\n if (flag) {\r\n modalHeader.addEventListener('dblclick', toggleFullScreen)\r\n } else {\r\n modalHeader.removeEventListener('dblclick', toggleFullScreen)\r\n }\r\n }\r\n }\r\n\r\n const onModalMouseDown = (e) => {\r\n dragModalAction(e, `.${uniqueClass} .ant-modal-header`)\r\n }\r\n\r\n const toggleFullScreen = () => {\r\n isIndFullScreen.value = !isIndFullScreen.value\r\n nextTick(() => {\r\n if (isIndFullScreen.value) {\r\n unref(pivotTableConfig).width = parseFloat(unref(pageConfig).width) * fullModalWidthScale + 'px'\r\n unref(pivotTableConfig).height = (props.isIframeMode ? parseFloat(unref(pageConfig).height) : window.screen.height) * fullModalHeightScale + 'px'\r\n bindModalMoveEvent(false)\r\n } else {\r\n unref(pivotTableConfig).width = parseFloat(unref(pageConfig).width) * noramlWidthScale + 'px'\r\n unref(pivotTableConfig).height = (props.isIframeMode ? parseFloat(unref(pageConfig).height) : window.screen.height) * noramlHeightScale + 'px'\r\n bindModalMoveEvent(true)\r\n }\r\n })\r\n }\r\n\r\n const onDetailCancel = () => {\r\n isIndFullScreen.value = false\r\n bindModalHeaderClickEvent(false)\r\n bindModalMoveEvent(false)\r\n }\r\n\r\n const showModal = ({ drillDimension, drillFieldData, usedDimensionFields: fields, tableProps, splitSymbol }) => {\r\n const cloneProps = cloneDeep(tableProps)\r\n const { graphicConfig, allDimensions, pageConfig } = cloneProps\r\n const newKey = nanoid(6)\r\n const newControlList = []\r\n usedDimensionFields.value = [...fields, drillDimension.label]\r\n allDimensions.value = allDimensions\r\n pageConfig.value = pageConfig\r\n const nameList = graphicConfig.indicators.filter(v => v.show).map(v => v.label)\r\n if (nameList?.length) {\r\n drillInfo.title = `下钻:${nameList.join('、')}`\r\n }\r\n for (const fieldData of drillFieldData) {\r\n const target = allDimensions.find((v) => [v.title, v.label].includes(fieldData.dimensionKey))\r\n const list = fieldData.value.split(splitSymbol)\r\n let customValue = fieldData.value\r\n if (list?.length) {\r\n customValue = list[list.length - 1]\r\n }\r\n newControlList.push({\r\n conditionKey: target.label,\r\n conditionLabel: target.title || target.label,\r\n conditionName: target.name,\r\n conditionValueType: target.genericType,\r\n indexCode: target.indexCode,\r\n typeGuid: target.typeGuid,\r\n indexCodeNum: target.indexCodeNum,\r\n rule: 'EQUAL',\r\n dataType: '',\r\n customValue\r\n })\r\n }\r\n graphicConfig.queryColumnList = [drillDimension]\r\n if (newControlList?.length) {\r\n if (!graphicConfig.controlList) {\r\n graphicConfig.controlList = []\r\n }\r\n graphicConfig.controlList.push(...newControlList)\r\n graphicConfig.controlList = [\r\n {\r\n join: '&&',\r\n conditions: graphicConfig.controlList\r\n }\r\n ]\r\n }\r\n pivotTableConfig.value = {\r\n ...cloneProps,\r\n id: newKey,\r\n keyName: `透视表_${newKey}`,\r\n position: 'relative',\r\n top: 0,\r\n left: 0,\r\n width: parseFloat(unref(pageConfig).width) * noramlWidthScale + 'px',\r\n height: (props.isIframeMode ? parseFloat(unref(pageConfig).height) : window.screen.height) * noramlHeightScale + 'px',\r\n graphicConfig\r\n }\r\n drillInfo.visible = true\r\n nextTick(() => {\r\n unref(pivotTableRef).refreshData()\r\n bindModalHeaderClickEvent(true)\r\n bindModalMoveEvent(true)\r\n })\r\n }\r\n\r\n const onPivotTableChange = ({ type, data }) => {\r\n if (type === '11' && data) {\r\n const {\r\n indicatorList = [],\r\n queryColumns = []\r\n } = data\r\n const mergeList = indicatorList.concat(queryColumns)\r\n const conditionList = mergeList.filter((v) => v.conditions || v.filter)\r\n const customValueList = loopConditions(conditionList, 'conditions', true)\r\n const sqlValueList = loopConditions(data.sqlConditions, 'sqlConditions', false)\r\n conditionInfo.value = customValueList.concat(sqlValueList).map((v) => {\r\n const target = unref(allDimensions).find((dim) => dim.label === v.label)\r\n let fieldStr = v.fieldValue\r\n if (fieldStr && typeof fieldStr === 'string') {\r\n const list = fieldStr.split(',')\r\n if (list?.length > 3) {\r\n fieldStr = list.slice(0, 3).join(',') + '等'\r\n }\r\n } else if (!fieldStr) {\r\n fieldStr = '\\\"\\\"'\r\n }\r\n return `${target?.title || v.label} ${ruleMap[v.rule]} ${fieldStr}`\r\n }) || []\r\n }\r\n }\r\n\r\n function loopConditions (list, field, flag) {\r\n const result = []\r\n for (const item of list) {\r\n if (item[field]) {\r\n result.push(...loopConditions(item[field], field, flag))\r\n } else if (item.filter) {\r\n result.push({\r\n ...item.filter,\r\n label: item.label\r\n })\r\n } else if (!flag || (item.dataType !== 'component' && !(item.fieldValue.startsWith('${') && item.fieldValue.endsWith('}')))) {\r\n result.push(item)\r\n }\r\n }\r\n return result\r\n }\r\n\r\n watch(drillInfo.visible, (val) => {\r\n // @ts-ignore\r\n window.modalShow && window.modalShow(val)\r\n })\r\n\r\n expose({\r\n showModal\r\n })\r\n return {\r\n theme,\r\n wrapClassName,\r\n conditionInfo,\r\n drillInfo,\r\n pivotTableConfig,\r\n indicatorUrl,\r\n isIndFullScreen,\r\n usedDimensionFields,\r\n pivotTableRef,\r\n toggleFullScreen,\r\n onDetailCancel,\r\n onPivotTableChange,\r\n getContainer\r\n }\r\n }\r\n})\r\n</script>\r\n\r\n<style lang=\"less\">\r\n.drill-modal.full {\r\n .ant-modal {\r\n width: 100% !important;\r\n height: 100%;\r\n max-width: unset;\r\n top: 0;\r\n padding-bottom: 0;\r\n margin: 0;\r\n }\r\n .ant-modal-content {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n }\r\n .ant-modal-body {\r\n flex: 1;\r\n }\r\n}\r\n</style>\r\n<style lang=\"less\" scoped>\r\n.modal-title {\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n padding-right: 75px;\r\n user-select: none;\r\n}\r\n.modal-icon {\r\n vertical-align: unset;\r\n font-size: 16px;\r\n}\r\n.zoom-btn {\r\n cursor: pointer;\r\n position: absolute;\r\n top: 2px;\r\n right: 60px;\r\n line-height: 54px;\r\n .darkBlue {\r\n color: #b2c3dd;\r\n }\r\n}\r\n</style>\r\n"],"names":["_sfc_main","defineComponent","BorderOutlined","SwitcherOutlined","CloseOutlined","EcanPivotTable","props","expose","ruleMap","noramlWidthScale","noramlHeightScale","fullModalWidthScale","fullModalHeightScale","uniqueClass","nanoid","getContainer","theme","inject","pageConfig","ref","allDimensions","indicatorUrl","conditionInfo","isIndFullScreen","pivotTableConfig","drillInfo","reactive","usedDimensionFields","pivotTableRef","wrapClassName","computed","result","unref","bindModalMoveEvent","flag","modalHeader","onModalMouseDown","modalEl","bindModalHeaderClickEvent","toggleFullScreen","e","dragModalAction","nextTick","onDetailCancel","showModal","drillDimension","drillFieldData","fields","tableProps","splitSymbol","cloneProps","cloneDeep","graphicConfig","newKey","newControlList","nameList","v","fieldData","target","list","customValue","onPivotTableChange","type","data","indicatorList","queryColumns","conditionList","customValueList","loopConditions","sqlValueList","dim","fieldStr","field","item","watch","val","_createBlock","_component_a_modal","_ctx","_cache","$event","_createElementVNode","_toDisplayString","_hoisted_1","_createVNode","_component_close_outlined","_normalizeClass","args","_component_switcher_outlined","_component_border_outlined","_createElementBlock","_normalizeStyle","_component_ecan_pivot_table","_mergeProps"],"mappings":";;;;;;;;;;AA6DA,MAAKA,KAAaC,GAAa;AAAA,EAC7B,MAAM;AAAA,EACN,OAAO;AAAA,IACL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS,OAAO;AAAA,QACd,YAAY;AAAA,QACZ,aAAa;AAAA;IAEhB;AAAA,IACD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACD;AAAA,EACD,YAAY;AAAA,IACV,gBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,EACD;AAAA,EACD,MAAOC,GAAO,EAAE,QAAAC,KAAU;AACxB,UAAMC,IAAU;AAAA,MACd,IAAI;AAAA,MACJ,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,MACV,SAAS;AAAA,MACT,SAAS;AAAA,MACT,OAAO;AAAA,MACP,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,eAAe;AAAA,MACf,WAAW;AAAA,IACb,GACMC,IAAmB,MACnBC,IAAoB,KACpBC,IAAsB,MACtBC,IAAuB,KACvBC,IAAc,UAAUC,EAAO,CAAC,KAGhCC,IAAe,MAAM,SAAS,cAAc,8BAA8B,KAAK,SAAS,MACxFC,IAAQC,EAAO,SAAS,OAAO,GAC/BC,IAAaC,EAAI,EAAE,GACnBC,IAAgBD,EAAI,EAAE,GACtBE,IAAeJ,EAAO,gBAAgB,EAAE,GACxCK,IAAgBH,EAAI,EAAE,GACtBI,IAAkBJ,EAAI,EAAK,GAC3BK,IAAmBL,EAAI,EAAE,GACzBM,IAAYC,GAAS;AAAA,MACzB,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS,CAAE;AAAA,MACX,OAAO;AAAA,KACR,GACKC,IAAsBR,EAAI,EAAE,GAC5BS,IAAgBT,EAAI,GAEpBU,KAAgBC,GAAS,M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