Commit 4ece9639 by 王志慧

bug修改

1 parent 174c69c9
...@@ -29,7 +29,7 @@ export function getCugroupReportData(data) { ...@@ -29,7 +29,7 @@ export function getCugroupReportData(data) {
returnAll: true returnAll: true
}) })
} }
export function scriptData(data) { export function scriptData(data={}) {
data.method ='entmicro.api.customer.merchant.report.script' data.method ='entmicro.api.customer.merchant.report.script'
return window.$HTTP({ return window.$HTTP({
url: customer, url: customer,
......
...@@ -211,22 +211,22 @@ export default { ...@@ -211,22 +211,22 @@ export default {
return textCfg return textCfg
} }
}) })
this.lineChart // this.lineChart
.area() // .area()
.position('dataDateStr*orderMoneyTotalSum') // .position('dataDateStr*orderMoneyTotalSum')
.color('country', val => { // .color('country', val => {
return ['#3975C6', '#F7F7F7'] // return ['#3975C6', '#F7F7F7']
}) // })
.adjust('stack') // .adjust('stack')
this.lineChart.tooltip({ this.lineChart.tooltip({
showTitle: true, // 展示 tooltip 的标题 showTitle: true, // 展示 tooltip 的标题
layout: 'vertical', layout: 'vertical'
}) })
this.lineChart.line().position('dataDateStr*orderMoneyTotalSum').shape('smooth').color('#3975C6') this.lineChart.line().position('dataDateStr*orderMoneyTotalSum').shape('smooth').color('#3975C6')
this.lineChart.point().position('dataDateStr*orderMoneyTotalSum').shape('smooth').style({ // this.lineChart.point().position('dataDateStr*orderMoneyTotalSum').shape('smooth').style({
stroke: '#fff', // stroke: '#fff',
lineWidth: 1 // lineWidth: 1
}) // })
} }
const textObj = { const textObj = {
top: true, top: true,
...@@ -256,7 +256,7 @@ export default { ...@@ -256,7 +256,7 @@ export default {
initPieChart(id = 'pieChart') { initPieChart(id = 'pieChart') {
let { productionValueReportList, orderSource } = this let { productionValueReportList, orderSource } = this
productionValueReportList.map(e => { productionValueReportList.map(e => {
e.count = 'count'; e.count = 'count'
}) })
this.chart && this.chart.clear() this.chart && this.chart.clear()
this.chart = null this.chart = null
...@@ -336,14 +336,14 @@ export default { ...@@ -336,14 +336,14 @@ export default {
dayTime: { dayTime: {
type: 'timeCat', type: 'timeCat',
mask: 'MM/DD', mask: 'MM/DD',
tickCount: 8, range: [0, 1],
range: [0, 1] tickCount: 5
}, },
value: { value: {
formatter(e) { formatter(e) {
return Math.ceil(e) return Math.ceil(e)
} }
} },
}) })
this.lineChartCustomer.axis('dayTime', { this.lineChartCustomer.axis('dayTime', {
label: function label(text, index, total) { label: function label(text, index, total) {
...@@ -358,30 +358,8 @@ export default { ...@@ -358,30 +358,8 @@ export default {
}) })
// Tooltip 配置 // Tooltip 配置
this.lineChartCustomer.tooltip({ this.lineChartCustomer.tooltip({
// background: {
// 'box-shadow': '0px 3px 10px 0px rgba(223, 228, 234, 0.81)',
// radius: '4px',
// fill: '#fff',
// padding: [3, 5]
// },
showTitle: true, // 展示 tooltip 的标题 showTitle: true, // 展示 tooltip 的标题
layout: 'vertical', layout: 'vertical'
// titleStyle: {
// fill: '#666',
// textAlign: 'start',
// textBaseline: 'top'
// }, // tooltip 标题的文本样式配置,showTitle 为 false 时不生效
// nameStyle: {
// fill: '#333',
// textAlign: 'start',
// textBaseline: 'middle'
// },
// valueStyle: {
// fill: '#333',
// textAlign: 'start',
// textBaseline: 'middle'
// } // tooltip value 项的文本样式配置
}) })
// this.lineChartCustomer.tooltip({ // this.lineChartCustomer.tooltip({
// custom: true, // custom: true,
...@@ -409,16 +387,20 @@ export default { ...@@ -409,16 +387,20 @@ export default {
// }) // })
this.lineChartCustomer.line().position('dayTime*value').shape('smooth').color('type', ['#3975C6', '#FA7C0B']) this.lineChartCustomer.line().position('dayTime*value').shape('smooth').color('type', ['#3975C6', '#FA7C0B'])
this.lineChartCustomer.point().position('dayTime*value').color('type', ['#3975C6', '#FA7C0B']) //
this.lineChartCustomer.legend(false) this.lineChartCustomer.legend(false)
this.lineChartCustomer // this.lineChartCustomer.area()
.area() // .position('time*tem')
.position('dayTime*value') // .color('l(90) 0:FA7C0B 1:#f7f7f7')
.color('type', val => { // .shape('smooth');
if (val == '新增企微客户数') return ['#3975C6', '#F7F7F7']
return ['#FA7C0B', '#F7F7F7'] // this.lineChartCustomer
}) // .area()
.adjust('stack') // .position('dayTime*value')
// .color('type', val => {
// if (val == '新增企微客户数') return 'l(90) 0:3975C6 1:#ffffff'
// return 'l(90) 0:FA7C0B 1:#ffffff'
// })
// .shape('smooth')
const textObj = { const textObj = {
top: true, top: true,
position() { position() {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<img :src="i.thumbAvatar" alt="" /> <img :src="i.thumbAvatar" alt="" />
</div> </div>
<div> <div>
<div class="gray-text">{{ i.staffName }}</div> <div class="gray-text staffName">{{ i.staffName }}</div>
<div class="text-message">占{{ (i.newlyQyRatio * 100).toFixed(0) }}%</div> <div class="text-message">占{{ (i.newlyQyRatio * 100).toFixed(0) }}%</div>
</div> </div>
<div class="gray-text location"> <div class="gray-text location">
...@@ -68,6 +68,13 @@ export default { ...@@ -68,6 +68,13 @@ export default {
.text-message { .text-message {
margin-top: 2px; margin-top: 2px;
} }
.staffName {
width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: left;
}
.gray-text { .gray-text {
span { span {
font-size: 14px; font-size: 14px;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<span class="add-count">{{ add.value(reportData) }}</span> <span class="add-count">{{ add.value(reportData) }}</span>
<template v-if="add.sequential(reportData)"> <template v-if="add.sequential(reportData)">
<div class="ratio text-message"> <div class="ratio text-message">
周环比 {{reportType == 0?'周环比':'月环比' }}
<span> <span>
<template v-if="add.sequential(reportData)!='0%'"> <template v-if="add.sequential(reportData)!='0%'">
<van-icon name="down" size="10px" :class="add.up(reportData) == 0 ? 'up' : ''" /> <van-icon name="down" size="10px" :class="add.up(reportData) == 0 ? 'up' : ''" />
...@@ -79,7 +79,8 @@ export default { ...@@ -79,7 +79,8 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
reportData: state => state.report.reportData, reportData: state => state.report.reportData,
statisticsObj: state => state.report.statisticsObj statisticsObj: state => state.report.statisticsObj,
reportType:state=>state.report.reportType
}) })
}, },
mounted() {}, mounted() {},
...@@ -172,6 +173,7 @@ export default { ...@@ -172,6 +173,7 @@ export default {
} }
.statistics /deep/ .van-swipe__track { .statistics /deep/ .van-swipe__track {
margin-right: 10px; margin-right: 10px;
height:auto;
.van-swipe-item { .van-swipe-item {
width: 167px !important; width: 167px !important;
} }
......
...@@ -251,6 +251,7 @@ export default { ...@@ -251,6 +251,7 @@ export default {
} }
.store-ranking-wrap /deep/ .van-swipe__track { .store-ranking-wrap /deep/ .van-swipe__track {
margin-right: 10px; margin-right: 10px;
height:auto;
.van-swipe-item{ .van-swipe-item{
width:140px!important; width:140px!important;
} }
......
<template> <template>
<div class="layout"> <div class="layout">
<div class="head-bg"></div>
<div class="layout-wrap"> <div class="layout-wrap">
<div class="content">
<time-search ref="timeSearch"></time-search> <time-search ref="timeSearch"></time-search>
<statistics></statistics> <statistics></statistics>
<ranking ref="ranking"></ranking> <ranking ref="ranking"></ranking>
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
</canvas-tab> </canvas-tab>
</template> </template>
</div> </div>
<div class="head-bg"></div>
</div>
<div class="bottom"> <div class="bottom">
<tab :list="['客户统计', '产值统计']" @change="change" :index="tabIndex"></tab> <tab :list="['客户统计', '产值统计']" @change="change" :index="tabIndex"></tab>
</div> </div>
...@@ -48,6 +51,7 @@ export default { ...@@ -48,6 +51,7 @@ export default {
mounted() { mounted() {
this.getData() this.getData()
// this.$refs.canvasTab.initData() // this.$refs.canvasTab.initData()
scriptData().then(res => {})
}, },
created() { created() {
console.log(JSON.parse(window.localStorage.getItem('reportType'))) console.log(JSON.parse(window.localStorage.getItem('reportType')))
...@@ -115,7 +119,7 @@ export default { ...@@ -115,7 +119,7 @@ export default {
this.SET_TAB_INDEX({ tabIndex: index }) this.SET_TAB_INDEX({ tabIndex: index })
this.SET_TABTYPE_INDEX({ index: 0 }) this.SET_TABTYPE_INDEX({ index: 0 })
this.$refs.timeSearch.showDateSelect = false this.$refs.timeSearch.showDateSelect = false
this.$refs.timeSearch.initDate() // this.$refs.timeSearch.initDate() //切换时间重置不需要
this.getData() this.getData()
}, },
getData() { getData() {
...@@ -163,10 +167,22 @@ export default { ...@@ -163,10 +167,22 @@ export default {
.layout { .layout {
color: #333333; color: #333333;
font-size: 14px; font-size: 14px;
padding-bottom: 65px; height: 100%;
overflow: hidden;
.layout-wrap { .layout-wrap {
padding: 0 15px; padding: 0 15px;
box-sizing: border-box; box-sizing: border-box;
position: relative;
height: 100%;
box-sizing: border-box;
overflow: scroll;
.content{
position:absolute;
top:0;
left:15px;
right:15px;
z-index:999;
}
} }
.bottom { .bottom {
position: fixed; position: fixed;
...@@ -175,6 +191,7 @@ export default { ...@@ -175,6 +191,7 @@ export default {
background: #ffffff; background: #ffffff;
z-index: 999; z-index: 999;
width: 100%; width: 100%;
right: 0;
} }
} }
</style> </style>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!