|
@@ -1,68 +1,77 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div class="soundBtnWrap">
|
|
|
- <el-button type="primary"
|
|
|
- @click="allin"
|
|
|
- v-if="teamStatus != 'resetTeam'">全选</el-button>
|
|
|
- <el-button type="danger"
|
|
|
- @click="deleteRow"
|
|
|
- v-if="teamStatus != 'resetTeam'">删除</el-button>
|
|
|
- <el-button type="primary"
|
|
|
- @click="soundVisible = true">添加</el-button>
|
|
|
+ <el-button type="primary" @click="allin" v-if="teamStatus != 'resetTeam'"
|
|
|
+ >全选</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ @click="deleteRow"
|
|
|
+ v-if="teamStatus != 'resetTeam'"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="soundVisible = true">添加</el-button>
|
|
|
</div>
|
|
|
<div class="coreWrap">
|
|
|
- <el-checkbox-group v-model="checkList"
|
|
|
- @change='lookCheck'>
|
|
|
- <el-collapse v-model="chioseActiveSound"
|
|
|
- accordion
|
|
|
- @change="changeActiveSound">
|
|
|
- <el-collapse-item v-for="(item,index) in activeSoundList"
|
|
|
- :name="item.id"
|
|
|
- :key="index">
|
|
|
+ <el-checkbox-group v-model="checkList" @change="lookCheck">
|
|
|
+ <el-collapse
|
|
|
+ v-model="chioseActiveSound"
|
|
|
+ accordion
|
|
|
+ @change="changeActiveSound"
|
|
|
+ >
|
|
|
+ <el-collapse-item
|
|
|
+ v-for="(item, index) in activeSoundList"
|
|
|
+ :name="item.id"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
<template slot="title">
|
|
|
<div class="coreItemTitle">
|
|
|
- <el-checkbox :label="item.id">{{item.sound}}</el-checkbox>
|
|
|
+ <el-checkbox :label="item.id">{{ item.sound }}</el-checkbox>
|
|
|
</div>
|
|
|
</template>
|
|
|
<div class="coreItem">
|
|
|
<div class="coreItemRow">
|
|
|
<p class="title">计划招生人数:</p>
|
|
|
- <el-input style="width:180px"
|
|
|
- v-model="item.expectedStudentNum"></el-input>
|
|
|
+ <el-input
|
|
|
+ style="width: 180px"
|
|
|
+ v-model="item.expectedStudentNum"
|
|
|
+ ></el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <chioseMusic :item="item"
|
|
|
- @lookMusic="lookMusic" />
|
|
|
+ <chioseMusic :item="item" @lookMusic="lookMusic" />
|
|
|
<div class="coreItemRow">
|
|
|
<p class="title">教辅:</p>
|
|
|
- <el-select style="width:558px!important;"
|
|
|
- v-model="item.markChioseList"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- multiple>
|
|
|
- <el-option v-for="(item,index) in item.markList"
|
|
|
- :key="index"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"></el-option>
|
|
|
+ <el-select
|
|
|
+ style="width: 558px !important"
|
|
|
+ v-model="item.markChioseList"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ multiple
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in item.markList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</el-collapse-item>
|
|
|
-
|
|
|
</el-collapse>
|
|
|
</el-checkbox-group>
|
|
|
</div>
|
|
|
- <el-dialog title="声部选择"
|
|
|
- :visible.sync="soundVisible"
|
|
|
- destroy-on-close>
|
|
|
- <chioseSoundList :soundList="soundList"
|
|
|
- :activeSound='activeSound'
|
|
|
- @chioseSound="chioseSound" />
|
|
|
+ <el-dialog title="声部选择" :visible.sync="soundVisible" destroy-on-close>
|
|
|
+ <chioseSoundList
|
|
|
+ :soundList="soundList"
|
|
|
+ :activeSound="activeSound"
|
|
|
+ @chioseSound="chioseSound"
|
|
|
+ />
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import store from "@/store";
|
|
|
-import { formatData } from '@/utils/utils'
|
|
|
+import { formatData } from "@/utils/utils";
|
|
|
import {
|
|
|
getSubject,
|
|
|
getDefaultSubject,
|
|
@@ -73,15 +82,15 @@ import {
|
|
|
updateSubjectInfo,
|
|
|
auditSuccess,
|
|
|
auditFailed,
|
|
|
- getSubjectGoods
|
|
|
+ getSubjectGoods,
|
|
|
} from "@/api/buildTeam";
|
|
|
-import dayjs from 'dayjs'
|
|
|
-import chioseSoundList from './chioseSoundList'
|
|
|
-import chioseMusic from './chioseMusic'
|
|
|
-import { findIndex } from 'lodash'
|
|
|
+import dayjs from "dayjs";
|
|
|
+import chioseSoundList from "./chioseSoundList";
|
|
|
+import chioseMusic from "./chioseMusic";
|
|
|
+import { findIndex } from "lodash";
|
|
|
export default {
|
|
|
components: { chioseSoundList, chioseMusic },
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
soundList: [], // 接口返回的一级二级声部
|
|
|
soundVisible: false, // 设置声部弹窗
|
|
@@ -91,17 +100,20 @@ export default {
|
|
|
chioseActiveSound: null,
|
|
|
soundList: [], // 接口返回的一级二级声部
|
|
|
childSoundList: [],
|
|
|
- teamStatus: '',// 乐团状态
|
|
|
+ teamStatus: "", // 乐团状态
|
|
|
checkList: [],
|
|
|
- }
|
|
|
- }, mounted () {
|
|
|
- this.init()
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.init();
|
|
|
+ console.log("mounted");
|
|
|
},
|
|
|
- activated () {
|
|
|
- this.init()
|
|
|
+ activated() {
|
|
|
+ this.init();
|
|
|
+ console.log("activated");
|
|
|
},
|
|
|
methods: {
|
|
|
- init () {
|
|
|
+ init() {
|
|
|
// 获取第一页的数据
|
|
|
this.topfor = this.$store.getters.topinfo;
|
|
|
let type = this.topfor.type;
|
|
@@ -112,35 +124,35 @@ export default {
|
|
|
if (this.$route.query.rules) {
|
|
|
this.Frules = this.$route.query.rules;
|
|
|
}
|
|
|
- getSoundTree({ tenantId: 1 }).then(res => {
|
|
|
+ getSoundTree({ tenantId: 1 }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- this.soundList = res.data.rows
|
|
|
+ this.soundList = res.data.rows;
|
|
|
if (this.teamStatus == "newTeam") {
|
|
|
getDefaultSubject({
|
|
|
chargeTypeId: type,
|
|
|
organId: this.topfor.section,
|
|
|
- number: 1
|
|
|
- }).then(res => {
|
|
|
+ number: 1,
|
|
|
+ }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- let activeSound = []
|
|
|
- this.activeSoundList = res.data.map(item => {
|
|
|
- activeSound.push(item.id)
|
|
|
+ let activeSound = [];
|
|
|
+ this.activeSoundList = res.data.map((item) => {
|
|
|
+ activeSound.push(item.id);
|
|
|
return this.initSound(item);
|
|
|
});
|
|
|
this.activeSound = activeSound;
|
|
|
- this.chioseActiveSound = activeSound[0]
|
|
|
- this.changeActiveSound(activeSound[0])
|
|
|
+ this.chioseActiveSound = activeSound[0];
|
|
|
+ this.changeActiveSound(activeSound[0]);
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
- this.$nextTick(res => {
|
|
|
- this.teamid = this.$route.query.id;
|
|
|
- findMusicGroupSubjectInfo({ musicGroupId: this.teamid }).then(
|
|
|
- res => {
|
|
|
- if (res.code == 200) {
|
|
|
- let activeSound = []
|
|
|
- this.activeSoundList = res.data?.musicGroupSubjectPlans.map(item => {
|
|
|
- activeSound.push(item.subjectId)
|
|
|
+ this.teamid = this.$route.query.id;
|
|
|
+ findMusicGroupSubjectInfo({ musicGroupId: this.teamid }).then(
|
|
|
+ (res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ let activeSound = [];
|
|
|
+ this.activeSoundList = res.data?.musicGroupSubjectPlans.map(
|
|
|
+ (item) => {
|
|
|
+ activeSound.push(item.subjectId);
|
|
|
return {
|
|
|
id: parseInt(item.subjectId),
|
|
|
sound: item.subName,
|
|
@@ -149,164 +161,166 @@ export default {
|
|
|
markChioseList: [],
|
|
|
goodsList: [],
|
|
|
markList: [],
|
|
|
- }
|
|
|
- })
|
|
|
- this.activeSound = activeSound;
|
|
|
- this.chioseActiveSound = activeSound[0]
|
|
|
- this.changeActiveSound(activeSound[0])
|
|
|
- // 格式化商品和教辅
|
|
|
+ };
|
|
|
+ }
|
|
|
+ );
|
|
|
+ this.activeSound = activeSound;
|
|
|
+ this.chioseActiveSound = activeSound[0];
|
|
|
+ this.changeActiveSound(activeSound[0]);
|
|
|
+ // 格式化商品和教辅
|
|
|
|
|
|
- res.data.musicGroupSubjectGoodsGroups.forEach(shop => {
|
|
|
- let index = findIndex(this.activeSoundList, (o) => {
|
|
|
- return o.id == shop.subjectId
|
|
|
- })
|
|
|
-
|
|
|
- if (index != -1) {
|
|
|
- if (shop.type == 'ACCESSORIES') {
|
|
|
- shop.goodsIdList.split(',').forEach(item => {
|
|
|
- this.activeSoundList[index].markChioseList.push(parseInt(item))
|
|
|
- })
|
|
|
- } else if (shop.type == 'INSTRUMENT') {
|
|
|
- // 商品
|
|
|
- let typeJson = Object.keys(JSON.parse(shop.kitGroupPurchaseTypeJson))
|
|
|
- this.activeSoundList[index].chioseMusic.push({
|
|
|
- musical: parseInt(shop.goodsIdList),
|
|
|
- type: typeJson,
|
|
|
- groupPrice: shop.price,
|
|
|
- borrowPrice: shop.depositFee
|
|
|
- })
|
|
|
- }
|
|
|
+ res.data.musicGroupSubjectGoodsGroups.forEach((shop) => {
|
|
|
+ let index = findIndex(this.activeSoundList, (o) => {
|
|
|
+ return o.id == shop.subjectId;
|
|
|
+ });
|
|
|
|
|
|
+ if (index != -1) {
|
|
|
+ if (shop.type == "ACCESSORIES") {
|
|
|
+ shop.goodsIdList.split(",").forEach((item) => {
|
|
|
+ this.activeSoundList[index].markChioseList.push(
|
|
|
+ parseInt(item)
|
|
|
+ );
|
|
|
+ });
|
|
|
+ } else if (shop.type == "INSTRUMENT") {
|
|
|
+ // 商品
|
|
|
+ let typeJson = Object.keys(
|
|
|
+ JSON.parse(shop.kitGroupPurchaseTypeJson)
|
|
|
+ );
|
|
|
+ this.activeSoundList[index].chioseMusic.push({
|
|
|
+ musical: parseInt(shop.goodsIdList),
|
|
|
+ type: typeJson,
|
|
|
+ groupPrice: shop.price,
|
|
|
+ borrowPrice: shop.depositFee,
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log(this.activeSoundList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- getSubject({ tenantId: 1 }).then(res => {
|
|
|
+ getSubject({ tenantId: 1 }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- this.childSoundList = res.data
|
|
|
+ this.childSoundList = res.data;
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
- lookCheck (val) {
|
|
|
- this.checkList = [...new Set(val)]
|
|
|
+ lookCheck(val) {
|
|
|
+ this.checkList = [...new Set(val)];
|
|
|
},
|
|
|
- chioseSound (activeSound) {
|
|
|
+ chioseSound(activeSound) {
|
|
|
// 同步数据
|
|
|
this.activeSound = [...new Set(activeSound)];
|
|
|
- let newSoundList = []
|
|
|
+ let newSoundList = [];
|
|
|
|
|
|
for (let i in this.childSoundList) {
|
|
|
if (this.activeSound.includes(this.childSoundList[i].id)) {
|
|
|
- newSoundList.push(this.initSound(this.childSoundList[i]))
|
|
|
+ newSoundList.push(this.initSound(this.childSoundList[i]));
|
|
|
}
|
|
|
}
|
|
|
- let idList = this.activeSoundList.map(item => {
|
|
|
- return item.id
|
|
|
- })
|
|
|
+ let idList = this.activeSoundList.map((item) => {
|
|
|
+ return item.id;
|
|
|
+ });
|
|
|
for (let x in newSoundList) {
|
|
|
- const indexof = idList.indexOf(newSoundList[x]?.id)
|
|
|
+ const indexof = idList.indexOf(newSoundList[x]?.id);
|
|
|
if (indexof > -1) {
|
|
|
- newSoundList[x] = this.activeSoundList[indexof]
|
|
|
+ newSoundList[x] = this.activeSoundList[indexof];
|
|
|
}
|
|
|
}
|
|
|
- this.activeSoundList = newSoundList
|
|
|
- this.soundVisible = false
|
|
|
+ this.activeSoundList = newSoundList;
|
|
|
+ this.soundVisible = false;
|
|
|
},
|
|
|
- initSound (item) {
|
|
|
+ initSound(item) {
|
|
|
let obj = {
|
|
|
id: item.id,
|
|
|
sound: item.name,
|
|
|
expectedStudentNum: item.expectedStudentNum,
|
|
|
- chioseMusic: [{ musical: '', type: ["GROUP"], groupPrice: 0, borrowPrice: 1500 }],
|
|
|
+ chioseMusic: [
|
|
|
+ { musical: "", type: ["GROUP"], groupPrice: 0, borrowPrice: 1500 },
|
|
|
+ ],
|
|
|
markChioseList: [],
|
|
|
goodsList: [],
|
|
|
markList: [],
|
|
|
-
|
|
|
- }
|
|
|
- return obj
|
|
|
+ };
|
|
|
+ return obj;
|
|
|
},
|
|
|
- changeActiveSound (val) {
|
|
|
- this.activeSoundList.forEach(item => {
|
|
|
+ changeActiveSound(val) {
|
|
|
+ this.activeSoundList.forEach((item) => {
|
|
|
if (item.id == val) {
|
|
|
if (item.goodsList.length < 1 || item.markList.length < 1) {
|
|
|
- getSubjectGoods({ subjectId: item.id, chargeTypeId: this.topfor.type }).then(res => {
|
|
|
+ getSubjectGoods({
|
|
|
+ subjectId: item.id,
|
|
|
+ chargeTypeId: this.topfor.type,
|
|
|
+ }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- let goodList = []
|
|
|
- let markList = []
|
|
|
- res.data.forEach(item => {
|
|
|
- if (item.type == 'INSTRUMENT') {
|
|
|
- goodList.push(item)
|
|
|
- } else if (item.type == 'ACCESSORIES') {
|
|
|
- markList.push(item)
|
|
|
+ let goodList = [];
|
|
|
+ let markList = [];
|
|
|
+ res.data.forEach((item) => {
|
|
|
+ if (item.type == "INSTRUMENT") {
|
|
|
+ goodList.push(item);
|
|
|
+ } else if (item.type == "ACCESSORIES") {
|
|
|
+ markList.push(item);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
item.goodsList = goodList;
|
|
|
item.markList = markList;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- lookMusic () {
|
|
|
-
|
|
|
+ });
|
|
|
},
|
|
|
+ lookMusic() {},
|
|
|
|
|
|
- submitInfo () {
|
|
|
+ submitInfo() {
|
|
|
// 计划招生人数
|
|
|
// 可选乐器
|
|
|
// 教辅
|
|
|
- this.activeSoundList.forEach(item => {
|
|
|
+ this.activeSoundList.forEach((item) => {
|
|
|
if (!item.expectedStudentNum) {
|
|
|
- this.$message.error(`请填写${item.sound}的预计招生人数`)
|
|
|
- return
|
|
|
+ this.$message.error(`请填写${item.sound}的预计招生人数`);
|
|
|
+ return;
|
|
|
}
|
|
|
- if (!item.chioseMusic[0].musical) {
|
|
|
- this.$message.error(`请至少一个选择${item.sound}的可选乐器`)
|
|
|
- return
|
|
|
+ if (!item.chioseMusic[0]?.musical) {
|
|
|
+ this.$message.error(`请至少一个选择${item.sound}的可选乐器`);
|
|
|
+ return;
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
// 新建团
|
|
|
- let obj = {}
|
|
|
+ let obj = {};
|
|
|
if (this.teamStatus == "newTeam") {
|
|
|
- this.initCreateTeam(obj)
|
|
|
+ this.initCreateTeam(obj);
|
|
|
}
|
|
|
// 初始化声部
|
|
|
obj.musicGroupSubjectGoodsGroups = [];
|
|
|
obj.musicGroupSubjectPlans = [];
|
|
|
- this.activeSoundList.forEach(active => {
|
|
|
+ this.activeSoundList.forEach((active) => {
|
|
|
// 格式化声部数据
|
|
|
let item = {
|
|
|
expectedStudentNum: active.expectedStudentNum,
|
|
|
subName: active.sound,
|
|
|
- subjectId: active.id
|
|
|
+ subjectId: active.id,
|
|
|
};
|
|
|
obj.musicGroupSubjectPlans.push(item);
|
|
|
// 格式化商品数据 chioseMusic: [{ musical: '', type: ["GROUP"], groupPrice: 0, borrowPrice: 1500 }],
|
|
|
- active.chioseMusic.forEach(music => {
|
|
|
+ active.chioseMusic.forEach((music) => {
|
|
|
let goodsItem = null;
|
|
|
- let depositFee = music.borrowPrice
|
|
|
- let price = music.groupPrice
|
|
|
+ let depositFee = music.borrowPrice;
|
|
|
+ let price = music.groupPrice;
|
|
|
let index = findIndex(active.goodsList, (o) => {
|
|
|
- return o.id == music.musical
|
|
|
- })
|
|
|
+ return o.id == music.musical;
|
|
|
+ });
|
|
|
if (index != -1) {
|
|
|
- goodsItem = active.goodsList[index]
|
|
|
+ goodsItem = active.goodsList[index];
|
|
|
}
|
|
|
- let kitGroupPurchaseTypeJson = {}
|
|
|
- music.type.forEach(type => {
|
|
|
- kitGroupPurchaseTypeJson[type] = 0
|
|
|
- })
|
|
|
- kitGroupPurchaseTypeJson = JSON.stringify(kitGroupPurchaseTypeJson)
|
|
|
+ let kitGroupPurchaseTypeJson = {};
|
|
|
+ music.type.forEach((type) => {
|
|
|
+ kitGroupPurchaseTypeJson[type] = 0;
|
|
|
+ });
|
|
|
+ kitGroupPurchaseTypeJson = JSON.stringify(kitGroupPurchaseTypeJson);
|
|
|
if (goodsItem) {
|
|
|
let some = {
|
|
|
subjectId: active.id,
|
|
@@ -315,22 +329,22 @@ export default {
|
|
|
name: goodsItem.name,
|
|
|
kitGroupPurchaseTypeJson,
|
|
|
depositFee,
|
|
|
- price
|
|
|
+ price,
|
|
|
};
|
|
|
obj.musicGroupSubjectGoodsGroups.push(some);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
// 格式化辅件
|
|
|
// markChioseList: [],
|
|
|
// goodsList: [],
|
|
|
// markList: [],
|
|
|
- active.markChioseList.forEach(ass => {
|
|
|
+ active.markChioseList.forEach((ass) => {
|
|
|
let index = findIndex(active.markList, (o) => {
|
|
|
- return o.id == ass
|
|
|
- })
|
|
|
+ return o.id == ass;
|
|
|
+ });
|
|
|
let goodsItem = null;
|
|
|
if (index != -1) {
|
|
|
- goodsItem = active.markList[index]
|
|
|
+ goodsItem = active.markList[index];
|
|
|
}
|
|
|
if (goodsItem) {
|
|
|
let some = {
|
|
@@ -342,58 +356,56 @@ export default {
|
|
|
};
|
|
|
obj.musicGroupSubjectGoodsGroups.push(some);
|
|
|
}
|
|
|
-
|
|
|
- })
|
|
|
- if (this.teamStatus == 'newTeam') {
|
|
|
- createTeam(obj).then(res => {
|
|
|
+ });
|
|
|
+ if (this.teamStatus == "newTeam") {
|
|
|
+ createTeam(obj).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
// 成功 跳转到乐团报名详情
|
|
|
+ this.$emit("chiosetab", 2);
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
- obj.musicGroupId = this.teamid
|
|
|
- obj.musicGroupStatus = "DRAFT"
|
|
|
- updateSubjectInfo(obj).then(res => {
|
|
|
+ obj.musicGroupId = this.teamid;
|
|
|
+ obj.musicGroupStatus = "DRAFT";
|
|
|
+ updateSubjectInfo(obj).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("提交成功");
|
|
|
+ this.$emit("chiosetab", 2);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
- deleteRow () {
|
|
|
+ deleteRow() {
|
|
|
if (this.checkList.length < 1) {
|
|
|
- this.$message.error('请至少勾选一个')
|
|
|
- return
|
|
|
+ this.$message.error("请至少勾选一个");
|
|
|
+ return;
|
|
|
}
|
|
|
for (let i = 0; i < this.activeSoundList.length; i++) {
|
|
|
- let index = this.checkList.indexOf(this.activeSoundList[i].id)
|
|
|
+ let index = this.checkList.indexOf(this.activeSoundList[i].id);
|
|
|
if (index != -1) {
|
|
|
- this.activeSoundList.splice(i, 1)
|
|
|
- this.activeSound.splice(i, 1)
|
|
|
- i--
|
|
|
+ this.activeSoundList.splice(i, 1);
|
|
|
+ this.activeSound.splice(i, 1);
|
|
|
+ i--;
|
|
|
}
|
|
|
}
|
|
|
- this.checkList = []
|
|
|
-
|
|
|
-
|
|
|
+ this.checkList = [];
|
|
|
},
|
|
|
- allin () {
|
|
|
- this.checkList = []
|
|
|
+ allin() {
|
|
|
+ this.checkList = [];
|
|
|
this.activeSoundList.forEach((item, index) => {
|
|
|
- this.checkList.push(item.id)
|
|
|
- })
|
|
|
-
|
|
|
+ this.checkList.push(item.id);
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
- initCreateTeam (obj) {
|
|
|
+ initCreateTeam(obj) {
|
|
|
let enrollClasses;
|
|
|
this.topfor.startClass
|
|
|
? (enrollClasses = this.topfor.startClass.join(","))
|
|
|
: (enrollClasses = null);
|
|
|
obj.musicGroup = {
|
|
|
settlementType: this.topfor.salary,
|
|
|
- applyExpireDate: dayjs(this.topfor.time).format('YYYY-MM-DD HH:mm:ss'),
|
|
|
+ applyExpireDate: dayjs(this.topfor.time).format("YYYY-MM-DD HH:mm:ss"),
|
|
|
chargeTypeId: this.topfor.type,
|
|
|
cooperationOrganId: this.topfor.school,
|
|
|
teamTeacherId: this.topfor.boss,
|
|
@@ -402,8 +414,12 @@ export default {
|
|
|
name: this.topfor.name,
|
|
|
organId: this.topfor.section,
|
|
|
paymentPattern: this.topfor.paymentPattern,
|
|
|
- paymentValidStartDate: this.topfor.paymentValidStartDate ? dayjs(this.topfor.paymentValidStartDate).format('YYYY-MM-DD') : this.topfor.paymentValidStartDate,
|
|
|
- paymentValidEndDate: this.topfor.paymentValidEndDate ? dayjs(this.topfor.paymentValidEndDate).format('YYYY-MM-DD') : this.topfor.paymentValidEndDate,
|
|
|
+ paymentValidStartDate: this.topfor.paymentValidStartDate
|
|
|
+ ? dayjs(this.topfor.paymentValidStartDate).format("YYYY-MM-DD")
|
|
|
+ : this.topfor.paymentValidStartDate,
|
|
|
+ paymentValidEndDate: this.topfor.paymentValidEndDate
|
|
|
+ ? dayjs(this.topfor.paymentValidEndDate).format("YYYY-MM-DD")
|
|
|
+ : this.topfor.paymentValidEndDate,
|
|
|
// paymentMonths:obj.months 有待确认
|
|
|
schoolId: this.topfor.address,
|
|
|
expectStartGroupDate: this.topfor.startTime,
|
|
@@ -411,12 +427,35 @@ export default {
|
|
|
status,
|
|
|
ownershipType: this.topfor.ownershipType,
|
|
|
repairUserId: this.topfor.repairUserId,
|
|
|
- feeType: this.topfor.feeType
|
|
|
+ feeType: this.topfor.feeType,
|
|
|
};
|
|
|
- return obj
|
|
|
- }
|
|
|
+ return obj;
|
|
|
+ },
|
|
|
},
|
|
|
-}
|
|
|
+ watch: {
|
|
|
+ activeSoundList: {
|
|
|
+ immediate: true,
|
|
|
+ deep: true,
|
|
|
+ handler(n) {
|
|
|
+ let chioseSoundNum = 0;
|
|
|
+ let PlannedCount =0;
|
|
|
+ let activeSoundList = this.activeSoundList;
|
|
|
+ if (n) {
|
|
|
+ let Count = 0;
|
|
|
+ if (n.length > 0) {
|
|
|
+ for (let item in n) {
|
|
|
+ Count += parseInt(n[item]?.expectedStudentNum) || 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ chioseSoundNum = Count
|
|
|
+ PlannedCount = n.length
|
|
|
+ this.$emit('getNumber',chioseSoundNum,PlannedCount)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.soundBtnWrap {
|