Browse Source

添加导出功能

lex 1 year ago
parent
commit
f6e5a40f1a

+ 8 - 1
src/constant/index.js

@@ -316,7 +316,14 @@ export const downListType = {
   26: "经营报表收入汇总",
   27: "云教练激活明细",
   28: "课程收入明细导出",
-  29: "乐团梯队数据导出"
+  29: "乐团梯队数据导出",
+  30: "平衡关系-乐团课",
+  31: "平衡关系-VIP已排课",
+  32: "平衡关系-VIP未排课",
+  33: "平衡关系-乐团课剩余时长",
+  34: "平衡关系-学员情况总表",
+  35: "平衡关系(分表)-乐团在读学员",
+  36: "平衡关系(分表)-乐团退团学员"
 };
 
 export const withdrawalStatus = {

+ 393 - 0
src/views/reportForm/balanced-relationship.vue

@@ -0,0 +1,393 @@
+<template>
+  <div>
+    <div class="m-wrap" v-permission="'export/EXPORT_MUSIC_GROUP_ECHELON_DATA'">
+      <div class="title">乐团梯队数据:</div>
+      <!-- <el-date-picker
+        v-model="month1"
+        type="month"
+        placeholder="选择月"
+        value-format="yyyy-MM"
+        class="organSelect"
+        :picker-options="pickerOptions"
+        clearable
+      ></el-date-picker> -->
+      <select-all
+        v-model.trim="organId1"
+        class="organSelect"
+        style="width: 100%"
+        filterable
+        multiple
+        placeholder="请选择分部"
+        clearable
+      >
+        <el-option
+          v-for="(item, index) in selects.branchs"
+          :key="index"
+          :label="item.name"
+          :value="item.id"
+        ></el-option>
+      </select-all>
+      <ExportChiose
+        style="margin-left: 10px"
+        ExportEnum="EXPORT_MUSIC_GROUP_ECHELON_DATA"
+        :exportData="exportData1"
+        fileName="平衡关系-乐团梯队数据导出"
+        errorMsg="请选择月份"
+        message="您确认导出乐团梯队数据"
+        :flag="this.organId1.length <= 0"
+        :isDownList="true"
+      />
+    </div>
+
+    <div
+      class="m-wrap"
+      v-permission="'export/EXPORT_BALANCED_RELATIONSHIP_MUSIC_COURSE'"
+    >
+      <div class="title">乐团课:</div>
+      <el-date-picker
+        v-model="month2"
+        type="month"
+        placeholder="选择月"
+        value-format="yyyy-MM"
+        class="organSelect"
+        :picker-options="pickerOptions"
+        clearable
+      ></el-date-picker>
+      <ExportChiose
+        style="margin-left: 10px"
+        ExportEnum="EXPORT_BALANCED_RELATIONSHIP_MUSIC_COURSE"
+        :exportData="exportData2"
+        fileName="平衡关系-乐团课导出"
+        errorMsg="请选择月份"
+        message="您确认导出乐团课"
+        :flag="this.month2.length <= 0"
+        :isDownList="true"
+      />
+    </div>
+
+    <div
+      class="m-wrap"
+      v-permission="'export/EXPORT_BALANCED_RELATIONSHIP_VIP_COURSE'"
+    >
+      <div class="title">VIP已排课:</div>
+      <el-date-picker
+        v-model="month3"
+        type="month"
+        placeholder="选择月"
+        value-format="yyyy-MM"
+        class="organSelect"
+        :picker-options="pickerOptions"
+        clearable
+      ></el-date-picker>
+      <ExportChiose
+        style="margin-left: 10px"
+        ExportEnum="EXPORT_BALANCED_RELATIONSHIP_VIP_COURSE"
+        :exportData="exportData3"
+        fileName="平衡关系-VIP已排课导出"
+        errorMsg="请选择月份"
+        message="您确认导出VIP已排课"
+        :flag="this.month3.length <= 0"
+        :isDownList="true"
+      />
+    </div>
+
+    <div
+      class="m-wrap"
+      v-permission="'export/EXPORT_BALANCED_RELATIONSHIP_VIP_NO_COURSE'"
+    >
+      <div class="title">VIP未排课:</div>
+      <el-date-picker
+        v-model="month4"
+        type="month"
+        placeholder="选择月"
+        value-format="yyyy-MM"
+        class="organSelect"
+        :picker-options="pickerOptions"
+        clearable
+      ></el-date-picker>
+      <ExportChiose
+        style="margin-left: 10px"
+        ExportEnum="EXPORT_BALANCED_RELATIONSHIP_VIP_NO_COURSE"
+        :exportData="exportData4"
+        fileName="平衡关系-VIP未排课导出"
+        errorMsg="请选择月份"
+        message="您确认导出VIP未排课"
+        :flag="this.month4.length <= 0"
+        :isDownList="true"
+      />
+    </div>
+
+    <div
+      class="m-wrap"
+      v-permission="'export/EXPORT_BALANCED_RELATIONSHIP_MUSIC_SUB_COURSE'"
+    >
+      <div class="title">乐团课剩余时长:</div>
+      <el-date-picker
+        v-model="month5"
+        type="month"
+        placeholder="选择月"
+        value-format="yyyy-MM"
+        class="organSelect"
+        :picker-options="pickerOptions"
+        clearable
+      ></el-date-picker>
+      <ExportChiose
+        style="margin-left: 10px"
+        ExportEnum="EXPORT_BALANCED_RELATIONSHIP_MUSIC_SUB_COURSE"
+        :exportData="exportData5"
+        fileName="平衡关系-乐团课剩余时长导出"
+        errorMsg="请选择月份"
+        message="您确认导出乐团课剩余时长"
+        :flag="this.month5.length <= 0"
+        :isDownList="true"
+      />
+    </div>
+
+    <div
+      class="m-wrap"
+      v-permission="'export/EXPORT_BALANCED_RELATIONSHIP_STUDENT_INFO'"
+    >
+      <div class="title">学员情况总表:</div>
+      <el-date-picker
+        v-model="month6"
+        type="month"
+        placeholder="选择月"
+        value-format="yyyy-MM"
+        class="organSelect"
+        :picker-options="pickerOptions"
+        clearable
+      ></el-date-picker>
+      <ExportChiose
+        style="margin-left: 10px"
+        ExportEnum="EXPORT_BALANCED_RELATIONSHIP_STUDENT_INFO"
+        :exportData="exportData6"
+        fileName="平衡关系-学员情况总表导出"
+        errorMsg="请选择月份"
+        message="您确认导出学员情况总表"
+        :flag="this.month6.length <= 0"
+        :isDownList="true"
+      />
+    </div>
+
+    <div
+      class="m-wrap"
+      v-permission="'export/EXPORT_BALANCED_RELATIONSHIP_STUDENT_NORMAL_DETAIL'"
+    >
+      <div class="title">乐团在读学员:</div>
+      <ExportChiose
+        style="margin-left: 10px"
+        ExportEnum="EXPORT_BALANCED_RELATIONSHIP_STUDENT_NORMAL_DETAIL"
+        fileName="平衡关系(分表)-乐团在读学员导出"
+        errorMsg="请选择月份"
+        message="您确认导出乐团在读学员"
+        :isDownList="true"
+      />
+    </div>
+
+    <div
+      class="m-wrap"
+      v-permission="'export/EXPORT_BALANCED_RELATIONSHIP_STUDENT_QUIT_DETAIL'"
+    >
+      <div class="title">乐团退团学员:</div>
+      <el-date-picker
+        v-model="month7"
+        type="month"
+        placeholder="选择月"
+        value-format="yyyy-MM"
+        class="organSelect"
+        :picker-options="pickerOptions"
+        clearable
+      ></el-date-picker>
+      <ExportChiose
+        style="margin-left: 10px"
+        ExportEnum="EXPORT_BALANCED_RELATIONSHIP_STUDENT_QUIT_DETAIL"
+        :exportData="exportData7"
+        fileName="平衡关系(分表)-乐团退团学员导出"
+        errorMsg="请选择月份"
+        message="您确认导出乐团退团学员"
+        :flag="this.month7.length <= 0"
+        :isDownList="true"
+      />
+    </div>
+    <!-- EXPORT_MUSIC_GROUP_ECHELON_DATA(29,"乐团梯队数据导出"),
+	EXPORT_BALANCED_RELATIONSHIP_MUSIC_COURSE(30,"平衡关系-乐团课"),
+	EXPORT_BALANCED_RELATIONSHIP_VIP_COURSE(31,"平衡关系-VIP已排课"),
+	EXPORT_BALANCED_RELATIONSHIP_VIP_NO_COURSE(32,"平衡关系-VIP未排课"),
+	EXPORT_BALANCED_RELATIONSHIP_MUSIC_SUB_COURSE(33,"平衡关系-乐团课剩余时长"),
+	EXPORT_BALANCED_RELATIONSHIP_STUDENT_INFO(34,"平衡关系-学员情况总表"),
+	EXPORT_BALANCED_RELATIONSHIP_STUDENT_NORMAL_DETAIL(35,"平衡关系(分表)-乐团在读学员"),
+	EXPORT_BALANCED_RELATIONSHIP_STUDENT_QUIT_DETAIL(36,"平衡关系(分表)-乐团退团学员") -->
+  </div>
+</template>
+<script>
+import ExportChiose from "@/components/Export-chiose";
+import dayjs from "dayjs";
+export default {
+  name: "balanced-relationship",
+  components: {
+    ExportChiose
+  },
+  data() {
+    return {
+      pickerOptions: {
+        firstDayOfWeek: 1,
+        disabledDate(time) {
+          return time.getTime() + 86400000 > dayjs(new Date()).startOf("month");
+        }
+      },
+      organId1: [], // 乐团梯队数据
+      month2: "", // 平衡关系-乐团课
+      month3: "", // 平衡关系-VIP已排课
+      month4: "", // 平衡关系-VIP未排课
+      month5: "", // 平衡关系-乐团课剩余时长
+      month6: "", // 平衡关系-学员情况总表
+      month7: "" // 平衡关系(分表)-乐团退团学员
+    };
+  },
+  mounted() {
+    // this.$store.dispatch("setBranchs");
+  },
+  methods: {
+    // exportMusicGroup() {
+    //   let params = {
+    //     ...getTimes(this.teamTimer, ["startTime", "endTime"]),
+    //     month: this.teamOrganId.join(",")
+    //   };
+    //   Export(
+    //     this,
+    //     {
+    //       method: "post",
+    //       url: "/api-web/export/exportMusicGroupCourseList",
+    //       params: this.$helpers.qs.stringify({
+    //         ...params
+    //       })
+    //     },
+    //     "是否确认导出报表?"
+    //   );
+    // }
+  },
+  computed: {
+    exportData1() {
+      let data = {
+        organId: this.organId1.join(",")
+      };
+      return data;
+    },
+    exportData2() {
+      let data = {
+        month: this.month2
+      };
+      return data;
+    },
+    exportData3() {
+      let data = {
+        month: this.month3
+      };
+      return data;
+    },
+    exportData4() {
+      let data = {
+        month: this.month4
+      };
+      return data;
+    },
+    exportData5() {
+      let data = {
+        month: this.month5
+      };
+      return data;
+    },
+    exportData6() {
+      let data = {
+        month: this.month6
+      };
+      return data;
+    },
+    exportData7() {
+      let data = {
+        month: this.month7
+      };
+      return data;
+    }
+  }
+  // AccountDetailTimer
+};
+</script>
+<style lang="scss" scoped>
+.m-container {
+  // margin-top: 20px;
+  .m-wrap {
+    display: flex;
+    flex-direction: row;
+    justify-content: flex-start;
+    width: 100%;
+    align-items: center;
+    margin-bottom: 16px;
+    .newBand {
+      margin: 0 5px 0 10px;
+    }
+    .title {
+      width: 150px;
+      // height: 40px;
+      // line-height: 40px;
+      text-align: right;
+      color: #212121;
+      font-weight: 600;
+    }
+    .organSelect {
+      width: 260px !important;
+    }
+    .el-tooltip.micon {
+      width: 20px;
+      height: 20px;
+      position: relative;
+      margin-left: 8px;
+      // top: 12px;
+    }
+  }
+
+  .formCollapse {
+    border: none;
+    ::v-deep .el-collapse-item__header {
+      padding: 0 15px;
+      border-bottom: none;
+      background-color: #f8f8f8;
+    }
+    ::v-deep .el-collapse-item__wrap {
+      padding: 15px;
+      border-bottom: none;
+    }
+    ::v-deep .el-collapse-item__arrow.is-active {
+      transform: rotate(-90deg);
+    }
+    //  默认方向
+    ::v-deep .el-collapse-item__arrow,
+    .el-tabs__nav {
+      transform: rotate(90deg);
+    }
+    ::v-deep .el-collapse-item__content {
+      padding-bottom: 0px !important;
+    }
+    .wrapTitle {
+      font-size: 18px;
+      position: relative;
+      font-weight: 600;
+      margin-left: 12px;
+
+      &::after {
+        position: absolute;
+        width: 4px;
+        height: 18px;
+        background: var(--color-primary);
+        border-radius: 2px;
+        left: -13px;
+        top: 14px;
+        content: "";
+      }
+    }
+  }
+}
+::v-deep .el-input__icon.el-icon-date {
+  height: 40px !important;
+}
+</style>

+ 50 - 3
src/views/reportForm/index.vue

@@ -870,7 +870,7 @@
             />
           </div>
 
-          <div
+          <!-- <div
             class="m-wrap"
             v-permission="'export/EXPORT_MUSIC_GROUP_ECHELON_DATA'"
           >
@@ -900,6 +900,38 @@
               :flag="this.echelonDataOrganId.length <= 0"
               :isDownList="true"
             />
+          </div> -->
+          <div
+            class="m-wrap"
+            v-permission="'export/EXPORT_MUSIC_GROUP_NO_COURSE'"
+          >
+            <div class="title">乐团未排课时长:</div>
+            <select-all
+              v-model.trim="musicGroupNoDataOrganId"
+              class="organSelect"
+              style="width: 100%"
+              filterable
+              multiple
+              placeholder="请选择分部"
+              clearable
+            >
+              <el-option
+                v-for="(item, index) in selects.branchs"
+                :key="index"
+                :label="item.name"
+                :value="item.id"
+              ></el-option>
+            </select-all>
+            <ExportChiose
+              style="margin-left: 10px"
+              ExportEnum="EXPORT_MUSIC_GROUP_NO_COURSE"
+              :exportData="exportMusicGroupNoData"
+              fileName="乐团未排课时长导出"
+              errorMsg="请选择分部"
+              message="您确认导出乐团未排课时长"
+              :flag="this.musicGroupNoDataOrganId.length <= 0"
+              :isDownList="true"
+            />
           </div>
         </el-collapse-item>
         <el-collapse-item
@@ -1223,6 +1255,12 @@
             />
           </div>
         </el-collapse-item>
+        <el-collapse-item name="4">
+          <template slot="title">
+            <p class="wrapTitle">平衡关系</p>
+          </template>
+          <BalancedRelationship />
+        </el-collapse-item>
         <!-- <el-collapse-item
           name="4"
           v-if="$helpers.permission('questionnaireUserResult/export/report')"
@@ -1279,10 +1317,12 @@ import axios from "axios";
 import { getToken, getTenantId } from "@/utils/auth";
 import { getTimes } from "@/utils";
 import load from "@/utils/loading";
+import BalancedRelationship from "./balanced-relationship";
 export default {
   name: "reportForm",
   components: {
-    ExportChiose
+    ExportChiose,
+    BalancedRelationship
   },
   data() {
     return {
@@ -1353,7 +1393,8 @@ export default {
         Authorization: getToken(),
         tenantId: getTenantId()
       },
-      echelonDataOrganId: []
+      echelonDataOrganId: [],
+      musicGroupNoDataOrganId: []
     };
   },
   mounted() {
@@ -1829,6 +1870,12 @@ export default {
       };
       return data;
     },
+    exportMusicGroupNoData() {
+      let data = {
+        organId: this.musicGroupNoDataOrganId.join(",")
+      };
+      return data;
+    },
     exportAccount() {
       let endTime, startTime;
       if (this.AccountTimer && this.AccountTimer.length > 1) {

+ 1 - 1
vue.config.js

@@ -19,7 +19,7 @@ const name = defaultSettings.title || "管乐迷后台管理系统"; // page tit
 // let target = 'http://192.168.3.20:8000' //邹璇
 // let target = "http://192.168.0.127:8000"; //勇哥
 // let target = "http://192.168.3.14:8005"; // 原谅
-let target = "https://test.dayaedu.com"; //测试环境
+let target = "https://dev.dayaedu.com"; //测试环境
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**