From ee7d0db4c69494a2038330f5d67a272a8111f47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Mon, 14 Oct 2024 14:24:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B010.14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fuintAdmin/src/views/shopowner.vue | 354 +++++++++++++++++------------ 1 file changed, 211 insertions(+), 143 deletions(-) diff --git a/fuintAdmin/src/views/shopowner.vue b/fuintAdmin/src/views/shopowner.vue index e27d35a4a..9bcfd1938 100644 --- a/fuintAdmin/src/views/shopowner.vue +++ b/fuintAdmin/src/views/shopowner.vue @@ -2,7 +2,7 @@
-
+
-
@@ -10,7 +10,7 @@
-
核心数据
+
核心数据
{{ storeTotal.allAmount || 0 }}
@@ -36,7 +36,7 @@
通知中心
更多
- +
【{{ item.notificationType }}】{{ item.templateContent }}
暂无通知
@@ -46,7 +46,7 @@
数据看板
-
近一周
+
近一周
今日 昨日 @@ -56,12 +56,10 @@
自定义
-
数据看板
-
近一周
-
油品销售金额(元)/交易笔数
+
油品销售金额(元)/交易笔数
{{ storeAmount.oilAmount || 0 }}/{{ storeAmount.oilNum || 0 }}
-
会员充值金额(元)/充值笔数
+
会员充值金额(元)/充值笔数
{{ storeAmount.userRechargeAmount || 0 }}/{{ storeAmount.userRechargeNum || 0 }}
-
便利店销售金额(元)/交易笔数
+
便利店销售金额(元)/交易笔数
{{ storeAmount.minimartAmount || 0 }}/{{ storeAmount.minimartNum || 0 }}
-
积分商城销售金额(元)/兑换笔数
+
积分商城销售金额(元)/兑换笔数
{{ storeAmount.pointMallAmount || 0 }}/{{ storeAmount.pointMallNum || 0 }}
@@ -108,7 +106,7 @@
- +
@@ -127,7 +125,7 @@ content="联系电话:1352415811"> -
+
@@ -135,30 +133,66 @@
{{ item.name }}
-
{{ item.name }}
+
-
数据展示
+
+
油品交易分析
+ +
近一周
+ + 今日 + 昨日 + 近一周 + 近一月 + 近一周 + +
+
自定义
+
+ + +
+
-
员工排行
+
员工排行 +
近一周
+ + 今日 + 昨日 + 近一周 + 近一月 + 近一周 + +
排名
员工姓名
-
会员充值金额(元)
-
油品销售金额(元)
-
总销售额(元)
+
会员充值金额
+
油品销售金额
+
总销售额
-
-
{{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 {