-
数据展示
+
+
油品交易分析
+
+ 近一周
+
+ 今日
+ 昨日
+ 近一周
+ 近一月
+ 近一周
+
+
+

自定义
+
+
+
+
+
-
员工排行
+
员工排行
+ 近一周
+
+ 今日
+ 昨日
+ 近一周
+ 近一月
+ 近一周
+
+
排名
员工姓名
-
会员充值金额(元)
-
油品销售金额(元)
-
总销售额(元)
+
会员充值金额
+
油品销售金额
+
总销售额
-
-
{{index +1}}
-
{{ item.realName }}
-
{{item.cardSum}}
-
{{item.oilSum}}
-
{{item.totalSum}}
+
+
+
{{index +1}}
+
{{ item.realName }}
+
{{item.cardSum}}
+
{{item.oilSum}}
+
{{item.totalSum}}
+
+
@@ -256,7 +290,7 @@ export default {
created() {
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
- this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ this.value1 = [parseTime(oneWeekAgo), parseTime(nowDate)]
this.getStoreTotal()
// this.selectChildByDeptIdApi()
this.getStoreAmount()
@@ -266,13 +300,11 @@ export default {
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
- this.value2 = [start,new Date()];
+ this.value2 = [start, new Date()];
this.getStoreList()
this.getHardwareList()
this.getNoticeList()
this.getEmployeList()
- this.getDataAnalysis()
- this.getDataShow()
},
mounted() {
// this.initChart()
@@ -281,43 +313,12 @@ export default {
goList() {
this.$router.push('/notificationList/index')
},
- // 获取数据分析信息
- 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 a = {
- startTime: "2024-01-01",
- endTime: "2024-11-01",
- }
- getDataShow(a).then(res => {
- console.log('数据展示的数据',res)
- })
- },
// 获取员工排行信息
getEmployeList() {
this.employeLoading = true
- employeeSalesApi().then(res=>{
- if(res.code == 200) {
- if (res.data.length >=10) {
+ employeeSalesApi().then(res => {
+ if (res.code == 200) {
+ if (res.data.length >= 10) {
this.employeList = res.data.slice(0, 10);
} else {
this.employeList = res.data
@@ -328,45 +329,45 @@ export default {
})
},
- getNoticeList(){
+ getNoticeList() {
getNotificationlogList({pageNo: 1, pageSize: 4}).then(res => {
this.noticeList = res.data.records
})
},
- getHardwareList(){
- getListApi({page: 1, pageSize: 3,status:'1'}).then(res=>{
+ getHardwareList() {
+ getListApi({page: 1, pageSize: 3, status: '1'}).then(res => {
this.hardwareList = res.data.records;
this.hardwareList.forEach(item => {
- if (item.image.includes(",")){
+ if (item.image.includes(",")) {
item.image = item.image.split(",")[0]
}
})
})
},
- getStoreList(){
- selectStoreAmount(this.addDateRange({},this.value2)).then(res => {
+ getStoreList() {
+ selectStoreAmount(this.addDateRange({}, this.value2)).then(res => {
this.storeList = res.data
this.initChart()
})
},
// 选择机构信息
- chooseDept(){
+ chooseDept() {
this.options.forEach(item => {
- if (item.deptId == this.value){
+ if (item.deptId == this.value) {
this.queryParams.ancestors = item.ancestors
}
})
this.getStoreAmount()
},
// banner图
- selectBannerList(){
+ selectBannerList() {
let queryParams = {
- pageNo:1,
- pageSize:10,
- systemPosition:"首页",
- bannerStatus:true
+ pageNo: 1,
+ pageSize: 10,
+ systemPosition: "首页",
+ bannerStatus: true
}
- getBannerListApi(queryParams).then(res=>{
+ getBannerListApi(queryParams).then(res => {
this.bannerList = res.data.records
})
},
@@ -377,28 +378,28 @@ export default {
})
},
// 核心数据
- getStoreTotal(){
+ getStoreTotal() {
getTotalAmount().then(res => {
this.storeTotal = res.data
})
},
- getStoreAmount(){
- getDataBoard(this.addDateRange(this.queryParams,this.value1)).then(res => {
+ getStoreAmount() {
+ getDataBoard(this.addDateRange(this.queryParams, this.value1)).then(res => {
this.storeAmount = res.data
this.initChart()
})
},
- countPercentage(upNum,downNum){
+ countPercentage(upNum, downNum) {
let percentage = 0;
- percentage = (upNum / downNum)*100
+ percentage = (upNum / downNum) * 100
return percentage.toFixed(2)
},
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 chart4= echarts.init(document.getElementById('cccf'))
+ const chart2 = echarts.init(document.getElementById('ccct'))
+ const chart3 = echarts.init(document.getElementById('ctct'))
+ const chart4 = echarts.init(document.getElementById('cccf'))
let dataList = []
let allTotal = 0
if (this.storeAmount.oilNameList) {
@@ -419,7 +420,7 @@ export default {
let rechargeBalanceList = []
let consumeBalanceList = []
let userBalanceList = []
- if (this.storeList.length>0) {
+ if (this.storeList.length > 0) {
this.storeList.forEach(item => {
storeNameList.push(item.storeName)
oilAmountList.push(item.oilAmount)
@@ -484,8 +485,14 @@ export default {
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: "非油品交易占比" },
+ {
+ 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: "非油品交易占比"
+ },
],
emphasis: {
@@ -519,10 +526,22 @@ export default {
// { 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: '便利店交易占比' },
+ {
+ 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: '便利店交易占比'
+ },
],
emphasis: {
@@ -547,7 +566,7 @@ export default {
}
},
legend: {
- data: ['Evaporation','油品交易额','非油品交易额', '会员充值金额','会员消费金额', '会员余额']
+ data: ['Evaporation', '油品交易额', '非油品交易额', '会员充值金额', '会员消费金额', '会员余额']
},
xAxis: [
{
@@ -702,7 +721,7 @@ export default {
}
},
legend: {
- data: ['Evaporation','油品交易额','非油品交易额', '会员充值金额','会员消费金额', '会员余额']
+ data: ['Evaporation', '油品交易额', '非油品交易额', '会员充值金额', '会员消费金额', '会员余额']
},
xAxis: [
{
@@ -861,34 +880,39 @@ export default {