| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187 |
- <template>
- <div class="m-container">
- <h2>
- <div class="squrt"></div>
- 乐团管理
- <filter-search
- @reload="reloadSearch"
- :moreKeys="['organId']"
- :keys="['searchType']"
- v-if="permission('/teamList/abnormal')"
- />
- </h2>
- <div class="m-core">
- <div class="btnList" style="margin-bottom: 20px">
- <el-button
- type="primary"
- v-if="permission('musicGroup/createGroup')"
- @click="createNewTeam"
- >新建乐团</el-button
- >
- </div>
- <save-form
- :inline="true"
- @submit="search"
- @reset="reset"
- class="topForm"
- ref="topForm"
- :model="topForm"
- >
- <el-form-item prop="search">
- <el-input
- v-model.trim="topForm.search"
- clearable
- @keyup.enter.native="search"
- placeholder="请输入乐团名称"
- ></el-input>
- </el-form-item>
- <el-form-item prop="orgin">
- <el-select
- class="multiple"
- v-model.trim="topForm.orgin"
- filterable
- multiple
- collapse-tags
- clearable
- placeholder="请选择分部"
- @change="onBranchChange"
- >
- <el-option
- v-for="(item, index) in organList"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="cooperationOrganId">
- <el-select
- class="multiple"
- :disabled="!topForm.orgin.length > 0"
- v-model.trim="topForm.cooperationOrganId"
- filterable
- clearable
- placeholder="请选择合作单位"
- >
- <el-option
- v-for="(item, index) in cooperationList"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="status">
- <el-select
- class="multiple"
- v-model.trim="topForm.status"
- filterable
- clearable
- placeholder="请选择乐团状态"
- >
- <el-option
- v-for="(item, index) in nowStatus"
- :key="index"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <!-- 收费类型 -->
- <el-form-item prop="payType">
- <el-select
- v-model.trim="topForm.payType"
- filterable
- placeholder="请选择收费类型"
- clearable
- >
- <el-option
- v-for="(item, index) in typeList"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="courseViewType">
- <el-select
- v-model.trim="topForm.courseViewType"
- filterable
- placeholder="请选择收费模式"
- clearable
- >
- <el-option
- :label="item.label"
- :value="item.value"
- v-for="item in courseViewTypeList"
- :key="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="createTimer">
- <el-date-picker
- v-model.trim="topForm.createTimer"
- style="width: 420px"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="申请开始日期"
- end-placeholder="申请结束日期"
- :picker-options="{
- firstDayOfWeek: 1,
- }"
- ></el-date-picker>
- </el-form-item>
- <el-form-item prop="billTimer">
- <el-date-picker
- v-model.trim="topForm.billTimer"
- style="width: 420px"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="成团开始日期"
- end-placeholder="成团结束日期"
- :picker-options="{
- firstDayOfWeek: 1,
- }"
- ></el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button type="danger" native-type="submit">搜索</el-button>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" native-type="reset">重置</el-button>
- </el-form-item>
- <el-form-item>
- <el-button
- type="primary"
- v-permission="'export/musicGroup'"
- @click="onExport"
- >导出</el-button
- >
- </el-form-item>
- </save-form>
- <div class="tableWrap">
- <el-table
- style="width: 100%"
- @selection-change="handleSelectionChange"
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
- :data="tableData"
- >
- <!-- <el-table-column type="selection"
- :selectable="checkSelectable"
- width="50">
- </el-table-column> -->
- <el-table-column
- prop="organName"
- align="center"
- label="所属分部"
- ></el-table-column>
- <el-table-column
- prop="id"
- width="100"
- align="center"
- label="乐团编号"
- >
- <template slot-scope="scope">
- <copy-text>
- {{ scope.row.id }}
- </copy-text>
- </template>
- </el-table-column>
- <el-table-column
- prop="name"
- width="200px"
- align="center"
- label="乐团名称"
- >
- <template slot-scope="scope">
- <p>
- {{ scope.row.name }}
- </p>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- width="200px"
- prop="cooperationOrganName"
- max-width="274"
- label="合作单位"
- >
- </el-table-column>
- <el-table-column prop="status" align="center" label="乐团状态">
- <template slot-scope="scope">
- <div>
- {{ scope.row.status | musicGroupType }}
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="status" align="center" label="收费模式">
- <template slot-scope="scope">
- <div>
- {{ scope.row.courseViewType | courseViewType }}
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="chargeTypeName"
- label="收费类型"
- >
- </el-table-column>
- <el-table-column
- prop="educationalTeacherName"
- align="center"
- label="乐团主管"
- >
- </el-table-column>
- <!-- <el-table-column
- prop="teamTeacherName"
- align="center"
- label="运营主管"
- >
- </el-table-column> -->
- <el-table-column
- prop="groupMemberNum"
- align="center"
- label="成团人数"
- >
- </el-table-column>
- <el-table-column prop="payNum" align="center" label="在读人数">
- </el-table-column>
- <!-- <el-table-column prop="course"
- align='center'
- label="当前课时">
- </el-table-column> -->
- <el-table-column
- prop="createTime"
- width="100px"
- align="center"
- label="申请时间"
- >
- <template slot-scope="scope">
- <div>
- {{ scope.row.createTime | formatTimer }}
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" width="100px" label="成团时间">
- <template slot-scope="scope">
- <div>
- {{ scope.row.billStartDate | formatTimer }}
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" width="100px" label="清单状态">
- <template slot-scope="scope">
- <div>
- {{ scope.row.hasVerifyMusicalList ? "已确认" : "未确认" }}
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- width="220px"
- fixed="right"
- label="操作"
- >
- <template slot-scope="scope">
- <div>
- <!-- 审核中 编辑 -->
- <el-button
- type="text"
- v-if="
- scope.row.status == 'AUDIT' &&
- permission('musicGroup/auditSuccess')
- "
- @click="lookTeamDetail(scope.row)"
- >审核</el-button
- >
- <el-button
- type="text"
- v-if="
- scope.row.status == 'DRAFT' &&
- permission('musicGroup/update')
- "
- @click="lookTeamDetail(scope.row)"
- >编辑</el-button
- >
- <!-- 审核失败 编辑 -->
- <el-button
- type="text"
- v-if="
- scope.row.status == 'AUDIT_FAILED' &&
- permission('musicGroup/update')
- "
- @click="lookTeamDetail(scope.row)"
- >编辑</el-button
- >
- <!-- 报名中缴费中筹备中查看乐团 -->
- <el-button
- type="text"
- v-if="
- (scope.row.status == 'PRE_APPLY' ||
- scope.row.status == 'PAUSE' ||
- scope.row.status == 'PRE_BUILD_FEE' ||
- scope.row.status == 'PROGRESS' ||
- scope.row.status == 'CANCELED' ||
- scope.row.status == 'APPLY' ||
- scope.row.status == 'PAY' ||
- scope.row.status == 'PREPARE' ||
- scope.row.status == 'CLOSE' ||
- scope.row.status == 'FEE_AUDIT') &&
- permission('/resetTeaming')
- "
- @click="lookTeamDetail(scope.row)"
- >详情</el-button
- >
- <!-- <el-button
- v-if="permission('recharge/findAll')"
- type="text"
- @click="lookSteam(scope.row)"
- >乐团日志</el-button
- > -->
- <!-- 进行中 关闭 -->
- <el-button
- type="text"
- v-if="
- scope.row.status == 'PROGRESS' &&
- permission('musicGroup/closeMusicGroup')
- "
- @click="closeTeamDetail(scope.row)"
- >关闭</el-button
- >
- <!-- 进行中 查看 -->
- <!-- <el-button
- type="text"
- v-if="
- scope.row.status == 'PROGRESS' && permission('/teamDetails')
- "
- @click="lookTeamDetail(scope.row)"
- >查看</el-button
- > -->
- <el-button
- type="text"
- v-if="
- (scope.row.status == 'DRAFT' ||
- scope.row.status == 'AUDIT' ||
- scope.row.status == 'FEE_AUDIT' ||
- scope.row.status == 'APPLY' ||
- scope.row.status == 'PAY' ||
- scope.row.status == 'PRE_APPLY' ||
- scope.row.status == 'PRE_BUILD_FEE') &&
- permission('musicGroup/cancelMusicGroup')
- "
- @click="stopTeam(scope.row)"
- >取消乐团</el-button
- >
- <el-button
- v-if="
- scope.row.status == 'PREPARE' &&
- permission('musicGroup/action')
- "
- @click="startTeam(scope.row)"
- type="text"
- >确认成团</el-button
- >
- <!-- <el-button type="text"
- v-if="scope.row.status == 'AUDIT' && permission('musicGroup/cancelMusicGroup')"
- @click="stopTeam(scope.row)">取消乐团</el-button> -->
- <el-button
- v-if="
- scope.row.status == 'PAUSE' &&
- permission('musicGroup/resumeMusicGroup')
- "
- @click="onTeamOpeation('start', scope.row)"
- type="text"
- >启动</el-button
- >
- <el-button
- v-if="
- scope.row.status == 'PROGRESS' &&
- permission('musicGroup/pauseMusicGroup')
- "
- @click="onTeamOpeation('pause', scope.row)"
- type="text"
- >暂停</el-button
- >
- <el-button
- v-if="
- scope.row.status == 'CANCELED' &&
- permission('musicGroup/deleteMusicGroup')
- "
- @click="deteleTeaming(scope.row)"
- type="text"
- >删除</el-button
- >
- </div>
- </template>
- </el-table-column>
- </el-table>
- <!-- 分页器 -->
- <!-- 分页 -->
- <pagination
- sync
- :total.sync="rules.total"
- :page.sync="rules.page"
- :limit.sync="rules.limit"
- :page-sizes="rules.page_size"
- @pagination="getList"
- />
- </div>
- <el-dialog :visible.sync="showSteam" width="500px" title="乐团流程">
- <teamSteam :activeId="activeId" />
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="showSteam = false">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog :visible.sync="closeVisible" title="确认学员" width="800px">
- <closeStudens
- v-if="closeVisible"
- :detail="closeDetail"
- @close="closeVisible = false"
- @submited="getList"
- />
- </el-dialog>
- </div>
- </div>
- </template>
- <script>
- import pagination from "@/components/Pagination/index";
- import { getTeamList, getPayType } from "@/api/teamServer";
- import qs from "qs";
- import cleanDeep from "clean-deep";
- import {
- getCooperation,
- cancelMusicGroup,
- startTeam,
- getEmployeeOrgan,
- pauseMusicGroup,
- resumeMusicGroup,
- deleteMusicGroup,
- } from "@/api/buildTeam";
- import { musicGroupStatus, courseViewTypeList } from "@/utils/searchArray";
- import { isObject } from "util";
- import { permission } from "@/utils/directivePage";
- import teamSteam from "./teamListComponent/teamSteam";
- import closeStudens from "../teamBuild/modals/close-studens";
- import { getTimes } from "@/utils";
- import { Export } from "@/utils/downLoadFile";
- import { queryByOrganId } from "@/api/systemManage";
- import Tooltip from "@/components/Tooltip/index";
- export default {
- name: "teamList",
- data() {
- return {
- courseViewTypeList,
- closeDetail: {},
- closeVisible: false,
- topForm: {
- search: "",
- status: "",
- payType: "",
- word: "",
- orgin: [],
- courseViewType: "",
- billTimer: [],
- createTimer: [],
- cooperationOrganId: null,
- },
- organList: [],
- typeList: [], // 收费类型
- nowStatus: musicGroupStatus,
- searchLsit: [], // 存储选择后的数组
- tableData: [], // table数据
- rules: {
- // 分页规则
- limit: 10, // 限制显示条数
- page: 1, // 当前页
- total: 0, // 总条数
- page_size: [10, 20, 40, 50], // 选择限制显示条数
- },
- passed: [], // 传递的参数
- showSteam: false,
- activeId: null,
- cooperationList: [],
- };
- },
- components: {
- pagination,
- teamSteam,
- closeStudens,
- Tooltip,
- },
- mounted() {
- const { query } = this.$route;
- if (query.organId) {
- this.topForm.orgin = [];
- this.topForm.orgin.push(query.organId);
- // this.topForm.orgin = query.organId;
- }
- if (query.search) {
- this.topForm.search = query.search;
- }
- if (this.topForm.orgin.length > 0) {
- this.onBranchChange(this.topForm.orgin);
- }
- this.init();
- },
- activated() {
- this.init();
- },
- methods: {
- reloadSearch() {
- this.rules.page = 1;
- this.getList();
- },
- init() {
- localStorage.setItem("resetCode", "1");
- getEmployeeOrgan().then((res) => {
- if (res.code == 200) {
- this.organList = res.data;
- }
- });
- // 获取乐团收费类型
- getPayType().then((res) => {
- if (res.code == 200) {
- this.typeList = res.data.rows;
- }
- });
- // 获取乐团合作单位(学校)
- // getCooperation().then(res => {
- // })
- this.getList();
- },
- permission(str) {
- return permission(str);
- },
- reset() {
- this.rules.page = 1;
- this.$refs["topForm"].resetFields();
- this.getList();
- },
- search() {
- this.rules.page = 1;
- this.getList();
- },
- getList() {
- let { createTimer, billTimer, ...reset } = this.topForm;
- getTeamList({
- rows: this.rules.limit,
- page: this.rules.page,
- organId: this.topForm.orgin.join(","),
- chargeTypeId: this.topForm.payType || null,
- search: this.topForm.search || null,
- musicGroupStatus: this.topForm.status || null,
- courseViewType: this.topForm.courseViewType || null,
- cooperationOrganId: this.topForm.cooperationOrganId || null,
- searchType: this.$route.query.searchType,
- ...getTimes(
- createTimer,
- ["createStartDate", "createEndDate"],
- "YYYY-MM-DD"
- ),
- ...getTimes(billTimer, ["billStartDate", "billEndDate"], "YYYY-MM-DD"),
- }).then((res) => {
- if (res.code == 200) {
- this.tableData = res.data.rows;
- this.rules.total = res.data.total;
- }
- });
- },
- createNewTeam() {
- // this.$store.dispatch("buildIndex", 0);
- // this.$store.dispatch("delVisitedViews", { path: "/business/teamBuild" });
- localStorage.removeItem(`newTeambase`);
- this.$router.push(
- {
- path: "/business/resetTeaming",
- query: { type: "newTeam", team_status: "newTeam" },
- },
- (router) => {
- router.meta.title = "新建乐团";
- }
- );
- },
- resetTeam() {
- // 这里还有勾选的乐团信息
- if (this.passed && this.passed.length <= 0) {
- this.$message.error("请至少选择一个乐团进行调整");
- return;
- }
- this.$router.push({
- path: "/business/teamDraft",
- query: { type: "teamList", teamList: this.passed },
- });
- },
- resetTeaming(row) {
- // 修改进行中的乐团
- localStorage.removeItem(`${row.id}base`);
- localStorage.removeItem(`${row.id}sound`);
- this.$nextTick((res) => {
- this.$router.push({
- path: "/business/resetTeaming",
- query: { type: "resetTeam", id: row.id },
- });
- });
- },
- setSearchList(obj) {
- //
- // 没有相同的key=>添加这个对象
- // 有相同的key => 替换这个对象
- if (obj.type == 1) {
- let flag = false;
- this.searchLsit = this.searchLsit.map((item) => {
- if (item.id == obj.id) {
- item = obj;
- flag = true;
- }
- return item;
- });
- if (!flag) {
- this.searchLsit.push(obj);
- }
- } else {
- let flag = false;
- this.searchLsit = this.searchLsit.map((item) => {
- if (item.key == obj.key) {
- // 多选框的再次点击=> 等于 就是删除
- item = obj;
- flag = true;
- }
- return item;
- });
- if (!flag) {
- this.searchLsit.push(obj);
- }
- }
- },
- closeSearch(item) {
- // 1.删除search里的元素
- if (item.type == 1) {
- for (let some in this.searchLsit) {
- if (this.searchLsit[some].id == item.id) {
- this.searchLsit.splice(some, 1);
- }
- }
- // 2.清空对应元素所对应的的值
- this.topForm[item.id] = "";
- } else {
- for (let i = 0; i < this.topForm[item.id].length; i++) {
- if (this.topForm[item.id][i] == item.value) {
- this.topForm[item.id].splice(i, 1);
- }
- }
- // 处理search
- for (let some in this.searchLsit) {
- if (
- this.searchLsit[some].value == item.value &&
- this.searchLsit[some].id == item.id
- ) {
- this.searchLsit.splice(some, 1);
- }
- // id: 'school', key: this.schools[item].text, value: val, type: 1
- }
- }
- },
- closeTeamDetail(row) {
- this.closeVisible = true;
- this.closeDetail = { ...row };
- },
- onTeamOpeation(type, row) {
- if (type == "start") {
- this.$confirm("是否确定开启乐团?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- resumeMusicGroup({ musicGroupId: row.id }).then((res) => {
- if (res.code == 200) {
- this.$message.success("开启成功");
- this.getList();
- } else {
- this.$message.error(res.msg);
- }
- });
- })
- .catch(() => {});
- } else if (type == "pause") {
- this.$confirm("是否确定暂停乐团?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- pauseMusicGroup({ musicGroupId: row.id }).then((res) => {
- if (res.code == 200) {
- this.$message.success("暂停成功");
- this.getList();
- } else {
- this.$message.error(res.msg);
- }
- });
- })
- .catch(() => {});
- }
- },
- gotoSearch() {
- this.$refs["topForm"].resetFields();
- this.searchLsit = [];
- },
- lookTeamCourse(row) {
- // 查看课表
- this.$router.push({
- path: "/teamListCourse",
- query: { id: row.id, name: row.name },
- });
- },
- lookTeamDetail(row) {
- localStorage.removeItem(`${row.id}base`);
- localStorage.removeItem(`${row.id}sound`);
- localStorage.removeItem("newTeambase");
- switch (row.status) {
- case "DRAFT": {
- // 编辑中
- this.$store.dispatch("draftIndex", 0);
- // teamBaseInfo
- // this.$router.push(
- // {
- // path: "/business/teamDraft",
- // query: { type: "teamDraft", id: row.id ,clear:'true'},
- // },
- // (router) => {
- // router.meta.title = "编辑乐团";
- // }
- // );
- this.$router.push(
- {
- path: "/business/resetTeaming",
- query: { type: "teamDraft", id: row.id, team_status: row.status },
- },
- (router) => {
- router.meta.title = "乐团编辑中";
- }
- );
- break;
- }
- case "AUDIT": {
- // 审核中
- this.$store.dispatch("draftIndex", 0);
- this.$router.push(
- {
- path: "/business/resetTeaming",
- query: {
- type: "teamAudit",
- id: row.id,
- clear: "true",
- team_status: row.status,
- },
- },
- (router) => {
- router.meta.title = "乐团审核中";
- }
- );
- break;
- }
- case "PRE_BUILD_FEE": {
- // 创建缴费中
- // this.$router.push({
- // path: "/business/createPayment",
- // query: { type: "PRE_BUILD_FEE", id: row.id, name: row.name },
- // });
- this.$router.push(
- {
- path: "/business/resetTeaming",
- query: {
- type: "look",
- id: row.id,
- name: row.name,
- team_status: "PRE_BUILD_FEE",
- tabrouter: 3,
- },
- },
- (router) => {
- router.meta.title = "创建缴费中";
- }
- );
- break;
- }
- case "FEE_AUDIT": {
- // 费用审核中
- this.$store.dispatch("draftIndex", 0);
- this.$router.push(
- {
- path: "/business/resetTeaming",
- query: {
- type: "feeAudit",
- id: row.id,
- clear: "true",
- team_status: row.status,
- },
- },
- (router) => {
- router.meta.title = "乐团费用审核中";
- }
- );
- break;
- }
- case "AUDIT_FAILED": {
- // 审核失败
- this.$store.dispatch("draftIndex", 0);
- this.$router.push(
- {
- path: "/business/resetTeaming",
- query: {
- type: "teamDraft",
- id: row.id,
- clear: "true",
- team_status: row.status,
- },
- },
- (router) => {
- router.meta.title = "乐团审核失败";
- }
- );
- break;
- }
- case "PRE_APPLY": {
- // 预报名
- this.$router.push(
- {
- path: "/business/resetTeaming",
- query: {
- type: "look",
- id: row.id,
- name: row.name,
- team_status: "PRE_APPLY",
- tabrouter: 9,
- },
- },
- (router) => {
- router.meta.title = "乐团预报名";
- }
- );
- // this.$router.push({
- // path: "/business/forecastName",
- // query: { id: row.id, name: row.name },
- // });
- break;
- }
- case "APPLY": {
- // 报名中
- this.$router.push(
- {
- path: `/business/resetTeaming`,
- query: {
- status: row.status,
- id: row.id,
- name: row.name,
- team_status: "APPLY",
- type: "look",
- tabrouter: 11,
- },
- },
- (router) => {
- router.meta.title = "乐团报名中";
- }
- );
- break;
- }
- case "PAY": {
- // 缴费中
- this.$router.push(
- {
- path: `/business/resetTeaming`,
- query: {
- status: row.status,
- id: row.id,
- name: row.name,
- team_status: "PAY",
- type: "look",
- tabrouter: 11,
- },
- },
- (router) => {
- router.meta.title = "乐团缴费中";
- }
- );
- break;
- }
- case "PREPARE": {
- // 筹备中 跳转到乐团设置界面
- this.$router.push(
- {
- path: `/business/resetTeaming`,
- query: {
- type: "look",
- status: row.status,
- id: row.id,
- name: row.name,
- team_status: row.status,
- tabrouter: 10,
- },
- },
- (router) => {
- router.meta.title = "乐团筹备中";
- }
- );
- break;
- }
- case "PROGRESS": {
- // 进行中
- // 调到乐团详情 teamDetails
- this.$router.push(
- {
- path: `/business/resetTeaming`,
- query: {
- status: row.status,
- id: row.id,
- name: row.name,
- organId: row.organId,
- type: "resetTeam",
- team_status: row.status,
- },
- },
- (router) => {
- router.meta.title = "乐团进行中";
- }
- );
- break;
- }
- case "CANCELED": {
- // 取消
- this.$router.push(
- {
- path: "/business/resetTeaming",
- query: {
- type: "teamCanceled",
- id: row.id,
- team_status: row.status,
- },
- },
- (router) => {
- router.meta.title = "取消乐团";
- }
- );
- break;
- }
- case "PAUSE": {
- // 暂停
- // this.$router.push({
- // path: `/teamLists`,
- // query: { status: row.status, id: row.id, name: row.name },
- // });
- this.$router.push(
- {
- path: "/business/resetTeaming",
- query: { type: "resetTeam", id: row.id, team_status: row.status },
- },
- (router) => {
- router.meta.title = "乐团暂停";
- }
- );
- break;
- }
- case "CLOSE": {
- this.$router.push(
- {
- path: `/business/resetTeaming`,
- query: {
- status: row.status,
- id: row.id,
- name: row.name,
- team_status: "CLOSE",
- type: "look",
- },
- },
- (router) => {
- router.meta.title = "乐团关闭";
- }
- );
- }
- }
- },
- checkSelectable(row) {
- return row.status == "PROGRESS";
- },
- handleSelectionChange(arr) {
- this.passed = [];
- for (let i in arr) {
- let obj = {};
- obj.id = arr[i].id;
- obj.name = arr[i].name;
- this.passed.push(obj);
- }
- },
- gotodetailList(row) {
- this.$router.push({
- path: "/teamListedList",
- query: { id: row.id },
- });
- },
- //
- lookTeamInfo(row) {
- localStorage.removeItem(`${row.id}base`);
- localStorage.removeItem(`${row.id}sound`);
- this.$router.push({
- path: "/business/teamLookBase",
- query: {
- type: "look",
- id: row.id,
- name: row.name,
- team_status: row.status,
- },
- });
- },
- // setImprovement 设置基础技能班
- gotoImprovement(row) {
- let search = JSON.stringify(this.topForm);
- let rules = JSON.stringify(this.rules);
- this.$router.push({
- path: "/business/setImprovement",
- query: { id: row.id },
- });
- },
- // 停止乐团
- stopTeam(row) {
- this.$confirm("您确定取消申请乐团?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- cancelMusicGroup({
- musicGroupId: row.id,
- }).then((res) => {
- if (res.code == 200) {
- this.$message.success("停止成功");
- this.getList();
- }
- });
- })
- .catch(() => {});
- },
- // 确认成团
- startTeam(row) {
- this.$confirm("是否确定成团?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- startTeam({ musicGroupId: row.id }).then((res) => {
- if (res.code == 200) {
- this.$message.success("开启乐团成功");
- this.getList();
- }
- });
- })
- .catch(() => {});
- },
- deteleTeaming(row) {
- this.$confirm("您确定删除该乐团?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- deleteMusicGroup({
- musicGroupId: row.id,
- }).then((res) => {
- if (res.code == 200) {
- this.$message.success("删除成功");
- this.getList();
- }
- });
- })
- .catch(() => {});
- },
- lookSteam(row) {
- this.activeId = row.id;
- this.showSteam = true;
- },
- gotoSigin(row) {
- this.$router.push(
- {
- path: `/business/remedy`,
- query: { status: row.status, id: row.id, name: row.name },
- },
- (router) => {
- router.meta.title = "报名详情";
- }
- );
- },
- async onExport() {
- let { createTimer, billTimer, ...reset } = this.topForm;
- let obj = {
- ...reset,
- organId: this.topForm.orgin.join(",") || null,
- ...getTimes(
- createTimer,
- ["createStartDate", "createEndDate"],
- "YYYY-MM-DD"
- ),
- ...getTimes(billTimer, ["billStartDate", "billEndDate"], "YYYY-MM-DD"),
- };
- await Export(
- this,
- {
- url: "/api-web/export/musicGroup",
- fileName: "乐团列表.xls",
- method: "post",
- params: qs.stringify(cleanDeep(obj)),
- },
- "您确定导出乐团列表?"
- );
- },
- async onBranchChange(value) {
- if (!value) {
- this.cooperationList = [];
- this.topForm.cooperationOrganId = null;
- return;
- }
- // 合作单位
- await queryByOrganId({ organId: value.join(",") }).then((res) => {
- if (res.code == 200) {
- this.cooperationList = res.data;
- this.topForm.cooperationOrganId = null;
- }
- });
- },
- },
- watch: {
- showSteam(val) {
- if (!val) {
- this.activeId = null;
- }
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- /deep/.el-button + .el-button {
- margin-left: 0px;
- }
- .select {
- font-size: 14px;
- }
- .btnList {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- .exportBtn {
- margin-left: 15px;
- }
- }
- </style>
|