Browse Source

12/30 16:58 学生管理开始

1
mo 4 years ago
parent
commit
f8dec950ae

+ 4 - 4
src/views/studentManager/index.vue

@@ -5,7 +5,7 @@
     </h2>
     <div class="m-core">
       <!-- navMenu -->
-      <el-tabs v-model.trim="activeIndex" type="card" @tab-click="handleClick">
+      <tab-router 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>
@@ -33,7 +33,7 @@
         <el-tab-pane label="学员提现" v-if="permissionList.studentCashout" name="8">
           <studentCashout v-if="activeIndex == 8" />
         </el-tab-pane>
-      </el-tabs>
+      </tab-router>
     </div>
   </div>
 </template>
@@ -73,7 +73,7 @@ export default {
         studentPayList: permission("/studentDetail/studentPayList"),
         studentOrder: permission("/studentDetail/studentOrder"),
         studentCashout: permission("/studentDetail/studentCashout"),
-        studentOutList: permission("/studentDetail/studentOutList"), // 
+        studentOutList: permission("/studentDetail/studentOutList"), //
         studentNetwork: permission("/studentDetail/studentNetwork")
       },
       studentName: ""
@@ -112,4 +112,4 @@ export default {
 };
 </script>
 <style lang="scss">
-</style>
+</style>

+ 94 - 72
src/views/teacherManager/teacherDetail/components/courseInfo1.vue

@@ -1,57 +1,68 @@
 <template>
-  <div class='courseInfo'>
-    <save-form :inline="true"
-    @submit='search'
-             :model="searchList">
+  <div class="courseInfo">
+    <save-form :inline="true" @submit="search" :model="searchList" save-key='teacherDetail-courseInfo1'>
       <el-form-item>
-        <el-input placeholder="vip编号、名称"
-        clearable
-                  @keyup.enter.native='search'
-                  v-model.trim="searchList.search"></el-input>
+        <el-input
+          placeholder="vip编号、名称"
+          clearable
+          @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 vipGroupStatus"
-                     :key="index"
-                     :value='item.value'
-                     :label='item.text'></el-option>
+        <el-select v-model.trim="searchList.status" clearable>
+          <el-option
+            v-for="(item, index) in vipGroupStatus"
+            :key="index"
+            :value="item.value"
+            :label="item.text"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="danger"
-                   native-type="search">搜索</el-button>
+        <el-button type="danger" native-type="search">搜索</el-button>
       </el-form-item>
     </save-form>
     <div class="tableWrap tableMargin">
-      <el-table :data='teamList'
-                :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-        <el-table-column label="VIP编号"
-                         prop="id">
+      <el-table
+        :data="teamList"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      >
+        <el-table-column label="VIP编号" prop="id">
+          <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.id }}
+            </copy-text>
+          </template>
         </el-table-column>
-        <el-table-column label="VIP课名称"
-                         prop="name">
+        <el-table-column label="VIP课名称" prop="name">
+              <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.name }}
+            </copy-text>
+          </template>
         </el-table-column>
         <el-table-column label="VIP课状态">
           <template slot-scope="scope">
-            {{ scope.row.status | formatterStatus}}
+            {{ scope.row.status | formatterStatus }}
           </template>
         </el-table-column>
-        <el-table-column label="班级人数"
-                         prop="studentNum">
-        </el-table-column>
+        <el-table-column label="班级人数" prop="studentNum"> </el-table-column>
         <el-table-column label="课程单价">
           <template slot-scope="scope">
             线上:{{ scope.row.onlineClassesUnitPrice }} <br />
             线下:{{ scope.row.offlineClassesUnitPrice }}
           </template>
         </el-table-column>
-        <el-table-column label="活动方案"
-                         prop="vipGroupActivityName">
+        <el-table-column label="活动方案" prop="vipGroupActivityName">
         </el-table-column>
         <el-table-column label="当前课次">
           <template slot-scope="scope">
-            <p>{{scope.row.currentClassTimes + '/' + scope.row.totalClassTimes}}</p>
+            <p>
+              {{
+                scope.row.currentClassTimes + "/" + scope.row.totalClassTimes
+              }}
+            </p>
           </template>
         </el-table-column>
         <el-table-column label="月均消耗">
@@ -61,7 +72,7 @@
         </el-table-column>
         <el-table-column label="开课时间">
           <template slot-scope="scope">
-            {{scope.row.courseStartDate | formatterTime}}
+            {{ scope.row.courseStartDate | formatterTime }}
           </template>
         </el-table-column>
         <el-table-column label="截止时间">
@@ -71,34 +82,37 @@
         </el-table-column>
         <el-table-column label="申请时间">
           <template slot-scope="scope">
-            {{scope.row.createTime | formatterTime}}
+            {{ 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" />
+      <pagination
+      sync
+        :total.sync="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 { getVipList } from '@/api/vipSeting'
-import pagination from '@/components/Pagination/index'
-import { vipGroupStatus } from '@/utils/searchArray'
-import store from '@/store'
+import { getVipList } from "@/api/vipSeting";
+import pagination from "@/components/Pagination/index";
+import { vipGroupStatus } from "@/utils/searchArray";
+import store from "@/store";
 export default {
-  name: 'courseInfo1',
+  name: "courseInfo1",
   components: {
-    pagination
+    pagination,
   },
-  data () {
+  data() {
     return {
       searchList: {
-        status: '',
-        search: ''
+        status: "",
+        search: "",
       },
       teamList: [],
       organId: null,
@@ -109,56 +123,64 @@ export default {
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 1, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
-      }
-    }
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
   },
-  activated () {
-    this.teacherId = this.$route.query.teacherId
+  activated() {
+    this.teacherId = this.$route.query.teacherId;
     this.vipGroupStatus = vipGroupStatus;
-    this.getList()
+    this.getList();
   },
-  mounted () {
-    this.teacherId = this.$route.query.teacherId
+  mounted() {
+    this.teacherId = this.$route.query.teacherId;
     this.vipGroupStatus = vipGroupStatus;
-    this.getList()
+    this.getList();
   },
   methods: {
-    getList () {
+    getList() {
       getVipList({
         rows: this.pageInfo.limit,
         page: this.pageInfo.page,
         teacherId: this.teacherId,
         status: this.searchList.status || null,
-        search: this.searchList.search || null
-      }).then(res => {
+        search: this.searchList.search || null,
+      }).then((res) => {
         if (res.code == 200) {
-          this.teamList = res.data.rows
-          this.pageInfo.total = res.data.total
+          this.teamList = res.data.rows;
+          this.pageInfo.total = res.data.total;
         }
-      })
+      });
     },
-    search () {
+    search() {
       this.pageInfo.page = 1;
       this.getList();
-    }
+    },
   },
   filters: {
-    formatterTime (val) {
-      let result
+    formatterTime(val) {
+      let result;
       if (val) {
-        result = val.split(' ')[0];
+        result = val.split(" ")[0];
       } else {
-        result = ''
+        result = "";
       }
-      return result
+      return result;
     },
-    formatterStatus (val) {
-      let arr = ["未开始", "报名中", "进行中", '取消', '已结束', '报名结束', '暂停']
+    formatterStatus(val) {
+      let arr = [
+        "未开始",
+        "报名中",
+        "进行中",
+        "取消",
+        "已结束",
+        "报名结束",
+        "暂停",
+      ];
       return arr[val];
-    }
-  }
-}
+    },
+  },
+};
 </script>
 <style lang="scss" scope>
 .courseInfo {

+ 92 - 78
src/views/teacherManager/teacherDetail/components/leaveRecord.vue

@@ -11,80 +11,87 @@
       </div>
     </div> -->
     <!-- 搜索标题 -->
-    <el-form :inline="true"
-             class="searchForm"
-             v-model.trim="searchForm">
+    <save-form
+      :inline="true"
+      @submit="search"
+      @reset="onReSet"
+      class="searchForm"
+      :model="searchForm"
+      save-key="teacherDetail-leaveRecord"
+    >
       <el-form-item>
-        <el-date-picker style="width: 400px;"
-                        v-model.trim="courseDate"
-                        type="daterange"
-                        value-format="yyyy-MM-dd"
-                        @change="searchCourseDate"
-                        :picker-options="{
-        firstDayOfWeek: 1
-    }"
-                        range-separator="至"
-                        start-placeholder="请假开始日期"
-                        end-placeholder="请假结束日期">
+        <el-date-picker
+          style="width: 400px"
+          v-model.trim="searchForm.courseDate"
+          type="daterange"
+          value-format="yyyy-MM-dd"
+          @change="searchCourseDate"
+          :picker-options="{
+            firstDayOfWeek: 1,
+          }"
+          range-separator="至"
+          start-placeholder="请假开始日期"
+          end-placeholder="请假结束日期"
+        >
         </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-button native-type="submit" type="danger">搜索</el-button>
+        <el-button native-type="reset" type="primary">重置</el-button>
       </el-form-item>
-    </el-form>
+    </save-form>
     <!-- 列表 -->
     <div class="tableWrap">
-      <el-table :data='tableList'
-                :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-        <el-table-column align='center'
-                         prop="createTime"
-                         label="请假发起时间">
+      <el-table
+        :data="tableList"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      >
+        <el-table-column align="center" prop="createTime" label="请假发起时间">
           <template slot-scope="scope">
             <div>
-              {{ scope.row.createTime |dateForMinFormat}}
+              {{ scope.row.createTime | dateForMinFormat }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column align='center'
-                         label="请假时间">
+        <el-table-column align="center" label="请假时间">
           <template slot-scope="scope">
-            {{ scope.row.startTime |dateForMinFormat}} - {{ scope.row.endTime |dateForMinFormat}}
+            {{ scope.row.startTime | dateForMinFormat }} -
+            {{ scope.row.endTime | dateForMinFormat }}
           </template>
         </el-table-column>
-        <el-table-column align='center'
-                         prop="remark"
-                         label="请假说明">
+        <el-table-column align="center" prop="remark" label="请假说明">
         </el-table-column>
       </el-table>
-      <pagination :total="pageInfo.total"
-                  :page.sync="pageInfo.page"
-                  :limit.sync="pageInfo.limit"
-                  :page-sizes="pageInfo.page_size"
-                  @pagination="getList" />
+      <pagination
+        sync
+        :total.sync="pageInfo.total"
+        :page.sync="pageInfo.page"
+        :limit.sync="pageInfo.limit"
+        :page-sizes="pageInfo.page_size"
+        @pagination="getList"
+      />
     </div>
   </div>
 </template>
 <script>
-import { teacherLeaveRecordQuery } from '@/api/teacherManager'
-import pagination from '@/components/Pagination/index'
-import store from '@/store'
-import { attendance } from '@/utils/searchArray'
+import { teacherLeaveRecordQuery } from "@/api/teacherManager";
+import pagination from "@/components/Pagination/index";
+import store from "@/store";
+import { attendance } from "@/utils/searchArray";
+import { getTimes } from "@/utils";
 export default {
-  name: 'leaveRecord',
+  name: "leaveRecord",
   components: {
-    pagination
+    pagination,
   },
-  data () {
+  data() {
     return {
       attendance: attendance,
-      courseDate: null,
       searchForm: {
         startTime: null,
         endTime: null,
-        status: 'PASS'
+        status: "PASS",
+        courseDate: [],
       },
       tableList: [],
       tableList: [],
@@ -95,53 +102,60 @@ export default {
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 1, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
-      }
-    }
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
   },
-  mounted () {
-    this.teacherId = this.$route.query.teacherId
-    this.getList()
+  mounted() {
+    this.teacherId = this.$route.query.teacherId;
+    this.getList();
   },
-  activated () {
-    this.teacherId = this.$route.query.teacherId
-    this.getList()
+  activated() {
+    this.teacherId = this.$route.query.teacherId;
+    this.getList();
   },
   methods: {
-    search () {
-      this.pageInfo.page = 1
-      this.getList()
+    search() {
+      this.pageInfo.page = 1;
+      this.getList();
     },
-    getList () {
-      let params = this.searchForm
-      params.rows = this.pageInfo.limit
-      params.page = this.pageInfo.page,
-        params.teacherId = this.teacherId
-      teacherLeaveRecordQuery(params).then(res => {
+    getList() {
+      // let params = this.searchForm;
+      // params.rows = this.pageInfo.limit;
+      // (params.page = this.pageInfo.page), (params.teacherId = this.teacherId);
+      const { courseDate, ...rest } = this.searchForm;
+      let params = {
+        ...rest,
+        ...getTimes(courseDate, ["startTime", "endTime"]),
+        page: this.pageInfo.page,
+        rows: this.pageInfo.limit,
+        teacherId: this.teacherId,
+      };
+      teacherLeaveRecordQuery(params).then((res) => {
         if (res.code == 200) {
-          this.tableList = res.data.rows
-          this.pageInfo.total = res.data.total
+          this.tableList = res.data.rows;
+          this.pageInfo.total = res.data.total;
         }
-      })
+      });
     },
-    searchCourseDate (value) {
+    searchCourseDate(value) {
       if (value) {
-        this.searchForm.startTime = value[0]
-        this.searchForm.endTime = value[1]
+        this.searchForm.startTime = value[0];
+        this.searchForm.endTime = value[1];
       } else {
-        this.searchForm.startTime = null
-        this.searchForm.endTime = null
+        this.searchForm.startTime = null;
+        this.searchForm.endTime = null;
       }
     },
-    onReSet () {
-      this.courseDate = null
+    onReSet() {
+      this.courseDate = null;
       this.searchForm = {
         startTime: null,
         endTime: null,
-      }
-    }
-  }
-}
+      };
+    },
+  },
+};
 </script>
 <style lang="scss">
-</style>
+</style>

+ 97 - 70
src/views/teacherManager/teacherDetail/components/outCourseList.vue

@@ -1,73 +1,100 @@
 <template>
   <div class="courseInfo">
-    <el-form :inline="true"
-             :model="searchList">
+    <save-form :inline="true" :model="searchList" @submit="search" save-key='teacherDetail-outCourseList'>
       <el-form-item>
-        <el-input placeholder="课程组名称"
-                  @keyup.enter.native="search"
-                  v-model.trim="searchList.search"></el-input>
+        <el-input
+          placeholder="课程组名称"
+          clearable
+          @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 commGroupStatus"
-                     :key="index"
-                     :value="item.value"
-                     :label="item.label"></el-option>
+        <el-select v-model.trim="searchList.status" clearable>
+          <el-option
+            v-for="(item, index) in commGroupStatus"
+            :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-button type="danger" native-type="submit">搜索</el-button>
       </el-form-item>
-    </el-form>
+    </save-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
+        :data="teamList"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      >
+        <el-table-column label="编号" prop="id" align="center">
+          <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.id }}
+            </copy-text>
+          </template>
+        </el-table-column>
+        <el-table-column label="课程组名称" prop="name" align="center">
+          <template slot-scope="scope">
+            <copy-text>
+              {{ scope.row.name }}
+            </copy-text>
+          </template>
+        </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'
-                         prop="currentClassTimes">
+        <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"
+          prop="currentClassTimes"
+        >
           <template slot-scope="scope">
             {{ scope.row.currentClassTimes }}/{{ scope.row.totalClassTimes }}
           </template>
         </el-table-column>
-        <el-table-column label="开课时间"
-                         align="center">
-          <template slot-scope="scope">{{scope.row.firstClassesStartTime | formatterTime}}</template>
+        <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 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 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" />
+      <pagination
+        sync
+        :total.sync="pageInfo.total"
+        :page.sync="pageInfo.page"
+        :limit.sync="pageInfo.limit"
+        :page-sizes="pageInfo.page_size"
+        @pagination="getList"
+      />
     </div>
   </div>
 </template>
@@ -80,13 +107,13 @@ import store from "@/store";
 export default {
   name: "courseInfo1",
   components: {
-    pagination
+    pagination,
   },
-  data () {
+  data() {
     return {
       searchList: {
         status: "",
-        search: ""
+        search: "",
       },
       teamList: [],
       organId: null,
@@ -97,39 +124,39 @@ export default {
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 1, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
-      }
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
     };
   },
-  activated () {
+  activated() {
     this.getList();
   },
-  mounted () {
+  mounted() {
     this.getList();
   },
   methods: {
-    getList () {
+    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 => {
+        search: this.searchList.search || null,
+      }).then((res) => {
         if (res.code == 200) {
           this.teamList = res.data.rows;
           this.pageInfo.total = res.data.total;
         }
       });
     },
-    search () {
+    search() {
       this.pageInfo.page = 1;
       this.getList();
-    }
+    },
   },
   filters: {
-    formatterTime (val) {
+    formatterTime(val) {
       let result;
       if (val) {
         result = val.split(" ")[0];
@@ -138,7 +165,7 @@ export default {
       }
       return result;
     },
-    formatterStatus (val) {
+    formatterStatus(val) {
       let arr = [
         "未开始",
         "报名中",
@@ -146,14 +173,14 @@ export default {
         "取消",
         "已结束",
         "报名结束",
-        "暂停"
+        "暂停",
       ];
       return arr[val];
-    }
-  }
+    },
+  },
 };
 </script>
-<style lang="scss" scope>
+<style lang="scss" scoped>
 .courseInfo {
   h4 {
     margin-bottom: 20px;
@@ -162,4 +189,4 @@ export default {
     margin-top: 20px;
   }
 }
-</style>
+</style>

+ 25 - 14
src/views/teacherManager/teacherDetail/components/settlement.vue

@@ -7,14 +7,14 @@
         </div>
       </div>
     </div>
-    <el-form :inline="true"
-             :model="searchForm">
+    <save-form :inline="true"
+             :model="searchForm" @submit="search" @reset="onReSet" save-key='teacherDetail-settlement'>
       <el-form-item>
-        <el-date-picker v-model.trim="courseDate"
+        <el-date-picker v-model.trim="searchForm.courseDate"
                         style="width: 400px;"
                         type="daterange"
                         value-format="yyyy-MM-dd"
-                        @change="searchCourseDate"
+
                         range-separator="至"
                         start-placeholder="课程开始日期"
                         end-placeholder="课程结束日期"
@@ -46,12 +46,12 @@
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button @click="search"
+        <el-button native-type="submit"
                    type="danger">搜索</el-button>
-        <el-button @click="onReSet"
+        <el-button native-type="reset"
                    type="primary">重置</el-button>
       </el-form-item>
-    </el-form>
+    </save-form>
     <div class="tableWrap">
       <el-table :data="tableList"
                 :header-cell-style="{background:'#EDEEF0',color:'#444'}">
@@ -132,7 +132,9 @@
           </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"
@@ -198,6 +200,7 @@ import { teacherQueryCloses, sumTeacherNoPay, updateTeacherCoursesSalary } from
 import pagination from '@/components/Pagination/index'
 import store from '@/store'
 import { courseType, attendance } from '@/utils/searchArray'
+import { getTimes } from "@/utils";
 export default {
   name: 'settlement',
   components: {
@@ -206,12 +209,12 @@ export default {
   data () {
     return {
       teacherNoPay: 0,
-      courseDate: null,
       searchForm: {
         courseStartDate: null,
         courseEndDate: null,
         courseScheduleType: null,
         signInStatus: null,
+        courseDate:[]
       },
       courseType: courseType,
       attendance: attendance,
@@ -284,10 +287,18 @@ export default {
       }
     },
     getList () {
-      let params = this.searchForm
-      params.rows = this.pageInfo.limit
-      params.page = this.pageInfo.page
-      params.teacherId = this.teacherId
+      // let params = this.searchForm
+      // params.rows = this.pageInfo.limit
+      // params.page = this.pageInfo.page
+      // params.teacherId = this.teacherId
+            const { courseDate, ...rest } = this.searchForm;
+      let params = {
+        ...rest,
+        ...getTimes(courseDate, ["courseStartDate", "courseEndDate"]),
+        page: this.pageInfo.page,
+        rows: this.pageInfo.limit,
+        teacherId: this.teacherId,
+      };
       teacherQueryCloses(params).then(res => {
         if (res.code == 200) {
           this.tableList = res.data.rows
@@ -327,4 +338,4 @@ export default {
 }
 </script>
 <style lang="scss" scope>
-</style>
+</style>

+ 4 - 2
src/views/teacherManager/teacherDetail/components/teacherNetwork.vue

@@ -75,7 +75,9 @@
             </template>
           </el-table-column>
         </el-table>
-        <pagination :total="rules.total"
+        <pagination
+        sync
+        :total.sync="rules.total"
                     :page.sync="rules.page"
                     :limit.sync="rules.limit"
                     :page-sizes="rules.page_size"
@@ -236,4 +238,4 @@ export default {
 };
 </script>
 <style lang='scss' scoped>
-</style>
+</style>

+ 142 - 91
src/views/teacherManager/teacherDetail/components/teacherRecord.vue

@@ -1,98 +1,139 @@
 <template>
   <div class="tr-cotainer">
     <!-- 搜索标题 -->
-    <el-form :inline="true"
-             class="searchForm"
-             v-model.trim="searchForm">
+    <save-form
+      :inline="true"
+      save-key="teacherDetail-record"
+      class="searchForm"
+      :model="searchForm"
+      @submit="search"
+      @reset="onReSet"
+    >
       <el-form-item>
-        <el-date-picker style="width: 400px;"
-                        v-model.trim="courseDate"
-                        type="daterange"
-                        value-format="yyyy-MM-dd"
-                        @change="searchCourseDate"
-                        range-separator="至"
-                        start-placeholder="课程开始日期"
-                        end-placeholder="课程结束日期"
-                        :picker-options="{
-        firstDayOfWeek: 1
-    }"></el-date-picker>
+        <el-date-picker
+          style="width: 400px"
+          v-model.trim="searchForm.courseDate"
+          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-select v-model.trim="searchForm.courseScheduleType"
-                   clearable
-                   filterable
-                   placeholder="课程类型">
-          <el-option v-for="(item, index) in courseType"
-                     :key="index"
-                     :label="item.label"
-                     :value="item.value"></el-option>
+        <el-select
+          v-model.trim="searchForm.courseScheduleType"
+          clearable
+          filterable
+          placeholder="课程类型"
+        >
+          <el-option
+            v-for="(item, index) in courseType"
+            :key="index"
+            :label="item.label"
+            :value="item.value"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-input placeholder="课程名称"
-                  @keyup.enter.native="search"
-                  v-model.trim="searchForm.classGroupName"></el-input>
+        <el-input
+          placeholder="课程名称"
+          @keyup.enter.native="search"
+          v-model.trim="searchForm.classGroupName"
+          clearable
+        ></el-input>
       </el-form-item>
       <el-form-item>
-        <el-select v-model.trim="searchForm.signInStatus"
-                   filterable
-                   clearable
-                   placeholder="考勤状态">
-          <el-option v-for="(item, index) in attendance"
-                     :key="index"
-                     :label="item.label"
-                     :value="item.value"></el-option>
+        <el-select
+          v-model.trim="searchForm.signInStatus"
+          filterable
+          clearable
+          placeholder="考勤状态"
+        >
+          <el-option
+            v-for="(item, index) in attendance"
+            :key="index"
+            :label="item.label"
+            :value="item.value"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button @click="search"
-                   type="danger">搜索</el-button>
-        <el-button @click="onReSet"
-                   type="primary">重置</el-button>
+        <el-button native-type="search" type="danger">搜索</el-button>
+        <el-button native-type="reset" type="primary">重置</el-button>
       </el-form-item>
-    </el-form>
+    </save-form>
     <!-- 列表 -->
     <div class="tableWrap">
       <div class="tableWrap">
-        <el-table :data="tableList"
-                  :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-          <el-table-column align="center"
-                           prop="courseScheduleId"
-                           label="课程编号"></el-table-column>
-          <el-table-column align="center"
-                           label="上课时间"
-                           width="150">
-            <template slot-scope="scope">{{ scope.row.classDate }} {{ scope.row.startClassTime.substring(0,5) }}</template>
+        <el-table
+          :data="tableList"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        >
+          <el-table-column
+            align="center"
+            prop="courseScheduleId"
+            label="课程编号"
+          >
+            <template slot-scope="scope">
+              <copy-text>
+                {{ scope.row.courseScheduleId }}
+              </copy-text>
+            </template>
           </el-table-column>
-          <el-table-column align="center"
-                           label="下课时间"
-                           width="150">
-            <template slot-scope="scope">{{ scope.row.classDate }} {{ scope.row.endClassTime.substring(0,5) }}</template>
+               <el-table-column align="center" prop="name" label="课程名称">
+            <template slot-scope="scope">
+              <copy-text>
+                {{ scope.row.name }}
+              </copy-text>
+            </template>
           </el-table-column>
-          <el-table-column align="center"
-                           label="课程类型">
-            <template slot-scope="scope">{{ scope.row.type | coursesType }}</template>
+          <el-table-column align="center" label="上课时间" width="150">
+            <template slot-scope="scope"
+              >{{ scope.row.classDate }}
+              {{ scope.row.startClassTime.substring(0, 5) }}</template
+            >
           </el-table-column>
-          <el-table-column align="center"
-                           prop="name"
-                           label="课程名称"></el-table-column>
-          <el-table-column align="center"
-                           label="签到">
-            <template slot-scope="scope">{{ scope.row.signInStatus | attendanceType }}</template>
+          <el-table-column align="center" label="下课时间" width="150">
+            <template slot-scope="scope"
+              >{{ scope.row.classDate }}
+              {{ scope.row.endClassTime.substring(0, 5) }}</template
+            >
           </el-table-column>
-          <el-table-column align="center"
-                           label="签退">
-            <template slot-scope="scope">{{ scope.row.signOutStatus | attendanceOutType }}</template>
+          <el-table-column align="center" label="课程类型">
+            <template slot-scope="scope">{{
+              scope.row.type | coursesType
+            }}</template>
           </el-table-column>
-          <el-table-column align="center"
-                           prop="remark"
-                           label="备注"></el-table-column>
+
+          <el-table-column align="center" label="签到">
+            <template slot-scope="scope">{{
+              scope.row.signInStatus | attendanceType
+            }}</template>
+          </el-table-column>
+          <el-table-column align="center" label="签退">
+            <template slot-scope="scope">{{
+              scope.row.signOutStatus | attendanceOutType
+            }}</template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="remark"
+            label="备注"
+          ></el-table-column>
         </el-table>
-        <pagination :total="pageInfo.total"
-                    :page.sync="pageInfo.page"
-                    :limit.sync="pageInfo.limit"
-                    :page-sizes="pageInfo.page_size"
-                    @pagination="getList" />
+        <pagination
+          sync
+          :total.sync="pageInfo.total"
+          :page.sync="pageInfo.page"
+          :limit.sync="pageInfo.limit"
+          :page-sizes="pageInfo.page_size"
+          @pagination="getList"
+        />
       </div>
     </div>
   </div>
@@ -102,22 +143,24 @@ import { getTeacherPersonalAttendances } from "@/api/teacherManager";
 import pagination from "@/components/Pagination/index";
 import store from "@/store";
 import { courseType, attendance } from "@/utils/searchArray";
+import { getTimes } from "@/utils";
 export default {
   name: "teacherRecord",
   components: {
-    pagination
+    pagination,
   },
-  data () {
+  data() {
     return {
       courseType: courseType, // 课程类型
       attendance: attendance, // 考勤状态
-      courseDate: null, // 上课时间
+
       searchForm: {
         courseStartDate: null,
         courseEndDate: null,
         classGroupName: null,
         courseScheduleType: null,
-        signInStatus: null
+        signInStatus: null,
+        courseDate:[]
       },
       tableList: [],
       organId: null,
@@ -127,33 +170,41 @@ export default {
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 1, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
-      }
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
     };
   },
-  mounted () {
+  mounted() {
     this.getList();
   },
-  activated () {
+  activated() {
     this.getList();
   },
   methods: {
-    search () {
+    search() {
       this.pageInfo.page = 1;
       this.getList();
     },
-    getList () {
-      let params = this.searchForm;
-      params.rows = this.pageInfo.limit;
-      (params.page = this.pageInfo.page), (params.teacherId = this.teacherId);
-      getTeacherPersonalAttendances(params).then(res => {
+    getList() {
+        const { courseDate, ...rest } = this.searchForm;
+      let params = {
+        ...rest,
+        ...getTimes(courseDate, ["courseStartDate", "courseEndDate"]),
+        page: this.pageInfo.page,
+        rows: this.pageInfo.limit,
+        teacherId: this.teacherId
+      };
+      // let params = this.searchForm;
+      // params.rows = this.pageInfo.limit;
+      // (params.page = this.pageInfo.page), (params.teacherId = this.teacherId);
+      getTeacherPersonalAttendances(params).then((res) => {
         if (res.code == 200) {
           this.tableList = res.data.rows;
           this.pageInfo.total = res.data.total;
         }
       });
     },
-    searchCourseDate (value) {
+    searchCourseDate(value) {
       if (value) {
         this.searchForm.courseStartDate = value[0];
         this.searchForm.courseEndDate = value[1];
@@ -162,21 +213,21 @@ export default {
         this.searchForm.courseEndDate = null;
       }
     },
-    onReSet () {
+    onReSet() {
       this.courseDate = null;
       this.searchForm = {
         courseStartDate: null,
         courseEndDate: null,
         classGroupName: null,
         courseScheduleType: null,
-        signInStatus: null
+        signInStatus: null,
       };
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss" scope>
 .tr-cotainer {
   margin-top: 20px;
 }
-</style>
+</style>

+ 10 - 7
src/views/teacherManager/teacherDetail/components/timerList.vue

@@ -10,9 +10,10 @@
            v-permission="'sysTenantAccount/subtractMinutes'"
            @click="subTimer">系统扣除</div>
     </div>
-    <el-form :inline="true"
+    <save-form :inline="true"
              class="searchForm"
-             v-model.trim="searchForm">
+             save-key='teacherDetail-timerList'
+             :model="searchForm" @submit='search' @reset="onReSet">
       <el-form-item>
         <el-select clearable
                    placeholder="操作类型"
@@ -36,12 +37,12 @@
     }"></el-date-picker>
       </el-form-item>
       <el-form-item>
-        <el-button @click="search"
+        <el-button native-type="submit"
                    type="danger">搜索</el-button>
-        <el-button @click="onReSet"
+        <el-button native-type="reset"
                    type="primary">重置</el-button>
       </el-form-item>
-    </el-form>
+    </save-form>
     <div style="font-size: 14px; color: #F85043; padding-bottom: 10px;">可用时间:{{ totalTransMinutes }}分钟 &nbsp;&nbsp;&nbsp;&nbsp;</div>
     <div class="tableWrap">
       <el-table :data="tableList"
@@ -84,7 +85,9 @@
                          prop="memo"
                          label="备注"></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"
@@ -289,4 +292,4 @@ export default {
 /deep/.el-textarea__inner {
   width: 254px;
 }
-</style>
+</style>