teamList.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <div class="squrt"></div>
  5. 乐团管理
  6. <filter-search
  7. @reload="reloadSearch"
  8. :moreKeys="['organId']"
  9. :keys="['searchType']"
  10. />
  11. </h2>
  12. <div class="m-core">
  13. <div class="btnList" style="margin-bottom: 20px">
  14. <el-button
  15. type="primary"
  16. v-if="permission('musicGroup/createGroup')"
  17. @click="createNewTeam"
  18. >新建乐团</el-button
  19. >
  20. <!-- <div class='newBand'
  21. v-permission="'/teamBuild/trimming'"
  22. @click="resetTeam">乐团调整</div> -->
  23. </div>
  24. <save-form
  25. :inline="true"
  26. @submit="search"
  27. @reset="reset"
  28. class="topForm"
  29. ref="topForm"
  30. :model="topForm"
  31. >
  32. <el-form-item prop="teamName">
  33. <el-input
  34. v-model.trim="topForm.teamName"
  35. clearable
  36. @keyup.enter.native="search"
  37. placeholder="请输入乐团名称"
  38. ></el-input>
  39. </el-form-item>
  40. <el-form-item prop="orgin">
  41. <el-select
  42. class="multiple"
  43. v-model.trim="topForm.orgin"
  44. filterable
  45. clearable
  46. placeholder="请选择分部"
  47. >
  48. <el-option
  49. v-for="(item, index) in organList"
  50. :key="index"
  51. :label="item.name"
  52. :value="item.id"
  53. ></el-option>
  54. </el-select>
  55. </el-form-item>
  56. <el-form-item prop="status">
  57. <el-select
  58. class="multiple"
  59. v-model.trim="topForm.status"
  60. filterable
  61. clearable
  62. placeholder="请选择乐团状态"
  63. >
  64. <el-option
  65. v-for="(item, index) in nowStatus"
  66. :key="index"
  67. :label="item.label"
  68. :value="item.value"
  69. ></el-option>
  70. </el-select>
  71. </el-form-item>
  72. <!-- 收费类型 -->
  73. <el-form-item prop="payType">
  74. <el-select
  75. v-model.trim="topForm.payType"
  76. filterable
  77. placeholder="请选择收费类型"
  78. clearable
  79. >
  80. <el-option
  81. v-for="(item, index) in typeList"
  82. :key="index"
  83. :label="item.name"
  84. :value="item.id"
  85. ></el-option>
  86. </el-select>
  87. </el-form-item>
  88. <el-form-item prop="courseViewType">
  89. <el-select
  90. v-model.trim="topForm.courseViewType"
  91. filterable
  92. placeholder="请选择收费模式"
  93. clearable
  94. >
  95. <el-option
  96. :label="item.label"
  97. :value="item.value"
  98. v-for="item in courseViewTypeList"
  99. :key="item.value"
  100. ></el-option>
  101. </el-select>
  102. </el-form-item>
  103. <el-form-item prop="createTimer">
  104. <el-date-picker
  105. v-model.trim="topForm.createTimer"
  106. style="width: 420px"
  107. type="daterange"
  108. value-format="yyyy-MM-dd"
  109. range-separator="至"
  110. start-placeholder="申请开始日期"
  111. end-placeholder="申请结束日期"
  112. :picker-options="{
  113. firstDayOfWeek: 1,
  114. }"
  115. ></el-date-picker>
  116. </el-form-item>
  117. <el-form-item prop="billTimer">
  118. <el-date-picker
  119. v-model.trim="topForm.billTimer"
  120. style="width: 420px"
  121. type="daterange"
  122. value-format="yyyy-MM-dd"
  123. range-separator="至"
  124. start-placeholder="成团开始日期"
  125. end-placeholder="成团结束日期"
  126. :picker-options="{
  127. firstDayOfWeek: 1,
  128. }"
  129. ></el-date-picker>
  130. </el-form-item>
  131. <el-form-item>
  132. <el-button type="danger" native-type="submit">搜索</el-button>
  133. </el-form-item>
  134. <el-form-item>
  135. <el-button type="primary" native-type="reset">重置</el-button>
  136. </el-form-item>
  137. </save-form>
  138. <div class="tableWrap">
  139. <el-table
  140. style="width: 100%"
  141. @selection-change="handleSelectionChange"
  142. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  143. :data="tableData"
  144. >
  145. <!-- <el-table-column type="selection"
  146. :selectable="checkSelectable"
  147. width="50">
  148. </el-table-column> -->
  149. <el-table-column
  150. prop="organName"
  151. align="center"
  152. label="所属分部"
  153. ></el-table-column>
  154. <el-table-column
  155. prop="id"
  156. width="100"
  157. align="center"
  158. label="乐团编号"
  159. >
  160. <template slot-scope="scope">
  161. <copy-text>{{ scope.row.id }}</copy-text>
  162. </template>
  163. </el-table-column>
  164. <el-table-column
  165. prop="name"
  166. width="200px"
  167. align="center"
  168. label="乐团名称"
  169. >
  170. <template slot-scope="scope">
  171. <copy-text>{{ scope.row.name }}</copy-text>
  172. </template>
  173. </el-table-column>
  174. <el-table-column
  175. align="center"
  176. width="200px"
  177. prop="cooperationOrganName"
  178. max-width="274"
  179. label="合作单位"
  180. >
  181. </el-table-column>
  182. <el-table-column prop="status" align="center" label="乐团状态">
  183. <template slot-scope="scope">
  184. <div>
  185. {{ scope.row.status | musicGroupType }}
  186. </div>
  187. </template>
  188. </el-table-column>
  189. <el-table-column prop="status" align="center" label="收费模式">
  190. <template slot-scope="scope">
  191. <div>
  192. {{ scope.row.courseViewType | courseViewType }}
  193. </div>
  194. </template>
  195. </el-table-column>
  196. <el-table-column
  197. align="center"
  198. prop="chargeTypeName"
  199. label="收费类型"
  200. >
  201. </el-table-column>
  202. <el-table-column
  203. prop="educationalTeacherName"
  204. align="center"
  205. label="乐团主管"
  206. >
  207. </el-table-column>
  208. <el-table-column
  209. prop="teamTeacherName"
  210. align="center"
  211. label="运营主管"
  212. >
  213. </el-table-column>
  214. <el-table-column
  215. prop="groupMemberNum"
  216. align="center"
  217. label="成团人数"
  218. >
  219. </el-table-column>
  220. <el-table-column prop="payNum" align="center" label="在读人数">
  221. </el-table-column>
  222. <!-- <el-table-column prop="course"
  223. align='center'
  224. label="当前课时">
  225. </el-table-column> -->
  226. <el-table-column
  227. prop="createTime"
  228. width="100px"
  229. align="center"
  230. label="申请时间"
  231. >
  232. <template slot-scope="scope">
  233. <div>
  234. {{ scope.row.createTime | formatTimer }}
  235. </div>
  236. </template>
  237. </el-table-column>
  238. <el-table-column align="center" width="100px" label="成团时间">
  239. <template slot-scope="scope">
  240. <div>
  241. {{ scope.row.billStartDate | formatTimer }}
  242. </div>
  243. </template>
  244. </el-table-column>
  245. <el-table-column align="center" width="100px" label="清单状况">
  246. <template slot-scope="scope">
  247. <div>
  248. {{ scope.row.hasVerifyMusicalList ? "已确认" : "未确认" }}
  249. </div>
  250. </template>
  251. </el-table-column>
  252. <el-table-column
  253. align="center"
  254. width="220px"
  255. fixed="right"
  256. label="操作"
  257. >
  258. <template slot-scope="scope">
  259. <div>
  260. <!-- 审核中 编辑 -->
  261. <el-button
  262. type="text"
  263. v-if="
  264. scope.row.status == 'AUDIT' &&
  265. permission('musicGroup/auditSuccess')
  266. "
  267. @click="lookTeamDetail(scope.row)"
  268. >审核</el-button
  269. >
  270. <el-button
  271. type="text"
  272. v-if="
  273. scope.row.status == 'DRAFT' &&
  274. permission('musicGroup/update')
  275. "
  276. @click="lookTeamDetail(scope.row)"
  277. >编辑</el-button
  278. >
  279. <!-- 审核失败 编辑 -->
  280. <el-button
  281. type="text"
  282. v-if="
  283. scope.row.status == 'AUDIT_FAILED' &&
  284. permission('musicGroup/update')
  285. "
  286. @click="lookTeamDetail(scope.row)"
  287. >编辑</el-button
  288. >
  289. <!-- 报名中缴费中筹备中查看乐团 -->
  290. <el-button
  291. type="text"
  292. v-if="
  293. (scope.row.status == 'PRE_APPLY' ||
  294. scope.row.status == 'PAUSE' ||
  295. scope.row.status == 'PRE_BUILD_FEE' ||
  296. scope.row.status == 'PROGRESS' ||
  297. scope.row.status == 'CANCELED' ||
  298. scope.row.status == 'APPLY' ||
  299. scope.row.status == 'PAY' ||
  300. scope.row.status == 'PREPARE' ||
  301. scope.row.status == 'CLOSE' ||
  302. scope.row.status == 'FEE_AUDIT') &&
  303. permission('/resetTeaming')
  304. "
  305. @click="lookTeamDetail(scope.row)"
  306. >详情</el-button
  307. >
  308. <!-- <el-button
  309. v-if="permission('recharge/findAll')"
  310. type="text"
  311. @click="lookSteam(scope.row)"
  312. >乐团日志</el-button
  313. > -->
  314. <!-- 进行中 关闭 -->
  315. <el-button
  316. type="text"
  317. v-if="
  318. scope.row.status == 'PROGRESS' &&
  319. permission('musicGroup/closeMusicGroup')
  320. "
  321. @click="closeTeamDetail(scope.row)"
  322. >关闭</el-button
  323. >
  324. <!-- 进行中 查看 -->
  325. <!-- <el-button
  326. type="text"
  327. v-if="
  328. scope.row.status == 'PROGRESS' && permission('/teamDetails')
  329. "
  330. @click="lookTeamDetail(scope.row)"
  331. >查看</el-button
  332. > -->
  333. <el-button
  334. type="text"
  335. v-if="
  336. (scope.row.status == 'DRAFT' ||
  337. scope.row.status == 'AUDIT' ||
  338. scope.row.status == 'FEE_AUDIT' ||
  339. scope.row.status == 'APPLY' ||
  340. scope.row.status == 'PAY' ||
  341. scope.row.status == 'PRE_APPLY' ||
  342. scope.row.status == 'PRE_BUILD_FEE') &&
  343. permission('musicGroup/cancelMusicGroup')
  344. "
  345. @click="stopTeam(scope.row)"
  346. >取消乐团</el-button
  347. >
  348. <el-button
  349. v-if="
  350. scope.row.status == 'PREPARE' &&
  351. permission('musicGroup/action')
  352. "
  353. @click="startTeam(scope.row)"
  354. type="text"
  355. >确认成团</el-button
  356. >
  357. <!-- <el-button type="text"
  358. v-if="scope.row.status == 'AUDIT' && permission('musicGroup/cancelMusicGroup')"
  359. @click="stopTeam(scope.row)">取消乐团</el-button> -->
  360. <el-button
  361. v-if="
  362. scope.row.status == 'PAUSE' &&
  363. permission('musicGroup/resumeMusicGroup')
  364. "
  365. @click="onTeamOpeation('start', scope.row)"
  366. type="text"
  367. >启动</el-button
  368. >
  369. <el-button
  370. v-if="
  371. scope.row.status == 'PROGRESS' &&
  372. permission('musicGroup/pauseMusicGroup')
  373. "
  374. @click="onTeamOpeation('pause', scope.row)"
  375. type="text"
  376. >暂停</el-button
  377. >
  378. <el-button
  379. v-if="
  380. scope.row.status == 'CANCELED' &&
  381. permission('musicGroup/deleteMusicGroup')
  382. "
  383. @click="deteleTeaming(scope.row)"
  384. type="text"
  385. >删除</el-button
  386. >
  387. </div>
  388. </template>
  389. </el-table-column>
  390. </el-table>
  391. <!-- 分页器 -->
  392. <!-- 分页 -->
  393. <pagination
  394. sync
  395. :total.sync="rules.total"
  396. :page.sync="rules.page"
  397. :limit.sync="rules.limit"
  398. :page-sizes="rules.page_size"
  399. @pagination="getList"
  400. />
  401. </div>
  402. <el-dialog :visible.sync="showSteam" width="500px" title="乐团流程">
  403. <teamSteam :activeId="activeId" />
  404. <div slot="footer" class="dialog-footer">
  405. <el-button type="primary" @click="showSteam = false">确 定</el-button>
  406. </div>
  407. </el-dialog>
  408. <el-dialog :visible.sync="closeVisible" title="确认学员" width="800px">
  409. <closeStudens
  410. v-if="closeVisible"
  411. :detail="closeDetail"
  412. @close="closeVisible = false"
  413. @submited="getList"
  414. />
  415. </el-dialog>
  416. </div>
  417. </div>
  418. </template>
  419. <script>
  420. import pagination from "@/components/Pagination/index";
  421. import { getTeamList, getPayType } from "@/api/teamServer";
  422. import {
  423. getCooperation,
  424. cancelMusicGroup,
  425. startTeam,
  426. getEmployeeOrgan,
  427. pauseMusicGroup,
  428. resumeMusicGroup,
  429. deleteMusicGroup,
  430. } from "@/api/buildTeam";
  431. import { musicGroupStatus, courseViewTypeList } from "@/utils/searchArray";
  432. import { isObject } from "util";
  433. import { permission } from "@/utils/directivePage";
  434. import teamSteam from "./teamListComponent/teamSteam";
  435. import closeStudens from "../teamBuild/modals/close-studens";
  436. import { getTimes } from "@/utils";
  437. export default {
  438. name: "teamList",
  439. data() {
  440. return {
  441. courseViewTypeList,
  442. closeDetail: {},
  443. closeVisible: false,
  444. topForm: {
  445. teamName: "",
  446. status: "",
  447. payType: "",
  448. word: "",
  449. orgin: "",
  450. courseViewType: "",
  451. billTimer: [],
  452. createTimer: [],
  453. },
  454. organList: [],
  455. typeList: [], // 收费类型
  456. nowStatus: musicGroupStatus,
  457. searchLsit: [], // 存储选择后的数组
  458. tableData: [], // table数据
  459. rules: {
  460. // 分页规则
  461. limit: 10, // 限制显示条数
  462. page: 1, // 当前页
  463. total: 0, // 总条数
  464. page_size: [10, 20, 40, 50], // 选择限制显示条数
  465. },
  466. passed: [], // 传递的参数
  467. showSteam: false,
  468. activeId: null,
  469. };
  470. },
  471. components: {
  472. pagination,
  473. teamSteam,
  474. closeStudens,
  475. },
  476. mounted() {
  477. const { query } = this.$route;
  478. if (query.organId) {
  479. this.topForm.orgin = query.organId;
  480. }
  481. if (query.search) {
  482. this.topForm.teamName = query.search;
  483. }
  484. this.init();
  485. },
  486. activated() {
  487. this.init();
  488. },
  489. methods: {
  490. reloadSearch() {
  491. this.rules.page = 1;
  492. this.getList();
  493. },
  494. init() {
  495. localStorage.setItem("resetCode", "1");
  496. getEmployeeOrgan().then((res) => {
  497. if (res.code == 200) {
  498. this.organList = res.data;
  499. }
  500. });
  501. // 获取乐团收费类型
  502. getPayType().then((res) => {
  503. if (res.code == 200) {
  504. this.typeList = res.data.rows;
  505. }
  506. });
  507. // 获取乐团合作单位(学校)
  508. // getCooperation().then(res => {
  509. // })
  510. this.getList();
  511. },
  512. permission(str) {
  513. return permission(str);
  514. },
  515. reset() {
  516. this.rules.page = 1;
  517. this.$refs["topForm"].resetFields();
  518. this.getList();
  519. },
  520. search() {
  521. this.rules.page = 1;
  522. this.getList();
  523. },
  524. getList() {
  525. let { createTimer, billTimer, ...reset } = this.topForm;
  526. getTeamList({
  527. rows: this.rules.limit,
  528. page: this.rules.page,
  529. organId: this.topForm.orgin || null,
  530. chargeTypeId: this.topForm.payType || null,
  531. musicGroupName: this.topForm.teamName || null,
  532. musicGroupStatus: this.topForm.status || null,
  533. courseViewType: this.topForm.courseViewType || null,
  534. searchType: this.$route.query.searchType,
  535. ...getTimes(
  536. createTimer,
  537. ["createStartDate", "createEndDate"],
  538. "YYYY-MM-DD"
  539. ),
  540. ...getTimes(billTimer, ["billStartDate", "billEndDate"], "YYYY-MM-DD"),
  541. }).then((res) => {
  542. if (res.code == 200) {
  543. this.tableData = res.data.rows;
  544. this.rules.total = res.data.total;
  545. }
  546. });
  547. },
  548. createNewTeam() {
  549. // this.$store.dispatch("buildIndex", 0);
  550. // this.$store.dispatch("delVisitedViews", { path: "/business/teamBuild" });
  551. localStorage.removeItem(`newTeambase`);
  552. this.$router.push(
  553. {
  554. path: "/business/resetTeaming",
  555. query: { type: "newTeam", team_status: "newTeam" },
  556. },
  557. (router) => {
  558. router.meta.title = "新建乐团";
  559. }
  560. );
  561. },
  562. resetTeam() {
  563. // 这里还有勾选的乐团信息
  564. if (this.passed && this.passed.length <= 0) {
  565. this.$message.error("请至少选择一个乐团进行调整");
  566. return;
  567. }
  568. this.$router.push({
  569. path: "/business/teamDraft",
  570. query: { type: "teamList", teamList: this.passed },
  571. });
  572. },
  573. resetTeaming(row) {
  574. // 修改进行中的乐团
  575. localStorage.removeItem(`${row.id}base`);
  576. localStorage.removeItem(`${row.id}sound`);
  577. this.$nextTick((res) => {
  578. this.$router.push({
  579. path: "/business/resetTeaming",
  580. query: { type: "resetTeam", id: row.id },
  581. });
  582. });
  583. },
  584. setSearchList(obj) {
  585. //
  586. // 没有相同的key=>添加这个对象
  587. // 有相同的key => 替换这个对象
  588. if (obj.type == 1) {
  589. let flag = false;
  590. this.searchLsit = this.searchLsit.map((item) => {
  591. if (item.id == obj.id) {
  592. item = obj;
  593. flag = true;
  594. }
  595. return item;
  596. });
  597. if (!flag) {
  598. this.searchLsit.push(obj);
  599. }
  600. } else {
  601. let flag = false;
  602. this.searchLsit = this.searchLsit.map((item) => {
  603. if (item.key == obj.key) {
  604. // 多选框的再次点击=> 等于 就是删除
  605. item = obj;
  606. flag = true;
  607. }
  608. return item;
  609. });
  610. if (!flag) {
  611. this.searchLsit.push(obj);
  612. }
  613. }
  614. },
  615. closeSearch(item) {
  616. // 1.删除search里的元素
  617. if (item.type == 1) {
  618. for (let some in this.searchLsit) {
  619. if (this.searchLsit[some].id == item.id) {
  620. this.searchLsit.splice(some, 1);
  621. }
  622. }
  623. // 2.清空对应元素所对应的的值
  624. this.topForm[item.id] = "";
  625. } else {
  626. for (let i = 0; i < this.topForm[item.id].length; i++) {
  627. if (this.topForm[item.id][i] == item.value) {
  628. this.topForm[item.id].splice(i, 1);
  629. }
  630. }
  631. // 处理search
  632. for (let some in this.searchLsit) {
  633. if (
  634. this.searchLsit[some].value == item.value &&
  635. this.searchLsit[some].id == item.id
  636. ) {
  637. this.searchLsit.splice(some, 1);
  638. }
  639. // id: 'school', key: this.schools[item].text, value: val, type: 1
  640. }
  641. }
  642. },
  643. closeTeamDetail(row) {
  644. this.closeVisible = true;
  645. this.closeDetail = { ...row };
  646. },
  647. onTeamOpeation(type, row) {
  648. if (type == "start") {
  649. this.$confirm("是否确定开启乐团?", "提示", {
  650. confirmButtonText: "确定",
  651. cancelButtonText: "取消",
  652. type: "warning",
  653. })
  654. .then(() => {
  655. resumeMusicGroup({ musicGroupId: row.id }).then((res) => {
  656. if (res.code == 200) {
  657. this.$message.success("开启成功");
  658. this.getList();
  659. } else {
  660. this.$message.error(res.msg);
  661. }
  662. });
  663. })
  664. .catch(() => {});
  665. } else if (type == "pause") {
  666. this.$confirm("是否确定暂停乐团?", "提示", {
  667. confirmButtonText: "确定",
  668. cancelButtonText: "取消",
  669. type: "warning",
  670. })
  671. .then(() => {
  672. pauseMusicGroup({ musicGroupId: row.id }).then((res) => {
  673. if (res.code == 200) {
  674. this.$message.success("暂停成功");
  675. this.getList();
  676. } else {
  677. this.$message.error(res.msg);
  678. }
  679. });
  680. })
  681. .catch(() => {});
  682. }
  683. },
  684. gotoSearch() {
  685. this.$refs["topForm"].resetFields();
  686. this.searchLsit = [];
  687. },
  688. lookTeamCourse(row) {
  689. // 查看课表
  690. this.$router.push({
  691. path: "/teamListCourse",
  692. query: { id: row.id, name: row.name },
  693. });
  694. },
  695. lookTeamDetail(row) {
  696. localStorage.removeItem(`${row.id}base`);
  697. localStorage.removeItem(`${row.id}sound`);
  698. localStorage.removeItem("newTeambase");
  699. switch (row.status) {
  700. case "DRAFT": {
  701. // 编辑中
  702. this.$store.dispatch("draftIndex", 0);
  703. // teamBaseInfo
  704. // this.$router.push(
  705. // {
  706. // path: "/business/teamDraft",
  707. // query: { type: "teamDraft", id: row.id ,clear:'true'},
  708. // },
  709. // (router) => {
  710. // router.meta.title = "编辑乐团";
  711. // }
  712. // );
  713. this.$router.push(
  714. {
  715. path: "/business/resetTeaming",
  716. query: { type: "teamDraft", id: row.id, team_status: row.status },
  717. },
  718. (router) => {
  719. router.meta.title = "乐团编辑中";
  720. }
  721. );
  722. break;
  723. }
  724. case "AUDIT": {
  725. // 审核中
  726. this.$store.dispatch("draftIndex", 0);
  727. this.$router.push(
  728. {
  729. path: "/business/resetTeaming",
  730. query: {
  731. type: "teamAudit",
  732. id: row.id,
  733. clear: "true",
  734. team_status: row.status,
  735. },
  736. },
  737. (router) => {
  738. router.meta.title = "乐团审核中";
  739. }
  740. );
  741. break;
  742. }
  743. case "PRE_BUILD_FEE": {
  744. // 创建缴费中
  745. // this.$router.push({
  746. // path: "/business/createPayment",
  747. // query: { type: "PRE_BUILD_FEE", id: row.id, name: row.name },
  748. // });
  749. this.$router.push(
  750. {
  751. path: "/business/resetTeaming",
  752. query: {
  753. type: "look",
  754. id: row.id,
  755. name: row.name,
  756. team_status: "PRE_BUILD_FEE",
  757. tabrouter: 3,
  758. },
  759. },
  760. (router) => {
  761. router.meta.title = "创建缴费中";
  762. }
  763. );
  764. break;
  765. }
  766. case "FEE_AUDIT": {
  767. // 费用审核中
  768. this.$store.dispatch("draftIndex", 0);
  769. this.$router.push(
  770. {
  771. path: "/business/resetTeaming",
  772. query: {
  773. type: "feeAudit",
  774. id: row.id,
  775. clear: "true",
  776. team_status: row.status,
  777. },
  778. },
  779. (router) => {
  780. router.meta.title = "乐团费用审核中";
  781. }
  782. );
  783. break;
  784. }
  785. case "AUDIT_FAILED": {
  786. // 审核失败
  787. this.$store.dispatch("draftIndex", 0);
  788. this.$router.push(
  789. {
  790. path: "/business/resetTeaming",
  791. query: {
  792. type: "teamDraft",
  793. id: row.id,
  794. clear: "true",
  795. team_status: row.status,
  796. },
  797. },
  798. (router) => {
  799. router.meta.title = "乐团审核失败";
  800. }
  801. );
  802. break;
  803. }
  804. case "PRE_APPLY": {
  805. // 预报名
  806. this.$router.push(
  807. {
  808. path: "/business/resetTeaming",
  809. query: {
  810. type: "look",
  811. id: row.id,
  812. name: row.name,
  813. team_status: "PRE_APPLY",
  814. tabrouter: 9,
  815. },
  816. },
  817. (router) => {
  818. router.meta.title = "乐团预报名";
  819. }
  820. );
  821. // this.$router.push({
  822. // path: "/business/forecastName",
  823. // query: { id: row.id, name: row.name },
  824. // });
  825. break;
  826. }
  827. case "APPLY": {
  828. // 报名中
  829. this.$router.push(
  830. {
  831. path: `/business/resetTeaming`,
  832. query: {
  833. status: row.status,
  834. id: row.id,
  835. name: row.name,
  836. team_status: "APPLY",
  837. type: "look",
  838. tabrouter: 11,
  839. },
  840. },
  841. (router) => {
  842. router.meta.title = "乐团报名中";
  843. }
  844. );
  845. break;
  846. }
  847. case "PAY": {
  848. // 缴费中
  849. this.$router.push(
  850. {
  851. path: `/business/resetTeaming`,
  852. query: {
  853. status: row.status,
  854. id: row.id,
  855. name: row.name,
  856. team_status: "PAY",
  857. type: "look",
  858. tabrouter: 11,
  859. },
  860. },
  861. (router) => {
  862. router.meta.title = "乐团缴费中";
  863. }
  864. );
  865. break;
  866. }
  867. case "PREPARE": {
  868. // 筹备中 跳转到乐团设置界面
  869. this.$router.push(
  870. {
  871. path: `/business/resetTeaming`,
  872. query: {
  873. type: "look",
  874. status: row.status,
  875. id: row.id,
  876. name: row.name,
  877. team_status: row.status,
  878. tabrouter: 10,
  879. },
  880. },
  881. (router) => {
  882. router.meta.title = "乐团筹备中";
  883. }
  884. );
  885. break;
  886. }
  887. case "PROGRESS": {
  888. // 进行中
  889. // 调到乐团详情 teamDetails
  890. this.$router.push(
  891. {
  892. path: `/business/resetTeaming`,
  893. query: {
  894. status: row.status,
  895. id: row.id,
  896. name: row.name,
  897. organId: row.organId,
  898. type: "resetTeam",
  899. team_status: row.status,
  900. },
  901. },
  902. (router) => {
  903. router.meta.title = "乐团进行中";
  904. }
  905. );
  906. break;
  907. }
  908. case "CANCELED": {
  909. // 取消
  910. this.$router.push(
  911. {
  912. path: "/business/resetTeaming",
  913. query: {
  914. type: "teamCanceled",
  915. id: row.id,
  916. team_status: row.status,
  917. },
  918. },
  919. (router) => {
  920. router.meta.title = "取消乐团";
  921. }
  922. );
  923. break;
  924. }
  925. case "PAUSE": {
  926. // 暂停
  927. // this.$router.push({
  928. // path: `/teamLists`,
  929. // query: { status: row.status, id: row.id, name: row.name },
  930. // });
  931. this.$router.push(
  932. {
  933. path: "/business/resetTeaming",
  934. query: { type: "resetTeam", id: row.id, team_status: row.status },
  935. },
  936. (router) => {
  937. router.meta.title = "乐团暂停";
  938. }
  939. );
  940. break;
  941. }
  942. case "CLOSE": {
  943. this.$router.push(
  944. {
  945. path: `/business/resetTeaming`,
  946. query: {
  947. status: row.status,
  948. id: row.id,
  949. name: row.name,
  950. team_status: "CLOSE",
  951. type: "look",
  952. },
  953. },
  954. (router) => {
  955. router.meta.title = "乐团关闭";
  956. }
  957. );
  958. }
  959. }
  960. },
  961. checkSelectable(row) {
  962. return row.status == "PROGRESS";
  963. },
  964. handleSelectionChange(arr) {
  965. this.passed = [];
  966. for (let i in arr) {
  967. let obj = {};
  968. obj.id = arr[i].id;
  969. obj.name = arr[i].name;
  970. this.passed.push(obj);
  971. }
  972. },
  973. gotodetailList(row) {
  974. this.$router.push({
  975. path: "/teamListedList",
  976. query: { id: row.id },
  977. });
  978. },
  979. //
  980. lookTeamInfo(row) {
  981. localStorage.removeItem(`${row.id}base`);
  982. localStorage.removeItem(`${row.id}sound`);
  983. this.$router.push({
  984. path: "/business/teamLookBase",
  985. query: {
  986. type: "look",
  987. id: row.id,
  988. name: row.name,
  989. team_status: row.status,
  990. },
  991. });
  992. },
  993. // setImprovement 设置基础技能班
  994. gotoImprovement(row) {
  995. let search = JSON.stringify(this.topForm);
  996. let rules = JSON.stringify(this.rules);
  997. this.$router.push({
  998. path: "/business/setImprovement",
  999. query: { id: row.id },
  1000. });
  1001. },
  1002. // 停止乐团
  1003. stopTeam(row) {
  1004. this.$confirm("您确定取消申请乐团?", "提示", {
  1005. confirmButtonText: "确定",
  1006. cancelButtonText: "取消",
  1007. type: "warning",
  1008. })
  1009. .then(() => {
  1010. cancelMusicGroup({
  1011. musicGroupId: row.id,
  1012. }).then((res) => {
  1013. if (res.code == 200) {
  1014. this.$message.success("停止成功");
  1015. this.getList();
  1016. }
  1017. });
  1018. })
  1019. .catch(() => {});
  1020. },
  1021. // 确认成团
  1022. startTeam(row) {
  1023. this.$confirm("是否确定成团?", "提示", {
  1024. confirmButtonText: "确定",
  1025. cancelButtonText: "取消",
  1026. type: "warning",
  1027. })
  1028. .then(() => {
  1029. startTeam({ musicGroupId: row.id }).then((res) => {
  1030. if (res.code == 200) {
  1031. this.$message.success("开启乐团成功");
  1032. this.getList();
  1033. }
  1034. });
  1035. })
  1036. .catch(() => {});
  1037. },
  1038. deteleTeaming(row) {
  1039. this.$confirm("您确定删除该乐团?", "提示", {
  1040. confirmButtonText: "确定",
  1041. cancelButtonText: "取消",
  1042. type: "warning",
  1043. })
  1044. .then(() => {
  1045. deleteMusicGroup({
  1046. musicGroupId: row.id,
  1047. }).then((res) => {
  1048. if (res.code == 200) {
  1049. this.$message.success("删除成功");
  1050. this.getList();
  1051. }
  1052. });
  1053. })
  1054. .catch(() => {});
  1055. },
  1056. lookSteam(row) {
  1057. this.activeId = row.id;
  1058. this.showSteam = true;
  1059. },
  1060. gotoSigin(row) {
  1061. this.$router.push(
  1062. {
  1063. path: `/business/remedy`,
  1064. query: { status: row.status, id: row.id, name: row.name },
  1065. },
  1066. (router) => {
  1067. router.meta.title = "报名详情";
  1068. }
  1069. );
  1070. },
  1071. },
  1072. watch: {
  1073. showSteam(val) {
  1074. if (!val) {
  1075. this.activeId = null;
  1076. }
  1077. },
  1078. },
  1079. };
  1080. </script>
  1081. <style lang="scss" scoped>
  1082. /deep/.el-button + .el-button {
  1083. margin-left: 0px;
  1084. }
  1085. .select {
  1086. font-size: 14px;
  1087. }
  1088. .btnList {
  1089. display: flex;
  1090. flex-direction: row;
  1091. justify-content: flex-start;
  1092. align-items: center;
  1093. div {
  1094. margin-right: 15px;
  1095. }
  1096. }
  1097. </style>