Pārlūkot izejas kodu

11/17 17:03

111
mo 4 gadi atpakaļ
vecāks
revīzija
7e0248f872
1 mainītis faili ar 22 papildinājumiem un 7 dzēšanām
  1. 22 7
      src/views/reportForm/index.vue

+ 22 - 7
src/views/reportForm/index.vue

@@ -178,20 +178,17 @@
                      style="width:100%"
                      style="width:100%"
                      filterable
                      filterable
                      placeholder="请选择分部"
                      placeholder="请选择分部"
-                     multiple
                      clearable>
                      clearable>
             <el-option v-for="(item,index) in organList"
             <el-option v-for="(item,index) in organList"
                        :key="index"
                        :key="index"
                        :label="item.name"
                        :label="item.name"
                        :value="item.id"></el-option>
                        :value="item.id"></el-option>
           </el-select>
           </el-select>
-          <el-select v-model.trim="attendanceOrganId"
+          <el-select v-model.trim="attendanceCourseType"
                      class="organSelect"
                      class="organSelect"
                      style=" margin-left: 15px; width:100%"
                      style=" margin-left: 15px; width:100%"
                      filterable
                      filterable
-                     placeholder="请选择课程类型"
-                     multiple
-                     clearable>
+                     placeholder="请选择课程类型">
             <el-option v-for="(item,index) in courseListType"
             <el-option v-for="(item,index) in courseListType"
                        :key="index"
                        :key="index"
                        :label="item.label"
                        :label="item.label"
@@ -208,8 +205,8 @@
         firstDayOfWeek: 1
         firstDayOfWeek: 1
     }"></el-date-picker>
     }"></el-date-picker>
           <div class="newBand"
           <div class="newBand"
-               @click="exportStudent"
-               v-permission="'export/studentOrder'">导出</div>
+               @click="exportAttendance"
+               v-permission="'export/exportStudentAttendances'">导出</div>
           <!-- <el-tooltip placement="top"
           <!-- <el-tooltip placement="top"
                       popper-class="mTooltip">
                       popper-class="mTooltip">
             <div slot="content">
             <div slot="content">
@@ -228,6 +225,7 @@
 import { exportTeacherSalary } from '@/api/generalSettings'
 import { exportTeacherSalary } from '@/api/generalSettings'
 import { getEmployeeOrgan } from "@/api/buildTeam";
 import { getEmployeeOrgan } from "@/api/buildTeam";
 import { courseType, courseListType } from '@/utils/searchArray'
 import { courseType, courseListType } from '@/utils/searchArray'
+import { Export } from '@/utils/downLoadFile'
 import cleanDeep from 'clean-deep'
 import cleanDeep from 'clean-deep'
 import axios from 'axios'
 import axios from 'axios'
 import qs from 'qs'
 import qs from 'qs'
@@ -250,6 +248,7 @@ export default {
       studentOrganId: '',
       studentOrganId: '',
       studentMonth: '',
       studentMonth: '',
       attendanceOrganId: '',
       attendanceOrganId: '',
+      attendanceCourseType: 'MUSIC',
       timer: []
       timer: []
       // imageIcon: require("@/assets/images/base/warning.png")
       // imageIcon: require("@/assets/images/base/warning.png")
     };
     };
@@ -529,6 +528,22 @@ export default {
         })
         })
       }).catch(() => { })
       }).catch(() => { })
     },
     },
+    exportAttendance () {
+      let classStartDate, classEndDate;
+      if (this.timer && this.timer.length > 0) {
+        classStartDate = this.timer[0]
+        classEndDate = this.timer[1]
+      } else {
+        classStartDate = null
+        classEndDate = null
+      }
+      Export(this, {
+        url: '/api-web/export/exportStudentAttendances',
+        fileName: '学生考勤.xlsx',
+        method: 'post',
+        params: qs.stringify({ organId: this.attendanceOrganId, groupType: this.attendanceCourseType, classStartDate, classEndDate })
+      }, '您确定导出学生考勤?')
+    },
   }
   }
 
 
 };
 };