Browse Source

首页配置修改

wolyshaw 4 years ago
parent
commit
abe1888834

+ 12 - 5
src/views/main/constant.js

@@ -33,7 +33,7 @@ export const errorType = {
   MUSIC_PATROL_ITEM: {
     name: '乐团巡查事项异常',
     isError: false,
-    url: '/main/main',
+    url: '/business/musicInspection',
     always: true,
     query: {
       tabrouter: 'teamSchedule',
@@ -43,8 +43,12 @@ export const errorType = {
   HIGH_CLASS_STUDENT_LESS_THAN_THREE: {
     name: '基础技能班学员数量异常',
     isError: true,
-    url: '/business/teamDetail',
-    resultKey: 'search',
+    url: '/business/teamCLassList',
+    always: true,
+    query: {
+      lessThenThreeHighOnline: '1',
+      type: 'HIGH_ONLINE',
+    },
   },
   STUDENT_NOT_PAYMENT: {
     name: '学员未缴费',
@@ -56,7 +60,10 @@ export const errorType = {
     name: '学员退团申请',
     isError: true,
     url: '/business/WithdrawalApplication',
-    resultKey: 'ids',
+    always: true,
+    query: {
+      visitFlag: '0',
+    },
   },
   WAIT_CREATE_PAYMENT_CALENDER: {
     name: '待创建缴费项目',
@@ -144,7 +151,7 @@ export const errorType = {
   INSPECTION_ITEM_PLAN: {
     name: '乐团巡查任务未提交',
     isError: true,
-    url: '/main/main',
+    url: '/business/musicInspection',
     always: true,
     query: {
       tabrouter: 'teamSchedule',

+ 3 - 3
src/views/musicInspection/index.vue

@@ -3,7 +3,7 @@
     <div class="m-container">
         <h2>
             <div class="squrt"></div>乐团巡查
-            <filter-search @reload="getList" searchKey="ids" />
+            <filter-search @reload="getList" :keys="['searchType']" />
         </h2>
         <div class="m-core">
             <save-form :inline="true" ref="searchForm" @submit="search" @reset="onReSet" :model="searchForm">
@@ -270,7 +270,7 @@ export default {
             try {
                 let { createTimer, ...rest } = this.searchForm
                 let params = {
-                    ids: this.$route.query.ids,
+                    searchType: this.$route.query.searchType,
                     ...rest,
                     page: this.pageInfo.page,
                     rows: this.pageInfo.limit,
@@ -362,4 +362,4 @@ export default {
 /deep/.description-title {
     margin: 0 !important;
 }
-</style>
+</style>

+ 34 - 5
src/views/teamDetail/teamClassList.vue

@@ -3,7 +3,7 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      班级列表
+      班级列表 <filter-search :keys="['lessThenThreeHighOnline']" @reload="getList"/>
     </h2>
     <div class="m-core">
       <save-form
@@ -56,7 +56,13 @@
         </el-form-item>
         <!-- musicClassTypeList -->
         <el-form-item prop="type">
-          <el-select v-model.trim="searchForm.type" filterable  clearable :disabled='searchForm.groupType!="MUSIC"'>
+          <el-select
+            v-model.trim="searchForm.type"
+            filterable
+            clearable
+            :disabled='searchForm.groupType!="MUSIC"'
+            placeholder="班级类型"
+          >
             <el-option
               v-for="(item, index) in musicClassTypeList"
               :key="index"
@@ -146,7 +152,7 @@
               <div>{{ scope.row.totalClassTimes }}</div>
             </template>
           </el-table-column>
-          <el-table-column align="center" label="操作">
+          <el-table-column fixed="right" width="160px" align="center" label="操作">
             <!--    -->
             <template slot-scope="scope">
               <el-button
@@ -169,6 +175,16 @@
                 @click="cancleCompound(scope.row)"
                 >取消合班</el-button
               >
+              <el-button
+                type="text"
+                v-if="
+                  scope.row.groupType === 'MUSIC' &&
+                  (scope.row.studentNum == '0' ||
+                  scope.row.totalClassTimes == '0')
+                "
+                  @click="removeClass(scope)"
+                >删除</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
@@ -199,7 +215,7 @@ import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { courseListType } from "@/utils/searchArray";
 import { musicClassTypeList } from "@/utils/searchArray";
-import { getClassGroupPage } from "@/api/buildTeam";
+import { getClassGroupPage, removeSingleClass } from "@/api/buildTeam";
 import { permission } from "@/utils/directivePage";
 import classCompound from "./componentClass/classCompound";
 export default {
@@ -231,6 +247,9 @@ export default {
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
+    if (this.$route.query.type) {
+      this.searchForm.type = this.$route.query.type
+    }
     // 获取分部
     this.$store.dispatch("setBranchs");
     this.init();
@@ -242,9 +261,9 @@ export default {
     async getList() {
       try {
         let { organIdList, ...result } = this.searchForm;
-        console.log(result);
         let obj = {
           ...result,
+          lessThenThreeHighOnline: this.$route.query.lessThenThreeHighOnline,
           organIdList: this.searchForm.organIdList.join(","),
           page: this.rules.page,
           rows: this.rules.limit,
@@ -265,6 +284,16 @@ export default {
       this.searchForm.groupType = 'MUSIC'
       this.search();
     },
+    async removeClass(scope) {
+      try {
+        await this.$confirm('是否确定删除该班级?', '提示', {
+          type: 'warning'
+        })
+        await removeSingleClass({ classGroupId: scope.row.id })
+        this.$message.success('删除成功')
+        this.getList()
+      } catch (error) {}
+    },
     addCompound(row) {
       //  scope.row.type != 'HIGH_ONLINE' &&scope.row.type != 'HIGH'&&
       this.hightOnlineCount = 0;

+ 2 - 2
src/views/withdrawal-application/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="m-container">
     <h2>
-      <div class="squrt"></div>退团申请列表 <filter-search @reload="FetchList" searchKey="ids"/>
+      <div class="squrt"></div>退团申请列表 <filter-search @reload="FetchList" :keys="['visitFlag']"/>
     </h2>
     <div class="m-core">
       <save-form
@@ -180,7 +180,7 @@ export default {
         const res = await musicGroupQuitQeryPage({
           page: this.rules.page,
           rows: this.rules.limit,
-          ids: this.$route.query.ids,
+          visitFlag: this.$route.query.visitFlag,
           ...this.searchForm,
         })
         this.rules.total = res.data.total;