mo 2 éve
szülő
commit
1216a5a19c

+ 8 - 7
src/views/attendanceError/api.js

@@ -1,20 +1,21 @@
-const axios = require('@/common/axios').default
+import request from "@/helpers/request";
 import qs from 'qs'
 import qs from 'qs'
-const apiPrefix = '/api-teacher'
+// const apiPrefix = '/api-teacher'
 
 
 
 
 export const attendanceErrorList = (data) => {
 export const attendanceErrorList = (data) => {
-    return axios({
-        url: apiPrefix + '/student/studentAttendanceError',
+    return request({
+        url:  '/student/studentAttendanceError',
         method: 'post',
         method: 'post',
         data: data
         data: data
     })
     })
 }
 }
 
 
 export const getAttendanceErrorStudent = (data) => {
 export const getAttendanceErrorStudent = (data) => {
-    return axios({
-        url: apiPrefix + '/student/findStudentAttendance',
+    return request({
+        url:  '/student/findStudentAttendance',
         method: 'post',
         method: 'post',
-        data: data
+        data: data,
+        requestType: "form",
     })
     })
 }
 }

+ 25 - 19
src/views/attendanceError/attendScheduleDetail.vue

@@ -128,35 +128,41 @@ export default {
     },
     },
     methods: {
     methods: {
         async getFindStudentAttendance() {
         async getFindStudentAttendance() {
-            let params = this.params
-            await getAttendanceErrorStudent({ courseScheduleId: this.id, page: 1, rows: 9999 }).then(res => {
+            // let params = this.params
+            await getAttendanceErrorStudent({ search: this.id*1 }).then(res => {
+           
                 let result = res.data
                 let result = res.data
+              
                 this.loading = false
                 this.loading = false
-                if(result.code == 200) {
+        
+                if(res.code == 200) {
                     // 重点这句,判断是不是重复请求了
                     // 重点这句,判断是不是重复请求了
-                    if (this.dataList.length > 0 && result.data.pageNo == 1) {
-                        return;
-                    }
-                    params.page = result.data.pageNo
-                    this.dataList = this.dataList.concat(result.data.rows)
-                    this.dataList.forEach(item => {
-                        if(item.paymentStatus == 'NON_PAYMENT') {
-                            this.paymentNum += 1
-                        }
-                    })
-                    if(params.page >= result.data.totalPage) {
-                        this.finished = true
-                    }
-                    this.params.page++
-                } else {
+                    // if (this.dataList.length > 0 && result.data.pageNo == 1) {
+                    //     return;
+                    // }
+                    // params.page = result.data.pageNo
+                  
+                    this.dataList =result
+                    console.log(this.dataList)
                     this.finished = true
                     this.finished = true
+                //     this.dataList.forEach(item => {
+                //         if(item.paymentStatus == 'NON_PAYMENT') {
+                //             this.paymentNum += 1
+                //         }
+                //     })
+                //     if(params.page >= result.data.totalPage) {
+                //         this.finished = true
+                //     }
+                //     this.params.page++
+                // } else {
+                //     this.finished = true
                 }
                 }
                 // 判断是否有数据
                 // 判断是否有数据
                 if(this.dataList.length <= 0) {
                 if(this.dataList.length <= 0) {
                     this.dataShow = false
                     this.dataShow = false
                 }
                 }
 
 
-                this.lastDate = this.dataList[0] && this.dataList[0].updateTime ? dayjs(this.dataList[0].updateTime).format('MM-DD hh:mm') : null
+                // this.lastDate = this.dataList[0] && this.dataList[0].updateTime ? dayjs(this.dataList[0].updateTime).format('MM-DD hh:mm') : null
             })
             })
         },
         },
         gotoVisit(row){
         gotoVisit(row){

+ 5 - 1
src/views/visitManager/addVisit.vue

@@ -383,9 +383,10 @@ export default {
       }
       }
     },
     },
     onCheckStudent() {
     onCheckStudent() {
-      if (this.id || this.userId || this.studentId || this.beforeId) {
+      if (this.id || this.userId || this.studentId || this.beforeId || this.isAttError) {
         return;
         return;
       }
       }
+
       this.statusList.studentStatus = true;
       this.statusList.studentStatus = true;
     },
     },
     onChange(type) {
     onChange(type) {
@@ -395,6 +396,9 @@ export default {
       if ((this.userId || this.beforeId) && type != "probStatus") {
       if ((this.userId || this.beforeId) && type != "probStatus") {
         return;
         return;
       }
       }
+      if(this.isAttError && (type=='type' || type=='purpose')){
+        return
+      }
       let visit = this.visit;
       let visit = this.visit;
       let form = this.form;
       let form = this.form;
       if (type == "type") {
       if (type == "type") {