teamDraft.vue 5.8 KB

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