teamList.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978
  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. <el-button
  227. type="text"
  228. v-if="
  229. (scope.row.status == 'PREPARE' ||
  230. scope.row.status == 'PROGRESS') &&
  231. permission('/remedy')&&scope.row.isRemedy
  232. "
  233. @click="gotoSigin(scope.row)"
  234. >乐团补招</el-button
  235. >
  236. <!-- 报名中缴费中筹备中查看乐团 -->
  237. <el-button
  238. type="text"
  239. v-if="
  240. (scope.row.status == 'APPLY' ||
  241. scope.row.status == 'PAY' ||
  242. scope.row.status == 'PREPARE' ||
  243. scope.row.status == 'PRE_APPLY' ||
  244. scope.row.status == 'PRE_BUILD_FEE' ||
  245. scope.row.status == 'FEE_AUDIT') &&
  246. permission('/teamLookBase')
  247. "
  248. @click="lookTeamInfo(scope.row)"
  249. >乐团信息</el-button
  250. >
  251. <el-button
  252. v-if="permission('recharge/findAll')"
  253. type="text"
  254. @click="lookSteam(scope.row)"
  255. >乐团日志</el-button
  256. >
  257. <!-- 进行中 关闭 -->
  258. <el-button
  259. type="text"
  260. v-if="
  261. scope.row.status == 'PROGRESS' &&
  262. permission('musicGroup/closeMusicGroup')
  263. "
  264. @click="closeTeamDetail(scope.row)"
  265. >关闭乐团</el-button
  266. >
  267. <!-- 进行中 查看 -->
  268. <el-button
  269. type="text"
  270. v-if="
  271. scope.row.status == 'PROGRESS' && permission('/teamDetails')
  272. "
  273. @click="lookTeamDetail(scope.row)"
  274. >查看</el-button
  275. >
  276. <!-- 预报名中 查看 -->
  277. <el-button
  278. type="text"
  279. v-if="
  280. scope.row.status == 'PRE_APPLY' &&
  281. permission('studentRegistration/queryPreApplyList')
  282. "
  283. @click="lookTeamDetail(scope.row)"
  284. >查看</el-button
  285. >
  286. <!-- 暂停中 查看 -->
  287. <el-button
  288. type="text"
  289. v-if="
  290. scope.row.status == 'PAUSE' &&
  291. permission('musicGroup/pauseMusicGroup/look')
  292. "
  293. @click="lookTeamDetail(scope.row)"
  294. >查看</el-button
  295. >
  296. <!-- 创建缴费中 查看 -->
  297. <el-button
  298. type="text"
  299. v-if="
  300. scope.row.status == 'PRE_BUILD_FEE' &&
  301. permission('/createPayment')
  302. "
  303. @click="lookTeamDetail(scope.row)"
  304. >创建缴费</el-button
  305. >
  306. <!-- <el-button type="text"
  307. v-if="scope.row.status != 'PROGRESS' && scope.row.status != 'CANCELED' && scope.row.status != 'PAUSE' && scope.row.status != 'APPLY'&& scope.row.status != 'PAY'"
  308. @click="lookTeamDetail(scope.row)">编辑</el-button> -->
  309. <!-- 筹备中 编辑 -->
  310. <el-button
  311. type="text"
  312. v-if="
  313. scope.row.status == 'PREPARE' &&
  314. permission('teamDetail/teamSeting/update')
  315. "
  316. @click="lookTeamDetail(scope.row)"
  317. >班级列表</el-button
  318. >
  319. <!-- 审核中 编辑 -->
  320. <el-button
  321. type="text"
  322. v-if="scope.row.status == 'AUDIT' && permission('/teamAudit')"
  323. @click="lookTeamDetail(scope.row)"
  324. >审核</el-button
  325. >
  326. <!-- 费用审核中 -->
  327. <!-- <el-button type="text"
  328. v-if="( scope.row.status == 'FEE_AUDIT')&& permission('teamDetail/audit/update')"
  329. @click="lookTeamDetail(scope.row)">查看</el-button> -->
  330. <!-- 编辑中 编辑 -->
  331. <el-button
  332. type="text"
  333. v-if="scope.row.status == 'DRAFT' && permission('/teamDraft')"
  334. @click="lookTeamDetail(scope.row)"
  335. >编辑</el-button
  336. >
  337. <el-button
  338. type="text"
  339. v-if="
  340. (scope.row.status == 'DRAFT' ||
  341. scope.row.status == 'AUDIT' ||
  342. scope.row.status == 'FEE_AUDIT' ||
  343. scope.row.status == 'APPLY' ||
  344. scope.row.status == 'PAY') &&
  345. permission('musicGroup/cancelMusicGroup')
  346. "
  347. @click="stopTeam(scope.row)"
  348. >取消乐团</el-button
  349. >
  350. <!-- 审核失败 编辑 -->
  351. <el-button
  352. type="text"
  353. v-if="
  354. scope.row.status == 'AUDIT_FAILED' &&
  355. permission('/auditFailed')
  356. "
  357. @click="lookTeamDetail(scope.row)"
  358. >编辑</el-button
  359. >
  360. <el-button
  361. v-if="
  362. scope.row.status == 'PREPARE' &&
  363. permission('musicGroup/action')
  364. "
  365. @click="startTeam(scope.row)"
  366. type="text"
  367. >确认成团</el-button
  368. >
  369. <!-- <el-button type="text"
  370. v-if="scope.row.status == 'AUDIT' && permission('musicGroup/cancelMusicGroup')"
  371. @click="stopTeam(scope.row)">取消乐团</el-button> -->
  372. <el-button
  373. v-if="
  374. scope.row.status == 'PAUSE' &&
  375. permission('musicGroup/resumeMusicGroup')
  376. "
  377. @click="onTeamOpeation('start', scope.row)"
  378. type="text"
  379. >启动</el-button
  380. >
  381. <el-button
  382. v-if="
  383. scope.row.status == 'PROGRESS' &&
  384. permission('musicGroup/pauseMusicGroup')
  385. "
  386. @click="onTeamOpeation('pause', scope.row)"
  387. type="text"
  388. >暂停</el-button
  389. >
  390. <el-button
  391. v-if="
  392. scope.row.status == 'PROGRESS' &&
  393. permission('/resetTeaming')
  394. "
  395. @click="resetTeaming(scope.row)"
  396. type="text"
  397. >修改</el-button
  398. >
  399. <el-button
  400. v-if="
  401. scope.row.status == 'CANCELED' &&
  402. permission('musicGroup/deleteMusicGroup')
  403. "
  404. @click="deteleTeaming(scope.row)"
  405. type="text"
  406. >删除</el-button
  407. >
  408. </div>
  409. </template>
  410. </el-table-column>
  411. </el-table>
  412. <!-- 分页器 -->
  413. <!-- 分页 -->
  414. <pagination
  415. sync
  416. :total.sync="rules.total"
  417. :page.sync="rules.page"
  418. :limit.sync="rules.limit"
  419. :page-sizes="rules.page_size"
  420. @pagination="getList"
  421. />
  422. </div>
  423. <el-dialog :visible.sync="showSteam" width="500px" title="乐团流程">
  424. <teamSteam :activeId="activeId" />
  425. <div slot="footer" class="dialog-footer">
  426. <el-button type="primary" @click="showSteam = false">确 定</el-button>
  427. </div>
  428. </el-dialog>
  429. <el-dialog :visible.sync="closeVisible" title="确认学员" width="800px">
  430. <closeStudens
  431. v-if="closeVisible"
  432. :detail="closeDetail"
  433. @close="closeVisible = false"
  434. @submited="getList"
  435. />
  436. </el-dialog>
  437. </div>
  438. </div>
  439. </template>
  440. <script>
  441. import pagination from "@/components/Pagination/index";
  442. import { getTeamList, getPayType } from "@/api/teamServer";
  443. import {
  444. getCooperation,
  445. cancelMusicGroup,
  446. startTeam,
  447. getEmployeeOrgan,
  448. pauseMusicGroup,
  449. resumeMusicGroup,
  450. deleteMusicGroup,
  451. } from "@/api/buildTeam";
  452. import { musicGroupStatus } from "@/utils/searchArray";
  453. import { isObject } from "util";
  454. import { permission } from "@/utils/directivePage";
  455. import teamSteam from "./teamListComponent/teamSteam";
  456. import closeStudens from "../teamBuild/modals/close-studens";
  457. export default {
  458. name: "teamList",
  459. data() {
  460. return {
  461. closeDetail: {},
  462. closeVisible: false,
  463. topForm: {
  464. teamName: "",
  465. status: "",
  466. payType: "",
  467. word: "",
  468. orgin: "",
  469. },
  470. organList: [],
  471. typeList: [], // 收费类型
  472. nowStatus: musicGroupStatus,
  473. searchLsit: [], // 存储选择后的数组
  474. tableData: [], // table数据
  475. rules: {
  476. // 分页规则
  477. limit: 10, // 限制显示条数
  478. page: 1, // 当前页
  479. total: 0, // 总条数
  480. page_size: [10, 20, 40, 50], // 选择限制显示条数
  481. },
  482. passed: [], // 传递的参数
  483. showSteam: false,
  484. activeId: null,
  485. };
  486. },
  487. components: {
  488. pagination,
  489. teamSteam,
  490. closeStudens,
  491. },
  492. mounted() {
  493. const { query } = this.$route;
  494. if (query.organId) {
  495. this.topForm.orgin = query.organId;
  496. }
  497. this.init();
  498. },
  499. activated() {
  500. this.init();
  501. },
  502. methods: {
  503. init() {
  504. sessionStorage.setItem("resetCode", "1");
  505. getEmployeeOrgan().then((res) => {
  506. if (res.code == 200) {
  507. this.organList = res.data;
  508. }
  509. });
  510. // 获取乐团收费类型
  511. getPayType().then((res) => {
  512. if (res.code == 200) {
  513. this.typeList = res.data.rows;
  514. }
  515. });
  516. // 获取乐团合作单位(学校)
  517. // getCooperation().then(res => {
  518. // })
  519. this.getList();
  520. },
  521. permission(str) {
  522. return permission(str);
  523. },
  524. reset() {
  525. this.rules.page = 1;
  526. this.$refs["topForm"].resetFields();
  527. this.getList();
  528. },
  529. search() {
  530. this.rules.page = 1;
  531. this.getList();
  532. },
  533. getList() {
  534. getTeamList({
  535. rows: this.rules.limit,
  536. page: this.rules.page,
  537. organId: this.topForm.orgin || null,
  538. chargeTypeId: this.topForm.payType || null,
  539. musicGroupName: this.topForm.teamName || null,
  540. musicGroupStatus: this.topForm.status || null,
  541. musicGroupId: this.$route.query.search,
  542. }).then((res) => {
  543. if (res.code == 200) {
  544. this.tableData = res.data.rows;
  545. this.rules.total = res.data.total;
  546. }
  547. });
  548. },
  549. createNewTeam() {
  550. this.$store.dispatch("buildIndex", 0);
  551. this.$store.dispatch("delVisitedViews", { path: "/business/teamBuild" });
  552. this.$router.push(
  553. { path: "/business/teamBuild", query: { type: "newTeam",clear:'true'} },
  554. (router) => {
  555. router.meta.title = "新建乐团";
  556. }
  557. );
  558. },
  559. resetTeam() {
  560. // 这里还有勾选的乐团信息
  561. if (this.passed && this.passed.length <= 0) {
  562. this.$message.error("请至少选择一个乐团进行调整");
  563. return;
  564. }
  565. this.$router.push({
  566. path: "/business/teamDraft",
  567. query: { type: "teamList", teamList: this.passed },
  568. });
  569. },
  570. resetTeaming(row) {
  571. // 修改进行中的乐团
  572. console.log(row.id)
  573. sessionStorage.removeItem(`${row.id}base`);
  574. sessionStorage.removeItem(`${row.id}sound`);
  575. this.$nextTick(res=>{
  576. this.$router.push({
  577. path: "/business/resetTeaming",
  578. query: { type: "resetTeam", id: row.id },
  579. });
  580. })
  581. },
  582. setSearchList(obj) {
  583. //
  584. // 没有相同的key=>添加这个对象
  585. // 有相同的key => 替换这个对象
  586. if (obj.type == 1) {
  587. let flag = false;
  588. this.searchLsit = this.searchLsit.map((item) => {
  589. if (item.id == obj.id) {
  590. item = obj;
  591. flag = true;
  592. }
  593. return item;
  594. });
  595. if (!flag) {
  596. this.searchLsit.push(obj);
  597. }
  598. } else {
  599. let flag = false;
  600. this.searchLsit = this.searchLsit.map((item) => {
  601. if (item.key == obj.key) {
  602. // 多选框的再次点击=> 等于 就是删除
  603. item = obj;
  604. flag = true;
  605. }
  606. return item;
  607. });
  608. if (!flag) {
  609. this.searchLsit.push(obj);
  610. }
  611. }
  612. },
  613. closeSearch(item) {
  614. // 1.删除search里的元素
  615. if (item.type == 1) {
  616. for (let some in this.searchLsit) {
  617. if (this.searchLsit[some].id == item.id) {
  618. this.searchLsit.splice(some, 1);
  619. }
  620. }
  621. // 2.清空对应元素所对应的的值
  622. this.topForm[item.id] = "";
  623. } else {
  624. for (let i = 0; i < this.topForm[item.id].length; i++) {
  625. if (this.topForm[item.id][i] == item.value) {
  626. this.topForm[item.id].splice(i, 1);
  627. }
  628. }
  629. // 处理search
  630. for (let some in this.searchLsit) {
  631. if (
  632. this.searchLsit[some].value == item.value &&
  633. this.searchLsit[some].id == item.id
  634. ) {
  635. this.searchLsit.splice(some, 1);
  636. }
  637. // id: 'school', key: this.schools[item].text, value: val, type: 1
  638. }
  639. }
  640. },
  641. closeTeamDetail(row) {
  642. this.closeVisible = true;
  643. this.closeDetail = { ...row };
  644. },
  645. onTeamOpeation(type, row) {
  646. if (type == "start") {
  647. this.$confirm("是否确定开启乐团?", "提示", {
  648. confirmButtonText: "确定",
  649. cancelButtonText: "取消",
  650. type: "warning",
  651. })
  652. .then(() => {
  653. resumeMusicGroup({ musicGroupId: row.id }).then((res) => {
  654. if (res.code == 200) {
  655. this.$message.success("开启成功");
  656. this.getList();
  657. } else {
  658. this.$message.error(res.msg);
  659. }
  660. });
  661. })
  662. .catch(() => {});
  663. } else if (type == "pause") {
  664. this.$confirm("是否确定暂停乐团?", "提示", {
  665. confirmButtonText: "确定",
  666. cancelButtonText: "取消",
  667. type: "warning",
  668. })
  669. .then(() => {
  670. pauseMusicGroup({ musicGroupId: row.id }).then((res) => {
  671. if (res.code == 200) {
  672. this.$message.success("暂停成功");
  673. this.getList();
  674. } else {
  675. this.$message.error(res.msg);
  676. }
  677. });
  678. })
  679. .catch(() => {});
  680. }
  681. },
  682. gotoSearch() {
  683. this.$refs["topForm"].resetFields();
  684. this.searchLsit = [];
  685. },
  686. lookTeamCourse(row) {
  687. // 查看课表
  688. this.$router.push({
  689. path: "/business/teamDetailCourse",
  690. query: { id: row.id, name: row.name },
  691. });
  692. },
  693. lookTeamDetail(row) {
  694. sessionStorage.removeItem(`${row.id}base`);
  695. sessionStorage.removeItem(`${row.id}sound`);
  696. switch (row.status) {
  697. case "DRAFT": {
  698. // 编辑中
  699. this.$store.dispatch("draftIndex", 0);
  700. // teamBaseInfo
  701. this.$router.push(
  702. {
  703. path: "/business/teamDraft",
  704. query: { type: "teamDraft", id: row.id ,clear:'true'},
  705. },
  706. (router) => {
  707. router.meta.title = "编辑乐团";
  708. }
  709. );
  710. break;
  711. }
  712. case "AUDIT": {
  713. // 审核中
  714. this.$store.dispatch("draftIndex", 0);
  715. this.$router.push(
  716. {
  717. path: "/business/teamAudit",
  718. query: { type: "teamAudit", id: row.id,clear:'true' },
  719. },
  720. (router) => {
  721. router.meta.title = "审核乐团";
  722. }
  723. );
  724. break;
  725. }
  726. case "PRE_BUILD_FEE": {
  727. // 创建缴费中
  728. this.$router.push({
  729. path: "/business/createPayment",
  730. query: { type: "PRE_BUILD_FEE", id: row.id, name: row.name },
  731. });
  732. break;
  733. }
  734. case "FEE_AUDIT": {
  735. // 费用审核中
  736. this.$store.dispatch("draftIndex", 0);
  737. this.$router.push(
  738. {
  739. path: "/business/feeAudit",
  740. query: { type: "feeAudit", id: row.id,clear:'true' },
  741. },
  742. (router) => {
  743. router.meta.title = "乐团费用审核中";
  744. }
  745. );
  746. break;
  747. }
  748. case "AUDIT_FAILED": {
  749. // 审核失败
  750. this.$store.dispatch("draftIndex", 0);
  751. this.$router.push(
  752. {
  753. path: "/business/auditFailed",
  754. query: { type: "teamDraft", id: row.id,clear:'true' },
  755. },
  756. (router) => {
  757. router.meta.title = "乐团审核失败编辑";
  758. }
  759. );
  760. break;
  761. }
  762. case "PRE_APPLY": {
  763. // 预报名
  764. this.$router.push({
  765. path: "/business/forecastName",
  766. query: { id: row.id, name: row.name },
  767. });
  768. break;
  769. }
  770. case "APPLY": {
  771. // 报名中
  772. this.$router.push(
  773. {
  774. path: `/business/signupList`,
  775. query: { status: row.status, id: row.id, name: row.name },
  776. },
  777. (router) => {
  778. router.meta.title = "报名详情";
  779. }
  780. );
  781. break;
  782. }
  783. case "PAY": {
  784. // 缴费中
  785. this.$router.push(
  786. {
  787. path: `/business/signupList`,
  788. query: { status: row.status, id: row.id, name: row.name },
  789. },
  790. (router) => {
  791. router.meta.title = "缴费详情";
  792. }
  793. );
  794. break;
  795. }
  796. case "PREPARE": {
  797. // 筹备中 跳转到乐团设置界面
  798. this.$router.push({
  799. path: `/business/teamSeting`,
  800. query: { status: row.status, id: row.id, name: row.name },
  801. });
  802. break;
  803. }
  804. case "PROGRESS": {
  805. // 进行中
  806. // 调到乐团详情 teamDetails
  807. this.$router.push({
  808. path: `/business/teamDetails`,
  809. query: {
  810. status: row.status,
  811. id: row.id,
  812. name: row.name,
  813. organId: row.organId,
  814. type: "look",
  815. },
  816. });
  817. break;
  818. }
  819. case "CANCELED": {
  820. // 取消
  821. break;
  822. }
  823. case "PAUSE": {
  824. // 暂停
  825. this.$router.push({
  826. path: `/business/teamDetails`,
  827. query: { status: row.status, id: row.id, name: row.name },
  828. });
  829. break;
  830. }
  831. }
  832. },
  833. checkSelectable(row) {
  834. return row.status == "PROGRESS";
  835. },
  836. handleSelectionChange(arr) {
  837. this.passed = [];
  838. for (let i in arr) {
  839. let obj = {};
  840. obj.id = arr[i].id;
  841. obj.name = arr[i].name;
  842. this.passed.push(obj);
  843. }
  844. },
  845. gotodetailList(row) {
  846. this.$router.push({
  847. path: "/business/teamDetailedList",
  848. query: { id: row.id },
  849. });
  850. },
  851. //
  852. lookTeamInfo(row) {
  853. sessionStorage.removeItem(`${row.id}base`);
  854. sessionStorage.removeItem(`${row.id}sound`);
  855. this.$router.push({
  856. path: "/business/teamLookBase",
  857. query: { type: "look", id: row.id, name: row.name },
  858. });
  859. },
  860. // setImprovement 设置基础技能班
  861. gotoImprovement(row) {
  862. let search = JSON.stringify(this.topForm);
  863. let rules = JSON.stringify(this.rules);
  864. this.$router.push({
  865. path: "/business/setImprovement",
  866. query: { id: row.id },
  867. });
  868. },
  869. // 停止乐团
  870. stopTeam(row) {
  871. this.$confirm("您确定取消申请乐团?", "提示", {
  872. confirmButtonText: "确定",
  873. cancelButtonText: "取消",
  874. type: "warning",
  875. })
  876. .then(() => {
  877. cancelMusicGroup({
  878. musicGroupId: row.id,
  879. }).then((res) => {
  880. if (res.code == 200) {
  881. this.$message.success("停止成功");
  882. this.getList();
  883. }
  884. });
  885. })
  886. .catch(() => {});
  887. },
  888. // 确认成团
  889. startTeam(row) {
  890. this.$confirm("是否确定成团?", "提示", {
  891. confirmButtonText: "确定",
  892. cancelButtonText: "取消",
  893. type: "warning",
  894. })
  895. .then(() => {
  896. startTeam({ musicGroupId: row.id }).then((res) => {
  897. if (res.code == 200) {
  898. this.$message.success("开启乐团成功");
  899. this.getList();
  900. }
  901. });
  902. })
  903. .catch(() => {});
  904. },
  905. deteleTeaming(row) {
  906. this.$confirm("您确定删除该乐团?", "提示", {
  907. confirmButtonText: "确定",
  908. cancelButtonText: "取消",
  909. type: "warning",
  910. })
  911. .then(() => {
  912. deleteMusicGroup({
  913. musicGroupId: row.id,
  914. }).then((res) => {
  915. if (res.code == 200) {
  916. this.$message.success("删除成功");
  917. this.getList();
  918. }
  919. });
  920. })
  921. .catch(() => {});
  922. },
  923. lookSteam(row) {
  924. this.activeId = row.id;
  925. this.showSteam = true;
  926. },
  927. gotoSigin(row){
  928. this.$router.push(
  929. {
  930. path: `/business/remedy`,
  931. query: { status: row.status, id: row.id, name: row.name },
  932. },
  933. (router) => {
  934. router.meta.title = "报名详情";
  935. }
  936. );
  937. }
  938. },
  939. watch: {
  940. showSteam(val) {
  941. if (!val) {
  942. this.activeId = null;
  943. }
  944. },
  945. },
  946. };
  947. </script>
  948. <style lang="scss" scoped>
  949. /deep/.el-button+.el-button {
  950. margin-left: 0px;
  951. }
  952. .select {
  953. font-size: 14px;
  954. }
  955. .btnList {
  956. display: flex;
  957. flex-direction: row;
  958. justify-content: flex-start;
  959. align-items: center;
  960. div {
  961. margin-right: 15px;
  962. }
  963. }
  964. </style>