forked from github/dataease
revert: rollback
This commit is contained in:
parent
2e0d919066
commit
6b12ba6a20
@ -49,8 +49,7 @@
|
|||||||
drill_fields,
|
drill_fields,
|
||||||
senior,
|
senior,
|
||||||
SNAPSHOT,
|
SNAPSHOT,
|
||||||
data_from,
|
data_from
|
||||||
custom_sort
|
|
||||||
) SELECT
|
) SELECT
|
||||||
id,
|
id,
|
||||||
`name`,
|
`name`,
|
||||||
@ -79,8 +78,7 @@
|
|||||||
drill_fields,
|
drill_fields,
|
||||||
senior,
|
senior,
|
||||||
SNAPSHOT,
|
SNAPSHOT,
|
||||||
data_from,
|
data_from from chart_view
|
||||||
custom_sort from chart_view
|
|
||||||
WHERE
|
WHERE
|
||||||
chart_view.id = #{id}
|
chart_view.id = #{id}
|
||||||
</insert>
|
</insert>
|
||||||
@ -114,8 +112,7 @@
|
|||||||
drill_fields,
|
drill_fields,
|
||||||
senior,
|
senior,
|
||||||
SNAPSHOT,
|
SNAPSHOT,
|
||||||
data_from,
|
data_from
|
||||||
custom_sort
|
|
||||||
) SELECT
|
) SELECT
|
||||||
#{newViewId} as id,
|
#{newViewId} as id,
|
||||||
`name`,
|
`name`,
|
||||||
@ -144,8 +141,7 @@
|
|||||||
drill_fields,
|
drill_fields,
|
||||||
senior,
|
senior,
|
||||||
SNAPSHOT,
|
SNAPSHOT,
|
||||||
data_from,
|
data_from from chart_view_cache
|
||||||
custom_sort from chart_view_cache
|
|
||||||
WHERE
|
WHERE
|
||||||
chart_view_cache.id = #{sourceViewId}
|
chart_view_cache.id = #{sourceViewId}
|
||||||
</insert>
|
</insert>
|
||||||
@ -179,8 +175,7 @@
|
|||||||
drill_fields,
|
drill_fields,
|
||||||
senior,
|
senior,
|
||||||
SNAPSHOT,
|
SNAPSHOT,
|
||||||
data_from,
|
data_from
|
||||||
custom_sort
|
|
||||||
) SELECT
|
) SELECT
|
||||||
id,
|
id,
|
||||||
`name`,
|
`name`,
|
||||||
@ -209,8 +204,7 @@
|
|||||||
drill_fields,
|
drill_fields,
|
||||||
senior,
|
senior,
|
||||||
SNAPSHOT,
|
SNAPSHOT,
|
||||||
data_from,
|
data_from from chart_view
|
||||||
custom_sort from chart_view
|
|
||||||
WHERE
|
WHERE
|
||||||
chart_view.scene_id = #{panelId}
|
chart_view.scene_id = #{panelId}
|
||||||
</insert>
|
</insert>
|
||||||
@ -293,8 +287,7 @@
|
|||||||
`chart_type`,
|
`chart_type`,
|
||||||
`is_plugin`,
|
`is_plugin`,
|
||||||
`senior`,
|
`senior`,
|
||||||
`data_from`,
|
`data_from`)
|
||||||
`custom_sort`)
|
|
||||||
SELECT #{newChartId},
|
SELECT #{newChartId},
|
||||||
GET_CHART_VIEW_COPY_NAME(#{oldChartId},#{panelId}) as `name`,
|
GET_CHART_VIEW_COPY_NAME(#{oldChartId},#{panelId}) as `name`,
|
||||||
#{panelId},
|
#{panelId},
|
||||||
@ -322,8 +315,7 @@
|
|||||||
'private',
|
'private',
|
||||||
`is_plugin`,
|
`is_plugin`,
|
||||||
`senior`,
|
`senior`,
|
||||||
`data_from`,
|
`data_from`
|
||||||
`custom_sort`
|
|
||||||
FROM chart_view
|
FROM chart_view
|
||||||
WHERE id = #{oldChartId}
|
WHERE id = #{oldChartId}
|
||||||
</insert>
|
</insert>
|
||||||
@ -373,8 +365,7 @@
|
|||||||
custom_filter,
|
custom_filter,
|
||||||
drill_fields,
|
drill_fields,
|
||||||
SNAPSHOT,
|
SNAPSHOT,
|
||||||
data_from,
|
data_from)
|
||||||
custom_sort)
|
|
||||||
SELECT pv_copy.chart_view_id AS id,
|
SELECT pv_copy.chart_view_id AS id,
|
||||||
`name`,
|
`name`,
|
||||||
title,
|
title,
|
||||||
@ -401,8 +392,7 @@
|
|||||||
custom_filter,
|
custom_filter,
|
||||||
drill_fields,
|
drill_fields,
|
||||||
SNAPSHOT,
|
SNAPSHOT,
|
||||||
data_from,
|
data_from
|
||||||
custom_sort
|
|
||||||
FROM (
|
FROM (
|
||||||
SELECT panel_id,
|
SELECT panel_id,
|
||||||
copy_from_view,
|
copy_from_view,
|
||||||
@ -512,8 +502,7 @@
|
|||||||
cv.drill_fields = cve.drill_fields,
|
cv.drill_fields = cve.drill_fields,
|
||||||
cv.senior = cve.senior,
|
cv.senior = cve.senior,
|
||||||
cv.SNAPSHOT = cve.SNAPSHOT,
|
cv.SNAPSHOT = cve.SNAPSHOT,
|
||||||
cv.data_from = cve.data_from,
|
cv.data_from = cve.data_from
|
||||||
cv.custom_sort = cve.custom_sort
|
|
||||||
where cve.id = cv.id and cv.id in
|
where cve.id = cv.id and cv.id in
|
||||||
<foreach collection="viewIds" item="viewId" open='(' separator=',' close=')'>
|
<foreach collection="viewIds" item="viewId" open='(' separator=',' close=')'>
|
||||||
#{viewId}
|
#{viewId}
|
||||||
@ -549,8 +538,7 @@
|
|||||||
cv.drill_fields = cve.drill_fields,
|
cv.drill_fields = cve.drill_fields,
|
||||||
cv.senior = cve.senior,
|
cv.senior = cve.senior,
|
||||||
cv.SNAPSHOT = cve.SNAPSHOT,
|
cv.SNAPSHOT = cve.SNAPSHOT,
|
||||||
cv.data_from = cve.data_from,
|
cv.data_from = cve.data_from
|
||||||
cv.custom_sort = cve.custom_sort
|
|
||||||
where cve.id = cv.id and cv.id =#{viewId}
|
where cve.id = cv.id and cv.id =#{viewId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
@ -584,8 +572,7 @@
|
|||||||
cv.drill_fields = cve.drill_fields,
|
cv.drill_fields = cve.drill_fields,
|
||||||
cv.senior = cve.senior,
|
cv.senior = cve.senior,
|
||||||
cv.SNAPSHOT = cve.SNAPSHOT,
|
cv.SNAPSHOT = cve.SNAPSHOT,
|
||||||
cv.data_from = cve.data_from,
|
cv.data_from = cve.data_from
|
||||||
cv.custom_sort = cve.custom_sort
|
|
||||||
where cve.id = cv.id and cv.id =#{viewId}
|
where cve.id = cv.id and cv.id =#{viewId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
@ -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` = '[]';
|
|
@ -1096,7 +1096,7 @@ export default {
|
|||||||
formatter_decimal_count_error: 'Range 0-10',
|
formatter_decimal_count_error: 'Range 0-10',
|
||||||
gauge_threshold_compare_error: 'Range must added',
|
gauge_threshold_compare_error: 'Range must added',
|
||||||
tick_count: 'Tick Split',
|
tick_count: 'Tick Split',
|
||||||
custom_sort: 'Custom Sort',
|
custom_sort: 'Custom',
|
||||||
custom_sort_tip: 'Custom sort field first',
|
custom_sort_tip: 'Custom sort field first',
|
||||||
clean_custom_sort: 'Clean'
|
clean_custom_sort: 'Clean'
|
||||||
},
|
},
|
||||||
|
@ -1096,7 +1096,7 @@ export default {
|
|||||||
formatter_decimal_count_error: '請輸入0-10的整數',
|
formatter_decimal_count_error: '請輸入0-10的整數',
|
||||||
gauge_threshold_compare_error: '阈值範圍需逐級遞增',
|
gauge_threshold_compare_error: '阈值範圍需逐級遞增',
|
||||||
tick_count: '刻度間隔數',
|
tick_count: '刻度間隔數',
|
||||||
custom_sort: '自定義排序',
|
custom_sort: '自定義',
|
||||||
custom_sort_tip: '自定義排序優先級高於字段排序',
|
custom_sort_tip: '自定義排序優先級高於字段排序',
|
||||||
clean_custom_sort: '清除自定義排序'
|
clean_custom_sort: '清除自定義排序'
|
||||||
},
|
},
|
||||||
|
@ -1098,7 +1098,7 @@ export default {
|
|||||||
formatter_decimal_count_error: '请输入0-10的整数',
|
formatter_decimal_count_error: '请输入0-10的整数',
|
||||||
gauge_threshold_compare_error: '阈值范围需逐级递增',
|
gauge_threshold_compare_error: '阈值范围需逐级递增',
|
||||||
tick_count: '刻度间隔数',
|
tick_count: '刻度间隔数',
|
||||||
custom_sort: '自定义排序',
|
custom_sort: '自定义',
|
||||||
custom_sort_tip: '自定义排序优先级高于字段排序',
|
custom_sort_tip: '自定义排序优先级高于字段排序',
|
||||||
clean_custom_sort: '清除自定义排序'
|
clean_custom_sort: '清除自定义排序'
|
||||||
},
|
},
|
||||||
|
@ -10,7 +10,6 @@ import {
|
|||||||
getSlider,
|
getSlider,
|
||||||
getAnalyse
|
getAnalyse
|
||||||
} from '@/views/chart/chart/common/common_antv'
|
} from '@/views/chart/chart/common/common_antv'
|
||||||
import { customSort } from '@/views/chart/chart/util'
|
|
||||||
|
|
||||||
export function baseBarOptionAntV(plot, container, chart, action, isGroup, isStack) {
|
export function baseBarOptionAntV(plot, container, chart, action, isGroup, isStack) {
|
||||||
// theme
|
// theme
|
||||||
@ -23,13 +22,7 @@ export function baseBarOptionAntV(plot, container, chart, action, isGroup, isSta
|
|||||||
const xAxis = getXAxis(chart)
|
const xAxis = getXAxis(chart)
|
||||||
const yAxis = getYAxis(chart)
|
const yAxis = getYAxis(chart)
|
||||||
// data
|
// data
|
||||||
let data
|
const data = chart.data.datas
|
||||||
const cus = JSON.parse(chart.customSort)
|
|
||||||
if (cus && cus.length > 0) {
|
|
||||||
data = customSort(cus, chart.data.datas)
|
|
||||||
} else {
|
|
||||||
data = chart.data.datas
|
|
||||||
}
|
|
||||||
// config
|
// config
|
||||||
const slider = getSlider(chart)
|
const slider = getSlider(chart)
|
||||||
const analyse = getAnalyse(chart)
|
const analyse = getAnalyse(chart)
|
||||||
@ -129,13 +122,7 @@ export function hBaseBarOptionAntV(plot, container, chart, action, isGroup, isSt
|
|||||||
const xAxis = getXAxis(chart)
|
const xAxis = getXAxis(chart)
|
||||||
const yAxis = getYAxis(chart)
|
const yAxis = getYAxis(chart)
|
||||||
// data
|
// data
|
||||||
let data
|
const data = chart.data.datas
|
||||||
const cus = JSON.parse(chart.customSort)
|
|
||||||
if (cus && cus.length > 0) {
|
|
||||||
data = customSort(cus, chart.data.datas)
|
|
||||||
} else {
|
|
||||||
data = chart.data.datas
|
|
||||||
}
|
|
||||||
// config
|
// config
|
||||||
const slider = getSlider(chart)
|
const slider = getSlider(chart)
|
||||||
const analyse = getAnalyse(chart)
|
const analyse = getAnalyse(chart)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { getLabel, getLegend, getPadding, getTheme, getTooltip } from '@/views/chart/chart/common/common_antv'
|
import { getLabel, getLegend, getPadding, getTheme, getTooltip } from '@/views/chart/chart/common/common_antv'
|
||||||
import { Funnel } from '@antv/g2plot'
|
import { Funnel } from '@antv/g2plot'
|
||||||
import { customSort } from '@/views/chart/chart/util'
|
|
||||||
|
|
||||||
export function baseFunnelOptionAntV(plot, container, chart, action) {
|
export function baseFunnelOptionAntV(plot, container, chart, action) {
|
||||||
// theme
|
// theme
|
||||||
@ -11,13 +10,7 @@ export function baseFunnelOptionAntV(plot, container, chart, action) {
|
|||||||
// style
|
// style
|
||||||
const legend = getLegend(chart)
|
const legend = getLegend(chart)
|
||||||
// data
|
// data
|
||||||
let data
|
const data = chart.data.datas
|
||||||
const cus = JSON.parse(chart.customSort)
|
|
||||||
if (cus && cus.length > 0) {
|
|
||||||
data = customSort(cus, chart.data.datas)
|
|
||||||
} else {
|
|
||||||
data = chart.data.datas
|
|
||||||
}
|
|
||||||
// options
|
// options
|
||||||
const options = {
|
const options = {
|
||||||
theme: theme,
|
theme: theme,
|
||||||
|
@ -10,7 +10,6 @@ import {
|
|||||||
getSlider,
|
getSlider,
|
||||||
getAnalyse
|
getAnalyse
|
||||||
} from '@/views/chart/chart/common/common_antv'
|
} from '@/views/chart/chart/common/common_antv'
|
||||||
import { customSort } from '@/views/chart/chart/util'
|
|
||||||
|
|
||||||
export function baseLineOptionAntV(plot, container, chart, action) {
|
export function baseLineOptionAntV(plot, container, chart, action) {
|
||||||
// theme
|
// theme
|
||||||
@ -23,13 +22,7 @@ export function baseLineOptionAntV(plot, container, chart, action) {
|
|||||||
const xAxis = getXAxis(chart)
|
const xAxis = getXAxis(chart)
|
||||||
const yAxis = getYAxis(chart)
|
const yAxis = getYAxis(chart)
|
||||||
// data
|
// data
|
||||||
let data
|
const data = chart.data.datas
|
||||||
const cus = JSON.parse(chart.customSort)
|
|
||||||
if (cus && cus.length > 0) {
|
|
||||||
data = customSort(cus, chart.data.datas)
|
|
||||||
} else {
|
|
||||||
data = chart.data.datas
|
|
||||||
}
|
|
||||||
// config
|
// config
|
||||||
const slider = getSlider(chart)
|
const slider = getSlider(chart)
|
||||||
const analyse = getAnalyse(chart)
|
const analyse = getAnalyse(chart)
|
||||||
@ -121,13 +114,7 @@ export function baseAreaOptionAntV(plot, container, chart, action) {
|
|||||||
const xAxis = getXAxis(chart)
|
const xAxis = getXAxis(chart)
|
||||||
const yAxis = getYAxis(chart)
|
const yAxis = getYAxis(chart)
|
||||||
// data
|
// data
|
||||||
let data
|
const data = chart.data.datas
|
||||||
const cus = JSON.parse(chart.customSort)
|
|
||||||
if (cus && cus.length > 0) {
|
|
||||||
data = customSort(cus, chart.data.datas)
|
|
||||||
} else {
|
|
||||||
data = chart.data.datas
|
|
||||||
}
|
|
||||||
// config
|
// config
|
||||||
const slider = getSlider(chart)
|
const slider = getSlider(chart)
|
||||||
const analyse = getAnalyse(chart)
|
const analyse = getAnalyse(chart)
|
||||||
|
@ -7,7 +7,6 @@ import {
|
|||||||
} from '@/views/chart/chart/common/common_antv'
|
} from '@/views/chart/chart/common/common_antv'
|
||||||
|
|
||||||
import { Pie, Rose } from '@antv/g2plot'
|
import { Pie, Rose } from '@antv/g2plot'
|
||||||
import { customSort } from '@/views/chart/chart/util'
|
|
||||||
|
|
||||||
export function basePieOptionAntV(plot, container, chart, action) {
|
export function basePieOptionAntV(plot, container, chart, action) {
|
||||||
// theme
|
// theme
|
||||||
@ -18,13 +17,7 @@ export function basePieOptionAntV(plot, container, chart, action) {
|
|||||||
// style
|
// style
|
||||||
const legend = getLegend(chart)
|
const legend = getLegend(chart)
|
||||||
// data
|
// data
|
||||||
let data
|
const data = chart.data.datas
|
||||||
const cus = JSON.parse(chart.customSort)
|
|
||||||
if (cus && cus.length > 0) {
|
|
||||||
data = customSort(cus, chart.data.datas)
|
|
||||||
} else {
|
|
||||||
data = chart.data.datas
|
|
||||||
}
|
|
||||||
// options
|
// options
|
||||||
const options = {
|
const options = {
|
||||||
theme: theme,
|
theme: theme,
|
||||||
@ -113,13 +106,7 @@ export function basePieRoseOptionAntV(plot, container, chart, action) {
|
|||||||
// style
|
// style
|
||||||
const legend = getLegend(chart)
|
const legend = getLegend(chart)
|
||||||
// data
|
// data
|
||||||
let data
|
const data = chart.data.datas
|
||||||
const cus = JSON.parse(chart.customSort)
|
|
||||||
if (cus && cus.length > 0) {
|
|
||||||
data = customSort(cus, chart.data.datas)
|
|
||||||
} else {
|
|
||||||
data = chart.data.datas
|
|
||||||
}
|
|
||||||
// options
|
// options
|
||||||
const options = {
|
const options = {
|
||||||
theme: theme,
|
theme: theme,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { getLabel, getLegend, getPadding, getTheme, getTooltip } from '@/views/chart/chart/common/common_antv'
|
import { getLabel, getLegend, getPadding, getTheme, getTooltip } from '@/views/chart/chart/common/common_antv'
|
||||||
import { Radar } from '@antv/g2plot'
|
import { Radar } from '@antv/g2plot'
|
||||||
import { customSort } from '@/views/chart/chart/util'
|
|
||||||
|
|
||||||
export function baseRadarOptionAntV(plot, container, chart, action) {
|
export function baseRadarOptionAntV(plot, container, chart, action) {
|
||||||
// theme
|
// theme
|
||||||
@ -11,13 +10,7 @@ export function baseRadarOptionAntV(plot, container, chart, action) {
|
|||||||
// style
|
// style
|
||||||
const legend = getLegend(chart)
|
const legend = getLegend(chart)
|
||||||
// data
|
// data
|
||||||
let data
|
const data = chart.data.datas
|
||||||
const cus = JSON.parse(chart.customSort)
|
|
||||||
if (cus && cus.length > 0) {
|
|
||||||
data = customSort(cus, chart.data.datas)
|
|
||||||
} else {
|
|
||||||
data = chart.data.datas
|
|
||||||
}
|
|
||||||
|
|
||||||
const xAxis = {
|
const xAxis = {
|
||||||
tickLine: null,
|
tickLine: null,
|
||||||
|
@ -11,7 +11,6 @@ import {
|
|||||||
} from '@/views/chart/chart/common/common_antv'
|
} from '@/views/chart/chart/common/common_antv'
|
||||||
|
|
||||||
import { Scatter } from '@antv/g2plot'
|
import { Scatter } from '@antv/g2plot'
|
||||||
import { customSort } from '@/views/chart/chart/util'
|
|
||||||
|
|
||||||
export function baseScatterOptionAntV(plot, container, chart, action) {
|
export function baseScatterOptionAntV(plot, container, chart, action) {
|
||||||
// theme
|
// theme
|
||||||
@ -24,13 +23,7 @@ export function baseScatterOptionAntV(plot, container, chart, action) {
|
|||||||
const xAxis = getXAxis(chart)
|
const xAxis = getXAxis(chart)
|
||||||
const yAxis = getYAxis(chart)
|
const yAxis = getYAxis(chart)
|
||||||
// data
|
// data
|
||||||
let data
|
const data = chart.data.datas
|
||||||
const cus = JSON.parse(chart.customSort)
|
|
||||||
if (cus && cus.length > 0) {
|
|
||||||
data = customSort(cus, chart.data.datas)
|
|
||||||
} else {
|
|
||||||
data = chart.data.datas
|
|
||||||
}
|
|
||||||
// config
|
// config
|
||||||
const slider = getSlider(chart)
|
const slider = getSlider(chart)
|
||||||
const analyse = getAnalyse(chart)
|
const analyse = getAnalyse(chart)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
getLabel,
|
getLabel,
|
||||||
getLegend,
|
|
||||||
getPadding,
|
getPadding,
|
||||||
getTheme,
|
getTheme,
|
||||||
getTooltip,
|
getTooltip,
|
||||||
@ -8,7 +7,6 @@ import {
|
|||||||
getYAxis
|
getYAxis
|
||||||
} from '@/views/chart/chart/common/common_antv'
|
} from '@/views/chart/chart/common/common_antv'
|
||||||
import { Waterfall } from '@antv/g2plot'
|
import { Waterfall } from '@antv/g2plot'
|
||||||
import { customSort } from '@/views/chart/chart/util'
|
|
||||||
|
|
||||||
export function baseWaterfallOptionAntV(plot, container, chart, action) {
|
export function baseWaterfallOptionAntV(plot, container, chart, action) {
|
||||||
// theme
|
// theme
|
||||||
@ -28,13 +26,7 @@ export function baseWaterfallOptionAntV(plot, container, chart, action) {
|
|||||||
delete yAxis.maxLimit
|
delete yAxis.maxLimit
|
||||||
}
|
}
|
||||||
// data
|
// data
|
||||||
let data
|
const data = chart.data.datas
|
||||||
const cus = JSON.parse(chart.customSort)
|
|
||||||
if (cus && cus.length > 0) {
|
|
||||||
data = customSort(cus, chart.data.datas)
|
|
||||||
} else {
|
|
||||||
data = chart.data.datas
|
|
||||||
}
|
|
||||||
// total
|
// total
|
||||||
const total = {
|
const total = {
|
||||||
label: '合计',
|
label: '合计',
|
||||||
|
@ -347,15 +347,6 @@
|
|||||||
<span
|
<span
|
||||||
v-else-if="view.type && view.type === 'table-info'"
|
v-else-if="view.type && view.type === 'table-info'"
|
||||||
>{{ $t('chart.dimension_or_quota') }}</span>
|
>{{ $t('chart.dimension_or_quota') }}</span>
|
||||||
|
|
||||||
<!--自定义排序-->
|
|
||||||
<i
|
|
||||||
v-if="false && view.render === 'antv' && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('funnel') || view.type.includes('pie') || view.type.includes('radar') || view.type.includes('scatter') || view.type.includes('waterfall'))"
|
|
||||||
style="margin-left: 4px;cursor: pointer;"
|
|
||||||
class="el-icon-sort"
|
|
||||||
:title="$t('chart.custom_sort')"
|
|
||||||
@click="customSort"
|
|
||||||
/>
|
|
||||||
</span>
|
</span>
|
||||||
<draggable
|
<draggable
|
||||||
v-model="view.xaxis"
|
v-model="view.xaxis"
|
||||||
@ -364,8 +355,7 @@
|
|||||||
:move="onMove"
|
:move="onMove"
|
||||||
class="drag-block-style"
|
class="drag-block-style"
|
||||||
@add="addXaxis"
|
@add="addXaxis"
|
||||||
@update="resetCustomSort"
|
@update="calcData(true)"
|
||||||
@remove="resetCustomSort"
|
|
||||||
>
|
>
|
||||||
<transition-group class="draggable-group">
|
<transition-group class="draggable-group">
|
||||||
<dimension-item
|
<dimension-item
|
||||||
@ -944,25 +934,6 @@
|
|||||||
<el-button type="primary" size="mini" @click="saveValueFormatter">{{ $t('chart.confirm') }}</el-button>
|
<el-button type="primary" size="mini" @click="saveValueFormatter">{{ $t('chart.confirm') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!--自定义排序-->
|
|
||||||
<el-dialog
|
|
||||||
v-if="showCustomSort"
|
|
||||||
v-dialogDrag
|
|
||||||
:title="$t('chart.custom_sort')"
|
|
||||||
:visible="showCustomSort"
|
|
||||||
:show-close="false"
|
|
||||||
width="500px"
|
|
||||||
class="dialog-css"
|
|
||||||
>
|
|
||||||
<!-- <value-formatter-edit :formatter-item="valueFormatterItem" :chart="chart" />-->
|
|
||||||
<custom-sort-edit :chart="chart" @onSortChange="customSortChange" />
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button size="mini" @click="closeCustomSort">{{ $t('chart.cancel') }}</el-button>
|
|
||||||
<el-button size="mini" @click="resetCustomSort">{{ $t('chart.clean_custom_sort') }}</el-button>
|
|
||||||
<el-button type="primary" size="mini" @click="saveCustomSort">{{ $t('chart.confirm') }}</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -1024,13 +995,11 @@ import Threshold from '@/views/chart/components/senior/Threshold'
|
|||||||
import LabelNormalText from '@/views/chart/components/normal/LabelNormalText'
|
import LabelNormalText from '@/views/chart/components/normal/LabelNormalText'
|
||||||
import { pluginTypes } from '@/api/chart/chart'
|
import { pluginTypes } from '@/api/chart/chart'
|
||||||
import ValueFormatterEdit from '@/views/chart/components/value-formatter/ValueFormatterEdit'
|
import ValueFormatterEdit from '@/views/chart/components/value-formatter/ValueFormatterEdit'
|
||||||
import CustomSortEdit from '@/views/chart/components/compare/CustomSortEdit'
|
|
||||||
import ChartStyle from '@/views/chart/view/ChartStyle'
|
import ChartStyle from '@/views/chart/view/ChartStyle'
|
||||||
export default {
|
export default {
|
||||||
name: 'ChartEdit',
|
name: 'ChartEdit',
|
||||||
components: {
|
components: {
|
||||||
ChartStyle,
|
ChartStyle,
|
||||||
CustomSortEdit,
|
|
||||||
ValueFormatterEdit,
|
ValueFormatterEdit,
|
||||||
LabelNormalText,
|
LabelNormalText,
|
||||||
Threshold,
|
Threshold,
|
||||||
@ -1111,8 +1080,7 @@ export default {
|
|||||||
},
|
},
|
||||||
customFilter: [],
|
customFilter: [],
|
||||||
render: 'antv',
|
render: 'antv',
|
||||||
isPlugin: false,
|
isPlugin: false
|
||||||
customSort: []
|
|
||||||
},
|
},
|
||||||
moveId: -1,
|
moveId: -1,
|
||||||
chart: {
|
chart: {
|
||||||
@ -1163,9 +1131,7 @@ export default {
|
|||||||
preChartId: '',
|
preChartId: '',
|
||||||
pluginRenderOptions: [],
|
pluginRenderOptions: [],
|
||||||
showValueFormatter: false,
|
showValueFormatter: false,
|
||||||
valueFormatterItem: {},
|
valueFormatterItem: {}
|
||||||
showCustomSort: false,
|
|
||||||
customSortList: []
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1258,7 +1224,6 @@ export default {
|
|||||||
this.resetDrill()
|
this.resetDrill()
|
||||||
this.initFromPanel()
|
this.initFromPanel()
|
||||||
this.getChart(this.param.id)
|
this.getChart(this.param.id)
|
||||||
this.getData(this.param.id)
|
|
||||||
},
|
},
|
||||||
bindPluginEvent() {
|
bindPluginEvent() {
|
||||||
bus.$on('show-dimension-edit-filter', this.showDimensionEditFilter)
|
bus.$on('show-dimension-edit-filter', this.showDimensionEditFilter)
|
||||||
@ -1525,7 +1490,6 @@ export default {
|
|||||||
view.drillFields = JSON.stringify(view.drillFields)
|
view.drillFields = JSON.stringify(view.drillFields)
|
||||||
view.extBubble = JSON.stringify(view.extBubble)
|
view.extBubble = JSON.stringify(view.extBubble)
|
||||||
view.senior = JSON.stringify(view.senior)
|
view.senior = JSON.stringify(view.senior)
|
||||||
view.customSort = JSON.stringify(view.customSort)
|
|
||||||
delete view.data
|
delete view.data
|
||||||
return view
|
return view
|
||||||
},
|
},
|
||||||
@ -1595,7 +1559,6 @@ export default {
|
|||||||
view.customStyle = JSON.stringify(this.view.customStyle)
|
view.customStyle = JSON.stringify(this.view.customStyle)
|
||||||
view.customFilter = JSON.stringify(this.view.customFilter)
|
view.customFilter = JSON.stringify(this.view.customFilter)
|
||||||
view.senior = JSON.stringify(this.view.senior)
|
view.senior = JSON.stringify(this.view.senior)
|
||||||
view.customSort = JSON.stringify(this.view.customSort)
|
|
||||||
view.title = this.view.title
|
view.title = this.view.title
|
||||||
view.stylePriority = this.view.stylePriority
|
view.stylePriority = this.view.stylePriority
|
||||||
// view.data = this.data
|
// view.data = this.data
|
||||||
@ -1661,7 +1624,6 @@ export default {
|
|||||||
this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {}
|
this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {}
|
||||||
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {}
|
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {}
|
||||||
this.view.senior = this.view.senior ? JSON.parse(this.view.senior) : {}
|
this.view.senior = this.view.senior ? JSON.parse(this.view.senior) : {}
|
||||||
this.view.customSort = this.view.customSort ? JSON.parse(this.view.customSort) : []
|
|
||||||
// 将视图传入echart组件
|
// 将视图传入echart组件
|
||||||
this.chart = response.data
|
this.chart = response.data
|
||||||
this.data = response.data.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.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {}
|
||||||
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {}
|
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {}
|
||||||
this.view.senior = this.view.senior ? JSON.parse(this.view.senior) : {}
|
this.view.senior = this.view.senior ? JSON.parse(this.view.senior) : {}
|
||||||
this.view.customSort = this.view.customSort ? JSON.parse(this.view.customSort) : []
|
|
||||||
|
|
||||||
// 将视图传入echart组件
|
// 将视图传入echart组件
|
||||||
this.chart = response.data
|
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) {
|
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.view.xaxis = [this.view.xaxis[0]]
|
||||||
}
|
}
|
||||||
this.resetCustomSort()
|
this.calcData(true)
|
||||||
},
|
},
|
||||||
addXaxisExt(e) {
|
addXaxisExt(e) {
|
||||||
if (this.view.type !== 'table-info') {
|
if (this.view.type !== 'table-info') {
|
||||||
@ -2236,12 +2197,12 @@ export default {
|
|||||||
if (this.chart.type === 'map' || this.chart.type === 'buddle-map') {
|
if (this.chart.type === 'map' || this.chart.type === 'buddle-map') {
|
||||||
if (this.sendToChildren(param)) {
|
if (this.sendToChildren(param)) {
|
||||||
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList })
|
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList })
|
||||||
this.getData(this.param.id)
|
// this.getData(this.param.id)
|
||||||
this.calcData(true, 'chart', false, false)
|
this.calcData(true, 'chart', false, false)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList })
|
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList })
|
||||||
this.getData(this.param.id)
|
// this.getData(this.param.id)
|
||||||
this.calcData(true, 'chart', false, false)
|
this.calcData(true, 'chart', false, false)
|
||||||
}
|
}
|
||||||
} else if (this.view.drillFields.length > 0) {
|
} else if (this.view.drillFields.length > 0) {
|
||||||
@ -2276,7 +2237,7 @@ export default {
|
|||||||
this.backToParent(index, length)
|
this.backToParent(index, length)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getData(this.param.id)
|
// this.getData(this.param.id)
|
||||||
this.calcData(true, 'chart', false, false)
|
this.calcData(true, 'chart', false, false)
|
||||||
},
|
},
|
||||||
// 回到父级地图
|
// 回到父级地图
|
||||||
@ -2359,7 +2320,7 @@ export default {
|
|||||||
resetViewCacheCallBack(_this.param.id, _this.panelInfo.id, function(rsp) {
|
resetViewCacheCallBack(_this.param.id, _this.panelInfo.id, function(rsp) {
|
||||||
_this.changeEditStatus(false)
|
_this.changeEditStatus(false)
|
||||||
_this.getChart(_this.param.id, 'panel')
|
_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 })
|
bus.$emit('view-in-cache', { type: 'propChange', viewId: _this.param.id })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -2424,27 +2385,6 @@ export default {
|
|||||||
}
|
}
|
||||||
this.calcData(true)
|
this.calcData(true)
|
||||||
this.closeValueFormatter()
|
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()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user