提交 2561cbe5 authored 作者: lihuihui's avatar lihuihui

优化样式

上级 299e3dce
...@@ -22,6 +22,9 @@ export default { ...@@ -22,6 +22,9 @@ export default {
}, },
beforeMount () { beforeMount () {
this.getData() this.getData()
setInterval(() => {
this.getData()
}, 5 * 60 * 1000)
}, },
methods: { methods: {
formatter(num) { formatter(num) {
...@@ -99,14 +102,14 @@ export default { ...@@ -99,14 +102,14 @@ export default {
this.option = { this.option = {
legend: { legend: {
top: 'bottom', top: 'bottom',
itemWidth: 13, itemWidth: 10,
itemHeight: 13, itemHeight: 10,
icon: 'rect', icon: 'rect',
textStyle: { color: '#fff', fontSize: 16 } textStyle: { color: '#fff', fontSize: 14 }
}, },
// tooltip: { trigger: 'axis', axisPointer: {} }, // tooltip: { trigger: 'axis', axisPointer: {} },
grid: { grid: {
top: '8%', top: '12%',
left: '3%', left: '3%',
right: '5%', right: '5%',
bottom: '20%', bottom: '20%',
......
...@@ -32,6 +32,9 @@ export default { ...@@ -32,6 +32,9 @@ export default {
}, },
mounted() { mounted() {
this.getData() this.getData()
setInterval(() => {
this.getData()
}, 5 * 60 * 1000)
}, },
methods: { methods: {
getData(n) { getData(n) {
......
...@@ -80,6 +80,10 @@ export default { ...@@ -80,6 +80,10 @@ export default {
$('#scroll-set-h').height(countH) $('#scroll-set-h').height(countH)
this.$nextTick(() => { this.$nextTick(() => {
this.getData(Math.round(countH / 35)) this.getData(Math.round(countH / 35))
// setTimeout(() => {
// this.getData(Math.round(countH / 35))
// // this.getData()
// }, 5 * 60 * 1000)
setInterval(() => { setInterval(() => {
this.getData(Math.round(countH / 35)) this.getData(Math.round(countH / 35))
}, 60 * 1000) }, 60 * 1000)
......
...@@ -22,6 +22,10 @@ export default { ...@@ -22,6 +22,10 @@ export default {
}, },
beforeMount () { beforeMount () {
this.getData() this.getData()
setInterval(() => {
// this.getData()
this.getData()
}, 5 * 60 * 1000)
}, },
methods: { methods: {
formatter(num) { formatter(num) {
...@@ -123,10 +127,10 @@ export default { ...@@ -123,10 +127,10 @@ export default {
this.option = { this.option = {
legend: { legend: {
top: 'bottom', top: 'bottom',
itemWidth: 13, itemWidth: 10,
itemHeight: 13, itemHeight: 10,
icon: 'rect', icon: 'rect',
textStyle: { color: '#fff', fontSize: 16 } textStyle: { color: '#fff', fontSize: 14 }
}, },
// tooltip: { trigger: 'axis', axisPointer: {} }, // tooltip: { trigger: 'axis', axisPointer: {} },
grid: { grid: {
......
...@@ -27,6 +27,9 @@ export default { ...@@ -27,6 +27,9 @@ export default {
}, },
mounted () { mounted () {
this.getData() this.getData()
setInterval(() => {
this.getData()
}, 5 * 60 * 1000)
}, },
methods: { methods: {
getData() { getData() {
...@@ -53,7 +56,7 @@ export default { ...@@ -53,7 +56,7 @@ export default {
name: '访问来源', name: '访问来源',
type: 'pie', type: 'pie',
data: data, data: data,
radius: '70%', radius: '60%',
label: { label: {
formatter: '{b} {d}%' formatter: '{b} {d}%'
}, },
......
...@@ -42,6 +42,9 @@ export default { ...@@ -42,6 +42,9 @@ export default {
}, },
mounted () { mounted () {
this.getData() this.getData()
setTimeout(() => {
this.getData()
}, 5 * 60 * 1000)
}, },
methods: { methods: {
getData() { getData() {
......
...@@ -29,6 +29,9 @@ export default { ...@@ -29,6 +29,9 @@ export default {
}, },
mounted () { mounted () {
this.getData() this.getData()
setInterval(() => {
this.getData()
}, 5 * 60 * 1000)
}, },
methods: { methods: {
getData() { getData() {
......
...@@ -142,8 +142,9 @@ export default { ...@@ -142,8 +142,9 @@ export default {
setInterval(() => { setInterval(() => {
this.time = this.getCurrentTime() this.time = this.getCurrentTime()
}, 1000) }, 1000)
setTimeout(() => { setInterval(() => {
this.$router.go(0) // this.$router.go(0)
this.getData()
}, 5 * 60 * 1000) }, 5 * 60 * 1000)
}, },
methods: { methods: {
...@@ -165,7 +166,19 @@ export default { ...@@ -165,7 +166,19 @@ export default {
return String(num).replace(/\d{1,3}(?=(\d{3})+(\.|$))/g, '$&,') return String(num).replace(/\d{1,3}(?=(\d{3})+(\.|$))/g, '$&,')
}, },
getData() { getData() {
this.monthlyIncomeData = {
data: [
{
value: 0,
itemStyle: {
color: '#34A6D2'
}
}
],
projectName: ['']
}
action.Chart210323.getMonthProjectIncome().then(res => { action.Chart210323.getMonthProjectIncome().then(res => {
// this.monthlyIncomeData = []
res.data.sell_data.map(item => { res.data.sell_data.map(item => {
// 营收数据遍历 // 营收数据遍历
this.monthlyIncomeData.data.push( this.monthlyIncomeData.data.push(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论