Explorar o código

04/06 16:39

对外课程列表
Xiao_Mo %!s(int64=5) %!d(string=hai) anos
pai
achega
2bf4af7ddd

+ 10 - 0
src/api/studentManager.js

@@ -221,3 +221,13 @@ export function transferCourseBalanceToBalance (data) {
     data: qs.stringify(data)
   })
 }
+
+
+// 学生对外课 findStudentCourseGroupsWithWeb
+export function findStudentCourseGroupsWithWeb (data) {
+  return request({
+    url: api + `/coursesGroupController/findStudentCourseGroupsWithWeb`,
+    method: 'get',
+    params: data
+  })
+}

+ 9 - 0
src/api/teacherManager.js

@@ -232,4 +232,13 @@ export function queryTenantAcGet (data) {
     method: 'get',
     params: data
   })
+}
+
+// 老师对外课 findStudentCourseGroupsWithWeb
+export function findTeacherCourseGroupsWithWeb (data) {
+  return request({
+    url: api + `/coursesGroupController/findTeacherCourseGroupsWithWeb`,
+    method: 'get',
+    params: data
+  })
 }

+ 8 - 1
src/utils/searchArray.js

@@ -93,6 +93,12 @@ const courseStatus = [
   { value: "UNDERWAY", label: "进行中" },
   { value: "OVER", label: "已结束" },
 ]
+const courseGroupStatus = [
+  { value: "NORMAL", label: "正常" },
+  { value: "LOCK", label: "锁定" },
+  { value: "FINISH", label: "结束" },
+  { value: "CANCEL", label: "取消" },
+]
 
 // 老师时间充值状态
 const teacherTimeStatus = [
@@ -114,5 +120,6 @@ export {
   musicGroupStatus,
   vipGroupStatus,
   courseStatus,
-  teacherTimeStatus
+  teacherTimeStatus,
+  courseGroupStatus
 }

+ 247 - 0
src/views/studentManager/components/studentOutList.vue

@@ -0,0 +1,247 @@
+
+<template>
+  <div class='studentOut'>
+    <!-- 搜索类型 -->
+    <el-form :inline="true"
+             class="searchForm"
+             v-model.trim="searchForm">
+      <el-form-item>
+        <el-input placeholder="课程名称"
+                  @keyup.enter.native='onSearch'
+                  v-model.trim="searchForm.search"></el-input>
+      </el-form-item>
+       <el-form-item label="课程状态">
+        <el-select v-model.trim="searchForm.groupStatus" clearable>
+          <el-option
+            v-for="(item,index) in courseGroupStatus"
+            :key="index"
+            :value="item.value"
+            :label="item.label"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="onSearch"
+                   type="danger">搜索</el-button>
+      </el-form-item>
+    </el-form>
+
+    <div class="tableWrap">
+      <el-table :header-cell-style="{background:'#EDEEF0',color:'#444'}"
+                :data='tableList'>
+        <el-table-column label="编号"
+                         align='center'
+                         prop='id'>
+        </el-table-column>
+        <el-table-column label="课程组名称"
+                         align='center'
+                         prop="name">
+        </el-table-column>
+        <el-table-column label="课程组状态"
+                         align='center'>
+          <template slot-scope="scope">
+            {{ scope.row.status | courseGroup }}
+          </template>
+        </el-table-column>
+        <el-table-column label="老师"
+                         align='center'
+                         prop="teacherName">
+        </el-table-column>
+        <el-table-column label="班级人数"
+                         align='center'
+                         prop="studentNum">
+        </el-table-column>
+
+        <el-table-column label="开课时间"
+                         align='center'
+                         prop="coursesStartDate">
+        </el-table-column>
+        <el-table-column label="当前课次"
+                         align='center'
+                         prop="currentClassTimes">
+          <template slot-scope="scope">
+            {{ scope.row.currentClassTimes }}/{{ scope.row.totalClassTimes }}
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :total="pageInfo.total"
+                  :page.sync="pageInfo.page"
+                  :limit.sync="pageInfo.limit"
+                  :page-sizes="pageInfo.page_size"
+                  @pagination="getCourseList" />
+
+      <!-- <el-dialog :title="dialogTitle"
+                 :visible.sync="dialogTableVisible">
+        <el-table :data="gridData">
+          <el-table-column prop="courseDate"
+                           label="时间"
+                           align='center'
+                           width="150"></el-table-column>
+          <el-table-column prop="classGroupName"
+                           label="课程名称"
+                           align='center'
+                           width="200"></el-table-column>
+          <el-table-column label="课程类型"
+                           align='center'>
+            <template slot-scope="scope">
+              {{ scope.row.teachMode == 'ONLINE' ? '线上' : '线下' }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="courseStatus"
+                           align='center'
+                           label="课程状态">
+            <template slot-scope="scope">
+              {{ scope.row.courseStatus |coursesStatus }}
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-dialog> -->
+    </div>
+  </div>
+</template>
+<script>
+import pagination from '@/components/Pagination/index'
+import { courseGroupStatus } from "@/utils/searchArray";
+import { findStudentCourseGroupsWithWeb } from '@/api/studentManager'
+export default {
+  name: 'studentvip',
+  components: { pagination },
+  data () {
+    return {
+      searchForm: {
+        studentId: null,
+        search: null,
+        groupStatus:null
+      },
+      checkIndex: null, // 选中的课程
+      dialogTableVisible: false,
+      tableList: [],
+      courseList: [],
+      courseGroupStatus:courseGroupStatus,
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
+      },
+      dialogTitle: '',
+      gridData: [],
+      userId: ''
+    }
+  },
+  created () {
+    this.userId = this.$route.query.userId || null;
+  },
+  mounted () {
+    this.searchForm.studentId = this.$route.query.userId
+    this.getCourseList()
+  },
+  activated() {
+    this.userId = this.$route.query.userId || null
+    this.searchForm.studentId = this.$route.query.userId
+    this.getCourseList()
+  },
+  methods: {
+    // onCheckCourse(item) {
+    //   this.checkIndex = item.id
+    //   this.getList()
+    // },
+    getCourseList () {
+      let params = this.searchForm
+      params.rows = this.pageInfo.limit
+      params.page = this.pageInfo.page
+      findStudentCourseGroupsWithWeb(params).then(res => {
+        if (res.code == 200) {
+          this.tableList = res.data.rows
+          this.pageInfo.total = res.data.total
+        }
+      })
+    },
+    onSearch () {
+      this.pageInfo.page = 1
+      this.getCourseList()
+    }
+    // getList() {
+    //   findStudentCourses({
+    //     vipGroupId: this.checkIndex,
+    //     rows: this.pageInfo.limit,
+    //     page: this.pageInfo.page
+    //   }).then(res => {
+    //     if(res.code ==200) {
+    //       this.tableList = res.data.rows
+    //       this.pageInfo.total = res.data.total
+    //     }
+    //   })
+    // }
+  }
+}
+</script>
+<style lang="scss">
+.studentOut {
+  .topCard {
+    display: flex;
+    flex-direction: row;
+    justify-content: flex-start;
+    margin-bottom: 30px;
+    .cardItem {
+      margin-right: 15px;
+      width: 300px;
+      height: 130px;
+      padding: 20px 24px;
+      box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.1);
+      box-sizing: border-box;
+      border-radius: 6px;
+      .top {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        margin-bottom: 23px;
+        .name {
+          font-size: 14px;
+          color: #323c47;
+          font-weight: 500;
+        }
+        .type {
+          font-size: 14px;
+          color: #aaa;
+        }
+      }
+      .bottom {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        text-align: center;
+        p {
+          font-size: 14px;
+          color: #444;
+        }
+        .title {
+          color: #aaa;
+          margin-bottom: 8px;
+        }
+      }
+    }
+    .cardItem.active {
+      background-color: #14928a;
+      .name {
+        font-size: 14px;
+        color: #fff;
+        font-weight: 500;
+      }
+      .type {
+        font-size: 14px;
+        color: #fff;
+      }
+      .bottom {
+        p {
+          color: #fff;
+        }
+        .title {
+          color: #fff;
+        }
+      }
+    }
+  }
+}
+</style>

+ 4 - 9
src/views/studentManager/components/studentRecord.vue

@@ -85,7 +85,7 @@
           </template>
         </el-table-column>
         <el-table-column align='center'
-                         label="班级类型">
+                         label="课程类型">
           <template slot-scope="scope">
             {{ scope.row.classGroupType | classType }}
           </template>
@@ -130,7 +130,7 @@
 <script>
 import pagination from '@/components/Pagination/index'
 import { findStudentAttendances } from '@/api/studentManager'
-import { courseStatus } from '@/utils/searchArray'
+import { courseStatus,courseType } from '@/utils/searchArray'
 export default {
   name: 'studentRecord',
   components: { pagination },
@@ -146,13 +146,8 @@ export default {
       },
       searchLsit: [],
       tableList: [],
-      courseArray: [
-        { label: '单技课', value: 'NORMAL' },
-        { label: '合奏课', value: 'MIX' },
-        { label: '基础技能班', value: 'HIGH' },
-        { label: 'VIP课', value: 'VIP' },
-        { label: '试听课', value: 'DEMO' }
-      ],
+      courseArray: courseType,
+        
       att: [
         { value: "NORMAL", label: "正常" },
         { value: "TRUANT", label: "旷课" },

+ 60 - 50
src/views/studentManager/index.vue

@@ -1,55 +1,49 @@
 <template>
   <div class="m-container">
     <h2>
-      <el-page-header @back="onCancel"
-                      content="学员详情"></el-page-header>
+      <el-page-header @back="onCancel" :content="studentName"></el-page-header>
     </h2>
     <div class="m-core">
       <!-- navMenu -->
-      <el-tabs v-model.trim="activeIndex"
-               type="card"
-               @tab-click="handleClick">
-        <el-tab-pane label="基本信息" v-if="permissionList.studentInfo"
-                     name="1">
+      <el-tabs v-model.trim="activeIndex" type="card" @tab-click="handleClick">
+        <el-tab-pane label="基本信息" v-if="permissionList.studentInfo" name="1">
           <studentInfo v-if="activeIndex == 1" />
         </el-tab-pane>
-        <el-tab-pane label="乐团&课程" v-if="permissionList.teamAndcourse"
-                     name="2">
+        <el-tab-pane label="乐团&课程" v-if="permissionList.teamAndcourse" name="2">
           <teamAndcourse v-if="activeIndex == 2" />
         </el-tab-pane>
-        <el-tab-pane label="VIP课" v-if="permissionList.studentVip"
-                     name="3">
+        <el-tab-pane label="VIP课" v-if="permissionList.studentVip" name="3">
           <studentVip v-if="activeIndex == 3" />
         </el-tab-pane>
-        <el-tab-pane label="上课记录" v-if="permissionList.studentRecord"
-                     name="4">
-          <studentRecord v-if="activeIndex == 4" />
+        <el-tab-pane label="对外课程" v-if="permissionList.studentOutList" name="4">
+          <studentOutList v-if="activeIndex == 4" />
         </el-tab-pane>
-        <el-tab-pane label="扣费记录" v-if="permissionList.studentPayList"
-                     name="5">
-          <studentPayList v-if="activeIndex == 5" />
+        <el-tab-pane label="上课记录" v-if="permissionList.studentRecord" name="5">
+          <studentRecord v-if="activeIndex == 5" />
         </el-tab-pane>
-        <el-tab-pane label="学员订单" v-if="permissionList.studentOrder"
-                     name="6">
-          <studentOrder v-if="activeIndex == 6" />
+        <el-tab-pane label="扣费记录" v-if="permissionList.studentPayList" name="6">
+          <studentPayList v-if="activeIndex == 6" />
         </el-tab-pane>
-        <el-tab-pane label="学员提现" v-if="permissionList.studentCashout"
-                     name="7">
-          <studentCashout v-if="activeIndex == 7" />
+        <el-tab-pane label="学员订单" v-if="permissionList.studentOrder" name="7">
+          <studentOrder v-if="activeIndex == 7" />
+        </el-tab-pane>
+        <el-tab-pane label="学员提现" v-if="permissionList.studentCashout" name="8">
+          <studentCashout v-if="activeIndex == 8" />
         </el-tab-pane>
       </el-tabs>
     </div>
   </div>
 </template>
 <script>
-import studentInfo from './components/studentInfo.vue';
-import teamAndcourse from './components/teamAndcourse.vue';
-import studentRecord from './components/studentRecord.vue';
-import studentPayList from './components/studentPayList.vue';
-import studentVip from './components/studentVip.vue';
-import studentOrder from './components/studentOrder.vue';
-import studentCashout from './components/studentCashout.vue';
-import { permission } from '@/utils/directivePage'
+import studentInfo from "./components/studentInfo.vue";
+import teamAndcourse from "./components/teamAndcourse.vue";
+import studentRecord from "./components/studentRecord.vue";
+import studentPayList from "./components/studentPayList.vue";
+import studentVip from "./components/studentVip.vue";
+import studentOutList from "./components/studentOutList.vue";
+import studentOrder from "./components/studentOrder.vue";
+import studentCashout from "./components/studentCashout.vue";
+import { permission } from "@/utils/directivePage";
 export default {
   components: {
     teamAndcourse,
@@ -58,42 +52,58 @@ export default {
     studentInfo,
     studentVip,
     studentOrder,
-    studentCashout
+    studentCashout,
+    studentOutList
   },
-  name: 'studentDetail',
-  data () {
+  name: "studentDetail",
+  data() {
     return {
-      activeIndex: '1',
+      activeIndex: "1",
       // acitveStatus: [true, false, false, false, false, false, false]
       permissionList: {
-        studentInfo: permission('/studentDetail/studentInfo'),
-        teamAndcourse: permission('/studentDetail/teamAndcourse'),
-        studentVip: permission('/studentDetail/studentVip'),
-        studentRecord: permission('/studentDetail/studentRecord'),
-        studentPayList: permission('/studentDetail/studentPayList'),
-        studentOrder: permission('/studentDetail/studentOrder'),
-        studentCashout: permission('/studentDetail/studentCashout'),
-      }
+        studentInfo: permission("/studentDetail/studentInfo"),
+        teamAndcourse: permission("/studentDetail/teamAndcourse"),
+        studentVip: permission("/studentDetail/studentVip"),
+        studentRecord: permission("/studentDetail/studentRecord"),
+        studentPayList: permission("/studentDetail/studentPayList"),
+        studentOrder: permission("/studentDetail/studentOrder"),
+        studentCashout: permission("/studentDetail/studentCashout"),
+        studentOutList: permission("/studentDetail/studentOutList"),
+      },
+      studentName: ""
+    };
+  },
+  mounted() {
+    if (this.$route.query.search) {
+      this.Fsearch = this.$route.query.search;
+    }
+    if (this.$route.query.rules) {
+      this.Frules = this.$route.query.rules;
     }
+    this.studentName = this.$route.query.studentName;
   },
-  mounted () {
+  activated() {
     if (this.$route.query.search) {
       this.Fsearch = this.$route.query.search;
     }
     if (this.$route.query.rules) {
-      this.Frules = this.$route.query.rules
+      this.Frules = this.$route.query.rules;
     }
+    this.studentName = this.$route.query.studentName;
   },
   methods: {
-    onCancel () {
-      this.$router.push({ path: '/business/studentList', query: { rules: this.Frules, search: this.Fsearch } })
+    onCancel() {
+      this.$router.push({
+        path: "/business/studentList",
+        query: { rules: this.Frules, search: this.Fsearch }
+      });
     },
-    handleClick (val) {
-      this.activeIndex = val.name
+    handleClick(val) {
+      this.activeIndex = val.name;
       // this.acitveStatus[val.name - 1] = true
     }
   }
-}
+};
 </script>
 <style lang="scss">
 </style>

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

@@ -119,7 +119,7 @@
               <router-link
                 style="color:#409EFF"
                 v-permission="'/studentDetail'"
-                :to="{path:`/business/studentDetail?userId=${scope.row.userId}`,query:{search:JSON.stringify(searchForm),rules:JSON.stringify(pageInfo)}}"
+                :to="{path:`/business/studentDetail?userId=${scope.row.userId}`,query:{search:JSON.stringify(searchForm),rules:JSON.stringify(pageInfo),studentName:scope.row.username}}"
               >查看</router-link>
               <el-button
                 type="text"

+ 142 - 0
src/views/teacherManager/teacherDetail/components/outCourseList.vue

@@ -0,0 +1,142 @@
+<template>
+  <div class="courseInfo">
+    <el-form :inline="true" :model="searchList">
+      <el-form-item>
+        <el-input placeholder="课程组名称" @keyup.enter.native="search" v-model.trim="searchList.search"></el-input>
+      </el-form-item>
+      <el-form-item label="课程状态">
+        <el-select v-model.trim="searchList.status" clearable>
+          <el-option
+            v-for="(item,index) in courseGroupStatus"
+            :key="index"
+            :value="item.value"
+            :label="item.label"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="danger" @click="search">搜索</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="tableWrap tableMargin">
+      <el-table :data="teamList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+        <el-table-column label="编号" prop="id" align="center"></el-table-column>
+        <el-table-column label="课程组名称" prop="name" align="center"></el-table-column>
+        <el-table-column label="课程组状态" align="center">
+          <template slot-scope="scope">{{ scope.row.status | courseGroup}}</template>
+        </el-table-column>
+        <el-table-column label="班级人数" prop="studentNum" align="center"></el-table-column>
+        <el-table-column label="课程组时间" prop="groupClassesTotalDuration" align="center"></el-table-column>
+        <el-table-column label="消耗时间" prop="groupClassesConsumeDuration" align="center"></el-table-column>
+        <el-table-column label="开课时间" align="center">
+          <template slot-scope="scope">{{scope.row.firstClassesStartTime | formatterTime}}</template>
+        </el-table-column>
+        <el-table-column label="截止时间" align="center">
+          <template slot-scope="scope">{{ scope.row.lastClassesEndTime | formatTimer }}</template>
+        </el-table-column>
+        <el-table-column label="申请时间" align="center">
+          <template slot-scope="scope">{{scope.row.createTime | formatterTime}}</template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        :total="pageInfo.total"
+        :page.sync="pageInfo.page"
+        :limit.sync="pageInfo.limit"
+        :page-sizes="pageInfo.page_size"
+        @pagination="getList"
+      />
+    </div>
+  </div>
+</template>
+<script>
+// import { getTeacherVipClass } from '@/api/teacherManager'
+import { findTeacherCourseGroupsWithWeb } from "@/api/teacherManager";
+import pagination from "@/components/Pagination/index";
+import { courseGroupStatus } from "@/utils/searchArray";
+import store from "@/store";
+export default {
+  name: "courseInfo1",
+  components: {
+    pagination
+  },
+  data() {
+    return {
+      searchList: {
+        status: "",
+        search: ""
+      },
+      teamList: [],
+      organId: null,
+      courseGroupStatus: courseGroupStatus,
+      teacherId: this.$route.query.teacherId,
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 1, // 总条数
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
+      }
+    };
+  },
+  activated() {
+    this.getList();
+  },
+  mounted() {
+    this.getList();
+  },
+  methods: {
+    getList() {
+      this.teacherId = this.$route.query.teacherId;
+      findTeacherCourseGroupsWithWeb({
+        rows: this.pageInfo.limit,
+        page: this.pageInfo.page,
+        teacherId: this.teacherId,
+        groupStatus: this.searchList.status || null,
+        search: this.searchList.search || null
+      }).then(res => {
+        if (res.code == 200) {
+          this.teamList = res.data.rows;
+          this.pageInfo.total = res.data.total;
+        }
+      });
+    },
+    search() {
+      this.pageInfo.page = 1;
+      this.getList();
+    }
+  },
+  filters: {
+    formatterTime(val) {
+      let result;
+      if (val) {
+        result = val.split(" ")[0];
+      } else {
+        result = "";
+      }
+      return result;
+    },
+    formatterStatus(val) {
+      let arr = [
+        "未开始",
+        "报名中",
+        "进行中",
+        "取消",
+        "已结束",
+        "报名结束",
+        "暂停"
+      ];
+      return arr[val];
+    }
+  }
+};
+</script>
+<style lang="scss" scope>
+.courseInfo {
+  h4 {
+    margin-bottom: 20px;
+  }
+  .tableMargin {
+    margin-top: 20px;
+  }
+}
+</style>

+ 8 - 5
src/views/teacherManager/teacherDetail/index.vue

@@ -24,10 +24,10 @@
                      name="2">
           <courseInfo1 v-if="activeName == 2" />
         </el-tab-pane>
-        <el-tab-pane label="试听课"
-                     v-if="permissionList.domeCourse"
+        <el-tab-pane label="对外课程"
+                     v-if="permissionList.outCourseList"
                      name="3">
-          <courseInfo2 v-if="activeName == 3" />
+          <outCourseList v-if="activeName == 3" />
         </el-tab-pane>
         <el-tab-pane label="课表详情"
                      v-if="permissionList.teacherRecord"
@@ -62,11 +62,12 @@ import courseInfo1 from '@/views/teacherManager/teacherDetail/components/courseI
 import courseInfo2 from '@/views/teacherManager/teacherDetail/components/courseInfo2'
 import settlement from '@/views/teacherManager/teacherDetail/components/settlement'
 import timerList from '@/views/teacherManager/teacherDetail/components/timerList'
+import outCourseList from '@/views/teacherManager/teacherDetail/components/outCourseList'
 import { permission } from '@/utils/directivePage'
 export default {
   components: {    teacherRecord,
     leaveRecord, teacherInfo,
-    courseInfo, courseInfo1, courseInfo2, settlement,timerList  },
+    courseInfo, courseInfo1, courseInfo2, settlement,timerList,outCourseList  },
   name: 'teacherDetail',
   data () {
     return {
@@ -81,7 +82,9 @@ export default {
         teacherRecord: permission('/teacherDetail/teacherRecord'),
         leaveRecord: permission('/teacherDetail/leaveRecord'),
         settlement: permission('/teacherDetail/settlement'),
-        timerList: permission('/teacherDetail/timerList')
+        timerList: permission('/teacherDetail/timerList'),
+        outCourseList: permission('/teacherDetail/outCourseList'),
+        
       },
       Fsearch: null,
       Frules: null