dedsudiyu vor 1 Jahr
Ursprung
Commit
619a1c71ae

+ 6 - 2
pages_basics/views/record/index.vue

@@ -83,12 +83,16 @@
 			},
 			changeLog(e) {
 				this.$set(this.queryParams,'page',1);
-				this.getList();
+				this.$nextTick(() => {
+					this.getList();
+				})
 			},
 			bindPickerChange(e) {
 				this.$set(this, 'subIndex', e.detail.value);
 				this.$set(this.queryParams,'page',1);
-				this.getList();
+				this.$nextTick(() => {
+					this.getList();
+				})
 			},
 			//滚动加载事件
 			scrollGet() {

+ 8 - 0
pages_student/api/index.js

@@ -62,4 +62,12 @@ export const examViolationMyAppList  = (data) => {
         method: 'POST',
         data: {...data}
     })
+};
+//个人进出记录
+export const laboratoryAppletMyPassOutList  = (data) => {
+    return apiResquest({
+        url: `/laboratory/applet/myPassOutList`,
+        method: 'POST',
+        data: {...data}
+    })
 };

+ 12 - 33
pages_student/views/myRecord/index.vue

@@ -44,9 +44,8 @@
 		config
 	} from '@/api/request/config.js'
 	import {
-		laboratoryAppletSignSubList,
-		laboratoryAppletPassOutList
-	} from '@/pages_basics/api/index.js'
+		laboratoryAppletMyPassOutList
+	} from '@/pages_student/api/index.js'
 	export default {
 		data() {
 			return {
@@ -67,7 +66,6 @@
 			}
 		},
 		onLoad(option) {
-			// this.laboratoryAppletSignSubList();
 			this.getList();
 		},
 		onShow() {
@@ -77,18 +75,22 @@
 			tableButton(item) {
 				if(item.accessStatus == 2){
 					uni.navigateTo({
-						url: '/pages_basics/views/record/infoPage?item=' + encodeURIComponent(JSON.stringify(item)) //安全警报
+						url: '/pages_student/views/myRecord/infoPage?item=' + encodeURIComponent(JSON.stringify(item))
 					});
 				}
 			},
 			changeLog(e) {
 				this.$set(this.queryParams,'page',1);
-				this.getList();
+				this.$nextTick(() => {
+					this.getList();
+				})
 			},
 			bindPickerChange(e) {
 				this.$set(this, 'subIndex', e.detail.value);
 				this.$set(this.queryParams,'page',1);
-				this.getList();
+				this.$nextTick(() => {
+					this.getList();
+				})
 			},
 			//滚动加载事件
 			scrollGet() {
@@ -105,7 +107,8 @@
 			async getList() {
 				let self = this;
 				let obj = JSON.parse(JSON.stringify(this.queryParams));
-				obj.subId = this.subIndex == 0 ? '' : this.subList[this.subIndex].subId;
+				console.log('this.range',this.range)
+				console.log('this.range',this.range[0])
 				if (this.range[0]) {
 					obj.startTime = this.range[0] + 'T00:00:00'
 					obj.endTime = this.range[1] + 'T23:59:59'
@@ -115,7 +118,7 @@
 				}
 				const {
 					data
-				} = await laboratoryAppletPassOutList(obj);
+				} = await laboratoryAppletMyPassOutList(obj);
 				if (data.code == 200) {
 					let list = [];
 					if(this.queryParams.page != 1){
@@ -143,30 +146,6 @@
 					}
 				}
 			},
-			//查询实验室
-			async laboratoryAppletSignSubList() {
-				let self = this;
-				const {
-					data
-				} = await laboratoryAppletSignSubList();
-				if (data.code == 200) {
-					let nameList = ['全部'];
-					let list = [{
-						subName: '全部',
-						subId: ''
-					}];
-					data.data.forEach((item) => {
-						nameList.push(item.subName)
-						list.push({
-							subName: item.subName,
-							subId: item.subId,
-						})
-					})
-					this.$set(this, 'subNameList', nameList);
-					this.$set(this, 'subList', list);
-					this.$set(this, 'subIndex', 0);
-				}
-			},
 		}
 	}
 </script>