Commit 62b6a769 by 胡悦

Merge branch 'dev_v1.0.0' of http://192.168.3.233:8090/gh/data-view into dev_v1.0.0

2 parents 59a89d9a ec0236e9
...@@ -84,7 +84,7 @@ img { ...@@ -84,7 +84,7 @@ img {
} }
.title { .title {
font-size: 12px; font-size: 0.75vw;
color: #e8e8e8; color: #e8e8e8;
// line-height: 2.1vh; // line-height: 2.1vh;
font-weight: 400; font-weight: 400;
......
...@@ -213,8 +213,8 @@ p { ...@@ -213,8 +213,8 @@ p {
.line-item { .line-item {
height: 1.8vh; height: 1.8vh;
width: 100%; width: 100%;
font-size: 10px; font-size: 0.55vw;
padding-bottom: 0.6vh; padding-bottom: 0.3vh;
} }
.line-item:last-of-type { .line-item:last-of-type {
padding-bottom: 0; padding-bottom: 0;
...@@ -226,4 +226,18 @@ p { ...@@ -226,4 +226,18 @@ p {
} }
} }
} }
::v-deep.line-chart {
width: 100%;
height: 100%;
div {
&:nth-child(1) {
width: 100% !important;
height: 100% !important;
canvas {
width: 100% !important;
height: 100% !important;
}
}
}
}
</style> </style>
...@@ -202,7 +202,7 @@ document.querySelector(`.${this.id}`).nextElementSibling.style = 'animation-iter ...@@ -202,7 +202,7 @@ document.querySelector(`.${this.id}`).nextElementSibling.style = 'animation-iter
<style lang="scss" scoped> <style lang="scss" scoped>
.pie-box { .pie-box {
background: #262525; // background: #262525;
position: relative; position: relative;
flex: 1; flex: 1;
.center-content { .center-content {
......
...@@ -168,7 +168,6 @@ export default { ...@@ -168,7 +168,6 @@ export default {
if (params.brand) this.isGroup = false if (params.brand) this.isGroup = false
this.req = req this.req = req
this.isEmpty = true this.isEmpty = true
// this.flag = false
this.getOverallbase('total') this.getOverallbase('total')
this.getOverallbase('wechat') this.getOverallbase('wechat')
this.getOverallbase('wechatGroup') this.getOverallbase('wechatGroup')
...@@ -189,6 +188,13 @@ export default { ...@@ -189,6 +188,13 @@ export default {
} }
this.tabHead = this.isGroup ? ['前5品牌', '后5品牌'] : ['前5门店', '后5门店'] this.tabHead = this.isGroup ? ['前5品牌', '后5品牌'] : ['前5门店', '后5门店']
this.api.overview[this.isGroup ? 'getBrandOverallbase' : 'getMerchantOverallbase'](params).then(({ code, data }) => { this.api.overview[this.isGroup ? 'getBrandOverallbase' : 'getMerchantOverallbase'](params).then(({ code, data }) => {
this.pageData[queryItem] = {
top: [],
last: [],
incrNum: 0,
returnNum: 0,
totalNum: 0
}
if (code == 0) { if (code == 0) {
let [dataList] = data.dataList let [dataList] = data.dataList
if (dataList) { if (dataList) {
...@@ -211,21 +217,18 @@ export default { ...@@ -211,21 +217,18 @@ export default {
this.pageData[queryItem] = dataList this.pageData[queryItem] = dataList
} }
}).catch(() => {
this.pageData[queryItem] = {
top: [],
last: [],
incrNum: 0,
returnNum: 0,
totalNum: 0
}
}) })
}, },
ObjectToArray (obj) { ObjectToArray (obj) {
let arr = [] let arr = []
if (obj && obj != 'null') JSON.parse(obj).map(e => { if (obj && obj !== 'null') {
obj = obj.replace('null', '"未知"')
let item = JSON.parse(obj)
if (Array.isArray(item)) item.map(e => {
Object.keys(e).map(name => arr.push({ name, num: e[name] })) Object.keys(e).map(name => arr.push({ name, num: e[name] }))
}) })
else Object.keys(item).map(name => arr.push({ name, num: item[name] }))
}
return arr return arr
}, },
getOveralltrend (queryItem) { getOveralltrend (queryItem) {
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<div class="title">售后客户价值分析</div> <div class="title">售后客户价值分析</div>
<template v-if="barData.length > 0"> <template v-if="barData.length > 0">
<div class="analyze-content" :style="{ height: height - 5 + 'vh' }"> <div class="analyze-content" :style="{ height: height - 5 + 'vh' }">
<div class="content-left bg"> <div class="content-left">
<div id="analyzeBar" style="height: 100%"></div> <div id="analyzeBar" style="height: 100%"></div>
</div> </div>
<div class="contetn-right bg"> <div class="contetn-right">
<pie-chart :id="chart.id" :list="analyzeData" :height="height - 5 + 'vh'" :radius="chart.radius" :size="chart.size"></pie-chart> <pie-chart :id="chart.id" :list="analyzeData" :height="height - 5 + 'vh'" :radius="chart.radius" :size="chart.size"></pie-chart>
</div> </div>
</div> </div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!