常志远 1 anno fa
parent
commit
fa2b69ba61

+ 43 - 2
pages/equipmentDataMonitoring/equipmentElectricity.vue

@@ -85,7 +85,17 @@
 							{{item.name}}
 						</view>
 						<view class="equipment2 equipment-text-overflow">
-							{{item.companyName}}
+							<view class="companyName">
+								{{item.companyName}}
+							</view>
+							<!-- 离线 -->
+							<view class="state" >
+								<text class="off-line"></text>离线
+							</view>
+							<!-- 在线 -->
+							<!-- <view class="state state2" >
+								<text class="on-line"></text>在线
+							</view> -->
 						</view>
 					</view>
 					<view class="electricity">
@@ -357,7 +367,7 @@
 			}
 
 			.equipment {
-				width: 30%;
+				width: 40%;
 				margin-left: 16rpx;
 
 				// .equipment-text-overflow {
@@ -374,7 +384,38 @@
 				}
 
 				.equipment2 {
+					display: flex;
 					color: rgba(119, 119, 119, 1);
+					.companyName{
+						width: 60%;
+					// 	white-space: nowrap;
+					// overflow: hidden;
+					// text-overflow: ellipsis;
+					}
+					.state{
+						
+						display: flex;
+						align-items: center;
+						color: rgba(255,123,0,1);
+						text{
+							margin-right: 8rpx;
+							display: inline-block;
+							width: 16rpx;
+							height: 16rpx;
+							border-radius: 999px;
+						}
+						.off-line{
+							
+							background-color: rgba(255,123,0,1);
+							
+						}
+						.on-line{
+							background-color: rgba(0,185,98,1);
+						}
+					}
+					.state2{
+						color: rgba(0,185,98,1);
+					}
 				}
 			}
 

+ 14 - 7
pages/statistics/statistics.vue

@@ -110,15 +110,17 @@
 								{{item.name}}
 							</view>
 							<view class="equipment2 equipment-text-overflow">
-								{{item.companyName}}
+								<view class="companyName">
+									{{item.companyName}}
+								</view>
 								<!-- 离线 -->
-								<view class="state" >
+								<!-- <view class="state" >
 									<text class="off-line"></text>离线
-								</view>
+								</view> -->
 								<!-- 在线 -->
-								<!-- <view class="state state2" >
+								<view class="state state2" >
 									<text class="on-line"></text>在线
-								</view> -->
+								</view>
 							</view>
 						</view>
 						<view class="electricity">
@@ -644,7 +646,7 @@
 					border-bottom: 1px solid rgba(245, 245, 245, 1);
 
 					.equipment {
-						width: 35%;
+						width: 40%;
 						
 						// .equipment-text-overflow {
 						// 	display: -webkit-box;
@@ -661,7 +663,12 @@
 						.equipment2 {
 							color: rgba(119, 119, 119, 1);
 							display: flex;
-							
+							.companyName{
+								width: 60%;
+							// 	white-space: nowrap;
+                            //overflow: hidden;
+							// text-overflow: ellipsis;
+							}
 							.state{
 								margin-left: 12rpx;
 								display: flex;