index.vue 4.9 KB

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