提交 86dd1ca6 authored 作者: lihuihui's avatar lihuihui

样式调整

上级 93ab96f6
...@@ -25,17 +25,22 @@ export default { ...@@ -25,17 +25,22 @@ export default {
} }
this.data.map(item => { this.data.map(item => {
chartData.project.unshift(item.project_name) chartData.project.unshift(item.project_name)
chartData.payMoney.unshift(item.pay_money.toFixed(2)) chartData.payMoney.unshift(item.pay_money.toFixed(0))
chartData.cost.unshift(item.cost.toFixed(2)) chartData.cost.unshift(item.cost.toFixed(0))
}) })
this.initChart(chartData) this.initChart(chartData)
}, },
methods: { methods: {
formatter(num) {
return String(num).replace(/\d{1,3}(?=(\d{3})+(\.|$))/g, '$&,')
},
initChart(data) { initChart(data) {
this.option = { this.option = {
legend: { legend: {
data: ['收入', '投入'], data: ['收入', '投入'],
color: '#fff' textStyle: {
color: '#0A7199'
}
}, },
grid: { grid: {
top: '15%', top: '15%',
...@@ -113,8 +118,8 @@ export default { ...@@ -113,8 +118,8 @@ export default {
color: { color: {
type: 'linear', type: 'linear',
colorStops: [ colorStops: [
{ offset: 0, color: '#3DAC34' }, { offset: 0, color: '#0D4708' },
{ offset: 1, color: '#0D4708' } { offset: 1, color: '#3DAC34' }
] ]
} }
} }
......
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
} }
}, },
mounted () { mounted () {
// console.log(this.data) console.log(this.data.data, '=321')
this.initChart() this.initChart()
}, },
methods: { methods: {
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
bottom: '0%' bottom: '0%'
}, },
radiusAxis: { radiusAxis: {
// show: false, show: false,
type: 'category', type: 'category',
data: this.data.projectName, data: this.data.projectName,
z: 10, z: 10,
......
...@@ -10,11 +10,11 @@ export default { ...@@ -10,11 +10,11 @@ export default {
data () { data () {
return { return {
getColor: { getColor: {
sofia: 'rgba(252, 101, 75, 1)', Sofia: 'rgba(252, 101, 75, 1)',
kelley: 'rgba(52, 166, 210, 1)', Kelley: 'rgba(52, 166, 210, 1)',
cu: 'rgba(152, 146, 240, 1)', CU: 'rgba(152, 146, 240, 1)',
ciis: 'rgba(239, 177, 174, 1)', CIIS: 'rgba(239, 177, 174, 1)',
shms: 'rgba(249, 189, 115, 1)' SHMS: 'rgba(249, 189, 115, 1)'
}, },
option: { option: {
} }
......
...@@ -52,10 +52,11 @@ export default { ...@@ -52,10 +52,11 @@ export default {
notNextTick: true, notNextTick: true,
freeMode: true, freeMode: true,
setWrapperSize: true, setWrapperSize: true,
speed: 2000, speed: 4000,
observer: true, observer: true,
observeParents: true, observeParents: true,
loop: true, loop: true,
animationType: 'linear',
autoplay: { autoplay: {
delay: 1, delay: 1,
autoplayDisableOnInteraction: false autoplayDisableOnInteraction: false
...@@ -111,6 +112,11 @@ export default { ...@@ -111,6 +112,11 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep{
.swiper-wrapper{
transition-timing-function: linear;
}
}
.inner{ .inner{
padding: 0 4.1%; padding: 0 4.1%;
box-sizing: border-box; box-sizing: border-box;
...@@ -124,20 +130,20 @@ export default { ...@@ -124,20 +130,20 @@ export default {
li{ li{
text-align: center; text-align: center;
&:nth-child(1){ &:nth-child(1){
width: 20%; width: 40%;
} }
&:nth-child(2){ &:nth-child(2){
width: 20%; width: 15%;
} }
&:nth-child(3){ &:nth-child(3){
width: 20%; width: 15%;
} }
&:nth-child(4){ &:nth-child(4){
width: 20%; width: 15%;
} }
&:nth-child(5){ &:nth-child(5){
white-space:nowrap; white-space:nowrap;
width: 20%; width: 15%;
} }
} }
} }
...@@ -164,31 +170,31 @@ export default { ...@@ -164,31 +170,31 @@ export default {
color: #E59700; color: #E59700;
text-align: center; text-align: center;
&:nth-child(1){ &:nth-child(1){
width: 20%; width: 40%;
text-overflow:ellipsis; text-overflow:ellipsis;
overflow:hidden; overflow:hidden;
white-space:nowrap; white-space:nowrap;
} }
&:nth-child(2){ &:nth-child(2){
width: 20%; width: 15%;
text-overflow:ellipsis; text-overflow:ellipsis;
overflow:hidden; overflow:hidden;
white-space:nowrap; white-space:nowrap;
} }
&:nth-child(3){ &:nth-child(3){
width: 20%; width: 15%;
text-overflow:ellipsis; text-overflow:ellipsis;
overflow:hidden; overflow:hidden;
white-space:nowrap; white-space:nowrap;
} }
&:nth-child(4){ &:nth-child(4){
width: 20%; width: 15%;
text-overflow:ellipsis; text-overflow:ellipsis;
overflow:hidden; overflow:hidden;
white-space:nowrap; white-space:nowrap;
} }
&:nth-child(5){ &:nth-child(5){
width: 20%; width: 15%;
text-overflow:ellipsis; text-overflow:ellipsis;
overflow:hidden; overflow:hidden;
white-space:nowrap; white-space:nowrap;
......
...@@ -10,11 +10,11 @@ export default { ...@@ -10,11 +10,11 @@ export default {
data () { data () {
return { return {
getColor: { getColor: {
sofia: 'rgba(252, 101, 75, 1)', Sofia: 'rgba(252, 101, 75, 1)',
kelley: 'rgba(52, 166, 210, 1)', Kelley: 'rgba(52, 166, 210, 1)',
cu: 'rgba(152, 146, 240, 1)', CU: 'rgba(152, 146, 240, 1)',
ciis: 'rgba(239, 177, 174, 1)', CIIS: 'rgba(239, 177, 174, 1)',
shms: 'rgba(249, 189, 115, 1)' SHMS: 'rgba(249, 189, 115, 1)'
}, },
option: { option: {
} }
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
item.map(cItem => { item.map(cItem => {
// console.log(cItem) // console.log(cItem)
totalNum[cItem.week] += cItem.pay_money totalNum[cItem.week] += cItem.pay_money
if (cItem.week === '当前周预测' || cItem.week === '当前周实际') { if (cItem.week === '当前周预测' || cItem.week === 'T+1' || cItem.week === 'T+2') {
bar.data.push({ bar.data.push({
value: cItem.pay_money, value: cItem.pay_money,
itemStyle: { itemStyle: {
......
...@@ -54,6 +54,9 @@ export default { ...@@ -54,6 +54,9 @@ export default {
type: 'pie', type: 'pie',
data: data, data: data,
radius: '70%', radius: '70%',
label: {
formatter: '{b} {d}%'
},
emphasis: { emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 10, shadowBlur: 10,
......
...@@ -129,19 +129,19 @@ export default { ...@@ -129,19 +129,19 @@ export default {
.block{ .block{
width: 13px; width: 13px;
height: 13px; height: 13px;
&.col-sofia{ &.col-Sofia{
background: rgba(252, 101, 75, 1); background: rgba(252, 101, 75, 1);
} }
&.col-kelley{ &.col-Kelley{
background: rgba(52, 166, 210, 1); background: rgba(52, 166, 210, 1);
} }
&.col-cu{ &.col-CU{
background: rgba(152, 146, 240, 1); background: rgba(152, 146, 240, 1);
} }
&.col-ciis{ &.col-CIIS{
background: rgba(239, 177, 174, 1); background: rgba(239, 177, 174, 1);
} }
&.col-shms{ &.col-SHMS{
background: rgba(249, 189, 115, 1); background: rgba(249, 189, 115, 1);
} }
} }
......
...@@ -12,6 +12,16 @@ ...@@ -12,6 +12,16 @@
</div> </div>
</div> </div>
</div> </div>
<div class="tagging-box">
<ul class="tips-box">
<template v-for="(item, index) in monthlyIncomeData.projectName">
<li :key="index">
<div :class="`block col-${item}`"></div>
<div class="project-name">{{ item }}</div>
</li>
</template>
</ul>
</div>
</card> </card>
</div> </div>
<div class="chart-l-c"> <div class="chart-l-c">
...@@ -28,13 +38,13 @@ ...@@ -28,13 +38,13 @@
<div class="chart-center-box"> <div class="chart-center-box">
<div class="title-info"> <div class="title-info">
<div class="tit-l"> <div class="tit-l">
<div class="name">总销售额</div> <div class="name">总销售额(月)</div>
<div class="num"> <div class="num">
{{ totalData.money }}<span></span> {{ formatter(totalData.money) }}<span></span>
</div> </div>
</div> </div>
<div class="tit-l"> <div class="tit-l">
<div class="name">总成单量</div> <div class="name">总成单量(月)</div>
<div class="num"> <div class="num">
{{ totalData.count }}<span></span> {{ totalData.count }}<span></span>
</div> </div>
...@@ -101,7 +111,8 @@ export default { ...@@ -101,7 +111,8 @@ export default {
yearApply, yearApply,
yearRankingApply, yearRankingApply,
weekRevenueForecast, weekRevenueForecast,
Card Card,
tipsData: []
}, },
data() { data() {
return { return {
...@@ -121,6 +132,13 @@ export default { ...@@ -121,6 +132,13 @@ export default {
totalData: { totalData: {
money: '', money: '',
count: '' count: ''
},
getColor: {
Sofia: 'rgba(252, 101, 75, 1)',
Kelley: 'rgba(52, 166, 210, 1)',
CU: 'rgba(152, 146, 240, 1)',
CIIS: 'rgba(239, 177, 174, 1)',
SHMS: 'rgba(249, 189, 115, 1)'
} }
} }
}, },
...@@ -132,6 +150,9 @@ export default { ...@@ -132,6 +150,9 @@ export default {
this.getData() this.getData()
}, },
methods: { methods: {
formatter(num) {
return String(num).replace(/\d{1,3}(?=(\d{3})+(\.|$))/g, '$&,')
},
getData() { getData() {
action.Chart210323.getMonthProjectIncome().then(res => { action.Chart210323.getMonthProjectIncome().then(res => {
res.data.sell_data.map(item => { res.data.sell_data.map(item => {
...@@ -140,7 +161,7 @@ export default { ...@@ -140,7 +161,7 @@ export default {
{ {
value: item.pay_money, value: item.pay_money,
itemStyle: { itemStyle: {
color: '#34A6D2' color: this.getColor[item.project_name]
} }
} }
) )
...@@ -198,6 +219,52 @@ export default { ...@@ -198,6 +219,52 @@ export default {
font-size: 18px; font-size: 18px;
color: #F3F3F3; color: #F3F3F3;
} }
.tagging-box{
position: absolute;
top: 50%;
left: 5%;
transform: translateY(-50%);
.tips-box{
// padding-top: 5%;
// transform: translateX(-20px);
li{
width: 142px;
display: flex;
margin-bottom: 20px;
.block{
width: 13px;
height: 13px;
&.col-Sofia{
background: rgba(252, 101, 75, 1);
}
&.col-Kelley{
background: rgba(52, 166, 210, 1);
}
&.col-CU{
background: rgba(152, 146, 240, 1);
}
&.col-CIIS{
background: rgba(239, 177, 174, 1);
}
&.col-SHMS{
background: rgba(249, 189, 115, 1);
}
}
.project-name{
font-size: 17px;
color: #F3F3F3;
line-height: 13px;
margin-left: 12px;
}
.num{
font-size: 16px;
color: #F3F3F3;
line-height: 13px;
margin-left: auto;
}
}
}
}
.chart-show{ .chart-show{
position: absolute; position: absolute;
// bottom: 4.5%; // bottom: 4.5%;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论