teamList.vue 29 KB

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