teamList.vue 32 KB

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