更新10.15

This commit is contained in:
许允枞 2024-10-15 09:53:01 +08:00
parent 6d48219cd6
commit bb21cf0aec

View File

@ -34,10 +34,14 @@
<div class="right-box"> <div class="right-box">
<div class="title_"> <div class="title_">
<div>通知中心</div> <div>通知中心</div>
<div style="font-size: 12px;color: #BBBBBB;cursor: pointer; display: flex;align-items: center" @click="goList()" >更多 <i class="el-icon-arrow-right"></i> </div> <div style="font-size: 12px;color: #BBBBBB;cursor: pointer; display: flex;align-items: center"
@click="goList()">更多 <i class="el-icon-arrow-right"></i></div>
</div> </div>
<!-- <div class="hang_" v-for="(item,index) in 4" :key="index" >到期提醒百业兴智慧油站系统将于2024年07月10日到期...</div>--> <!-- <div class="hang_" v-for="(item,index) in 4" :key="index" >到期提醒百业兴智慧油站系统将于2024年07月10日到期...</div>-->
<div class="hang_" v-for="(item,index) in noticeList" :key="index" >{{ item.notificationType }}{{ item.templateContent }}</div> <div class="hang_" v-for="(item,index) in noticeList" :key="index">{{
item.notificationType
}}{{ item.templateContent }}
</div>
<div class="hang_" v-if="this.noticeList.length==0">暂无通知</div> <div class="hang_" v-if="this.noticeList.length==0">暂无通知</div>
</div> </div>
</div> </div>
@ -46,7 +50,8 @@
<div class="d-s"> <div class="d-s">
<div class="h-tt" style="margin-right: 15px">数据看板</div> <div class="h-tt" style="margin-right: 15px">数据看板</div>
<el-dropdown placement="bottom-start"> <el-dropdown placement="bottom-start">
<div class="h-anniu" :class="{'q-anniu' : timeShow == false}" @click="timeShow = false ">近一周 <i class="el-icon-arrow-down el-icon--right"></i></div> <div class="h-anniu" :class="{'q-anniu' : timeShow == false}" @click="timeShow = false ">近一周 <i
class="el-icon-arrow-down el-icon--right"></i></div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item>今日</el-dropdown-item> <el-dropdown-item>今日</el-dropdown-item>
<el-dropdown-item>昨日</el-dropdown-item> <el-dropdown-item>昨日</el-dropdown-item>
@ -55,7 +60,9 @@
<el-dropdown-item>近一周</el-dropdown-item> <el-dropdown-item>近一周</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<div class="h-anniu" :class="{'q-anniu' : timeShow == true}" @click="timeShow = true" > <img src="../assets/images/zdy.png" style="width: 14px; height: 14px" > 自定义</div> <div class="h-anniu" :class="{'q-anniu' : timeShow == true}" @click="timeShow = true"><img
src="../assets/images/zdy.png" style="width: 14px; height: 14px"> 自定义
</div>
<div style="margin-right: 40px"> <div style="margin-right: 40px">
<el-date-picker <el-date-picker
v-model="value1" v-model="value1"
@ -143,7 +150,8 @@
<div class="h-tt" style="margin-right: 15px">油品交易分析</div> <div class="h-tt" style="margin-right: 15px">油品交易分析</div>
<el-dropdown placement="bottom-start"> <el-dropdown placement="bottom-start">
<div class="h-anniu" :class="{'q-anniu' : timeShow == false}" @click="timeShow = false ">近一周 <i class="el-icon-arrow-down el-icon--right"></i></div> <div class="h-anniu" :class="{'q-anniu' : timeShow == false}" @click="timeShow = false ">近一周 <i
class="el-icon-arrow-down el-icon--right"></i></div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item>今日</el-dropdown-item> <el-dropdown-item>今日</el-dropdown-item>
<el-dropdown-item>昨日</el-dropdown-item> <el-dropdown-item>昨日</el-dropdown-item>
@ -152,7 +160,9 @@
<el-dropdown-item>近一周</el-dropdown-item> <el-dropdown-item>近一周</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<div class="h-anniu" :class="{'q-anniu' : timeShow == true}" @click="timeShow = true" > <img src="../assets/images/zdy.png" style="width: 14px; height: 14px" > 自定义</div> <div class="h-anniu" :class="{'q-anniu' : timeShow == true}" @click="timeShow = true"><img
src="../assets/images/zdy.png" style="width: 14px; height: 14px"> 自定义
</div>
<div style="margin-right: 40px"> <div style="margin-right: 40px">
<el-date-picker <el-date-picker
v-model="value1" v-model="value1"
@ -164,12 +174,15 @@
@blur="getDataShow"> @blur="getDataShow">
</el-date-picker> </el-date-picker>
</div> </div>
<div id="cccf" style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div> <div id="cccf"
style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div>
</div> </div>
</div> </div>
<div class="right-box-t"> <div class="right-box-t">
<div style="font-size: 16px;font-weight: bold"><span style="margin-right: 15px">员工排行</span> <el-dropdown placement="bottom-start" > <div style="font-size: 16px;font-weight: bold"><span style="margin-right: 15px">员工排行</span>
<div class="h-anniu" :class="{'q-anniu' : timeShow == false}" @click="timeShow = false ">近一周 <i class="el-icon-arrow-down el-icon--right"></i></div> <el-dropdown placement="bottom-start">
<div class="h-anniu" :class="{'q-anniu' : timeShow == false}" @click="timeShow = false ">近一周 <i
class="el-icon-arrow-down el-icon--right"></i></div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item>今日</el-dropdown-item> <el-dropdown-item>今日</el-dropdown-item>
<el-dropdown-item>昨日</el-dropdown-item> <el-dropdown-item>昨日</el-dropdown-item>
@ -177,7 +190,8 @@
<el-dropdown-item>近一月</el-dropdown-item> <el-dropdown-item>近一月</el-dropdown-item>
<el-dropdown-item>近一周</el-dropdown-item> <el-dropdown-item>近一周</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown></div> </el-dropdown>
</div>
<div class="hui-box"> <div class="hui-box">
<div style="width: 10%">排名</div> <div style="width: 10%">排名</div>
<div>员工姓名</div> <div>员工姓名</div>
@ -213,7 +227,8 @@
<div class="d-s"> <div class="d-s">
<div class="h-tt" style="margin-right: 15px">数据统计</div> <div class="h-tt" style="margin-right: 15px">数据统计</div>
<el-dropdown placement="bottom-start"> <el-dropdown placement="bottom-start">
<div class="h-anniu" :class="{'q-anniu' : timeShow == false}" @click="timeShow = false ">近一周 <i class="el-icon-arrow-down el-icon--right"></i></div> <div class="h-anniu" :class="{'q-anniu' : timeShow == false}" @click="timeShow = false ">近一周 <i
class="el-icon-arrow-down el-icon--right"></i></div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item>今日</el-dropdown-item> <el-dropdown-item>今日</el-dropdown-item>
<el-dropdown-item>昨日</el-dropdown-item> <el-dropdown-item>昨日</el-dropdown-item>
@ -222,7 +237,9 @@
<el-dropdown-item>近一周</el-dropdown-item> <el-dropdown-item>近一周</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<div class="h-anniu" :class="{'q-anniu' : timeShow == true}" @click="timeShow = true" > <img src="../assets/images/zdy.png" style="width: 14px; height: 14px" > 自定义</div> <div class="h-anniu" :class="{'q-anniu' : timeShow == true}" @click="timeShow = true"><img
src="../assets/images/zdy.png" style="width: 14px; height: 14px"> 自定义
</div>
<div style="margin-right: 40px"> <div style="margin-right: 40px">
<el-date-picker <el-date-picker
v-model="value1" v-model="value1"
@ -236,7 +253,8 @@
</div> </div>
</div> </div>
<div id="ctct" style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div> <div id="ctct"
style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div>
</div> </div>
@ -253,6 +271,7 @@ import {getBannerListApi} from "@/api/sys/banner";
import {getNotificationlogList} from "@/api/sys/sysNotificationlog"; import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
import {employeeSalesApi} from "@/api/indexStatistics"; import {employeeSalesApi} from "@/api/indexStatistics";
import {getDataAnalysis, getDataBoard, getDataCount, getDataShow, getTotalAmount} from "@/api/allOrder"; import {getDataAnalysis, getDataBoard, getDataCount, getDataShow, getTotalAmount} from "@/api/allOrder";
export default { export default {
props: ["accountId"], props: ["accountId"],
@ -302,6 +321,8 @@ export default {
dataAnalysisOilNumberList: [], dataAnalysisOilNumberList: [],
dataAnalysisAllList: [], dataAnalysisAllList: [],
dataAnalysisIfOilList: [], dataAnalysisIfOilList: [],
//
dataCount: {},
} }
}, },
created() { created() {
@ -355,7 +376,7 @@ export default {
// //
getDataAnalysis() { getDataAnalysis() {
getDataAnalysis().then(res => { getDataAnalysis().then(res => {
console.log('数据分析的数据',res) // console.log('', res)
if (res.code == 200) { if (res.code == 200) {
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
if (res.data[i].type == 1) { if (res.data[i].type == 1) {
@ -366,9 +387,9 @@ export default {
this.dataAnalysisAllList.push(res.data[i]) this.dataAnalysisAllList.push(res.data[i])
} }
} }
console.log('dataAnalysisOilNumberList',this.dataAnalysisOilNumberList) // console.log('dataAnalysisOilNumberList', this.dataAnalysisOilNumberList)
console.log('dataAnalysisIfOilList',this.dataAnalysisIfOilList) // console.log('dataAnalysisIfOilList', this.dataAnalysisIfOilList)
console.log('dataAnalysisAllList',this.dataAnalysisAllList) // console.log('dataAnalysisAllList', this.dataAnalysisAllList)
// this.initChart() // this.initChart()
} }
}) })
@ -380,7 +401,7 @@ export default {
"endTime": this.value1[1].split(' ')[0] "endTime": this.value1[1].split(' ')[0]
} }
getDataShow(data).then(res => { getDataShow(data).then(res => {
console.log('首页数据展示',res) // console.log('', res)
}) })
}, },
// //
@ -390,7 +411,11 @@ export default {
"endTime": this.value1[1].split(' ')[0] "endTime": this.value1[1].split(' ')[0]
} }
getDataCount(data).then(res => { getDataCount(data).then(res => {
console.log('首页数据统计',res) console.log('首页数据统计', res.data)
if (res.code == 200) {
this.dataCount = res.data
this.initChart()
}
}) })
}, },
getNoticeList() { getNoticeList() {
@ -494,6 +519,32 @@ export default {
userBalanceList.push(item.userBalance) userBalanceList.push(item.userBalance)
}) })
} }
const times = this.dataCount.oilData.map(item => item.time);
const count = [];
for (let i = 0; i < this.dataCount.oilNames.length; i++) {
let a = {
name: this.dataCount.oilNames[i],
color: '#FF9655',
type: 'bar',
tooltip: {
valueFormatter: function (value) {
return value;
}
},
barWidth: 13,
itemStyle: {
normal: {
barBorderRadius: [50, 50, 0, 0]
}
},
barGap: '60%',
data: this.dataCount.oilData.map(item => item.money[i])
// data: oilAmountList
}
count.push(a)
}
console.log('count', count)
const option = { const option = {
color: [ color: [
@ -620,6 +671,7 @@ export default {
] ]
}; };
const option3 = { const option3 = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
@ -631,13 +683,13 @@ export default {
} }
}, },
legend: { legend: {
data: ['Evaporation', '油品交易额', '非油品交易额', '会员充值金额', '会员消费金额', '会员余额'] data: this.dataCount.oilNames
}, },
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
data: ['中建锦绣广场1站', '中建锦绣广场2站', '中建锦绣广场3站', '中建锦绣广场4站', '中建锦绣广场5站', '中建锦绣广场6站', '中建锦绣广场7站'], // data: ['广1', '广2', '广3', '广4', '广5', '广6', '广7'],
// data: storeNameList, data: times,
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow'
} }
@ -665,109 +717,110 @@ export default {
// } // }
// } // }
], ],
series: [ // series: [
{ // {
name: '油品交易额', // name: '',
color: '#FF9655', // color: '#FF9655',
type: 'bar', // type: 'bar',
tooltip: { // tooltip: {
valueFormatter: function (value) { // valueFormatter: function (value) {
return value; // return value;
} // }
}, // },
barWidth: 13, // barWidth: 13,
itemStyle: { // itemStyle: {
normal: { // normal: {
barBorderRadius: [50, 50, 0, 0] // barBorderRadius: [50, 50, 0, 0]
} // }
}, // },
barGap: '60%', // barGap: '60%',
// data: [ // data: [
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 // 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
// ] // ]
data: oilAmountList // // data: oilAmountList
}, // },
{ // {
name: '非油品交易额', // name: '',
color: '#55F3FF', // color: '#55F3FF',
type: 'bar', // type: 'bar',
tooltip: { // tooltip: {
valueFormatter: function (value) { // valueFormatter: function (value) {
return value; // return value;
} // }
}, // },
barWidth: 13, // barWidth: 13,
itemStyle: { // itemStyle: {
normal: { // normal: {
barBorderRadius: [50, 50, 0, 0] // barBorderRadius: [50, 50, 0, 0]
} // }
}, // },
// data: [ // // data: [
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 // // 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
// ] // // ]
data: noOilAmountList // data: noOilAmountList
}, // },
{ // {
name: '会员充值金额', // name: '',
color: '#0DC291', // color: '#0DC291',
type: 'bar', // type: 'bar',
tooltip: { // tooltip: {
valueFormatter: function (value) { // valueFormatter: function (value) {
return value; // return value;
} // }
}, // },
barWidth: 13, // barWidth: 13,
itemStyle: { // itemStyle: {
normal: { // normal: {
barBorderRadius: [50, 50, 0, 0] // barBorderRadius: [50, 50, 0, 0]
} // }
}, // },
// data: [ // // data: [
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 // // 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
// ] // // ]
data: rechargeBalanceList // data: rechargeBalanceList
}, // },
{ // {
name: '会员消费金额', // name: '',
color: '#fe8c4a', // color: '#fe8c4a',
type: 'bar', // type: 'bar',
tooltip: { // tooltip: {
valueFormatter: function (value) { // valueFormatter: function (value) {
return value; // return value;
} // }
}, // },
barWidth: 13, // barWidth: 13,
itemStyle: { // itemStyle: {
normal: { // normal: {
barBorderRadius: [50, 50, 0, 0] // barBorderRadius: [50, 50, 0, 0]
} // }
}, // },
// data: [ // // data: [
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 // // 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
// ] // // ]
data: consumeBalanceList // data: consumeBalanceList
}, // },
{ // {
name: '会员余额', // name: '',
color: '#D55F5F', // color: '#D55F5F',
type: 'bar', // type: 'bar',
tooltip: { // tooltip: {
valueFormatter: function (value) { // valueFormatter: function (value) {
return value; // return value;
} // }
}, // },
barWidth: 13, // barWidth: 13,
itemStyle: { // itemStyle: {
normal: { // normal: {
barBorderRadius: [50, 50, 0, 0] // barBorderRadius: [50, 50, 0, 0]
} // }
}, // },
// data: [ // data: [
// 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3 // 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
// ] // ]
data: userBalanceList // // data: userBalanceList
} // }
], // ],
series: count,
grid: { grid: {
left: '3%', left: '3%',
right: '3%', right: '3%',