|
@@ -188,10 +188,6 @@ import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
|
|
|
import ColorPicker from 'data-room-ui/ColorPicker/index.vue'
|
|
|
import BgImg from './BgImgDialog.vue'
|
|
|
import { mapState, mapMutations } from 'vuex'
|
|
|
-import { getThemeConfig } from 'data-room-ui/js/api/bigScreenApi'
|
|
|
-// import _ from 'lodash'
|
|
|
-import cloneDeep from 'lodash/cloneDeep'
|
|
|
-import { G2 } from '@antv/g2plot'
|
|
|
import { themeToSetting } from 'data-room-ui/js/utils/themeFormatting'
|
|
|
export default {
|
|
|
name: 'OverallSetting',
|
|
@@ -378,6 +374,9 @@ export default {
|
|
|
const pageInfo = this.pageInfo
|
|
|
pageInfo.chartList = themeToSetting(pageInfo.chartList, theme)
|
|
|
this.changePageInfo(pageInfo)
|
|
|
+ pageInfo.chartList.forEach(chart => {
|
|
|
+ // if (chart.type === 'remoteComponent')
|
|
|
+ })
|
|
|
},
|
|
|
init () {
|
|
|
if (!this.pageInfo.pageConfig.refreshConfig) {
|
|
@@ -432,36 +431,6 @@ export default {
|
|
|
initResolution () {
|
|
|
this.resolutionRatioValue = this.pageInfo.pageConfig.w + '*' + this.pageInfo.pageConfig.h
|
|
|
},
|
|
|
- getThemeConfig (themeName) {
|
|
|
- // this.changePageLoading(true)
|
|
|
- if (!['dark', 'light', 'auto'].includes(themeName)) {
|
|
|
- getThemeConfig().then(res => {
|
|
|
- this.form.themeJson = res
|
|
|
- this.changePageConfig(cloneDeep(this.form))
|
|
|
- // 统一注册主题
|
|
|
- const { registerTheme } = G2
|
|
|
- registerTheme(themeName, { ...res.chart })
|
|
|
- this.changeChart(themeName)
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.form.themeJson = {}
|
|
|
- this.changePageConfig(this.form)
|
|
|
- this.changeChart(themeName)
|
|
|
- }
|
|
|
- },
|
|
|
- // 改变
|
|
|
- // changeChart (themeName) {
|
|
|
- // // 统一改变组件的主题
|
|
|
- // const newChartList = cloneDeep(this.pageInfo.chartList)
|
|
|
- // const chartList = newChartList.map(chart => {
|
|
|
- // chart.option.theme = themeName
|
|
|
- // chart.key = new Date().getTime()
|
|
|
- // // this.changeChartKey(chart.code)
|
|
|
- // return chart
|
|
|
- // })
|
|
|
- // // 可能需要强制性更新chartList
|
|
|
- // this.changeLayout(chartList)
|
|
|
- // },
|
|
|
|
|
|
// 新增数据集
|
|
|
addCacheDataSet () {
|