浏览代码

乐团详情

1
mo 4 年之前
父节点
当前提交
a6e9968002

+ 2 - 1
src/constant/index.js

@@ -262,7 +262,8 @@ export const clientType = {
 // ]
 export const downListType = {
   1:'订单列表',
-  2:'财务管理'
+  2:'财务管理',
+  3:'课表列表'
 }
 
 export const withdrawalStatus = {

+ 94 - 84
src/layout/components/Sidebar/index.vue

@@ -1,26 +1,30 @@
 <template>
-  <div :class="{'has-logo':showLogo}">
+  <div :class="{ 'has-logo': showLogo }">
     <!-- <logo v-if="showLogo"
           :collapse="false" /> -->
     <el-scrollbar wrap-class="scrollbar-wrapper">
       <!--    -->
-      <el-menu :default-active="activeMenu"
-               :collapse='false'
-                :background-color="variables.menuBg"
-               :text-color="variables.menuText"
-               :unique-opened="true"
-               :active-text-color="variables.menuActiveText2"
-               :collapse-transition="true"
-               mode="vertical">
+      <el-menu
+        :default-active="activeMenu"
+        :collapse="false"
+        :background-color="variables.menuBg"
+        :text-color="variables.menuText"
+        :unique-opened="true"
+        :active-text-color="variables.menuActiveText2"
+        :collapse-transition="true"
+        mode="vertical"
+      >
         <template v-for="route in permission_routes">
           <template v-if="!route.hidden">
             <!-- <sidebar-item  v-for="route2 in route.children" :key="route.path + '/' + route2.path" :item="route2" :base-path="route.path" :resolve-path="route.path" :active-top-menu="getTopMenuActive" /> -->
             <!-- <sidebar-menu-item v-for="route2 in route.children" :key="route.path + '/' + route2.path" :routes="route2" :base-path="route.path" :resolve-path="route.path" :active-top-menu="getTopMenuActive"/> -->
-            <sidebar-item v-for="(route2) in route.children"
-                      :key="route2.id"
-                      :item="route2"
-                      :active-top-menu="getTopMenuActive"
-                      :base-path="route2.path" />
+            <sidebar-item
+              v-for="route2 in route.children"
+              :key="route2.id"
+              :item="route2"
+              :active-top-menu="getTopMenuActive"
+              :base-path="route2.path"
+            />
           </template>
         </template>
         <!-- <sidebar-item v-for="(route,index) in permission_routes"
@@ -33,45 +37,45 @@
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import Logo from './Logo'
-import SidebarMenuItem from './SidebarMenuItem'
-import SidebarItem from './SidebarItem'
-import variables from '@/styles/variables.scss'
-import { getBelongTopMenuPath, getActiveSidebarMenuPath } from '@/utils/permission';
+import { mapGetters } from "vuex";
+import Logo from "./Logo";
+import SidebarMenuItem from "./SidebarMenuItem";
+import SidebarItem from "./SidebarItem";
+import variables from "@/styles/variables.scss";
+import {
+  getBelongTopMenuPath,
+  getActiveSidebarMenuPath,
+} from "@/utils/permission";
 export default {
   components: { SidebarItem, Logo, SidebarMenuItem },
   // mounted () {
   // },
   computed: {
-    ...mapGetters([
-      'sidebar',
-      'permission_routes'
-    ]),
+    ...mapGetters(["sidebar", "permission_routes"]),
     // routes () {
     //   return this.$router.options.routes
     // },
-    activeMenu () {
-      const route = this.$route
-      const { meta, path } = route
+    activeMenu() {
+      const route = this.$route;
+      const { meta, path } = route;
       // if set path, the sidebar will highlight the path you set
       // 设置高亮的位置
       if (meta.activeMenu) {
-        return meta.activeMenu
+        return meta.activeMenu;
       }
       // console.log(meta, path)
-      return path
+      return path;
     },
-    showLogo () {
-      return this.$store.state.settings.sidebarLogo
+    showLogo() {
+      return this.$store.state.settings.sidebarLogo;
     },
-    variables () {
-      return variables
+    variables() {
+      return variables;
     },
-    isCollapse () {
-      return false
+    isCollapse() {
+      return false;
     },
-    getSidebarMenuActive: function() {
+    getSidebarMenuActive: function () {
       const route = this.$route;
       return getActiveSidebarMenuPath(route);
     },
@@ -79,59 +83,63 @@ export default {
       let route = this.$route;
       // console.log(getBelongTopMenuPath(route))
       return getBelongTopMenuPath(route);
-    }
+    },
   },
   mounted() {
     // console.log(this.permission_routes)
-    this.menuIsShow(this.$route)
+    this.menuIsShow(this.$route);
   },
   watch: {
     $route() {
-      this.menuIsShow(this.$route)
-    }
+      this.menuIsShow(this.$route);
+    },
   },
   methods: {
     menuIsShow(route) {
-      let activeTopMenu
+      let activeTopMenu;
       const { meta } = route;
       if (meta.belongTopMenu) {
-          activeTopMenu = meta.belongTopMenu;
+        activeTopMenu = meta.belongTopMenu;
       }
-      let permissions = this.permission_routes || []
-      let childList = []
-      permissions.forEach(item => {
-        if(item.path == activeTopMenu) {
-          childList = item
+      let permissions = this.permission_routes || [];
+      let childList = [];
+      permissions.forEach((item) => {
+        if (item.path == activeTopMenu) {
+          childList = item;
         }
       });
-      let index = this.menuOperation(childList.children)
-      let status = index > 1 ? true : false
-      let routeParentName = sessionStorage.getItem('routeParentName')
+      let index = this.menuOperation(childList.children);
+      let status = index > 1 ? true : false;
+      let routeParentName = sessionStorage.getItem("routeParentName");
       let params = {
-        status: status
+        status: status,
+      };
+      if (routeParentName != meta.belongTopMenu) {
+        params.isCollapse = true;
+        sessionStorage.setItem("routeParentName", meta.belongTopMenu);
       }
-      if(routeParentName != meta.belongTopMenu) {
-        params.isCollapse = true
-        sessionStorage.setItem('routeParentName', meta.belongTopMenu)
-      }
-      this.$emit('childStatus', params)
+      this.$emit("childStatus", params);
     },
     menuOperation(arr) {
+      // console.log(arr);
       let index = 0;
-      for(let i = 0; i < arr.length; i++) {
-        if(arr[i].hidden) {
-          continue
-        }
-        if(arr[i].children && arr[i].children.length > 0) {
-          index += this.menuOperation(arr[i].children)
-        } else {
-          index++
+      if (arr?.length > 0) {
+        for (let i = 0; i < arr.length; i++) {
+          if (arr[i].hidden) {
+            continue;
+          }
+          if (arr[i].children && arr[i].children.length > 0) {
+            index += this.menuOperation(arr[i].children);
+          } else {
+            index++;
+          }
         }
       }
-      return index
-    }
-  }
-}
+
+      return index;
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
 .el-menu-item {
@@ -140,25 +148,26 @@ export default {
   }
 }
 
-/deep/.el-submenu__title, /deep/.el-menu-item {
+/deep/.el-submenu__title,
+/deep/.el-menu-item {
   font-size: 14px;
 }
 
 /deep/.el-menu-item.is-active {
-    font-weight: bold;
-    background-color: #EEF4F4 !important;
-    color: #14928a !important;
-    position: relative;
-    &::after{
-      position: absolute;
-      top: 0;
-      right: 0;
-      content: ' ';
-      width: 6px;
-      background-color: #14928a;
-      display: block;
-      height: 100%;
-    }
+  font-weight: bold;
+  background-color: #eef4f4 !important;
+  color: #14928a !important;
+  position: relative;
+  &::after {
+    position: absolute;
+    top: 0;
+    right: 0;
+    content: " ";
+    width: 6px;
+    background-color: #14928a;
+    display: block;
+    height: 100%;
+  }
 }
 /deep/.el-submenu .el-menu-item.is-active {
   color: #14928a !important;
@@ -166,7 +175,8 @@ export default {
 /deep/.el-menu .menu-wrapper .el-menu-item {
   color: #666666;
 }
-/deep/.el-menu-item, /deep/.el-submenu__title {
+/deep/.el-menu-item,
+/deep/.el-submenu__title {
   height: 60px !important;
   line-height: 60px !important;
 }

+ 11 - 23
src/router/index.js

@@ -31,21 +31,22 @@ import Layout from '@/layout'
  * all roles can be accessed
  */
 export const constantRoutes = [
+  // {
+  //   path: '/main',
+  //   name: '首页',
+  //   component: Layout,
+  //   hidden: true,
+  //   meta: {
+  //     noCache: '1',
+  //     title: '首页'
+  //   },
+  //   children:
+  // },
   {
     path: '/setSilder', // 侧边栏
     component: Layout,
     hidden: true,
     children: [
-    //   {
-    //   name: '侧边栏',
-    //   path: 'setSilder',
-    //   component: () => import('@/views/setSilder/addSilder'),
-    //   hidden: true,
-    //   meta: {
-    //     noCache: '1',
-    //     title: '侧边栏'
-    //   }
-    // },
     {
       name: '提交表单',
       path: 'save-form',
@@ -79,19 +80,6 @@ export const constantRoutes = [
     component: () => import('@/views/403'),
     hidden: true
   },
-  // {
-  //   path: '/sporadicManager',
-  //   component: Layout,
-  //   hidden: false,
-  //   children: [
-  //     {
-  //       name: '零星收费',
-  //       path: 'sporadicList',
-  //       component: () => import('@/views/setSilder/addSilder'),
-  //       hidden: false,
-  //     }
-  //   ]
-  // },
   // { path: '*', redirect: '/404', hidden: true }
 ]
 // export const constantRoutes = [{

+ 67 - 1
src/store/modules/permission.js

@@ -13,7 +13,6 @@ function generateAsyncRouter (asyncRoutes, data) {
   if (!data) {
     return []
   }
-  // console.log(data)
   data.forEach((item) => {
     item.component = asyncRoutes[item.component]
     if (item.children && item.children.length > 0) {
@@ -157,6 +156,71 @@ function recursionPermission (arr) {
     }
   })
 }
+function  setDetailRoute(accessedRoutes){
+  accessedRoutes.forEach(route=>{
+    console.log(route.path)
+    if(route.path == '/main'){
+      route.children= route.children.concat( [
+        {
+          name: '日程安排',
+          path: 'scheduleDetail',
+          component: () => import('@/views/main/teamSchedule/scheduleDetail'),
+          hidden: true,
+          meta: {
+            noCache: '1',
+            title: '日程安排',
+            belongTopMenu: "/main",
+            activeMenu:'/main/main'
+          }
+        },
+        {
+          name: '未在班级学员',
+          path: 'notClassStudent',
+          component: () => import('@/views/main/notClassStudent'),
+          hidden: true,
+          meta: {
+            noCache: '1',
+            title: '未在班级学员',
+            belongTopMenu: "/main",
+            activeMenu:'/main/main'
+          }
+        },
+        //
+      ])
+    }
+    if(route.path == '/business'){
+      // import('@/views/resetTeaming/components/strudentPayInfo'),
+      route.children= route.children.concat( [
+        {
+          name: '学员缴费详情',
+          path: 'strudentPayInfo',
+          component: () => import('@/views/resetTeaming/components/strudentPayInfo'),
+          hidden: true,
+          meta: {
+            noCache: '1',
+            title: '学员缴费详情',
+            belongTopMenu: "/business",
+            activeMenu:'/teamList'
+          }
+        },
+        {
+          name: '乐团详情',
+          path: 'resetTeaming',
+          component: () => import('@/views/resetTeaming/index'),
+          hidden: true,
+          meta: {
+            noCache: '1',
+            title: '乐团详情',
+            belongTopMenu: "/business",
+            activeMenu:'/teamList'
+          }
+        },
+
+      ])
+    }
+  })
+  return accessedRoutes
+}
 const actions = {
   generateRoutes ({ commit }) {
     return new Promise(resolve => {
@@ -172,6 +236,7 @@ const actions = {
 
           // 生成异步路由表
           accessedRoutes = generateAsyncRouter(asyncRoutes, newData)
+          accessedRoutes = setDetailRoute(accessedRoutes)
           console.log('生成出来的异步路由',accessedRoutes)
           // var result = accessedRoutes.concat({ path: '*', redirect: '/404', hidden: true })
           commit('SET_ROUTES', accessedRoutes)
@@ -189,6 +254,7 @@ const actions = {
     commit('SET_PERMISSION', [])
 
   }
+
 }
 
 export default {

+ 2 - 2
src/views/main/notClassStudent.vue

@@ -155,13 +155,13 @@ export default {
                 this.tableList = res.data.rows;
                 this.rules.total = res.data.total;
             } catch (err) {
-                // 
+                //
             }
         },
         showDetail(item) {
             // ?status=PROGRESS&id=21040114171500001&name=0401莫莫2&organId=1&type=resetTeam&team_status=PROGRESS&tabrouter=5
             this.$router.push({
-                path: '/resetTeaming',
+                path: '/business/resetTeaming',
                 query: {
                     type: 'resetTeam',
                     status: 'PROGRESS',

+ 1 - 1
src/views/resetTeaming/components/resetPayList.vue

@@ -695,7 +695,7 @@ export default {
       if (row.payUserType === "SCHOOL") {
         this.reviewVisible = true;
       } else {
-        this.$router.push({ path: "/strudentPayInfo", query });
+        this.$router.push({ path: "/business/strudentPayInfo", query });
         // this.$router.push({ path: "/teamPayInfo/strudentPayInfo", query });
       }
     },

+ 3 - 3
src/views/resetTeaming/components/strudentPayInfo.vue

@@ -613,19 +613,19 @@ export default {
       if (query.type == "resetTeam") {
         this.$store.dispatch("delVisitedViews", this.$route);
         this.$router.push({
-          path: "/resetTeaming",
+          path: "/business/resetTeaming",
           query: { ...this.$route.query },
         });
       } else if (query.type == "look") {
         this.$store.dispatch("delVisitedViews", this.$route);
         this.$router.push({
-          path: "/resetTeaming",
+          path: "/business/resetTeaming",
           query: { ...this.$route.query },
         });
       }else if(query.type == 'PRE_BUILD_FEE'){
              this.$store.dispatch("delVisitedViews", this.$route);
         this.$router.push({
-          path: "/resetTeaming",
+          path: "/business/resetTeaming",
           query: { ...this.$route.query },
         });
       }

+ 15 - 15
src/views/teamDetail/teamList.vue

@@ -478,7 +478,7 @@ export default {
       // this.$store.dispatch("delVisitedViews", { path: "/business/teamBuild" });
        localStorage.removeItem(`newTeambase`);
     this.$router.push({
-            path: "/resetTeaming",
+            path: "/business/resetTeaming",
               query: { type: "newTeam"}},
             (router) => {
               router.meta.title = "新建乐团";
@@ -503,7 +503,7 @@ export default {
       localStorage.removeItem(`${row.id}sound`);
       this.$nextTick((res) => {
         this.$router.push({
-          path: "/resetTeaming",
+          path: "/business/resetTeaming",
           query: { type: "resetTeam", id: row.id },
         });
       });
@@ -637,7 +637,7 @@ export default {
           //   }
           // );
           this.$router.push({
-            path: "/resetTeaming",
+            path: "/business/resetTeaming",
               query: { type: "teamDraft", id: row.id,team_status:row.status }},
             (router) => {
               router.meta.title = "乐团编辑中";
@@ -651,7 +651,7 @@ export default {
           this.$store.dispatch("draftIndex", 0);
           this.$router.push(
             {
-              path: "/resetTeaming",
+              path: "/business/resetTeaming",
               query: { type: "teamAudit", id: row.id, clear: "true",team_status:row.status },
             },
             (router) => {
@@ -667,7 +667,7 @@ export default {
           //   query: { type: "PRE_BUILD_FEE", id: row.id, name: row.name },
           // });
           this.$router.push({
-            path: "/resetTeaming",
+            path: "/business/resetTeaming",
             query: {
               type: "look",
               id: row.id,
@@ -686,7 +686,7 @@ export default {
           this.$store.dispatch("draftIndex", 0);
           this.$router.push(
             {
-              path: "/resetTeaming",
+              path: "/business/resetTeaming",
               query: { type: "feeAudit", id: row.id, clear: "true",team_status:row.status },
             },
             (router) => {
@@ -700,7 +700,7 @@ export default {
           this.$store.dispatch("draftIndex", 0);
           this.$router.push(
             {
-              path: "/resetTeaming",
+              path: "/business/resetTeaming",
               query: { type: "teamDraft", id: row.id, clear: "true",team_status:row.status },
             },
             (router) => {
@@ -713,7 +713,7 @@ export default {
           // 预报名
 
           this.$router.push({
-            path: "/resetTeaming",
+            path: "/business/resetTeaming",
             query: {
               type: "look",
               id: row.id,
@@ -734,7 +734,7 @@ export default {
           // 报名中
           this.$router.push(
             {
-              path: `/resetTeaming`,
+              path: `/business/resetTeaming`,
               query: {
                 status: row.status,
                 id: row.id,
@@ -754,7 +754,7 @@ export default {
           // 缴费中
           this.$router.push(
             {
-              path: `/resetTeaming`,
+              path: `/business/resetTeaming`,
               query: {
                 status: row.status,
                 id: row.id,
@@ -773,7 +773,7 @@ export default {
         case "PREPARE": {
           // 筹备中 跳转到乐团设置界面
           this.$router.push({
-            path: `/resetTeaming`,
+            path: `/business/resetTeaming`,
             query: {  type:'look',status: row.status, id: row.id, name: row.name,team_status:row.status,tabrouter:10 },
           },
            (router) => {
@@ -785,7 +785,7 @@ export default {
           // 进行中
           // 调到乐团详情 teamDetails
           this.$router.push({
-            path: `/resetTeaming`,
+            path: `/business/resetTeaming`,
             query: {
               status: row.status,
               id: row.id,
@@ -804,7 +804,7 @@ export default {
           // 取消
           this.$router.push(
             {
-              path: "/resetTeaming",
+              path: "/business/resetTeaming",
               query: { type: "teamCanceled", id: row.id ,team_status:row.status},
             },
             (router) => {
@@ -820,7 +820,7 @@ export default {
           //   query: { status: row.status, id: row.id, name: row.name },
           // });
           this.$router.push({
-            path: "/resetTeaming",
+            path: "/business/resetTeaming",
             query: { type: "resetTeam", id: row.id,team_status:row.status },
           },
           (router) => {
@@ -831,7 +831,7 @@ export default {
         }case "CLOSE":{
           this.$router.push(
             {
-              path: `/resetTeaming`,
+              path: `/business/resetTeaming`,
               query: {
                 status: row.status,
                 id: row.id,

+ 1 - 1
src/views/workBenchManager/payAppeal.vue

@@ -30,7 +30,7 @@ export default {
   components: {progressRequest},
   data() {
     return {
-      activeIndex:1
+      activeIndex:'1'
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)