| | |
| | | type: 'value', |
| | | axisLabel: { |
| | | show: true, |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: chartFontsize(12), |
| | | }, |
| | | color: '#fff', |
| | | fontSize: chartFontsize(12), |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | |
| | | inverse: true, |
| | | axisLabel: { |
| | | show: true, |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: chartFontsize(12), |
| | | }, |
| | | color: '#fff', |
| | | fontSize: chartFontsize(12), |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | |
| | | color: function (params) { |
| | | return dataColor[params.dataIndex]; |
| | | }, |
| | | barBorderRadius: [0, radius, radius, 0], |
| | | borderRadius: [0, radius, radius, 0], |
| | | }, |
| | | barWidth: radius, |
| | | barCategoryGap: "0%", |
| | |
| | | show: false |
| | | }, |
| | | label: { |
| | | normal: { |
| | | show: true, |
| | | position: 'insideRight', |
| | | fontSize: chartFontsize(18), |
| | | color: '#021750' |
| | | } |
| | | show: true, |
| | | position: 'insideRight', |
| | | fontSize: chartFontsize(18), |
| | | color: '#021750' |
| | | }, |
| | | itemStyle: { |
| | | color: function (params) { |
| | |
| | | barWidth: radius, |
| | | data: maxData, |
| | | itemStyle: { |
| | | normal: { |
| | | color: function (params) { |
| | | return bgColor[params.dataIndex]; |
| | | }, |
| | | } |
| | | color: function (params) { |
| | | return bgColor[params.dataIndex]; |
| | | }, |
| | | }, |
| | | }, |
| | | ] |
| | |
| | | type: 'pie', |
| | | radius: ['35%', '65%'], |
| | | itemStyle: { |
| | | normal: { |
| | | borderColor: '#021651', |
| | | borderWidth: 6, |
| | | } |
| | | borderColor: '#021651', |
| | | borderWidth: 6, |
| | | }, |
| | | labelLine: { |
| | | normal: { |
| | | length: 20, |
| | | length2: 0, |
| | | lineStyle: { |
| | | color: '#007ed3' |
| | | } |
| | | length: 20, |
| | | length2: 0, |
| | | lineStyle: { |
| | | color: '#007ed3' |
| | | } |
| | | }, |
| | | label: { |
| | |
| | | name: '', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | hoverAnimation: false, |
| | | emphasis: { |
| | | scale: false |
| | | }, |
| | | data: [{ |
| | | value: 20, |
| | | name: '' |
| | | }], |
| | | label: { |
| | | normal: { |
| | | show: false |
| | | } |
| | | show: false |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | | color: 'rgba(7,56,128,0.2)' |
| | | } |
| | | color: 'rgba(7,56,128,0.2)' |
| | | }, |
| | | zlevel: 2 |
| | | }, |
| | |
| | | name: '', |
| | | type: 'pie', |
| | | radius: '46%', |
| | | hoverAnimation: false, |
| | | emphasis: { |
| | | scale: false |
| | | }, |
| | | data: [{ |
| | | value: 20, |
| | | name: '' |
| | | }], |
| | | label: { |
| | | normal: { |
| | | show: false |
| | | } |
| | | show: false |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#00b2e0' |
| | | } |
| | | color: '#00b2e0' |
| | | }, |
| | | zlevel: 3 |
| | | }, |
| | |
| | | name: '', |
| | | type: 'pie', |
| | | radius: '35%', |
| | | hoverAnimation: false, |
| | | emphasis: { |
| | | scale: false |
| | | }, |
| | | data: [{ |
| | | value: 20, |
| | | name: '' |
| | | }], |
| | | label: { |
| | | normal: { |
| | | show: false |
| | | } |
| | | show: false |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#ffffff' |
| | | } |
| | | color: '#ffffff' |
| | | }, |
| | | zlevel: 4 |
| | | }, |
| | |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | textStyle: { |
| | | color: '#FFFFFF', |
| | | fontSize: chartFontsize(12), |
| | | }, |
| | | color: '#FFFFFF', |
| | | fontSize: chartFontsize(12), |
| | | }, |
| | | }], |
| | | series: [] |
| | |
| | | type: 'pie', |
| | | radius: '75%', |
| | | center: ['50%', '40%'], |
| | | hoverAnimation: false, |
| | | emphasis: { |
| | | scale: false |
| | | }, |
| | | data: [{ |
| | | value: data, |
| | | name: '' |
| | | }], |
| | | label: { |
| | | normal: { |
| | | show: false |
| | | } |
| | | show: false |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | | color: color |
| | | } |
| | | color: color |
| | | }, |
| | | zlevel: 1 |
| | | }, { |
| | |
| | | type: 'pie', |
| | | radius: '61%', |
| | | center: ['50%', '40%'], |
| | | hoverAnimation: false, |
| | | emphasis: { |
| | | scale: false |
| | | }, |
| | | data: [{ |
| | | value: data, |
| | | name: '' |
| | | }], |
| | | label: { |
| | | normal: { |
| | | show: false |
| | | } |
| | | show: false |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | | color: 'transparent', |
| | | borderType: 'dashed', |
| | | borderColor: '#ffffff' |
| | | } |
| | | color: 'transparent', |
| | | borderType: 'dashed', |
| | | borderColor: '#ffffff' |
| | | }, |
| | | zlevel: 2 |
| | | }, |
| | |
| | | type: 'pie', |
| | | radius: '61%', |
| | | center: ['50%', '40%'], |
| | | hoverAnimation: false, |
| | | emphasis: { |
| | | scale: false |
| | | }, |
| | | data: [{ |
| | | value: data, |
| | | name: text |
| | | }], |
| | | label: { |
| | | normal: { |
| | | show: true, |
| | | position: "center", |
| | | fontSize: chartFontsize(24), |
| | | fontWeight: '600', |
| | | color: '#ffffff' |
| | | } |
| | | show: true, |
| | | position: "center", |
| | | fontSize: chartFontsize(24), |
| | | fontWeight: '600', |
| | | color: '#ffffff' |
| | | }, |
| | | itemStyle: { |
| | | normal: { |
| | | color: color, |
| | | } |
| | | color: color, |
| | | }, |
| | | zlevel: 3 |
| | | }, { |
| | |
| | | data: [data], |
| | | coordinateSystem: 'polar', |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#ffffff', |
| | | } |
| | | color: '#ffffff', |
| | | }, |
| | | zlevel: 4 |
| | | }, |
| | |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | textStyle: { |
| | | color: '#FFFFFF', |
| | | fontSize: chartFontsize(12) |
| | | }, |
| | | color: '#FFFFFF', |
| | | fontSize: chartFontsize(12) |
| | | }, |
| | | }], |
| | | series: [{ |
| | |
| | | symbol: 'path://d="M150 50 L130 130 L170 130 Z', |
| | | zlevel: 2, |
| | | itemStyle: { |
| | | normal: { |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 0.7, [{ |
| | | offset: 0, |
| | | color: "#65B3AD" |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: "#9EFFDA" |
| | | } |
| | | ]), |
| | | opacity: 0.48 |
| | | }, |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 0.7, [{ |
| | | offset: 0, |
| | | color: "#65B3AD" |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: "#9EFFDA" |
| | | } |
| | | ]), |
| | | opacity: 0.48 |
| | | }, |
| | | }, { |
| | | name: 'inData', |
| | |
| | | symbol: 'path://d="M150 50 L130 130 L170 130 Z', |
| | | zlevel: 1, |
| | | itemStyle: { |
| | | normal: { |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 0.7, [{ |
| | | offset: 0, |
| | | color: "#65B3AD" |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: "#9EFFDA" |
| | | } |
| | | ]), |
| | | opacity: 1 |
| | | }, |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 0.7, [{ |
| | | offset: 0, |
| | | color: "#65B3AD" |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: "#9EFFDA" |
| | | } |
| | | ]), |
| | | opacity: 1 |
| | | }, |
| | | }] |
| | | }; |
| | |
| | | item.w = item.w / clientWidth; |
| | | item.h = item.h / clientHeight; |
| | | }) |
| | | sendData.isremoved = false; |
| | | this.$emit('onDragstop', sendData); |
| | | }, |
| | | //面板改变位置时 |
| | |
| | | item.w = item.w / clientWidth; |
| | | item.h = item.h / clientHeight; |
| | | }) |
| | | sendData.isremoved = false; |
| | | this.$emit('onDragstop', sendData); |
| | | }, |
| | | // 辅助线回调事件 |
| | |
| | | item.y = item.y / clientHeight; |
| | | item.w = item.w / clientWidth; |
| | | item.h = item.h / clientHeight; |
| | | }) |
| | | }); |
| | | sendData.isremoved = true; |
| | | this.$emit('removeModular', sendData); |
| | | }, |
| | | // 加载布局数据 |
| | |
| | | let modular = require(`./charts/${item.type}.vue`).default; |
| | | let modularExtend = Vue.extend(modular); |
| | | let chartModular = new modularExtend().$mount(); |
| | | chartModular.id = `chart${item.id}` |
| | | if (nowBox[0].children.length > 0) { |
| | | nowBox[0].replaceChild(chartModular.$el, nowBox[0].children[0]) |
| | | } else { |
| | | chartModular.id = `chart${item.id}`; |
| | | if (nowBox[0].children.length == 0) { |
| | | nowBox[0].appendChild(chartModular.$el) |
| | | this.modularArr.push(chartModular); |
| | | } |
| | | if (this.nowlayOut.isremoved) { |
| | | nowBox[0].replaceChild(chartModular.$el, nowBox[0].children[0]) |
| | | } |
| | | chartModular.setData(item.setData); |
| | | chartModular.resize(); |
| | |
| | | margin: 0; |
| | | background: #27343e; |
| | | z-index: 3000; |
| | | position: absolute; |
| | | position: fixed; |
| | | list-style-type: none; |
| | | padding: 5px 0; |
| | | border-radius: 4px; |
| | |
| | | } |
| | | } |
| | | }) |
| | | this.modularTitle.map((item) => { |
| | | item.selected = false; |
| | | if (item.name == this.layOut.headPic) { |
| | | item.selected = true; |
| | | this.screenTitleBg = item.img; |
| | | } |
| | | }); |
| | | this.modularBg.map((item) => { |
| | | item.selected = false; |
| | | if (item.name == this.layOut.bgPic) { |
| | | item.selected = true; |
| | | this.screenBg = item.img; |
| | | } |
| | | }); |
| | | } |
| | | this.layOut.headPic = 'bigscreenTitle1'; |
| | | this.layOut.bgPic = 'bigscreenbg1'; |
| | | this.modularTitle.map((item) => { |
| | | item.selected = false; |
| | | if (item.name == this.layOut.headPic) { |
| | | item.selected = true; |
| | | this.screenTitleBg = item.img; |
| | | } |
| | | }); |
| | | this.modularBg.map((item) => { |
| | | item.selected = false; |
| | | if (item.name == this.layOut.bgPic) { |
| | | item.selected = true; |
| | | this.screenBg = item.img; |
| | | } |
| | | }); |
| | | }).catch((err) => { |
| | | console.log(err) |
| | | }); |