فهرست منبع

去除无用资源 改用css样式

zhnghongrui 1 سال پیش
والد
کامیت
005c541041
2فایلهای تغییر یافته به همراه171 افزوده شده و 60 حذف شده
  1. 65 4
      pages/statistics/statistics.vue
  2. 106 56
      pages/work/index.vue

+ 65 - 4
pages/statistics/statistics.vue

@@ -206,7 +206,7 @@
 				</view>
 
 			</view>
-			<uni-divider></uni-divider>
+			<!-- 	<uni-divider></uni-divider>
 			<view class="view_bg_build" v-if="roomList.length > 0">
 				<view v-for="(item,index) in roomList" :key="index">
 					<uni-grid :column="roomCount">
@@ -217,6 +217,20 @@
 						</uni-grid-item>
 					</uni-grid>
 				</view>
+			</view> -->
+			<view class="view_bg_build" v-if="roomList.length > 0">
+
+
+				<view class="HuaDongBiao">
+
+					<view class="NeiRong" v-for="(item,index) in roomList" :key="index">
+						<view class="Fang" v-for="(item2, index2) in roomList[index]" :key="index2">
+							<view v-if="item2.roomStatus=='施工中'" class="ShiGongZhong">{{ item2.roomName }}</view>
+							<view v-else-if="item2.roomStatus=='未开工'" class="WeiShiGong">{{ item2.roomName }}</view>
+							<view v-else class="JunGong">{{ item2.roomName }}</view>
+						</view>
+					</view>
+				</view>
 			</view>
 			<view v-if="roomList.length == 0">暂无数据</view>
 			<view style="align-items: center;">
@@ -553,9 +567,9 @@
 
 <style>
 	.no-click {
-	  pointer-events: none;
+		pointer-events: none;
 	}
-	
+
 	.marginLeft5 {
 		margin-left: 5px;
 	}
@@ -615,7 +629,7 @@
 
 	.view_bg_build {
 		background-color: #e2f4ff;
-		padding: 10rpx;
+		padding: 10px;
 		margin: 20rpx;
 	}
 
@@ -700,4 +714,51 @@
 		align-content: center;
 		min-height: 64rpx;
 	}
+
+
+	.LouCeng {
+		font-size: 30rpx;
+		background-color: #4a4b52;
+		color: #FFEB3B;
+		font-weight: bold;
+	}
+
+	.Fang {
+		width: 60px;
+		display: inline-block;
+		line-height: 50rpx;
+		text-align: center;
+		margin-right: 10px;
+		margin-bottom: 10px;
+		
+		background-color: red;
+	}
+
+	.HuaDongBiao {
+		overflow: hidden;
+		display: inline-block;
+	}
+
+	.NeiRong {
+		overflow: auto;
+
+	}
+
+
+
+
+	.ShiGongZhong {
+		background-color: #5bd3ff;
+		color: #000;
+	}
+
+	.WeiShiGong {
+		background-color: #ffc881;
+		color: #000;
+	}
+
+	.JunGong {
+		background-color: #80d9ae;
+		color: #000;
+	}
 </style>

+ 106 - 56
pages/work/index.vue

@@ -1,52 +1,18 @@
 <template>
 	<view class="work-container">
-		
-		<!-- 宫格组件 -->
-		
-		<view class="grid-body">
-			<uni-grid :column="2" :showBorder="false">
-				<uni-grid-item>
-					<view class="grid-item-box" @click="showMinYong">
-					
-						<text class="text">民用工程</text>
-					</view>
-				</uni-grid-item>
 
 
+		<view class="grid-body">
 
-				<uni-grid-item>
-					<view class="grid-item-box" @click="showGongYe">
-					
-						<text class="text">工业工程</text>
-					</view>
-				</uni-grid-item>
-				<uni-grid-item>
-					<view class="grid-item-box" @click="municipalProjectClick">
-					
-						<text class="text">市政工程</text>
-					</view>
-				</uni-grid-item>
-				<uni-grid-item>
-					<view class="grid-item-box" @click="showDangerous">
-					
-						<text class="text">危险作业工程</text>
-					</view>
-				</uni-grid-item>
-				<uni-grid-item>
-					<view class="grid-item-box" @click="showTopPipe">
-					
-						<text class="text">顶管工程</text>
-					</view>
-				</uni-grid-item>
-				<uni-grid-item>
-					<view class="grid-item-box" @click="showInfrastructureDialog">
-						
-						<text class="text">基建工程</text>
-					</view>
-				</uni-grid-item>
 
+			<view class="Grid">
+				<view class="Grid-Item" v-for="item in List" :key="item.id" @click="navClick(item.id)"
+					hover-class="click-hover" hover-start-time="50" hover-stay-time="50">
 
-			</uni-grid>
+					<view class="GStitle">{{ item.title }}
+					</view>
+				</view>
+			</view>
 			<view v-if="showPopup" class="popup">
 				<view class="content">
 					<view class="line1">
@@ -54,8 +20,6 @@
 					</view>
 					<view class="line2" v-for="(item, index) in OldProjectList" :key="index">
 						<view @click="OldProject(item.dictValue)">{{item.dictLabel}}</view>
-						<!-- <view @click="Courtyard(0)">庭院</view>
-						<view @click="Overhead(0)">架空</view> -->
 
 					</view>
 					<view class="line1">
@@ -63,8 +27,6 @@
 					</view>
 					<view class="line2" v-for="(item, index) in NewProjectList" :key="index">
 						<view @click="NewProject(item.dictValue)">{{item.dictLabel}}</view>
-						<!-- <view @click="Courtyard(0)">庭院</view>
-						<view @click="Overhead(0)">架空</view> -->
 
 					</view>
 				</view>
@@ -123,10 +85,63 @@
 				enginClassValue: '', //二次节点  数据字典
 				current: 0,
 				swiperDotIndex: 0,
-			
+				List: [{
+						id: 1,
+						img: '/static/logo.png',
+						title: '民用工程'
+					},
+					{
+						id: 2,
+						img: '/static/logo.png',
+						title: '工业工程'
+					},
+					{
+						id: 3,
+						img: '/static/logo.png',
+						title: '市政工程'
+					},
+					{
+						id: 4,
+						img: '/static/logo.png',
+						title: '危险作业工程'
+					},
+					{
+						id: 5,
+						img: '/static/logo.png',
+						title: '顶管工程'
+					},
+					{
+						id: 6,
+						img: '/static/logo.png',
+						title: '基建工程'
+					},
+
+				]
+
+
 			}
 		},
 		methods: {
+			navClick(newId) {
+				if (newId == 1) {
+					this.showMinYong()
+				} else if (newId == 2) {
+					this.showGongYe();
+
+				} else if (newId == 3) {
+					this.municipalProjectClick();
+
+				} else if (newId == 4) {
+
+					this.showDangerous();
+				} else if (newId == 5) {
+					this.showTopPipe();
+				} else if (newId == 6) {
+					this.showInfrastructureDialog();
+
+				}
+
+			},
 			// 显示二次弹窗
 			handleShowSheet() {
 				this.shareState = true;
@@ -135,15 +150,7 @@
 			handleHiddenShare() {
 				this.shareState = false;
 			},
-			clickBannerItem(item) {
-				console.info(item)
-			},
-			changeSwiper(e) {
-				this.current = e.detail.current
-			},
-			changeGrid(e) {
-				this.$modal.showToast('模块建设中~')
-			},
+
 			showMinYong() {
 				this.projectType = 'MinYong';
 				getDicts("old_renovation").then(response => {
@@ -510,6 +517,7 @@
 		transition: all 0.3s ease;
 		transform: translateY(0%) !important;
 	}
+
 	.scroll-Y {
 		height: 350rpx;
 	}
@@ -587,4 +595,46 @@
 			border-top: 1rpx solid #E4E7ED;
 		}
 	}
+
+	/*********************九宫格********************* */
+	.Grid {
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		align-content: space-between;
+		background: #f7f7f7;
+		padding: 10rpx 0;
+
+		.Grid-Item {
+			width: 50%;
+			height: 100px;
+			text-align: center;
+			border: 1rpx solid #ff0000;
+			box-sizing: border-box;
+
+
+			.GSimg {
+				width: 96rpx;
+				height: 96rpx;
+				margin-top: 42rpx;
+				margin-left: 75rpx;
+
+				.Image {
+					width: 96rpx;
+					height: 96rpx;
+				}
+			}
+
+			.GStitle {
+				width: 100%;
+				color: #000;
+				font-size: 24rpx;
+				text-align: center;
+			}
+		}
+	}
+
+	.click-hover {
+		background-color: #d0d0d0;
+	}
 </style>