Browse Source

到导出权限

1
mo 2 năm trước cách đây
mục cha
commit
4b0f44a2cc

+ 6 - 0
src/constant/index.js

@@ -298,6 +298,12 @@ export const downListType = {
   12: "训练统计导出",
   13: "商城订单列表",
   14: "商城财务管理",
+  15: "实际课耗导出",
+  16: "实际课耗学员详情导出",
+  17: "预计课耗导出",
+  18: "预计课耗学员详情导出",
+  19: "课耗统计导出",
+  20: "云教练统计导出"
 };
 
 export const withdrawalStatus = {

+ 1 - 0
src/router/index.js

@@ -628,5 +628,6 @@ export const asyncRoutes = {
   branchPayManager: () => import("@/views/branchPayManager/payList"),
   // 合作单位分润 payShareList
   branchShareManager: () => import("@/views/branchPayManager/payShareList"),
+  smallCourseConsumption:()=>import("@/views/smallCourseConsumption/index.vue")
 };
 export default router;

+ 33 - 0
src/views/smallCourseConsumption/api.js

@@ -0,0 +1,33 @@
+import request2 from '@/utils/request2'
+
+
+export const getCourseConsumer = data => request2({
+  url: '/api-web/studentCourseConsumer/queryCourseConsumer',
+data,
+  method: 'post',
+})
+
+
+export const getCourseConsumerDetail = data => request2({
+  url: '/api-web/studentCourseConsumer/queryCourseConsumerDetail',
+data,
+  method: 'post',
+})
+
+export const getPreCourseConsumer = data => request2({
+  url: '/api-web/studentCourseConsumer/queryPreCourseConsumer',
+data,
+  method: 'post',
+})
+export const getPreCourseConsumerDetail = data => request2({
+  url: '/api-web/studentCourseConsumer/queryPreCourseConsumerDetail',
+data,
+  method: 'post',
+})
+
+
+export const getCourseConsumerSum = data => request2({
+  url: '/api-web/studentCourseConsumer/queryCourseConsumerSum',
+data,
+  method: 'post',
+})

+ 232 - 0
src/views/smallCourseConsumption/components/actualList.vue

@@ -0,0 +1,232 @@
+<template>
+  <div class="vipClass">
+    <save-form :inline="true" class="searchForm" ref="searchForm" @submit="getList" @reset="reset"
+      save-key="smallCourseConsumption-actualList" :model.sync="searchForm">
+      <el-form-item prop="organId">
+        <el-select class="multiple" filterable v-model.trim="searchForm.organId" multiple collapse-tags clearable
+          placeholder="请选择分部">
+          <el-option v-for="(item, index) in selects.branchs" :key="index" :label="item.name" :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-date-picker v-model="searchForm.month" :clearable="false" type="month" value-format="yyyy-MM"
+          placeholder="选择月分">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button native-type="submit" type="danger">搜索</el-button>
+        <el-button native-type="reset" type="primary">重置</el-button>
+
+      </el-form-item>
+    </save-form>
+    <ExportChiose
+          v-permission="'export/orderList'"
+          style="margin-bottom: 20px;margin-right:10px;"
+          name="实际课耗导出"
+          ExportEnum="EXPORT_COURSE_CONSUMER"
+          :exportData="onExport"
+          fileName="实际课耗导出"
+          errorMsg="请选择月份"
+          :isDownList="true"
+        />
+    <div class="tableWrap">
+      <el-table :data="tableList" :header-cell-style="{ background: '#EDEEF0', color: '#444' }">
+        <el-table-column align="center" prop="organName" label="所属分部">
+          <template slot-scope="scope">
+            <copy-text>{{
+                scope.row.organName
+            }}</copy-text>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="normalNum" label="在读人数">
+          <template slot-scope="scope">
+            <p>
+              {{
+                  scope.row.normalNum
+              }}人
+            </p>
+
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于5节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num5
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于4节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num4
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于3节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num3
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于2节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num2
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于1节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num1
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于0节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num0
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+
+        <el-table-column align="center" width="180px" label="操作">
+          <template slot-scope="scope">
+            <el-button type="text"  v-permission="'studentCourseConsumer/queryCourseConsumerDetail'" @click="lookDetail(scope.row)">查看详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <actualDetail ref='actualDetailRef'/>
+      <!-- <pagination
+        sync
+        save-key="smallCourseConsumption-actualList"
+        :total.sync="pageInfo.total"
+        :page.sync="pageInfo.page"
+        :limit.sync="pageInfo.limit"
+        :page-sizes="pageInfo.page_size"
+        @pagination="getList"
+      /> -->
+    </div>
+  </div>
+</template>
+
+<script>
+import { getCourseConsumer } from '../api'
+import pagination from "@/components/Pagination/index";
+import dayjs from 'dayjs'
+import actualDetail from '../modals/actualDetail.vue'
+import ExportChiose from "@/components/Export-chiose";
+export default {
+  name: "actualList",
+  components: {
+    pagination,
+    actualDetail,
+    ExportChiose
+  },
+  provide() {
+    return {
+      organId: () => this.searchForm.organId.join(","),
+      isSearch: () => this.isSearch,
+    };
+  },
+
+  data() {
+    return {
+
+      searchForm: {
+        organId: [],
+        month: dayjs(new Date()).format('YYYY-MM')
+      },
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      tableList: [],
+    };
+  },
+  async mounted() {
+    this.$store.dispatch("setBranchs");
+    this.getList()
+  },
+  methods: {
+    __init() { },
+
+    reset() {
+      this.searchForm.organId = [];
+      this.searchForm.month = dayjs(new Date()).format('YYYY-MM')
+      this.pageInfo.page = 1;
+      this.getList();
+    },
+    async getList() {
+      try {
+        let obj = {
+          ...this.searchForm,
+          organId: this.searchForm.organId.join(",")
+        }
+        const res = await getCourseConsumer(obj)
+        this.tableList = res.data;
+      } catch (e) {
+        console.log(e)
+      }
+    },
+    lookDetail(row){
+      this.$refs.actualDetailRef.openDialog(row,this.searchForm.month)
+    },
+
+  },
+  computed:{
+    onExport(){
+      return {
+          ...this.searchForm,
+          organId: this.searchForm.organId.join(",")
+        }
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.rows {
+  >div {
+    margin-bottom: 20px;
+  }
+}
+
+::v-deep .el-card__body .statistic {
+  margin-bottom: 15px;
+  padding: 0;
+}
+
+.statistic {
+  .statistic-content>span {
+    font-size: 22px !important;
+
+    &:first-child {
+      font-size: 14px !important;
+    }
+  }
+}
+</style>

+ 248 - 0
src/views/smallCourseConsumption/components/preList.vue

@@ -0,0 +1,248 @@
+<template>
+  <div class="vipClass">
+    <save-form :inline="true" class="searchForm" ref="searchForm" @submit="getList" @reset="reset"
+      save-key="smallCourseConsumption-actualList" :model.sync="searchForm">
+      <el-form-item prop="organId">
+        <el-select class="multiple" filterable v-model.trim="searchForm.organId" multiple collapse-tags clearable
+          placeholder="请选择分部">
+          <el-option v-for="(item, index) in selects.branchs" :key="index" :label="item.name" :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+      <el-date-picker
+            v-model.trim="searchForm.timer"
+            style="width: 400px"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            :picker-options="{
+              firstDayOfWeek: 1,
+            }"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+          ></el-date-picker>
+        </el-form-item>
+      <el-form-item>
+        <el-button native-type="submit" type="danger">搜索</el-button>
+        <el-button native-type="reset" type="primary">重置</el-button>
+      </el-form-item>
+    </save-form>
+    <ExportChiose
+          v-permission="'export/orderList'"
+          style="margin-bottom: 20px;margin-right:10px;"
+          name="预计课耗导出"
+          ExportEnum="EXPORT_PRE_COURSE_CONSUMER"
+          :exportData="onExport"
+          fileName="预计课耗导出"
+          errorMsg="请选择时间"
+          :isDownList="true"
+        />
+    <div class="tableWrap">
+      <el-table :data="tableList" :header-cell-style="{ background: '#EDEEF0', color: '#444' }">
+        <el-table-column align="center" prop="organName" label="所属分部">
+          <template slot-scope="scope">
+            <copy-text>{{
+                scope.row.organName
+            }}</copy-text>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="normalNum" label="在读人数">
+          <template slot-scope="scope">
+            <p>
+              {{
+                  scope.row.normalNum
+              }}人
+            </p>
+
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于5节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num5
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于4节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num4
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于3节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num3
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于2节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num2
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于1节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num1
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于0节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num0
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+
+        <el-table-column align="center" width="180px" label="操作">
+          <template slot-scope="scope">
+            <el-button type="text"  v-permission="'studentCourseConsumer/queryPreCourseConsumerDetail'" @click="lookDetail(scope.row)">查看详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <preDetail ref='preDetailRef'/>
+      <!-- <pagination
+        sync
+        save-key="smallCourseConsumption-actualList"
+        :total.sync="pageInfo.total"
+        :page.sync="pageInfo.page"
+        :limit.sync="pageInfo.limit"
+        :page-sizes="pageInfo.page_size"
+        @pagination="getList"
+      /> -->
+    </div>
+  </div>
+</template>
+
+<script>
+import { getPreCourseConsumer } from '../api'
+import ExportChiose from "@/components/Export-chiose";
+import pagination from "@/components/Pagination/index";
+import dayjs from 'dayjs'
+import preDetail from '../modals/preDetail.vue'
+import { getTimes } from "@/utils";
+export default {
+  name: "actualList",
+  components: {
+    pagination,
+    preDetail,
+    ExportChiose
+  },
+  provide() {
+    return {
+      organId: () => this.searchForm.organId.join(","),
+      isSearch: () => this.isSearch,
+    };
+  },
+
+  data() {
+    return {
+
+      searchForm: {
+        organId: [],
+        timer:[dayjs(new Date().setDate(1)).format('YYYY-MM-DD'), dayjs(new Date()).format('YYYY-MM-DD')]
+      },
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      tableList: [],
+    };
+  },
+  async mounted() {
+    this.$store.dispatch("setBranchs");
+    this.getList()
+  },
+  methods: {
+    __init() { },
+
+    reset() {
+      this.searchForm.organId = [];
+      this.searchForm.timer=[dayjs(new Date().setDate(1)).format('YYYY-MM-DD'), dayjs(new Date()).format('YYYY-MM-DD')]
+      this.pageInfo.page = 1;
+      this.getList();
+    },
+    async getList() {
+      try {
+        const { timer, ...rest } = this.searchForm;
+        let obj = {
+          ...this.searchForm,
+          organId: this.searchForm.organId.join(","),
+          ...getTimes(timer, ["startDate", "endDate"]),
+          // rows: this.rues.limit,
+          // page: this.rulles.page,
+        }
+        const res = await getPreCourseConsumer(obj)
+        this.tableList = res.data;
+      } catch (e) {
+        console.log(e)
+      }
+    },
+    lookDetail(row){
+      this.$refs.preDetailRef.openDialog(row,this.searchForm.timer)
+    }
+  },
+  computed:{
+    onExport(){
+      const { timer, ...rest } = this.searchForm;
+        let obj = {
+          organId: this.searchForm.organId.join(","),
+          ...getTimes(timer, ["startDate", "endDate"]),
+          // rows: this.rues.limit,
+          // page: this.rulles.page,
+        }
+      return obj
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.rows {
+  >div {
+    margin-bottom: 20px;
+  }
+}
+
+::v-deep .el-card__body .statistic {
+  margin-bottom: 15px;
+  padding: 0;
+}
+
+.statistic {
+  .statistic-content>span {
+    font-size: 22px !important;
+
+    &:first-child {
+      font-size: 14px !important;
+    }
+  }
+}
+</style>

+ 287 - 0
src/views/smallCourseConsumption/components/statisticsList.vue

@@ -0,0 +1,287 @@
+<template>
+  <div class="vipClass">
+    <save-form :inline="true" class="searchForm" ref="searchForm" @submit="getList" @reset="reset"
+      save-key="smallCourseConsumption-actualList" :model.sync="searchForm">
+      <el-form-item prop="organId">
+        <el-select class="multiple" filterable v-model.trim="searchForm.organId" multiple collapse-tags clearable
+          placeholder="请选择分部">
+          <el-option v-for="(item, index) in selects.branchs" :key="index" :label="item.name" :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+      <el-date-picker
+            v-model.trim="searchForm.timer"
+            style="width: 400px"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            :picker-options="{
+              firstDayOfWeek: 1,
+            }"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+          ></el-date-picker>
+        </el-form-item>
+      <el-form-item>
+        <el-button native-type="submit" type="danger">搜索</el-button>
+        <el-button native-type="reset" type="primary">重置</el-button>
+      </el-form-item>
+    </save-form>
+    <ExportChiose
+          v-permission="'export/orderList'"
+          style="margin-bottom: 20px;margin-right:10px;"
+          name="课耗统计导出"
+          ExportEnum="EXPORT_COURSE_CONSUMER_SUM"
+          :exportData="onExport"
+          fileName="课耗统计导出"
+          errorMsg="请选择时间"
+          :isDownList="true"
+        />
+    <div class="tableWrap">
+      <el-table :data="tableList" :header-cell-style="{ background: '#EDEEF0', color: '#444' }">
+        <el-table-column align="center" prop="organName" label="所属分部">
+          <template slot-scope="scope">
+            <copy-text>{{
+                scope.row.organName
+            }}</copy-text>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="normalNum" label="在读人数">
+          <template slot-scope="scope">
+            <p>
+              {{
+                  scope.row.normalNum
+              }}人
+            </p>
+
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="normalNum" label="应有课耗">
+          <template slot-scope="scope">
+            <p>
+              {{
+                  scope.row.courseConsumerNum
+              }}节
+            </p>
+
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="normalNum" label="实际课耗">
+          <template slot-scope="scope">
+            <p>
+              {{
+                  scope.row.courseSum
+              }}节
+            </p>
+
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="normalNum" label="课耗达标率">
+          <template slot-scope="scope">
+            <p>
+              {{
+                  scope.row.courseConsumerRate
+              }}%
+            </p>
+
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于5节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num5
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于4节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num4
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于3节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num3
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于2节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num2
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于1节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num1
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="大于等于0节">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.num0
+              }}人
+            </p>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" prop="studentBasicInfo.subjectName" label="达标占比">
+          <template slot-scope="scope">
+          <p>
+              {{
+                  scope.row.standRate
+              }}%
+            </p>
+          </template>
+        </el-table-column>
+
+
+        <el-table-column align="center" width="180px" label="操作">
+          <template slot-scope="scope">
+            <el-button type="text" @click="lookDetail(scope.row)">查看详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <preDetail ref='preDetailRef'/>
+      <!-- <pagination
+        sync
+        save-key="smallCourseConsumption-actualList"
+        :total.sync="pageInfo.total"
+        :page.sync="pageInfo.page"
+        :limit.sync="pageInfo.limit"
+        :page-sizes="pageInfo.page_size"
+        @pagination="getList"
+      /> -->
+    </div>
+  </div>
+</template>
+
+<script>
+import { getCourseConsumerSum } from '../api'
+import pagination from "@/components/Pagination/index";
+import dayjs from 'dayjs'
+import preDetail from '../modals/preDetail.vue'
+import ExportChiose from "@/components/Export-chiose";
+import { getTimes } from "@/utils";
+export default {
+  name: "actualList",
+  components: {
+    pagination,
+    preDetail,
+    ExportChiose
+  },
+  provide() {
+    return {
+      organId: () => this.searchForm.organId.join(","),
+      isSearch: () => this.isSearch,
+    };
+  },
+
+  data() {
+    return {
+
+      searchForm: {
+        organId: [],
+        timer:[dayjs(new Date().setDate(1)).format('YYYY-MM-DD'), dayjs(new Date()).format('YYYY-MM-DD')]
+      },
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      tableList: [],
+    };
+  },
+  async mounted() {
+    this.$store.dispatch("setBranchs");
+    this.getList()
+  },
+  methods: {
+    __init() { },
+
+    reset() {
+      this.searchForm.organId = [];
+      this.searchForm.timer=[dayjs(new Date().setDate(1)).format('YYYY-MM-DD'), dayjs(new Date()).format('YYYY-MM-DD')]
+      this.pageInfo.page = 1;
+      this.getList();
+    },
+    async getList() {
+      try {
+        const { timer, ...rest } = this.searchForm;
+        let obj = {
+          ...rest,
+          organId: this.searchForm.organId.join(","),
+          ...getTimes(timer, ["startDate", "endDate"]),
+          // rows: this.rues.limit,
+          // page: this.rulles.page,
+        }
+        const res = await getCourseConsumerSum(obj)
+        this.tableList = res.data;
+      } catch (e) {
+        console.log(e)
+      }
+    },
+    lookDetail(row){
+      this.$refs.preDetailRef.openDialog(row,this.searchForm.timer)
+    }
+  },
+  computed:{
+    onExport(){
+      const { timer, ...rest } = this.searchForm;
+        let obj = {
+          organId: this.searchForm.organId.join(","),
+          ...getTimes(timer, ["startDate", "endDate"]),
+          // rows: this.rues.limit,
+          // page: this.rulles.page,
+        }
+      return obj
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.rows {
+  >div {
+    margin-bottom: 20px;
+  }
+}
+
+::v-deep .el-card__body .statistic {
+  margin-bottom: 15px;
+  padding: 0;
+}
+
+.statistic {
+  .statistic-content>span {
+    font-size: 22px !important;
+
+    &:first-child {
+      font-size: 14px !important;
+    }
+  }
+}
+</style>

+ 49 - 0
src/views/smallCourseConsumption/index.vue

@@ -0,0 +1,49 @@
+<!--  -->
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>
+      小课课耗统计
+    </h2>
+    <div class="m-core">
+      <tab-router
+        v-model.trim="activeIndex"
+        type="card"
+        @tab-click="handleClick"
+      >
+        <el-tab-pane label="实际课耗" lazy name="1"  v-permission="'studentCourseConsumer/queryCourseConsumer'">
+          <actualList v-if="activeIndex === '1'" />
+        </el-tab-pane>
+        <el-tab-pane label="预计课耗" lazy name="2" v-permission="'studentCourseConsumer/queryPreCourseConsumer'">
+          <preList v-if="activeIndex === '2'" />
+        </el-tab-pane>
+        <el-tab-pane label="课耗统计" lazy name="3"  v-permission="'studentCourseConsumer/queryCourseConsumerSum'">
+          <statisticsList v-if="activeIndex === '3'" />
+        </el-tab-pane>
+      </tab-router>
+    </div>
+  </div>
+</template>
+
+<script>
+import actualList from './components/actualList.vue';
+import preList from './components/preList'
+import statisticsList from './components/statisticsList'
+// import theoryClass from './theoryClass';
+// import auditionClass from './auditionClass';
+export default {
+  components: { actualList ,preList,statisticsList},
+  data() {
+    return {
+      activeIndex: "1",
+    };
+  },
+  methods: {
+    handleClick(evt) {
+      // this.changeHash(evt.name);
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+</style>

+ 134 - 0
src/views/smallCourseConsumption/modals/actualDetail.vue

@@ -0,0 +1,134 @@
+<template>
+  <div>
+    <el-dialog title="实际课耗详情" width="1000px" :visible.sync="courseVisible">
+      <el-form
+      :inline="true"
+      @submit="getList"
+      ref="searchForm"
+      :model="searchForm"
+    >
+      <el-form-item prop="search">
+        <el-input
+          class="search"
+          type="text"
+          clearable
+          v-model="searchForm.search"
+          placeholder="学员名称/编号/手机号"
+        ></el-input>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="danger" @click="getList">搜索</el-button>
+        <el-button native-type="reset" type="primary" @click="onReSet"
+          >重置</el-button
+        >
+        <ExportChiose
+          v-permission="'export/orderList'"
+          style="margin-bottom: 20px;margin-right:10px; margin-left:10px;display:inline-block"
+          name="导出"
+          ExportEnum="EXPORT_COURSE_CONSUMER_DETAIL"
+          :exportData="onExport"
+          fileName="实际课耗详细导出"
+          errorMsg="请选择时间"
+          :isDownList="true"
+        />
+      </el-form-item>
+    </el-form>
+      <el-table
+        :data="tableList"
+        ref="tableList"
+
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      >
+        <el-table-column prop="username" label="学生姓名"></el-table-column>
+        <el-table-column prop="userId" label="学生姓名"></el-table-column>
+        <el-table-column prop="phone" label="手机号"></el-table-column>
+        <el-table-column prop="preConsumerNum" label="应耗课时">
+        <template slot-scope="scope">
+          <div>
+            {{scope.row.preConsumerNum}}节
+          </div>
+        </template></el-table-column>
+        <el-table-column prop="consumerNum" label="实耗课时">
+          <template slot-scope="scope">
+          <div>
+            {{scope.row.consumerNum}}节
+          </div>
+        </template></el-table-column>
+      </el-table>
+      <pagination
+
+        :total.sync="pageInfo.total"
+        :page.sync="pageInfo.page"
+        :limit.sync="pageInfo.limit"
+        :page-sizes="pageInfo.page_size"
+        @pagination="getList"
+      />
+      <div slot="footer" class="dialog-footer">
+        <el-button
+          type="primary"
+
+          @click="courseVisible = false"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+import { getCourseConsumerDetail } from '../api'
+import ExportChiose from "@/components/Export-chiose";
+export default {
+  data(){
+    return {
+      tableList:[],
+      courseVisible:false,
+      searchForm:{search:'',month:'',organId:''},
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    }
+  },
+  components:{
+    pagination,
+    ExportChiose
+  },
+  mounted() {
+
+  },methods: {
+   async openDialog(row,month){
+    try{
+      this.searchForm.month = month
+      this.searchForm.organId = row.organId
+      this.getList()
+      this.courseVisible = true
+    }catch(e){
+      console.log(e)
+    }
+   },
+  async getList(){
+    const res  = await getCourseConsumerDetail({page:this.pageInfo.page,rows:this.pageInfo.limit,...this.searchForm})
+      this.tableList = res.data.rows;
+      this.pageInfo.total = res.data.total;
+  },
+   onReSet(){
+    this.searchForm.search='';
+    this.pageInfo.page = 1;
+    this.getList()
+   },
+  },
+  computed:{
+    onExport(){
+      return {
+        ...this.searchForm
+      }
+    }
+  }
+}
+</script>
+<style scoped></style>

+ 141 - 0
src/views/smallCourseConsumption/modals/preDetail.vue

@@ -0,0 +1,141 @@
+<template>
+  <div>
+    <el-dialog title="预计课耗详情" width="1000px" :visible.sync="courseVisible">
+      <el-form
+      :inline="true"
+      @submit="getList"
+      ref="searchForm"
+      :model="searchForm"
+    >
+      <el-form-item prop="search">
+        <el-input
+          class="search"
+          type="text"
+          clearable
+          v-model="searchForm.search"
+          placeholder="学员名称/编号/手机号"
+        ></el-input>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="danger" @click="getList">搜索</el-button>
+        <el-button native-type="reset" type="primary" @click="onReSet"
+          >重置</el-button
+        >
+        <ExportChiose
+          v-permission="'export/orderList'"
+          style="margin-bottom: 20px;margin-right:10px; margin-left:10px;display:inline-block"
+          name="导出"
+          ExportEnum="EXPORT_PRE_COURSE_CONSUMER_DETAIL"
+          :exportData="onExport"
+          fileName="预计课耗详情导出"
+          errorMsg="请选择时间"
+          :isDownList="true"
+        />
+      </el-form-item>
+    </el-form>
+      <el-table
+        :data="tableList"
+        ref="tableList"
+
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      >
+        <el-table-column prop="username" label="学生姓名"></el-table-column>
+        <el-table-column prop="userId" label="学生姓名"></el-table-column>
+        <el-table-column prop="phone" label="手机号"></el-table-column>
+        <el-table-column prop="preConsumerNum" label="应耗课时">
+        <template slot-scope="scope">
+          <div>
+            {{scope.row.preConsumerNum}}节
+          </div>
+        </template></el-table-column>
+        <el-table-column prop="consumerNum" label="已排课时">
+          <template slot-scope="scope">
+          <div>
+            {{scope.row.consumerNum}}节
+          </div>
+        </template></el-table-column>
+      </el-table>
+      <pagination
+
+        :total.sync="pageInfo.total"
+        :page.sync="pageInfo.page"
+        :limit.sync="pageInfo.limit"
+        :page-sizes="pageInfo.page_size"
+        @pagination="getList"
+      />
+      <div slot="footer" class="dialog-footer">
+        <el-button
+          type="primary"
+
+          @click="courseVisible = false"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+import { getPreCourseConsumerDetail } from '../api'
+import { getTimes } from "@/utils";
+import ExportChiose from "@/components/Export-chiose";
+export default {
+  data(){
+    return {
+      tableList:[],
+      courseVisible:false,
+      searchForm:{search:'',timer:[],organId:''},
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    }
+  },
+  components:{
+    pagination,
+    ExportChiose
+  },
+  mounted() {
+
+  },methods: {
+   async openDialog(row,month){
+    try{
+      this.searchForm.timer = month
+      this.searchForm.organId = row.organId
+      this.getList()
+      this.courseVisible = true
+    }catch(e){
+      console.log(e)
+    }
+   },
+  async getList(){
+    const { timer, ...rest } = this.searchForm;
+        let obj = {
+          ...rest,
+          ...getTimes(timer, ["startDate", "endDate"]),
+          page:this.pageInfo.page,rows:this.pageInfo.limit
+        }
+    const res  = await getPreCourseConsumerDetail(obj)
+      this.tableList = res.data.rows;
+      this.pageInfo.total = res.data.total;
+  },
+   onReSet(){
+    this.searchForm.search='';
+    this.pageInfo.page = 1;
+    this.getList()
+   },
+  },
+  computed:{
+    onExport(){
+      return {
+        ...this.searchForm
+      }
+    }
+  }
+}
+</script>
+<style scoped></style>