Compare commits
No commits in common. "e56315291c76737b51b8b36a00a94c9c2567e038" and "3615f2236788f5e02d64db57a9e95daca3346c81" have entirely different histories.
e56315291c
...
3615f22367
@ -166,7 +166,7 @@
|
|||||||
<span v-else-if="scope.row.type=='3'">储值卡</span>
|
<span v-else-if="scope.row.type=='3'">储值卡</span>
|
||||||
<span v-else-if="scope.row.type=='4'">积分</span>
|
<span v-else-if="scope.row.type=='4'">积分</span>
|
||||||
<span v-else-if="scope.row.type=='5'">囤油卡</span>
|
<span v-else-if="scope.row.type=='5'">囤油卡</span>
|
||||||
<span v-else-if="scope.row.type=='6'">收银台订单</span>
|
<span v-else-if="scope.row.type=='6'">油品加商品(收银台订单)</span>
|
||||||
<span v-else-if="scope.row.type=='7'">挂账订单</span>
|
<span v-else-if="scope.row.type=='7'">挂账订单</span>
|
||||||
<span v-else="">其他</span>
|
<span v-else="">其他</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
>
|
@blur="getStoreAmount">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -277,11 +277,6 @@ export default
|
|||||||
props: ["accountId"],
|
props: ["accountId"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//数据分析 饼状图
|
|
||||||
chart:null,
|
|
||||||
chart1:null,
|
|
||||||
chart2:null,
|
|
||||||
|
|
||||||
amountList: [
|
amountList: [
|
||||||
// "今日" ,
|
// "今日" ,
|
||||||
// "昨日" ,
|
// "昨日" ,
|
||||||
@ -350,20 +345,15 @@ export default
|
|||||||
dataShows: {},
|
dataShows: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
value1: function (newValue, oldValue) {
|
|
||||||
this.getDataAnalysis()
|
|
||||||
this.getStoreAmount()
|
|
||||||
},
|
|
||||||
},
|
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||||
this.value1 = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
this.value1 = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
||||||
this.countValue = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
this.countValue = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
||||||
this.showValue = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
this.showValue = [parseTime(oneWeekAgo), parseTime(nowDate)]
|
||||||
this.getStoreTotal()
|
this.getStoreTotal()
|
||||||
|
// this.selectChildByDeptIdApi()
|
||||||
|
this.getStoreAmount()
|
||||||
this.selectBannerList()
|
this.selectBannerList()
|
||||||
let start = new Date();
|
let start = new Date();
|
||||||
start.setHours(0)
|
start.setHours(0)
|
||||||
@ -375,17 +365,13 @@ export default
|
|||||||
this.getHardwareList()
|
this.getHardwareList()
|
||||||
this.getNoticeList()
|
this.getNoticeList()
|
||||||
this.getEmployeList()
|
this.getEmployeList()
|
||||||
//数据看板
|
|
||||||
this.getStoreAmount()
|
|
||||||
this.getDataAnalysis()
|
this.getDataAnalysis()
|
||||||
//
|
|
||||||
this.getDataShow()
|
this.getDataShow()
|
||||||
this.getDataCount()
|
this.getDataCount()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.initChart();
|
this.initChart();
|
||||||
this.initChartPieChart();
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -421,6 +407,8 @@ export default
|
|||||||
} else if (command == '自定义') {
|
} else if (command == '自定义') {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
this.getStoreAmount()
|
||||||
|
this.getDataAnalysis()
|
||||||
},
|
},
|
||||||
goList() {
|
goList() {
|
||||||
this.$router.push('/notificationList/index')
|
this.$router.push('/notificationList/index')
|
||||||
@ -620,38 +608,29 @@ export default
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 数据看板 油品 会员充值 商品 积分 统计数据
|
// 获取数据分析信息
|
||||||
getStoreAmount() {
|
|
||||||
let data = {
|
|
||||||
startTime: this.value1[0],
|
|
||||||
endTime: this.value1[1]
|
|
||||||
}
|
|
||||||
getDataBoardNew(data).then(res => {
|
|
||||||
this.storeAmount = res.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 数据看板 三个饼状图
|
|
||||||
getDataAnalysis() {
|
getDataAnalysis() {
|
||||||
let data = {
|
let data = {
|
||||||
startTime: this.value1[0],
|
startTime: this.value1[0],
|
||||||
endTime: this.value1[1]
|
endTime: this.value1[1]
|
||||||
}
|
}
|
||||||
|
//获取第一个饼状图数据
|
||||||
Promise.all([
|
getOilPercentage(data).then(res => {
|
||||||
getOilPercentage(data),
|
this.dataAnalysisOilNumberList = res.data
|
||||||
getOilAndGoodsPercentage(data),
|
console.log("饼状图一数据",this.dataAnalysisOilNumberList )
|
||||||
getOilAndGoodsAndVipAndPoints(data)
|
})
|
||||||
]).then(([res1, res2, res3]) => {
|
//获取第二个饼状图数据
|
||||||
|
getOilAndGoodsPercentage(data).then(res => {
|
||||||
this.dataAnalysisOilNumberList = res1.data;
|
this.dataAnalysisIfOilList = res.data
|
||||||
this.dataAnalysisIfOilList = res2.data;
|
console.log("饼状图二数据",this.dataAnalysisIfOilList)
|
||||||
this.dataAnalysisAllList = res3.data;
|
})
|
||||||
|
//获取第三个饼状图数据
|
||||||
this.initChartPieChartUpdate();
|
getOilAndGoodsAndVipAndPoints(data).then(res => {
|
||||||
}).catch(error => {
|
this.dataAnalysisAllList = res.data
|
||||||
console.error('Error fetching data:', error);
|
console.log("饼状图三数据",this.dataAnalysisAllList )
|
||||||
});
|
})
|
||||||
|
//
|
||||||
|
// this.initChart()
|
||||||
},
|
},
|
||||||
//油站首页数据展示
|
//油站首页数据展示
|
||||||
getDataShow() {
|
getDataShow() {
|
||||||
@ -708,7 +687,7 @@ export default
|
|||||||
this.queryParams.ancestors = item.ancestors
|
this.queryParams.ancestors = item.ancestors
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.getDataAnalysis()
|
this.getStoreAmount()
|
||||||
},
|
},
|
||||||
// banner图
|
// banner图
|
||||||
selectBannerList() {
|
selectBannerList() {
|
||||||
@ -734,13 +713,27 @@ export default
|
|||||||
this.storeTotal = res.data
|
this.storeTotal = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getStoreAmount() {
|
||||||
|
let data = {
|
||||||
|
startTime: this.value1[0],
|
||||||
|
endTime: this.value1[1]
|
||||||
|
}
|
||||||
|
getDataBoardNew(data).then(res => {
|
||||||
|
this.storeAmount = res.data
|
||||||
|
this.getDataAnalysis()
|
||||||
|
this.initChart()
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
countPercentage(upNum, downNum) {
|
countPercentage(upNum, downNum) {
|
||||||
let percentage = 0;
|
let percentage = 0;
|
||||||
percentage = (upNum / downNum) * 100
|
percentage = (upNum / downNum) * 100
|
||||||
return percentage.toFixed(2)
|
return percentage.toFixed(2)
|
||||||
},
|
},
|
||||||
initChart() {
|
initChart() {
|
||||||
|
const chart = echarts.init(document.getElementById('ccc'))
|
||||||
|
const chart1 = echarts.init(document.getElementById('cccc'))
|
||||||
|
const chart2 = echarts.init(document.getElementById('ccct'))
|
||||||
const chart3 = echarts.init(document.getElementById('ctct'))
|
const chart3 = echarts.init(document.getElementById('ctct'))
|
||||||
const chart4 = echarts.init(document.getElementById('cccf'))
|
const chart4 = echarts.init(document.getElementById('cccf'))
|
||||||
let dataList = []
|
let dataList = []
|
||||||
@ -808,124 +801,6 @@ export default
|
|||||||
showCount.push(a)
|
showCount.push(a)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const option3 = {
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: {
|
|
||||||
type: 'cross',
|
|
||||||
crossStyle: {
|
|
||||||
color: '#999'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: this.dataCount.oilNames,
|
|
||||||
left: 'right'
|
|
||||||
},
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: 'category',
|
|
||||||
// data: ['中建锦绣广场1站', '中建锦绣广场2站', '中建锦绣广场3站', '中建锦绣广场4站', '中建锦绣广场5站', '中建锦绣广场6站', '中建锦绣广场7站'],
|
|
||||||
data: times,
|
|
||||||
axisPointer: {
|
|
||||||
type: 'shadow'
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
interval: 0,
|
|
||||||
// rotate: 30
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: 'value',
|
|
||||||
name: '金额(元)',
|
|
||||||
// min: 0,
|
|
||||||
// max: 10000,
|
|
||||||
// interval: 2000,
|
|
||||||
axisLabel: {
|
|
||||||
formatter: '{value}'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
],
|
|
||||||
dataset: {
|
|
||||||
source: count
|
|
||||||
},
|
|
||||||
|
|
||||||
series: countType,
|
|
||||||
grid: {
|
|
||||||
left: '3%',
|
|
||||||
right: '3%',
|
|
||||||
bottom: '3%',
|
|
||||||
containLabel: true
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const option4 = {
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: {
|
|
||||||
type: 'cross',
|
|
||||||
crossStyle: {
|
|
||||||
color: '#999'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: this.dataShows.oilNames,
|
|
||||||
left: 'right'
|
|
||||||
|
|
||||||
},
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: 'category',
|
|
||||||
data: showTimes,
|
|
||||||
axisPointer: {
|
|
||||||
type: 'shadow'
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
interval: 0,
|
|
||||||
// rotate: 30
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: 'value',
|
|
||||||
name: '金额(元)',
|
|
||||||
axisLabel: {
|
|
||||||
formatter: '{value}'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
dataset: {
|
|
||||||
source: showCount
|
|
||||||
},
|
|
||||||
series: showCountType,
|
|
||||||
grid: {
|
|
||||||
left: '3%',
|
|
||||||
right: '3%',
|
|
||||||
bottom: '5%',
|
|
||||||
containLabel: true
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
chart3.setOption(option3)
|
|
||||||
chart4.setOption(option4)
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
//数据分析 饼状图 ECharts 图初始化
|
|
||||||
initChartPieChart(){
|
|
||||||
this.chart = echarts.init(document.getElementById('ccc'))
|
|
||||||
this.chart1 = echarts.init(document.getElementById('cccc'))
|
|
||||||
this.chart2 = echarts.init(document.getElementById('ccct'))
|
|
||||||
this.initChartPieChartUpdate()
|
|
||||||
},
|
|
||||||
//数据分析 饼状图 ECharts 渲染
|
|
||||||
initChartPieChartUpdate(){
|
|
||||||
const option = {
|
const option = {
|
||||||
color: [
|
color: [
|
||||||
'#36b713',
|
'#36b713',
|
||||||
@ -1047,9 +922,115 @@ export default
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
if (this.chart) this.chart.setOption(option);
|
|
||||||
if (this.chart1) this.chart1.setOption(option1);
|
const option3 = {
|
||||||
if (this.chart2) this.chart2.setOption(option2);
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
type: 'cross',
|
||||||
|
crossStyle: {
|
||||||
|
color: '#999'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: this.dataCount.oilNames,
|
||||||
|
left: 'right'
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
// data: ['中建锦绣广场1站', '中建锦绣广场2站', '中建锦绣广场3站', '中建锦绣广场4站', '中建锦绣广场5站', '中建锦绣广场6站', '中建锦绣广场7站'],
|
||||||
|
data: times,
|
||||||
|
axisPointer: {
|
||||||
|
type: 'shadow'
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
interval: 0,
|
||||||
|
// rotate: 30
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: 'value',
|
||||||
|
name: '金额(元)',
|
||||||
|
// min: 0,
|
||||||
|
// max: 10000,
|
||||||
|
// interval: 2000,
|
||||||
|
axisLabel: {
|
||||||
|
formatter: '{value}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
dataset: {
|
||||||
|
source: count
|
||||||
|
},
|
||||||
|
|
||||||
|
series: countType,
|
||||||
|
grid: {
|
||||||
|
left: '3%',
|
||||||
|
right: '3%',
|
||||||
|
bottom: '3%',
|
||||||
|
containLabel: true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const option4 = {
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
type: 'cross',
|
||||||
|
crossStyle: {
|
||||||
|
color: '#999'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: this.dataShows.oilNames,
|
||||||
|
left: 'right'
|
||||||
|
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
data: showTimes,
|
||||||
|
axisPointer: {
|
||||||
|
type: 'shadow'
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
interval: 0,
|
||||||
|
// rotate: 30
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: 'value',
|
||||||
|
name: '金额(元)',
|
||||||
|
axisLabel: {
|
||||||
|
formatter: '{value}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
dataset: {
|
||||||
|
source: showCount
|
||||||
|
},
|
||||||
|
series: showCountType,
|
||||||
|
grid: {
|
||||||
|
left: '3%',
|
||||||
|
right: '3%',
|
||||||
|
bottom: '5%',
|
||||||
|
containLabel: true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
chart.setOption(option)
|
||||||
|
chart1.setOption(option1)
|
||||||
|
chart2.setOption(option2)
|
||||||
|
chart3.setOption(option3)
|
||||||
|
chart4.setOption(option4)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user