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/workbench/views/selfCheckDetail.vue |   55 ++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 40 insertions(+), 15 deletions(-)

diff --git a/subPackage/workbench/views/selfCheckDetail.vue b/subPackage/workbench/views/selfCheckDetail.vue
index 6c3a4c5..e7b0e60 100644
--- a/subPackage/workbench/views/selfCheckDetail.vue
+++ b/subPackage/workbench/views/selfCheckDetail.vue
@@ -86,10 +86,10 @@
 			<block v-for="(item,index) in itemList">
 				<block v-for="(i,k) in item.children">
 					<block v-for="(n,m) in info.taskPlaceRecordVOList">
-						<!-- <view class="item-row flex j-c-s-b a-i-c" v-if="i.id == n.itemId && n.state == 1">
-							<text class="item-left">{{i.title}}</text>
-							<text>不存在</text>
-						</view> -->
+						<view class="item-row flex j-c-s-b a-i-c" v-if="i.id == n.itemId && n.state == 0">
+							<text class="item-left fw">{{item.title}}</text>
+							<!-- <text>不存在</text> -->
+						</view>
 						<u-collapse :value="ids" v-if="i.id == n.itemId && n.state == 0" ref="collapse">
 							<u-collapse-item :name="n.itemId" :title="i.title" value="存在" :disabled="true"
 								:clickable="false" :isLink="false">
@@ -151,7 +151,7 @@
 		<view class="blank"></view>
 		<!-- <footer-btn @click="submitInfo" v-if="roleType == 2 && (info.status == 4 || info.status == 3)"     /> -->
 		<audit-action v-if="roleType == 1 && info.status == 1" @handle="submitAudit" />
-		<footer-btn v-if="roleType == 2 && info.status == 3" text="重新提交" @click="navTo" />
+		<footer-btn v-if="roleType == 2 && info.status == 3 " text="重新提交" @click="navTo" />
 	</view>
 </template>
 
@@ -182,20 +182,28 @@
 				signatureUrl: [],
 				label: "",
 				itemList: [],
-				roleType: '', //1.民警/系统管理员   2.场所负责人
+				roleType: '', //1.民警/系统管理员   2.场所负责人 / 学校主体
 				ids: [],
-				taskId: ""
+				taskId: "",
+				type: 1 // 2学校主体
 			}
 		},
 		async onLoad(option) {
 			let {
-				roleName
+				roleName,
+				roleAlias
 			} = uni.getStorageSync("activeRole")
 			if (roleName == "居民") {
 				this.roleType = 2;
-			}
-			if (roleName == "民警" || roleName == "系统管理员") {
+			} else if (roleName == "民警" || roleName == "系统管理员") {
 				this.roleType = 1;
+			} else if (roleAlias == "xyzt") {
+				this.roleType = 2;
+			}
+
+
+			if (option.type) {
+				this.type = option.type;
 			}
 
 			await this.getItem();
@@ -216,6 +224,11 @@
 					taskId: this.taskId
 				}).then(res => {
 					let data = res.data;
+					if (data.type == 2) {
+						uni.setNavigationBarTitle({
+							title: "校园安全检查"
+						})
+					}
 					// this.info = res.data;
 					this.images = this.$setImageUrl(res.data.imageUrls);
 					this.signatureUrl = this.$setImageUrl(res.data.signaturePath);
@@ -242,10 +255,15 @@
 			},
 
 			getItem() {
-				getPlaceCheckItem({
+				let data = {
 					childType: 1,
 					type: 1
-				}).then(res => {
+				}
+				if (this.type == 2) {
+					data.childType = 9;
+					data.type = 3;
+				}
+				getPlaceCheckItem(data).then(res => {
 					if (res.code == 200) {
 						this.itemList = res.data;
 					}
@@ -356,9 +374,16 @@
 			},
 
 			navTo() {
-				uni.navigateTo({
-					url: `/subPackage/label/check?taskId=${this.info.taskId}`
-				})
+				if (this.type == 1) {
+					uni.navigateTo({
+						url: `/subPackage/label/check?taskId=${this.info.taskId}`
+					})
+				} else {
+					uni.navigateTo({
+						url: `/subPackage/school/security?taskId=${this.info.taskId}`
+					})
+				}
+
 			},
 
 		}

--
Gitblit v1.9.3