From e8a7c0283b4540cded78a90bdf778e99cc4a4396 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 8 Dec 2021 13:38:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/modules/visual/resibuzz.scss | 75 +++++--- .../visual/communityGovern/resiPieOption.js | 164 ++++++++++++++++ .../visual/communityGovern/resibuzz.vue | 176 ++++++++++++++--- .../components/screen-echarts-frame/index.vue | 177 ++++++++++++++++++ 4 files changed, 541 insertions(+), 51 deletions(-) create mode 100644 src/views/modules/visual/communityGovern/resiPieOption.js create mode 100644 src/views/modules/visual/components/screen-echarts-frame/index.vue diff --git a/src/assets/scss/modules/visual/resibuzz.scss b/src/assets/scss/modules/visual/resibuzz.scss index d7b1bf4b..d4f13bf0 100644 --- a/src/assets/scss/modules/visual/resibuzz.scss +++ b/src/assets/scss/modules/visual/resibuzz.scss @@ -2,29 +2,46 @@ @import '../../c/function'; @import './c/common'; -.g-r { - text-align: center; - margin: 40px 19px 20px; - width: calc(100vw - 60px); - height: calc(100vh - 140px); - - .title { - padding: 10px; - font-size: 22px; - font-family: PingFang SC; - font-weight: 800; - color: #ffffff; - display: flex; - align-items: center; - - img { - display: block; - margin-right: 5px; - } - span { - display: block; - } +.title { + padding: 10px; + font-size: 22px; + font-family: PingFang SC; + font-weight: 800; + color: #ffffff; + display: flex; + align-items: center; + + img { + display: block; + margin-right: 5px; + } + span { + display: block; + } +} + +.g-cpt-resi { + display: flex; + flex-direction: row; + // flex-wrap: wrap; + // justify-content: center; + height: calc(100vh - 130px); + + .g-l { + flex-shrink: 0; + width: 600px; + height: calc(100vh - 190px); } + + .g-r { + text-align: center; + margin: 40px 19px 20px; + width: calc(100vw - 60px - 600px); + height: calc(100vh - 140px - 20px); + } +} + +.g-r { .tb { position: relative; height: calc(100vh - 220px); @@ -61,3 +78,17 @@ } } } + +.echart-wr { + margin-left: 30px; + // margin-top: 100px; + text-align: center; + position: relative; + width: 500px; + height: 100%; + box-sizing: border-box; + .echart-org { + width: 100%; + height: 90%; + } +} diff --git a/src/views/modules/visual/communityGovern/resiPieOption.js b/src/views/modules/visual/communityGovern/resiPieOption.js new file mode 100644 index 00000000..58d04e13 --- /dev/null +++ b/src/views/modules/visual/communityGovern/resiPieOption.js @@ -0,0 +1,164 @@ + +export function pieOption () { +const center= ['50%', '250px'] + return { + title: { + text: '0', + top: 220, + left: 'center', + textStyle: { + width: '100%', + fontSize: 32, + color: '#FFFFFF', + fontWeight: 400 + }, + itemGap: 5, + subtext: '总数', + subtextStyle: { + fontSize: 20, + color: '#fff', + fontWeight: 400 + } + }, + tooltip: { + show: false + }, + legend: { + top: 500, + bottom: 0, + itemWidth: 20, + itemHeight: 10, + textStyle: { + color: '#D2E7FF', + fontSize: 16, + lineHeight: 20, + }, + + }, + series: [ + // 外侧圆环 + { + type: 'pie', + // 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。 + startAngle: 0, + hoverAnimation: false, + // tooltip: { + // }, + center: center, + radius: ['55%', '55.3%'], + label: { + normal: { + show: false + } + }, + labelLine: { + normal: { + show: false + } + }, + data: [{ + value: 360, + itemStyle: { + normal: { + color: 'rgba(40, 101, 250, 0)', + width:0, + borderColor: 'rgba(40, 101, 250, 0.5)', + borderWidth: 1, + borderType: 'dotted' + } + } + } + ] + }, + + // 突出的 + { + hoverAnimation: false, + // name: 'Access From', + type: 'pie', + center: center, + radius: ['40%', '60%'], + avoidLabelOverlap: false, + // top: top + '%', + // height: '80%', + selectedMode: 'single', + left: 'center', + width: 400, + label: { + position: 'outer', + // alignTo: 'edge', + formatter: '{a|{c}}\n\n{name|{b}}', + // minMargin: 100, + // edgeDistance: 0, + // lineHeight: 20, + color: '#fff', + fontSize: 12, + distanceToLabelLine: -60, + rich: { + a: { + fontSize: '30px', + color: ' #00F5FE', + + }, + b: { + lineHeight: 0, + fontSize: '20px', + color: ' #FFFFFF' + + } + } + }, + labelLine: { + smooth: 0.2, + length: 30, + length2: 90 + }, + // itemStyle: { + // normal:{ + // color:function(params) { + // //自定义颜色 + // var colorList = [ + // '#00FFFF', '#00FF00', '#FFFF00', '#FF8C00', '#FF0000', '#FE8463', + // ]; + // return colorList[params.dataIndex] + // } + // } + // }, + data: [], + + }, + // 中间圆环 + { + type: 'pie', + // 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。 + startAngle: 0, + hoverAnimation: false, + center: center, + // tooltip: { + // }, + radius: ['0%', '25%'], + label: { + + show: false + + }, + labelLine: { + + show: false + + }, + data: [{ + value: 360, + itemStyle: { + normal: { + color: 'rgba(8, 37, 134, 1)', + + } + } + } + ] + }, + ] + + } +} diff --git a/src/views/modules/visual/communityGovern/resibuzz.vue b/src/views/modules/visual/communityGovern/resibuzz.vue index 578fb852..c286a396 100644 --- a/src/views/modules/visual/communityGovern/resibuzz.vue +++ b/src/views/modules/visual/communityGovern/resibuzz.vue @@ -1,34 +1,47 @@ + +