From 3c738f4fe2762bba8087e5a22fc0dc06560eab0e Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Thu, 08 Aug 2024 10:01:17 +0800
Subject: [PATCH] 三色任务与自查任务

---
 subPackage/task/index.vue |  158 +++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 105 insertions(+), 53 deletions(-)

diff --git a/subPackage/task/index.vue b/subPackage/task/index.vue
index 127a9bb..2fe7998 100644
--- a/subPackage/task/index.vue
+++ b/subPackage/task/index.vue
@@ -22,15 +22,15 @@
 				</view>
 			</view>
 		</view> -->
-		<view class="nav bgc-ff mb-20 mt-20"  v-if="comprehensive.length">
-			<view class="caption">
+		<view class="nav bgc-ff mt-20" v-if="comprehensive.length">
+			<!-- <view class="caption">
 				<view class="flex a-i-c">
 					<view class="line"></view>
 					<text class="f-32 fw">综治任务</text>
 				</view>
-			</view>
-			
-			<view class="nav-item flex j-c-s-b a-i-c"  @click="navTo(i.path)"  v-for="i in comprehensive">
+			</view> -->
+
+			<view class="nav-item flex j-c-s-b a-i-c" @click="navTo(i.path)" v-for="i in comprehensive">
 				<text class="f-28">{{i.name}}</text>
 				<view class="flex">
 					<block v-if="i.count > 0">
@@ -40,8 +40,8 @@
 					<u-icon name="arrow-right" color="#999"></u-icon>
 				</view>
 			</view>
-			
-<!-- 			<view class="nav-item flex j-c-s-b a-i-c"  @click="navTo('/subPackage/workbench/views/cshw')"  v-for="i in comprehensive">
+
+			<!-- 			<view class="nav-item flex j-c-s-b a-i-c"  @click="navTo('/subPackage/workbench/views/cshw')"  v-for="i in comprehensive">
 				<text class="f-28">场所审核</text>
 				<view class="flex">
 					<text class="f-28 c-99">待处理</text>
@@ -97,7 +97,7 @@
 					<u-icon name="arrow-right" color="#999"></u-icon>
 				</view>
 			</view> -->
-			
+
 		</view>
 
 		<!-- <view class="nav bgc-ff mb-20">
@@ -118,35 +118,40 @@
 				</view>
 			</view>
 		</view> -->
-		<view class="nav bgc-ff mb-20"  v-if="securityList.length">
-			<view class="caption">
+		<view class="nav bgc-ff mb-20 mt-20" v-if="securityList.length">
+			<!-- <view class="caption">
 				<view class="flex a-i-c">
 					<view class="line"></view>
 					<text class="f-32 fw">公安任务</text>
 				</view>
-			</view>
-			
-			<view class="nav-item flex j-c-s-b a-i-c" @click="navTo(`${i.path}&from=task`)"    v-for="i in securityList">
+			</view> -->
+
+			<view class="nav-item flex j-c-s-b a-i-c" @click="navTo(`${i.path}&from=task`)" v-for="i in securityList">
 				<text class="f-28">{{i.name}}</text>
 				<view class="flex">
-					<block v-if="bailCount > 0">
+					<block v-if="i.count > 0">
 						<text class="f-28 c-99">待处理</text>
-						<view class="dot bgc-main">{{bailCount}}</view>
+						<view class="dot bgc-main">{{i.count}}</view>
 					</block>
 					<u-icon name="arrow-right" color="#999"></u-icon>
 				</view>
 			</view>
-			<!-- <view class="nav-item flex j-c-s-b a-i-c" @click="navTo()">
-				<text class="f-28">取保候审</text>
+
+		</view>
+
+		<view class="nav bgc-ff mb-20 mt-20" v-if="schoolList.length">
+			<view class="nav-item flex j-c-s-b a-i-c" @click="navTo(`${i.path}&from=task`)" v-for="i in schoolList">
+				<text class="f-28">{{i.name}}</text>
 				<view class="flex">
-					<block v-if="false">
+					<block v-if="i.count > 0">
 						<text class="f-28 c-99">待处理</text>
-						<view class="dot bgc-main">{{countInfo.comprehensiveTask}}</view>
+						<view class="dot bgc-main">{{i.count}}</view>
 					</block>
 					<u-icon name="arrow-right" color="#999"></u-icon>
 				</view>
-			</view> -->
+			</view>
 		</view>
+
 	</view>
 </template>
 
@@ -166,56 +171,96 @@
 				}],
 				repairsCount: 0,
 				countInfo: {},
-				securityList:[],
-				comprehensive:[],
-				bailCount:0
+				schoolList: [],
+				securityList: [],
+				comprehensive: [],
+				bailCount: 0
 			}
 		},
 
-         onLoad(){
-			this.getMenuList() 
-		 },
+		onLoad() {
+			this.getMenuList()
+		},
 		onShow() {
 			this.getCount();
 			// this.getRepairsCount();
 		},
 
 		methods: {
-			
-			getMenuList(){
+
+			getMenuList() {
 				let list = uni.getStorageSync("taskMenu");
-				if(list.length){
-					for(let i of list){
+				if (list.length) {
+					for (let i of list) {
 						i.count = 0;
-						if(i.remark == '1'){
-							if(i.name == "报事报修"){
-							}
+						if (i.remark == '1') {
+							if (i.name == "报事报修") {}
 							this.comprehensive.push(i)
-						}else {
+						} else if (i.remark == '2') {
 							this.securityList.push(i)
+						} else if (i.remark == '3') {
+							this.schoolList.push(i)
 						}
 					}
 				}
 			},
 			getCount() {
-				getCountTypeNumber().then(res => {
+				let roleType = 0
+				if (uni.getStorageSync('activeRole').roleAlias === 'wgy') {
+					roleType = 1
+				}
+				getCountTypeNumber({
+					neiCode: uni.getStorageSync("siteInfo").id,
+					roleType: roleType
+				}).then(res => {
 					if (res.code == 200) {
 						let data = res.data;
 						this.countInfo = res.data;
-						for(let i of this.comprehensive){
-							if(i.name == "场所审核"){
+						for (let i of this.comprehensive) {
+							if (i.name.trim() == "场所审核") {
 								i.count = data.cssh;
-							}else if(i.name == "报事报修"){
+							} else if (i.name.trim() == "报事报修") {
 								i.count = data.bsbx;
-							}else if(i.name == "住户审核"){
+							} else if (i.name.trim() == "住户审核") {
 								i.count = data.zhsh
-							}else if (i.name.trim() == "标签报事"){
-								i.count = data.bqsj
-							}else if (i.name == "租房管理"){
+							} else if (i.name.trim() == "租户确认") {
 								i.count = data.czsh
+							} else if (i.name.trim() == "走访任务") {
+								i.count = data.zfrw;
+							} else if (i.name.trim() == "走访任务") {
+								i.count = data.zfrw;
 							}
 						}
-						this.bailCount = data.qbhs
+						// this.bailCount = data.qbhs
+
+						for (let i of this.securityList) {
+							if (i.name.trim() == "二手交易审核") {
+								i.count = data.bqsj
+							} else if (i.name.trim() == "消防自查审核") {
+								i.count = data.xfzc;
+							} else if (i.name.trim() == "消防隐患整改审核") {
+								i.count = data.xfyhzg;
+							} else if (i.name.trim() == "居住证申请审核") {
+								i.count = data.jzzsq;
+							} else if (i.name.trim() == "从业人员审核") {
+								i.count = data.cyrysh;
+							} else if (i.name.trim() == "无诈上报审核") {
+								i.count = data.wztj;
+							} else if (i.name.trim() == "取保监居审核") {
+								i.count = data.qbhs;
+							}
+						}
+						for (let i of this.schoolList) {
+							if (i.name.trim() == "安全隐患上报处置") {
+								i.count = data.xyyh;
+							} else if (i.name.trim() == "纠纷矛盾上报处置") {
+								i.count = data.xyjfmd;
+							} else if (i.name.trim() == "校园安保审核") {
+								i.count = data.xyaqjc;
+							} else {
+								// i.count = data.qbhs;
+							}
+						}
 					}
 				})
 			},
@@ -223,22 +268,28 @@
 				getRepairsStatistics().then(res => {
 					if (res.code == 200) {
 						this.repairsCount = res.data;
-					    let index = this.comprehensive.findIndex(item=> item.name == "报事报修")
-					    this.comprehensive[index].count = res.data;
+						let index = this.comprehensive.findIndex(item => item.name == "报事报修")
+						this.comprehensive[index].count = res.data;
 					}
 				})
 			},
 
 
 			navTo(url) {
-				
-				if(!url || url == "暂无" ){
+				if (!url || url == "暂无") {
 					uni.showToast({
-						title:"功能开发中~",
-						icon:"none"
+						title: "功能开发中~",
+						icon: "none"
 					})
-				}else {
-					this.$u.func.globalNavigator(`${url}?from=task`)
+				} else {
+					console.log("url===>", url)
+					uni.navigateTo({
+						url: `${url}?from=task`,
+						complete: (res) => {
+							console.log("errr=>", res)
+						}
+					})
+					// this.$u.func.globalNavigator(`${url}?from=task`)
 				}
 			}
 		}
@@ -303,7 +354,8 @@
 	.mb-20 {
 		margin-bottom: 20rpx;
 	}
-	.mt-20{
-		margin-top:20rpx;
+
+	.mt-20 {
+		margin-top: 20rpx;
 	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3