|
@@ -47,8 +47,8 @@
|
|
|
<div
|
|
<div
|
|
|
v-for="(itm, index) in item.btns"
|
|
v-for="(itm, index) in item.btns"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
- :class="{active:index === item.checkId}"
|
|
|
|
|
- @click="changeFn(index,item)"
|
|
|
|
|
|
|
+ :class="{ active: index === item.checkId }"
|
|
|
|
|
+ @click="changeFn(index, item)"
|
|
|
>
|
|
>
|
|
|
{{ itm }}
|
|
{{ itm }}
|
|
|
</div>
|
|
</div>
|
|
@@ -336,7 +336,6 @@ const datas = [
|
|
|
name: '系列a'
|
|
name: '系列a'
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
-const colorList = [ 'rgba(211, 68, 53, 1)', 'rgba(228, 133, 48, 1)', 'rgba(231, 185, 44, 1)', 'rgba(23, 165, 213, 1)' ]
|
|
|
|
|
|
|
|
|
|
const leftContent = ref({
|
|
const leftContent = ref({
|
|
|
topCount: [
|
|
topCount: [
|
|
@@ -399,37 +398,17 @@ const leftContent = ref({
|
|
|
],
|
|
],
|
|
|
axisLabel: {
|
|
axisLabel: {
|
|
|
interval: 0,
|
|
interval: 0,
|
|
|
- show: true,
|
|
|
|
|
fontSize: 18,
|
|
fontSize: 18,
|
|
|
color: '#C9D2FA'
|
|
color: '#C9D2FA'
|
|
|
- },
|
|
|
|
|
- axisLine: {
|
|
|
|
|
- show: false,
|
|
|
|
|
- lineStyle: {
|
|
|
|
|
- show: false,
|
|
|
|
|
- color: '#F3F3F3',
|
|
|
|
|
- width: 2
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- axisTick: {
|
|
|
|
|
- show: false
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
yAxis: [
|
|
yAxis: [
|
|
|
{
|
|
{
|
|
|
splitNumber: 2,
|
|
splitNumber: 2,
|
|
|
axisLabel: {
|
|
axisLabel: {
|
|
|
- show: true,
|
|
|
|
|
fontSize: 18,
|
|
fontSize: 18,
|
|
|
color: '#C9D2FA'
|
|
color: '#C9D2FA'
|
|
|
},
|
|
},
|
|
|
- axisLine: {
|
|
|
|
|
- show: false
|
|
|
|
|
- },
|
|
|
|
|
- axisTick: {
|
|
|
|
|
- show: false
|
|
|
|
|
- },
|
|
|
|
|
splitLine: {
|
|
splitLine: {
|
|
|
lineStyle: {
|
|
lineStyle: {
|
|
|
type: 'dashed',
|
|
type: 'dashed',
|
|
@@ -441,7 +420,6 @@ const leftContent = ref({
|
|
|
splitNumber: 2,
|
|
splitNumber: 2,
|
|
|
position: 'right', // 放在右边
|
|
position: 'right', // 放在右边
|
|
|
axisLabel: {
|
|
axisLabel: {
|
|
|
- show: true,
|
|
|
|
|
fontSize: 18,
|
|
fontSize: 18,
|
|
|
color: '#C9D2FA',
|
|
color: '#C9D2FA',
|
|
|
formatter(value: number) {
|
|
formatter(value: number) {
|
|
@@ -449,12 +427,6 @@ const leftContent = ref({
|
|
|
return `${value}%`
|
|
return `${value}%`
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- axisLine: {
|
|
|
|
|
- show: false
|
|
|
|
|
- },
|
|
|
|
|
- axisTick: {
|
|
|
|
|
- show: false
|
|
|
|
|
- },
|
|
|
|
|
splitLine: {
|
|
splitLine: {
|
|
|
lineStyle: {
|
|
lineStyle: {
|
|
|
type: 'dashed',
|
|
type: 'dashed',
|
|
@@ -507,7 +479,6 @@ const leftContent = ref({
|
|
|
},
|
|
},
|
|
|
// 图表图例
|
|
// 图表图例
|
|
|
legend: {
|
|
legend: {
|
|
|
- show: true,
|
|
|
|
|
type: 'scroll',
|
|
type: 'scroll',
|
|
|
orient: 'horizontal', // 图例排列方向
|
|
orient: 'horizontal', // 图例排列方向
|
|
|
icon: 'circle', // 图例样式为圆形
|
|
icon: 'circle', // 图例样式为圆形
|
|
@@ -521,8 +492,6 @@ const leftContent = ref({
|
|
|
fontSize: 20
|
|
fontSize: 20
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- // color: [ '#6386e0', '#fb9a55', '#6bd98d', '#8dfd15', '#6bd98d', '#fff' ],
|
|
|
|
|
series: [
|
|
series: [
|
|
|
{
|
|
{
|
|
|
type: 'pie', // 图表类型为饼图
|
|
type: 'pie', // 图表类型为饼图
|
|
@@ -530,7 +499,6 @@ const leftContent = ref({
|
|
|
avoidLabelOverlap: true, // 是否启用防止标签重叠策略
|
|
avoidLabelOverlap: true, // 是否启用防止标签重叠策略
|
|
|
showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
|
|
showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
|
|
|
label: {
|
|
label: {
|
|
|
- show: true,
|
|
|
|
|
formatter: '{b}\n{d}%',
|
|
formatter: '{b}\n{d}%',
|
|
|
color: 'white'
|
|
color: 'white'
|
|
|
},
|
|
},
|
|
@@ -648,7 +616,7 @@ const leftContent = ref({
|
|
|
padding: [ 2, 0, 0, 0 ]
|
|
padding: [ 2, 0, 0, 0 ]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- formatter: (params: string, _id:number) => {
|
|
|
|
|
|
|
+ formatter: (params: string, _id: number) => {
|
|
|
const id = _id + 1
|
|
const id = _id + 1
|
|
|
if (_id < 3) {
|
|
if (_id < 3) {
|
|
|
return `{a${id}|${id}} ${params}`
|
|
return `{a${id}|${id}} ${params}`
|
|
@@ -674,13 +642,12 @@ const leftContent = ref({
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
offset: 1,
|
|
offset: 1,
|
|
|
- color: colorList[3]
|
|
|
|
|
|
|
+ color: 'rgba(231, 185, 44, 1)'
|
|
|
}
|
|
}
|
|
|
])
|
|
])
|
|
|
}
|
|
}
|
|
|
})),
|
|
})),
|
|
|
label: {
|
|
label: {
|
|
|
- show: true,
|
|
|
|
|
position: 'inside',
|
|
position: 'inside',
|
|
|
color: '#fff',
|
|
color: '#fff',
|
|
|
fontSize: 16
|
|
fontSize: 16
|
|
@@ -789,7 +756,7 @@ const leftContent = ref({
|
|
|
padding: [ 2, 0, 0, 0 ]
|
|
padding: [ 2, 0, 0, 0 ]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- formatter: (params: string, _id:number) => {
|
|
|
|
|
|
|
+ formatter: (params: string, _id: number) => {
|
|
|
const id = _id + 1
|
|
const id = _id + 1
|
|
|
if (_id < 3) {
|
|
if (_id < 3) {
|
|
|
return `{a${id}|${id}} ${params}`
|
|
return `{a${id}|${id}} ${params}`
|
|
@@ -815,13 +782,12 @@ const leftContent = ref({
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
offset: 1,
|
|
offset: 1,
|
|
|
- color: colorList[3]
|
|
|
|
|
|
|
+ color: 'rgba(231, 185, 44, 1)'
|
|
|
}
|
|
}
|
|
|
])
|
|
])
|
|
|
}
|
|
}
|
|
|
})),
|
|
})),
|
|
|
label: {
|
|
label: {
|
|
|
- show: true,
|
|
|
|
|
position: 'inside',
|
|
position: 'inside',
|
|
|
color: '#fff',
|
|
color: '#fff',
|
|
|
fontSize: 16
|
|
fontSize: 16
|
|
@@ -952,7 +918,7 @@ const rightContent = ref([
|
|
|
}
|
|
}
|
|
|
] as any)
|
|
] as any)
|
|
|
|
|
|
|
|
-function changeFn(id:number, item:any) {
|
|
|
|
|
|
|
+function changeFn(id: number, item: any) {
|
|
|
item.checkId = id
|
|
item.checkId = id
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
@@ -1012,22 +978,25 @@ function changeFn(id:number, item:any) {
|
|
|
border-radius: 30px;
|
|
border-radius: 30px;
|
|
|
border: solid 1px #2185E8;
|
|
border: solid 1px #2185E8;
|
|
|
left: 50%;
|
|
left: 50%;
|
|
|
- transform: translate(-50%,0);
|
|
|
|
|
|
|
+ transform: translate(-50%, 0);
|
|
|
top: 10px;
|
|
top: 10px;
|
|
|
z-index: 2;
|
|
z-index: 2;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- &>div{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ &>div {
|
|
|
width: 90px;
|
|
width: 90px;
|
|
|
color: white;
|
|
color: white;
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
line-height: 30px;
|
|
line-height: 30px;
|
|
|
- &:not(:first-child){
|
|
|
|
|
|
|
+
|
|
|
|
|
+ &:not(:first-child) {
|
|
|
border-left: solid 1px #2185E8;
|
|
border-left: solid 1px #2185E8;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .active{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .active {
|
|
|
background: #2185e860;
|
|
background: #2185e860;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|