From d2f4d757191c4f892135ffcbbe03be6976f9234a Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Sun, 28 Apr 2024 17:45:01 +0800
Subject: [PATCH] 更新

---
 subPackage/school/security.vue |   57 +++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 45 insertions(+), 12 deletions(-)

diff --git a/subPackage/school/security.vue b/subPackage/school/security.vue
index 2a12a60..1ac4907 100644
--- a/subPackage/school/security.vue
+++ b/subPackage/school/security.vue
@@ -1,7 +1,7 @@
 <template>
 	<view class="wrap">
 
-		<view class="info-row flex j-c-s-b a-i-c bgc-ff" @click="isShowPopup = true">
+		<view class="info-row flex j-c-s-b a-i-c bgc-ff" @click="isShowPopup = true" v-if="!from">
 			<text class="f-28">场所名称</text>
 			<view class="flex">
 				<text class="mr-10">{{selectedPlace.placeName}}</text>
@@ -135,7 +135,9 @@
 		updatePlaceCheck,
 		auditPlaceCheck
 	} from "@/api/reporting/reporting.js"
-
+	import {
+		getQrCodeDetail
+	} from "@/api/system/index"
 	export default {
 		mixins: [uploadMixin],
 		data() {
@@ -187,7 +189,8 @@
 				isShowPopup: false,
 				selectedPlace: {},
 				placeList: [],
-				placeName: ""
+				placeName: "",
+				from: "" //页面进入来源
 			}
 		},
 		async onLoad(option) {
@@ -196,20 +199,21 @@
 				this.isEdit = true;
 				this.getDetail(option.taskId)
 			} else {
-				this.info.houseCode = "d8460d16ec5a40ccbfe64ba65d34159c7427";
-				this.info.placeName = "校学小学场所"
-				// this.info.houseCode = uni.getStorageSync("siteInfo").houseCode;
-				// this.info.placeName = uni.getStorageSync("siteInfo").name;
+				if (uni.getStorageSync("houseCode")) {
+					let houseCode = uni.getStorageSync("houseCode");
+					this.getHouseType(houseCode);
+				} else {
+					this.info.houseCode = "d8460d16ec5a40ccbfe64ba65d34159c7427";
+					this.info.placeName = "校学小学场所"
+				}
 			}
 			this.getPlaceList();
 			// if (option.houseCode) {
 			// 	this.info.houseCode = option.houseCode;
 			// }
-
 		},
 
 		methods: {
-
 			getPlaceList() {
 				getLocationRecord({
 					roleName: uni.getStorageSync('activeRole').roleName,
@@ -492,11 +496,40 @@
 				this.selectedPlace = item;
 				this.info.houseCode = item.houseCode;
 				this.isShowPopup = false;
-
-
-
 			},
 
+			getHouseType(code) {
+				getQrCodeDetail({
+					roleName: uni.getStorageSync("activeRole").roleName,
+					addressCode: code
+				}).then(res => {
+					let {
+						isJur,
+						doorplateType,
+						addressLevel
+					} = res.data;
+					if (isJur == 1) {
+						if (doorplateType == "中门牌" || doorplateType == "小门牌") {
+							if (res.data.labelCode == 160102 || res.data.labelCode == 160103) {
+								this.info.houseCode = code;
+								this.info.placeName = poi;
+								this.from = "jump"
+							} else {
+								this.$showTips("该场所不是校园类型");
+							}
+						}
+					} else {
+						uni.showModal({
+							title: "提示!",
+							content: "该区域不是您管辖范围",
+							showCancel: false
+						})
+					}
+
+				})
+			},
+
+
 		}
 	}
 </script>

--
Gitblit v1.9.3