diff --git a/data-room-ui/packages/BasicComponents/Map/index.vue b/data-room-ui/packages/BasicComponents/Map/index.vue index 45779a5a..533a5e89 100644 --- a/data-room-ui/packages/BasicComponents/Map/index.vue +++ b/data-room-ui/packages/BasicComponents/Map/index.vue @@ -3,14 +3,7 @@ style="width: 100%; height: 100%" class="bs-design-wrap bs-bar" > - - 返回上一级 - + 返回上一级
{ - if (params.name == '') return - if (config.customize.down === false || this.level === 'province') return - this.level = 'province' - const mapUrl = `${window.BS_CONFIG?.httpConfigs?.baseURL}/static/chinaMap/province/${params.name}.json` - const map = await this.$dataRoomAxios.get(decodeURI(mapUrl), {}, true) - this.changeData({ ...config, customize: { ...config.customize, level: 'province', scope: params.name } }) - this.option.geo.map = params.name - echarts.registerMap(params.name, map) - this.charts.setOption(this.option, true) - }) + this.charts.on('click', async(params)=> { + if(params.name=='') return + if(config.customize.down===false||this.level==='province') return + this.level='province' + const mapUrl =`${window.BS_CONFIG?.httpConfigs?.baseURL}/static/chinaMap/province/${params.name}.json` + const map = await this.$dataRoomAxios.get(decodeURI(mapUrl), {}, true) + this.changeData({...config,customize:{...config.customize,level:'province',scope:params.name}}) + this.option.geo.map = params.name + echarts.registerMap(params.name, map); + this.charts.setOption(this.option, true); + }); } } } diff --git a/data-room-ui/packages/BigScreenDesign/LeftPanel.vue b/data-room-ui/packages/BigScreenDesign/LeftPanel.vue index a52dc048..790b048b 100644 --- a/data-room-ui/packages/BigScreenDesign/LeftPanel.vue +++ b/data-room-ui/packages/BigScreenDesign/LeftPanel.vue @@ -149,7 +149,6 @@ import cloneDeep from 'lodash/cloneDeep' import basicComponents from 'data-room-ui/js/config/basicComponentsConfig' import g2PlotComponents, { getCustomPlots } from '../G2Plots/plotList' -import echartsComponents from '../Echarts/echartList' import borderComponents from 'data-room-ui/js/config/borderComponentsConfig' import decorationComponents from 'data-room-ui/js/config/decorationComponentsConfig' import LayerList from './LayerList/index.vue' @@ -173,7 +172,6 @@ export default { }, data () { return { - echartsComponents, g2PlotComponents, activeName: 'chart', // 设置左侧tab栏的默认值 fold: false, // 控制左侧菜单栏伸缩 @@ -193,13 +191,6 @@ export default { icon: 'icon-jichushuju', components: this.g2PlotComponents }, - { - id: 7, - name: 'echart', - title: '3D', - icon: 'icon-jichushuju', - components: this.echartsComponents - }, { id: 3, name: 'dataV', @@ -252,7 +243,6 @@ export default { this.initList() this.g2PlotComponents = [...this.g2PlotComponents, ...getCustomPlots()] this.menuList[1].components = this.g2PlotComponents - this.menuList[2].components = this.echartsComponents }, mounted () { this.nodeDrag() diff --git a/data-room-ui/packages/Echarts/3D图/3D固定柱状图.js b/data-room-ui/packages/Echarts/3D图/3D固定柱状图.js deleted file mode 100644 index 0e4d8bd6..00000000 --- a/data-room-ui/packages/Echarts/3D图/3D固定柱状图.js +++ /dev/null @@ -1,257 +0,0 @@ -/* - * @description: 配置,参考https://g2plot.antv.antgroup.com/examples - * @Date: 2023-03-27 14:38:23 - * @Author: xing.heng - */ -import echarts from 'echarts' -// 配置版本号 -const version = '2023071001' -// 分类 -const category = 'Column' -// 标题 -const title = '3D固定柱状图' -// 类别, new Line() -const chartType = 'Column' -// 用于标识,唯一,和文件夹名称一致 -const name = 'FenZuZhuZhuangTu' - -// 右侧配置项 -const setting = [ - { - label: '维度', - type: 'select', // 设置组件类型 - field: 'xField', // 字段 - optionField: 'xField', // 对应options中的字段 - // 是否多选 - multiple: false, - value: '', - tabName: 'data' - }, - { - label: '指标', - type: 'select', // 设置组件类型 - field: 'yField', // 字段 - optionField: 'yField', // 对应options中的字段 - // 是否多选 - multiple: false, - value: '', - tabName: 'data' - }, - { - label: '分组字段', - type: 'select', // 设置组件类型 - field: 'seriesField', // 字段 - optionField: 'seriesField', // 对应options中的字段 - // 是否多选 - multiple: false, - value: '', - tabName: 'data' - } -] - -// 配置处理脚本 -const optionHandler = '' - -// 数据处理脚本 -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 option = { - animation: false, - tooltip: { - show: true - }, - grid: { - left: '15%', - right: '5%', - bottom: '15%', - z: 100, - containLabel: false, - show: false - }, - graphic: { - type: 'group', - bottom: '8%', - left: '10%', - z: 100, - children: [ - { - type: 'rect', - left: 0, - bottom: 0, - shape: { - width: 400, - height: 10 - }, - style: { - fill: '#3f4867' - } - }, - { - type: 'polygon', - left: 0, - bottom: 10, - shape: { - // 左上、右上、右下、左下 - points: [[40, -50], [360, -50], [400, 0], [0, 0]] - }, - style: { - fill: '#303256' - } - } - ] - }, - xAxis: [ - { - type: 'category', - data: xData, - // 坐标轴刻度设置:x轴数据展示 - axisTick: { - show: true, - alignWithLabel: true - }, - nameTextStyle: { - color: '#82b0ec' - }, - // 是否显示坐标轴的轴线 - axisLine: { - show: false - }, - // 坐标轴刻度标签 - axisLabel: { - textStyle: { - fontSize: 10, - color: 'rgb(40, 129, 170)' - }, - margin: 30 - } - } - ], - yAxis: [ - { - show: true, // y轴文本标签显示 - type: 'value', - axisLabel: { - textStyle: { - color: 'rgb(40, 129, 170)' - } - }, - // 分隔线 - splitLine: { - show: false // yAxis.show配置为true时,该配置才有效 - }, - // y轴轴线是否显示 - axisLine: { - show: true - } - } - ], - series: [ - { - type: 'pictorialBar', // 象形柱图 - symbol: 'diamond', - symbolOffset: [0, '-50%'], // 上部菱形 - symbolSize: [30, 15], - // symbolOffset: [0, -6], // 上部椭圆 - symbolPosition: 'end', - z: 12, - label: { - normal: { - show: true, - position: 'top', - fontSize: 15, - fontWeight: 'bold', - color: '#27a7ce' - } - }, - color: '#2DB1EF', - data: yData - }, - { - type: 'pictorialBar', - symbol: 'diamond', - symbolSize: [30, 15], - symbolOffset: ['0%', '50%'], // 下部菱形 - // symbolOffset: [0, 7], // 下部椭圆 - z: 12, - color: '#187dcb', - data: yData - }, - { - type: 'bar', - barWidth: 30, - z: 10, - itemStyle: { - normal: { - // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - // { - // offset: 0, - // color: '#115ba6' - // }, - // { - // offset: 1, - // color: '#1db0dd' - // } - // ]), - opacity: 0.8, - shadowColor: 'rgba(0, 0, 0, 0.5)', // 阴影颜色 - shadowBlur: 0 // 阴影模糊值 - } - }, - data: yData - }, - { - type: 'bar', - barWidth: 30, - barGap: '-100%', - itemStyle: { - normal: { - color: '#041133', - opacity: 0.8, - shadowColor: 'rgba(0, 0, 0, 0.5)', // 阴影颜色 - shadowBlur: 0 // 阴影模糊值 - } - }, - label: { - show: false - }, - data: maxData - }, - { - type: 'pictorialBar', // 象形柱图 - symbol: 'diamond', - symbolOffset: [0, '-50%'], // 上部菱形 - symbolSize: [30, 15], - // symbolOffset: [0, -6], // 上部椭圆 - symbolPosition: 'end', - z: 12, - label: { - normal: { - show: false, - position: 'top', - fontSize: 15, - fontWeight: 'bold', - color: '#27a7ce' - } - }, - color: '#142f5a', - data: maxData - - } - ] -} -export default { - category, - version, - title, - chartType, - name, - option, - setting, - optionHandler, - dataHandler -} diff --git a/data-room-ui/packages/Echarts/echartList.js b/data-room-ui/packages/Echarts/echartList.js deleted file mode 100644 index 0354fe52..00000000 --- a/data-room-ui/packages/Echarts/echartList.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * @description: webpack读取当前文件夹下的所有 图表的js文件配置, 生成g2Plot配置列表 - * @Date: 2023-03-28 10:40:22 - * @Author: xing.heng - */ -import { dataConfig, settingConfig } from '../PlotRender/settingConfig' -import cloneDeep from 'lodash/cloneDeep' -import sortList from './echartListSort' -// 遍历 当前文件夹下的所有文件,找到中文.js文件,然后导出 -const files = require.context('./', true, /[\u4e00-\u9fa5]+.js$/) -const echartsList = getEchartsList(files) -// 获取plot配置 -function getEchartsList (files) { - const configMapList = {} - files.keys().forEach((key) => { - // ./折线图/基础折线图.js - // 取到 "基础折线图" - const configName = key.split('/')[2].replace('.js', '') - configMapList[configName] = files(key).default - }) - const echartsList = [] - for (const configMapKey in configMapList) { - const index = sortList.findIndex((item) => item === configMapKey) - const config = configMapList[configMapKey] - - echartsList[index] = { - version: config.version, - category: configMapKey, - name: config.name, - title: config.title, - border: { type: '', titleHeight: 60, fontSize: 30, color: ['#5B8FF9', '#61DDAA', '#5D7092', '#F6BD16', '#6F5EF9'] }, - icon: null, - img: require(`../Echarts/images/${config.title}.png`), - className: - 'com.gccloud.dataroom.core.module.chart.components.CustomComponentChart', - w: config?.option?.width || 450, - h: config?.option?.height || 320, - x: 0, - y: 0, - type: 'echartsComponent', - chartType: config.chartType, - loading: false, - option: { - ...config.option, - ...cloneDeep(settingConfig) - }, - setting: config.setting, // 右侧面板自定义配置 - dataHandler: config.dataHandler, // 数据自定义处理js脚本 - optionHandler: config.optionHandler, // 配置自定义处理js脚本 - ...cloneDeep(dataConfig) - } - } - return echartsList -} -export default echartsList diff --git a/data-room-ui/packages/Echarts/echartListSort.js b/data-room-ui/packages/Echarts/echartListSort.js deleted file mode 100644 index f5a57530..00000000 --- a/data-room-ui/packages/Echarts/echartListSort.js +++ /dev/null @@ -1,4 +0,0 @@ -// 左侧plot组件的排序 -export default [ - '3D固定柱状图' -] diff --git a/data-room-ui/packages/Echarts/images/3D固定柱状图.png b/data-room-ui/packages/Echarts/images/3D固定柱状图.png deleted file mode 100644 index 4e74c414..00000000 Binary files a/data-room-ui/packages/Echarts/images/3D固定柱状图.png and /dev/null differ diff --git a/data-room-ui/packages/EchartsRender/index.vue b/data-room-ui/packages/EchartsRender/index.vue deleted file mode 100644 index b1c3d1dd..00000000 --- a/data-room-ui/packages/EchartsRender/index.vue +++ /dev/null @@ -1,227 +0,0 @@ - - - - diff --git a/data-room-ui/packages/EchartsRender/settingConfig.js b/data-room-ui/packages/EchartsRender/settingConfig.js deleted file mode 100644 index 39b34b16..00000000 --- a/data-room-ui/packages/EchartsRender/settingConfig.js +++ /dev/null @@ -1,23 +0,0 @@ -import { commonConfig, displayOption } from 'data-room-ui/js/config' -export const settingConfig = { - displayOption: { ...displayOption } -} -const customConfig = { - root: { - contribution: false - }, - customize: { - theme: 'dark', // 'light'、'dark' - colorScheme: [], - legend: null, - legendColor: '', // 图例颜色 - xaxisColor: '', // x轴标签颜色 - xaxisFontSize: 14, // x轴标签字体大小 - yaxisColor: '', // y轴标签颜色 - yaxisFontSize: 14, // y轴标签字体大小 - labelColor: ''// 标签颜色 - } -} -export const dataConfig = { - ...commonConfig(customConfig) -} diff --git a/data-room-ui/packages/G2Plots/plotList.js b/data-room-ui/packages/G2Plots/plotList.js index a12559cf..50cf4b91 100644 --- a/data-room-ui/packages/G2Plots/plotList.js +++ b/data-room-ui/packages/G2Plots/plotList.js @@ -32,7 +32,7 @@ function getPlotList (files) { category: configMapKey, name: config.name, title: config.title, - border: { type: '', titleHeight: 60, fontSize: 30, color: ['#5B8FF9', '#61DDAA', '#5D7092', '#F6BD16', '#6F5EF9'] }, + border:{type:'',titleHeight:60,fontSize:30,color:['#5B8FF9', '#61DDAA', '#5D7092', '#F6BD16', '#6F5EF9']}, icon: null, img: require(`../G2Plots/images/componentLogo/${config.title}.png`), className: @@ -65,7 +65,7 @@ export function getCustomPlots () { category: config.category, name: config.name, title: config.title, - border: { type: '', titleHeight: 60, fontSize: 30, color: ['#5B8FF9', '#61DDAA', '#5D7092', '#F6BD16', '#6F5EF9'] }, + border:{type:'',titleHeight:60,fontSize:30,color:['#5B8FF9', '#61DDAA', '#5D7092', '#F6BD16', '#6F5EF9']}, icon: null, img: config.img, className: @@ -89,5 +89,5 @@ export function getCustomPlots () { return list } -const plots = [...plotList, ...customPlots, mapData, FlyMapData] +const plots = [...plotList, ...customPlots, mapData,FlyMapData] export default plots diff --git a/data-room-ui/packages/Render/RenderCard.vue b/data-room-ui/packages/Render/RenderCard.vue index dfabb300..cda294a3 100644 --- a/data-room-ui/packages/Render/RenderCard.vue +++ b/data-room-ui/packages/Render/RenderCard.vue @@ -36,7 +36,6 @@ import { resolveComponentType } from 'data-room-ui/js/utils' 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 EchartsComponent from '../EchartsRender/index.vue' import Svgs from '../Svgs/index.vue' import RemoteComponent from 'data-room-ui/RemoteComponents/index.vue' import cloneDeep from 'lodash/cloneDeep' @@ -53,8 +52,7 @@ export default { ...components, CustomComponent, Svgs, - RemoteComponent, - EchartsComponent + RemoteComponent }, props: { // 卡片的属性