index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  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. :isedit="team_status == 'PRE_APPLY'"
  149. />
  150. </el-tab-pane>
  151. <!-- <el-tab-pane
  152. label="学校缴费设置"
  153. lazy
  154. v-if="permission('/teamSchoolPayList')"
  155. name="6"
  156. :disabled="!teamid"
  157. >
  158. <resetPayListSchool
  159. v-if="activeIndex == '6'"
  160. @changeActive="handleClick"
  161. @getBaseInfo="getBaseInfo"
  162. />
  163. </el-tab-pane> -->
  164. <el-tab-pane
  165. label="报名缴费"
  166. :disabled="!teamid"
  167. name="11"
  168. v-if="permission('/teamSignupList')"
  169. >
  170. <teamSignupList :teamid="teamid" v-if="activeIndex == 11" />
  171. </el-tab-pane>
  172. <el-tab-pane
  173. lazy
  174. label="收货地址"
  175. name="10"
  176. :disabled="!teamid"
  177. v-if="permission('/teamMusicList')"
  178. >
  179. <musicOrder v-if="activeIndex == '10'" />
  180. </el-tab-pane>
  181. <el-tab-pane
  182. label="老师列表"
  183. v-if="permission('/teamTeacherList')"
  184. name="4"
  185. :disabled="!teamid"
  186. >
  187. <teacherList :teamid="teamid" v-if="activeIndex == '4'" />
  188. </el-tab-pane>
  189. <el-tab-pane
  190. label="学生列表"
  191. v-if="permission('/teamStudentList')"
  192. name="7"
  193. :disabled="!teamid"
  194. >
  195. <studentList :teamid="teamid" v-if="activeIndex == '7'" />
  196. </el-tab-pane>
  197. <el-tab-pane
  198. label="待激活团练宝"
  199. v-if="permission('/giveMemberList')"
  200. name="13"
  201. :disabled="!teamid"
  202. >
  203. <giveMemberList :teamid="teamid" v-if="activeIndex == '13'" />
  204. </el-tab-pane>
  205. <el-tab-pane
  206. label="剩余时长"
  207. lazy
  208. v-if="permission('/teamRemainTime')"
  209. name="12"
  210. :disabled="!teamid"
  211. >
  212. <teamRemainTime
  213. v-if="activeIndex == '12' && musicGroupInfo"
  214. :musicGroupInfo="musicGroupInfo"
  215. />
  216. </el-tab-pane>
  217. <el-tab-pane
  218. label="班级列表"
  219. lazy
  220. v-if="permission('/teamClassListInfo')"
  221. name="5"
  222. :disabled="!teamid"
  223. >
  224. <resetClass
  225. v-if="activeIndex == '5' && musicGroupInfo"
  226. :musicGroupInfo="musicGroupInfo"
  227. />
  228. </el-tab-pane>
  229. <el-tab-pane
  230. label="课表详情"
  231. lazy
  232. v-if="permission('/teamCourseListInfo')"
  233. name="8"
  234. :disabled="!teamid"
  235. >
  236. <courseList v-if="activeIndex == '8'" :teamid="teamid" />
  237. </el-tab-pane>
  238. <!-- v-if="permission('/resetTeaming/coursePlan')" -->
  239. <el-tab-pane label="转换记录" :disabled="!teamid" name="14">
  240. <convertList :teamid="teamid" v-if="activeIndex == 14" />
  241. </el-tab-pane>
  242. </tab-router>
  243. </div>
  244. </div>
  245. </template>
  246. <script>
  247. import teamBaseInfo from "@/views/teamBuild/components/teamBaseInfo";
  248. // import resetSound from "@/views/resetTeaming/components/resetSoundv2";
  249. import resetSound from "@/views/teamBuild/components/teamSoundSet";
  250. import resetClass from "@/views/teamDetail/components/resetClass";
  251. // import coursePlan from '@/views/teamBuild/teamSeting/components/coursePlan'
  252. // import lookCourse from '@/views/teamBuild/teamSeting/components/lookCourse'
  253. // import improvement from '@/views/teamBuild/teamSeting/components/improvementClass'
  254. import teamSignupList from "@/views/teamBuild/signupList";
  255. import resetPayList from "@/views/resetTeaming/components/resetPayList";
  256. import resetPayListSchool from "@/views/resetTeaming/components/resetPayListSchool";
  257. import studentPayBase from "@/views/resetTeaming/components/studentPayBase";
  258. import musicArchives from "@/views/resetTeaming/components/musicArchices";
  259. import studentList from "@/views/teamDetail/components/studentList";
  260. import teacherList from "@/views/teamDetail/components/teacherList";
  261. import courseList from "@/views/teamDetail/components/courseList";
  262. import giveMemberList from "@/views/resetTeaming/components/giveMemberList";
  263. import forecastNameList from "@/views/teamBuild/forecastNameList";
  264. // import forecastName from "@/views/teamBuild/forecastName";
  265. import musicOrder from "@/views/teamDetail/teamDetailedList";
  266. import teamJournal from "@/views/teamBuild/components/teamJournal";
  267. import teamRemainTime from "@/views/teamBuild/components/teamRemainTime";
  268. import convertList from "@/views/teamDetail/components/convertList";
  269. import merge from "webpack-merge";
  270. import { permission } from "@/utils/directivePage";
  271. import { getTeamBaseInfo } from "@/api/buildTeam";
  272. import { musicGroupType } from "@/constant";
  273. // forecastName,
  274. export default {
  275. components: {
  276. teamBaseInfo,
  277. resetSound,
  278. resetClass,
  279. resetPayList,
  280. resetPayListSchool,
  281. studentPayBase,
  282. studentList,
  283. teacherList,
  284. courseList,
  285. musicOrder,
  286. teamJournal,
  287. teamRemainTime,
  288. teamSignupList,
  289. musicArchives,
  290. forecastNameList,
  291. giveMemberList,
  292. convertList
  293. },
  294. name: "resetTeaming",
  295. data() {
  296. return {
  297. visible: false,
  298. activeIndex: "1",
  299. teamid: "",
  300. journalVisible: false,
  301. baseInfo: null,
  302. // permissionStatus: {
  303. // teamBaseInfo: true,
  304. // resetSound: true,
  305. // resetClass: true,
  306. // resetSound: true,
  307. // coursePlan: true,
  308. // }
  309. name: null,
  310. teamName: "新建乐团",
  311. musicGroupInfo: null,
  312. musicGroupType,
  313. team_status: "",
  314. archices: require("@/assets/images/base/archices.png"),
  315. stepImgs: {
  316. AUDIT_FAILED: require("./images/7.png"),
  317. CANCELED: require("./images/10.png"),
  318. CLOSE: require("./images/8.png"),
  319. PAUSE: require("./images/9.png"),
  320. PROGRESS: require("./images/13.png"),
  321. DRAFT: require("./images/2.png"),
  322. AUDIT: require("./images/1.png"),
  323. PRE_APPLY: require("./images/3.png"),
  324. DRAFT: require("./images/5.png"),
  325. FEE_AUDIT: require("./images/6.png"),
  326. FEE_AUDIT_FAILED: require("./images/6.png"),
  327. APPLY: require("./images/4.png"),
  328. PAY: require("./images/12.png"),
  329. PREPARE: require("./images/11.png")
  330. }
  331. };
  332. },
  333. created() {
  334. // this.__init()
  335. },
  336. beforeDestroy() {
  337. // localStorage.setItem('setStep', 0)
  338. // localStorage.setItem('resetCode', 1)
  339. //
  340. },
  341. mounted() {
  342. // let obj = {}
  343. // obj.name = this.activeIndex
  344. // console.log(this.activeIndex)
  345. // this.handleClick(obj)
  346. this.__init();
  347. // console.log('权限',this.permission('/musicArchices'))
  348. },
  349. async beforeRouteLeave(to, from, next) {
  350. if (this.activeIndex == 1) {
  351. // console.log(await this.$refs.teamBaseInfo.setStore('go'))
  352. if (await this.$refs.teamBaseInfo.setStore("go")) {
  353. next();
  354. }
  355. } else {
  356. next();
  357. }
  358. },
  359. // activated () {
  360. // let obj = {}
  361. // obj.name = this.activeIndex
  362. // this.handleClick(obj)
  363. // this.__init()
  364. // },
  365. methods: {
  366. __init() {
  367. // this.activeIndex = localStorage.getItem('resetCode') || '1';
  368. this.teamid = this.$route.query.id;
  369. this.team_status = this.$route.query.team_status;
  370. if (this.$route.query.tabrouter != 1 && this.teamid) {
  371. getTeamBaseInfo({ musicGroupId: this.teamid }).then(res => {
  372. if (res.code == 200) {
  373. this.getBaseInfo(res.data);
  374. }
  375. });
  376. }
  377. },
  378. onCancel() {
  379. this.$store.dispatch("delVisitedViews", this.$route);
  380. this.$router.push({ path: "/teamList" });
  381. },
  382. getBaseInfo(baseInfo) {
  383. if (baseInfo) {
  384. this.baseInfo = baseInfo;
  385. if (baseInfo?.musicGroup?.name) {
  386. this.teamName = baseInfo?.musicGroup?.name;
  387. }
  388. this.musicGroupInfo = baseInfo?.musicGroup;
  389. // 在这里刷新一下 乐团状态 改变url
  390. // query: merge(this.$route.query, {
  391. // type: "teamDraft",
  392. // id: res.data,
  393. // team_status: "DRAFT",
  394. // }),
  395. this.$router.push({
  396. query: merge(this.$route.query, {
  397. ...this.$route.query,
  398. team_status: this.musicGroupInfo.status
  399. })
  400. });
  401. this.team_status = this.$route.query.team_status;
  402. // console.log(this.musicGroupInfo.status);
  403. } else {
  404. this.__init();
  405. }
  406. },
  407. handleClick(val) {
  408. this.teamid = this.$route.query.id;
  409. // if (val.name != 1 && this.$refs.teamBaseInfo) {
  410. // await this.$refs.teamBaseInfo.setStore();
  411. // this.activeIndex = val.name
  412. // }else{
  413. // this.activeIndex = val.name
  414. // }
  415. // this.team_status = this.$route.query.team_status;
  416. // console.log('切换tab',val)
  417. this.$refs.tab.tab(val);
  418. },
  419. permission(str) {
  420. return permission(str);
  421. },
  422. getName(val) {
  423. if (val) {
  424. this.teamName = val;
  425. }
  426. this.teamid = this.$route.query.id;
  427. },
  428. checkGoTo() {
  429. var p = new Promise(async (resolve, reject) => {
  430. if (this.activeIndex == 1 && this.$refs.teamBaseInfo) {
  431. if (await this.$refs.teamBaseInfo.setStore("go")) {
  432. resolve();
  433. }
  434. } else {
  435. resolve();
  436. }
  437. });
  438. return p;
  439. },
  440. setpopover(scope) {
  441. this.$nextTick(() => {
  442. // this.visible = true;
  443. this.$refs.popover.updatePopper();
  444. });
  445. },
  446. gotoArchices() {
  447. console.log("跳转");
  448. this.$router.push({
  449. path: "/business/musicArchices",
  450. query: { ...this.$route.query }
  451. });
  452. }
  453. },
  454. watch: {
  455. // async activeIndex(val){
  456. // if(val != 1&&this.$refs.teamBaseInfo){
  457. // await this.$refs.teamBaseInfo.setStore();
  458. // }
  459. // }
  460. }
  461. };
  462. </script>
  463. <style lang="scss" scoped>
  464. .musicGroupInfo {
  465. justify-content: space-between;
  466. }
  467. .page-headers {
  468. display: flex;
  469. align-items: center;
  470. }
  471. .page-headers-id {
  472. font-size: 16px;
  473. font-weight: 400;
  474. }
  475. .musicGroupStatus {
  476. display: flex;
  477. align-items: center;
  478. font-size: 22px;
  479. color: #262626;
  480. img {
  481. margin: 0 10px 0 40px;
  482. width: 27px;
  483. height: 27px;
  484. }
  485. }
  486. .musicGroupOperation {
  487. display: flex;
  488. align-items: center;
  489. .item {
  490. font-size: 16px;
  491. font-weight: 400;
  492. color: var(--color-primary);
  493. line-height: 22px;
  494. cursor: pointer;
  495. }
  496. .line {
  497. display: inline-block;
  498. width: 1px;
  499. height: 16px;
  500. background: #dddfe6;
  501. margin: 0 10px;
  502. padding: 0;
  503. }
  504. }
  505. .msg.PAY {
  506. color: #f85043;
  507. }
  508. .msg.APPLY {
  509. color: #f97215;
  510. }
  511. .msg.AUDIT_FAILED,
  512. .msg.CANCELED,
  513. .msg.CLOSE,
  514. .msg.PAUSE {
  515. color: #777;
  516. }
  517. .msg {
  518. color: var(--color-primary);
  519. text-align: right;
  520. // color: #777;
  521. font-size: 32px;
  522. font-weight: bold;
  523. cursor: pointer;
  524. position: absolute;
  525. right: 40px;
  526. top: -55px;
  527. z-index: 990;
  528. img {
  529. width: 36px;
  530. height: 36px;
  531. position: relative;
  532. top: 5px;
  533. margin-right: 8px;
  534. }
  535. }
  536. .archices {
  537. width: 24px;
  538. height: 24px;
  539. margin-left: 10px;
  540. cursor: pointer;
  541. }
  542. .hearConcat {
  543. cursor: pointer;
  544. display: flex;
  545. flex-direction: row;
  546. align-items: center;
  547. img {
  548. width: 24px;
  549. height: 24px;
  550. position: relative;
  551. top: 0px;
  552. margin-right: 8px;
  553. }
  554. }
  555. ::v-deep .el-page-header__left {
  556. align-items: center;
  557. }
  558. .archicesName {
  559. cursor: pointer;
  560. }
  561. .titleWrap {
  562. display: flex;
  563. flex-direction: row;
  564. align-items: center;
  565. }
  566. </style>