index.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <div class="m-container">
  3. <div class="line"></div>
  4. <h2>
  5. <el-page-header @back="goBack"
  6. :content="pageName"> </el-page-header>
  7. </h2>
  8. <div class="m-core">
  9. <div class="stepbox">
  10. <!-- @click="activeIndex = 0" -->
  11. <span class="stepspan stepspan1">
  12. <div class="step1 sptep"
  13. :class="activeIndex >= 0 ? 'activestep' : ''">
  14. 基本信息
  15. </div>
  16. <img :src="activeIndex >= 0 ? stepImgs.nol : stepImgs.active"
  17. alt=""
  18. class="arrow" />
  19. </span>
  20. <!-- @click="activeIndex = 1" -->
  21. <span class="stepspan stepspan2"
  22. v-if="showFlag?activeIndex>= 1:true">
  23. <!-- -->
  24. <div class="step2 sptep"
  25. :class="activeIndex >= 1 ? 'activestep' : ''">
  26. 声部设置
  27. </div>
  28. <img :src="activeIndex >= 1 ? stepImgs.nol : stepImgs.active"
  29. alt=""
  30. class="arrow" />
  31. </span>
  32. </div>
  33. <!-- 下面显示的内容 -->
  34. <div class="stepcontent">
  35. <div v-show="activeIndex == 0">
  36. <teamBaseInfo @chiosetab="chiosetab"
  37. ref='teamBaseInfo'
  38. :getTeamList="getTeamList"
  39. @getBaseInfo="getBaseInfo" />
  40. </div>
  41. <div v-show="activeIndex == 1" v-if="showSecond">
  42. <teamSoundMoney @chiosetab="chiosetab"
  43. :getTeamList="getTeamList"
  44. @getBaseInfo="getBaseInfo" />
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. </template>
  50. <script>
  51. import merge from "webpack-merge";
  52. import teamBaseInfo from "@/views/teamBuild/components/teamBaseInfo";
  53. import teamSoundMoney from "@/views/teamBuild/components/teamSoundSet";
  54. import teamPayInfo from "@/views/teamBuild/components/teamPayInfo";
  55. export default {
  56. components: { teamBaseInfo, teamSoundMoney, teamPayInfo },
  57. name: "teamBuild",
  58. data () {
  59. return {
  60. activeIndex: 0,
  61. stepImgs: {
  62. nol: require("@/assets/images/base/step-arrow-active.png"),
  63. active: require("@/assets/images/base/step-arrow.png"),
  64. },
  65. pageName: "建团申请",
  66. getTeamList: [],
  67. teamStatus: "",
  68. showSecond:false
  69. };
  70. },
  71. created () {
  72. // 判断 是新建乐团还是修改乐团
  73. // this.activeIndex = 0;
  74. this.init();
  75. },
  76. activated () {
  77. if( this.$route.query.clear == 'true'){
  78. this.showSecond=false
  79. this.$store.dispatch("buildIndex", 0);
  80. this.$router.push({
  81. query: merge(this.$route.query, { clear: false }),
  82. });
  83. }
  84. this.init();
  85. },
  86. destroyed() {
  87. this.showSecond=false
  88. console.log('页面销毁')
  89. },
  90. methods: {
  91. init () {
  92. this.teamStatus = this.$route.query.type;
  93. if (this.$route.query.teamList) {
  94. this.getTeamList = this.$route.query.teamList;
  95. }
  96. if (this.teamStatus == "newTeam") {
  97. // 新建团
  98. this.pageName = "建团申请";
  99. this.activeIndex = this.$store.getters.buildIndex || 0
  100. } else {
  101. this.pageName = "乐团修改";
  102. this.activeIndex = this.$store.getters.draftIndex || 0
  103. }
  104. },
  105. chiosetab (val) {
  106. this.activeIndex = val;
  107. if (val == 0 && this.teamStatus != "newTeam" || val == 0 && this.teamStatus != "feeAudit") {
  108. this.$refs.teamBaseInfo.init()
  109. }
  110. this.showSecond = true;
  111. },
  112. goBack () {
  113. this.$store.dispatch('delVisitedViews', this.$route)
  114. this.$router.push({
  115. path: "/business/teamDetail",
  116. });
  117. },
  118. getBaseInfo (baseInfo) {
  119. this.baseInfo = baseInfo
  120. this.pageName = baseInfo.musicGroup?.name
  121. },
  122. },
  123. computed: {
  124. showFlag () {
  125. return (this.teamStatus == 'newTeam' || this.teamStatus == 'teamList')
  126. }
  127. }
  128. };
  129. </script>
  130. <style lang="scss" scoped>
  131. .stepbox {
  132. display: flex;
  133. flex-direction: row;
  134. justify-content: flex-start;
  135. .stepspan {
  136. font-size: 14px;
  137. display: block;
  138. line-height: 40px;
  139. position: relative;
  140. z-index: 100;
  141. display: flex;
  142. flex-direction: row;
  143. justify-content: space-between;
  144. .sptep {
  145. width: 110px;
  146. height: 40px;
  147. border: 1px solid #dcdfe6;
  148. border-right: none;
  149. border-bottom: none;
  150. padding-left: 25px;
  151. border-radius: 4px 0 0 0;
  152. }
  153. .arrow {
  154. height: 40px;
  155. width: 17px;
  156. position: relative;
  157. top: 1px;
  158. z-index: 40;
  159. }
  160. }
  161. .stepspan.stepspan2 {
  162. position: relative;
  163. z-index: 20;
  164. left: -17px;
  165. .sptep {
  166. padding-left: 30px !important;
  167. border-radius: 0 !important;
  168. }
  169. }
  170. .stepspan.stepspan3 {
  171. position: relative;
  172. z-index: 10;
  173. left: -34px;
  174. background-color: #fff;
  175. .sptep {
  176. padding-left: 30px !important;
  177. border-radius: 0 !important;
  178. }
  179. }
  180. .sptep.activestep {
  181. color: #fff;
  182. font-weight: bold;
  183. background-color: #4eada7;
  184. }
  185. }
  186. .stepcontent {
  187. border-top: 1px solid #dcdfe6;
  188. padding-top: 30px;
  189. }
  190. </style>