teamList.vue 35 KB

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