Browse Source

0110 11:33

11
mo 5 years ago
parent
commit
b61274eea3

+ 0 - 10
src/layout/components/AppMain.vue

@@ -2,27 +2,17 @@
   <section class="app-main">
     <!--   -->
     <transition name="fade-transform"
-                v-if="keep == '0'"
                 mode="out-in">
       <keep-alive>
         <router-view :key="key" />
       </keep-alive>
     </transition>
-    <transition v-else
-                name="fade-transform"
-                mode="out-in">
-      <router-view :key="key"
-                   :include="cachedViews" />
-    </transition>
   </section>
 </template>
 
 <script>
 export default {
   name: 'AppMain',
-  activated () {
-    console.log(this.$route)
-  },
   computed: {
     key () {
       return this.$route.path

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

@@ -31,8 +31,13 @@ const tagsView = {
     DEL_VISITED_VIEWS: (state, view) => {
       for (const [i, v] of state.visitedViews.entries()) {
         if (v.path === view.path) {
-          state.visitedViews.splice(i, 1)
-          break
+          if (state.visitedViews.length == 1 && state.visitedViews[0].path == '/main/main') {
+            break
+          } else {
+            state.visitedViews.splice(i, 1)
+            break
+          }
+
         }
       }
       // for (const i of state.cachedViews) {

+ 14 - 7
src/views/businessManager/shopManager/shopList.vue

@@ -149,17 +149,24 @@ export default {
     }
   },
   created () {
-    if (this.$route.query.searchForm) {
-      this.$route.query.searchForm instanceof Object ? this.searchForm = this.$route.query.searchForm : this.searchForm = JSON.parse(this.$route.query.searchForm);
-    }
-    if (this.$route.query.pageInfo) {
-      this.$route.query.pageInfo instanceof Object ? this.pageInfo = this.$route.query.pageInfo : this.pageInfo = JSON.parse(this.$route.query.pageInfo);
-    }
+    this.init()
+  },
+  activated () {
+    this.init()
   },
   mounted () {
-    this.getList()
+
   },
   methods: {
+    init () {
+      if (this.$route.query.searchForm) {
+        this.$route.query.searchForm instanceof Object ? this.searchForm = this.$route.query.searchForm : this.searchForm = JSON.parse(this.$route.query.searchForm);
+      }
+      if (this.$route.query.pageInfo) {
+        this.$route.query.pageInfo instanceof Object ? this.pageInfo = this.$route.query.pageInfo : this.pageInfo = JSON.parse(this.$route.query.pageInfo);
+      }
+      this.getList()
+    },
     onUpdate (row) {
       goodsUpdate({
         id: row.id,

+ 3 - 0
src/views/contentManager/components/activity.vue

@@ -79,6 +79,9 @@ export default {
       }
     }
   },
+  activated () {
+    this.getList()
+  },
   mounted () {
     this.getList()
   },

+ 3 - 0
src/views/contentManager/components/banner.vue

@@ -79,6 +79,9 @@ export default {
       }
     }
   },
+  activated () {
+    this.getList()
+  },
   mounted () {
     this.getList()
   },

+ 3 - 0
src/views/contentManager/components/information.vue

@@ -79,6 +79,9 @@ export default {
       }
     }
   },
+  activated () {
+    this.getList()
+  },
   mounted () {
     this.getList()
   },

+ 3 - 0
src/views/contentManager/components/training.vue

@@ -79,6 +79,9 @@ export default {
       }
     }
   },
+  activated () {
+    this.getList()
+  },
   mounted () {
     this.getList()
   },

+ 1 - 1
src/views/main/index.vue

@@ -186,7 +186,7 @@
 <script>
 import { getIndex } from '@/api/user'
 export default {
-  name: 'main',
+  name: 'Main',
   data () {
     return {
       dataInfo: {}

+ 3 - 0
src/views/teacherManager/teacherList.vue

@@ -203,6 +203,9 @@ export default {
       },
     }
   },
+  activated () {
+    this.__init();
+  },
   mounted () {
     if (this.$route.query.search) {
       this.$route.query.search instanceof Object ? this.searchForm = this.$route.query.search : this.searchForm = JSON.parse(this.$route.query.search);

+ 142 - 131
src/views/teamBuild/components/teamBaseInfo.vue

@@ -493,146 +493,157 @@ export default {
       orgianList: []
     }
   },
-  created () {
-    // 分为3种  this.teamStatus 
-    //          1.resetTeam 乐团修改
-    //          2. newTeam  新建乐团
-    //          3.teamList 跨团修改
-    //          4.teamDraft 乐团草稿
-    // let year = new Date().getFullYear();
-    // axios.post('/jiari/', qs.stringify({ d: year })).then(res => {
-    //   // this.holidayList = Object.keys(res.data[year])
-    // })
-    this.teamStatus = this.$route.query.type;
-    // 传过来的乐团信息
-    this.activeTeam = this.getTeamList;
-
-    if (this.teamStatus == 'resetTeam' || this.teamStatus == 'teamDraft' || this.teamStatus == 'teamAudit') {
-      // 单团修改
-      this.teamid = this.$route.query.id;
-      getTeamBaseInfo({ musicGroupId: this.teamid }).then(res => {
-        if (res.code == 200) {
-          // 头部
-          this.topFrom.name = res.data.musicGroup.name;
-          this.topFrom.time = res.data.musicGroup.applyExpireDate;
-          this.topFrom.type = res.data.musicGroup.chargeTypeId;
-          this.topFrom.startClass = res.data.musicGroup.enrollClasses.split(',');
-          this.topFrom.section = res.data.musicGroup.organId;
-          this.topFrom.school = res.data.musicGroup.cooperationOrganId;
-          this.topFrom.teacher = res.data.musicGroup.educationalTeacherId;
-          this.topFrom.boss = res.data.musicGroup.teamTeacherId;
-          this.topFrom.address = res.data.musicGroup.schoolId;
-          this.topFrom.salary = res.data.musicGroup.settlementType;
-          this.topFrom.head = res.data.musicGroup.directorUserId;
-          this.topFrom.isClass = res.data.musicGroup.isClassroomLessons
-          this.topFrom.startTime = res.data.musicGroup.expectStartGroupDate;
-          this.topFrom.ownershipType = res.data.musicGroup.ownershipType;
-          // 课程组成形式
-          this.checkList = JSON.parse(res.data.musicGroup.courseForm);
-          // 付费方式和周期
-          for (let i in res.data.musicGroupPaymentEntities) {
-            if (res.data.musicGroupPaymentEntities[i].name == '学校') {
-              this.payList.school.ischeck = true;
-              this.payList.school.value = res.data.musicGroupPaymentEntities[i].memo;
-              this.payList.school.price = res.data.musicGroupPaymentEntities[i].amount;
-              this.payList.school.chiose = res.data.musicGroupPaymentEntities[i].paymentMethod;
-            }
-            if (res.data.musicGroupPaymentEntities[i].name == '公司') {
-              this.payList.company.ischeck = true;
-              this.payList.company.value = res.data.musicGroupPaymentEntities[i].memo;
-              this.payList.company.price = res.data.musicGroupPaymentEntities[i].amount;
-              this.payList.company.chiose = res.data.musicGroupPaymentEntities[i].paymentMethod;
-            }
+  activated () {
 
-            if (res.data.months.length > 0) {
-              this.payList.student.ischeck = true;
-              this.payList.student.chiose = 'loop'
-              this.chioseMonth = res.data.months;
-            } else {
-              this.payList.student.ischeck = true;
-              this.payList.student.chiose = 'ONE_OFF'
-            }
-          }
-          // 循环缴费月
-          this.payList.chioseMonth = res.data.months;
-          if (res.data.musicGroup.organId) {
-            // 获取员工
-            queryEmployByOrganId({ organId: res.data.musicGroup.organId, rows: 1000 }).then(res => {
-              if (res.code == 200) {
-                this.orgianList = res.data.rows;
-              }
-            })
-            // 获取合作单位
-            queryByOrganId({ organId: res.data.musicGroup.organId }).then(res => {
-              if (res.code == 200) {
-                this.cooperationList = res.data;
-              }
-            })
-            // 获取教学点
-            getSchool({ organId: res.data.musicGroup.organId }).then(res => {
-              if (res.code == 200) {
-                this.addList = res.data
-              }
-            })
-          }
-        }
-      })
-    }
+  },
+  created () {
+    this.init();
 
   },
+  activated () {
+    this.init()
+  },
   mounted () {
-    // 1.获取各个选项卡的数据内容
-    // getSection({ 'delFlag': 0, 'rows': 1000 }).then(res => {
-    //   if (res.code == 200) {
-    //     this.sectionList = res.data.rows;
-    //   }
-    // }).catch()
-    getEmployeeOrgan().then(res => {
-      if (res.code == 200) {
-        this.sectionList = res.data;
-      }
-    })
-    // 2.获取收费类型选项卡
-    getType({ 'rows': 1000 }).then(res => {
-      if (res.code == 200) {
-        this.typeList = res.data.rows;
-      }
-    })
-    // 3.获取合作单位选项卡
-    // getCooperation({ 'rows': 1000, search: this.organId }).then(res => {
-    //   if (res.code == 200) {
-    //     this.cooperationList = res.data.rows;
-    //   }
-    // })
-    // 4.获取老师选项卡
-    // getTeacher({ 'rows': 1000, organId: this.organId }).then(res => {
-    //   if (res.code == 200) {
-    //     this.teacherList = res.data;
-    //   }
-    // })
-    // 5.获取教学地点选项卡
-    // getAddress({ 'rows': 1000, }).then(res => {
-    //   if (res.code == 200) {
-    //     this.addList = res.data.rows;
-    //   }
-    // })
-    // 6.默认支付主体
-    // getPayMaster({ 'rows': 1000 }).then(res => {
-    //   if (res.code == 200) {
-    //     this.payList = res.data.map(item => {
-    //       let obj = {};
-    //       obj.id = item.id;
-    //       obj.ischios
-    //     })
-    //   }
-    // })
-    // 缓存设置时的状态
-    sessionStorage.setItem('resetCode', '1')
+
 
     // 获取分部下的员工
 
   },
   methods: {
+
+    init () {
+      // 分为3种  this.teamStatus 
+      //          1.resetTeam 乐团修改
+      //          2. newTeam  新建乐团
+      //          3.teamList 跨团修改
+      //          4.teamDraft 乐团草稿
+      // let year = new Date().getFullYear();
+      // axios.post('/jiari/', qs.stringify({ d: year })).then(res => {
+      //   // this.holidayList = Object.keys(res.data[year])
+      // })
+      this.teamStatus = this.$route.query.type;
+      // 传过来的乐团信息
+      this.activeTeam = this.getTeamList;
+
+      if (this.teamStatus == 'resetTeam' || this.teamStatus == 'teamDraft' || this.teamStatus == 'teamAudit') {
+        // 单团修改
+        this.teamid = this.$route.query.id;
+        getTeamBaseInfo({ musicGroupId: this.teamid }).then(res => {
+          if (res.code == 200) {
+            // 头部
+            this.topFrom.name = res.data.musicGroup.name;
+            this.topFrom.time = res.data.musicGroup.applyExpireDate;
+            this.topFrom.type = res.data.musicGroup.chargeTypeId;
+            this.topFrom.startClass = res.data.musicGroup.enrollClasses.split(',');
+            this.topFrom.section = res.data.musicGroup.organId;
+            this.topFrom.school = res.data.musicGroup.cooperationOrganId;
+            this.topFrom.teacher = res.data.musicGroup.educationalTeacherId;
+            this.topFrom.boss = res.data.musicGroup.teamTeacherId;
+            this.topFrom.address = res.data.musicGroup.schoolId;
+            this.topFrom.salary = res.data.musicGroup.settlementType;
+            this.topFrom.head = res.data.musicGroup.directorUserId;
+            this.topFrom.isClass = res.data.musicGroup.isClassroomLessons
+            this.topFrom.startTime = res.data.musicGroup.expectStartGroupDate;
+            this.topFrom.ownershipType = res.data.musicGroup.ownershipType;
+            // 课程组成形式
+            this.checkList = JSON.parse(res.data.musicGroup.courseForm);
+            // 付费方式和周期
+            for (let i in res.data.musicGroupPaymentEntities) {
+              if (res.data.musicGroupPaymentEntities[i].name == '学校') {
+                this.payList.school.ischeck = true;
+                this.payList.school.value = res.data.musicGroupPaymentEntities[i].memo;
+                this.payList.school.price = res.data.musicGroupPaymentEntities[i].amount;
+                this.payList.school.chiose = res.data.musicGroupPaymentEntities[i].paymentMethod;
+              }
+              if (res.data.musicGroupPaymentEntities[i].name == '公司') {
+                this.payList.company.ischeck = true;
+                this.payList.company.value = res.data.musicGroupPaymentEntities[i].memo;
+                this.payList.company.price = res.data.musicGroupPaymentEntities[i].amount;
+                this.payList.company.chiose = res.data.musicGroupPaymentEntities[i].paymentMethod;
+              }
+
+              if (res.data.months.length > 0) {
+                this.payList.student.ischeck = true;
+                this.payList.student.chiose = 'loop'
+                this.chioseMonth = res.data.months;
+              } else {
+                this.payList.student.ischeck = true;
+                this.payList.student.chiose = 'ONE_OFF'
+              }
+            }
+            // 循环缴费月
+            this.payList.chioseMonth = res.data.months;
+            if (res.data.musicGroup.organId) {
+              // 获取员工
+              queryEmployByOrganId({ organId: res.data.musicGroup.organId, rows: 1000 }).then(res => {
+                if (res.code == 200) {
+                  this.orgianList = res.data.rows;
+                }
+              })
+              // 获取合作单位
+              queryByOrganId({ organId: res.data.musicGroup.organId }).then(res => {
+                if (res.code == 200) {
+                  this.cooperationList = res.data;
+                }
+              })
+              // 获取教学点
+              getSchool({ organId: res.data.musicGroup.organId }).then(res => {
+                if (res.code == 200) {
+                  this.addList = res.data
+                }
+              })
+            }
+          }
+        })
+      }
+      // 1.获取各个选项卡的数据内容
+      // getSection({ 'delFlag': 0, 'rows': 1000 }).then(res => {
+      //   if (res.code == 200) {
+      //     this.sectionList = res.data.rows;
+      //   }
+      // }).catch()
+      getEmployeeOrgan().then(res => {
+        if (res.code == 200) {
+          this.sectionList = res.data;
+        }
+      })
+      // 2.获取收费类型选项卡
+      getType({ 'rows': 1000 }).then(res => {
+        if (res.code == 200) {
+          this.typeList = res.data.rows;
+        }
+      })
+      // 3.获取合作单位选项卡
+      // getCooperation({ 'rows': 1000, search: this.organId }).then(res => {
+      //   if (res.code == 200) {
+      //     this.cooperationList = res.data.rows;
+      //   }
+      // })
+      // 4.获取老师选项卡
+      // getTeacher({ 'rows': 1000, organId: this.organId }).then(res => {
+      //   if (res.code == 200) {
+      //     this.teacherList = res.data;
+      //   }
+      // })
+      // 5.获取教学地点选项卡
+      // getAddress({ 'rows': 1000, }).then(res => {
+      //   if (res.code == 200) {
+      //     this.addList = res.data.rows;
+      //   }
+      // })
+      // 6.默认支付主体
+      // getPayMaster({ 'rows': 1000 }).then(res => {
+      //   if (res.code == 200) {
+      //     this.payList = res.data.map(item => {
+      //       let obj = {};
+      //       obj.id = item.id;
+      //       obj.ischios
+      //     })
+      //   }
+      // })
+      // 缓存设置时的状态
+      sessionStorage.setItem('resetCode', '1')
+    },
     changeSection (val) {
       // 修改分部的时候 重置运营主管 重置教务老师 重置乐队指导 合作单位  教学点
       this.topFrom.teacher = '';

+ 30 - 23
src/views/teamBuild/components/teamResetSound.vue

@@ -202,36 +202,43 @@ export default {
     }
   },
   created () {
-    // 判断是否带缓存参数
-    if (this.$route.query.search) {
-      this.Fsearch = this.$route.query.search;
-    }
-    if (this.$route.query.rules) {
-      this.Frules = this.$route.query.rules
-    }
+    this.init();
+  },
+  activated () {
+    this.init();
   },
   mounted () {
-    this.teamList = this.getTeamList;
 
-    this.payfor = this.$store.getters.payList;
+  },
+  methods: {
+    init () {
+      // 判断是否带缓存参数
+      if (this.$route.query.search) {
+        this.Fsearch = this.$route.query.search;
+      }
+      if (this.$route.query.rules) {
+        this.Frules = this.$route.query.rules
+      }
+      this.teamList = this.getTeamList;
+
+      this.payfor = this.$store.getters.payList;
 
-    getSoundTree().then(res => {
-      if (res.code == 200) {
-        this.soundList = res.data.rows;
-        // // 生成动态的checkList
-        for (let key in this.soundList) {
-          this.$set(this.soundLists, key, [])
+      getSoundTree().then(res => {
+        if (res.code == 200) {
+          this.soundList = res.data.rows;
+          // // 生成动态的checkList
+          for (let key in this.soundList) {
+            this.$set(this.soundLists, key, [])
+          }
         }
-      }
-    })
+      })
 
-    this.payfor = this.$store.getters.payList;
-    this.topfor = this.$store.getters.topinfo;
-    this.checkfor = this.$store.getters.checkinfo;
-    let type = this.topfor.type;
+      this.payfor = this.$store.getters.payList;
+      this.topfor = this.$store.getters.topinfo;
+      this.checkfor = this.$store.getters.checkinfo;
+      let type = this.topfor.type;
 
-  },
-  methods: {
+    },
     // 删除声部
     removeListItem () {
       this.$confirm(`是否删除该声部?`, '提示', {

+ 31 - 25
src/views/teamDetail/teamList.vue

@@ -161,7 +161,7 @@
                 <el-button type="text"
                            v-if="scope.row.status == 'PREPARE' && permission('/teamDetailedList')"
                            @click="gotodetailList(scope.row)">发放清单</el-button>
-                
+
                 <el-button type="text"
                            v-if="scope.row.status == 'PREPARE'"
                            @click="lookTeamCourse(scope.row)">查看课表</el-button>
@@ -243,7 +243,7 @@ import { musicGroupStatus } from '@/utils/searchArray'
 import { isObject } from 'util'
 import { permission } from '@/utils/directivePage'
 export default {
-  name: "Main",
+  name: "teamList",
   data () {
     return {
       topForm: {
@@ -272,30 +272,36 @@ export default {
     pagination
   },
   mounted () {
-    if (this.$route.query.search) {
-      this.$route.query.search instanceof Object ? this.topForm = this.$route.query.search : this.topForm = JSON.parse(this.$route.query.search);
-    }
-    if (this.$route.query.rules) {
-      this.$route.query.rules instanceof Object ? this.rules = this.$route.query.rules : this.rules = JSON.parse(this.$route.query.rules);
-    }
-    sessionStorage.setItem('resetCode', '1')
-    this.getList();
-    getEmployeeOrgan().then(res => {
-      if (res.code == 200) {
-        this.organList = res.data;
-      }
-    })
-    // 获取乐团收费类型
-    getPayType().then(res => {
-      if (res.code == 200) {
-        this.typeList = res.data.rows;
-      }
-    })
-    // 获取乐团合作单位(学校)
-    // getCooperation().then(res => {
-    // })
+    this.init();
+  },
+  activated () {
+    this.init();
   },
   methods: {
+    init () {
+      if (this.$route.query.search) {
+        this.$route.query.search instanceof Object ? this.topForm = this.$route.query.search : this.topForm = JSON.parse(this.$route.query.search);
+      }
+      if (this.$route.query.rules) {
+        this.$route.query.rules instanceof Object ? this.rules = this.$route.query.rules : this.rules = JSON.parse(this.$route.query.rules);
+      }
+      sessionStorage.setItem('resetCode', '1')
+      this.getList();
+      getEmployeeOrgan().then(res => {
+        if (res.code == 200) {
+          this.organList = res.data;
+        }
+      })
+      // 获取乐团收费类型
+      getPayType().then(res => {
+        if (res.code == 200) {
+          this.typeList = res.data.rows;
+        }
+      })
+      // 获取乐团合作单位(学校)
+      // getCooperation().then(res => {
+      // })
+    },
     permission (str) {
       return permission(str)
     },
@@ -441,7 +447,7 @@ export default {
       this.$refs['topForm'].resetFields();
       this.searchLsit = [];
     },
-    lookTeamCourse(row) {
+    lookTeamCourse (row) {
       // 查看课表
       let search = JSON.stringify(this.topForm)
       let rules = JSON.stringify(this.rules)

+ 24 - 18
src/views/vipClass/vipList.vue

@@ -252,26 +252,32 @@ export default {
 
   },
   mounted () {
-    getEmployeeOrgan().then(res => {
-      if (res.code == 200) {
-        this.organList = res.data;
-      }
-    })
-    this.getList();
-    //   <!-- 状态 指导老师 活动方案-->
-    getTeacher({ organId: this.organId }).then(res => {
-      if (res.code == 200) {
-        this.teacherList = res.data;
-      }
-    })
-    // 获取活动方案
-    vipGroupActivity({ organId: this.organId }).then(res => {
-      if (res.code == 200) {
-        this.activeList = res.data.rows;
-      }
-    })
+    this.init();
+  },
+  activated () {
+    this.init();
   },
   methods: {
+    init () {
+      getEmployeeOrgan().then(res => {
+        if (res.code == 200) {
+          this.organList = res.data;
+        }
+      })
+      this.getList();
+      //   <!-- 状态 指导老师 活动方案-->
+      getTeacher({ organId: this.organId }).then(res => {
+        if (res.code == 200) {
+          this.teacherList = res.data;
+        }
+      })
+      // 获取活动方案
+      vipGroupActivity({ organId: this.organId }).then(res => {
+        if (res.code == 200) {
+          this.activeList = res.data.rows;
+        }
+      })
+    },
     search () {
       this.rules.page = 1;
       this.getList()