|
@@ -7,18 +7,6 @@
|
|
|
<span class="el-dropdown-link" style="margin-right: 20px;" @click="setCascader">{{ teamBizName.length > 11 ? teamBizName.substring(0, 11) + '...' : teamBizName }} <i class="el-icon-arrow-down" /></span>
|
|
|
<el-cascader ref="cascader" v-model="bizIdCode" collapse-tags :options="searchEnum.businesslines" :props="propsBizId" class="cascader" @change="handleBizIdChange(bizIdCode, searchEnum.businesslines)" />
|
|
|
<span class="el-dropdown-link" @click="setCascader">{{ bizName.length > 11 ? bizName.substring(0, 11) + '...' : bizName }} <i class="el-icon-arrow-down" /></span>
|
|
|
- <!-- <el-dropdown size="small" style="margin-left: 20px" @command="handleBizId">
|
|
|
- <span class="el-dropdown-link">
|
|
|
- {{ bizName }}<i class="el-icon-arrow-down el-icon--right" />
|
|
|
- </span>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item
|
|
|
- v-for="item in searchEnum.businesslines"
|
|
|
- :key="item.code"
|
|
|
- :command="item.code"
|
|
|
- >{{ item.name }}</el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown> -->
|
|
|
</div>
|
|
|
<div class="top-tabs">
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
@@ -361,7 +349,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,45 +359,39 @@ 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.bizName = '业务线'
|
|
|
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 : '')
|
|
|
}
|
|
|
}
|
|
|
- const arr = this.bizIdCode.map(value => {
|
|
|
- return value[0]
|
|
|
- })
|
|
|
- console.log(arr, 'bizId')
|
|
|
- if (arr[0] === undefined) {
|
|
|
- this.handleBizId([-1])
|
|
|
- } else {
|
|
|
- this.handleBizId(arr)
|
|
|
+ if (this.bizIdCode && this.bizIdCode.length > 0) {
|
|
|
+ const arr = this.bizIdCode.map(value => { return value[0] })
|
|
|
+ if (arr[0] === undefined) {
|
|
|
+ this.handleBizId([-1])
|
|
|
+ } else {
|
|
|
+ this.handleBizId(arr)
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
this.bizIdCode = [-1]
|
|
@@ -418,7 +399,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleChange(val, options) {
|
|
|
- console.log(val, options, '团队')
|
|
|
if (val.length > 0) {
|
|
|
let [a, b, stop] = ['', '', true]
|
|
|
val.map(e => {
|
|
@@ -437,16 +417,15 @@ 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.bizName = '业务线'
|
|
|
this.teamCode = 0
|
|
|
this.bizIdCode = null
|
|
|
} else {
|
|
@@ -456,18 +435,12 @@ export default {
|
|
|
this.teamBizName = a + (b ? ' / ' + b : '')
|
|
|
this.teamNames = data
|
|
|
this.teamCode = 0
|
|
|
+ this.bizName = '业务线'
|
|
|
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 => {
|
|
|
- if (item.code === bizIds[0]) n = item.name
|
|
|
- if (bizIds[1] && item.code === bizIds[1]) nameTow = item.name
|
|
|
- })
|
|
|
- this.bizName = n + (nameTow ? '/' + nameTow : '')
|
|
|
+ this.bizCode = 0
|
|
|
} 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 +449,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 +462,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 +473,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.searchForm.teamIds = Array.from(new Set(teamNum))
|
|
|
- console.log(this.searchForm.teamIds, '看看ssss你是谁')
|
|
|
} else {
|
|
|
this.teamBizName = '团队'
|
|
|
this.bizName = '业务线'
|
|
@@ -564,12 +534,8 @@ 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)
|
|
|
- // this.bizName = res.name
|
|
|
- // this.$store.dispatch('global/setBizId', res.code)
|
|
|
this.handleClick()
|
|
|
},
|
|
|
showSchedule(e) { // 查看日程详情
|