李天标 vor 5 Jahren
Ursprung
Commit
5a102f7e79

+ 1 - 1
components/u-charts/u-charts.js

@@ -55,7 +55,7 @@ var config = {
     fontSize: 13,
     //dataPointShape: ['diamond', 'circle', 'triangle', 'rect'],
 	dataPointShape: ['circle', 'circle', 'circle', 'circle'],//仿F2图例样式改为圆点
-    colors: ['#1890ff', '#2fc25b', '#facc14', '#f04864', '#8543e0', '#90ed7d'],
+    colors: ['#0B80E3', '#FC9F32', '#facc14', '#f04864', '#8543e0', '#90ed7d'],
     pieChartLinePadding: 15,
     pieChartTextPadding: 5,
     xAxisTextPadding: 3,

+ 201 - 53
pages/Charts/mainStatistics.vue

@@ -1,74 +1,160 @@
 <template>
 	<view>
 		<view class="head">
-			<view class="company">
-				<font style="color: #F76260;">申泽智能物联</font>
+			<view class="">
+				<image class="userFlagimg" src="../../static/img/userFlag.png" mode=""></image>
 			</view>
 			<view class="pname">
-				<font class="wenzi" style="color: #F76260;text-align:right">用户:{{pname}}</font>
+				<font class="wenzi" style="color: #BDD6F3;font-size:28upx">用户:{{pname}}</font>
+			</view>
+			<view class="company">
+				<font style="color: #BDD6F3;font-size:28upx">申泽智能物联</font>
 			</view>
 		</view>
-		<view class="qiun-title-bar color">
-			<view class="qiun-title-dot-light1"><font style="color: #FFFFFF;">总投放机器数量: {{machineTotalNum}}  工作机器数量:{{machineUseNum}}</font></view>
-			<view class="qiun-title-dot-light1"><font style="color: #FFFFFF;">今日收入总额: {{dayTotalMoney}}  销售数量:{{dayTotalNum}}</font></view>
-			<view class="qiun-title-dot-light1"><font style="color: #FFFFFF;">本周收入总额: {{weekTotalMoney}}  销售数量:{{weekTotalNum}}</font></view>
-			<view class="qiun-title-dot-light1"><font style="color: #FFFFFF;">本月收入总额: {{monthTotalMoney}}  销售数量:{{monthTotalNum}}</font></view>
-			<view class="qiun-title-dot-light1"><font style="color: #FFFFFF;">本年度收入总额: {{yearTotalMoney}}  销售数量:{{yearTotalNum}}</font></view>
+		<view class="ri">
+			<view class="riShell">
+				<view class="riImg">
+					<image style="width: 64upx;height: 64upx;padding-top: 20upx;" src="../../static/img/ri.png"></image>
+				</view>
+				<view class="riTitle">
+					<view style="text-align:left;font-size:28upx;font-family:PingFang-SC-Medium">
+						<font style="color: #596D83;">今日收入总额:\t\t\t  </font>
+						<font style="color: #ED341F;">  {{dayTotalMoney}}</font>
+					</view>
+					<view style="text-align:left;font-size:28upx;font-family:PingFang-SC-Medium">
+						<font style="color: #596D83;">今日销售数量:\t\t\t </font>
+						<font style="color: #ED341F;">  {{dayTotalNum}}</font>
+					</view>
+				</view>
+			</view>
+			<view class="riqi">
+				<view style="text-align:right" class="tody">
+					<font style="color: #596D83;">2019年10月7日</font>
+				</view>
+				<view  style="text-align:right" class="xingqi">
+					<font style="color: #596D83;">星期一</font>
+				</view>
+			</view>
+		</view>
+		<view class="fourTitle">
+			<view class="four">
+				<view class="fourImg">
+					<image style="width: 54upx;height: 54upx;padding-top: 20upx;" src="../../static/img/zhou.png" mode=""></image>
+				</view>
+				<view class="fourShell">
+					<view class="one">
+						<font style="color: #596D83;">本周收入总额:\t\t\t  </font>
+						<font style="color: #ED341F;">  {{dayTotalMoney}}</font>
+					</view>
+					<view class="two">
+						<font style="color: #596D83;">本周销售数量:\t\t\t </font>
+						<font style="color: #ED341F;">  {{dayTotalNum}}</font>
+					</view>
+				</view>
+			</view>
+			
+			<view class="four">
+				<view class="fourImg">
+					<image style="width: 54upx;height: 54upx;padding-top: 20upx;"  src="../../static/img/yue.png" mode=""></image>
+				</view>
+				<view class="fourShell">
+					<view class="one">
+						<font style="color: #596D83;">本月收入总额:\t\t\t  </font>
+						<font style="color: #ED341F;">  {{monthTotalMoney}}</font>
+					</view>
+					<view class="two">
+						<font style="color: #596D83;">本月销售数量:\t\t\t </font>
+						<font style="color: #ED341F;">  {{monthTotalNum}}</font>
+					</view>
+				</view>
+			</view>
+			
+			<view class="four">
+				<view class="fourImg">
+					<image style="width: 54upx;height: 54upx;padding-top: 20upx;"  src="../../static/img/nian.png" mode=""></image>
+				</view>
+				<view class="fourShell">
+					<view class="one">
+						<font style="color: #596D83;">本年收入总额:\t\t\t  </font>
+						<font style="color: #ED341F;">  {{yearTotalMoney}}</font>
+					</view>
+					<view class="two">
+						<font style="color: #596D83;">本年销售数量:\t\t\t </font>
+						<font style="color: #ED341F;">  {{yearTotalNum}}</font>
+					</view>
+				</view>
+			</view>
+			
+			<view class="four">
+				<view class="fourImg">
+					<image style="width: 54upx;height: 54upx;padding-top: 20upx;"  src="../../static/img/zong.png" mode=""></image>
+				</view>
+				<view class="fourShell">
+					<view class="one">
+						<font style="color: #596D83;">投放机器数量:\t\t\t  </font>
+						<font style="color: #ED341F;">  {{machineTotalNum}}</font>
+					</view>
+					<view class="two">
+						<font style="color: #596D83;">运营机器数量:\t\t\t </font>
+						<font style="color: #ED341F;">  {{machineUseNum}}</font>
+					</view>
+				</view>
+			</view>
 		</view>
 		<view class="qiun-columns">
 			<view class="qiun-bg-white qiun-title-bar qiun-common-mt">
 				<view class="qiun-title-dot-light">今日销售情况</view>
-				<view style="text-align: center;position: relative;">
+				<view class="shijian" style="text-align: center;position: relative;">
 					<image @click="pre('day')" class="preImg" src="/static/img/leftTriangle.png"></image>
 					<span>{{startDate1}}</span>
 					<image @click="next('day')" class="nextImg" src="/static/img/rightTriangle.png"></image>
 				</view>
 			</view>
-			<view class="qiun-charts" style="background-color: #E5FDC3;">
+			<view class="qiun-charts" style="background-color: #FFFFFF;">
 				<canvas canvas-id="canvaColumn1" id="canvaColumn1" class="charts" disable-scroll=true @touchstart="touchLine1" @touchmove="moveLine1"
-				 @touchend="touchEndLine1" style="background-color: #E5FDC3;"></canvas>
+				 @touchend="touchEndLine1" style="background-color: #FFFFFF;"></canvas>
 			</view>
 		</view>
 		<view class="qiun-columns">
 			<view class="qiun-bg-white qiun-title-bar qiun-common-mt">
 				<view class="qiun-title-dot-light">本周销售情况</view>
-				<view style="text-align: center;position: relative;">
+				<view class="shijian" style="text-align: center;position: relative;">
 					<image @click="pre('week')" class="preImg" src="/static/img/leftTriangle.png"></image>
 					<span>{{startDate2}} 至 {{endDate2}}</span>
 					<image @click="next('week')" class="nextImg" src="/static/img/rightTriangle.png"></image>
 				</view>
 			</view>
-			<view class="qiun-charts" style="background-color: #E5FDC3;">
+			<view class="qiun-charts" style="background-color: #FFFFFF;">
 				<canvas canvas-id="canvaColumn2" id="canvaColumn2" class="charts" disable-scroll=true @touchstart="touchLine2" @touchmove="moveLine2"
-				 @touchend="touchEndLine2" style="background-color: #E5FDC3;"></canvas>
+				 @touchend="touchEndLine2" style="background-color: #FFFFFF;"></canvas>
 			</view>
 		</view>
 		<view class="qiun-columns">
 			<view class="qiun-bg-white qiun-title-bar qiun-common-mt">
 				<view class="qiun-title-dot-light">本月销售情况</view>
-				<view style="text-align: center;position: relative;">
+				<view class="shijian" style="text-align: center;position: relative;">
 					<image @click="pre('month')" class="preImg" src="/static/img/leftTriangle.png"></image>
 					<span>{{startDate3}} 至 {{endDate3}}</span>
 					<image @click="next('month')" class="nextImg" src="/static/img/rightTriangle.png"></image>
 				</view>
 			</view>
-			<view class="qiun-charts" style="background-color: #E5FDC3;">
+			<view class="qiun-charts" style="background-color: #FFFFFF;">
 				<canvas canvas-id="canvaColumn3" id="canvaColumn3" class="charts" disable-scroll=true @touchstart="touchLine3" @touchmove="moveLine3"
-				 @touchend="touchEndLine3" style="background-color: #E5FDC3;"></canvas>
+				 @touchend="touchEndLine3" style="background-color: #FFFFFF;"></canvas>
 			</view>
 		</view>
 		<view class="qiun-columns">
 			<view class="qiun-bg-white qiun-title-bar qiun-common-mt">
 				<view class="qiun-title-dot-light">本年销售情况</view>
-				<view style="text-align: center;position: relative;">
+				<view class="shijian" style="text-align: center;position: relative;">
 					<image @click="pre('year')" class="preImg" src="/static/img/leftTriangle.png"></image>
 					<span>{{startDate4}} 至 {{endDate4}}</span>
 					<image @click="next('year')" class="nextImg" src="/static/img/rightTriangle.png"></image>
 				</view>
 			</view>
-			<view class="qiun-charts" style="background-color: #E5FDC3;">
+			<view class="qiun-charts" style="background-color: #FFFFFF;">
 				<canvas canvas-id="canvaColumn4" id="canvaColumn4" class="charts" disable-scroll=true @touchstart="touchLine4" @touchmove="moveLine4"
-				 @touchend="touchEndLine4" style="background-color: #E5FDC3;"></canvas>
+				 @touchend="touchEndLine4" style="background-color: #FFFFFF;"></canvas>
 			</view>
 		</view>
 	</view>
@@ -144,8 +230,8 @@
 				console.log("equipmentId:" + this.equipmentId)
 				_self = this;
 				//图表中图
-				this.cWidth = uni.upx2px(600);
-				this.cHeight = uni.upx2px(430);
+				this.cWidth = uni.upx2px(690);
+				this.cHeight = uni.upx2px(370);
 
 				await this.getMainStatisticsData();
 				
@@ -293,7 +379,7 @@
 					type: 'column',
 					legend: true,
 					fontSize: 11,
-					background: '#E5FDC3',//y轴颜色
+					background: '#FFFFFF',//y轴颜色
 					pixelRatio: 1,
 					animation: true,
 					categories: chartData.categories,
@@ -463,21 +549,32 @@
 </script>
 <style>
 	page {
-		background: #F2F2F2;
+		/* background: #F2F2F2; */
+		background:#FFFFFF;
 		width: 750upx;
 		overflow-x: hidden;
 	}
 	.head{
 		display: flex;
 		flex-direction: row;
+		background:#206DC3;
+		width: 750upx;
+		height: 180upx;
 	}
 	.company{
-		padding-left: 15upx;
 		width: 48%;
+		text-align:right;
 	}
 	.pname{
-		width: 48%;
-		text-align:right;
+		display: flex;
+		flex-direction: row;
+		width: 40%;
+	}
+	.userFlagimg{
+		padding-left: 10upx;
+		padding-top: 10upx;
+		width: 26upx;
+		height: 28upx;
 	}
 	.wenzi{
 		padding-right: 0upx;
@@ -486,6 +583,58 @@
 		overflow: hidden;
 		/* text-overflow: ellipsis; */
 	}
+	.ri{
+		width: 690upx;
+		height: 180upx;
+		background:#FFFFFF;
+		border-radius: 15upx;
+		/* 上移 */
+		transform: translateY(-90upx);
+		text-align:center;
+		margin: auto;
+		display: flex;
+		flex-direction: row;
+		/* 阴影 */
+		box-shadow:0upx -1upx   20upx #D3D3D3;
+		/* box-shadow:0px 0px  10px 5px #aaa; */
+	}
+	.riShell{
+		display: flex;
+		flex-direction: row;
+		margin: auto;
+	}
+	.riTitle{
+		display: flex;
+		flex-direction: column;
+		margin: auto;
+	}
+	.riqi{
+		display: flex;
+		flex-direction: column;
+		margin: auto;
+	}
+	.fourTitle{
+		width: 690upx;
+		height: 294upx;
+		display: flex;
+		flex-direction: row;
+		flex-wrap:wrap;
+		background:#FFFFFF;
+		box-shadow:0upx 0upx   20upx #D3D3D3;
+		margin: auto;
+		border-radius: 15upx;
+		transform: translateY(-60upx);
+		}
+	.four{
+		display: flex;
+		flex-direction: row;
+		margin: auto;
+		width: 48%;
+	}
+	.fourImg{
+		width: 54upx;
+		height: 54upx;
+	}
 	.qiun-padding {
 		padding: 2%;
 		width: 96%;
@@ -508,7 +657,7 @@
 	
 	.qiun-common-mt {
 		margin-top: 0upx;
-		height: 170upx;
+		height: 200upx;
 	}
 	
 	.qiun-bg-white {
@@ -521,44 +670,43 @@
 		flex-wrap: nowrap;
 		border-radius: 15upx;
 	}
-	.color{
-		background:#56de9e;
-	}
 	.qiun-title-dot-light {
-		/* border-left: 10upx solid #0ea391; */
-		padding-top: 10upx;
-		border-left: 20upx;
-		padding-left: 20upx;
-		font-family: "宋体";
-		font-size: 50upx;
-		color: #000000;
+		border-left: 30upx solid #0ea391;
+		padding-top: 20upx;
+		/* border-left: 20upx; */
+		padding-left: 10upx;
+		height: 85upx;
+		font-family: "PingFang-SC-Bold";
+		font-weight: bold;
+		margin: auto;
+		font-size: 32upx;
+		color: #363D44;
 	}
-	.qiun-title-dot-light1 {
-		/* border-left: 10upx solid #0ea391; */
-		padding-top: 10upx;
-		border-left: 20upx;
-		padding-left: 20upx;
-		font-family: "宋体";
-		font-size: 30upx;
-		color: #000000;
+	.shijian{
+		padding-top: 30upx;
+		height: 80upx;
+		width: 690upx;
+		margin: auto;
+		box-shadow:0upx 0upx 10upx #D3D3D3;
 	}
 	.qiun-charts {
-		width: 750upx;
-		height: 430upx;
+		width: 690upx;
+		height: 370upx;
+		padding-top: 30upx;
 		background-color: #FFFFFF;
 		margin: auto;
 	}
 	
 	.charts {
-		width: 600upx;
-		height: 430upx;
+		width: 690upx;
+		height: 370upx;
 		background-color: #FFFFFF;
 		margin: auto;
 	}
 	.preImg {
-		position: absolute;left: 40upx; width: 60upx;height: 60upx;
+		position: absolute;left: 40upx; width: 27upx;height: 45upx;
 	}
 	.nextImg {
-		position: absolute;right: 40upx; width: 60upx;height: 60upx;
+		position: absolute;right: 40upx; width: 27upx;height: 45upx;
 	}
 </style>

BIN
static/img/equipment.png


BIN
static/img/equipmentHL.png


BIN
static/img/home.png


BIN
static/img/homeHL.png


BIN
static/img/leftTriangle.png


BIN
static/img/merchantList.png


BIN
static/img/merchantListHL.png


BIN
static/img/nian.png


BIN
static/img/ri.png


BIN
static/img/rightTriangle.png


BIN
static/img/search.png


BIN
static/img/user.png


BIN
static/img/userFlag.png


BIN
static/img/userHL.png


BIN
static/img/yue.png


BIN
static/img/zhou.png


BIN
static/img/zong.png


BIN
static/img/头像.png