瀏覽代碼

添加导出

lex-xin 4 年之前
父節點
當前提交
1b4dd8e263
共有 3 個文件被更改,包括 36 次插入0 次删除
  1. 12 0
      src/views/arrearage-students/index.vue
  2. 12 0
      src/views/serverDetail/index.vue
  3. 12 0
      src/views/withdrawal-application/index.vue

+ 12 - 0
src/views/arrearage-students/index.vue

@@ -74,6 +74,7 @@
         <el-form-item>
           <el-button native-type="submit" type="danger">搜索</el-button>
           <el-button native-type="reset" type="primary">重置</el-button>
+          <el-button @click="onExport" type="primary" v-permission="'export/arrearageStudents'">导出</el-button>
         </el-form-item>
       </save-form>
       <el-table
@@ -182,6 +183,8 @@ import list from './modals/list'
 import { permission } from '@/utils/directivePage'
 import { getCooperation } from '@/api/buildTeam'
 import { queryArrearageStudents, getNoPaymentStudentMusicGroups } from './api'
+import { Export } from '@/utils/downLoadFile'
+import qs from 'qs'
 const initSearch = {
   search: '',
   eduTeacherId: null,
@@ -262,6 +265,15 @@ export default {
       this.detail = row
       this.visible = true
     },
+    onExport() {
+      const { organIds, ...rest} = this.searchForm
+      Export(this, {
+        url: '/api-web/export/arrearageStudents',
+        fileName: '欠费学员.xlsx',
+        method: 'post',
+        params: qs.stringify({ organIds: organIds.join(','), ...rest })
+      }, '您确定导出欠费学员列表?')
+    }
   }
 }
 </script>

+ 12 - 0
src/views/serverDetail/index.vue

@@ -87,6 +87,7 @@
         <el-form-item>
           <el-button native-type="submit" type="primary">搜索</el-button>
           <el-button native-type="reset" type="danger">重置</el-button>
+          <el-button @click="onExport" type="primary" v-permission="'export/teacherServeInfo'">导出</el-button>
         </el-form-item>
       </save-form>
       <div class="btnWraps" style="margin-bottom: 20px">
@@ -225,6 +226,8 @@ import load from "@/utils/loading";
 import { getTeacherServeInfo, teacherServeRemindPush } from "./api";
 import { getTimes } from "@/utils";
 import { getNowDateAndSunday, getNowDateAndMonday } from "@/utils/date";
+import { Export } from '@/utils/downLoadFile'
+import qs from 'qs'
 export default {
   components: { pagination, serverMask },
   data() {
@@ -375,6 +378,15 @@ export default {
             return time.getTime() >= Date.now();
         },
       };
+    },
+    onExport() {
+      const {orderDate, ...rest} = this.searchForm;
+      Export(this, {
+        url: '/api-web/export/teacherServeInfo',
+        fileName: '退团申请.xlsx',
+        method: 'post',
+        params: qs.stringify({ ...rest, ...getTimes(this.orderDate, ["monday", "sunday"]) })
+      }, '您确定导出退团申请列表?')
     }
   },
 };

+ 12 - 0
src/views/withdrawal-application/index.vue

@@ -21,6 +21,7 @@
         <el-form-item>
           <el-button native-type="submit" type="danger">搜索</el-button>
           <el-button native-type="reset" type="primary">重置</el-button>
+          <el-button @click="onExport" type="primary" v-permission="'export/musicGroupQuit'">导出</el-button>
         </el-form-item>
       </save-form>
       <el-table
@@ -125,6 +126,8 @@ import { permission } from '@/utils/directivePage'
 import quitModal from './modals/quit'
 import quitOnlyModal from './modals/quitOnly'
 import visit from './modals/visit'
+import { Export } from '@/utils/downLoadFile'
+import qs from 'qs'
 import { musicGroupQuitQeryPage } from './api'
 const initSearch = {
   search: ''
@@ -186,6 +189,15 @@ export default {
         this.rules.total = res.data.total;
         this.list = res.data.rows
       } catch (error) {}
+    },
+    onExport() {
+      const { ...rest} = this.searchForm
+      Export(this, {
+        url: '/api-web/export/musicGroupQuit',
+        fileName: '退团申请.xlsx',
+        method: 'post',
+        params: qs.stringify({ visitFlag: this.$route.query.visitFlag, ...rest })
+      }, '您确定导出退团申请列表?')
     }
   }
 }