Merge branch 'master' of github.com:gcpaas/DataRoom

main
liu.tao3 2 years ago
commit b2e5bde2e2

@ -1,5 +1,6 @@
<template>
<div
class="mouse-select-wrap"
style="position: relative; user-select: none;"
@mousedown="handleMouseDown"
@mousemove="handleMouseMove"
@ -168,7 +169,13 @@ export default {
}
}
</script>
<style scoped>
<style scoped lang="scss">
.mouse-select-wrap{
width: 200%;
height: 200%;
margin: -50px;
padding: 50px;
}
.notSelect {
user-select: none;
pointer-events: none;

@ -1,14 +1,10 @@
import * as echarts from 'echarts'
// 配置版本号
const version = '2023071001'
// 分类
const category = 'Column'
const version = '2023091901'
// 标题
const title = '3D固定柱状图'
// 类别, new Line()
const chartType = 'Column'
// 用于标识,唯一,和文件夹名称一致
const name = 'FenZuZhuZhuangTu'
const name = '3DGuDingZhuZhuangTu'
// 右侧配置项
const setting = [
@ -96,7 +92,6 @@ const setting = [
tabName: 'custom',
groupName: 'graph'
}
]
// 配置处理脚本
@ -107,9 +102,9 @@ const dataHandler = ''
// 图表配置 new Line('domName', option)
const xData = ['本年话务总量', '本年人工话务量', '每万客户呼入量', '本年话务总量', '本年人工话务量', '每万客户呼入量']
const yData = [300, 1230, 425, 300, 1230, 425]
const maxData = [1500, 1500, 1500, 1500, 1500, 1500]
const xData = ['本年话务总量', '本年人工话务量', '每万客户呼入量', '本年话务总量']
const yData = [300, 1230, 425, 300]
const maxData = [1500, 1500, 1500, 1500]
const option = {
animation: false,
tooltip: {
@ -333,10 +328,8 @@ const option = {
]
}
export default {
category,
version,
title,
chartType,
name,
option,
setting,

@ -74,6 +74,22 @@ export default {
this.changeStyle(this.config, true)
}
}
},
'config.w': {
handler (val) {
if (val) {
console.log('this.config',this.config);
const chartDom = document.getElementById(this.chatId)
this.observeChart(chartDom, this.chart, this.config.option)
}
}
},
'config.h': {
handler (val) {
if (val) {
this.newChart(this.config)
}
}
}
},
mounted () {
@ -117,10 +133,34 @@ export default {
* 构造chart
*/
newChart (config) {
// console.log('');
const chartDom = document.getElementById(this.chatId)
this.chart = echarts.init(chartDom)
config.option && this.chart.setOption(config.option)
},
/**
* 控制底部阴影大小
*/
observeChart (container, myChart, option) {
const resizeObserver = new ResizeObserver(entries => {
myChart.resize()
// entries[0].contentRect.width:
// entries[0].contentRect.height:
const width = entries[0].contentRect.width
const height = entries[0].contentRect.height
//
option.graphic.children[0].shape.width = width * 0.9
//
option.graphic.children[1].shape.points = [
[width / 10, -height / 6],
[width - width / 6, -height / 6],
[width * 0.9, 0],
[0, 0]
]
myChart.setOption(option)
})
resizeObserver.observe(container)
},
/**
* 注册事件
*/
@ -160,6 +200,7 @@ export default {
return config
},
dataFormatting (config, data) {
console.log('config', config)
//
if (data.success) {
data = data.data
@ -471,6 +512,7 @@ export default {
},
// config
changeStyle (config, isUpdateTheme) {
console.log('組件樣式改變',config)
config = { ...this.config, ...config }
config = this.transformSettingToOption(config, 'custom')
// optionsettingeval,optionHandlerdataHandler

@ -24,6 +24,7 @@ import pcComponent from 'data-room-ui/js/utils/componentImport'
import { dataInit, destroyedEvent } from 'data-room-ui/js/utils/eventBus'
import CustomComponent from '../PlotRender/index.vue'
import Svgs from '../Svgs/index.vue'
import EchartsComponent from '../EchartsRender/index.vue'
import RemoteComponent from 'data-room-ui/RemoteComponents/index.vue'
import cloneDeep from 'lodash/cloneDeep'
const components = {}
@ -39,7 +40,8 @@ export default {
...components,
CustomComponent,
Svgs,
RemoteComponent
RemoteComponent,
EchartsComponent
},
props: {
//

Loading…
Cancel
Save