| 
					
				 | 
			
			
				@@ -8,7 +8,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <img class="user-img" :src="this.store?.storePicUrl" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <ul> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <li style="list-style-type: none;">{{this.user.role}}</li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-divider></el-divider> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <li style="list-style-type: none;">{{this.user?.name}}</li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-divider></el-divider> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <i class="el-icon-s-check"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <el-tag type="success">认证成功</el-tag> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </i> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -17,14 +19,16 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <ul class="login-info"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <li>当前时间:<span>{{this.time}}</span></li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <li>上次登录地址:<span>日本-我孙子市</span></li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <li style="list-style: none">北京时间:<span>{{this.time}}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <li style="list-style: none">上次登录地址:<el-divider direction="vertical"></el-divider> <span>江西省</span> <el-divider direction="vertical"></el-divider> <span>南昌市</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </ul> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-card> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-card class="table" shadow="always"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-table :data="todayData" style="width: 100%"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-table :data="todayData" height="380" style="width: 100%;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-table-column 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 v-for="(val, key) in labelToday" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 :key="key" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -80,7 +84,7 @@ import * as DateUtil from "/src/utils/DateUtil"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   data() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      user:[], //用户本地信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       store:[], //店铺信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       XYData:{monthX:[],barProductNames:[], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         barLastMonthAmount:[],barLastMonthCount:[], //上月 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -89,9 +93,9 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       YMax:{saleMax:0}, //店铺营销额Y轴 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       labelToday:{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         productName:"商品名称", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        productTypeName:"商品类型", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        count: "销量", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        amount: "今日金额", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // productTypeName:"商品类型", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        count: "总销量", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        amount: "总金额", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       todayData:[], // 当天的订单列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       factData:[], 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -134,13 +138,15 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           color: "#5ab1ef", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       ], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      time:new Date(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      timer:null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      time:Date.now(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   async mounted() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    this.user = JSON.parse(localStorage.getItem('xm-user') || '{}')   // 重新获取下用户的最新信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    this.timer = setInterval(()=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.time =new Date().toLocaleTimeString() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    },1000) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     await this.loadData() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 基于准备好的dom,初始化echarts实例 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     var bar = echarts.init(document.getElementById("bar")); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -277,7 +283,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     pie.setOption({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       title: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         left: "center", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        text: "营业总收入季度分布图", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        text: "24年营业总收入季度分布图", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         textStyle: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           color: "#6d6", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -366,7 +372,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   methods:{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    hilarity(){}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 数据加载 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -377,8 +383,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         that.store = await that.loadStore(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         that.store = that.store[0] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         console.log(that.store,"??",that.store?.storePicUrl) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        that.todayData = await that.loadAccountByBatch([1, 2], "2024-01-01", "2024-05-03") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        that.todayData = await that.loadAccountByBatch(that.store?.productsIds) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        that.todayData = that.todayData.filter(data=>{return  data!=null}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 加载月销量数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const monthAndSeason = await that.loadFactData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         that.factData = monthAndSeason["monthAccount"] 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -408,9 +414,10 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     async loadAccountByBatch( list,from,end){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const res = await this.$request.post("/saleStatement/getByPIdBatch",{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         productIds:list, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        timeStart: from, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        timeOver: end 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        timeStart: from?from:"0000-01-01", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        timeOver: end?end:"9999-12-31" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log(res,"AccountByBAtch") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return res.data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     async loadFactData(){// 加载月销量数据和 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -435,6 +442,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           timeOver: DateUtil.getCurrentDate() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log(res,resCur,"上月-当月") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         curMonth:resCur.data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         lastMonth:res.data, 
			 |