diff --git a/backend/src/main/java/io/dataease/ext/ExtChartViewMapper.xml b/backend/src/main/java/io/dataease/ext/ExtChartViewMapper.xml index c879ad7ea3..7fc57a374f 100644 --- a/backend/src/main/java/io/dataease/ext/ExtChartViewMapper.xml +++ b/backend/src/main/java/io/dataease/ext/ExtChartViewMapper.xml @@ -49,8 +49,7 @@ drill_fields, senior, SNAPSHOT, - data_from, - custom_sort + data_from ) SELECT id, `name`, @@ -79,8 +78,7 @@ drill_fields, senior, SNAPSHOT, - data_from, - custom_sort from chart_view + data_from from chart_view WHERE chart_view.id = #{id} @@ -114,8 +112,7 @@ drill_fields, senior, SNAPSHOT, - data_from, - custom_sort + data_from ) SELECT #{newViewId} as id, `name`, @@ -144,8 +141,7 @@ drill_fields, senior, SNAPSHOT, - data_from, - custom_sort from chart_view_cache + data_from from chart_view_cache WHERE chart_view_cache.id = #{sourceViewId} @@ -179,8 +175,7 @@ drill_fields, senior, SNAPSHOT, - data_from, - custom_sort + data_from ) SELECT id, `name`, @@ -209,8 +204,7 @@ drill_fields, senior, SNAPSHOT, - data_from, - custom_sort from chart_view + data_from from chart_view WHERE chart_view.scene_id = #{panelId} @@ -293,8 +287,7 @@ `chart_type`, `is_plugin`, `senior`, - `data_from`, - `custom_sort`) + `data_from`) SELECT #{newChartId}, GET_CHART_VIEW_COPY_NAME(#{oldChartId},#{panelId}) as `name`, #{panelId}, @@ -322,8 +315,7 @@ 'private', `is_plugin`, `senior`, - `data_from`, - `custom_sort` + `data_from` FROM chart_view WHERE id = #{oldChartId} @@ -373,8 +365,7 @@ custom_filter, drill_fields, SNAPSHOT, - data_from, - custom_sort) + data_from) SELECT pv_copy.chart_view_id AS id, `name`, title, @@ -401,8 +392,7 @@ custom_filter, drill_fields, SNAPSHOT, - data_from, - custom_sort + data_from FROM ( SELECT panel_id, copy_from_view, @@ -512,8 +502,7 @@ cv.drill_fields = cve.drill_fields, cv.senior = cve.senior, cv.SNAPSHOT = cve.SNAPSHOT, - cv.data_from = cve.data_from, - cv.custom_sort = cve.custom_sort + cv.data_from = cve.data_from where cve.id = cv.id and cv.id in #{viewId} @@ -549,8 +538,7 @@ cv.drill_fields = cve.drill_fields, cv.senior = cve.senior, cv.SNAPSHOT = cve.SNAPSHOT, - cv.data_from = cve.data_from, - cv.custom_sort = cve.custom_sort + cv.data_from = cve.data_from where cve.id = cv.id and cv.id =#{viewId} @@ -584,8 +572,7 @@ cv.drill_fields = cve.drill_fields, cv.senior = cve.senior, cv.SNAPSHOT = cve.SNAPSHOT, - cv.data_from = cve.data_from, - cv.custom_sort = cve.custom_sort + cv.data_from = cve.data_from where cve.id = cv.id and cv.id =#{viewId} diff --git a/backend/src/main/resources/db/migration/V35__1.11.sql b/backend/src/main/resources/db/migration/V35__1.11.sql deleted file mode 100644 index 688d76e57a..0000000000 --- a/backend/src/main/resources/db/migration/V35__1.11.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `chart_view` ADD COLUMN `custom_sort` LONGTEXT COMMENT '自定义排序'; -UPDATE `chart_view` SET `custom_sort` = '[]'; -ALTER TABLE `chart_view_cache` ADD COLUMN `custom_sort` LONGTEXT COMMENT '自定义排序'; -UPDATE `chart_view_cache` SET `custom_sort` = '[]'; diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index b077ed3258..4e21d47738 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1096,7 +1096,7 @@ export default { formatter_decimal_count_error: 'Range 0-10', gauge_threshold_compare_error: 'Range must added', tick_count: 'Tick Split', - custom_sort: 'Custom Sort', + custom_sort: 'Custom', custom_sort_tip: 'Custom sort field first', clean_custom_sort: 'Clean' }, diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 00158e2831..abdd3d7cf2 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1096,7 +1096,7 @@ export default { formatter_decimal_count_error: '請輸入0-10的整數', gauge_threshold_compare_error: '阈值範圍需逐級遞增', tick_count: '刻度間隔數', - custom_sort: '自定義排序', + custom_sort: '自定義', custom_sort_tip: '自定義排序優先級高於字段排序', clean_custom_sort: '清除自定義排序' }, diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 31ab9fa0ed..416948b0af 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1098,7 +1098,7 @@ export default { formatter_decimal_count_error: '请输入0-10的整数', gauge_threshold_compare_error: '阈值范围需逐级递增', tick_count: '刻度间隔数', - custom_sort: '自定义排序', + custom_sort: '自定义', custom_sort_tip: '自定义排序优先级高于字段排序', clean_custom_sort: '清除自定义排序' }, diff --git a/frontend/src/views/chart/chart/bar/bar_antv.js b/frontend/src/views/chart/chart/bar/bar_antv.js index 7e3ebc04ab..d84248628c 100644 --- a/frontend/src/views/chart/chart/bar/bar_antv.js +++ b/frontend/src/views/chart/chart/bar/bar_antv.js @@ -10,7 +10,6 @@ import { getSlider, getAnalyse } from '@/views/chart/chart/common/common_antv' -import { customSort } from '@/views/chart/chart/util' export function baseBarOptionAntV(plot, container, chart, action, isGroup, isStack) { // theme @@ -23,13 +22,7 @@ export function baseBarOptionAntV(plot, container, chart, action, isGroup, isSta const xAxis = getXAxis(chart) const yAxis = getYAxis(chart) // data - let data - const cus = JSON.parse(chart.customSort) - if (cus && cus.length > 0) { - data = customSort(cus, chart.data.datas) - } else { - data = chart.data.datas - } + const data = chart.data.datas // config const slider = getSlider(chart) const analyse = getAnalyse(chart) @@ -129,13 +122,7 @@ export function hBaseBarOptionAntV(plot, container, chart, action, isGroup, isSt const xAxis = getXAxis(chart) const yAxis = getYAxis(chart) // data - let data - const cus = JSON.parse(chart.customSort) - if (cus && cus.length > 0) { - data = customSort(cus, chart.data.datas) - } else { - data = chart.data.datas - } + const data = chart.data.datas // config const slider = getSlider(chart) const analyse = getAnalyse(chart) diff --git a/frontend/src/views/chart/chart/funnel/funnel_antv.js b/frontend/src/views/chart/chart/funnel/funnel_antv.js index da9d875c60..0d940e4a4a 100644 --- a/frontend/src/views/chart/chart/funnel/funnel_antv.js +++ b/frontend/src/views/chart/chart/funnel/funnel_antv.js @@ -1,6 +1,5 @@ import { getLabel, getLegend, getPadding, getTheme, getTooltip } from '@/views/chart/chart/common/common_antv' import { Funnel } from '@antv/g2plot' -import { customSort } from '@/views/chart/chart/util' export function baseFunnelOptionAntV(plot, container, chart, action) { // theme @@ -11,13 +10,7 @@ export function baseFunnelOptionAntV(plot, container, chart, action) { // style const legend = getLegend(chart) // data - let data - const cus = JSON.parse(chart.customSort) - if (cus && cus.length > 0) { - data = customSort(cus, chart.data.datas) - } else { - data = chart.data.datas - } + const data = chart.data.datas // options const options = { theme: theme, diff --git a/frontend/src/views/chart/chart/line/line_antv.js b/frontend/src/views/chart/chart/line/line_antv.js index 5544b34610..eb7d0eacc0 100644 --- a/frontend/src/views/chart/chart/line/line_antv.js +++ b/frontend/src/views/chart/chart/line/line_antv.js @@ -10,7 +10,6 @@ import { getSlider, getAnalyse } from '@/views/chart/chart/common/common_antv' -import { customSort } from '@/views/chart/chart/util' export function baseLineOptionAntV(plot, container, chart, action) { // theme @@ -23,13 +22,7 @@ export function baseLineOptionAntV(plot, container, chart, action) { const xAxis = getXAxis(chart) const yAxis = getYAxis(chart) // data - let data - const cus = JSON.parse(chart.customSort) - if (cus && cus.length > 0) { - data = customSort(cus, chart.data.datas) - } else { - data = chart.data.datas - } + const data = chart.data.datas // config const slider = getSlider(chart) const analyse = getAnalyse(chart) @@ -121,13 +114,7 @@ export function baseAreaOptionAntV(plot, container, chart, action) { const xAxis = getXAxis(chart) const yAxis = getYAxis(chart) // data - let data - const cus = JSON.parse(chart.customSort) - if (cus && cus.length > 0) { - data = customSort(cus, chart.data.datas) - } else { - data = chart.data.datas - } + const data = chart.data.datas // config const slider = getSlider(chart) const analyse = getAnalyse(chart) diff --git a/frontend/src/views/chart/chart/pie/pie_antv.js b/frontend/src/views/chart/chart/pie/pie_antv.js index 99bfbc98fc..d66180b364 100644 --- a/frontend/src/views/chart/chart/pie/pie_antv.js +++ b/frontend/src/views/chart/chart/pie/pie_antv.js @@ -7,7 +7,6 @@ import { } from '@/views/chart/chart/common/common_antv' import { Pie, Rose } from '@antv/g2plot' -import { customSort } from '@/views/chart/chart/util' export function basePieOptionAntV(plot, container, chart, action) { // theme @@ -18,13 +17,7 @@ export function basePieOptionAntV(plot, container, chart, action) { // style const legend = getLegend(chart) // data - let data - const cus = JSON.parse(chart.customSort) - if (cus && cus.length > 0) { - data = customSort(cus, chart.data.datas) - } else { - data = chart.data.datas - } + const data = chart.data.datas // options const options = { theme: theme, @@ -113,13 +106,7 @@ export function basePieRoseOptionAntV(plot, container, chart, action) { // style const legend = getLegend(chart) // data - let data - const cus = JSON.parse(chart.customSort) - if (cus && cus.length > 0) { - data = customSort(cus, chart.data.datas) - } else { - data = chart.data.datas - } + const data = chart.data.datas // options const options = { theme: theme, diff --git a/frontend/src/views/chart/chart/radar/radar_antv.js b/frontend/src/views/chart/chart/radar/radar_antv.js index a83f0b1bcb..a4f25b2ac4 100644 --- a/frontend/src/views/chart/chart/radar/radar_antv.js +++ b/frontend/src/views/chart/chart/radar/radar_antv.js @@ -1,6 +1,5 @@ import { getLabel, getLegend, getPadding, getTheme, getTooltip } from '@/views/chart/chart/common/common_antv' import { Radar } from '@antv/g2plot' -import { customSort } from '@/views/chart/chart/util' export function baseRadarOptionAntV(plot, container, chart, action) { // theme @@ -11,13 +10,7 @@ export function baseRadarOptionAntV(plot, container, chart, action) { // style const legend = getLegend(chart) // data - let data - const cus = JSON.parse(chart.customSort) - if (cus && cus.length > 0) { - data = customSort(cus, chart.data.datas) - } else { - data = chart.data.datas - } + const data = chart.data.datas const xAxis = { tickLine: null, diff --git a/frontend/src/views/chart/chart/scatter/scatter_antv.js b/frontend/src/views/chart/chart/scatter/scatter_antv.js index 259269f450..77fd43d137 100644 --- a/frontend/src/views/chart/chart/scatter/scatter_antv.js +++ b/frontend/src/views/chart/chart/scatter/scatter_antv.js @@ -11,7 +11,6 @@ import { } from '@/views/chart/chart/common/common_antv' import { Scatter } from '@antv/g2plot' -import { customSort } from '@/views/chart/chart/util' export function baseScatterOptionAntV(plot, container, chart, action) { // theme @@ -24,13 +23,7 @@ export function baseScatterOptionAntV(plot, container, chart, action) { const xAxis = getXAxis(chart) const yAxis = getYAxis(chart) // data - let data - const cus = JSON.parse(chart.customSort) - if (cus && cus.length > 0) { - data = customSort(cus, chart.data.datas) - } else { - data = chart.data.datas - } + const data = chart.data.datas // config const slider = getSlider(chart) const analyse = getAnalyse(chart) diff --git a/frontend/src/views/chart/chart/waterfall/waterfall.js b/frontend/src/views/chart/chart/waterfall/waterfall.js index 1da7a0280f..447120b38e 100644 --- a/frontend/src/views/chart/chart/waterfall/waterfall.js +++ b/frontend/src/views/chart/chart/waterfall/waterfall.js @@ -1,6 +1,5 @@ import { getLabel, - getLegend, getPadding, getTheme, getTooltip, @@ -8,7 +7,6 @@ import { getYAxis } from '@/views/chart/chart/common/common_antv' import { Waterfall } from '@antv/g2plot' -import { customSort } from '@/views/chart/chart/util' export function baseWaterfallOptionAntV(plot, container, chart, action) { // theme @@ -28,13 +26,7 @@ export function baseWaterfallOptionAntV(plot, container, chart, action) { delete yAxis.maxLimit } // data - let data - const cus = JSON.parse(chart.customSort) - if (cus && cus.length > 0) { - data = customSort(cus, chart.data.datas) - } else { - data = chart.data.datas - } + const data = chart.data.datas // total const total = { label: '合计', diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 2dcc9bf82b..597fd9909f 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -347,15 +347,6 @@ {{ $t('chart.dimension_or_quota') }} - - - {{ $t('chart.confirm') }} - - - - - - - @@ -1024,13 +995,11 @@ import Threshold from '@/views/chart/components/senior/Threshold' import LabelNormalText from '@/views/chart/components/normal/LabelNormalText' import { pluginTypes } from '@/api/chart/chart' import ValueFormatterEdit from '@/views/chart/components/value-formatter/ValueFormatterEdit' -import CustomSortEdit from '@/views/chart/components/compare/CustomSortEdit' import ChartStyle from '@/views/chart/view/ChartStyle' export default { name: 'ChartEdit', components: { ChartStyle, - CustomSortEdit, ValueFormatterEdit, LabelNormalText, Threshold, @@ -1111,8 +1080,7 @@ export default { }, customFilter: [], render: 'antv', - isPlugin: false, - customSort: [] + isPlugin: false }, moveId: -1, chart: { @@ -1163,9 +1131,7 @@ export default { preChartId: '', pluginRenderOptions: [], showValueFormatter: false, - valueFormatterItem: {}, - showCustomSort: false, - customSortList: [] + valueFormatterItem: {} } }, @@ -1258,7 +1224,6 @@ export default { this.resetDrill() this.initFromPanel() this.getChart(this.param.id) - this.getData(this.param.id) }, bindPluginEvent() { bus.$on('show-dimension-edit-filter', this.showDimensionEditFilter) @@ -1525,7 +1490,6 @@ export default { view.drillFields = JSON.stringify(view.drillFields) view.extBubble = JSON.stringify(view.extBubble) view.senior = JSON.stringify(view.senior) - view.customSort = JSON.stringify(view.customSort) delete view.data return view }, @@ -1595,7 +1559,6 @@ export default { view.customStyle = JSON.stringify(this.view.customStyle) view.customFilter = JSON.stringify(this.view.customFilter) view.senior = JSON.stringify(this.view.senior) - view.customSort = JSON.stringify(this.view.customSort) view.title = this.view.title view.stylePriority = this.view.stylePriority // view.data = this.data @@ -1661,7 +1624,6 @@ export default { this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {} this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {} this.view.senior = this.view.senior ? JSON.parse(this.view.senior) : {} - this.view.customSort = this.view.customSort ? JSON.parse(this.view.customSort) : [] // 将视图传入echart组件 this.chart = response.data this.data = response.data.data @@ -1713,7 +1675,6 @@ export default { this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {} this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {} this.view.senior = this.view.senior ? JSON.parse(this.view.senior) : {} - this.view.customSort = this.view.customSort ? JSON.parse(this.view.customSort) : [] // 将视图传入echart组件 this.chart = response.data @@ -2113,7 +2074,7 @@ export default { if ((this.view.type === 'map' || this.view.type === 'word-cloud' || this.view.type === 'label') && this.view.xaxis.length > 1) { this.view.xaxis = [this.view.xaxis[0]] } - this.resetCustomSort() + this.calcData(true) }, addXaxisExt(e) { if (this.view.type !== 'table-info') { @@ -2236,12 +2197,12 @@ export default { if (this.chart.type === 'map' || this.chart.type === 'buddle-map') { if (this.sendToChildren(param)) { this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList }) - this.getData(this.param.id) + // this.getData(this.param.id) this.calcData(true, 'chart', false, false) } } else { this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList }) - this.getData(this.param.id) + // this.getData(this.param.id) this.calcData(true, 'chart', false, false) } } else if (this.view.drillFields.length > 0) { @@ -2276,7 +2237,7 @@ export default { this.backToParent(index, length) } - this.getData(this.param.id) + // this.getData(this.param.id) this.calcData(true, 'chart', false, false) }, // 回到父级地图 @@ -2359,7 +2320,7 @@ export default { resetViewCacheCallBack(_this.param.id, _this.panelInfo.id, function(rsp) { _this.changeEditStatus(false) _this.getChart(_this.param.id, 'panel') - _this.getData(_this.param.id) + // _this.getData(_this.param.id) bus.$emit('view-in-cache', { type: 'propChange', viewId: _this.param.id }) }) }, @@ -2424,27 +2385,6 @@ export default { } this.calcData(true) this.closeValueFormatter() - }, - - customSort() { - this.showCustomSort = true - }, - customSortChange(val) { - this.customSortList = val - }, - closeCustomSort() { - this.showCustomSort = false - }, - saveCustomSort() { - this.view.customSort = JSON.parse(JSON.stringify(this.customSortList)) - this.calcData(true) - this.closeCustomSort() - }, - resetCustomSort() { - this.chart.customSort = [] - this.view.customSort = [] - this.calcData(true) - this.closeCustomSort() } } }