Browse Source

12/30 进行中乐团修改优化一半

mo 4 years ago
parent
commit
24e493faba

+ 1 - 0
debug.log

@@ -8,3 +8,4 @@
 [1223/094343.219:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
 [1224/093236.399:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
 [1225/094724.194:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
+[1230/094024.562:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)

+ 45 - 35
src/components/tab-router/index.vue

@@ -1,74 +1,84 @@
 <template>
-  <el-tabs :value="active" v-bind="{...$attrs}" v-on="{...$listeners, 'tab-click': tab}">
-    <slot/>
+  <el-tabs
+    :value="active"
+    v-bind="{ ...$attrs }"
+    v-on="{ ...$listeners, 'tab-click': tab }"
+  >
+    <slot />
   </el-tabs>
 </template>
 <script>
-import qs from 'qs'
+import qs from "qs";
+import merge from 'webpack-merge'
 export default {
-  name: 'tab-router',
+  name: "tab-router",
   props: {
     searchKey: {
       type: String,
-      default: 'tabrouter'
+      default: "tabrouter",
     },
     lazy: {
       type: Boolean,
-      defaule: true
+      defaule: true,
     },
     value: {
       type: String,
-      default: ''
-    }
+      default: "",
+    },
   },
   data() {
     return {
-      active: '',
+      active: "",
       panels: [],
-      panelsByName: {}
-    }
+      panelsByName: {},
+    };
   },
   methods: {
     getAllPanel() {
-      const data = {}
-      const routes = []
-      this.panels = this.$slots.default.filter(item => {
-        const isPanel = item.tag && item.tag.indexOf('ElTabPane') > -1
+      const data = {};
+      const routes = [];
+      this.panels = this.$slots.default.filter((item) => {
+        const isPanel = item.tag && item.tag.indexOf("ElTabPane") > -1;
         if (isPanel && item.child) {
-          data[item.child.name] = item.child
+          data[item.child.name] = item.child;
         }
-        return isPanel
-      })
-      const search = qs.parse(location.hash.split('?')[1])
+        return isPanel;
+      });
+      const search = qs.parse(location.hash.split("?")[1]);
       if (this.panels.length) {
         this.$nextTick(() => {
-          this.active= search[this.searchKey] || this.panels[0].child?.name
-        })
+          this.active = search[this.searchKey] || this.panels[0].child?.name;
+        });
       }
-      this.panelsByName = data
+      this.panelsByName = data;
     },
     tab(item, evt) {
-      const { query } = this.$route
+      let { query } = this.$route;
       const search = qs.stringify({
         ...query,
-        [this.searchKey]: item.name
-      })
-      this.active = item.name
-      history.replaceState(location.pathname, null, `#${this.$route.path}?${search}`)
-      const parentClick = this.$listeners['tab-click']
+        [this.searchKey]: item.name,
+      });
+      this.active = item.name;
+      this.$router.replace({
+        query: merge(this.$route.query, {
+            ...query,
+          [this.searchKey]: item.name,
+        }),
+      });
+      this.$store.dispatch("addVisitedViews",  this.$route);
+      const parentClick = this.$listeners["tab-click"];
       if (parentClick) {
-        parentClick(item, evt)
+        parentClick(item, evt);
       }
-    }
+    },
   },
   beforeUpdate() {
-    this.getAllPanel()
+    this.getAllPanel();
   },
   mounted() {
-    this.getAllPanel()
-  }
-}
+    this.getAllPanel();
+  },
+};
 </script>
 <style lang="less" scoped>
-
 </style>

+ 3 - 0
src/router/notKeepAliveList.js

@@ -72,4 +72,7 @@ export default [
   '/orderList/businessStatement', // 经营报表
   '/orderList/resetList', // 更换列表
   '/orderList/incomeOut', // 对外订单管理
+  '/business/signupList', // 报名缴费
+  '/business/teamDetails', //进行中 查看
+  '/business/teamLookBase', // 筹备中 乐团信息
 ]

+ 2 - 2
src/store/modules/tagsView.js

@@ -82,7 +82,7 @@ const tagsView = {
     delOthersViews ({ commit, state }, view) {
       return new Promise((resolve) => {
         commit('DEL_OTHERS_VIEWS', view)
-        resolve([...state.visitedViews]) 
+        resolve([...state.visitedViews])
       })
     },
     delAllViews ({ commit, state }) {
@@ -94,4 +94,4 @@ const tagsView = {
   }
 }
 
-export default tagsView
+export default tagsView

+ 7 - 2
src/views/resetTeaming/index.vue

@@ -7,10 +7,11 @@
     </h2>
     <div class="m-core">
       <!-- navMenu -->
-      <el-tabs v-model.trim="activeIndex"
+      <tab-router v-model.trim="activeIndex"
                type="card"
                @tab-click="handleClick">
         <el-tab-pane label="基本信息"
+        lazy
                      v-if="permission('/resetTeaming/teamBaseInfo')"
                      name="1">
           <teamBaseInfo v-if="activeIndex == 1"
@@ -19,6 +20,7 @@
                         @getName='getName' />
         </el-tab-pane>
         <el-tab-pane label="声部设置"
+        lazy
                      v-if="permission('/resetTeaming/resetSound')"
                      name="2">
           <resetSound v-if="activeIndex == 2" />
@@ -29,6 +31,7 @@
           <studentPayBase v-if="activeIndex == 4" />
         </el-tab-pane> -->
         <el-tab-pane label="学员缴费设置"
+        lazy
                      v-if="permission('/resetTeaming/resetPayList')"
                      name="3">
           <resetPayList :baseInfo="baseInfo"
@@ -36,6 +39,7 @@
                         @changeActive="handleClick" />
         </el-tab-pane>
         <el-tab-pane label="学校缴费设置"
+        lazy
                      v-if="permission('/resetTeaming/resetPayList')"
                      name="6">
           <resetPayListSchool :baseInfo="baseInfo"
@@ -44,6 +48,7 @@
         </el-tab-pane>
 
         <el-tab-pane label="班级调整"
+        lazy
                      v-if="permission('/resetTeaming/resetClass')"
                      name="5">
           <resetClass v-if="activeIndex == 5"  :musicGroupInfo='musicGroupInfo'/>
@@ -59,7 +64,7 @@
           <improvement :teamid='teamid' />
         </el-tab-pane> 1-->
         <!-- 啦啦啦 -->
-      </el-tabs>
+      </tab-router>
     </div>
   </div>
 </template>

File diff suppressed because it is too large
+ 453 - 393
src/views/teamBuild/signupList.vue


+ 2 - 2
src/views/teamDetail/index.vue

@@ -16,7 +16,7 @@
              alt="">
         {{ status=='PROGRESS'?'进行中':'已结束' }}</p>
       <!-- navMenu -->
-      <el-tabs v-model.trim="activeIndex"
+      <tab-router v-model.trim="activeIndex"
                type="card"
                @tab-click="handleClick">
         <el-tab-pane label="基本信息"
@@ -64,7 +64,7 @@
           <salaryList v-if="activeIndex == '7'"
                       :teamid='teamid' />
         </el-tab-pane> -->
-      </el-tabs>
+      </tab-router>
 
     </div>
   </div>

+ 7 - 6
src/views/teamDetail/teamInfo.vue

@@ -11,28 +11,29 @@
              alt="">
         {{ status=='PROGRESS'?'进行中':'已结束' }}</p> -->
       <!-- navMenu -->
-      <el-tabs v-model.trim="activeIndex"
+      <tab-router v-model.trim="activeIndex"
                type="card"
                @tab-click="handleClick">
-        <el-tab-pane label="基本信息"
+        <el-tab-pane lazy label="基本信息"
+
                      name="1">
           <baseInfo v-if="activeIndex == '1'"
                     :teamid='teamid' />
         </el-tab-pane>
-        <el-tab-pane label="声部信息"
+        <el-tab-pane lazy label="声部信息"
                      name="2">
           <soundeDetail v-if="activeIndex == '2'"
                         :teamid='teamid' />
         </el-tab-pane>
-        <el-tab-pane label="学员缴费信息"
+        <el-tab-pane lazy label="学员缴费信息"
                      name="3">
           <resetPayList v-if="activeIndex == '3'" />
         </el-tab-pane>
-        <el-tab-pane label="学校缴费信息"
+        <el-tab-pane lazy label="学校缴费信息"
                      name="4">
           <resetPayListSchool v-if="activeIndex == '4'" />
         </el-tab-pane>
-      </el-tabs>
+      </tab-router>
     </div>
   </div>
 </template>

Some files were not shown because too many files changed in this diff