teamList.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <div class="squrt"></div>乐团列表
  5. </h2>
  6. <div class="m-core">
  7. <div class="btnList" style="margin-bottom: 20px">
  8. <el-button type="primary" v-permission="'/teamBuild'"
  9. @click="createNewTeam">新建乐团</el-button>
  10. <!-- <div class='newBand'
  11. v-permission="'/teamBuild/trimming'"
  12. @click="resetTeam">乐团调整</div> -->
  13. </div>
  14. <save-form :inline="true"
  15. @submit='search'
  16. @reset='reset'
  17. class="topForm"
  18. ref="topForm"
  19. :model="topForm">
  20. <el-form-item prop='teamName'>
  21. <el-input v-model.trim="topForm.teamName"
  22. clearable
  23. @keyup.enter.native='search'
  24. placeholder="请输入乐团名称"></el-input>
  25. </el-form-item>
  26. <el-form-item prop='orgin'>
  27. <el-select class='multiple'
  28. v-model.trim="topForm.orgin"
  29. filterable
  30. clearable
  31. placeholder="请选择分部">
  32. <el-option v-for="(item,index) in organList"
  33. :key="index"
  34. :label="item.name"
  35. :value="item.id"></el-option>
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item prop='status'>
  39. <el-select class='multiple'
  40. v-model.trim="topForm.status"
  41. filterable
  42. clearable
  43. placeholder="请选择乐团状态">
  44. <el-option v-for="(item,index) in nowStatus"
  45. :key="index"
  46. :label="item.text"
  47. :value="item.value"></el-option>
  48. </el-select>
  49. </el-form-item>
  50. <!-- 收费类型 -->
  51. <el-form-item prop='payType'>
  52. <el-select v-model.trim="topForm.payType"
  53. filterable
  54. placeholder="请选择收费类型"
  55. clearable>
  56. <el-option v-for="(item,index) in typeList"
  57. :key='index'
  58. :label="item.name"
  59. :value="item.id"></el-option>
  60. </el-select>
  61. </el-form-item>
  62. <el-form-item>
  63. <el-button type='danger'
  64. native-type="submit"
  65. >搜索</el-button>
  66. </el-form-item>
  67. <el-form-item>
  68. <el-button type='primary'
  69. native-type="reset"
  70. >重置</el-button>
  71. </el-form-item>
  72. </save-form>
  73. <div class="tableWrap">
  74. <el-table style="width: 100%"
  75. @selection-change="handleSelectionChange"
  76. :header-cell-style="{background:'#EDEEF0',color:'#444'}"
  77. :data='tableData'>
  78. <!-- <el-table-column type="selection"
  79. :selectable="checkSelectable"
  80. width="50">
  81. </el-table-column> -->
  82. <el-table-column prop="id"
  83. width="100"
  84. align='center'
  85. label="乐团编号">
  86. <template slot-scope="scope">
  87. <copy-text>{{scope.row.id}}</copy-text>
  88. </template>
  89. </el-table-column>
  90. <el-table-column prop="name"
  91. width="200px"
  92. align='center'
  93. label="乐团名称">
  94. <template slot-scope="scope">
  95. <copy-text>{{scope.row.name}}</copy-text>
  96. </template>
  97. </el-table-column>
  98. <el-table-column align='center'
  99. width="200px"
  100. prop="cooperationOrganName"
  101. max-width='274'
  102. label="合作单位">
  103. </el-table-column>
  104. <el-table-column prop="status"
  105. align='center'
  106. label="乐团状态">
  107. <template slot-scope="scope">
  108. <div>
  109. {{ scope.row.status | teamStatus }}
  110. </div>
  111. </template>
  112. </el-table-column>
  113. <el-table-column align='center'
  114. prop="chargeTypeName"
  115. label="收费类型">
  116. </el-table-column>
  117. <el-table-column prop="educationalTeacherName"
  118. align='center'
  119. label="乐团主管">
  120. </el-table-column>
  121. <el-table-column prop="teamTeacherName"
  122. align='center'
  123. label="运营主管">
  124. </el-table-column>
  125. <el-table-column prop="groupMemberNum"
  126. align='center'
  127. label="成团人数">
  128. </el-table-column>
  129. <el-table-column prop="payNum"
  130. align='center'
  131. label="在读人数">
  132. </el-table-column>
  133. <!-- <el-table-column prop="course"
  134. align='center'
  135. label="当前课时">
  136. </el-table-column> -->
  137. <el-table-column prop="createTime"
  138. width='100px'
  139. align='center'
  140. label="申请时间">
  141. <template slot-scope="scope">
  142. <div>
  143. {{ scope.row.createTime | formatTimer}}
  144. </div>
  145. </template>
  146. </el-table-column>
  147. <el-table-column align='center'
  148. width='100px'
  149. label="成团时间">
  150. <template slot-scope="scope">
  151. <div>
  152. {{ scope.row.billStartDate | formatTimer}}
  153. </div>
  154. </template>
  155. </el-table-column>
  156. <el-table-column align='center'
  157. width='100px'
  158. label="清单状况">
  159. <template slot-scope="scope">
  160. <div>
  161. {{ scope.row.hasVerifyMusicalList?'已确认':'未确认'}}
  162. </div>
  163. </template>
  164. </el-table-column>
  165. <el-table-column align='center'
  166. width='220px'
  167. fixed="right"
  168. label="操作">
  169. <template slot-scope="scope">
  170. <div>
  171. <!-- <el-button type="text"
  172. v-if="scope.row.status == 'PREPARE' && permission('/setImprovement')"
  173. @click="gotoImprovement(scope.row)">基础技能班</el-button> -->
  174. <el-button type="text"
  175. v-if="scope.row.status == 'PREPARE' && permission('/teamDetailedList')"
  176. @click="gotodetailList(scope.row)">发放清单</el-button>
  177. <!-- <el-button type="text"
  178. v-if="scope.row.status == 'PREPARE'"
  179. @click="lookTeamCourse(scope.row)">查看课表</el-button> -->
  180. <!-- 报名中&缴费中 查看 -->
  181. <el-button type="text"
  182. v-if="(scope.row.status == 'APPLY'|| scope.row.status == 'PAY') && permission('/signupList')"
  183. @click="lookTeamDetail(scope.row)">查看</el-button>
  184. <!-- 报名中缴费中筹备中查看乐团 -->
  185. <el-button type="text"
  186. v-if="(scope.row.status == 'APPLY'|| scope.row.status == 'PAY' || scope.row.status == 'PREPARE' || scope.row.status == 'PRE_APPLY' || scope.row.status == 'PRE_BUILD_FEE' || scope.row.status == 'FEE_AUDIT') && permission('/teamLookBase')"
  187. @click="lookTeamInfo(scope.row)">乐团信息</el-button>
  188. <el-button v-if="permission('recharge/findAll')"
  189. type="text"
  190. @click="lookSteam(scope.row)">乐团日志</el-button>
  191. <!-- 进行中 关闭 -->
  192. <el-button type="text"
  193. v-if="scope.row.status == 'PROGRESS' && permission('musicGroup/closeMusicGroup')"
  194. @click="closeTeamDetail(scope.row)">关闭乐团</el-button>
  195. <!-- 进行中 查看 -->
  196. <el-button type="text"
  197. v-if="scope.row.status == 'PROGRESS' && permission('/teamDetails')"
  198. @click="lookTeamDetail(scope.row)">查看</el-button>
  199. <!-- 预报名中 查看 -->
  200. <el-button type="text"
  201. v-if="scope.row.status == 'PRE_APPLY' && permission('studentRegistration/queryPreApplyList')"
  202. @click="lookTeamDetail(scope.row)">查看</el-button>
  203. <!-- 暂停中 查看 -->
  204. <el-button type="text"
  205. v-if="scope.row.status == 'PAUSE' && permission('musicGroup/pauseMusicGroup/look')"
  206. @click="lookTeamDetail(scope.row)">查看</el-button>
  207. <!-- 创建缴费中 查看 -->
  208. <el-button type="text"
  209. v-if="scope.row.status == 'PRE_BUILD_FEE' && permission('/createPayment')"
  210. @click="lookTeamDetail(scope.row)">创建缴费</el-button>
  211. <!-- <el-button type="text"
  212. v-if="scope.row.status != 'PROGRESS' && scope.row.status != 'CANCELED' && scope.row.status != 'PAUSE' && scope.row.status != 'APPLY'&& scope.row.status != 'PAY'"
  213. @click="lookTeamDetail(scope.row)">编辑</el-button> -->
  214. <!-- 筹备中 编辑 -->
  215. <el-button type="text"
  216. v-if="scope.row.status == 'PREPARE' && permission('teamDetail/teamSeting/update')"
  217. @click="lookTeamDetail(scope.row)">班级列表</el-button>
  218. <!-- 审核中 编辑 -->
  219. <el-button type="text"
  220. v-if="(scope.row.status == 'AUDIT')&& permission('teamDetail/audit/update')"
  221. @click="lookTeamDetail(scope.row)">审核</el-button>
  222. <!-- 费用审核中 -->
  223. <!-- <el-button type="text"
  224. v-if="( scope.row.status == 'FEE_AUDIT')&& permission('teamDetail/audit/update')"
  225. @click="lookTeamDetail(scope.row)">查看</el-button> -->
  226. <!-- 编辑中 编辑 -->
  227. <el-button type="text"
  228. v-if="scope.row.status == 'DRAFT' && permission('teamDetail/draft/update')"
  229. @click="lookTeamDetail(scope.row)">编辑</el-button>
  230. <el-button type="text"
  231. v-if="(scope.row.status == 'DRAFT' || scope.row.status == 'AUDIT'|| scope.row.status == 'FEE_AUDIT' || (scope.row.status == 'APPLY'|| scope.row.status == 'PAY') && permission('musicGroup/cancelMusicGroup'))"
  232. @click="stopTeam(scope.row)">取消乐团</el-button>
  233. <!-- 审核失败 编辑 -->
  234. <el-button type="text"
  235. v-if="scope.row.status == 'AUDIT_FAILED' && permission('teamDetail/aduitFailed/update')"
  236. @click="lookTeamDetail(scope.row)">编辑</el-button>
  237. <el-button v-if="scope.row.status == 'PREPARE' && permission('musicGroup/action')"
  238. @click="startTeam(scope.row)"
  239. type="text">确认成团</el-button>
  240. <!-- <el-button type="text"
  241. v-if="scope.row.status == 'AUDIT' && permission('musicGroup/cancelMusicGroup')"
  242. @click="stopTeam(scope.row)">取消乐团</el-button> -->
  243. <el-button v-if="scope.row.status == 'PAUSE' && permission('musicGroup/resumeMusicGroup')"
  244. @click="onTeamOpeation('start', scope.row)"
  245. type="text">启动</el-button>
  246. <el-button v-if="scope.row.status == 'PROGRESS' && permission('musicGroup/pauseMusicGroup')"
  247. @click="onTeamOpeation('pause', scope.row)"
  248. type="text">暂停</el-button>
  249. <el-button v-if="scope.row.status == 'PROGRESS' && permission('/resetTeaming')"
  250. @click="resetTeaming(scope.row)"
  251. type="text">修改</el-button>
  252. <el-button v-if="scope.row.status == 'CANCELED' && permission('musicGroup/deleteMusicGroup')"
  253. @click="deteleTeaming(scope.row)"
  254. type="text">删除</el-button>
  255. </div>
  256. </template>
  257. </el-table-column>
  258. </el-table>
  259. <!-- 分页器 -->
  260. <!-- 分页 -->
  261. <pagination
  262. sync
  263. :total.sync="rules.total"
  264. :page.sync="rules.page"
  265. :limit.sync="rules.limit"
  266. :page-sizes="rules.page_size"
  267. @pagination="getList" />
  268. </div>
  269. <el-dialog :visible.sync="showSteam"
  270. width="500px"
  271. title="乐团流程">
  272. <teamSteam :activeId='activeId' />
  273. <div slot="footer"
  274. class="dialog-footer">
  275. <el-button type="primary"
  276. @click="showSteam=false">确 定</el-button>
  277. </div>
  278. </el-dialog>
  279. <el-dialog :visible.sync="closeVisible" title="确认学员" width="800px">
  280. <closeStudens v-if="closeVisible" :detail="closeDetail" @close="closeVisible = false" @submited="getList"/>
  281. </el-dialog>
  282. </div>
  283. </div>
  284. </template>
  285. <script>
  286. import pagination from '@/components/Pagination/index'
  287. import { getTeamList, getPayType } from '@/api/teamServer'
  288. import { getCooperation, cancelMusicGroup, startTeam, getEmployeeOrgan, pauseMusicGroup, resumeMusicGroup, deleteMusicGroup } from '@/api/buildTeam'
  289. import { musicGroupStatus } from '@/utils/searchArray'
  290. import { isObject } from 'util'
  291. import { permission } from '@/utils/directivePage'
  292. import teamSteam from './teamListComponent/teamSteam'
  293. import closeStudens from '../teamBuild/modals/close-studens'
  294. export default {
  295. name: "teamList",
  296. data () {
  297. return {
  298. closeDetail: {},
  299. closeVisible: false,
  300. topForm: {
  301. teamName: '',
  302. status: '',
  303. payType: '',
  304. word: '',
  305. orgin: ''
  306. },
  307. organList: [],
  308. typeList: [], // 收费类型
  309. nowStatus: musicGroupStatus,
  310. searchLsit: [], // 存储选择后的数组
  311. tableData: [], // table数据
  312. rules: {
  313. // 分页规则
  314. limit: 10, // 限制显示条数
  315. page: 1, // 当前页
  316. total: 0, // 总条数
  317. page_size: [10, 20, 40, 50] // 选择限制显示条数
  318. },
  319. passed: [], // 传递的参数
  320. showSteam: false,
  321. activeId: null
  322. }
  323. },
  324. components: {
  325. pagination,
  326. teamSteam,
  327. closeStudens
  328. },
  329. mounted () {
  330. // this.$set(this.topForm, 'teamName', this.$route.query.search)
  331. this.init();
  332. },
  333. activated () {
  334. this.init();
  335. },
  336. methods: {
  337. init () {
  338. sessionStorage.setItem('resetCode', '1')
  339. getEmployeeOrgan().then(res => {
  340. if (res.code == 200) {
  341. this.organList = res.data;
  342. }
  343. })
  344. // 获取乐团收费类型
  345. getPayType().then(res => {
  346. if (res.code == 200) {
  347. this.typeList = res.data.rows;
  348. }
  349. })
  350. // 获取乐团合作单位(学校)
  351. // getCooperation().then(res => {
  352. // })
  353. this.getList();
  354. },
  355. permission (str) {
  356. return permission(str)
  357. },
  358. reset () {
  359. this.rules.page = 1;
  360. this.$refs['topForm'].resetFields();
  361. // if (this.$route.query.search) {
  362. // this.$router.replace({
  363. // path: this.$route.path,
  364. // query: {
  365. // ...this.$route.query,
  366. // search: undefined
  367. // }
  368. // })
  369. // }
  370. this.getList()
  371. },
  372. search () {
  373. this.rules.page = 1;
  374. this.getList();
  375. },
  376. getList () {
  377. getTeamList({
  378. rows: this.rules.limit,
  379. page: this.rules.page,
  380. organId: this.topForm.orgin || null,
  381. chargeTypeId: this.topForm.payType || null,
  382. musicGroupName: this.topForm.teamName || null,
  383. musicGroupStatus: this.topForm.status || null,
  384. }).then(res => {
  385. if (res.code == 200) {
  386. this.tableData = res.data.rows
  387. this.rules.total = res.data.total
  388. }
  389. })
  390. },
  391. createNewTeam () {
  392. let search = JSON.stringify(this.topForm)
  393. let rules = JSON.stringify(this.rules)
  394. this.$router.push({ path: '/business/teamBuild', query: { type: 'newTeam', } }, router => {
  395. router.meta.title = '新建乐团'
  396. })
  397. },
  398. resetTeam () {
  399. // 这里还有勾选的乐团信息
  400. if (this.passed && this.passed.length <= 0) {
  401. this.$message.error('请至少选择一个乐团进行调整')
  402. return
  403. }
  404. let search = JSON.stringify(this.topForm)
  405. let rules = JSON.stringify(this.rules)
  406. this.$router.push({ path: '/business/teamBuild', query: { type: 'teamList', teamList: this.passed, } })
  407. },
  408. resetTeaming (row) {
  409. // 修改进行中的乐团
  410. let search = JSON.stringify(this.topForm)
  411. let rules = JSON.stringify(this.rules)
  412. this.$router.push({ path: '/business/resetTeaming', query: { type: 'resetTeam', id: row.id,} })
  413. },
  414. setSearchList (obj) {
  415. //
  416. // 没有相同的key=>添加这个对象
  417. // 有相同的key => 替换这个对象
  418. if (obj.type == 1) {
  419. let flag = false;
  420. this.searchLsit = this.searchLsit.map(item => {
  421. if (item.id == obj.id) {
  422. item = obj;
  423. flag = true;
  424. }
  425. return item;
  426. })
  427. if (!flag) {
  428. this.searchLsit.push(obj)
  429. }
  430. } else {
  431. let flag = false;
  432. this.searchLsit = this.searchLsit.map(item => {
  433. if (item.key == obj.key) {
  434. // 多选框的再次点击=> 等于 就是删除
  435. item = obj;
  436. flag = true;
  437. }
  438. return item;
  439. })
  440. if (!flag) {
  441. this.searchLsit.push(obj)
  442. }
  443. }
  444. },
  445. closeSearch (item) {
  446. // 1.删除search里的元素
  447. if (item.type == 1) {
  448. for (let some in this.searchLsit) {
  449. if (this.searchLsit[some].id == item.id) {
  450. this.searchLsit.splice(some, 1);
  451. }
  452. }
  453. // 2.清空对应元素所对应的的值
  454. this.topForm[item.id] = '';
  455. } else {
  456. for (let i = 0; i < this.topForm[item.id].length; i++) {
  457. if (this.topForm[item.id][i] == item.value) {
  458. this.topForm[item.id].splice(i, 1);
  459. }
  460. }
  461. // 处理search
  462. for (let some in this.searchLsit) {
  463. if (this.searchLsit[some].value == item.value && this.searchLsit[some].id == item.id) {
  464. this.searchLsit.splice(some, 1);
  465. }
  466. // id: 'school', key: this.schools[item].text, value: val, type: 1
  467. }
  468. }
  469. },
  470. closeTeamDetail(row) {
  471. this.closeVisible = true
  472. this.closeDetail = {...row}
  473. },
  474. onTeamOpeation (type, row) {
  475. if (type == 'start') {
  476. this.$confirm('是否确定开启乐团?', '提示', {
  477. confirmButtonText: '确定',
  478. cancelButtonText: '取消',
  479. type: 'warning'
  480. }).then(() => {
  481. resumeMusicGroup({ musicGroupId: row.id }).then(res => {
  482. if (res.code == 200) {
  483. this.$message.success('开启成功')
  484. this.getList()
  485. } else {
  486. this.$message.error(res.msg)
  487. }
  488. })
  489. }).catch(() => { })
  490. } else if (type == 'pause') {
  491. this.$confirm('是否确定暂停乐团?', '提示', {
  492. confirmButtonText: '确定',
  493. cancelButtonText: '取消',
  494. type: 'warning'
  495. }).then(() => {
  496. pauseMusicGroup({ musicGroupId: row.id }).then(res => {
  497. if (res.code == 200) {
  498. this.$message.success('暂停成功')
  499. this.getList()
  500. } else {
  501. this.$message.error(res.msg)
  502. }
  503. })
  504. }).catch(() => { })
  505. }
  506. },
  507. gotoSearch () {
  508. this.$refs['topForm'].resetFields();
  509. this.searchLsit = [];
  510. },
  511. lookTeamCourse (row) {
  512. // 查看课表
  513. let search = JSON.stringify(this.topForm)
  514. let rules = JSON.stringify(this.rules)
  515. this.$router.push({ path: '/business/teamDetailCourse', query: { id: row.id, name: row.name, } })
  516. },
  517. lookTeamDetail (row) {
  518. let search = JSON.stringify(this.topForm)
  519. let rules = JSON.stringify(this.rules)
  520. switch (row.status) {
  521. case 'DRAFT': {
  522. // 编辑中
  523. this.$router.push({ path: '/business/teamBuild', query: { type: 'teamDraft', id: row.id, } }, router => {
  524. router.meta.title = '编辑乐团'
  525. })
  526. break;
  527. }
  528. case 'AUDIT': {
  529. // 审核中
  530. this.$router.push({ path: '/business/teamBuild', query: { type: 'teamAudit', id: row.id, } }, router => {
  531. router.meta.title = '审核乐团'
  532. })
  533. break;
  534. }
  535. case 'PRE_BUILD_FEE': {
  536. // 创建缴费中
  537. this.$router.push({ path: '/business/createPayment', query: { type: 'PRE_BUILD_FEE', id: row.id, name: row.name } })
  538. break;
  539. }
  540. case 'FEE_AUDIT': {
  541. // 费用审核中
  542. this.$router.push({ path: '/business/teamBuild', query: { type: 'feeAudit', id: row.id, } }, router => {
  543. router.meta.title = '乐团费用审核中'
  544. })
  545. break;
  546. }
  547. case 'AUDIT_FAILED': {
  548. // 审核失败
  549. this.$router.push({ path: '/business/teamBuild', query: { type: 'teamDraft', id: row.id, } }, router => {
  550. router.meta.title = '乐团审核失败编辑'
  551. })
  552. break;
  553. }
  554. case 'PRE_APPLY': {
  555. // 预报名
  556. this.$router.push({ path: '/business/forecastName', query: { id: row.id, name: row.name } })
  557. break;
  558. }
  559. case 'APPLY': {
  560. // 报名中
  561. this.$router.push({ path: `/business/signupList`, query: { status: row.status, id: row.id, name: row.name, } }, router => {
  562. router.meta.title = "报名详情"
  563. })
  564. break;
  565. }
  566. case 'PAY': {
  567. // 缴费中
  568. this.$router.push({ path: `/business/signupList`, query: { status: row.status, id: row.id, name: row.name, } }, router => {
  569. router.meta.title = "缴费详情"
  570. })
  571. break;
  572. }
  573. case 'PREPARE': {
  574. // 筹备中 跳转到乐团设置界面
  575. this.$router.push({ path: `/business/teamSeting`, query: { status: row.status, id: row.id, name: row.name, } })
  576. break;
  577. }
  578. case 'PROGRESS': {
  579. // 进行中
  580. // 调到乐团详情 teamDetails
  581. this.$router.push({ path: `/business/teamDetails`, query: { status: row.status, id: row.id, name: row.name, organId: row.organId ,type:'look' } })
  582. break
  583. }
  584. case 'CANCELED': {
  585. // 取消
  586. break
  587. }
  588. case 'PAUSE': {
  589. // 暂停
  590. this.$router.push({ path: `/business/teamDetails`, query: { status: row.status, id: row.id, name: row.name, } })
  591. break;
  592. }
  593. }
  594. },
  595. checkSelectable (row) {
  596. return row.status == 'PROGRESS'
  597. },
  598. handleSelectionChange (arr) {
  599. this.passed = [];
  600. for (let i in arr) {
  601. let obj = {};
  602. obj.id = arr[i].id;
  603. obj.name = arr[i].name;
  604. this.passed.push(obj)
  605. }
  606. },
  607. gotodetailList (row) {
  608. let search = JSON.stringify(this.topForm)
  609. let rules = JSON.stringify(this.rules)
  610. this.$router.push({ path: '/business/teamDetailedList', query: { id: row.id, } })
  611. },
  612. //
  613. lookTeamInfo (row) {
  614. let search = JSON.stringify(this.topForm)
  615. let rules = JSON.stringify(this.rules)
  616. this.$router.push({ path: '/business/teamLookBase', query: { type: 'look', id: row.id, name: row.name } })
  617. },
  618. // setImprovement 设置基础技能班
  619. gotoImprovement (row) {
  620. let search = JSON.stringify(this.topForm)
  621. let rules = JSON.stringify(this.rules)
  622. this.$router.push({ path: '/business/setImprovement', query: { id: row.id, } })
  623. },
  624. // 停止乐团
  625. stopTeam (row) {
  626. this.$confirm('您确定取消申请乐团?', '提示', {
  627. confirmButtonText: '确定',
  628. cancelButtonText: '取消',
  629. type: 'warning'
  630. }).then(() => {
  631. cancelMusicGroup({
  632. musicGroupId: row.id
  633. }).then(res => {
  634. if (res.code == 200) {
  635. this.$message.success('停止成功')
  636. this.getList()
  637. }
  638. })
  639. }).catch(() => {
  640. })
  641. },
  642. // 确认成团
  643. startTeam (row) {
  644. this.$confirm('是否确定成团?', '提示', {
  645. confirmButtonText: '确定',
  646. cancelButtonText: '取消',
  647. type: 'warning'
  648. }).then(() => {
  649. startTeam({ musicGroupId: row.id }).then(res => {
  650. if (res.code == 200) {
  651. this.$message.success('开启乐团成功')
  652. this.getList();
  653. }
  654. })
  655. }).catch(() => { })
  656. },
  657. deteleTeaming (row) {
  658. this.$confirm('您确定删除该乐团?', '提示', {
  659. confirmButtonText: '确定',
  660. cancelButtonText: '取消',
  661. type: 'warning'
  662. }).then(() => {
  663. deleteMusicGroup({
  664. musicGroupId: row.id
  665. }).then(res => {
  666. if (res.code == 200) {
  667. this.$message.success('删除成功')
  668. this.getList()
  669. }
  670. })
  671. }).catch(() => {
  672. })
  673. },
  674. lookSteam (row) {
  675. this.activeId = row.id
  676. this.showSteam = true
  677. }
  678. },
  679. watch: {
  680. showSteam (val) {
  681. if (!val) {
  682. this.activeId = null
  683. }
  684. }
  685. }
  686. }
  687. </script>
  688. <style lang="scss" scoped>
  689. .select {
  690. font-size: 14px;
  691. }
  692. .btnList {
  693. display: flex;
  694. flex-direction: row;
  695. justify-content: flex-start;
  696. align-items: center;
  697. div {
  698. margin-right: 15px;
  699. }
  700. }
  701. </style>