From a50857b21ee10ccf41e1d461a843c20a2a9d5cee Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Tue, 05 Dec 2023 18:01:25 +0800
Subject: [PATCH] 数据驾驶舱页面编写,修复部分问题

---
 components/btn/footerBtn.vue    |    2 
 pages/home/index.vue            |   80 ++++++++++---------
 subPackage/statistics/index.vue |  100 +++++++++++++++++++++++--
 subPackage/article/detail.vue   |    4 
 4 files changed, 137 insertions(+), 49 deletions(-)

diff --git a/components/btn/footerBtn.vue b/components/btn/footerBtn.vue
index 8753dd7..bf330a0 100644
--- a/components/btn/footerBtn.vue
+++ b/components/btn/footerBtn.vue
@@ -31,7 +31,7 @@
 		left:0;
 		background-color: #fff;
 		z-index: 10;
-		padding-bottom: env(safe-area-inset-bottom); 
+		padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx); 
 		
 		.footer-btn{
 			width:100%;
diff --git a/pages/home/index.vue b/pages/home/index.vue
index d82e924..23b7892 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -20,14 +20,14 @@
 					</u-grid-item>
 				</u-grid>
 
-				<view class="section flex j-c-s-a a-i-c mt-40"  v-if="isShowContact && curSelectSite.addressType == 1">
-					<view class="section-item" v-for="(i,k) in contactList" :key="k"   v-if="i.name"      >
+				<view class="section flex j-c-s-a a-i-c mt-40" v-if="isShowContact && curSelectSite.addressType == 1">
+					<view class="section-item" v-for="(i,k) in contactList" :key="k" v-if="i.name">
 						<image class="section-item-bg" :src="i.bgImg" mode="aspectFill"></image>
 						<view class="item-box">
 							<view class="f-28">{{i.title}}</view>
 							<view class="flex j-c-s-b">
 								<text class="f-22">{{i.name}}</text>
-								<u-icon :name="i.icon"   @click="callPhone(i.phone)"></u-icon>
+								<u-icon :name="i.icon" @click="callPhone(i.phone)"></u-icon>
 							</view>
 						</view>
 					</view>
@@ -65,7 +65,7 @@
 						</view>
 					</view>
 				</view>
-				
+
 			</view>
 
 			<view class="" v-if="isShowHouse">
@@ -118,8 +118,7 @@
 							<text class="grid-text f-24 fw mt-10">场所维护</text>
 						</view>
 					</u-grid-item>
-					<u-grid-item  @click="navigatorPage('')"
-						:customStyle="{paddingTop:20+'rpx'}">
+					<u-grid-item @click="navigatorPage('')" :customStyle="{paddingTop:20+'rpx'}">
 						<view class="grid-item flex f-d-c a-i-c"
 							style="background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)">
 							<u-icon name="/static/icon/menu-02.png" width="60rpx" height="60rpx"></u-icon>
@@ -259,28 +258,28 @@
 				contactList: [], //便民服务联系方式
 				isShowHouse: false, //显示楼盘表
 				isShowNotice: false, //显示通知公告
-				isShowContact:false  ,
+				isShowContact: false,
 				bannerList: [],
 				navList: [{
 						title: "物业",
 						name: "",
 						icon: "/static/icon/tel-green.png",
 						bgImg: "/static/icon/nav-bg-01.png",
-						phone:""
+						phone: ""
 					},
 					{
 						title: "综治网格",
 						name: "",
 						icon: "/static/icon/tel-orange.png",
 						bgImg: "/static/icon/nav-bg-02.png",
-						phone:""
+						phone: ""
 					},
 					{
 						title: "公安网格",
 						name: "",
 						icon: "/static/icon/tel-blue.png",
 						bgImg: "/static/icon/nav-bg-03.png",
-						phone:""
+						phone: ""
 					},
 				],
 			}
@@ -375,36 +374,36 @@
 					}
 				})
 			},
-			
-			getContactList(){
+
+			getContactList() {
 				getContact({
-					houseCode:this.curHouseCode
-				}).then(res=>{
-					 let data = res.data;
-					 this.contactList = this.navList;
-					 if(data.wg){
-						 this.contactList[1].name = data.wg.name;
-						 this.contactList[1].phone = data.wg.phone
-					 }
-					 if(data.wy){
-						 this.contactList[0].name = data.wy.name;
-						 this.contactList[0].phone = data.wy.phone
-					 }
-					 if(data.ga){
-						 this.contactList[2].name = data.ga.name;
-						 this.contactList[2].phone = data.ga.phone
-					 }
+					houseCode: this.curHouseCode
+				}).then(res => {
+					let data = res.data;
+					this.contactList = this.navList;
+					if (data.wg) {
+						this.contactList[1].name = data.wg.name;
+						this.contactList[1].phone = data.wg.phone
+					}
+					if (data.wy) {
+						this.contactList[0].name = data.wy.name;
+						this.contactList[0].phone = data.wy.phone
+					}
+					if (data.ga) {
+						this.contactList[2].name = data.ga.name;
+						this.contactList[2].phone = data.ga.phone
+					}
 				})
 			},
-			
-			callPhone(phone){
+
+			callPhone(phone) {
 				uni.makePhoneCall({
-					phoneNumber:phone
+					phoneNumber: phone
 				})
 			},
-			
-			
-			
+
+
+
 			async getNoticeList() {
 				const param = {
 					size: 10,
@@ -533,12 +532,12 @@
 					}
 				}, 200)
 			},
-			
+
 			getContactMenu() {
 				let list = [];
 				list = this.menuList.filter(item => item.name == "快捷拨号")
 				this.isShowContact = list.length ? true : false;
-				if(list.length){
+				if (list.length) {
 					this.getContactList()
 				}
 			},
@@ -642,6 +641,11 @@
 							icon: "error"
 						})
 
+					} else if (path == "/subPackage/statistics/index") {
+						uni.showToast({
+							title: "功能开发中~",
+							icon: "none"
+						})
 					} else {
 						this.$u.func.globalNavigator(`${path}?houseCode=${this.curHouseCode}`, "navTo")
 					}
@@ -755,7 +759,7 @@
 	.block {
 		.block-item {
 			position: relative;
-			
+
 		}
 
 		.block-item,
@@ -772,7 +776,7 @@
 			position: absolute;
 			top: 0;
 			left: 0;
-			
+
 		}
 
 		.item-text {
diff --git a/subPackage/article/detail.vue b/subPackage/article/detail.vue
index 5380909..06d7c4b 100644
--- a/subPackage/article/detail.vue
+++ b/subPackage/article/detail.vue
@@ -46,7 +46,7 @@
 					</view>
 					<button v-if="computeEndTime > 0 && !applyInfo.userId" class="apply-btn bgc-main c-ff "
 						@click="handleApply()">报名</button>
-					<button v-if="applyInfo.userId" class="apply-btn bgc-lightblue c-main  border-current">已报名</button>
+					<button v-if="applyInfo.userId && computeEndTime > 0" class="apply-btn bgc-lightblue c-main  border-current">已报名</button>
 					<button v-if="computeEndTime <= 0"
 						class="apply-btn bgc-lightblue c-main border-current">已结束</button>
 				</view>
@@ -109,7 +109,7 @@
 					</view>
 					<button class="apply-btn bgc-main c-ff" v-if="!isEnd  && !isComplete"
 						@click="submitVote()">提交</button>
-					<button class="apply-btn bgc-gray c-d1" v-if="isComplete">已提交</button>
+					<button class="apply-btn bgc-gray c-d1" v-if="isComplete && !isEnd">已提交</button>
 					<button class="apply-btn bgc-gray c-d1" v-if="isEnd">已结束</button>
 				</view>
 			</view>
diff --git a/subPackage/statistics/index.vue b/subPackage/statistics/index.vue
index 2937474..6bfcb32 100644
--- a/subPackage/statistics/index.vue
+++ b/subPackage/statistics/index.vue
@@ -4,16 +4,16 @@
 			<caption-row title="社区概况"></caption-row>
 			<view class="cell flex j-c-s-b flex-wrap">
 				<view class="cell-item bgc-ff" v-for="i in 6">
-			
+
 				</view>
 			</view>
 		</view>
-		
+
 		<view class="">
 			<caption-row title="共治人员"></caption-row>
 			<view class="menu">
 				<u-grid :border="true">
-					<u-grid-item v-for="i in 6"  bgColor="#fff">
+					<u-grid-item v-for="i in 6" bgColor="#fff">
 						<view class="menu-item flex f-d-c a-i-c">
 							<text class="c-main f-32 fw">1</text>
 							<text class="f-28">党员</text>
@@ -22,11 +22,45 @@
 				</u-grid>
 			</view>
 		</view>
-		
-		<view class="">
+
+	<!-- 	<view class="">
 			<caption-row title="人员画像"></caption-row>
+		</view> -->
+		<view class="">
+			<caption-row title="社区事件"></caption-row>
+			<view class="block">
+				<view class="block-caption f-28 fw">
+					总体统计
+				</view>
+				
+				
+				<u-grid :border="true">
+					<u-grid-item v-for="i in 3" bgColor="#fff">
+						<view class="grid-item flex f-d-c a-i-c">
+							<text class="f-30 fw c-main mb-20">20</text>
+							<text class="f-28">事件总数</text>
+						</view>
+					</u-grid-item>
+				</u-grid>
+				
+			</view>
+			<view class="block">
+				<view class="block-caption f-28 fw">
+					事件分类
+				</view>
+				<view class="flex j-c-s-b a-i-c">
+					<view class="report-item"  v-for="(item,index) in reportData"  :key="index">
+						<image class="report-item-bg"  :src="item.bg"  mode="right"></image>
+						<view class="report-item-inner  flex f-d-c j-c-c a-i-c">
+							<text class="f-30">{{item.num}}</text>
+							<text class="f-28">{{item.title}}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			
 		</view>
-		
+
 	</view>
 </template>
 
@@ -35,6 +69,32 @@
 	export default {
 		components: {
 			captionRow
+		},
+		data(){
+			return{
+				reportData:[
+					{
+						title:"矛盾纠纷",
+						num:1,
+						bg:"/static/icon/nav-bg-08.png"
+					},
+					{
+						title:"公共维护",
+						num:1,
+						bg:"/static/icon/nav-bg-06.png"
+					},
+					{
+						title:"居家维修",
+						num:1,
+						bg:"/static/icon/nav-bg-07.png"
+					},
+					{
+						title:"投诉举报",
+						num:1,
+						bg:"/static/icon/nav-bg-09.png"
+					}
+				]
+			}
 		}
 	}
 </script>
@@ -58,10 +118,34 @@
 			margin-bottom: 20rpx;
 		}
 	}
-	.menu{
+
+	.menu {
 		padding: 20rpx 0;
-		.menu-item{
+
+		.menu-item {
+			padding: 20rpx 0;
+		}
+	}
+	.block{
+		padding:20rpx 0;
+		.block-caption{
 			padding:20rpx 0;
 		}
+		.grid-item{
+			padding:30px 0;
+		}
+	}
+	.report-item{
+		position: relative;
+	}
+	.report-item,.report-item-bg,.report-item-inner{
+		width:168rpx;
+		height:190rpx;
+		border-radius: 10rpx;
+	}
+	.report-item-inner{
+		position: absolute;
+		top:0;
+		left:0;
 	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3