瀏覽代碼

11/17 15:09

乐团新功能
mo 4 年之前
父節點
當前提交
f86d909c29

+ 8 - 0
src/api/studentManager.js

@@ -259,3 +259,11 @@ export function userCoursesAccount (data) {
   })
 }
 
+// 查看学员协议
+export function getLatest (data) {
+  return request({
+    url: api + `/sysUserContracts/getLatest`,
+    method: 'get',
+    params: data
+  })
+}

+ 3 - 1
src/router/index.js

@@ -340,6 +340,8 @@ export const asyncRoutes = {
   // 抽奖记录
   lotteryRecord: () => import('@/views/luckyDraw/lotteryRecord'),
   // 长三角比赛
-  matchManager: () => import('@/views/matchManager/index')
+  matchManager: () => import('@/views/matchManager/index'),
+  // 考勤列表
+  attendanceList: () => import('@/views/attendanceManager/attendanceList')
 }
 export default router

+ 179 - 0
src/views/attendanceManager/attendanceList/index.vue

@@ -0,0 +1,179 @@
+<!--  -->
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>作业列表
+    </h2>
+    <div class="m-core">
+      <el-form :inline="true"
+               :model="searchForm">
+        <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>
+        </el-form-item>
+        <el-form-item prop="organId">
+          <el-select class="multiple"
+                     filterable
+                     v-model.trim="searchForm.organId"
+                     clearable
+                     placeholder="请选择分部">
+            <el-option v-for="(item,index) in organList"
+                       :key="index"
+                       :label="item.name"
+                       :value="item.id"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-date-picker v-model.trim="searchForm.courseTimer"
+                          style="width:420px;"
+                          type="daterange"
+                          value-format="yyyy-MM-dd"
+                          range-separator="至"
+                          start-placeholder="上课开始日期"
+                          end-placeholder="上课结束日期"
+                          :picker-options="{
+        firstDayOfWeek: 1
+    }"></el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="search"
+                     type="danger">搜索</el-button>
+          <el-button @click="onReSet"
+                     type="primary">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <div class="tableWrap">
+        <el-table style="width: 100%"
+                  :header-cell-style="{background:'#EDEEF0',color:'#444'}"
+                  :data="tableList">
+          <el-table-column align="center"
+                           prop="studentId"
+                           label="课程编号"></el-table-column>
+          <el-table-column align="center"
+                           prop="studentId"
+                           label="课程名称"></el-table-column>
+          <el-table-column align="center"
+                           prop="studentId"
+                           label="分部"></el-table-column>
+          <el-table-column align="center"
+                           prop="studentId"
+                           label="乐团名称"></el-table-column>
+          <el-table-column align="center"
+                           prop="studentId"
+                           label="布置时间"></el-table-column>
+          <el-table-column align="center"
+                           prop="studentId"
+                           label="布置老师"></el-table-column>
+          <el-table-column align="center"
+                           prop="studentId"
+                           label="应交人数"></el-table-column>
+          <el-table-column align="center"
+                           prop="studentId"
+                           label="已交人数"></el-table-column>
+          <el-table-column align="center"
+                           prop="studentId"
+                           label="已回复数"></el-table-column>
+          <el-table-column align="center"
+                           prop="studentId"
+                           label="操作">
+            <template slot-scope="scope">
+              <div>
+                <el-button type="text"
+                           @click="lookDetail(scope.row)">查看</el-button>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination :total="rules.total"
+                    :page.sync="rules.page"
+                    :limit.sync="rules.limit"
+                    :page-sizes="rules.page_size"
+                    @pagination="getList" />
+        <el-dialog title="作业详情"
+                   :visible.sync="classVisible"
+                   width="1000px">
+          <studentWork :courseScheduleId="activeRow.id"></studentWork>
+        </el-dialog>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+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 studentWork from "@/views/teamDetail/componentCourse/studentWork";
+export default {
+  components: { pagination, studentWork },
+  data () {
+    return {
+      searchForm: {
+        search: null,
+        organId: null,
+        courseTimer: null
+      },
+      teacherList: [],
+      tableList: [],
+      organList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
+      },
+      activeRow: null,
+      classVisible: false
+    };
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  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;
+      }
+    });
+    // 获取分部
+
+    this.init();
+
+
+  },
+  // activated () {
+  //   this.init();
+  // },
+  methods: {
+    init () {
+    },
+    getList () { },
+    search () {
+      this.rules.page = 1
+      this.getList()
+    },
+    onReSet () {
+      this.search()
+    },
+    lookDetail (row) {
+
+    }
+  }
+};
+</script>
+<style lang='scss' scoped>
+</style>

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

@@ -196,6 +196,9 @@
               <el-button v-permission="'api-auth/user/updatePassword2'"
                          @click="resetPassWrod(scope.row)"
                          type="text">修改密码</el-button>
+              <el-button type="text"
+                         @click="lookContracts(scope.row)"
+                         v-permission="'sysUserContracts/getLatest'">下载协议</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -372,7 +375,8 @@ import {
   getStudentInfoByPhone,
   registerStudent,
   updateStudent,
-  studentHasCourse
+  studentHasCourse,
+  getLatest
 } from "@/api/studentManager";
 import cleanDeep from 'clean-deep'
 import { vaildStudentUrl } from "@/utils/validate";
@@ -753,6 +757,13 @@ export default {
           this.maskTeacherList = res.data;
         }
       });
+    },
+    lookContracts (row) {
+      getLatest({ userId: row.userId }).then(res => {
+        if (res.code == 200) {
+          window.open(res.data.url)
+        }
+      })
     }
   },
   watch: {

+ 10 - 0
src/views/teamDetail/componentCourse/studentWork.vue

@@ -25,6 +25,9 @@
                          prop="username"
                          label="学生姓名"></el-table-column>
         <el-table-column align="center"
+                         prop="username"
+                         label="学生编号"></el-table-column>
+        <el-table-column align="center"
                          prop="phone"
                          label="手机号"></el-table-column>
         <el-table-column align="center"
@@ -40,6 +43,13 @@
         </el-table-column>
         <el-table-column align="center"
                          prop="isView"
+                         label="是否交付">
+          <template slot-scope="scope">
+            <div>{{ scope.row.isView ? '是' : '否' }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column align="center"
+                         prop="isView"
                          label="是否查看">
           <template slot-scope="scope">
             <div>{{ scope.row.isView ? '是' : '否' }}</div>

+ 2 - 2
src/views/teamDetail/teamCourseList.vue

@@ -323,8 +323,8 @@
           <div class="inputStyle">{{ maskForm.remark}}</div>
         </el-form-item>
       </el-form>
+      <!--  v-if="maskForm.status != 'NOT_START'" -->
       <el-tabs v-model.trim="activeName"
-               v-if="maskForm.status != 'NOT_START'"
                type="card"
                @tab-click="handleClick">
         <el-tab-pane label="点名"
@@ -342,7 +342,7 @@
           </div>
         </el-tab-pane>
         <el-tab-pane label="作业"
-                     v-if="maskForm.type != 'VIP'"
+                     v-if="maskForm.teachMode != 'OFFLINE'"
                      name="third">
           <div v-if="activeName == 'third'">
             <studentWork :courseScheduleId="maskForm.id"></studentWork>