|
|
@@ -256,6 +256,7 @@ export default {
|
|
|
},
|
|
|
sure () {
|
|
|
this.form.type = true
|
|
|
+ console.log(this.form)
|
|
|
this.$bus.emit('serach', this.form)
|
|
|
},
|
|
|
clear () {
|
|
|
@@ -304,22 +305,10 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
const tmp = this.deptList.filter(sub => sub.deptName.indexOf(this.keyWords) > -1).map(sub => sub.id)
|
|
|
- console.log(tmp)
|
|
|
tmp.forEach(sub => {
|
|
|
const index = this.deptList.findIndex(ele => ele.id === sub)
|
|
|
this.deptList[index].search = true
|
|
|
})
|
|
|
- },
|
|
|
- querySearch (key, cb) {
|
|
|
- const tmp = this.deptList.filter(sub => sub.deptName.indexOf(key) > -1).map(sub => {
|
|
|
- const item = { value: sub.deptName, label: sub.deptName, id: sub.id }
|
|
|
- return item
|
|
|
- })
|
|
|
- cb(tmp)
|
|
|
- },
|
|
|
- handleSelect (item) {
|
|
|
- const index = this.deptList.findIndex(sub => sub.id === item.id)
|
|
|
- this.deptList[index].search = true
|
|
|
}
|
|
|
}
|
|
|
}
|