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

@ -98,12 +98,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
}

@ -125,13 +125,59 @@ export default {
},
methods: {
FnQuery() {
this.loading = true
getDjyTenantConfig({ type: 'booking_default_value' }).then(res => {
if (res.code == 200) {
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.init()
},
FnReset() {
@ -172,7 +218,6 @@ export default {
this.loading = true
getDjyTenantConfig({ type: 'booking_default_value' }).then(res => {
if (res.code == 200) {
console.log(this.userInfo)
this.loadData = JSON.parse(res.data.configJson)
this.DisplayLoadData = this.loadData
} else {

Loading…
Cancel
Save