更新10.14

This commit is contained in:
许允枞 2024-10-14 17:20:49 +08:00
parent 5ef3b1964d
commit 45dca221d8
2 changed files with 99 additions and 40 deletions

View File

@ -180,3 +180,12 @@ export function getDataShow(query) {
});
}
// 油站首页数据展示
export function getDataCount(query) {
return request({
url: 'business/allOrderInfo/getDataCount',
method: 'get',
params:query
});
}

View File

@ -160,7 +160,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@blur="getStoreAmount">
@blur="getDataAnalysis">
</el-date-picker>
</div>
</div>
@ -229,7 +229,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@blur="getStoreAmount">
@blur="getDataCount">
</el-date-picker>
</div>
</div>
@ -250,7 +250,7 @@ import {parseTime} from "@/utils/fuint";
import {getBannerListApi} from "@/api/sys/banner";
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
import {employeeSalesApi} from "@/api/indexStatistics";
import {getDataBoard, getTotalAmount} from "@/api/allOrder";
import {getDataAnalysis, getDataBoard, getDataCount, getDataShow, getTotalAmount} from "@/api/allOrder";
export default {
props:["accountId"],
@ -297,6 +297,9 @@ export default {
hardwareList:[],
noticeList:[],
employeList:[],
dataAnalysisOilNumberList:[],
dataAnalysisAllList:[],
dataAnalysisIfOilList:[],
}
},
created() {
@ -317,6 +320,9 @@ export default {
this.getHardwareList()
this.getNoticeList()
this.getEmployeList()
this.getDataAnalysis()
this.getDataShow()
this.getDataCount()
},
mounted() {
// this.initChart()
@ -341,6 +347,47 @@ export default {
})
},
//
getDataAnalysis() {
getDataAnalysis().then(res => {
console.log('数据分析的数据',res)
if (res.code == 200) {
for (let i = 0; i < res.data.length; i++) {
if (res.data[i].type == 1) {
this.dataAnalysisOilNumberList.push(res.data[i])
}else if (res.data[i].type == 2) {
this.dataAnalysisIfOilList.push(res.data[i])
}else if (res.data[i].type == 3) {
this.dataAnalysisAllList.push(res.data[i])
}
}
console.log('dataAnalysisOilNumberList',this.dataAnalysisOilNumberList)
console.log('dataAnalysisIfOilList',this.dataAnalysisIfOilList)
console.log('dataAnalysisAllList',this.dataAnalysisAllList)
// this.initChart()
}
})
},
//
getDataShow(){
const data = {
"startTime": this.value1[0].split(' ')[0],
"endTime": this.value1[1].split(' ')[0]
}
getDataShow(data).then(res => {
console.log('首页数据展示',res)
})
},
//
getDataCount(){
const data = {
"startTime": this.value1[0].split(' ')[0],
"endTime": this.value1[1].split(' ')[0]
}
getDataCount(data).then(res => {
console.log('首页数据统计',res)
})
},
getNoticeList() {
getNotificationlogList({pageNo: 1, pageSize: 4}).then(res => {
this.noticeList = res.data.records
@ -468,7 +515,7 @@ export default {
//
//
// ],
data: dataList,
data: this.dataAnalysisOilNumberList,
emphasis: {
itemStyle: {
shadowBlur: 10,
@ -494,19 +541,20 @@ export default {
name: 'Access From',
type: 'pie',
radius: '80%',
data: [
// { value: 28, name: '28%' },
// { value: 72, name: '72%' },
{
value: this.countPercentage(Number(this.storeAmount.oilNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.noOilNum)),
name: "油品交易占比"
},
{
value: this.countPercentage(Number(this.storeAmount.noOilNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.noOilNum)),
name: "非油品交易占比"
},
],
// data: [
// // { value: 28, name: '28%' },
// // { value: 72, name: '72%' },
// {
// value: this.countPercentage(Number(this.storeAmount.oilNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.noOilNum)),
// name: ""
// },
// {
// value: this.countPercentage(Number(this.storeAmount.noOilNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.noOilNum)),
// name: ""
// },
//
// ],
data:this.dataAnalysisIfOilList,
emphasis: {
itemStyle: {
shadowBlur: 10,
@ -533,29 +581,30 @@ export default {
name: 'Access From',
type: 'pie',
radius: [50, '80%'],
data: [
// { value: 28, name: '' },
// { value: 72, name: '' },
// { value: 28, name: '' },
// { value: 72, name: '便' },
{
value: this.countPercentage(Number(this.storeAmount.userNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.userNum) + Number(this.storeAmount.integralNum) + Number(this.storeAmount.goodNum)),
name: '会员充值占比'
},
{
value: this.countPercentage(Number(this.storeAmount.integralNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.userNum) + Number(this.storeAmount.integralNum) + Number(this.storeAmount.goodNum)),
name: '积分商城交易占比'
},
{
value: this.countPercentage(Number(this.storeAmount.oilNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.userNum) + Number(this.storeAmount.integralNum) + Number(this.storeAmount.goodNum)),
name: '油品交易占比'
},
{
value: this.countPercentage(Number(this.storeAmount.goodNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.userNum) + Number(this.storeAmount.integralNum) + Number(this.storeAmount.goodNum)),
name: '便利店交易占比'
},
],
// data: [
// // { value: 28, name: '' },
// // { value: 72, name: '' },
// // { value: 28, name: '' },
// // { value: 72, name: '便' },
// {
// value: this.countPercentage(Number(this.storeAmount.userNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.userNum) + Number(this.storeAmount.integralNum) + Number(this.storeAmount.goodNum)),
// name: ''
// },
// {
// value: this.countPercentage(Number(this.storeAmount.integralNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.userNum) + Number(this.storeAmount.integralNum) + Number(this.storeAmount.goodNum)),
// name: ''
// },
// {
// value: this.countPercentage(Number(this.storeAmount.oilNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.userNum) + Number(this.storeAmount.integralNum) + Number(this.storeAmount.goodNum)),
// name: ''
// },
// {
// value: this.countPercentage(Number(this.storeAmount.goodNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.userNum) + Number(this.storeAmount.integralNum) + Number(this.storeAmount.goodNum)),
// name: '便'
// },
//
// ],
data:this.dataAnalysisAllList,
emphasis: {
itemStyle: {
shadowBlur: 10,
@ -878,6 +927,7 @@ export default {
}
};
chart.setOption(option)
console.log('chart',chart)
chart1.setOption(option1)
chart2.setOption(option2)
chart3.setOption(option3)