Procházet zdrojové kódy

Merge branch 'Nov16thResetMusic' into online

mo před 4 roky
rodič
revize
f76772fc6d

+ 10 - 1
src/api/teacherManager.js

@@ -277,4 +277,13 @@ export function batchUpdateAdviser (data) {
     method: 'post',
     data: qs.stringify(data)
   })
-}
+}
+
+// 获取课程老师列表  
+export function getCourseTeachers (data) {
+  return request({
+    url: api + '/courseScheduleTeacherSalary/getCourseTeachers',
+    method: 'get',
+    params: data
+  })
+}

+ 9 - 0
src/utils/vueFilter.js

@@ -140,6 +140,15 @@ Vue.filter('dayjsFormat', (value) => {
     return value
   }
 })
+
+Vue.filter('dayjsFormatMinute', (value) => {
+  if (value) {
+    return dayjs(value).format('HH:mm')
+  } else {
+    return value
+  }
+})
+
 Vue.filter('formatTimer', (value) => {
   if (value) {
     return value.split(' ')[0]

+ 19 - 0
src/views/attendanceManager/attendanceList/api.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+import qs from 'qs'
+let api = '/api-web'
+
+export function getHomePageList (data) {
+  return request({
+    url: api + '/webCurseHomework/queryHomePage',
+    method: 'get',
+    params: data
+  })
+}
+
+// export function batchUpdateAdviser (data) {
+//   return request({
+//     url: api + '/studentManage/batchUpdateAdviser',
+//     method: 'post',
+//     data: qs.stringify(data)
+//   })
+// }

+ 71 - 30
src/views/attendanceManager/attendanceList/index.vue

@@ -10,12 +10,7 @@
         <el-form-item>
           <el-input v-model.trim="searchForm.search"
                     @keyup.enter.native="search"
-                    placeholder='请输入课程编号、名称'></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-input v-model.trim="searchForm.search"
-                    @keyup.enter.native="search"
-                    placeholder='请输入乐团名称'></el-input>
+                    placeholder='请输入课程编号、名称、乐团名称'></el-input>
         </el-form-item>
         <el-form-item prop="organId">
           <el-select class="multiple"
@@ -30,7 +25,19 @@
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-date-picker v-model.trim="searchForm.courseTimer"
+          <el-select v-model.trim="searchForm.groupType"
+                     class="organSelect"
+                     style=" margin-left: 15px; width:100%"
+                     filterable
+                     placeholder="请选择课程类型">
+            <el-option v-for="(item,index) in courseListType"
+                       :key="index"
+                       :label="item.label"
+                       :value="item.value"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-date-picker v-model.trim="courseTimer"
                           style="width:420px;"
                           type="daterange"
                           value-format="yyyy-MM-dd"
@@ -53,31 +60,36 @@
                   :header-cell-style="{background:'#EDEEF0',color:'#444'}"
                   :data="tableList">
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="courseScheduleId"
                            label="课程编号"></el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="courseScheduleName"
                            label="课程名称"></el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="organName"
                            label="分部"></el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="groupName"
                            label="乐团名称"></el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
-                           label="布置时间"></el-table-column>
+                           label="布置时间">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.createTime ? scope.row.createTime.substr(0, 16): '' }}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="actualTeacherName"
                            label="布置老师"></el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="expectNum"
                            label="应交人数"></el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="completedNum"
                            label="已交人数"></el-table-column>
           <el-table-column align="center"
-                           prop="studentId"
+                           prop="repliedNum"
                            label="已回复数"></el-table-column>
           <el-table-column align="center"
                            prop="studentId"
@@ -85,6 +97,7 @@
             <template slot-scope="scope">
               <div>
                 <el-button type="text"
+                           v-permission="'studentManage/findStudentCourseHomeworks'"
                            @click="lookDetail(scope.row)">查看</el-button>
               </div>
             </template>
@@ -98,7 +111,8 @@
         <el-dialog title="作业详情"
                    :visible.sync="classVisible"
                    width="1000px">
-          <studentWork :courseScheduleId="activeRow.id"></studentWork>
+          <studentWork v-if="activeRow"
+                       :courseScheduleId="activeRow.courseScheduleId"></studentWork>
         </el-dialog>
       </div>
     </div>
@@ -110,17 +124,21 @@ import axios from "axios";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
-import { getTeacher, getEmployeeOrgan } from "@/api/buildTeam";
+import { courseListType } from '@/utils/searchArray'
+import { getEmployeeOrgan } from "@/api/buildTeam";
 import studentWork from "@/views/teamDetail/componentCourse/studentWork";
+import { getHomePageList } from "./api.js"
 export default {
   components: { pagination, studentWork },
   data () {
     return {
+      courseListType,
       searchForm: {
         search: null,
         organId: null,
-        courseTimer: null
+        groupType: 'MUSIC'
       },
+      courseTimer: [],
       teacherList: [],
       tableList: [],
       organList: [],
@@ -139,11 +157,6 @@ export default {
   created () { },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted () {
-    getTeacher().then(res => {
-      if (res.code == 200) {
-        this.teacherList = res.data;
-      }
-    });
     getEmployeeOrgan().then(res => {
       if (res.code == 200) {
         this.organList = res.data;
@@ -155,22 +168,50 @@ export default {
 
 
   },
-  // activated () {
-  //   this.init();
-  // },
+  activated () {
+    this.init();
+  },
   methods: {
     init () {
+      this.getList()
+    },
+    getList () {
+      let date = this.searchForm;
+      let classStartDate, classEndDate;
+      if (this.courseTimer?.length > 0) {
+        classStartDate = this.courseTimer[0]
+        classEndDate = this.courseTimer[1]
+      } else {
+        classStartDate = null
+        classEndDate = null
+      }
+      date.classStartDate = classStartDate
+      date.classEndDate = classEndDate
+      date.page = this.rules.page
+      date.rows = this.rules.limit
+      getHomePageList(date).then(res => {
+        if (res.code == 200) {
+          this.tableList = res.data.rows
+          this.rules.total = res.data.total
+        }
+      })
     },
-    getList () { },
     search () {
       this.rules.page = 1
       this.getList()
     },
     onReSet () {
+      this.searchForm = {
+        search: null,
+        organId: null,
+        groupType: 'MUSIC'
+      }
+      this.courseTimer = []
       this.search()
     },
     lookDetail (row) {
-
+      this.activeRow = row
+      this.classVisible = true
     }
   }
 };

+ 1 - 0
src/views/studentManager/studentList.vue

@@ -700,6 +700,7 @@ export default {
     async getSubjectList () {
       await subjectListTree({
         delFlag: 0,
+        tenantId: 1,
         rows: 9999
       }).then(res => {
         let result = res.data;

+ 74 - 49
src/views/teamDetail/componentCourse/gpsLocation.vue

@@ -1,21 +1,33 @@
 <template>
   <div>
-    <p class="title">打卡地相距教学点{{distance}}米</p>
     <!-- <el-amap-search-box class="search-box"
                         value="searchValue"
                         :search-option="searchOption"
                         :on-search-result="onSearchResult"></el-amap-search-box> -->
     <el-amap :zoom="zoom"
+             ref='map'
              vid="amapDemo"
              :amap-manager="amapManager"
-             :plugin="plugin"
              :center="center"
+             :events="markerEvents"
              class="amap-demo">
-      <!--  :events="markerEvents()" -->
+      <!--  :plugin="plugin"  -->
       <el-amap-marker v-for="(marker, index) in markers"
                       :key="index"
                       :position="marker.location"
                       :title="marker.title"></el-amap-marker>
+      <el-amap-text v-for="(marker,index) in markers"
+                    :key="index+'xxx'"
+                    :text="marker.title"
+                    :position="marker.location"
+                    :offset="[40,-10]"></el-amap-text>
+      <el-amap-polyline :path="path"
+                        strokeColor='#4196fc'></el-amap-polyline>
+      <el-amap-text v-for="(text,index) in texts"
+                    :key="index+'ooo'"
+                    :text="text.text"
+                    :position="text.position"
+                    :offset="[-50,0]"></el-amap-text>
     </el-amap>
   </div>
 </template> 
@@ -45,38 +57,45 @@ import VueAMap from 'vue-amap'
 // Vue.use(VueAMap)
 VueAMap.initAMapApiLoader({
   key: 'b1e6ac2eb28902ce91a490edf194e000',
-  plugin: ['AMap.Geolocation', 'AMap.PlaceSearch', 'AMap.Geocoder'],
-  v: '1.4.4'
+  plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor'],
+  v: '1.4.4',
 })
 let amapManager = new VueAMap.AMapManager();
 import { getTeacherPersonalAttendance } from '@/api/buildTeam'
+
 export default {
-  props: ['courseScheduleId'],
+  props: ['activeRow'],
   data () {
     return {
       zoom: 20,
       amapManager,
       center: [114.34371, 30.55939],
-      // events: {
-      //   init (o) {
-      //     let marker = new AMap.Marker({
-      //       position: [114.34371, 30.55939]
-      //     });
-
-      //     marker.setMap(o);
-      //   }
-      // },
       markers: [],
-      plugin: [],
       distance: '-',
       schoolLongitudeLatitude: null,
       signInLongitudeLatitude: null,
+      markerEvents: {
+        complete: (o) => {
+          this.$refs.map.$amap.setFitView()
 
+        }
+      },
+      path: [],
+      texts: []
+    }
+  },
+  watch: {
+    activeRow (val) {
+      if (val) {
+        console.log(val)
+        this.init()
+      }
     }
   },
   mounted () {
     this.init()
   },
+
   activated () {
     // this.init()
   },
@@ -85,40 +104,40 @@ export default {
     // searchOption () { },
     // 重置
     init () {
-      getTeacherPersonalAttendance({ courseScheduleId: this.courseScheduleId }).then(res => {
-        if (res.code == 200) {
-          if (res.data && res.data.signInLongitudeLatitude) {
-            let add = {
-              title: '签到点',
-              location: res.data.signInLongitudeLatitude.split(',')
-            }
-            this.center = res.data.signInLongitudeLatitude.split(',');
-            this.signInLongitudeLatitude = res.data.signInLongitudeLatitude.split(',')
-            this.markers.push(add)
-          }
-          if (res.data && res.data.signOutLongitudeLatitude) {
-            let add = {
-              title: '签退点',
-              location: res.data.signOutLongitudeLatitude.split(',')
-            }
-            this.center = res.data.signOutLongitudeLatitude.split(',');
-            this.signOutLongitudeLatitude = res.data.signOutLongitudeLatitude.split(',')
-            this.markers.push(add)
-          }
+      if (this.activeRow.schoolLongitudeLatitude) {
+        let add = {
+          title: '教学点',
+          location: this.activeRow.schoolLongitudeLatitude.split(','),
+        }
+        this.center = this.activeRow.schoolLongitudeLatitude.split(',');
+        this.schoolLongitudeLatitude = this.activeRow.schoolLongitudeLatitude.split(',')
+        this.markers.push(add)
 
-          if (res.data && res.data.schoolLongitudeLatitude) {
-            let add = {
-              title: '教学点',
-              location: res.data.schoolLongitudeLatitude.split(',')
-            }
-            this.schoolLongitudeLatitude = res.data.schoolLongitudeLatitude.split(',')
-            this.center = res.data.schoolLongitudeLatitude.split(',');
-            this.markers.push(add)
-          }
-          this.getDistance(this.signInLongitudeLatitude, this.schoolLongitudeLatitude)
+      }
+      if (this.activeRow.signInLongitudeLatitude) {
+        let add = {
+          title: '签到点',
+          location: this.activeRow.signInLongitudeLatitude.split(',')
+        }
+        this.center = this.activeRow.signInLongitudeLatitude.split(',');
+        this.signInLongitudeLatitude = this.activeRow.signInLongitudeLatitude.split(',')
+        this.markers.push(add)
+      }
+      if (this.activeRow.signOutLongitudeLatitude) {
+        let add = {
+          title: '签退点',
+          location: this.activeRow.signOutLongitudeLatitude.split(',')
         }
-      })
-      // this.getDistance()
+        this.center = this.activeRow.signOutLongitudeLatitude.split(',');
+        this.signOutLongitudeLatitude = this.activeRow.signOutLongitudeLatitude.split(',')
+        this.markers.push(add)
+      }
+      // if (this.$refs.map) {
+      //   this.$refs.map.$amap.setFitView(this.markers)
+      // }
+
+      this.getDistance(this.signInLongitudeLatitude, this.schoolLongitudeLatitude)
+      this.getDistance(this.signOutLongitudeLatitude, this.schoolLongitudeLatitude)
     },
     onSearchResult () { },
     getDistance (sigin, school) {
@@ -134,7 +153,13 @@ export default {
 
         let p1 = marker1.getPosition();
         let p2 = marker2.getPosition();
+        var textPos = p1.divideBy(2).add(p2.divideBy(2));
+        console.log(textPos)
+        let position = [textPos.lng, textPos.lat]
         var distance = Math.round(p1.distance(p2));
+
+        this.path.push(sigin, school)
+        this.texts.push({ text: `两点相距${distance}米`, position })
         this.distance = distance;
       }
 
@@ -148,6 +173,6 @@ export default {
   margin-bottom: 20px;
 }
 .amap-demo {
-  height: 300px;
+  height: 500px;
 }
 </style>

+ 12 - 5
src/views/teamDetail/componentCourse/studentWork.vue

@@ -22,14 +22,15 @@
       <el-table :data="tableList"
                 :header-cell-style="{background:'#EDEEF0',color:'#444'}">
         <el-table-column align="center"
-                         prop="username"
+                         prop="studentName"
                          label="学生姓名"></el-table-column>
         <el-table-column align="center"
-                         prop="username"
+                         prop="studentId"
                          label="学生编号"></el-table-column>
         <el-table-column align="center"
                          prop="phone"
-                         label="手机号"></el-table-column>
+                         label="手机号"
+                         width="120"></el-table-column>
         <el-table-column align="center"
                          prop="subjectName"
                          label="声部名称"></el-table-column>
@@ -41,13 +42,13 @@
             <div>{{ scope.row.createTime | dateForMinFormat}}</div>
           </template>
         </el-table-column>
-        <el-table-column align="center"
+        <!-- <el-table-column align="center"
                          prop="isView"
                          label="是否交付">
           <template slot-scope="scope">
             <div>{{ scope.row.isView ? '是' : '否' }}</div>
           </template>
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column align="center"
                          prop="isView"
                          label="是否查看">
@@ -173,6 +174,12 @@ export default {
     closeWorkVisible () {
       this.activeUrl = "";
     }
+  }, watch: {
+    courseScheduleId (val) {
+      if (val) {
+        this.init()
+      }
+    }
   }
 };
 </script>

+ 144 - 0
src/views/teamDetail/componentCourse/teacherList.vue

@@ -0,0 +1,144 @@
+<template>
+  <div class="tableWrap">
+    <el-table :data='tableList'
+              :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+      <el-table-column align='center'
+                       prop="teacherName"
+                       width="150px"
+                       label="老师姓名">
+        <template slot-scope="scope">
+          <div>
+            {{scope.row.teacherName}}({{scope.row.teacherId}})
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align='center'
+                       prop="teacherRole"
+                       label="老师类型">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.teacherRole|workType}}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align='center'
+                       prop="teacherPhone"
+                       label="签到时间">
+        <template slot-scope="scope">
+          <div>
+            {{scope.row.signInTime | dayjsFormatMinute}}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align='center'
+                       prop="teacherPhone"
+                       label="签退时间">
+        <template slot-scope="scope">
+          <div>
+            {{scope.row.signOutTime | dayjsFormatMinute}}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align='center'
+                       prop="teacherPhone"
+                       label="签到状态">
+        <template slot-scope="scope">
+          <div>{{ scope.row.signInStatus | attendanceType}}</div>
+        </template>
+      </el-table-column>
+      <el-table-column align='center'
+                       prop="teacherPhone"
+                       label="签退状态">
+        <template slot-scope="scope">
+          <div>{{ scope.row.signOutStatus | attendanceOutType}}</div>
+        </template>
+      </el-table-column>
+      <el-table-column align='center'
+                       width="200px"
+                       label="操作">
+        <template slot-scope="scope">
+          <div>
+            <el-button type="text"
+                       size="small"
+                       v-permission="'teacherAttendance/updateTeacherAttendance'"
+                       @click="mackAttendance(scope.row)">补考勤</el-button>
+            <el-button type="text"
+                       v-if="teachMode == 'OFFLINE'"
+                       size="small"
+                       @click="lookGPS(scope.row)">GPS定位</el-button>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-dialog width="1000px"
+               title="GPS"
+               :visible.sync="gpsVisible"
+               append-to-body>
+      <gpsLoction v-if="gpsVisible"
+                  :activeRow='activeRow' />
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { updateTeacherAttendance } from "@/api/buildTeam";
+import { getCourseTeachers } from "@/api/teacherManager";
+import gpsLoction from "../componentCourse/gpsLocation";
+export default {
+  components: { gpsLoction },
+  props: ['courseScheduleId', 'teachMode'],
+  data () {
+    return {
+      tableList: [],
+      gpsVisible: false,
+      activeRow: null
+    }
+  },
+  mounted () {
+    this.init()
+    console.log(this.teachMode)
+  },
+  activated () { },
+  methods: {
+    getList () {
+
+      getCourseTeachers({ courseScheduleId: this.courseScheduleId }).then(res => {
+        if (res.code == 200) {
+          this.tableList = res.data
+        }
+      })
+    },
+    init () {
+      this.getList()
+    },
+    lookGPS (row) {
+      this.activeRow = row;
+      this.gpsVisible = true
+    },
+    mackAttendance (row) {
+
+      this.$confirm('确定补考勤', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = {
+          teacherId: row.teacherId,
+          courseScheduleId: this.courseScheduleId,
+          signInStatus: 1,
+          signOutStatus: 1
+        };
+        updateTeacherAttendance(params).then(res => {
+          if (res.code == 200) {
+            this.$message.success("补卡成功");
+            this.getList();
+          } else {
+            this.$message.error(res.msg);
+          }
+        });
+
+      }).catch(() => { })
+
+    }
+  },
+}
+</script>

+ 3 - 3
src/views/teamDetail/components/courseList.vue

@@ -900,9 +900,9 @@ export default {
       }
     }
   }
-  .searchForm {
-    // margin: 0 30px;
-  }
+  // .searchForm {
+  //   // margin: 0 30px;
+  // }
 }
 .btnWraps {
   display: flex;

+ 64 - 30
src/views/teamDetail/teamCourseList.vue

@@ -239,7 +239,7 @@
           <el-table-column align="center"
                            label="详情"
                            fixed="right"
-                           width="120px">
+                           width="180px">
             <template slot-scope="scope">
               <div>
                 <el-button type="text"
@@ -248,6 +248,14 @@
                 <el-button type="text"
                            v-if="permission('courseSchedule/classStartDateAdjust?hight')"
                            @click="resetClass(scope.row)">调整</el-button>
+                <el-button type="text"
+                           v-if="
+                           scope.row.status=='OVER'
+                           &&
+                           !scope.row.isSettlement
+                           &&permission('courseSchedule/cleanAttendance')"
+                           @click="clearAttend(scope.row)"
+                           size="small">清除考勤</el-button>
               </div>
             </template>
           </el-table-column>
@@ -286,60 +294,60 @@
           disabled></el-input>-->
           <div class="inputStyle">{{maskForm.status | coursesStatus}}</div>
         </el-form-item>
-        <el-form-item label="签到时间">
-          <!-- <el-input v-model.trim=" maskForm.signInTime"
-          disabled></el-input>-->
+        <!-- <el-form-item label="签到时间">
           <div class="inputStyle">{{maskForm.signInTime | dateForMinFormat}}</div>
         </el-form-item>
         <el-form-item label="签退时间">
-          <!-- <el-input v-model.trim="maskForm.signOutTime"
-          disabled></el-input>-->
           <div class="inputStyle">{{maskForm.signOutTime | dateForMinFormat}}</div>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="是否点名">
           <!-- <el-input :value="maskForm.isCallNames | isCall"
           disabled></el-input>-->
           <div class="inputStyle">{{maskForm.isCallNames | isCall}}</div>
         </el-form-item>
-        <el-form-item label="签到状态">
-          <!-- <el-input :value=" maskForm.isSignIn | attendanceType"
-          disabled></el-input>-->
+        <!-- <el-form-item label="签到状态">
           <div class="inputStyle"
                :class="maskForm.isSignIn==1?'':'red'">{{ maskForm.isSignIn | attendanceType}}</div>
         </el-form-item>
         <el-form-item label="签退状态">
-          <!-- <el-input :value=" maskForm.isSignOut | attendanceOutType"
-          disabled></el-input>-->
           <div class="inputStyle"
                :class="maskForm.isSignIn==1?'':'red'">{{ maskForm.isSignOut | attendanceOutType}}</div>
+        </el-form-item> -->
+
+        <el-form-item label="上课时间">
+          {{ maskForm.startClassTime ? maskForm.startClassTime.substr(0, 16) : '' }}-{{ maskForm.endClassTime ? maskForm.endClassTime.substr(11,5) : ''}}
         </el-form-item>
         <el-form-item label="上课时长">
+
           <div class="inputStyle"
                :class=" (maskForm.attendClassTime <= 120)?'':'red'">{{ maskForm.attendClassTime>=0?maskForm.attendClassTime:0+'分钟'}}</div>
         </el-form-item>
-        <el-form-item label="备注">
-          <!-- <el-input :value=" maskForm.isSignOut | attendanceOutType"
-          disabled></el-input>-->
-          <div class="inputStyle">{{ maskForm.remark}}</div>
-        </el-form-item>
+
       </el-form>
       <!--  v-if="maskForm.status != 'NOT_START'" -->
       <el-tabs v-model.trim="activeName"
                type="card"
                @tab-click="handleClick">
-        <el-tab-pane label="点名"
+        <el-tab-pane label="学员列表"
                      name="first">
           <div v-if="activeName == 'first'">
             <!-- studentRollCall  -->
             <studentRollCall :courseScheduleId="maskForm.id"></studentRollCall>
           </div>
         </el-tab-pane>
-        <el-tab-pane label="GPS定位"
+        <!-- <el-tab-pane label="GPS定位"
                      v-if="maskForm.teachMode == 'OFFLINE'"
                      name="second">
           <div v-if="activeName == 'second'">
             <gpsLoction :courseScheduleId="maskForm.id"></gpsLoction>
           </div>
+        </el-tab-pane> -->
+        <el-tab-pane label="老师列表"
+                     name="second">
+          <div v-if="activeName == 'second'">
+            <teacherList :courseScheduleId="maskForm.id"
+                         :teachMode='maskForm.teachMode'></teacherList>
+          </div>
         </el-tab-pane>
         <el-tab-pane label="作业"
                      v-if="maskForm.teachMode != 'OFFLINE'"
@@ -372,7 +380,8 @@ import {
   getTeacher,
   getMusicGroupAllClass,
   superFindCourseSchedules,
-  getEmployeeOrgan
+  getEmployeeOrgan,
+  cleanAttendance
 } from "@/api/buildTeam";
 import { getTeacherPersonalAttendanceDetail } from "@/api/teacherManager";
 import { getSchool } from "@/api/systemManage";
@@ -386,6 +395,7 @@ import axios from "axios";
 import { getToken } from "@/utils/auth";
 import load from "@/utils/loading";
 import resetClass from './componentCourse/resetClass'
+import teacherList from './componentCourse/teacherList'
 let nowTime = new Date();
 nowTime =
   nowTime.getFullYear() +
@@ -439,7 +449,8 @@ export default {
     gpsLoction,
     studentWork,
     courseEvaluate,
-    resetClass
+    resetClass,
+    teacherList
   },
   activated () {
     this.init();
@@ -614,14 +625,17 @@ export default {
     lookDetail (row) {
       // this.maskForm = row;
       // 发请求 获取详情 row.id
-      getTeacherPersonalAttendanceDetail({ courseScheduleId: row.id }).then(res => {
-        if (res.code == 200) {
-          this.maskForm = res.data;
-          this.maskForm.id = row.id;
-          this.activeName = "first";
-          this.classVisible = true;
-        }
-      })
+      this.maskForm = row;
+      this.activeName = "first";
+      this.classVisible = true;
+      // getTeacherPersonalAttendanceDetail({ courseScheduleId: row.id }).then(res => {
+      //   if (res.code == 200) {
+      //     this.maskForm = res.data;
+      //     this.maskForm.id = row.id;
+      //     this.activeName = "first";
+      //     this.classVisible = true;
+      //   }
+      // })
 
     },
     handleClick (tab, event) {
@@ -634,7 +648,27 @@ export default {
     },
     closeReset () {
       this.show = false
-    }
+    },
+    clearAttend (row) {
+      this.$confirm("是否清除考勤记录?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          cleanAttendance({ courseScheduleIds: row.id }).then(
+            res => {
+              if (res.code == 200) {
+                this.$message.success("清除成功");
+                this.getList();
+              } else {
+                this.$message.error(res.msg);
+              }
+            }
+          );
+        })
+        .catch(() => { });
+    },
 
   },
   filters: {