index.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. <template>
  2. <div class='set-container'>
  3. <div class="topWrap">
  4. <h2>
  5. <!-- <div class="squrt"></div> -->
  6. <el-page-header @back="goBack"
  7. :content="name">
  8. </el-page-header>
  9. </h2>
  10. <div class="stepbox"
  11. v-if="isOld">
  12. <span class='stepspan'
  13. @click="activeIndex=0">
  14. <div class="step1 sptep"
  15. :class="activeIndex >= 0?'activestep':''">
  16. 班级设置
  17. </div>
  18. <img :src="activeIndex >= 0?stepImgs.nol:stepImgs.active"
  19. alt=""
  20. class="arrow">
  21. </span>
  22. <span class='stepspan stepspan2'
  23. @click="activeIndex=2">
  24. <div class="step2 sptep"
  25. :class="activeIndex >= 2?'activestep':''">
  26. 课表
  27. </div>
  28. <img :src="activeIndex >= 2?stepImgs.nol:stepImgs.active"
  29. alt=""
  30. class="
  31. arrow">
  32. </span>
  33. <span class='stepspan stepspan2'
  34. v-permission="'/teamSetting/salarySet'"
  35. @click="activeIndex=4">
  36. <div class="step2 sptep"
  37. :class="activeIndex >= 4?'activestep':''">
  38. 课酬
  39. </div>
  40. <img :src="activeIndex >= 4?stepImgs.nol:stepImgs.active"
  41. alt=""
  42. class="
  43. arrow">
  44. </span>
  45. </div>
  46. </div>
  47. <!-- 下面显示的内容 -->
  48. <div class="stepcontent"
  49. v-if="isOld">
  50. <div v-if='activeIndex==0'>
  51. <classSeting :teamid='id'
  52. :isSetSalary='isSetSalary'
  53. @gotoNav='gotoNav' />
  54. </div>
  55. <div v-if='activeIndex==1'>
  56. <teacherSeting :teamid='id'
  57. :isSetSalary='isSetSalary'
  58. @gotoNav='gotoNav' />
  59. </div>
  60. <div v-if='activeIndex==2'>
  61. <div class="m-container">
  62. <lookCourse :isSetSalary='isSetSalary'
  63. @gotoNav='gotoNav' />
  64. </div>
  65. </div>
  66. <div v-if='activeIndex==3'>
  67. <improvement :teamid='id'
  68. :isSetSalary='isSetSalary'
  69. @gotoNav='gotoNav' />
  70. </div>
  71. <div v-if='activeIndex==4'
  72. v-permission="'/teamSetting/salarySet'">
  73. <salarySet :teamid='id'
  74. :isSetSalary='isSetSalary' />
  75. </div>
  76. </div>
  77. <classSeting v-if="!isOld"
  78. :teamid='id'
  79. :isSetSalary='isSetSalary'
  80. @gotoNav='gotoNav' />
  81. </div>
  82. </template>
  83. <script>
  84. import classSeting from '@/views/teamBuild/teamSeting/components/setClassV2'
  85. import teacherSeting from '@/views/teamBuild/teamSeting/components/setTeacher'
  86. import coursePlan from '@/views/teamBuild/teamSeting/components/coursePlan'
  87. import salarySet from '@/views/teamBuild/teamSeting/components/salarySet'
  88. import improvement from '@/views/teamBuild/teamSeting/components/improvementClass'
  89. import lookCourse from '@/views/teamBuild/teamSeting/components/lookCourse'
  90. import { getTeamBaseInfo, checkSetSalary, getCourseSchedule } from '@/api/buildTeam'
  91. export default {
  92. name: 'teamSeting',
  93. components: {
  94. classSeting,
  95. teacherSeting,
  96. coursePlan,
  97. salarySet,
  98. improvement,
  99. lookCourse
  100. },
  101. data () {
  102. return {
  103. activeIndex: 0,
  104. stepImgs: {
  105. nol: require('@/assets/images/base/step-arrow-active.png'),
  106. active: require('@/assets/images/base/step-arrow.png')
  107. },
  108. id: '',
  109. chargeTypeId: '',
  110. name: '',
  111. isSetSalary: false,
  112. Fsearch: null,
  113. Frules: null,
  114. isOld: false
  115. }
  116. },
  117. created () {
  118. this.init()
  119. },
  120. activated () {
  121. this.init()
  122. },
  123. beforeDestroy () {
  124. sessionStorage.setItem('setStep', 0)
  125. sessionStorage.setItem('resetCode', 1)
  126. },
  127. mounted () {
  128. // 根据乐团id 获取乐团信息
  129. this.init()
  130. },
  131. methods: {
  132. init () {
  133. this.id = this.$route.query.id;
  134. // 判断是否带缓存参数
  135. if (this.$route.query.search) {
  136. this.Fsearch = this.$route.query.search;
  137. }
  138. if (this.$route.query.rules) {
  139. this.Frules = this.$route.query.rules
  140. }
  141. //sessionStorage.getItem('setStep') ||
  142. this.activeIndex = 0;
  143. getTeamBaseInfo({ musicGroupId: this.id }).then(res => {
  144. if (res.code == 200) {
  145. this.chargeTypeId = res.data.musicGroup.chargeTypeId;
  146. this.name = res.data.musicGroup.name;
  147. sessionStorage.setItem('chargeTypeId', this.chargeTypeId);
  148. sessionStorage.setItem('createTeamOrgnId', res.data.musicGroup.organId)
  149. }
  150. })
  151. // 获取是否设置课酬
  152. checkSetSalary({ musicGroupId: this.id }).then(res => {
  153. if (res.code == 200) {
  154. this.isSetSalary = res.data;
  155. }
  156. })
  157. // 查询有没有课
  158. getCourseSchedule({ musicGroupId: this.id }).then(res => {
  159. if (res.code == 200) {
  160. if (res.data && res.data.rows.length > 0) {
  161. this.isOld = true
  162. } else {
  163. this.isOld = false
  164. }
  165. }
  166. })
  167. },
  168. gotoNav (val) {
  169. this.activeIndex = val;
  170. },
  171. goBack () {
  172. this.$router.push({ path: '/business/teamDetail', query: { search: this.Fsearch, rules: this.Frules } })
  173. }
  174. },
  175. }
  176. </script>
  177. <style lang="scss" scoped>
  178. .set-container {
  179. margin-left: 12px;
  180. .topWrap {
  181. padding: 18px 58px 0;
  182. // height: 136px;
  183. background-color: #fff;
  184. // display: flex;
  185. // flex-direction: row;
  186. // justify-content: space-between;
  187. .msg {
  188. text-align: right;
  189. color: #f97215;
  190. font-size: 32px;
  191. font-weight: bold;
  192. padding-top: 30px;
  193. box-sizing: border-box;
  194. img {
  195. width: 36px;
  196. height: 36px;
  197. position: relative;
  198. top: 5px;
  199. margin-right: 8px;
  200. display: block;
  201. }
  202. }
  203. h2 {
  204. height: 48px;
  205. line-height: 48px;
  206. position: relative;
  207. // padding-left: 30px;
  208. font-size: 32px;
  209. font-weight: 600;
  210. margin-bottom: 10px;
  211. display: flex;
  212. flex-direction: row;
  213. justify-content: flex-start;
  214. align-items: center;
  215. .term {
  216. height: 32px;
  217. line-height: 32px;
  218. border-radius: 24px;
  219. width: 100px;
  220. color: #14928a;
  221. border: 1px solid rgba(20, 146, 138, 1);
  222. font-size: 14px;
  223. text-align: center;
  224. margin-right: 12px;
  225. &:nth-child(1) {
  226. margin-left: 47px;
  227. }
  228. }
  229. .term.active {
  230. color: #fff;
  231. background-color: #14928a;
  232. }
  233. .squrt {
  234. position: absolute;
  235. left: -25px;
  236. top: 8px;
  237. height: 34px;
  238. width: 8px;
  239. background-color: #14928a;
  240. }
  241. }
  242. .btnList {
  243. display: flex;
  244. flex-direction: row;
  245. justify-content: flex-start;
  246. align-items: center;
  247. div {
  248. margin-right: 15px;
  249. }
  250. }
  251. .newBand.close {
  252. background-color: #777;
  253. border: 1px solid #777;
  254. }
  255. }
  256. .stepbox {
  257. display: flex;
  258. flex-direction: row;
  259. justify-content: flex-start;
  260. margin-top: 30px;
  261. .stepspan {
  262. cursor: pointer;
  263. font-size: 14px;
  264. display: block;
  265. line-height: 40px;
  266. // position: relative;
  267. // z-index: 100;
  268. display: flex;
  269. flex-direction: row;
  270. // justify-content: space-between;
  271. margin-left: -17px !important;
  272. .sptep {
  273. width: 110px;
  274. height: 40px;
  275. border: 1px solid #dcdfe6;
  276. border-right: none;
  277. border-bottom: none;
  278. padding-left: 25px;
  279. border-radius: 4px 0 0 0;
  280. text-align: center;
  281. }
  282. .arrow {
  283. height: 40px;
  284. width: 17px;
  285. position: relative;
  286. top: 1px;
  287. z-index: 30;
  288. }
  289. }
  290. .stepspan.stepspan2 {
  291. position: relative;
  292. padding-right: 0;
  293. .sptep {
  294. padding-left: 12px !important;
  295. border-radius: 0 !important;
  296. }
  297. }
  298. .sptep.activestep {
  299. color: #fff;
  300. font-weight: bold;
  301. background-color: #4eada7;
  302. }
  303. }
  304. .stepcontent {
  305. border-top: 1px solid #dcdfe6;
  306. padding-top: 12px;
  307. }
  308. }
  309. </style>