@ecan-bi/pivot-table 1.0.73 → 1.0.74
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-e9b34ae7.mjs → DrillModal-d5233c7c.mjs} +3 -3
- package/dist/{DrillModal-e9b34ae7.mjs.map → DrillModal-d5233c7c.mjs.map} +1 -1
- package/dist/{index-c36e79f0.mjs → index-b5c42d49.mjs} +28 -23
- package/dist/{index-c36e79f0.mjs.map → index-b5c42d49.mjs.map} +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/types/pivotTable/PivotTable.vue.d.ts +9 -0
- package/types/pivotTable/props.d.ts +4 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @ecan-bi/pivot-table@1.0.
|
|
1
|
+
/*! @ecan-bi/pivot-table@1.0.74 */
|
|
2
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-
|
|
3
|
+
import { _ as me, B as fe, S as pe, C as he, E as ge, n as Z, d as ve } from "./index-b5c42d49.mjs";
|
|
4
4
|
import { cloneDeep as Ce } from "lodash-es";
|
|
5
5
|
import "dayjs";
|
|
6
6
|
import "axios";
|
|
@@ -226,4 +226,4 @@ const $e = /* @__PURE__ */ me(be, [["render", ye], ["__scopeId", "data-v-412e66d
|
|
|
226
226
|
export {
|
|
227
227
|
$e as default
|
|
228
228
|
};
|
|
229
|
-
//# sourceMappingURL=DrillModal-
|
|
229
|
+
//# sourceMappingURL=DrillModal-d5233c7c.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrillModal-e9b34ae7.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,cAA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+
{"version":3,"file":"DrillModal-d5233c7c.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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an-bi/pivot-table@1.0.
|
|
1
|
+
/*! @ecan-bi/pivot-table@1.0.74 */
|
|
2
2
|
import { defineComponent as Ze, ref as Q, inject as pe, watch as Oe, unref as k, computed as oe, resolveComponent as yt, openBlock as mt, createBlock as _e, withCtx as Mt, createVNode as dt, createTextVNode as di, createCommentVNode as ye, createElementBlock as Et, normalizeClass as Sn, Fragment as Ci, createElementVNode as Bt, normalizeStyle as ie, renderList as gn, withDirectives as wh, toDisplayString as qe, vShow as Vu, h as yC, nextTick as Bi, withModifiers as mr, onMounted as ls, onUnmounted as gm, Transition as bA, withKeys as ZB, provide as mn, Teleport as CA, onBeforeUnmount as yA, toRaw as JB, resolveDynamicComponent as QB, mergeProps as tP, reactive as $u, resolveDirective as eP, defineAsyncComponent as iP, watchEffect as nP } from "vue";
|
|
3
3
|
import br from "dayjs";
|
|
4
4
|
import { cloneDeep as ci } from "lodash-es";
|
|
@@ -59571,27 +59571,28 @@ const jX = /* @__PURE__ */ Ji(WX, [["render", NX], ["__scopeId", "data-v-01e4c58
|
|
|
59571
59571
|
indicatorUrl: e = "",
|
|
59572
59572
|
indicatorToken: n = "",
|
|
59573
59573
|
context: o = "",
|
|
59574
|
-
graphicConfig: r
|
|
59574
|
+
graphicConfig: r,
|
|
59575
|
+
sqlConditions: s
|
|
59575
59576
|
} = i;
|
|
59576
|
-
return async (
|
|
59577
|
-
var
|
|
59578
|
-
const
|
|
59579
|
-
let
|
|
59580
|
-
if (!
|
|
59581
|
-
const { pathname:
|
|
59582
|
-
if (
|
|
59583
|
-
const
|
|
59584
|
-
|
|
59577
|
+
return async (a = {}, h, d) => {
|
|
59578
|
+
var p;
|
|
59579
|
+
const u = GA(i, a), { url: c, ...g } = u || {};
|
|
59580
|
+
let f = t;
|
|
59581
|
+
if (!f) {
|
|
59582
|
+
const { pathname: v } = window == null ? void 0 : window.location;
|
|
59583
|
+
if (v) {
|
|
59584
|
+
const m = v.split("/");
|
|
59585
|
+
m != null && m.length && (f = m[m.length - 1]);
|
|
59585
59586
|
}
|
|
59586
59587
|
}
|
|
59587
|
-
if (
|
|
59588
|
-
|
|
59588
|
+
if (c && g) {
|
|
59589
|
+
h && h("tableChange", {
|
|
59589
59590
|
type: "11",
|
|
59590
|
-
data:
|
|
59591
|
-
}),
|
|
59591
|
+
data: g
|
|
59592
|
+
}), d && d(g), s != null && s.length && (g.sqlConditions = s);
|
|
59592
59593
|
try {
|
|
59593
59594
|
return await Fr({
|
|
59594
|
-
url: `${e}${
|
|
59595
|
+
url: `${e}${c}`,
|
|
59595
59596
|
method: "post",
|
|
59596
59597
|
headers: {
|
|
59597
59598
|
// @ts-ignore
|
|
@@ -59599,15 +59600,15 @@ const jX = /* @__PURE__ */ Ji(WX, [["render", NX], ["__scopeId", "data-v-01e4c58
|
|
|
59599
59600
|
operateContext: o
|
|
59600
59601
|
},
|
|
59601
59602
|
data: {
|
|
59602
|
-
...
|
|
59603
|
+
...g,
|
|
59603
59604
|
dataSourceId: (r == null ? void 0 : r.dataSourceId) || "",
|
|
59604
|
-
pageId:
|
|
59605
|
+
pageId: f
|
|
59605
59606
|
},
|
|
59606
59607
|
// @ts-ignore
|
|
59607
|
-
signal: ((
|
|
59608
|
+
signal: ((p = window.controller) == null ? void 0 : p.signal) || ""
|
|
59608
59609
|
});
|
|
59609
|
-
} catch (
|
|
59610
|
-
console.error(
|
|
59610
|
+
} catch (v) {
|
|
59611
|
+
console.error(v);
|
|
59611
59612
|
}
|
|
59612
59613
|
}
|
|
59613
59614
|
};
|
|
@@ -59891,6 +59892,10 @@ const jX = /* @__PURE__ */ Ji(WX, [["render", NX], ["__scopeId", "data-v-01e4c58
|
|
|
59891
59892
|
theFlag: {
|
|
59892
59893
|
type: String,
|
|
59893
59894
|
default: ""
|
|
59895
|
+
},
|
|
59896
|
+
sqlConditions: {
|
|
59897
|
+
type: Array,
|
|
59898
|
+
default: []
|
|
59894
59899
|
}
|
|
59895
59900
|
}, i0 = {
|
|
59896
59901
|
LAST_DATA: "上期值",
|
|
@@ -59963,7 +59968,7 @@ const qX = Ze({
|
|
|
59963
59968
|
IndSourceList: zX,
|
|
59964
59969
|
DragArea: jX,
|
|
59965
59970
|
PivotDetail: uX,
|
|
59966
|
-
DrillModal: XX(() => import("./DrillModal-
|
|
59971
|
+
DrillModal: XX(() => import("./DrillModal-d5233c7c.mjs")),
|
|
59967
59972
|
SettingOutlined: PU,
|
|
59968
59973
|
DatabaseOutlined: XG,
|
|
59969
59974
|
ArrowsAltOutlined: AG,
|
|
@@ -62050,4 +62055,4 @@ export {
|
|
|
62050
62055
|
Eq as i,
|
|
62051
62056
|
kl as n
|
|
62052
62057
|
};
|
|
62053
|
-
//# sourceMappingURL=index-
|
|
62058
|
+
//# sourceMappingURL=index-b5c42d49.mjs.map
|