teamList.vue 28 KB

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