Browse Source

添加报表导出和导入

lex 2 years ago
parent
commit
184b29ccab
4 changed files with 252 additions and 519 deletions
  1. 22 19
      src/components/Export-chiose/index.vue
  2. 8 5
      src/constant/index.js
  3. 219 492
      src/views/reportForm/index.vue
  4. 3 3
      vue.config.js

+ 22 - 19
src/components/Export-chiose/index.vue

@@ -40,34 +40,34 @@ export default {
   props: {
     name: {
       type: String,
-      default: "导出",
+      default: "导出"
     },
     fileName: {
       type: String,
-      default: "导出文件.xls",
+      default: "导出文件.xls"
     },
     message: {
       type: String,
-      default: "您确定导出",
+      default: "您确定导出"
     },
     errorMsg: {
       type: String,
-      default: "参数错误",
+      default: "参数错误"
     },
     flag: {
       type: Boolean,
-      default: false,
+      default: false
     },
     isDownList: {
       type: Boolean,
-      default: false,
+      default: false
     },
     ExportEnum: {
-      type: String,
+      type: String
     },
     exportData: {
-      type: Object,
-    },
+      type: Object
+    }
   },
   data() {
     return {
@@ -75,7 +75,7 @@ export default {
       isIndeterminate: true,
       checkAll: false,
       checked: [],
-      chioseList: [],
+      chioseList: []
     };
   },
   mounted() {},
@@ -91,7 +91,7 @@ export default {
       }
       try {
         const res = await getFields({
-          exportEnum: this.ExportEnum,
+          exportEnum: this.ExportEnum
         });
         this.chioseList = res.data;
         this.checked = res.data;
@@ -114,6 +114,10 @@ export default {
     },
     exportDataStart() {
       console.log(this.exportData);
+      if (this.flag) {
+        this.$message.error(this.errorMsg);
+        return;
+      }
       if (this.isDownList) {
         Export(
           this,
@@ -124,8 +128,8 @@ export default {
             params: {
               queryInfo: this.exportData,
               exportEnum: this.ExportEnum,
-              headColumns: this.checked,
-            },
+              headColumns: this.checked
+            }
           },
           this.message,
           () => {
@@ -142,8 +146,8 @@ export default {
             params: {
               queryInfo: this.exportData,
               exportEnum: this.ExportEnum,
-              headColumns: this.checked,
-            },
+              headColumns: this.checked
+            }
           },
           this.message,
           () => {
@@ -153,9 +157,8 @@ export default {
       }
 
       // 导出
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scoped></style>

+ 8 - 5
src/constant/index.js

@@ -306,7 +306,10 @@ export const downListType = {
   20: "云教练统计导出",
   21: "班级列表导出",
   22: "云教练统计详情导出",
-  23: "老师云教练使用数据"
+  23: "老师云教练使用数据",
+  24: "oa费用汇总",
+  25: "oa费用明细",
+  26: "经营报表收入汇总"
 };
 
 export const withdrawalStatus = {
@@ -546,10 +549,10 @@ export const serviceProvider = {
 };
 
 export const palyLevel = {
-  "BEGINNER":'入门级',
-  "ADVANCED":'进阶级',
-  "PERFORMER":'大师级'
-}
+  BEGINNER: "入门级",
+  ADVANCED: "进阶级",
+  PERFORMER: "大师级"
+};
 // 考级状态
 export const levelStatus = {
   NOT_START: "未开始",

File diff suppressed because it is too large
+ 219 - 492
src/views/reportForm/index.vue


+ 3 - 3
vue.config.js

@@ -14,14 +14,14 @@ const name = defaultSettings.title || "管乐迷后台管理系统"; // page tit
 // port = 9528 npm run dev OR npm run dev --port = 9528
 // const port = process.env.port || process.env.npm_config_port || 9528 // dev port
 // http://47.99.212.176:8000
-// //  https://online.dayaedu.com
-// let target = "https://online.dayaedu.com"; //线上
+//  https://online.dayaedu.com
+let target = "https://online.dayaedu.com"; //线上
 // let target = 'http://192.168.3.251:8000' // 何国威
 // let target = 'http://192.168.3.20:8000' //邹璇
 // let target = 'http://192.168.3.161:8000' //勇哥
 // let target = 'http://192.168.3.146:8000' //王昭
 // let target = 'http://dev.dayaedu.com' // 开发环境
-let target = "https://test.dayaedu.com"; //测试环境
+// let target = "https://test.dayaedu.com"; //测试环境
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**

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