szh_zidingyibiaoti
张同海 2 years ago
parent fa7a09c696
commit 1a081b02b8

@ -98,12 +98,43 @@ export default {
}, },
handleSearch(value) { handleSearch(value) {
let Rdata = [] let Rdata = []
let UpperType = false
let LowerType = false
if (value) { if (value) {
let Upper = value.toUpperCase()
let Lower = value.toLowerCase()
this.FieldNameList2.forEach(item => { this.FieldNameList2.forEach(item => {
if (item.name.indexOf(value) > -1) { if (item.name.indexOf(value) > -1) {
Rdata.push(item) 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 { } else {
Rdata = this.FieldNameList2 Rdata = this.FieldNameList2
} }

@ -125,13 +125,59 @@ export default {
}, },
methods: { methods: {
FnQuery() { FnQuery() {
let Rdata = [] this.loading = true
this.loadData.forEach(item => { getDjyTenantConfig({ type: 'booking_default_value' }).then(res => {
if (item.fieldName.indexOf(this.queryParam.fieldName) > -1) { if (res.code == 200) {
Rdata.push(item) this.loadData = JSON.parse(res.data.configJson)
this.DisplayLoadData = this.loadData
} else {
this.loadData = []
this.$message.warning(res.message)
}
this.loading = false
if (this.queryParam.fieldName) {
let Rdata = []
let UpperType = false
let LowerType = false
let Upper = this.queryParam.fieldName.toUpperCase()
let Lower = this.queryParam.fieldName.toLowerCase()
this.loadData.forEach(item => {
if (item.fieldName.indexOf(this.queryParam.fieldName) > -1) {
Rdata.push(item)
}
})
this.loadData.forEach(item => {
if (item.fieldName.indexOf(Upper) > -1) {
UpperType = false
console.log(item)
Rdata.forEach(e => {
console.log(e, item)
if (e.field == item.field) {
UpperType = true
}
})
if (!UpperType) {
Rdata.push(item)
}
}
})
this.loadData.forEach(item => {
if (item.fieldName.indexOf(Lower) > -1) {
LowerType = false
Rdata.forEach(e => {
if (e.field == item.field) {
LowerType = true
}
})
if (!LowerType) {
Rdata.push(item)
}
}
})
this.DisplayLoadData = Rdata
} }
}) })
this.DisplayLoadData = Rdata
// this.init() // this.init()
}, },
FnReset() { FnReset() {
@ -172,7 +218,6 @@ export default {
this.loading = true this.loading = true
getDjyTenantConfig({ type: 'booking_default_value' }).then(res => { getDjyTenantConfig({ type: 'booking_default_value' }).then(res => {
if (res.code == 200) { if (res.code == 200) {
console.log(this.userInfo)
this.loadData = JSON.parse(res.data.configJson) this.loadData = JSON.parse(res.data.configJson)
this.DisplayLoadData = this.loadData this.DisplayLoadData = this.loadData
} else { } else {

Loading…
Cancel
Save