Commit 6c7058cb by 王志慧

commit

1 parent 9ff73696
......@@ -6,6 +6,8 @@
.icon-equity { width: 40px; height: 44px; background-position: -50px -190px;}
.icon-helmet { width: 26px; height: 26px; background-position: -73px -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-message { width: 14px; height: 13px; background-position: -241px -244px;}
.icon-production { width: 40px; height: 44px; background-position: -150px -190px;}
......@@ -15,6 +17,4 @@
.icon-rank { width: 27px; height: 26px; background-position: 0px -244px;}
.icon-speed { width: 26px; height: 26px; background-position: -181px -244px;}
.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
.icon-wechat-customers { width: 40px; height: 44px; background-position: -300px -190px;}
\ 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 {
},
outputData: {
handler() {
this.initData()
this.initTextData()
},
deep: true
deep: true,
immediate: true
}
},
computed: {
......@@ -45,7 +46,8 @@ export default {
},
data() {
return {
data: []
data: [],
text: ''
}
},
mounted() {},
......@@ -53,26 +55,27 @@ export default {
...mapMutations({
SET_TABTYPE_INDEX: 'report/SET_TABTYPE_INDEX'
}),
initData() {
let {
userInfo: { accountLevel },
reportType,
outputData
} = this
let text
initTextData() {
let { reportType, outputData } = this
if (reportType == 0) {
text = '本周'
// document.title = '周报'
this.text = '本周'
document.title = '周报'
} else {
let time = outputData.reportTimeStart.split('-')
if (time[1] > 9) {
text = time[1] + '月'
if (parseInt(time[1]) > 9) {
this.text = time[1] + '月'
} else {
text = time[1].split('')[1] + '月'
this.text = time[1].split('')[1] + '月'
}
document.title = '月报'
}
},
initData() {
let {
userInfo: { accountLevel },
reportType,
text
} = this
if (accountLevel !== 4 && this.tabIndex == 0) {
//集团客户周月报
if (reportType == 0) {
......
......@@ -5,7 +5,7 @@
<canvas
id="lineCustomerChart"
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 == 0 && tabIndex == 0 && trendChartList.length > 0)
"
......@@ -16,13 +16,13 @@
<canvas
id="lineChart"
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 == 0 && trendList.length > 0)
"
></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
v-if="
......@@ -112,12 +112,11 @@ export default {
this.$nextTick(() => {
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 ==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()
})
},
initLineChart(id = 'lineChart') {
console.log('产值折线图')
let { tabIndex } = this
this.lineChart && this.lineChart.clear()
this.lineChart = null
......@@ -196,11 +195,7 @@ export default {
tickCount: 5,
range: [0, 1]
},
orderMoneyTotalSum: {
formatter(e) {
return Math.ceil(e)
}
}
orderMoneyTotalSum: {}
})
this.lineChart.axis('dataDateStr', {
label: function label(text, index, total) {
......@@ -213,23 +208,12 @@ export default {
return textCfg
}
})
// this.lineChart
// .area()
// .position('dataDateStr*orderMoneyTotalSum')
// .color('country', val => {
// return ['#3975C6', '#F7F7F7']
// })
// .adjust('stack')
this.lineChart.tooltip({
showTitle: true, // 展示 tooltip 的标题
layout: 'vertical'
})
this.lineChart.legend(false)
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 = {
top: true,
......@@ -242,22 +226,21 @@ export default {
}
}
this.lineChart.guide().text({
...textObj,
content: '日期',
offsetX: window.screen.width - 70,
offsetY: 14
})
// this.lineChart.guide().text({
// ...textObj,
// content: '日期',
// offsetX: window.screen.width - 70,
// offsetY: 14
// })
this.lineChart.guide().text({
...textObj,
content: '产值',
offsetX: -10,
offsetY: -160
offsetY: -175
})
this.lineChart.render()
},
initPieChart(id = 'pieChart') {
let { productionValueReportList, orderSource } = this
productionValueReportList.map(e => {
e.count = 'count'
......@@ -310,7 +293,6 @@ export default {
this.chart.render()
},
lineCustomerChart(id = 'lineCustomerChart') {
console.log('客户折线图')
// var tooltipEl = document.createElement('div')
// var dom = document.getElementById('lineCustomerChart')
this.lineChartCustomer && this.lineChartCustomer.clear()
......@@ -325,18 +307,16 @@ export default {
trendChartList.forEach(item => {
trendList.push(
{
{
dayTime: item.dayTime,
type: '新增企微客户数',
value: item.entMicroCount
},
{
{
dayTime: item.dayTime,
type: '新增客户数',
value: item.newlyCustomerCount
}
)
})
this.lineChartCustomer.source(trendList, {
......@@ -347,9 +327,9 @@ export default {
tickCount: 5
},
value: {
formatter(e) {
return Math.ceil(e)
}
type: 'linear',
nice: true,
tickInterval: 2
}
})
this.lineChartCustomer.axis('dayTime', {
......@@ -419,17 +399,17 @@ export default {
}
}
this.lineChartCustomer.guide().text({
...textObj,
content: '日期',
offsetX: window.screen.width - 70,
offsetY: 14
})
// this.lineChartCustomer.guide().text({
// ...textObj,
// content: '日期',
// offsetX: window.screen.width - 70,
// offsetY: 14
// })
this.lineChartCustomer.guide().text({
...textObj,
content: '数量',
offsetX: -10,
offsetY: -160
offsetY: -175
})
this.lineChartCustomer.render()
}
......
......@@ -138,7 +138,7 @@ export default {
width: auto;
border-radius: 3px;
height: 15px;
font-size: 11px;
font-size: 10px;
font-weight: 500;
line-height: 15px;
margin-left: 5px;
......@@ -169,6 +169,7 @@ export default {
}
.ratio {
margin-left: 2px;
margin-bottom:0;
& .applybcolor {
color: #3975c6;
}
......
......@@ -62,6 +62,9 @@ export default {
payload.reportData.productionValueReportList&&payload.reportData.productionValueReportList.map(e => {
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.productionValueReportList = payload.reportData.productionValueReportList ? payload.reportData.productionValueReportList : [];
state.trendList = payload.reportData.trendList ? payload.reportData.trendList : []//新增产值趋势图
......
<template>
<div class="layout">
<div class="layout-wrap">
<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 class="layout-wrap">
<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 class="bottom">
<tab :list="['客户统计', '产值统计']" @change="change" :index="tabIndex"></tab>
</div>
......@@ -125,14 +122,14 @@ export default {
getData() {
// this.userInfo.accountLevel = 1
// this.SET_UESR_INFI({ accountLevel: 1 })
this.INIT_DATA()
if (this.tabIndex == 1) {
this.getReport({
reportType: this.reportType,
reportTimeStart: this.outputData.reportTimeStart,
success: res => {
this.hideLoading()
this.INIT_DATA()
// this.INIT_DATA()
this.$refs.ranking.initFastData()
}
})
......@@ -143,7 +140,7 @@ export default {
reportType: this.reportType,
success: res => {
this.hideLoading()
this.INIT_DATA()
// this.INIT_DATA()
this.$refs.ranking.initFastData()
}
})
......@@ -154,7 +151,6 @@ export default {
reportType: this.reportType,
success: res => {
this.hideLoading()
this.INIT_DATA()
this.$refs.ranking.initFastData()
}
})
......@@ -164,35 +160,32 @@ export default {
}
</script>
<style lang="scss" scoped>
.layout {
.layout-wrap {
color: #333333;
font-size: 14px;
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;
bottom: 0;
left: 0;
background: #ffffff;
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;
width: 100%;
right: 0;
}
}
.bottom {
position: fixed;
bottom: 0;
left: 0;
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!