浏览代码

新建团查看

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

+ 3 - 1
src/components/remote-search/index.vue

@@ -94,10 +94,12 @@ export default {
           const optionids = this.options.map(item => item.userId)
 
           const valueItem = this.listById[this.value]
+
           if (!optionids.includes(this.value) && valueItem) {
             this.options.push(valueItem)
             this.options = uniqBy(this.options, 'userId')
           }
+           console.log( this.options)
           }catch(e){
             // console.log(e)
           }
@@ -130,7 +132,7 @@ export default {
           }
         } else {
           if (val && this.isFirst) {
-            this.getOptions('')
+            this.getOptions()
           }else{
              this.getOptions(val)
           }

+ 2 - 2
src/router/notKeepAliveList.js

@@ -89,6 +89,6 @@ export default [
   '/arrearage-students',
   '/business/strudentPayInfo',
   '/timedTask/timedTask',
-  '/business/teamAudit',
-  '/business/feeAudit',
+  // '/business/teamAudit',
+  // '/business/feeAudit',
 ]

+ 11 - 4
src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div :class="isField ? 'soundBtnWrap' : 'soundBtnFixed'">
+    <div :class="isField ? 'soundBtnWrap' : 'soundBtnFixed'"   v-if="teamStatus != 'resetTeam' && !basdisabled">
       <el-button
         type="primary"
         @click="allin"
@@ -17,7 +17,7 @@
         >添加</el-button
       >
     </div>
-    <div class="wall"></div>
+    <div class="wall"  v-if="teamStatus != 'resetTeam' && !basdisabled"></div>
     <div class="coreWrap">
       <el-checkbox-group v-model="checkList" @change="lookCheck">
         <el-collapse v-model="chioseActiveSound">
@@ -142,10 +142,13 @@ export default {
     window.removeEventListener("scroll", this.getScroll);
   },
   activated() {
-    if (this.teamid && this.teamid != this.$route.query.id) {
+
+    if (this.teamid && (this.teamid != this.$route.query.id)) {
+
       this.init();
     } else {
       if (this.activeSoundList.length < 1) {
+         console.log('进来了',this.teamid,this.activeSoundList.length)
         this.init();
       }
     }
@@ -160,8 +163,12 @@ export default {
       this.basdisabled = false;
     }
   },
+destroyed() {
+   this.activeSoundList = [];
+},
   deactivated() {
-    this.activeSoundList = [];
+
+
   },
   methods: {
     init() {

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

@@ -317,7 +317,7 @@
   </div>
 </template>
 <script>
-import merge from "webpack-merge";
+
 import {
   getSection,
   getType,
@@ -488,9 +488,7 @@ export default {
     if (this.$route.query.clear == 'true') {
 
       this.onReset();
-        this.$router.push({
-      query: merge(this.$route.query, { clear: false }),
-    });
+
     }
     if (this.teamStatus == "newTeam") {
       this.$store.dispatch("buildIndex", 0);

+ 81 - 54
src/views/teamBuild/components/teamSoundSet.vue

@@ -4,27 +4,51 @@
       <p>当前选择声部数(个):{{ chioseSoundNum }}</p>
       <p style="margin-left: 30px">计划招生人数(个):{{ PlannedCount }}</p>
     </div>
-    <soundSetCore ref="soundSetCore"
-                  @chiosetab="chiosetab"
-                  @getBaseInfo="getBaseInfo"
-                  @getNumber="getNumber" />
+    <soundSetCore
+      ref="soundSetCore"
+      @chiosetab="chiosetab"
+      @getBaseInfo="getBaseInfo"
+      @getNumber="getNumber"
+    />
     <div class="btnWrap">
       <el-button type="primary" @click="goback">上一步</el-button>
 
-      <el-button type="primary"
+      <el-button
+        type="primary"
         v-if="teamStatus == 'newTeam'"
         @click="submitInfo()"
         v-permission="{
           child: 'musicGroup/createGroup',
           parent: '/teamBuild/soundMoney',
-        }">提交</el-button>
-      <el-button type="primary" @click="submitAudit(1)" v-if="teamStatus == 'teamDraft'">提交审核</el-button>
-      <el-button type="primary" @click="approval"
-           v-if="teamStatus == 'teamAudit'"
-           v-permission="{child: 'musicGroup/auditSuccess', parent: '/teamBuild/teamAudit/soundMoney'}">审核通过</el-button>
-      <el-button type="danger" @click="refuse"
-           v-if="teamStatus == 'teamAudit'"
-           v-permission="{child: 'musicGroup/auditFailed', parent: '/teamBuild/teamAudit/soundMoney'}">驳回</el-button>
+        }"
+        >提交</el-button
+      >
+      <el-button
+        type="primary"
+        @click="submitAudit(1)"
+        v-if="teamStatus == 'teamDraft'"
+        >提交审核</el-button
+      >
+      <el-button
+        type="primary"
+        @click="approval"
+        v-if="teamStatus == 'teamAudit'"
+        v-permission="{
+          child: 'musicGroup/auditSuccess',
+          parent: '/teamBuild/teamAudit/soundMoney',
+        }"
+        >审核通过</el-button
+      >
+      <el-button
+        type="danger"
+        @click="refuse"
+        v-if="teamStatus == 'teamAudit'"
+        v-permission="{
+          child: 'musicGroup/auditFailed',
+          parent: '/teamBuild/teamAudit/soundMoney',
+        }"
+        >驳回</el-button
+      >
       <!--  v-if="teamStatus != 'teamAudit'" -->
       <!-- <div
         class="submitBtn"
@@ -60,16 +84,13 @@
   </div>
 </template>
 <script>
-import {
-  auditSuccess,
-  auditFailed,
-} from "@/api/buildTeam";
+import { auditSuccess, auditFailed } from "@/api/buildTeam";
 import dayjs from "dayjs";
 import soundSetCore from "./soundSetComponents/soundSetCore";
 
 export default {
   components: { soundSetCore },
-  data () {
+  data() {
     return {
       topfor: null, // 第一页的数据
       Fsearch: null,
@@ -78,39 +99,43 @@ export default {
       chioseSoundNum: 0,
       PlannedCount: 0,
       teamStatus: null,
-      teamid: null
+      teamid: null,
     };
   },
-  mounted () {
+  mounted() {
     this.teamid = this.$route.query.id;
     this.teamStatus = this.$route.query.type;
+    if (this.teamStatus == "newTeam") {
+      this.$store.dispatch("buildIndex", 1);
+    }
+    if (this.teamStatus != "newTeam") {
+      this.$store.dispatch("draftIndex", 1);
+    }
+  },
+  activated() {
       if (this.teamStatus == "newTeam") {
-        this.$store.dispatch('buildIndex',1)
+        this.$store.dispatch("buildIndex", 1);
       }
-      if(this.teamStatus != "newTeam"){
-         this.$store.dispatch('draftIndex',1)
+      if (this.teamStatus != "newTeam") {
+        this.$store.dispatch("draftIndex", 1);
       }
-
-  },
-  activated () {
-
     this.teamid = this.$route.query.id;
     this.teamStatus = this.$route.query.type;
+
+    console.log("激活第二页");
   },
   methods: {
-    handleClick(evt) {
-    },
-    goback () {
-
+    handleClick(evt) {},
+    goback() {
       this.$emit("chiosetab", 0);
     },
-    submitInfo () {
+    submitInfo() {
       this.$refs.soundSetCore.submitInfo();
     },
-    chiosetab (val) {
+    chiosetab(val) {
       this.$emit("chiosetab", val);
     },
-    submitAudit (val) {
+    submitAudit(val) {
       this.$confirm(`是否提交审核?`, "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -119,20 +144,20 @@ export default {
         .then(() => {
           this.$refs.soundSetCore.submitInfo(val);
         })
-        .catch(() => { });
+        .catch(() => {});
     },
     selectMusic() {
-      this.$refs.soundSetCore.submitInfo()
-      this.$emit('chiosetab', 3)
+      this.$refs.soundSetCore.submitInfo();
+      this.$emit("chiosetab", 3);
     },
-    getNumber (chioseSoundNum, PlannedCount) {
+    getNumber(chioseSoundNum, PlannedCount) {
       this.chioseSoundNum = chioseSoundNum;
       this.PlannedCount = PlannedCount;
     },
-    getBaseInfo (baseInfo) {
-      this.$emit('getBaseInfo', baseInfo)
+    getBaseInfo(baseInfo) {
+      this.$emit("getBaseInfo", baseInfo);
     },
-    approval () {
+    approval() {
       this.$confirm(`是否审核通过?`, "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -142,7 +167,7 @@ export default {
           auditSuccess({ musicGroupId: this.teamid }).then((res) => {
             if (res.code == 200) {
               this.$message.success("审核通过");
-              this.$store.dispatch('delVisitedViews', this.$route)
+              this.$store.dispatch("delVisitedViews", this.$route);
               this.$router.push({
                 path: "/business/teamDetail",
                 query: { search: this.Fsearch, rules: this.Frules },
@@ -150,29 +175,31 @@ export default {
             }
           });
         })
-        .catch(() => { });
+        .catch(() => {});
     },
-    refuse () {
+    refuse() {
       // auditFailed
       this.$prompt("请输入拒绝原因", "提示", {
         confirmButtonText: "确定",
-        cancelButtonText: "取消"
+        cancelButtonText: "取消",
       }).then(({ value }) => {
         //   点击确认  值是value
         if (!value) {
           this.$message.error("请输入驳回原因");
           return;
         } else {
-          auditFailed({ musicGroupId: this.teamid, memo: value }).then(res => {
-            if (res.code == 200) {
-              this.$message.success("已拒绝");
-              this.$store.dispatch('delVisitedViews', this.$route)
-              this.$router.push({
-                path: "/business/teamDetail",
-                query: { search: this.Fsearch, rules: this.Frules }
-              });
+          auditFailed({ musicGroupId: this.teamid, memo: value }).then(
+            (res) => {
+              if (res.code == 200) {
+                this.$message.success("已拒绝");
+                this.$store.dispatch("delVisitedViews", this.$route);
+                this.$router.push({
+                  path: "/business/teamDetail",
+                  query: { search: this.Fsearch, rules: this.Frules },
+                });
+              }
             }
-          });
+          );
         }
       });
     },

+ 14 - 2
src/views/teamBuild/index.vue

@@ -49,6 +49,7 @@
   </div>
 </template>
 <script>
+import merge from "webpack-merge";
 import teamBaseInfo from "@/views/teamBuild/components/teamBaseInfo";
 import teamSoundMoney from "@/views/teamBuild/components/teamSoundSet";
 import teamPayInfo from "@/views/teamBuild/components/teamPayInfo";
@@ -74,11 +75,21 @@ export default {
     this.init();
   },
   activated () {
+
+    if( this.$route.query.clear == 'true'){
+
+       this.showSecond=false
+        this.$store.dispatch("buildIndex", 0);
+                this.$router.push({
+      query: merge(this.$route.query, { clear: false }),
+    });
+    }
     this.init();
   },
-  deactivated(){
- this.showSecond=false
+  destroyed() {
+    this.showSecond=false
   },
+
   methods: {
     init () {
       this.teamStatus = this.$route.query.type;
@@ -94,6 +105,7 @@ export default {
         this.pageName = "乐团修改";
         this.activeIndex = this.$store.getters.draftIndex || 0
       }
+      console.log(this.activeIndex,this.$store.getters.buildIndex)
     },
     chiosetab (val) {
       this.activeIndex = val;

+ 18 - 1
src/views/teamBuild/teamDraft.vue

@@ -50,7 +50,7 @@
                         :getTeamList="getTeamList"
                         @getBaseInfo="getBaseInfo" />
         </div>
-        <div v-show="activeIndex == 1" >
+        <div v-show="activeIndex == 1"  v-if="showSecond">
           <teamSoundMoney @chiosetab="chiosetab"
                           :getTeamList="getTeamList"
                           @getBaseInfo="getBaseInfo" />
@@ -68,6 +68,7 @@
 import teamBaseInfo from "@/views/teamBuild/components/teamBaseInfo";
 import teamSoundMoney from "@/views/teamBuild/components/teamSoundSet";
 import teamPayInfo from "@/views/teamBuild/components/teamPayInfo";
+import merge from "webpack-merge";
 export default {
   components: { teamBaseInfo, teamSoundMoney, teamPayInfo },
   name: "teamBuild",
@@ -81,6 +82,7 @@ export default {
       pageName: "建团申请",
       getTeamList: [],
       teamStatus: "",
+       showSecond:false
     };
   },
   created () {
@@ -89,8 +91,20 @@ export default {
     this.init();
   },
   activated () {
+
+    if( this.$route.query.clear == 'true'){
+
+       this.showSecond=false
+        this.$store.dispatch("draftIndex", 0);
+                this.$router.push({
+      query: merge(this.$route.query, { clear: false }),
+    });
+    }
     this.init();
   },
+    destroyed() {
+    this.showSecond=false
+  },
   methods: {
     init () {
       this.teamStatus = this.$route.query.type;
@@ -103,15 +117,18 @@ export default {
         this.pageName = "建团申请";
           this.activeIndex = this.$store.getters.buildIndex || 0
       } else {
+             console.log( this.$store.getters.draftIndex,this.activeIndex)
         this.pageName = "乐团修改";
        this.activeIndex = this.$store.getters.draftIndex || 0
       }
+
     },
     chiosetab (val) {
       this.activeIndex = val;
       if (val == 0 && this.teamStatus != "newTeam" || val == 0 && this.teamStatus != "feeAudit") {
         this.$refs.teamBaseInfo.init()
       }
+        this.showSecond = true;
     },
     goBack () {
       this.$store.dispatch('delVisitedViews', this.$route)

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

@@ -706,7 +706,7 @@ export default {
           this.$router.push(
             {
               path: "/business/teamDraft",
-              query: { type: "teamDraft", id: row.id },
+              query: { type: "teamDraft", id: row.id ,clear:'true'},
             },
             (router) => {
               router.meta.title = "编辑乐团";
@@ -720,7 +720,7 @@ export default {
           this.$router.push(
             {
               path: "/business/teamAudit",
-              query: { type: "teamAudit", id: row.id },
+              query: { type: "teamAudit", id: row.id,clear:'true' },
             },
             (router) => {
               router.meta.title = "审核乐团";
@@ -742,7 +742,7 @@ export default {
           this.$router.push(
             {
               path: "/business/feeAudit",
-              query: { type: "feeAudit", id: row.id },
+              query: { type: "feeAudit", id: row.id,clear:'true' },
             },
             (router) => {
               router.meta.title = "乐团费用审核中";
@@ -756,7 +756,7 @@ export default {
           this.$router.push(
             {
               path: "/business/auditFailed",
-              query: { type: "teamDraft", id: row.id },
+              query: { type: "teamDraft", id: row.id,clear:'true' },
             },
             (router) => {
               router.meta.title = "乐团审核失败编辑";