xiaoxin 2 éve
szülő
commit
1c12908008

+ 8 - 16
pages/home/home.vue

@@ -250,25 +250,17 @@ const goPage = (url, item) => {
 		return
 	}
 	if (url === '/pages/track/track') {
-		if (userInfo.value.identityId == 1) {
-			if (!currentChild.value.id) {
-				uni.showToast({
-					title: '请关联孩子后再查看轨迹',
-					icon: 'none',
-					mask: true
-				})
-				return
-			}
-			uni.navigateTo({
-				url: `/pages/track/track?id=${currentChild.value.id}`
-			})
-			return
-		} else {
-			uni.navigateTo({
-				url: '/pages/grade/grade?type=学生轨迹'
+		if (!currentChild.value.id) {
+			uni.showToast({
+				title: '请关联孩子后再查看轨迹',
+				icon: 'none',
+				mask: true
 			})
 			return
 		}
+		uni.navigateTo({
+			url: `/pages/track/track?id=${currentChild.value.id}`
+		})
 	}
 	if (url === '/pagesReservation/reservation/reservation') {
 		if (userInfo.value.identityId == 1 && !currentChild.value.id) {

+ 40 - 7
pagesReservation/set/set.vue

@@ -28,7 +28,7 @@
 		<view class="setBox">
 			<view class="title">
 				<view class="circle"></view>
-				小程序设置
+				访客预约小程序审批流程设置
 			</view>
 
 			<!-- 小程序是否需要审核 -->
@@ -63,7 +63,7 @@
 
 			<view class="title">
 				<view class="circle"></view>
-				大屏设置
+				访客预约终端审批流程设置
 			</view>
 
 			<!-- 大屏是否需要审核 -->
@@ -98,10 +98,10 @@
 
 			<view class="title">
 				<view class="circle"></view>
-				门禁车闸设置
+				门禁设置
 			</view>
 
-			<!-- 门禁车闸是否需要联动区域 -->
+			<!-- 门禁是否需要联动区域 -->
 			<checkbox-group class="checkbox_group">
 				<label class="checkbox" v-for="item in doorItems" :key="item.value" @click="checkboxChange(doorItems, item)">
 					<view>
@@ -110,6 +110,21 @@
 					<view>{{ item.name }}</view>
 				</label>
 			</checkbox-group>
+
+			<view class="title">
+				<view class="circle"></view>
+				车闸设置
+			</view>
+
+			<!-- 车闸是否需要联动区域 -->
+			<checkbox-group class="checkbox_group">
+				<label class="checkbox" v-for="item in carItems" :key="item.value" @click="checkboxChange(carItems, item)">
+					<view>
+						<checkbox color="#3464FF" :value="item.value" :checked="item.checked" />
+					</view>
+					<view>{{ item.name }}</view>
+				</label>
+			</checkbox-group>
 		</view>
 
 		<!-- 按钮区域 -->
@@ -220,7 +235,7 @@ const cancelItems_screen = ref([
 	}
 ])
 
-// 门禁车闸数组
+// 门禁数组
 const doorItems = ref([
 	{
 		value: 0,
@@ -234,6 +249,20 @@ const doorItems = ref([
 	}
 ])
 
+// 车闸数组
+const carItems = ref([
+	{
+		value: 0,
+		name: '需要联动',
+		checked: false
+	},
+	{
+		value: 1,
+		name: '不需要联动',
+		checked: false
+	}
+])
+
 // 配置信息
 const configInfo = ref({})
 
@@ -248,6 +277,8 @@ onLoad((options) => {
 	handleMatch(pushItems_screen.value, configInfo.value.screenPushConfig)
 	handleMatch(cancelItems_screen.value, configInfo.value.screenCancelConfig)
 	handleMatch(doorItems.value, configInfo.value.accessConfig)
+
+	handleMatch(carItems.value, configInfo.value.carConfig)
 })
 
 // 勾选时的回调
@@ -274,6 +305,7 @@ const handleSave = async () => {
 	let screenPushConfig = handleMatchValue(pushItems_screen.value)
 	let screenCancelConfig = handleMatchValue(cancelItems_screen.value)
 	let accessConfig = handleMatchValue(doorItems.value)
+	let carConfig = handleMatchValue(carItems.value)
 
 	const res = await myRequest({
 		url: '/wanzai/api/smartVisitorParentsConfig/update',
@@ -287,7 +319,8 @@ const handleSave = async () => {
 			screenAuditConfig,
 			screenPushConfig,
 			screenCancelConfig,
-			accessConfig
+			accessConfig,
+			carConfig
 		}
 	})
 	// console.log(res)
@@ -359,7 +392,7 @@ const handleMatchValue = (list) => {
 		box-sizing: border-box;
 		padding: 0 30rpx;
 		width: 710rpx;
-		height: 847rpx;
+		height: 1065rpx;
 		background-color: #fff;
 
 		.title {

+ 8 - 16
unpackage/dist/dev/mp-weixin/pages/home/home.js

@@ -142,25 +142,17 @@ const _sfc_main = {
         return;
       }
       if (url === "/pages/track/track") {
-        if (userInfo.value.identityId == 1) {
-          if (!currentChild.value.id) {
-            common_vendor.index.showToast({
-              title: "请关联孩子后再查看轨迹",
-              icon: "none",
-              mask: true
-            });
-            return;
-          }
-          common_vendor.index.navigateTo({
-            url: `/pages/track/track?id=${currentChild.value.id}`
-          });
-          return;
-        } else {
-          common_vendor.index.navigateTo({
-            url: "/pages/grade/grade?type=学生轨迹"
+        if (!currentChild.value.id) {
+          common_vendor.index.showToast({
+            title: "请关联孩子后再查看轨迹",
+            icon: "none",
+            mask: true
           });
           return;
         }
+        common_vendor.index.navigateTo({
+          url: `/pages/track/track?id=${currentChild.value.id}`
+        });
       }
       if (url === "/pagesReservation/reservation/reservation") {
         if (userInfo.value.identityId == 1 && !currentChild.value.id) {