|
|
|
@ -4,13 +4,13 @@
|
|
|
|
|
* @Author: xing.heng
|
|
|
|
|
*/
|
|
|
|
|
// import _ from 'lodash'
|
|
|
|
|
import cloneDeep from 'lodash/cloneDeep'
|
|
|
|
|
import { mapMutations, mapState } from 'vuex'
|
|
|
|
|
import { EventBus } from 'data-room-ui/js/utils/eventBus'
|
|
|
|
|
import { getChatInfo, getUpdateChartInfo } from '../api/bigScreenApi'
|
|
|
|
|
import axiosFormatting from '../../js/utils/httpParamsFormatting'
|
|
|
|
|
import {settingToTheme} from "data-room-ui/js/utils/themeFormatting";
|
|
|
|
|
import _ from "lodash";
|
|
|
|
|
import { settingToTheme } from 'data-room-ui/js/utils/themeFormatting'
|
|
|
|
|
import cloneDeep from 'lodash/cloneDeep'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data () {
|
|
|
|
|
return {
|
|
|
|
@ -100,14 +100,14 @@ export default {
|
|
|
|
|
const scriptMethod = new Function(scriptAfterReplacement)
|
|
|
|
|
_res.data = scriptMethod()
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('JS数据集脚本执行失败', error)
|
|
|
|
|
console.info('JS数据集脚本执行失败', error)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
config = this.dataFormatting(config, _res)
|
|
|
|
|
this.changeChartConfig(config)
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
console.error(err)
|
|
|
|
|
console.info(err)
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
resolve(config)
|
|
|
|
|
})
|
|
|
|
@ -151,7 +151,7 @@ export default {
|
|
|
|
|
const scriptMethod = new Function(scriptAfterReplacement)
|
|
|
|
|
_res.data = scriptMethod()
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('JS数据集脚本执行失败', error)
|
|
|
|
|
console.info('JS数据集脚本执行失败', error)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -165,7 +165,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
console.error(err)
|
|
|
|
|
console.info(err)
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
resolve(config)
|
|
|
|
|
})
|
|
|
|
@ -191,7 +191,7 @@ export default {
|
|
|
|
|
changeStyle (config) {
|
|
|
|
|
config = { ...this.config, ...config }
|
|
|
|
|
// 样式改变时更新主题配置
|
|
|
|
|
config.theme = settingToTheme(_.cloneDeep(config), this.customTheme)
|
|
|
|
|
config.theme = settingToTheme(cloneDeep(config), this.customTheme)
|
|
|
|
|
this.changeChartConfig(config)
|
|
|
|
|
if (config.code === this.activeCode) {
|
|
|
|
|
this.changeActiveItemConfig(config)
|
|
|
|
|