|
@@ -265,26 +265,29 @@ export default {
|
|
// 多选框选项卡
|
|
// 多选框选项卡
|
|
handleItemChange (val) {
|
|
handleItemChange (val) {
|
|
// 发请求 获取分部下的乐团
|
|
// 发请求 获取分部下的乐团
|
|
- getMusicTeams({ branchId: val }).then(res => {
|
|
|
|
- // res.data.rows
|
|
|
|
- // 1.格式化数据
|
|
|
|
- // 2.追加数据到相应的位置
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- let arr = [];
|
|
|
|
- res.data.rows.map(item => {
|
|
|
|
- arr.push({
|
|
|
|
- label: item.name,
|
|
|
|
- value: item.id
|
|
|
|
|
|
+ if (val.length > 0) {
|
|
|
|
+ // console.log(val[0]);
|
|
|
|
+ getMusicTeams(qs.stringify({ branchId: val[0] })).then(res => {
|
|
|
|
+ // res.data.rows
|
|
|
|
+ // 1.格式化数据
|
|
|
|
+ // 2.追加数据到相应的位置
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ let arr = [];
|
|
|
|
+ res.data.rows.map(item => {
|
|
|
|
+ arr.push({
|
|
|
|
+ label: item.name,
|
|
|
|
+ value: item.id
|
|
|
|
+ })
|
|
})
|
|
})
|
|
- })
|
|
|
|
- for (let item in this.brancheList) {
|
|
|
|
- if (this.brancheList[item].value == val) {
|
|
|
|
- this.brancheList[item].children = arr;
|
|
|
|
|
|
+ for (let item in this.brancheList) {
|
|
|
|
+ if (this.brancheList[item].value == val) {
|
|
|
|
+ this.brancheList[item].children = arr;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
- })
|
|
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
handleChange (val) {
|
|
handleChange (val) {
|
|
if (val) {
|
|
if (val) {
|