Prechádzať zdrojové kódy

添加花型统计功能

李天标 3 rokov pred
rodič
commit
763ec48ec7
7 zmenil súbory, kde vykonal 139 pridanie a 92 odobranie
  1. 4 1
      common/lang/en.js
  2. 4 1
      common/lang/zh.js
  3. 2 2
      configs/env.js
  4. 15 13
      main.js
  5. 1 1
      manifest.json
  6. 64 73
      pages.json
  7. 49 1
      pages/Charts/equipmentStatistics.vue

+ 4 - 1
common/lang/en.js

@@ -103,7 +103,10 @@ export default {
 		day:'Today sales ranking',
 		week:'Sales ranking of the week',
 		month:'Sales ranking for this month',
-		year:'Current sales ranking'
+		year:'Current sales ranking',
+		changeType:'statistical type',
+		sales:'sales volume',
+		flowers:'flower'
 	},
 	user:{
 		title:'me',

+ 4 - 1
common/lang/zh.js

@@ -101,7 +101,10 @@ export default {
 		day:'今日销售排行',
 		week:'本周销售排行',
 		month:'本月销售排行',
-		year:'本年销售排行'
+		year:'本年销售排行',
+		changeType:'统计方式',
+		sales:'销售额',
+		flowers:'花型'
 	},
 	user:{
 		title:'我的',

+ 2 - 2
configs/env.js

@@ -9,8 +9,8 @@ let configs = {
 if (process.env.NODE_ENV === 'development') {
 	// 测试环境
 	configs = Object.assign(configs, {
-		baseUrl: 'https://app.sunzee.com.cn/ShenzeeServer',
-		// baseUrl: 'http://127.0.0.1:8090',
+		// baseUrl: 'https://app.sunzee.com.cn/ShenzeeServer',
+		baseUrl: 'http://127.0.0.1:8090',
 	});
 }
 

+ 15 - 13
main.js

@@ -9,29 +9,31 @@ import en from '@/common/lang/en';
 import mainStatistics from '@/pages/Charts/mainStatistics';
 
 //谷歌地图
-import * as VueGoogleMaps from 'vue2-google-maps'
+// import * as VueGoogleMaps from 'vue2-google-maps'
 
-Vue.use(VueGoogleMaps, {
+// Vue.use(VueGoogleMaps, {
 
-  load: {
+//   load: {
 
-    key: 'AIzaSyAqxnF8_35P_vlxVGxKhfL2lxFup-qZF6g',
+//     key: 'AIzaSyAqxnF8_35P_vlxVGxKhfL2lxFup-qZF6g',
 
-    libraries: 'places', 
-	// This is required if you use the Autocomplete plugin
+//     libraries: 'places', 
+// 	// This is required if you use the Autocomplete plugin
 
-    // OR: libraries: 'places,drawing'
+//     // OR: libraries: 'places,drawing'
 
-    // OR: libraries: 'places,drawing,visualization'
+//     // OR: libraries: 'places,drawing,visualization'
 
-    // (as you require)
+//     // (as you require)
 
-    //// If you want to set the version, you can do so:
+//     //// If you want to set the version, you can do so:
+
+//     // v: '3.26',
+
+//   },
+// })
 
-    // v: '3.26',
 
-  },
-})
 Vue.use(VueI18n)
 
 // Vue.use(VueI18n,{

+ 1 - 1
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "申泽智能物联",
-    "appid" : "__UNI__C9DE28D",
+    "appid" : "__UNI__68205BE",
     "description" : "",
     "versionName" : "1.0.0",
     "versionCode" : "100",

+ 64 - 73
pages.json

@@ -1,6 +1,6 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
-		
+
 		{
 			"path": "pages/Login/Login",
 			"style": {
@@ -53,18 +53,6 @@
 				"navigationBarTitleText": "我的"
 			}
 		},
-		// {
-		//     "path" : "pages/User/promoCode",
-		//     "style" : {
-		//         "navigationBarTitleText" : "优惠码"
-		//     }
-		// },
-		// {
-		//     "path" : "pages/User/buyPromo",
-		//     "style" : {
-		//         "navigationBarTitleText" : "购买优惠码"
-		//     }
-		// },
 
 		{
 			"path": "pages/Charts/elseStatistics",
@@ -87,23 +75,6 @@
 				"enablePullDownRefresh": true
 			}
 		}
-		// {
-		//     "path" : "App",
-		//     "style" : {}
-		// }
-
-		// ,{
-		//     "path" : "pages/User/map",
-		//     "style" : {
-		//     	"navigationBarTitleText" : "Map"
-		//     }
-		// }
-		// ,{
-		//     "path" : "pages/User/GoogleMap",
-		//     "style" : {
-		//     	"navigationBarTitleText" : "GoogleMap"
-		//     }
-		// }
 	],
 	// "disableScroll": true
 	"globalStyle": {
@@ -259,8 +230,8 @@
 					"navigationBarTitleText": "退款",
 					"enablePullDownRefresh": false
 				}
-					
-			},{
+
+			}, {
 				"path": "pages/user/editor/editor",
 				"style": {
 					"navigationBarTitleText": "编辑公告",
@@ -273,62 +244,82 @@
 					"navigationBarTitleText": "审核",
 					"enablePullDownRefresh": false
 				}
-					
-			},{
+
+			}, {
 				"path": "pages/user/orderEit",
 				"style": {
 					"navigationBarTitleText": "详情",
 					"enablePullDownRefresh": false
 				}
-			},{
+			}, {
 				"path": "pages/user/modify/proportionCheck",
 				"style": {
 					"navigationBarTitleText": "分销修改",
 					"enablePullDownRefresh": false
 				}
-			},{
+			}, {
 				"path": "pages/user/modify/joinpayMchCheck",
 				"style": {
 					"navigationBarTitleText": "收款信息修改",
 					"enablePullDownRefresh": false
 				}
+			}, {
+				"path": "pages/user/modify/proportionCheckList",
+				"style": {
+					"navigationBarTitleText": "分销修改列表",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "pages/user/modify/joinpayMchCheckList",
+				"style": {
+					"navigationBarTitleText": "收款信息修改列表",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "pages/remote/flowerShow",
+				"style": {
+					"navigationBarTitleText": "售卖花型控制",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "pages/remote/debugParameters",
+				"style": {
+					"navigationBarTitleText": "调试页",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "pages/remote/jiebang",
+				"style": {
+					"navigationBarTitleText": "机器解绑",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "pages/remote/lianjie",
+				"style": {
+					"navigationBarTitleText": "连接服务器",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "pages/remote/jiebangDesc",
+				"style": {
+					"navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "pages/remote/lianjieDesc",
+				"style": {
+					"navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
 			}
-		    ,{
-                    "path" : "pages/user/modify/proportionCheckList",
-                    "style" :                                                                                    
-                {
-                    "navigationBarTitleText": "分销修改列表",
-                    "enablePullDownRefresh": false
-                }
-                
-                }
-                ,{
-                    "path" : "pages/user/modify/joinpayMchCheckList",
-                    "style" :                                                                                    
-                {
-                    "navigationBarTitleText": "收款信息修改列表",
-                    "enablePullDownRefresh": false
-                }
-                
-                }
-                ,{
-                    "path" : "pages/remote/flowerShow",
-                    "style" :                                                                                    
-                {
-                    "navigationBarTitleText": "售卖花型控制",
-                    "enablePullDownRefresh": false
-                }
-                
-                }
-                ,{
-                    "path" : "pages/remote/debugParameters",
-                    "style" :                                                                                    
-                {
-                    "navigationBarTitleText": "调试页",
-                    "enablePullDownRefresh": false
-                }
-                
-                }
-            ]
+		]
 	}]
 }

+ 49 - 1
pages/Charts/equipmentStatistics.vue

@@ -6,6 +6,18 @@
 		<view class="ri">
 			<font class="title">{{$t('equipmentStatics.title')}}</font>
 		</view>
+		<view class="uni-list">
+			<view class="uni-list-cell">
+				<view class="uni-list-cell-left">
+					{{$t('equipmentStatics.changeType')}}:
+				</view>
+				<view class="uni-list-cell-db" style="overflow: hidden;text-overflow: ellipsis;">
+					<picker @change="changeType"  :value="index" :range="changeTypeList">
+						<view class="uni-input">{{changeTypeList[index]}}</view>
+					</picker>
+				</view>
+			</view>
+		</view>
 		<view class="qiun-columns">
 			<view class="qiun-bg-white qiun-title-bar qiun-common-mt">
 				<view class="qiun-title-dot-light">
@@ -266,7 +278,9 @@
 				cHeight: '',
 				pixelRatio: 1,
 				tese: 0,
-
+				type:0,
+				index:0,
+				changeTypeList:[this.$t('equipmentStatics.sales'),this.$t('equipmentStatics.flowers')],
 				startDate1: '',
 				endDate1: '',
 				startDate2: '',
@@ -392,6 +406,12 @@
 
 				}
 			},
+		 changeType: function(e){
+			 this.index = e.target.value;
+				this.type = e.target.value;
+				this.tese = 1;
+				this.init();
+			},
 			initDateRang(day, chartType) {
 				const daystr = dateUtils.formateDate(day, 'yyyy/MM/dd');
 				if (chartType === 'day') {
@@ -611,6 +631,9 @@
 				if (this.equipmentId) {
 					param['equipmentId'] = this.equipmentId;
 				}
+				if(this.type=!''){
+					param['changeType'] = this.type;
+				}
 
 				return this.getEquipmentStatistics(param)
 					.then(data => {
@@ -1404,4 +1427,29 @@
 		width: 71upx;
 		height: 57upx;
 	}
+	.tr {
+		padding-top: 15upx;
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+		font-size: 26upx;
+		font-family: "PingFang-SC-Bold";
+	}
+	
+	.td-left {
+		font-family: "PingFang-SC-Bold";
+		margin: auto;
+		font-size: 26upx;
+		width: 30%;
+		text-align: right;
+	}
+	
+	.td-right {
+		font-family: "PingFang-SC-Bold";
+		/* font-weight: bold; */
+		margin: auto;
+		/* font-size: 26upx; */
+		width: 70%;
+		text-align: left;
+	}
 </style>