Browse Source

修改学生导出所有

lex-xin 5 years ago
parent
commit
a3b16f1688

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.7e2a38de.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.4e77c0eb.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.52b67124.js


+ 24 - 11
src/views/dashboard/index.vue

@@ -100,7 +100,6 @@
                            :selectable='checkboxT'
                            width="55"
                            v-if='this.majorStatus <= 2'>
-
           </el-table-column>
           <el-table-column prop="city"
                            align="center"
@@ -371,7 +370,7 @@ export default {
       this.getMajors();
     },
     // 获取学生列表(查询也用这个接口)
-    getstudentList () {
+    getstudentList (callBack) {
       if (!this.majorId) {
         this.$message.error("请先选择分部与乐团在搜索学生");
         return;
@@ -389,6 +388,10 @@ export default {
         this.tableData = res.data.rows;
         this.total = res.data.total;
         this.pageSize = res.data.limit;
+        // 回调函数
+        if(callBack && typeof callBack === 'function') {
+            callBack()
+        }
       });
     },
     // 重置搜索
@@ -529,14 +532,25 @@ export default {
 
     },
     exportis () {
-      // var curTbl = document.getElementById('tableid');
-      // this.tableId = curTbl;
-      // console.log(curTbl);
-      console.log(this.tableData)
-      if (this.tableData.length <= 0) {
-        return false
-      }
-      this.method5('tableid');
+        // var curTbl = document.getElementById('tableid');
+        // this.tableId = curTbl;
+        // 获取所有学生数据然后到出
+        this.limit = 200 // 每页获取200条数据
+        this.topForm.team = "";
+        this.topForm.status = "";
+        this.topForm.major = "";
+        this.page = 1;
+        // 重置,显示所有数据,然后到出
+        this.getstudentList(() => {
+            // 需要等数据更新,然后做下载功能
+            setTimeout(() => {
+                if (this.tableData.length <= 0) {
+                    return false
+                }
+                this.method5('tableid');    
+            }, 500);
+        })
+        
     },
 
     // 导出
@@ -624,7 +638,6 @@ export default {
             return ''
         }
         let temp = remark.split('\n')
-        console.log(temp)
         return temp
     }
   },

+ 6 - 10
vue.config.js

@@ -14,7 +14,9 @@ const name = defaultSettings.title || '大雅报名管理'; // page title
 // You can change the port by the following methods:
 // port = 9528 npm run dev OR npm run dev --port = 9528
 const port = process.env.port || process.env.npm_config_port || 9528; // dev port
-
+// const targetUrl = 'http://testpay.dayaedu.com'
+const targetUrl = 'https://manage.dayaedu.com'
+// const targetUrl = 'http://192.168.3.38:8088'
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
 	/**
@@ -30,7 +32,7 @@ module.exports = {
   lintOnSave: false,
   productionSourceMap: false,
   devServer: {
-    // port: port,
+    port: port,
     open: true,
     // overlay: {
     // 	warnings: false,
@@ -39,21 +41,15 @@ module.exports = {
     proxy: {
       // change xxx-api/login => mock/login
       // detail: https://cli.vuejs.org/config/#devserver-proxy
-      // http://admin.dayaedu.com
-      // http://192.168.3.27
-      // http://192.168.3.28:8005
-      // 192.168.3.38:8088
       '/order': {
-        // target: 'http://testpay.dayaedu.com',
-        target: 'http://192.168.3.38:8088',
+        target: targetUrl,
         changeOrigin: true,
         ws: true,
         '^/order': '/order',
         xfwd: true
       },
       '/user': {
-        // target: 'http://testpay.dayaedu.com',
-        target: 'http://192.168.3.38:8088',
+        target: targetUrl,
         changeOrigin: true,
         ws: true,
         '^/user': '/user',

Some files were not shown because too many files changed in this diff