|
|
@@ -68,6 +68,7 @@ let userNum=ref('')
|
|
|
let carNum=ref('')
|
|
|
let routeNum=ref('')
|
|
|
let cyclNum=ref(0)
|
|
|
+let todayAll=ref('')
|
|
|
//
|
|
|
const getcyclNum=()=>{
|
|
|
apisystemdzbcCarlist({
|
|
|
@@ -96,8 +97,7 @@ const getcyclNum=()=>{
|
|
|
const getTodayOrder=()=>{
|
|
|
|
|
|
apisystemcommonOtherstatic({
|
|
|
- 'params[kyzId]':1,
|
|
|
- 'params[mdate]':dayjs().format('YYYY-MM-DD'),
|
|
|
+ 'params[mdate]':dayjs().subtract(6, 'd').format('YYYY-MM-DD'),
|
|
|
key:'order'
|
|
|
}).then(res=>{
|
|
|
if(res.code==200){
|
|
|
@@ -105,25 +105,44 @@ const getTodayOrder=()=>{
|
|
|
if(res.data.length==0){
|
|
|
|
|
|
|
|
|
- orderWrapOption.xAxis.data.push(dayjs().subtract(6, 'd').format('MM/DD'))
|
|
|
- orderWrapOption.xAxis.data.push(dayjs().subtract(5, 'd').format('MM/DD'))
|
|
|
- orderWrapOption.xAxis.data.push(dayjs().subtract(4, 'd').format('MM/DD'))
|
|
|
- orderWrapOption.xAxis.data.push(dayjs().subtract(3, 'd').format('MM/DD'))
|
|
|
- orderWrapOption.xAxis.data.push(dayjs().subtract(2, 'd').format('MM/DD'))
|
|
|
- orderWrapOption.xAxis.data.push(dayjs().subtract(1, 'd').format('MM/DD'))
|
|
|
- orderWrapOption.xAxis.data.push(dayjs().subtract(0, 'd').format('MM/DD'))
|
|
|
+
|
|
|
orderWrapOption.series[0].data=[0,0,0,0,0,0,0]
|
|
|
}else{
|
|
|
- orderWrapOption.xAxis.data=res.data.map(item=>{
|
|
|
+ // orderWrapOption.xAxis.data=res.data.map(item=>{
|
|
|
+ // return dayjs(item.createTime).format('MM/DD')
|
|
|
+ // })
|
|
|
+
|
|
|
+ for(let i=0;i<res.data.length;i++){
|
|
|
+ orderWrapOption.series[0].data[i]=res.data[i].num
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // orderWrapOption.series[0].data=res.data.map(item=>{
|
|
|
+
|
|
|
+ // return item.num
|
|
|
+ // })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- return dayjs(item.createTime).format('MM/DD')
|
|
|
- })
|
|
|
- orderWrapOption.series[0].data=res.data.map(item=>{
|
|
|
|
|
|
- return item.num
|
|
|
- })
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ todayAll.value=res.data.filter(item=>{
|
|
|
+
|
|
|
+ return dayjs(item.createTime).format('MM/DD')==dayjs().format('MM/DD')
|
|
|
+ })[0]
|
|
|
+
|
|
|
+ console.log(todayAll.value)
|
|
|
+
|
|
|
+
|
|
|
+ todayAll.value=todayAll.value?todayAll.value:0
|
|
|
orderWrapChart.setOption(orderWrapOption)
|
|
|
}
|
|
|
|
|
|
@@ -185,6 +204,14 @@ const getCarData=()=>{
|
|
|
}
|
|
|
|
|
|
onMounted(()=>{
|
|
|
+ orderWrapOption.xAxis.data.push(dayjs().subtract(6, 'd').format('MM/DD'))
|
|
|
+ orderWrapOption.xAxis.data.push(dayjs().subtract(5, 'd').format('MM/DD'))
|
|
|
+ orderWrapOption.xAxis.data.push(dayjs().subtract(4, 'd').format('MM/DD'))
|
|
|
+ orderWrapOption.xAxis.data.push(dayjs().subtract(3, 'd').format('MM/DD'))
|
|
|
+ orderWrapOption.xAxis.data.push(dayjs().subtract(2, 'd').format('MM/DD'))
|
|
|
+ orderWrapOption.xAxis.data.push(dayjs().subtract(1, 'd').format('MM/DD'))
|
|
|
+ orderWrapOption.xAxis.data.push(dayjs().subtract(0, 'd').format('MM/DD'))
|
|
|
+ orderWrapOption.series[0].data=[0,0,0,0,0,0,0]
|
|
|
getuserData()
|
|
|
getCarData()
|
|
|
getRouteData()
|
|
|
@@ -264,7 +291,7 @@ onMounted(()=>{
|
|
|
<div class="right-desc">
|
|
|
<div class="bold-title">今日订单</div>
|
|
|
<div class="num-wrap" style="color:#CA8A04">
|
|
|
- 357
|
|
|
+ {{todayAll}}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|