Commit 6c7058cb by 王志慧

commit

1 parent 9ff73696
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
.icon-equity { width: 40px; height: 44px; background-position: -50px -190px;} .icon-equity { width: 40px; height: 44px; background-position: -50px -190px;}
.icon-helmet { width: 26px; height: 26px; background-position: -73px -244px;} .icon-helmet { width: 26px; height: 26px; background-position: -73px -244px;}
.icon-huangguan { width: 14px; height: 15px; background-position: -217px -244px;} .icon-huangguan { width: 14px; height: 15px; background-position: -217px -244px;}
.icon-icondown { width: 5px; height: 8px; background-position: -287px -244px;}
.icon-iconup { width: 5px; height: 8px; background-position: -302px -244px;}
.icon-liushi { width: 40px; height: 44px; background-position: -100px -190px;} .icon-liushi { width: 40px; height: 44px; background-position: -100px -190px;}
.icon-message { width: 14px; height: 13px; background-position: -241px -244px;} .icon-message { width: 14px; height: 13px; background-position: -241px -244px;}
.icon-production { width: 40px; height: 44px; background-position: -150px -190px;} .icon-production { width: 40px; height: 44px; background-position: -150px -190px;}
...@@ -15,6 +17,4 @@ ...@@ -15,6 +17,4 @@
.icon-rank { width: 27px; height: 26px; background-position: 0px -244px;} .icon-rank { width: 27px; height: 26px; background-position: 0px -244px;}
.icon-speed { width: 26px; height: 26px; background-position: -181px -244px;} .icon-speed { width: 26px; height: 26px; background-position: -181px -244px;}
.icon-totalCu { width: 40px; height: 44px; background-position: -250px -190px;} .icon-totalCu { width: 40px; height: 44px; background-position: -250px -190px;}
.icon-wechat-customers { width: 40px; height: 44px; background-position: -300px -190px;}
.icon-icondown { width: 5px; height: 9px; background-position: -287px -244px;}
.icon-iconup { width: 5px; height: 9px; background-position: -302px -244px;}
\ No newline at end of file \ No newline at end of file
.icon-wechat-customers { width: 40px; height: 44px; background-position: -300px -190px;}
\ No newline at end of file \ No newline at end of file

173 KB | W: | H:

173 KB | W: | H:

src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin

421 Bytes | W: | H:

349 Bytes | W: | H:

src/assets/spritesmith/icondown.png
src/assets/spritesmith/icondown.png
src/assets/spritesmith/icondown.png
src/assets/spritesmith/icondown.png
  • 2-up
  • Swipe
  • Onion skin

424 Bytes | W: | H:

383 Bytes | W: | H:

src/assets/spritesmith/iconup.png
src/assets/spritesmith/iconup.png
src/assets/spritesmith/iconup.png
src/assets/spritesmith/iconup.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -28,9 +28,10 @@ export default { ...@@ -28,9 +28,10 @@ export default {
}, },
outputData: { outputData: {
handler() { handler() {
this.initData() this.initTextData()
}, },
deep: true deep: true,
immediate: true
} }
}, },
computed: { computed: {
...@@ -45,7 +46,8 @@ export default { ...@@ -45,7 +46,8 @@ export default {
}, },
data() { data() {
return { return {
data: [] data: [],
text: ''
} }
}, },
mounted() {}, mounted() {},
...@@ -53,26 +55,27 @@ export default { ...@@ -53,26 +55,27 @@ export default {
...mapMutations({ ...mapMutations({
SET_TABTYPE_INDEX: 'report/SET_TABTYPE_INDEX' SET_TABTYPE_INDEX: 'report/SET_TABTYPE_INDEX'
}), }),
initData() { initTextData() {
let { let { reportType, outputData } = this
userInfo: { accountLevel },
reportType,
outputData
} = this
let text
if (reportType == 0) { if (reportType == 0) {
text = '本周' this.text = '本周'
// document.title = '周报' document.title = '周报'
} else { } else {
let time = outputData.reportTimeStart.split('-') let time = outputData.reportTimeStart.split('-')
if (time[1] > 9) { if (parseInt(time[1]) > 9) {
text = time[1] + '月' this.text = time[1] + '月'
} else { } else {
text = time[1].split('')[1] + '月' this.text = time[1].split('')[1] + '月'
} }
document.title = '月报' document.title = '月报'
} }
},
initData() {
let {
userInfo: { accountLevel },
reportType,
text
} = this
if (accountLevel !== 4 && this.tabIndex == 0) { if (accountLevel !== 4 && this.tabIndex == 0) {
//集团客户周月报 //集团客户周月报
if (reportType == 0) { if (reportType == 0) {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<canvas <canvas
id="lineCustomerChart" id="lineCustomerChart"
class="canvas" class="canvas"
v-if=" v-show="
(userInfo.accountLevel != 4 && reportType == 1 && tabType.index == 2 && tabIndex == 0 && trendChartList.length > 0) || (userInfo.accountLevel != 4 && reportType == 1 && tabType.index == 2 && tabIndex == 0 && trendChartList.length > 0) ||
(userInfo.accountLevel == 4 && reportType == 1 && tabType.index == 0 && tabIndex == 0 && trendChartList.length > 0) (userInfo.accountLevel == 4 && reportType == 1 && tabType.index == 0 && tabIndex == 0 && trendChartList.length > 0)
" "
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
<canvas <canvas
id="lineChart" id="lineChart"
class="canvas" class="canvas"
v-if=" v-show="
(tabIndex == 1 && userInfo.accountLevel != 4 && reportType == 1 && tabType.index == 2 && trendList.length > 0) || (tabIndex == 1 && userInfo.accountLevel != 4 && reportType == 1 && tabType.index == 2 && trendList.length > 0) ||
(tabIndex == 1 && userInfo.accountLevel == 4 && reportType == 1 && tabType.index == 0 && trendList.length > 0) (tabIndex == 1 && userInfo.accountLevel == 4 && reportType == 1 && tabType.index == 0 && trendList.length > 0)
" "
></canvas> ></canvas>
<canvas class="canvas" id="pieChart" v-if="tabIndex == 1 && tabType.index == 1 && productionValueReportList.length > 0"></canvas> <canvas class="canvas" id="pieChart" v-show="tabIndex == 1 && tabType.index == 1 && productionValueReportList.length > 0"></canvas>
<template <template
v-if=" v-if="
...@@ -112,12 +112,11 @@ export default { ...@@ -112,12 +112,11 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
let { reportType, tabIndex, tabType } = this let { reportType, tabIndex, tabType } = this
if ((tabIndex == 1 && type != 4 && reportType == 1 && tabType.index == 2) || (tabIndex == 1 && type == 4 && reportType == 1 && tabType.index == 0)) this.initLineChart() //产值 if ((tabIndex == 1 && type != 4 && reportType == 1 && tabType.index == 2) || (tabIndex == 1 && type == 4 && reportType == 1 && tabType.index == 0)) this.initLineChart() //产值
if ((tabIndex ==0 &&type != 4 && reportType == 1 && tabType.index == 2) || (tabIndex == 0&&type == 4 && reportType == 1 && tabType.index == 0)) this.lineCustomerChart() //客户 if ((tabIndex == 0 && type != 4 && reportType == 1 && tabType.index == 2) || (tabIndex == 0 && type == 4 && reportType == 1 && tabType.index == 0)) this.lineCustomerChart() //客户
if ((type == 4 && tabIndex == 1 && tabType.index == 1) || (type != 4 && tabIndex == 1 && tabType.index == 1) || reportType == 0) this.initPieChart() if ((type == 4 && tabIndex == 1 && tabType.index == 1) || (type != 4 && tabIndex == 1 && tabType.index == 1) || reportType == 0) this.initPieChart()
}) })
}, },
initLineChart(id = 'lineChart') { initLineChart(id = 'lineChart') {
console.log('产值折线图')
let { tabIndex } = this let { tabIndex } = this
this.lineChart && this.lineChart.clear() this.lineChart && this.lineChart.clear()
this.lineChart = null this.lineChart = null
...@@ -196,11 +195,7 @@ export default { ...@@ -196,11 +195,7 @@ export default {
tickCount: 5, tickCount: 5,
range: [0, 1] range: [0, 1]
}, },
orderMoneyTotalSum: { orderMoneyTotalSum: {}
formatter(e) {
return Math.ceil(e)
}
}
}) })
this.lineChart.axis('dataDateStr', { this.lineChart.axis('dataDateStr', {
label: function label(text, index, total) { label: function label(text, index, total) {
...@@ -213,23 +208,12 @@ export default { ...@@ -213,23 +208,12 @@ export default {
return textCfg return textCfg
} }
}) })
// this.lineChart
// .area()
// .position('dataDateStr*orderMoneyTotalSum')
// .color('country', val => {
// return ['#3975C6', '#F7F7F7']
// })
// .adjust('stack')
this.lineChart.tooltip({ this.lineChart.tooltip({
showTitle: true, // 展示 tooltip 的标题 showTitle: true, // 展示 tooltip 的标题
layout: 'vertical' layout: 'vertical'
}) })
this.lineChart.legend(false) this.lineChart.legend(false)
this.lineChart.line().position('dataDateStr*orderMoneyTotalSum').shape('smooth').color('type', ['#3975C6']) this.lineChart.line().position('dataDateStr*orderMoneyTotalSum').shape('smooth').color('type', ['#3975C6'])
// this.lineChart.point().position('dataDateStr*orderMoneyTotalSum').shape('smooth').style({
// stroke: '#fff',
// lineWidth: 1
// })
} }
const textObj = { const textObj = {
top: true, top: true,
...@@ -242,22 +226,21 @@ export default { ...@@ -242,22 +226,21 @@ export default {
} }
} }
this.lineChart.guide().text({ // this.lineChart.guide().text({
...textObj, // ...textObj,
content: '日期', // content: '日期',
offsetX: window.screen.width - 70, // offsetX: window.screen.width - 70,
offsetY: 14 // offsetY: 14
}) // })
this.lineChart.guide().text({ this.lineChart.guide().text({
...textObj, ...textObj,
content: '产值', content: '产值',
offsetX: -10, offsetX: -10,
offsetY: -160 offsetY: -175
}) })
this.lineChart.render() this.lineChart.render()
}, },
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'
...@@ -310,7 +293,6 @@ export default { ...@@ -310,7 +293,6 @@ export default {
this.chart.render() this.chart.render()
}, },
lineCustomerChart(id = 'lineCustomerChart') { lineCustomerChart(id = 'lineCustomerChart') {
console.log('客户折线图')
// var tooltipEl = document.createElement('div') // var tooltipEl = document.createElement('div')
// var dom = document.getElementById('lineCustomerChart') // var dom = document.getElementById('lineCustomerChart')
this.lineChartCustomer && this.lineChartCustomer.clear() this.lineChartCustomer && this.lineChartCustomer.clear()
...@@ -325,18 +307,16 @@ export default { ...@@ -325,18 +307,16 @@ export default {
trendChartList.forEach(item => { trendChartList.forEach(item => {
trendList.push( trendList.push(
{ {
dayTime: item.dayTime, dayTime: item.dayTime,
type: '新增企微客户数', type: '新增企微客户数',
value: item.entMicroCount value: item.entMicroCount
}, },
{ {
dayTime: item.dayTime, dayTime: item.dayTime,
type: '新增客户数', type: '新增客户数',
value: item.newlyCustomerCount value: item.newlyCustomerCount
} }
) )
}) })
this.lineChartCustomer.source(trendList, { this.lineChartCustomer.source(trendList, {
...@@ -347,9 +327,9 @@ export default { ...@@ -347,9 +327,9 @@ export default {
tickCount: 5 tickCount: 5
}, },
value: { value: {
formatter(e) { type: 'linear',
return Math.ceil(e) nice: true,
} tickInterval: 2
} }
}) })
this.lineChartCustomer.axis('dayTime', { this.lineChartCustomer.axis('dayTime', {
...@@ -419,17 +399,17 @@ export default { ...@@ -419,17 +399,17 @@ export default {
} }
} }
this.lineChartCustomer.guide().text({ // this.lineChartCustomer.guide().text({
...textObj, // ...textObj,
content: '日期', // content: '日期',
offsetX: window.screen.width - 70, // offsetX: window.screen.width - 70,
offsetY: 14 // offsetY: 14
}) // })
this.lineChartCustomer.guide().text({ this.lineChartCustomer.guide().text({
...textObj, ...textObj,
content: '数量', content: '数量',
offsetX: -10, offsetX: -10,
offsetY: -160 offsetY: -175
}) })
this.lineChartCustomer.render() this.lineChartCustomer.render()
} }
......
...@@ -138,7 +138,7 @@ export default { ...@@ -138,7 +138,7 @@ export default {
width: auto; width: auto;
border-radius: 3px; border-radius: 3px;
height: 15px; height: 15px;
font-size: 11px; font-size: 10px;
font-weight: 500; font-weight: 500;
line-height: 15px; line-height: 15px;
margin-left: 5px; margin-left: 5px;
...@@ -169,6 +169,7 @@ export default { ...@@ -169,6 +169,7 @@ export default {
} }
.ratio { .ratio {
margin-left: 2px; margin-left: 2px;
margin-bottom:0;
& .applybcolor { & .applybcolor {
color: #3975c6; color: #3975c6;
} }
......
...@@ -62,6 +62,9 @@ export default { ...@@ -62,6 +62,9 @@ export default {
payload.reportData.productionValueReportList&&payload.reportData.productionValueReportList.map(e => { payload.reportData.productionValueReportList&&payload.reportData.productionValueReportList.map(e => {
e.newProductionValue = e.newProductionValue / 100 e.newProductionValue = e.newProductionValue / 100
})//新增产值分布饼图数据处理 })//新增产值分布饼图数据处理
payload.reportData.trendList&&payload.reportData.trendList.map(e => {
e.orderMoneyTotalSum = e.orderMoneyTotalSum&&(e.orderMoneyTotalSum / 100).toFixed(2)
})//新增产值分布饼图数据处理
state.productionReportList = payload.reportData.merchantProductionValueReportList; state.productionReportList = payload.reportData.merchantProductionValueReportList;
state.productionValueReportList = payload.reportData.productionValueReportList ? payload.reportData.productionValueReportList : []; state.productionValueReportList = payload.reportData.productionValueReportList ? payload.reportData.productionValueReportList : [];
state.trendList = payload.reportData.trendList ? payload.reportData.trendList : []//新增产值趋势图 state.trendList = payload.reportData.trendList ? payload.reportData.trendList : []//新增产值趋势图
......
<template> <template>
<div class="layout"> <div class="layout-wrap">
<div class="layout-wrap"> <div class="content">
<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> <!-- 门店周报客户和产值单独提取出来 -->
<!-- 门店周报客户和产值单独提取出来 --> <template v-if="reportType == 0 && userInfo.accountLevel == 4">
<template v-if="reportType == 0 && userInfo.accountLevel == 4"> <stores-ranking></stores-ranking>
<stores-ranking></stores-ranking> </template>
</template> <template v-else>
<template v-else> <canvas-tab ref="canvasTab" @change="canvasChange">
<canvas-tab ref="canvasTab" @change="canvasChange"> <tab-container ref="tabContainer" :tabIndex="tabIndex"></tab-container>
<tab-container ref="tabContainer" :tabIndex="tabIndex"></tab-container> </canvas-tab>
</canvas-tab> </template>
</template>
</div>
<div class="head-bg"></div>
</div> </div>
<div class="head-bg"></div>
<div class="bottom"> <div class="bottom">
<tab :list="['客户统计', '产值统计']" @change="change" :index="tabIndex"></tab> <tab :list="['客户统计', '产值统计']" @change="change" :index="tabIndex"></tab>
</div> </div>
...@@ -125,14 +122,14 @@ export default { ...@@ -125,14 +122,14 @@ export default {
getData() { getData() {
// this.userInfo.accountLevel = 1 // this.userInfo.accountLevel = 1
// this.SET_UESR_INFI({ accountLevel: 1 }) // this.SET_UESR_INFI({ accountLevel: 1 })
this.INIT_DATA()
if (this.tabIndex == 1) { if (this.tabIndex == 1) {
this.getReport({ this.getReport({
reportType: this.reportType, reportType: this.reportType,
reportTimeStart: this.outputData.reportTimeStart, reportTimeStart: this.outputData.reportTimeStart,
success: res => { success: res => {
this.hideLoading() this.hideLoading()
this.INIT_DATA() // this.INIT_DATA()
this.$refs.ranking.initFastData() this.$refs.ranking.initFastData()
} }
}) })
...@@ -143,7 +140,7 @@ export default { ...@@ -143,7 +140,7 @@ export default {
reportType: this.reportType, reportType: this.reportType,
success: res => { success: res => {
this.hideLoading() this.hideLoading()
this.INIT_DATA() // this.INIT_DATA()
this.$refs.ranking.initFastData() this.$refs.ranking.initFastData()
} }
}) })
...@@ -154,7 +151,6 @@ export default { ...@@ -154,7 +151,6 @@ export default {
reportType: this.reportType, reportType: this.reportType,
success: res => { success: res => {
this.hideLoading() this.hideLoading()
this.INIT_DATA()
this.$refs.ranking.initFastData() this.$refs.ranking.initFastData()
} }
}) })
...@@ -164,35 +160,32 @@ export default { ...@@ -164,35 +160,32 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.layout { .layout-wrap {
color: #333333; color: #333333;
font-size: 14px; font-size: 14px;
height: 100%; height: 100%;
overflow: hidden; padding: 0 15px;
.layout-wrap { box-sizing: border-box;
padding: 0 15px; position: relative;
box-sizing: border-box; height: 100%;
position: relative; box-sizing: border-box;
height: 100%; overflow: scroll;
box-sizing: border-box; .content {
overflow: scroll; position: absolute;
.content{ top: 0;
position:absolute; left: 15px;
top:0; right: 15px;
left:15px;
right:15px;
z-index:999;
}
}
.bottom {
position: fixed;
bottom: 0;
left: 0;
background: #ffffff;
z-index: 999; z-index: 999;
width: 100%;
right: 0;
} }
} }
.bottom {
position: fixed;
bottom: 0;
left: 0;
background: #ffffff;
z-index: 999;
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!