Jelajahi Sumber

网管课添加点名功能

lex-xin 5 tahun lalu
induk
melakukan
b69fd10868

File diff ditekan karena terlalu besar
+ 0 - 0
dist/index.html


+ 1 - 1
dist/static/css/chunk-1db50a70.f75339f3.css → dist/static/css/chunk-5e6a3bf6.2a81a6f8.css

@@ -1 +1 @@
-.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.titlewrap[data-v-4069c78e]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.titlewrap[data-v-4069c78e],.wrap[data-v-4069c78e]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.wrap div[data-v-4069c78e]{margin-right:20px}
+.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.titlewrap[data-v-1036950e]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.titlewrap[data-v-1036950e],.wrap[data-v-1036950e]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.wrap div[data-v-1036950e]{margin-right:20px}

File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/app.ef4de8d6.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-1db50a70.59f6e10d.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-5e6a3bf6.364a1f43.js


+ 122 - 4
src/views/accompanyManager/accompanys.vue

@@ -108,6 +108,8 @@
               >更换老师</el-button>
               <el-button v-if="scope.row.status == 'OVER' && scope.row.isSettlement == 0 && permission('teacherAttendance/updateTeacherAttendance', '/accompanys')" type="text" @click="onMarkAttendance(scope.row)"
               >补考勤</el-button>
+              <!--  && permission('studentAttendance/updateStudentAttendances', '/accompanys') -->
+              <el-button v-if="scope.row.status == 'OVER' && scope.row.isSettlement == 0 && permission('studentAttendance/updateStudentAttendances', '/accompanys')" type="text" @click="onCallName(scope.row)">点名表</el-button>
               <el-button
                 type="text"
                 v-if="!scope.row.isSettlement && permission('accompanys/cleanAttendance')"
@@ -245,8 +247,7 @@
       title="课程组调整"
       width="400px"
       :before-close="teacherClose"
-      :visible.sync="teacherVisible"
-    >
+      :visible.sync="teacherVisible">
       <el-form
         :model="teacherForm"
         ref="teacherForm"
@@ -381,6 +382,51 @@
         <el-button type="primary" v-show="isaddCourse" @click="addCourseSubmit">确 定</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog title='点名表'
+               width="700px"
+               :visible.sync="rollCall.status">
+      <el-table :data="rollCall.gridData">
+        <el-table-column align='center'
+                         property="userName"
+                         label="学员姓名"></el-table-column>
+        <el-table-column align='center'
+                         property="phone"
+                         label="手机号"></el-table-column>
+        <el-table-column align='center'
+                         property="subjectName"
+                         label="学员声部"></el-table-column>
+        <el-table-column align='center'
+                         label="到课状态">
+          <template slot-scope="scope">
+            {{ scope.row.status | studentCallName }}
+          </template>
+        </el-table-column>
+        <el-table-column align='center'
+                         label="操作"
+                         width="220px">
+          <template slot-scope="scope">
+            <el-button size="small"
+                       @click="onChangeRollCall('TRUANT', scope.row)"
+                       type="primary"
+                       round>未到</el-button>
+            <el-button size="small"
+                       @click="onChangeRollCall('LEAVE', scope.row)"
+                       type="warning"
+                       round>请假</el-button>
+            <el-button size="small"
+                       @click="onChangeRollCall('NORMAL', scope.row)"
+                       type="success"
+                       round>到课</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :total="rollCall.total"
+                  :page.sync="rollCall.page"
+                  :limit.sync="rollCall.limit"
+                  :page-sizes="rollCall.page_size"
+                  @pagination="getCallName" />
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -401,7 +447,9 @@ import {
   findEducationUsers,
   updateTeacherAttendance,
   superFindCourseSchedules,
-  updateCoursesExpireDate
+  updateCoursesExpireDate,
+  findAttendanceStudentByCourseWithPage,
+  updateStudentAttendances
 } from "@/api/buildTeam";
 import {
   vipCourseAdjust,
@@ -517,7 +565,16 @@ export default {
         status: false,
         dataInfo: {}
       },
-      bigin: this.beginDate()
+      bigin: this.beginDate(),
+      rollCall: { // 点名表
+        status: false,
+        gridData: [],
+        selectItem: {}, // 选中状态
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
+      }
     };
   },
   mounted() {
@@ -563,6 +620,55 @@ export default {
       this.getCourseGroup();
       this.getList();
     },
+    onCallName (item) { // 点名表
+      this.rollCall.page = 1
+      this.rollCall.selectItem = item
+      this.getCallName()
+    },
+    getCallName () {
+      let rollCall = this.rollCall
+      let params = {
+        page: rollCall.page,
+        rows: rollCall.limit,
+        courseScheduleId: rollCall.selectItem.id
+      }
+      findAttendanceStudentByCourseWithPage(params).then(res => {
+        let result = res.data
+        rollCall.status = true
+        if (res.code == 200) {
+          rollCall.gridData = result.rows
+          rollCall.total = result.total
+        }
+      })
+    },
+    onChangeRollCall (type, row) {
+      let rollCall = this.rollCall
+      let params = {
+        courseScheduleId: rollCall.selectItem.id,
+        studentAttendances: [{
+          userId: row.studentId,
+          status: type
+        }]
+      }
+      updateStudentAttendances(params).then(res => {
+        if (res.code == 200) {
+          this.$message.success('修改成功')
+          row.status = type
+          this.getList()
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
+    lookStudents (row) {
+      let id = row.id;
+      getStudyStudents({ courseScheduleId: id }).then(res => {
+        if (res.code == 200) {
+          this.studentList = res.data;
+          this.studentVisible = true;
+        }
+      })
+    },
     getCourseGroup() {
       practiceGroupManage({ search: this.practiceId }).then(res => {
         if (res.code == 200) {
@@ -956,6 +1062,18 @@ export default {
 
     // }
   },
+  filters: {
+    studentCallName: value => {
+      let template = {
+        NORMAL: "到课",
+        TRUANT: "未到",
+        LEAVE: "请假",
+        DROP_OUT: "退学",
+        '': '未到'
+      }
+      return template[value]
+    }
+  },
   watch: {
     adjustmentVisible(val) {
       if (!val) {

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini