소스 검색

Merge branch '03/30MainReset' into test

mo 4 년 전
부모
커밋
3a51738611
7개의 변경된 파일194개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 3
      src/constant/index.js
  2. 3 1
      src/router/index.js
  3. 1 0
      src/router/notKeepAliveList.js
  4. 3 1
      src/utils/searchArray.js
  5. 7 1
      src/utils/vueFilter.js
  6. 13 0
      src/views/reportForm/api.js
  7. 163 0
      src/views/reportForm/downList.vue

+ 4 - 3
src/constant/index.js

@@ -236,6 +236,7 @@ export const ProbationPeriodStatus = {
   3: '实习'
 }
 
-// export const musicScoreCategoriesId = [
-//   ''
-// ]
+export const downListType = {
+  1:'订单列表',
+  2:'财务管理'
+}

+ 3 - 1
src/router/index.js

@@ -388,7 +388,9 @@ export const asyncRoutes = {
   // 服务指标明细
   serverDetail:()=>import('@/views/serverDetail'),
   // 未在班级学员
-  notClassStudent:()=>import('@/views/main/notClassStudent')
+  notClassStudent:()=>import('@/views/main/notClassStudent'),
+  // 报表中心 下载列表
+  downList:()=>import('@/views/reportForm/downList')
 }
 
 export default router

+ 1 - 0
src/router/notKeepAliveList.js

@@ -102,5 +102,6 @@ export default [
   '/business/ArrearageStudents',
   '/operateManager/serverDetail', // 服务指标明细
   '/business/remedy', //
+  '/downList', //下载列表
   // '/business/feeAudit',
 ]

+ 3 - 1
src/utils/searchArray.js

@@ -1,5 +1,5 @@
 // 搜索用的下拉数据列表
-import { payOrderType, auditType, auditPaymentType, orderServerType, orderAuditType, rewardModeType,classTime,musicClassType,ProbationPeriodStatus } from '../constant'
+import { payOrderType, auditType, auditPaymentType, orderServerType, orderAuditType, rewardModeType,classTime,musicClassType,ProbationPeriodStatus,downListType } from '../constant'
 // 课程类型
 export const courseType = [
   { label: "声部课", value: "SINGLE" },
@@ -223,6 +223,8 @@ export const orderAuditTypeList = getValueForKey(orderAuditType)
 export const rewardModeTypeList = getValueForKey(rewardModeType)
 export const musicClassTypeList =  getValueForKey(musicClassType)
 export const ProbationPeriodList = getValueForKey(ProbationPeriodStatus)
+export const downTypeList = getValueForKey(downListType)
+//downListType
 function getValueForKey (obj) {
   let arr = []
   for (let k in obj) {

+ 7 - 1
src/utils/vueFilter.js

@@ -74,7 +74,7 @@ Vue.filter('instrumentType', (value) => {
 })
 
 // 课程类型
-Vue.filter('coursesType', (value) => { 
+Vue.filter('coursesType', (value) => {
   let template = {
     NORMAL: '声部课',
     SINGLE: '声部课',
@@ -735,3 +735,9 @@ Vue.filter('gradeTypeFormat', value => {
 Vue.filter('ProbationPeriod', value => {
   return constant.ProbationPeriodStatus[value]
 })
+
+// 下载列表 类型
+// downListType
+Vue.filter('downListType', value => {
+  return constant.downListType[value]
+})

+ 13 - 0
src/views/reportForm/api.js

@@ -0,0 +1,13 @@
+import request from '@/utils/request'
+import request2 from '@/utils/request2'
+import qs from 'qs'
+let api = '/api-web'
+
+
+export function managerDownloadList(data) {
+  return request2({
+    url: api + '/managerDownload/queryPage',
+    method: 'get',
+    params: data
+  })
+}

+ 163 - 0
src/views/reportForm/downList.vue

@@ -0,0 +1,163 @@
+<!--  -->
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>
+      下载列表
+    </h2>
+    <div class="m-core">
+      <save-form :inline="true" :model="searchForm" @submit="search" @reset='onReSet'>
+        <el-form-item prop="type">
+          <!-- downTypeList -->
+           <el-form-item>
+          <el-select
+            v-model.trim="searchForm.type"
+            clearable
+            filterable
+            placeholder="文件搜索类型"
+          >
+            <el-option
+              v-for="(item, index) in downTypeList"
+              :key="index"
+              :value="item.value"
+              :label="item.label"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        </el-form-item>
+
+        <el-form-item>
+          <el-button native-type="submit" type="primary">搜索</el-button>
+          <el-button native-type="reset" type="danger">重置</el-button>
+        </el-form-item>
+      </save-form>
+      <div class="tableWrap">
+        <el-table
+          style="width: 100%"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+        >
+          <el-table-column
+            width="120"
+            align="center"
+            prop="id"
+            label="下载编号"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="name"
+            label="文件名"
+          ></el-table-column>
+          <el-table-column align="center" prop="type" label="文件类型">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.type |downListType }}
+              </div>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" prop="status" label="文件状态">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.status == 0 ? "生成中" : "已生成" }}
+              </div>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" prop=" createTime" label="生成时间">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.createTime | dateForMinFormat }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="fileUrl" label="下载地址" align="center">
+            <template slot-scope="scope">
+              <div>
+                <a
+                  :href="scope.row.fileUrl"
+                  target="view_window"
+                  style="color: #14928a"
+                  >点击下载</a
+                >
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          sync
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes="rules.page_size"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import axios from "axios";
+import { getToken } from "@/utils/auth";
+import pagination from "@/components/Pagination/index";
+import load from "@/utils/loading";
+import {downTypeList} from "@/utils/searchArray"
+import { managerDownloadList } from "./api";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      searchForm: {
+        order: null,
+        userId: null,
+      },
+      downTypeList,
+      tableList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    // 获取分部
+
+    this.init();
+  },
+  methods: {
+    init() {
+      this.getList();
+    },
+    async getList() {
+      try {
+        const res = await managerDownloadList({
+          ...this.searchForm,
+          page: this.rules.page,
+          rows: this.rules.limit,
+        });
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.searchForm.type = null;
+      this.search()
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+</style>