|
@@ -361,7 +361,6 @@ export default {
|
|
|
this.$refs.cascader.$el.click()
|
|
|
},
|
|
|
handleBizIdChange(val, option) {
|
|
|
- console.log(val, option, '业务线1')
|
|
|
if (val.length > 0) {
|
|
|
const one = val[0]
|
|
|
const tow = val[1] || ''
|
|
@@ -372,32 +371,27 @@ export default {
|
|
|
if (val[1] && item.code === tow[0]) nameTow = item.name
|
|
|
})
|
|
|
if (this.bizCode === 0 && one[0] === -1) { // 默认全选
|
|
|
- console.log('默认全选')
|
|
|
this.bizName = '业务线'
|
|
|
this.bizIdCode = this.optionData
|
|
|
this.bizCode = 1
|
|
|
} else {
|
|
|
if (one[0] !== -1 && this.bizCode === 1) { // 取消全选
|
|
|
- console.log('取消全选')
|
|
|
this.bizIdCode = null
|
|
|
this.bizName = name + (nameTow ? '/' + nameTow : '')
|
|
|
this.bizCode = 0
|
|
|
} else if (one[0] === -1 && val.length < option.length) { // 点击全选以外的,取消全选
|
|
|
- console.log('点击全选以外的,取消全选')
|
|
|
const data = val.filter(item => { return item[0] })
|
|
|
data.splice(0, 1)
|
|
|
this.bizIdCode = data
|
|
|
this.bizName = (name ? name + '/' : '') + (nameTow ? '' + nameTow : '')
|
|
|
this.bizCode = 0
|
|
|
} else if (one[0] !== -1 && val.length === (option.length - 1)) { // 点击其余的全部,触发全选
|
|
|
- console.log('点击其余的全部,触发全选')
|
|
|
const data = val.filter(item => { return item[0] })
|
|
|
data.unshift([-1])
|
|
|
this.bizIdCode = data
|
|
|
this.bizName = '业务线'
|
|
|
this.bizCode = 1
|
|
|
} else if (one[0] !== -1) { // 基础多选
|
|
|
- console.log('基础多选')
|
|
|
const data = val.filter(item => { return item[0] })
|
|
|
this.bizIdCode = data
|
|
|
this.bizName = name + (nameTow ? '/' + nameTow : '')
|
|
@@ -406,7 +400,6 @@ export default {
|
|
|
const arr = this.bizIdCode.map(value => {
|
|
|
return value[0]
|
|
|
})
|
|
|
- console.log(arr, 'bizId')
|
|
|
if (arr[0] === undefined) {
|
|
|
this.handleBizId([-1])
|
|
|
} else {
|
|
@@ -418,7 +411,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleChange(val, options) {
|
|
|
- console.log(val, options, '团队')
|
|
|
if (val.length > 0) {
|
|
|
let [a, b, stop] = ['', '', true]
|
|
|
val.map(e => {
|
|
@@ -437,14 +429,12 @@ export default {
|
|
|
})
|
|
|
const arr = val[0]
|
|
|
if (this.teamCode === 0 && arr[0] === -1) { // 默认全选
|
|
|
- console.log('默认全选')
|
|
|
this.teamNames = this.datas
|
|
|
this.teamBizName = '团队'
|
|
|
this.teamCode = 1
|
|
|
this.bizName = '业务线'
|
|
|
this.bizIdCode = this.optionData
|
|
|
} else if (arr[0] !== -1 && this.teamCode === 1) {
|
|
|
- console.log('取消全选')
|
|
|
this.teamNames = null
|
|
|
this.teamBizName = '团队'
|
|
|
this.teamCode = 0
|
|
@@ -458,7 +448,6 @@ export default {
|
|
|
this.teamCode = 0
|
|
|
const datas = data.map(item => { return item[0] })
|
|
|
const bizIds = Array.from(new Set(datas))
|
|
|
- console.log('点击全选以外的,取消全选', data, datas, bizIds)
|
|
|
this.bizIdCode = bizIds
|
|
|
let [n, nameTow] = ['', '']
|
|
|
this.searchEnum.businesslines.map(item => {
|
|
@@ -467,7 +456,6 @@ export default {
|
|
|
})
|
|
|
this.bizName = n + (nameTow ? '/' + nameTow : '')
|
|
|
} else if (arr[0] !== -1 && val.length === (this.datas.length - 1)) {
|
|
|
- console.log('点击其余的全部,触发全选')
|
|
|
const data = val.filter(item => { return item[0] })
|
|
|
data.unshift([-1])
|
|
|
this.teamBizName = '团队'
|
|
@@ -476,7 +464,6 @@ export default {
|
|
|
this.bizName = '业务线'
|
|
|
this.bizIdCode = this.optionData
|
|
|
} else if (arr[0] !== -1) {
|
|
|
- console.log('基础多选')
|
|
|
this.teamNames = val
|
|
|
this.teamBizName = a + (b ? ' / ' + b : '')
|
|
|
const datas = val.map(item => { return item[0] })
|
|
@@ -490,7 +477,6 @@ export default {
|
|
|
this.bizName = name + (nameTow ? '/' + nameTow : '')
|
|
|
}
|
|
|
}
|
|
|
- console.log(this.teamNames, this.bizIdCode, '看看你是谁')
|
|
|
this.searchForm.bizIds = this.bizIdCode
|
|
|
this.handleBizId(this.searchForm.bizIds)
|
|
|
const teamNum = []
|
|
@@ -502,7 +488,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.searchForm.teamIds = Array.from(new Set(teamNum))
|
|
|
- console.log(this.searchForm.teamIds, '看看ssss你是谁')
|
|
|
} else {
|
|
|
this.teamBizName = '团队'
|
|
|
this.bizName = '业务线'
|
|
@@ -564,7 +549,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleBizId(e) { // 业务线变动
|
|
|
- console.log(e, 'bizList')
|
|
|
this.searchForm.bizIds = e
|
|
|
this.queryTeamInfoList(this.searchForm.bizIds)// 重新获取团队
|
|
|
// const res = this.searchEnum.businesslines.find(item => item.code === e)
|