mo 4 anni fa
parent
commit
895337ed19

+ 45 - 32
src/layout/components/TagsView.vue

@@ -10,7 +10,12 @@
         :key="index"
         @contextmenu.prevent.native="openMenu(tag, $event)"
       >
-        <span :title="generateTitle(tag.title)" class="item" @click="changeTag(tag)">{{ generateTitle(tag.title) }}</span>
+        <span
+          :title="generateTitle(tag.title)"
+          class="item"
+          @click="changeTag(tag)"
+          >{{ generateTitle(tag.title) }}</span
+        >
         <!-- v-if="index == Array.from(visitedViews).length -1" -->
         <span
           class="el-icon-close icon"
@@ -35,7 +40,7 @@
 import ScrollPane from "@/components/ScrollPane";
 import { generateTitle } from "@/utils/i18n";
 import { Searchs } from "@/helpers";
-let activeKey = ''
+let activeKey = "";
 export default {
   name: "TagsView",
   components: { ScrollPane },
@@ -61,22 +66,22 @@ export default {
       this.addViewTags();
       this.moveToCurrentTag();
       if (!activeKey && !this.$store.state.tagsView.isBack) {
-        const s = new Searchs()
-        const keys = [this.$route.path]
+        const s = new Searchs();
+        const keys = [this.$route.path];
         for (const key in s.searchs) {
           if (Object.hasOwnProperty.call(s.searchs, key)) {
             const item = s.searchs[key];
             if (item.bind === this.$route.path) {
-              keys.push(key)
+              keys.push(key);
             }
           }
         }
         for (const item of keys) {
-          s.removeByKey(item)
+          s.removeByKey(item);
         }
       }
-      this.$store.commit('SET_IS_BACK', false)
-      activeKey = ''
+      this.$store.commit("SET_IS_BACK", false);
+      activeKey = "";
     },
     visible(value) {
       if (value) {
@@ -109,16 +114,20 @@ export default {
       const searchs = new Searchs();
       const allSearch = searchs.getSearchs();
       const sks = Object.keys(allSearch);
-      let route = this.$route
+      let route = this.$route;
       for (const item of sks) {
         if (!(keys.includes(item) || keys.includes(allSearch[item].bind))) {
           searchs.removeByKey(item);
         }
 
-        let tempSaveKeyList = item.split('|')
+        let tempSaveKeyList = item.split("|");
         // 大于1说明的特殊标识编号
-        if(tempSaveKeyList.length > 1) {
-          if(allSearch[item] && route.path == allSearch[item].bind && route.query[tempSaveKeyList[1]] != tempSaveKeyList[2]) {
+        if (tempSaveKeyList.length > 1) {
+          if (
+            allSearch[item] &&
+            route.path == allSearch[item].bind &&
+            route.query[tempSaveKeyList[1]] != tempSaveKeyList[2]
+          ) {
             searchs.removeByKey(item);
           }
         }
@@ -139,26 +148,31 @@ export default {
         for (const tag of tags) {
           if (tag.path === this.$route.path) {
             this.$refs.scrollPane.moveToTarget(tag.$el);
+            // const searchs = new Searchs();
+            // const allSearch = searchs.getSearchs();
+            // console.log(allSearch)
             break;
           }
         }
       });
     },
     closeSelectedTag(view) {
-        activeKey = '1'
+      activeKey = "1";
 
       const searchs = new Searchs();
       searchs.remove(this.$route.path);
-      this.$store.dispatch("delVisitedViews", {...view, dontNeedSave: true}).then((views) => {
-        if (this.isActive(view)) {
-          const latestView = views.slice(-1)[0];
-          if (latestView) {
-            this.$router.push(latestView.fullPath);
-          } else {
-            this.$router.push("/");
+      this.$store
+        .dispatch("delVisitedViews", { ...view, dontNeedSave: true })
+        .then((views) => {
+          if (this.isActive(view)) {
+            const latestView = views.slice(-1)[0];
+            if (latestView) {
+              this.$router.push(latestView.fullPath);
+            } else {
+              this.$router.push("/");
+            }
           }
-        }
-      });
+        });
     },
     closeOthersTags() {
       this.$router.push(this.selectedTag.path);
@@ -180,25 +194,24 @@ export default {
       this.visible = false;
     },
     changeTag(tag) {
-      console.log(tag)
-      activeKey = this.getSearchsByRealPath(tag)
-
+      console.log(tag);
+      activeKey = this.getSearchsByRealPath(tag);
     },
     getSearchsByRealPath(tag) {
-      const searchs = new Searchs()
-      let keyName = ''
+      const searchs = new Searchs();
+      let keyName = "";
 
-      console.log( searchs.searchs)
+      console.log(searchs.searchs);
       for (const key in searchs.searchs) {
         if (Object.hasOwnProperty.call(searchs.searchs, key)) {
           const item = searchs.searchs[key];
           if (tag.path === key || item.bind === tag.path) {
-            keyName = item.bind || tag.path
+            keyName = item.bind || tag.path;
           }
         }
       }
       // this.activeKey = keyName
-      return keyName
+      return keyName;
     },
     async refresh(view) {
       await this.reloads();
@@ -246,7 +259,7 @@ export default {
         z-index: 2;
 
         &::before {
-           border-right: 0;
+          border-right: 0;
         }
       }
       &::before {
@@ -285,7 +298,7 @@ export default {
 //reset element css of el-icon-close
 .tags-view-wrapper {
   .tags-view-item {
-    .item{
+    .item {
       flex: 1;
       text-overflow: ellipsis;
       overflow: hidden;

+ 2 - 1
src/store/getters.js

@@ -13,6 +13,7 @@ const getters = {
   payList: state => state.buildTeam.payList,
   phone: state => state.user.phone,
   newStudentinfo: state => state.buildTeam.newStudentList,
-  reactClassStudentList:state=>state.reactClassStudent.classList 
+  reactClassStudentList:state=>state.reactClassStudent.classList ,
+  buildIndex:state=>state.buildTeam.buildIndex
 }
 export default getters

+ 10 - 3
src/store/modules/buildTeam.js

@@ -2,7 +2,8 @@ const state = {
   topinfo: {},
   checkinfo: {},
   payList: {},
-  newStudentList: {}
+  newStudentList: {},
+  buildIndex:''
 }
 
 const mutations = {
@@ -17,7 +18,11 @@ const mutations = {
   },
   SET_NEW_STUDENT (state, newStudentList) {
     state.newStudentList = newStudentList
+  },
+  SET_BUILD_INDEX(state,buildIndex){
+    state.buildIndex = buildIndex
   }
+
 }
 const actions = {
   topinfo ({ commit }, topinfo) {
@@ -30,12 +35,14 @@ const actions = {
     commit('SET_PAY', payList)
   },
   newStudentinfo ({ commit }, newStudentList) {
-
     commit('SET_NEW_STUDENT', newStudentList)
+  },
+  buildIndex({commit},buildIndex){
+    commit('SET_BUILD_INDEX', buildIndex)
   }
 }
 export default {
   state,
   mutations,
   actions
-}
+}

+ 0 - 1
src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

@@ -126,7 +126,6 @@ export default {
     this.init();
   },
   activated() {
-    this.init();
   },
   methods: {
     init() {

+ 27 - 2
src/views/teamBuild/components/teamBaseInfo.vue

@@ -3,7 +3,7 @@
     <div class="banseLeft">
       <div class="head">乐团基本信息:</div>
       <!-- <div class="num">乐团编号:dywh01</div> -->
-      <el-form
+      <save-form
         :model="topFrom"
         :inline="true"
         ref="topinfo"
@@ -288,7 +288,7 @@
             修改【收费类型】会重置乐团声部与缴费信息
           </p>
         </el-form-item>
-      </el-form>
+      </save-form>
       <div class="btnWrap">
         <div
           class="nextBtn"
@@ -508,6 +508,7 @@ export default {
     },
   init() {
       this.isInit = true;
+      this.$store.dispatch('buildIndex',0)
       // 分为3种  this.teamStatus
       //          1.resetTeam 乐团修改
       //          2. newTeam  新建乐团
@@ -609,6 +610,7 @@ export default {
           }
         });
       } else {
+<<<<<<< Updated upstream
         this.topFrom = {
           type: "", // 收费类型
           section: "", //所属分部
@@ -629,6 +631,29 @@ export default {
           feeType: null,
         };
         this.$refs["topinfo"].resetFields();
+=======
+        // this.topFrom = {
+        //   type: "", // 收费类型
+        //   section: "", //所属分部
+        //   school: "", // 合作单位
+        //   courseViewType: "",
+        //   teacher: "", // 乐团主管
+        //   name: "", //乐团名称
+        //   boss: "", // 运营主管
+        //   time: "", // 报名截止时间
+        //   startClass: [], // 招生年级起始
+        //   paymentValid: [], // 缴费有效期时间起始
+        //   address: "", // 教学地点
+        //   salary: "", // 收费模式
+        //   head: "",
+        //   paymentPattern: "", // 缴费方式
+        //   isClass: false, //是否为课堂课
+        //   startTime: "",
+        //   ownershipType: "OWN", // 合作机构类型
+        //   feeType: null,
+        // };
+        // this.$refs["topinfo"].resetFields();
+>>>>>>> Stashed changes
       }
       // 1.获取各个选项卡的数据内容
       // getSection({ 'delFlag': 0, 'rows': 1000 }).then(res => {

+ 1 - 0
src/views/teamBuild/components/teamSoundSet.vue

@@ -96,6 +96,7 @@ export default {
     // console.log(this)
     this.teamid = this.$route.query.id;
     this.teamStatus = this.$route.query.type;
+     this.$store.dispatch('buildIndex',1)
   },
   activated () {
     this.teamid = this.$route.query.id;

+ 5 - 3
src/views/teamBuild/index.vue

@@ -85,7 +85,7 @@ export default {
   },
   created () {
     // 判断 是新建乐团还是修改乐团
-    this.activeIndex = 0;
+    // this.activeIndex = 0;
     this.init();
   },
   activated () {
@@ -101,11 +101,13 @@ export default {
       if (this.teamStatus == "newTeam") {
         // 新建团
         this.pageName = "建团申请";
-        this.activeIndex = 0;
+        // this.activeIndex = 0;
       } else {
         this.pageName = "乐团修改";
-        this.activeIndex = 0;
+        // this.activeIndex = 0;
       }
+      this.activeIndex = this.$store.getters.buildIndex || 0
+      console.log(this.$store.getters.buildIndex)
     },
     chiosetab (val) {
       this.activeIndex = val;