index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. <template>
  2. <div class="m-container">
  3. <h2 class="musicGroupInfo">
  4. <el-page-header @back="onCancel">
  5. <template slot="content">
  6. <div class="page-headers">
  7. <p>{{ teamName }}</p>
  8. <p v-if="teamid" class="page-headers-id">({{ teamid }})</p>
  9. <span class="musicGroupStatus"
  10. ><img
  11. :src="stepImgs[team_status]"
  12. alt=""
  13. v-if="stepImgs[team_status]"
  14. />
  15. {{ musicGroupType[team_status] }}</span
  16. >
  17. </div>
  18. </template>
  19. </el-page-header>
  20. <div class="musicGroupOperation">
  21. <!-- 进行中才有乐团档案 -->
  22. <span
  23. class="item"
  24. @click="gotoArchices"
  25. v-if="permission('/musicArchices') && team_status == 'PROGRESS'"
  26. >
  27. 乐团档案
  28. </span>
  29. <i
  30. class="line"
  31. v-if="
  32. permission('/musicArchices') &&
  33. team_status == 'PROGRESS' &&
  34. permission('recharge/findAll')
  35. "
  36. ></i>
  37. <span
  38. class="item"
  39. @click="journalVisible = true"
  40. v-if="permission('recharge/findAll')"
  41. >操作日志</span
  42. >
  43. <!-- <div
  44. class="hearConcat"`
  45. @click="gotoArchices"
  46. v-if="permission('/musicArchices')"
  47. >
  48. <el-tooltip placement="top" popper-class="mTooltip">
  49. <div slot="content">乐团档案</div>
  50. <div class="titleWrap">
  51. <p>{{ teamName }}</p>
  52. <img :src="archices" alt="" class="archices" />
  53. </div>
  54. </el-tooltip>
  55. </div> -->
  56. </div>
  57. </h2>
  58. <el-dialog
  59. title="操作日志"
  60. :visible.sync="journalVisible"
  61. width="1000px"
  62. v-if="journalVisible"
  63. append-to-body
  64. >
  65. <teamJournal :teamid="teamid" />
  66. </el-dialog>
  67. <div class="m-core">
  68. <!-- <el-popover
  69. placement="left"
  70. :append-to-body="false"
  71. width="1000"
  72. trigger="hover"
  73. ref="popover"
  74. :open-delay="500"
  75. @show="setpopover()"
  76. >
  77. <teamJournal :teamid="teamid" />
  78. <p slot="reference" class="msg" :class="team_status">
  79. <img
  80. :src="stepImgs[team_status]"
  81. alt=""
  82. v-if="stepImgs[team_status]"
  83. />
  84. {{ musicGroupType[team_status] }}
  85. </p>
  86. </el-popover> -->
  87. <!-- navMenu -->
  88. <tab-router
  89. v-model="activeIndex"
  90. type="card"
  91. ref="tab"
  92. :before-leave="checkGoTo"
  93. >
  94. <!-- @tab-click="handleClick" -->
  95. <el-tab-pane
  96. label="基本信息"
  97. lazy
  98. v-if="permission('/teamBaseInfo')"
  99. name="1"
  100. >
  101. <!-- v-if="activeIndex == 'teamBaseInfo'" -->
  102. <teamBaseInfo
  103. ref="teamBaseInfo"
  104. v-if="activeIndex == '1'"
  105. @getBaseInfo="getBaseInfo"
  106. :baseInfo="baseInfo"
  107. @getName="getName"
  108. @handleClick="handleClick"
  109. />
  110. </el-tab-pane>
  111. <el-tab-pane
  112. label="声部设置"
  113. lazy
  114. v-if="permission('/teamSoundMoney')"
  115. name="2"
  116. :disabled="!teamid"
  117. >
  118. <resetSound v-if="activeIndex == '2'" @handleClick="handleClick" />
  119. </el-tab-pane>
  120. <el-tab-pane
  121. label="缴费设置"
  122. lazy
  123. v-if="permission('/teamStudentPayList')"
  124. name="3"
  125. :disabled="!teamid"
  126. >
  127. <resetPayList
  128. v-if="activeIndex == '3'"
  129. @changeActive="handleClick"
  130. @getBaseInfo="getBaseInfo"
  131. />
  132. </el-tab-pane>
  133. <el-tab-pane
  134. lazy
  135. label="预报名信息"
  136. name="9"
  137. :disabled="!teamid"
  138. v-if="permission('/teamForecastNameIndex')"
  139. >
  140. <!-- v-if="
  141. team_status == 'PRE_APPLY' ||
  142. team_status == 'DRAFT' ||
  143. team_status == 'FEE_AUDIT' ||
  144. team_status == 'APPLY'
  145. " -->
  146. <forecastNameList
  147. v-if="activeIndex == '9'"
  148. @changeActive="handleClick"
  149. :isedit="team_status == 'PRE_APPLY'"
  150. />
  151. </el-tab-pane>
  152. <!-- <el-tab-pane
  153. label="学校缴费设置"
  154. lazy
  155. v-if="permission('/teamSchoolPayList')"
  156. name="6"
  157. :disabled="!teamid"
  158. >
  159. <resetPayListSchool
  160. v-if="activeIndex == '6'"
  161. @changeActive="handleClick"
  162. @getBaseInfo="getBaseInfo"
  163. />
  164. </el-tab-pane> -->
  165. <el-tab-pane
  166. label="报名缴费"
  167. :disabled="!teamid"
  168. name="11"
  169. v-if="permission('/teamSignupList')"
  170. >
  171. <teamSignupList :teamid="teamid" v-if="activeIndex == 11" />
  172. </el-tab-pane>
  173. <el-tab-pane
  174. lazy
  175. label="乐器清单"
  176. name="10"
  177. :disabled="!teamid"
  178. v-if="permission('/teamMusicList')"
  179. >
  180. <musicOrder v-if="activeIndex == '10'" />
  181. </el-tab-pane>
  182. <el-tab-pane
  183. label="老师列表"
  184. v-if="permission('/teamTeacherList')"
  185. name="4"
  186. :disabled="!teamid"
  187. >
  188. <teacherList :teamid="teamid" v-if="activeIndex == '4'" />
  189. </el-tab-pane>
  190. <el-tab-pane
  191. label="学生列表"
  192. v-if="permission('/teamStudentList')"
  193. name="7"
  194. :disabled="!teamid"
  195. >
  196. <studentList :teamid="teamid" v-if="activeIndex == '7'" />
  197. </el-tab-pane>
  198. <el-tab-pane
  199. label="待激活学练宝"
  200. v-if="permission('/giveMemberList')"
  201. name="13"
  202. :disabled="!teamid"
  203. >
  204. <giveMemberList :teamid="teamid" v-if="activeIndex == '13'" />
  205. </el-tab-pane>
  206. <el-tab-pane
  207. label="剩余时长"
  208. lazy
  209. v-if="permission('/teamRemainTime')"
  210. name="12"
  211. :disabled="!teamid"
  212. >
  213. <teamRemainTime
  214. v-if="activeIndex == '12' && musicGroupInfo"
  215. :musicGroupInfo="musicGroupInfo"
  216. />
  217. </el-tab-pane>
  218. <el-tab-pane
  219. label="班级列表"
  220. lazy
  221. v-if="permission('/teamClassListInfo')"
  222. name="5"
  223. :disabled="!teamid"
  224. >
  225. <resetClass
  226. v-if="activeIndex == '5' && musicGroupInfo"
  227. :musicGroupInfo="musicGroupInfo"
  228. />
  229. </el-tab-pane>
  230. <el-tab-pane
  231. label="课表详情"
  232. lazy
  233. v-if="permission('/teamCourseListInfo')"
  234. name="8"
  235. :disabled="!teamid"
  236. >
  237. <courseList v-if="activeIndex == '8'" :teamid="teamid" />
  238. </el-tab-pane>
  239. <!-- v-if="permission('/resetTeaming/coursePlan')" -->
  240. <el-tab-pane label="转换记录" :disabled="!teamid" name="14">
  241. <convertList :teamid="teamid" v-if="activeIndex == 14" />
  242. </el-tab-pane>
  243. </tab-router>
  244. </div>
  245. </div>
  246. </template>
  247. <script>
  248. import teamBaseInfo from "@/views/teamBuild/components/teamBaseInfo";
  249. // import resetSound from "@/views/resetTeaming/components/resetSoundv2";
  250. import resetSound from "@/views/teamBuild/components/teamSoundSet";
  251. import resetClass from "@/views/teamDetail/components/resetClass";
  252. // import coursePlan from '@/views/teamBuild/teamSeting/components/coursePlan'
  253. // import lookCourse from '@/views/teamBuild/teamSeting/components/lookCourse'
  254. // import improvement from '@/views/teamBuild/teamSeting/components/improvementClass'
  255. import teamSignupList from "@/views/teamBuild/signupList";
  256. import resetPayList from "@/views/resetTeaming/components/resetPayList";
  257. import resetPayListSchool from "@/views/resetTeaming/components/resetPayListSchool";
  258. import studentPayBase from "@/views/resetTeaming/components/studentPayBase";
  259. import musicArchives from "@/views/resetTeaming/components/musicArchices";
  260. import studentList from "@/views/teamDetail/components/studentList";
  261. import teacherList from "@/views/teamDetail/components/teacherList";
  262. import courseList from "@/views/teamDetail/components/courseList";
  263. import giveMemberList from "@/views/resetTeaming/components/giveMemberList";
  264. import forecastNameList from "@/views/teamBuild/forecastNameList";
  265. // import forecastName from "@/views/teamBuild/forecastName";
  266. import musicOrder from "@/views/teamDetail/teamDetailedList";
  267. import teamJournal from "@/views/teamBuild/components/teamJournal";
  268. import teamRemainTime from "@/views/teamBuild/components/teamRemainTime";
  269. import convertList from "@/views/teamDetail/components/convertList";
  270. import merge from "webpack-merge";
  271. import { permission } from "@/utils/directivePage";
  272. import { getTeamBaseInfo } from "@/api/buildTeam";
  273. import { musicGroupType } from "@/constant";
  274. // forecastName,
  275. export default {
  276. components: {
  277. teamBaseInfo,
  278. resetSound,
  279. resetClass,
  280. resetPayList,
  281. resetPayListSchool,
  282. studentPayBase,
  283. studentList,
  284. teacherList,
  285. courseList,
  286. musicOrder,
  287. teamJournal,
  288. teamRemainTime,
  289. teamSignupList,
  290. musicArchives,
  291. forecastNameList,
  292. giveMemberList,
  293. convertList
  294. },
  295. name: "resetTeaming",
  296. data() {
  297. return {
  298. visible: false,
  299. activeIndex: "1",
  300. teamid: "",
  301. journalVisible: false,
  302. baseInfo: null,
  303. // permissionStatus: {
  304. // teamBaseInfo: true,
  305. // resetSound: true,
  306. // resetClass: true,
  307. // resetSound: true,
  308. // coursePlan: true,
  309. // }
  310. name: null,
  311. teamName: "新建乐团",
  312. musicGroupInfo: null,
  313. musicGroupType,
  314. team_status: "",
  315. archices: require("@/assets/images/base/archices.png"),
  316. stepImgs: {
  317. AUDIT_FAILED: require("./images/7.png"),
  318. CANCELED: require("./images/10.png"),
  319. CLOSE: require("./images/8.png"),
  320. PAUSE: require("./images/9.png"),
  321. PROGRESS: require("./images/13.png"),
  322. DRAFT: require("./images/2.png"),
  323. AUDIT: require("./images/1.png"),
  324. PRE_APPLY: require("./images/3.png"),
  325. DRAFT: require("./images/5.png"),
  326. FEE_AUDIT: require("./images/6.png"),
  327. FEE_AUDIT_FAILED: require("./images/6.png"),
  328. APPLY: require("./images/4.png"),
  329. PAY: require("./images/12.png"),
  330. PREPARE: require("./images/11.png")
  331. }
  332. };
  333. },
  334. created() {
  335. // this.__init()
  336. },
  337. beforeDestroy() {
  338. // localStorage.setItem('setStep', 0)
  339. // localStorage.setItem('resetCode', 1)
  340. //
  341. },
  342. mounted() {
  343. // let obj = {}
  344. // obj.name = this.activeIndex
  345. // console.log(this.activeIndex)
  346. // this.handleClick(obj)
  347. this.__init();
  348. // console.log('权限',this.permission('/musicArchices'))
  349. },
  350. async beforeRouteLeave(to, from, next) {
  351. if (this.activeIndex == 1) {
  352. // console.log(await this.$refs.teamBaseInfo.setStore('go'))
  353. if (await this.$refs.teamBaseInfo.setStore("go")) {
  354. next();
  355. }
  356. } else {
  357. next();
  358. }
  359. },
  360. // activated () {
  361. // let obj = {}
  362. // obj.name = this.activeIndex
  363. // this.handleClick(obj)
  364. // this.__init()
  365. // },
  366. methods: {
  367. __init() {
  368. // this.activeIndex = localStorage.getItem('resetCode') || '1';
  369. this.teamid = this.$route.query.id;
  370. this.team_status = this.$route.query.team_status;
  371. if (this.$route.query.tabrouter != 1 && this.teamid) {
  372. getTeamBaseInfo({ musicGroupId: this.teamid }).then(res => {
  373. if (res.code == 200) {
  374. this.getBaseInfo(res.data);
  375. }
  376. });
  377. }
  378. },
  379. onCancel() {
  380. this.$store.dispatch("delVisitedViews", this.$route);
  381. this.$router.push({ path: "/teamList" });
  382. },
  383. getBaseInfo(baseInfo) {
  384. if (baseInfo) {
  385. this.baseInfo = baseInfo;
  386. if (baseInfo?.musicGroup?.name) {
  387. this.teamName = baseInfo?.musicGroup?.name;
  388. }
  389. this.musicGroupInfo = baseInfo?.musicGroup;
  390. // 在这里刷新一下 乐团状态 改变url
  391. // query: merge(this.$route.query, {
  392. // type: "teamDraft",
  393. // id: res.data,
  394. // team_status: "DRAFT",
  395. // }),
  396. this.$router.push({
  397. query: merge(this.$route.query, {
  398. ...this.$route.query,
  399. team_status: this.musicGroupInfo.status
  400. })
  401. });
  402. this.team_status = this.$route.query.team_status;
  403. // console.log(this.musicGroupInfo.status);
  404. } else {
  405. this.__init();
  406. }
  407. },
  408. handleClick(val) {
  409. console.log(val, "val");
  410. this.teamid = this.$route.query.id;
  411. // if (val.name != 1 && this.$refs.teamBaseInfo) {
  412. // await this.$refs.teamBaseInfo.setStore();
  413. // this.activeIndex = val.name
  414. // }else{
  415. // this.activeIndex = val.name
  416. // }
  417. // this.team_status = this.$route.query.team_status;
  418. // console.log('切换tab',val)
  419. this.$refs.tab.tab(val);
  420. },
  421. permission(str) {
  422. return permission(str);
  423. },
  424. getName(val) {
  425. if (val) {
  426. this.teamName = val;
  427. }
  428. this.teamid = this.$route.query.id;
  429. },
  430. checkGoTo() {
  431. var p = new Promise(async (resolve, reject) => {
  432. if (this.activeIndex == 1 && this.$refs.teamBaseInfo) {
  433. if (await this.$refs.teamBaseInfo.setStore("go")) {
  434. resolve();
  435. }
  436. } else {
  437. resolve();
  438. }
  439. });
  440. return p;
  441. },
  442. setpopover(scope) {
  443. this.$nextTick(() => {
  444. // this.visible = true;
  445. this.$refs.popover.updatePopper();
  446. });
  447. },
  448. gotoArchices() {
  449. console.log("跳转");
  450. this.$router.push({
  451. path: "/business/musicArchices",
  452. query: { ...this.$route.query }
  453. });
  454. }
  455. },
  456. watch: {
  457. // async activeIndex(val){
  458. // if(val != 1&&this.$refs.teamBaseInfo){
  459. // await this.$refs.teamBaseInfo.setStore();
  460. // }
  461. // }
  462. }
  463. };
  464. </script>
  465. <style lang="scss" scoped>
  466. .musicGroupInfo {
  467. justify-content: space-between;
  468. }
  469. .page-headers {
  470. display: flex;
  471. align-items: center;
  472. }
  473. .page-headers-id {
  474. font-size: 16px;
  475. font-weight: 400;
  476. }
  477. .musicGroupStatus {
  478. display: flex;
  479. align-items: center;
  480. font-size: 22px;
  481. color: #262626;
  482. img {
  483. margin: 0 10px 0 40px;
  484. width: 27px;
  485. height: 27px;
  486. }
  487. }
  488. .musicGroupOperation {
  489. display: flex;
  490. align-items: center;
  491. .item {
  492. font-size: 16px;
  493. font-weight: 400;
  494. color: var(--color-primary);
  495. line-height: 22px;
  496. cursor: pointer;
  497. }
  498. .line {
  499. display: inline-block;
  500. width: 1px;
  501. height: 16px;
  502. background: #dddfe6;
  503. margin: 0 10px;
  504. padding: 0;
  505. }
  506. }
  507. .msg.PAY {
  508. color: #f85043;
  509. }
  510. .msg.APPLY {
  511. color: #f97215;
  512. }
  513. .msg.AUDIT_FAILED,
  514. .msg.CANCELED,
  515. .msg.CLOSE,
  516. .msg.PAUSE {
  517. color: #777;
  518. }
  519. .msg {
  520. color: var(--color-primary);
  521. text-align: right;
  522. // color: #777;
  523. font-size: 32px;
  524. font-weight: bold;
  525. cursor: pointer;
  526. position: absolute;
  527. right: 40px;
  528. top: -55px;
  529. z-index: 990;
  530. img {
  531. width: 36px;
  532. height: 36px;
  533. position: relative;
  534. top: 5px;
  535. margin-right: 8px;
  536. }
  537. }
  538. .archices {
  539. width: 24px;
  540. height: 24px;
  541. margin-left: 10px;
  542. cursor: pointer;
  543. }
  544. .hearConcat {
  545. cursor: pointer;
  546. display: flex;
  547. flex-direction: row;
  548. align-items: center;
  549. img {
  550. width: 24px;
  551. height: 24px;
  552. position: relative;
  553. top: 0px;
  554. margin-right: 8px;
  555. }
  556. }
  557. ::v-deep .el-page-header__left {
  558. align-items: center;
  559. }
  560. .archicesName {
  561. cursor: pointer;
  562. }
  563. .titleWrap {
  564. display: flex;
  565. flex-direction: row;
  566. align-items: center;
  567. }
  568. </style>