From 8f840f5d407550c8aaba3a1d2398f267f76d1587 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Tue, 28 Nov 2023 18:47:00 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_app

---
 subPackage/bs/views/repair.vue |  251 ++++++++++++++++++++++++++++++-------------------
 api/community/community.js     |    2 
 2 files changed, 153 insertions(+), 100 deletions(-)

diff --git a/api/community/community.js b/api/community/community.js
index 50c9dd8..de7ceec 100644
--- a/api/community/community.js
+++ b/api/community/community.js
@@ -44,7 +44,7 @@
 //投票操作
 export const addVoteOperate = (params) => {
 	return http.request({
-		url: '/blade-topics/topics/updateBath',
+		url: '/blade-userTopics/userTopics/updateBath',
 		method: 'POST',
 		data:params
 	})
diff --git a/subPackage/bs/views/repair.vue b/subPackage/bs/views/repair.vue
index c76519d..258bc13 100644
--- a/subPackage/bs/views/repair.vue
+++ b/subPackage/bs/views/repair.vue
@@ -1,194 +1,247 @@
 <template>
 	<view class="">
-		<u-navbar height="48" :autoBack="true"  safeAreaInsetTop placeholder  bgColor="transparent"  leftIconColor="#fff">
+		<u-navbar height="48" :autoBack="true" safeAreaInsetTop placeholder bgColor="transparent" leftIconColor="#fff">
 		</u-navbar>
 		<view class="top">
 			<image class="top-img" src="/static/img/repair-bg.png" mode="aspectFill"></image>
 		</view>
-		
+
 		<view class="container">
 			<view class="c-ff f-36">请选择您需要的服务</view>
 			<view class="serve-box bgc-ff mb-20 flex j-c-s-b a-i-c">
 				<view class="flex a-i-c">
-					<u-icon name="/static/icon/nav-09.png"  width="91rpx"  height="70rpx"></u-icon>
+					<u-icon name="/static/icon/nav-09.png" width="91rpx" height="70rpx"></u-icon>
 					<view class="flex f-d-c ml-40">
 						<text class="f-36">总申请</text>
 						<view class="flex a-i-c">
-							<text class="f-48 c-blue fw mr-6">50</text>
+							<text class="f-48 c-blue fw mr-6">{{statistic.total}}</text>
 							<text class="f-24 c-99">件</text>
 						</view>
 					</view>
 				</view>
 				<view class="flex a-i-c">
-					<u-icon name="/static/icon/nav-10.png"  width="91rpx"  height="70rpx"></u-icon>
+					<u-icon name="/static/icon/nav-10.png" width="91rpx" height="70rpx"></u-icon>
 					<view class="flex f-d-c ml-40">
 						<text class="f-36">已处理</text>
 						<view class="flex a-i-c">
-							<text class="f-48 c-green fw mr-6">50</text>
+							<text class="f-48 c-green fw mr-6">{{statistic.handle}}</text>
 							<text class="f-24 c-99">件</text>
 						</view>
 					</view>
 				</view>
 			</view>
-			
+
 			<view class="site-box bgc-ff flex">
 				<view class="flex a-i-c">
 					<u-icon name="map-fill" color="#AAAAAA"></u-icon>
 					<text class="f-28 c-aa ml-20">当前小区:</text>
 				</view>
-				
-				<text class="address f-28">万达华府26栋1903室 万达华府26栋1903室</text>
+
+				<text class="address f-28">{{ curSelectSite.name }}</text>
 			</view>
-			
+
 			<view class="nav flex flex-wrap j-c-s-b">
-				
-				<view class="nav-item"  v-for="(i,k) in navList"  :key="k"   @click="navTo(i.path)">
+
+				<view class="nav-item" v-for="(i,k) in navList" :key="k" @click="navTo(i)">
 					<image class="nav-item-bg" :src="i.bgImg" mode="aspectFill"></image>
 					<view class="nav-item-inner flex f-d-c">
 						<text class="f-32 mb-30">{{i.title}}</text>
-						<button class="item-btn"   :style="{backgroundColor:i.background}">立即上报</button>
+						<button class="item-btn" :style="{backgroundColor:i.background}">立即上报</button>
 					</view>
 				</view>
-				
-				
+
+
 			</view>
 		</view>
-		
+
 	</view>
-	
+
 </template>
 
 <script>
+	import {
+		getStatistics
+	} from '@/api/task/taskReportForRepairs'
 	export default {
-		data(){
+		data() {
 			return {
-				navList:[
-					{
-						title:"公共维修",
-						bgImg:"/static/icon/nav-bg-06.png",
-						path:"addRepair",
-						background:"#63C875"
+				statistic: {
+					total: 0,
+					handle: 0,
+				},
+				curSelectSite: {},
+				navList: [{
+						title: "公共维修",
+						type: 1,
+						bgImg: "/static/icon/nav-bg-06.png",
+						path: `addRepair`,
+						background: "#63C875"
 					},
 					{
-						title:"居家维修",
-						bgImg:"/static/icon/nav-bg-07.png",
-						path:"",
-						background:"#4D98E2"
+						title: "居家维修",
+						type: 2,
+						bgImg: "/static/icon/nav-bg-07.png",
+						path: "addRepair",
+						background: "#4D98E2"
 					},
 					{
-						title:"矛盾纠纷",
-						bgImg:"/static/icon/nav-bg-08.png",
-						path:"",
-						background:"#EC7E51"
+						title: "矛盾纠纷",
+						type: 3,
+						bgImg: "/static/icon/nav-bg-08.png",
+						path: "addRepair",
+						background: "#EC7E51"
 					},
 					{
-						title:"投诉举报",
-						bgImg:"/static/icon/nav-bg-09.png",
-						path:"",
-						background:"#F4B862"
+						title: "投诉举报",
+						type: 4,
+						bgImg: "/static/icon/nav-bg-09.png",
+						path: "addRepair",
+						background: "#F4B862"
 					},
-					
+					{
+						title: "企业商户上报",
+						type: 5,
+						bgImg: "/static/icon/nav-bg-09.png",
+						path: "addRepair",
+						background: "#F4B862"
+					},
+
 				]
 			}
 		},
-		methods:{
-			navTo(path){
-				if(path){
-					this.$u.func.globalNavigator(path, "navTo")
+		computed: {
+
+		},
+		onShow() {
+			this.getStatistics()
+			this.curSelectSite = uni.getStorageSync('siteInfo')
+			console.log(this.curSelectSite);
+		},
+
+		methods: {
+			navTo(item) {
+				if (item.path) {
+					let url = item.path + "?title=" + item.title + "&type=" + item.type
+					this.$u.func.globalNavigator(url, "navTo")
 				}
-				
+			},
+
+			getStatistics() {
+				getStatistics().then(res => {
+					this.statistic = res.data
+				})
 			}
+
+
 		}
 	}
 </script>
 
 <style lang="scss">
-	page{
-		width:100%;
-		height:100%;
+	page {
+		width: 100%;
+		height: 100%;
 	}
-	.top{
-		width:100%;
-		height:659rpx;
-		background: linear-gradient(180deg, #017BFC 0%, rgba(1,123,252,0) 100%);
+
+	.top {
+		width: 100%;
+		height: 659rpx;
+		background: linear-gradient(180deg, #017BFC 0%, rgba(1, 123, 252, 0) 100%);
 		position: fixed;
-		top:0;
-		left:0;
-		.top-img{
-			width:100%;
-			height:659rpx;
+		top: 0;
+		left: 0;
+
+		.top-img {
+			width: 100%;
+			height: 659rpx;
 		}
 	}
-	.container{
-		width:100%;
+
+	.container {
+		width: 100%;
 		padding: 0 30rpx;
 		position: fixed;
 		box-sizing: border-box;
-		top:130rpx;
-		left:0;
+		top: 130rpx;
+		left: 0;
 		z-index: 100;
-		.serve-box{
-			width:100%;
-			height:213rpx;
+
+		.serve-box {
+			width: 100%;
+			height: 213rpx;
 			border-radius: 8rpx;
-			margin-top:30rpx;
+			margin-top: 30rpx;
 			padding: 0 60rpx 0 40rpx;
 			box-sizing: border-box;
 		}
-		.f-48{
-			font-size:48rpx;
+
+		.f-48 {
+			font-size: 48rpx;
 		}
-		.c-blue{
-			color:#677CF8;
-			
+
+		.c-blue {
+			color: #677CF8;
+
 		}
-		.c-green{
-			color:#30D17C;
+
+		.c-green {
+			color: #30D17C;
 		}
-		.ml-40{
-			margin-left:40rpx;
+
+		.ml-40 {
+			margin-left: 40rpx;
 		}
-		.site-box{
-			width:100%;
-			padding:30rpx;
+
+		.site-box {
+			width: 100%;
+			padding: 30rpx;
 			box-sizing: border-box;
 			border-radius: 4rpx;
-			.c-aa{
-				color:#aaa;
+
+			.c-aa {
+				color: #aaa;
 			}
-			.address{
-				width:60%;
-				margin-left:25rpx;
+
+			.address {
+				width: 60%;
+				margin-left: 25rpx;
 			}
 		}
-		.nav{
-			width:100%;
-			.nav-item,.nav-item-bg,.nav-item-inner{
-				width:330rpx;
-				height:167rpx;
+
+		.nav {
+			width: 100%;
+
+			.nav-item,
+			.nav-item-bg,
+			.nav-item-inner {
+				width: 330rpx;
+				height: 167rpx;
 			}
-			.nav-item{
+
+			.nav-item {
 				position: relative;
-				margin-top:30rpx;
+				margin-top: 30rpx;
 			}
-			.nav-item-inner{
-				padding:30rpx 30rpx 0;
+
+			.nav-item-inner {
+				padding: 30rpx 30rpx 0;
 				position: absolute;
-				top:0;
-				left:0;
-				
+				top: 0;
+				left: 0;
+
 			}
-			.item-btn{
-				width:125rpx;
-				height:42rpx;
+
+			.item-btn {
+				width: 125rpx;
+				height: 42rpx;
 				line-height: 42rpx;
 				border-radius: 20rpx;
-				color:#fff;
-				font-size:22rpx;
-				padding:0;
-				margin:0;
+				color: #fff;
+				font-size: 22rpx;
+				padding: 0;
+				margin: 0;
 			}
 		}
-		
+
 	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3