dedsudiyu il y a 10 mois
Parent
commit
0b3bdd67b7

+ 5 - 1
pages/views/dataBoard/dataBoard.vue

@@ -6,7 +6,7 @@
 			<img class="header-bg" src="@/pages/images/dataBoard/dataBoard-icon1.png">
 			<view class="header-t">
 				<img class="header-t-l" :src="rectangleLogo">
-				<view class="header-t-r">管理面板</view>
+				<view class="header-t-r" @click="outButton">管理面板</view>
 			</view>
 			<view class="header-b">
 				<view class="header-b-li">
@@ -113,6 +113,10 @@
 		},
 		mounted() {},
 		methods: {
+			//返回按钮
+			outButton(){
+				this.$parent.goHome();
+			},
 			//滚动加载事件
 			scrollGet() {
 				if (this.total / this.queryParams.pageSize <= this.queryParams.page) {

+ 0 - 5
pages/views/dataBoard/equipmentControl.vue

@@ -495,8 +495,3 @@
 		}
 	}
 </style>
-<style>
-	page {
-		background-color: #363744 !important;
-	}
-</style>

+ 0 - 5
pages/views/dataBoard/equipmentControlOverdue.vue

@@ -304,8 +304,3 @@
 		}
 	}
 </style>
-<style>
-	page {
-		background-color: #363744 !important;
-	}
-</style>

+ 0 - 38
pages/views/home/home.vue

@@ -2,7 +2,6 @@
 	<view id="home">
 		<teacherHome class="flex-box-page" v-if="userType==1"></teacherHome>
 		<pupilHome class="flex-box-page" v-if="userType==2"></pupilHome>
-		<img class="scan_btn" @click.stop="saoCode" src="@/pages_safetyExamine/images/icon_xyxc_sm.png" />
 	</view>
 </template>
 <script>
@@ -39,35 +38,6 @@
 			}
 		},
 		methods: {
-			/* 扫一扫*/
-			saoCode() {
-				let self = this;
-				uni.scanCode({
-					onlyFromCamera: true,
-					success: function(res) {
-						let list = res.result.split("?")[1].split("&");
-						let codeData = {};
-						list.forEach((item) => {
-							codeData[item.split("=")[0]] = item.split("=")[1];
-						})
-						if(codeData.type == 1 || codeData.type == 5 || codeData.type == 7 ||
-						codeData.type == 8 || codeData.type == 9 || codeData.type == 10 ||
-						codeData.type == 11 || codeData.type == 12){
-							uni.navigateTo({
-								url: '/pages/views/saoCode/saoCode?q=' + encodeURIComponent(res.result)
-							});
-						}else{
-							uni.showToast({
-								mask: true,
-								icon: "none",
-								position: "center",
-								title: '请扫描正确的小程序二维码',
-								duration: 2000
-							});
-						}
-					}
-				});
-			},
 		},
 		onHide() {
 			this.userType = 0;
@@ -88,13 +58,5 @@
 			display: flex;
 			flex-direction: column;
 		}
-		.scan_btn {
-			z-index:10;
-			position: fixed;
-			bottom: 210rpx;
-			right: 0rpx;
-			width: 130rpx;
-			height: 130rpx;
-		}
 	}
 </style>

+ 51 - 7
pages/views/teacherPage/teacherHome.vue

@@ -1,9 +1,7 @@
 <!-- 教师首页 -->
 <template>
-	<view class="teacherHome" :style="{paddingTop:navHeight+'rpx'}">
-		<view class="data-board" v-if="pageType == 1">
-
-		</view>
+	<view class="teacherHome">
+		<dataBoard v-if="pageType == 1"></dataBoard>
 		<view class="home-page" v-if="pageType == 2">
 			<nav-bar :title="title" :background="background"></nav-bar>
 			<view class="top-back-img" :style="{top:navHeight+'rpx'}">
@@ -71,6 +69,7 @@
 					</view>
 				</view>
 			</view>
+			<img class="scan_btn" @click.stop="saoCode" src="@/pages_safetyExamine/images/icon_xyxc_sm.png" />
 			<tab-bar></tab-bar>
 		</view>
 	</view>
@@ -92,12 +91,16 @@
 	import {
 		topWarn
 	} from '@/pages/component/topWarn.vue'
+	import {
+		dataBoard
+	} from '@/pages/views/dataBoard/dataBoard.vue'
 	export default {
 		name: "teacherHome",
 		components: {
 			tabBar,
 			navBar,
 			topWarn,
+			dataBoard,
 		},
 		data() {
 			return {
@@ -112,13 +115,16 @@
 		created() {
 			if (pageRestrictVerify('dataBoard')) {
 				this.dataPageType = true;
-				// this.pageType = 1;
+				this.pageType = 1;
 			}
 		},
 		mounted() {
 
 		},
 		methods: {
+			goHome(){
+				this.pageType = 2;
+			},
 			goPage(type) {
 				if (!type) {
 					uni.showToast({
@@ -140,8 +146,9 @@
 				}
 				if (type == 'dataBoard') {
 					//数据看板
-
-				} else if (type == 'securityCheck') {
+					this.pageType = 1;
+					
+				}else if (type == 'securityCheck') {
 					//安全检查
 					this.getGentleIdentifier();
 				} else if (type == 'securityExamination') {
@@ -233,6 +240,35 @@
 					}
 				}
 			},
+			/* 扫一扫*/
+			saoCode() {
+				let self = this;
+				uni.scanCode({
+					onlyFromCamera: true,
+					success: function(res) {
+						let list = res.result.split("?")[1].split("&");
+						let codeData = {};
+						list.forEach((item) => {
+							codeData[item.split("=")[0]] = item.split("=")[1];
+						})
+						if(codeData.type == 1 || codeData.type == 5 || codeData.type == 7 ||
+						codeData.type == 8 || codeData.type == 9 || codeData.type == 10 ||
+						codeData.type == 11 || codeData.type == 12){
+							uni.navigateTo({
+								url: '/pages/views/saoCode/saoCode?q=' + encodeURIComponent(res.result)
+							});
+						}else{
+							uni.showToast({
+								mask: true,
+								icon: "none",
+								position: "center",
+								title: '请扫描正确的小程序二维码',
+								duration: 2000
+							});
+						}
+					}
+				});
+			},
 		}
 	}
 </script>
@@ -410,6 +446,14 @@
 					}
 				}
 			}
+			.scan_btn {
+				z-index:10;
+				position: fixed;
+				bottom: 210rpx;
+				right: 0rpx;
+				width: 130rpx;
+				height: 130rpx;
+			}
 		}
 	}
 </style>