浏览代码

学员管理搜索修改

wolyshaw 4 年之前
父节点
当前提交
0d40332811

+ 2 - 2
src/components/Pagination/index.vue

@@ -78,7 +78,7 @@ export default {
   },
   mounted() {
     if (this.sync) {
-      const searchs = new Searchs(this.$route.fullPath)
+      const searchs = new Searchs(this.$route.path)
       const active = searchs.get()
       if (active && active.page) {
         for (const key in active.page) {
@@ -93,7 +93,7 @@ export default {
   methods: {
     syncStore() {
       if (this.sync) {
-        const searchs = new Searchs(this.$route.fullPath)
+        const searchs = new Searchs(this.$route.path)
         searchs.update(this._props, undefined, 'page')
       }
     },

+ 1 - 0
src/router/notKeepAliveList.js

@@ -20,5 +20,6 @@ export default [
   '/journal/payAppeal', // 考勤申诉
   '/business/teamDetail', // 乐团列表
   '/business/vipList', // vip列表
+  '/business/studentList', // 学员管理
   // '/operateManager/HumanResources'
 ]

+ 16 - 31
src/views/studentManager/studentList.vue

@@ -10,9 +10,11 @@
       <div class="newBand"
            @click="onCreateQRCode">学员激活列表</div>
       <!-- 搜索标题 -->
-      <el-form :inline="true"
+      <save-form :inline="true"
                class="searchForm"
-               v-model.trim="searchForm">
+               @submit="onSearch"
+               @reset="onReSet"
+               :model.sync="searchForm">
         <el-form-item>
           <el-input placeholder="学生姓名或电话"
                     @keyup.enter.native="onSearch"
@@ -24,7 +26,7 @@
                      v-model.trim="searchForm.organId"
                      clearable
                      placeholder="请选择分部">
-            <el-option v-for="(item,index) in organList"
+            <el-option v-for="(item,index) in selects.branchs"
                        :key="index"
                        :label="item.name"
                        :value="item.id"></el-option>
@@ -36,7 +38,7 @@
                      v-model="searchForm.teacherId"
                      clearable
                      filterable>
-            <el-option v-for="(item,index) in teacherList"
+            <el-option v-for="(item,index) in selects.teachers"
                        :label="item.realName"
                        :value="item.id"
                        :key="index"></el-option>
@@ -109,15 +111,15 @@
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-button @click="onSearch"
+          <el-button native-type="submit"
                      type="danger">搜索</el-button>
-          <el-button @click="onReSet"
+          <el-button native-type="reset"
                      type="primary">重置</el-button>
           <el-button type="primary"
                      v-permission="'export/studentHasCourse'"
                      @click="downLoadStudent">导出名单</el-button>
         </el-form-item>
-      </el-form>
+      </save-form>
       <!-- 列表 -->
       <div class="tableWrap">
         <el-table :data="tableList"
@@ -204,7 +206,7 @@
             <template slot-scope="scope">
               <router-link v-permission="'/studentDetail'"
                            class="el-button--text"
-                           :to="{path:`/business/studentDetail?userId=${scope.row.userId}`,query:{search:JSON.stringify(searchForm),rules:JSON.stringify(pageInfo),studentName:scope.row.username}}">查看</router-link>
+                           :to="{path:`/business/studentDetail?userId=${scope.row.userId}`,query:{studentName:scope.row.username}}">查看</router-link>
               <el-button type="text"
                          v-permission="'studentManage/studentUpdate'"
                          @click="resetStudent(scope.row)">修改</el-button>
@@ -218,7 +220,8 @@
             </template>
           </el-table-column>
         </el-table>
-        <pagination :total="pageInfo.total"
+        <pagination sync
+                    :total.sync="pageInfo.total"
                     :page.sync="pageInfo.page"
                     :limit.sync="pageInfo.limit"
                     :page-sizes="pageInfo.page_size"
@@ -253,7 +256,7 @@
                      clearable
                      placeholder="请选择分部"
                      @change="changeStudentOrgan">
-            <el-option v-for="(item,index) in organList"
+            <el-option v-for="(item,index) in selects.branchs"
                        :key="index"
                        :label="item.name"
                        :value="item.id"></el-option>
@@ -518,26 +521,8 @@ export default {
     };
   },
   mounted () {
-    if (this.$route.query.search) {
-      this.$route.query.search instanceof Object
-        ? (this.searchForm = this.$route.query.search)
-        : (this.searchForm = JSON.parse(this.$route.query.search));
-    }
-    if (this.$route.query.rules) {
-      this.$route.query.rules instanceof Object
-        ? (this.pageInfo = this.$route.query.rules)
-        : (this.pageInfo = JSON.parse(this.$route.query.rules));
-    }
-    getEmployeeOrgan().then(res => {
-      if (res.code == 200) {
-        this.organList = res.data;
-      }
-    });
-    getTeacher().then(res => {
-      if (res.code == 200) {
-        this.teacherList = res.data;
-      }
-    });
+    this.$store.dispatch('setBranchs')
+    this.$store.dispatch('setTeachers')
     this.getList();
   },
   methods: {
@@ -666,7 +651,7 @@ export default {
         .catch(() => { });
     },
     checkPhone (val) {
-      var regu = /^1[3456789]\d{9}$/;
+      var regu = /^1\d{10}$/;
       var re = new RegExp(regu);
       if (re.test(val)) {
         getStudentInfoByPhone({ mobile: this.studentForm.phone }).then(res => {

+ 37 - 9
src/views/teamDetail/teamCourseList.vue

@@ -7,6 +7,8 @@
       <!-- 搜索类型 -->
       <save-form :inline="true"
                class="searchForm"
+               @submit="search"
+               @reset="reset"
                ref="searchForm"
                :model.sync="searchForm">
         <el-form-item>
@@ -60,6 +62,17 @@
           </el-select>
         </el-form-item>
         <el-form-item>
+          <el-select v-model.trim="searchForm.mergeType"
+                     clearable
+                     filterable
+                     placeholder="合并类型">
+            <el-option v-for="(item, index) in mergeTypeOpions"
+                       :key="index"
+                       :value="item.value"
+                       :label="item.label"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
           <el-select v-model.trim="searchForm.courseType"
                      clearable
                      filterable
@@ -138,11 +151,11 @@
         <el-row type="flex" justify="space-around">
           <el-col>
             <el-button
-              @click="search"
+              native-type="submit"
               type="primary"
             >搜索</el-button>
             <el-button
-              @click="reset"
+              native-type="reset"
               type="danger"
             >重置</el-button>
             <el-button
@@ -164,10 +177,19 @@
           <el-table-column align="center"
                            width="130px"
                            prop="musicGroupId"
-                           label="乐团/课程组编号"></el-table-column>
+                           label="乐团/课程组编号">
+                              <template slot-scope="scope">
+                                <copy-text>{{scope.row.musicGroupId}}</copy-text>
+                              </template>
+                           </el-table-column>
           <el-table-column align="center"
                            prop="id"
-                           label="课程编号"></el-table-column>
+                           width="100px"
+                           label="课程编号">
+                              <template slot-scope="scope">
+                                <copy-text>{{scope.row.id}}</copy-text>
+                              </template>
+                            </el-table-column>
           <el-table-column align="center"
                            width="200px"
                            label="上课时间">
@@ -176,9 +198,13 @@
           <el-table-column align="center"
                            prop="subjectName"
                            label="声部"></el-table-column>
-          <el-table-column align="center"
-                           prop="name"
-                           label="课程名称"></el-table-column>
+          <el-table-column prop="name"
+                           width="150px"
+                           label="课程名称">
+                            <template slot-scope="scope">
+                              <copy-text>{{scope.row.name}}</copy-text>
+                            </template>
+                           </el-table-column>
           <el-table-column align="center"
                            width="150px"
                            label="课程类型">
@@ -212,7 +238,7 @@
               <div>{{ scope.row.isComplaints==1?'是':'否'}}</div>
             </template>
           </el-table-column>
-         
+
           <el-table-column align="center"
                            prop="isLock"
                            label="是否冻结">
@@ -409,7 +435,7 @@ import {
   getEmployeeOrgan,
   cleanAttendance
 } from "@/api/buildTeam";
-import { workType } from '@/constant'
+import { workType, mergeType } from '@/constant'
 import { objectToOptions, getTimes } from '@/utils'
 import { getTeacherPersonalAttendanceDetail } from "@/api/teacherManager";
 import { getSchool } from "@/api/systemManage";
@@ -455,6 +481,8 @@ export default {
       timerVisible: false,
       courseVisible: false,
       courseType: courseType,
+      mergeType,
+      mergeTypeOpions: objectToOptions(mergeType),
       courseListType: courseListType,
       searchForm: {...initSearch},
       tableList: [],