不区分大小写

szh_zidingyibiaoti
张同海 2 years ago
parent a8ebbdae2d
commit fa7a09c696

@ -92,12 +92,43 @@ export default {
},
handleSearch(value) {
let Rdata = []
let UpperType = false
let LowerType = false
if (value) {
let Upper = value.toUpperCase()
let Lower = value.toLowerCase()
this.FieldNameList2.forEach(item => {
if (item.name.indexOf(value) > -1) {
Rdata.push(item)
}
})
this.FieldNameList2.forEach(item => {
if (item.name.indexOf(Upper) > -1) {
UpperType = false
Rdata.forEach(e => {
if (e.code == item.code) {
UpperType = true
}
})
if (!UpperType) {
Rdata.push(item)
}
}
})
this.FieldNameList2.forEach(item => {
if (item.name.indexOf(Lower) > -1) {
LowerType = false
Rdata.forEach(e => {
if (e.code == item.code) {
LowerType = true
}
})
if (!LowerType) {
Rdata.push(item)
}
}
})
} else {
Rdata = this.FieldNameList2
}

Loading…
Cancel
Save