Commit 4ece9639 by 王志慧

bug修改

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