fix: 修改 type类型字段 跟接口一直 修改misc 显示错误的问题
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
></chart-bar>
|
||||
<chartHexagon
|
||||
:ref="'chart'+chartInfo.id"
|
||||
v-if="isHexagonFigure(chartInfo.type)"
|
||||
v-if="isHexagon(chartInfo.type)"
|
||||
:chart-data="chartData"
|
||||
:chart-info="chartInfo"
|
||||
:chart-option="chartOption"
|
||||
@@ -83,14 +83,14 @@
|
||||
:is-fullscreen="isFullscreen"
|
||||
:chart-option="chartOption"
|
||||
></chart-diagram>
|
||||
<chartAutoCarousel
|
||||
<chartAutotopology
|
||||
:ref="'chart' + chartInfo.id"
|
||||
v-if="isAutoCarousel(chartInfo.type)"
|
||||
v-if="isAutotopology(chartInfo.type)"
|
||||
:chart-data="chartData"
|
||||
:chart-info="chartInfo"
|
||||
:chart-option="chartOption"
|
||||
:is-fullscreen="isFullscreen"
|
||||
></chartAutoCarousel>
|
||||
></chartAutotopology>
|
||||
<chartMap
|
||||
:ref="'chart' + chartInfo.id"
|
||||
v-if="isMap(chartInfo.type)"
|
||||
@@ -140,7 +140,7 @@
|
||||
<script>
|
||||
import loading from '@/components/common/loading'
|
||||
import chartAssetInfo from './chart/chartAssetInfo'
|
||||
import chartAutoCarousel from './chart/chartAutoCarousel'
|
||||
import chartAutotopology from './chart/chartAutotopology'
|
||||
import chartBar from './chart/chartBar'
|
||||
import chartClock from './chart/chartClock'
|
||||
import chartDiagram from './chart/chartDiagram'
|
||||
@@ -159,7 +159,7 @@ import chartUrl from './chart/chartUrl'
|
||||
import chartValue from './chart/chartValue'
|
||||
import chartHexagon from './chart/chartHexagon'
|
||||
import chartMap from './chart/chartMap'
|
||||
import { getOption, isTimeSeries, isHexagonFigure, isUrl, isText, isChartPie, isChartBar, isTreemap, isLog, isStat, isDiagram, isGroup, isAutoCarousel, isMap, isAssetInfo, isEndpointInfo, isTable } from './chart/tools'
|
||||
import { getOption, isTimeSeries, isHexagon, isUrl, isText, isChartPie, isChartBar, isTreemap, isLog, isStat, isDiagram, isGroup, isAutotopology, isMap, isAssetInfo, isEndpointInfo, isTable } from './chart/tools'
|
||||
import lodash from 'lodash'
|
||||
|
||||
export default {
|
||||
@@ -167,7 +167,7 @@ export default {
|
||||
components: {
|
||||
loading,
|
||||
chartAssetInfo,
|
||||
chartAutoCarousel,
|
||||
chartAutotopology,
|
||||
chartBar,
|
||||
chartClock,
|
||||
chartDiagram,
|
||||
@@ -211,7 +211,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
isTimeSeries,
|
||||
isHexagonFigure,
|
||||
isHexagon,
|
||||
isChartPie,
|
||||
isChartBar,
|
||||
isUrl,
|
||||
@@ -221,7 +221,7 @@ export default {
|
||||
isStat,
|
||||
isDiagram,
|
||||
isGroup,
|
||||
isAutoCarousel,
|
||||
isAutotopology,
|
||||
isAssetInfo,
|
||||
isEndpointInfo,
|
||||
isMap,
|
||||
|
||||
@@ -26,7 +26,7 @@ import topology from '@/components/common/project/topologyL5'
|
||||
import chartMixin from '@/components/chart/chartMixin'
|
||||
import bus from '@/libs/bus'
|
||||
export default {
|
||||
name: 'chartAutoCarousel',
|
||||
name: 'chartAutotopology',
|
||||
data () {
|
||||
return {
|
||||
topologyLoading: false,
|
||||
@@ -51,8 +51,8 @@ export function isTimeSeries (type) {
|
||||
return type === chartType.line || type === chartType.area || type === chartType.point
|
||||
}
|
||||
|
||||
export function isHexagonFigure (type) {
|
||||
return type === chartType.hexagonFigure
|
||||
export function isHexagon (type) {
|
||||
return type === chartType.hexagon
|
||||
}
|
||||
export function isChartPie (type) {
|
||||
return type === chartType.pie
|
||||
@@ -82,8 +82,8 @@ export function isDiagram (type) {
|
||||
export function isGroup (type) {
|
||||
return type === chartType.group
|
||||
}
|
||||
export function isAutoCarousel (type) {
|
||||
return type === chartType.carousel
|
||||
export function isAutotopology (type) {
|
||||
return type === chartType.topology
|
||||
}
|
||||
export function isAssetInfo (type) {
|
||||
return type === chartType.assetInfo
|
||||
|
||||
@@ -188,7 +188,7 @@ export default {
|
||||
break
|
||||
}
|
||||
case 'misc': {
|
||||
if (this.chartInfo.type === 'hexagonFigure') {
|
||||
if (this.chartInfo.type === 'hexagon') {
|
||||
this.getHexagonFigureData().then(res => {
|
||||
this.chartData = res
|
||||
}).finally(() => {
|
||||
@@ -207,8 +207,8 @@ export default {
|
||||
this.chartData = [...this.chartInfo.children]
|
||||
this.groupInit()
|
||||
}
|
||||
if (this.chartInfo.type === 'carousel') {
|
||||
this.chartData = ['carousel']
|
||||
if (this.chartInfo.type === 'topology') {
|
||||
this.chartData = ['topology']
|
||||
}
|
||||
if (this.chartInfo.type === 'map') {
|
||||
this.chartData = ['map']
|
||||
|
||||
@@ -405,8 +405,7 @@ export const chartType = {
|
||||
endpointInfo: 'endpointInfo',
|
||||
topology: 'topology',
|
||||
map: 'map',
|
||||
hexagonFigure: 'hexagonFigure',
|
||||
carousel: 'carousel'
|
||||
hexagon: 'hexagon'
|
||||
}
|
||||
|
||||
export const chartLegendPlacement = {
|
||||
|
||||
@@ -138,6 +138,16 @@ export default {
|
||||
return false
|
||||
default: return false
|
||||
}
|
||||
},
|
||||
contentShow (type) {
|
||||
switch (type) {
|
||||
case 'group' :
|
||||
case 'map' :
|
||||
case 'topology' :
|
||||
case 'hexagon' :
|
||||
return false
|
||||
default: return true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<!--content-->
|
||||
<div v-if="!isGroup(chartConfig.type)" class="form__sub-title">
|
||||
<div v-if="contentShow(chartConfig.type)" class="form__sub-title">
|
||||
<span>{{$t('dashboard.panel.chartForm.content')}}</span>
|
||||
<span style="cursor: pointer" v-if="isDiagram(chartConfig.type)"><i class="nz-icon nz-icon-edit" @click="topologyDialogChange(true)"></i></span>
|
||||
</div>
|
||||
@@ -171,11 +171,11 @@ export default {
|
||||
name: this.$t('dashboard.panel.chartForm.typeVal.map.label')
|
||||
},
|
||||
{
|
||||
id: 'carousel',
|
||||
name: this.$t('dashboard.panel.chartForm.typeVal.carousel.label')
|
||||
id: 'topology',
|
||||
name: this.$t('dashboard.panel.chartForm.typeVal.topology.label')
|
||||
},
|
||||
{
|
||||
id: 'hexagonFigure',
|
||||
id: 'hexagon',
|
||||
name: this.$t('dashboard.panel.chartForm.typeVal.hexagonFigure.label')
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user