teamList.vue 28 KB

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