修改禅道已知bug

This commit is contained in:
qq787203167
2022-03-30 14:23:02 +08:00
parent 9692401b1e
commit 94a25c4b7a
4 changed files with 30 additions and 23 deletions
@@ -318,6 +318,7 @@
queryParamSeach: '',
mapOne: {},
mapTwo: {},
selectModelName: '',
queryParamOne: {},
searchQueryOne: {}
}
@@ -443,14 +444,14 @@
})
},
dateChange(item) {
this.queryParamOne[item] = moment(this.queryParamOne[item]).format('YYYY-MM-DD')
this.queryParamOne[item + '_name'] = moment(this.queryParamOne[item]).format('YYYY-MM-DD')
this.queryParamOne[item] = this.queryParamOne[item] ? moment(this.queryParamOne[item]).format('YYYY-MM-DD') : ''
this.queryParamOne[item + '_name'] = this.queryParamOne[item + '_name'] ? moment(this.queryParamOne[item + '_name']).format('YYYY-MM-DD') : ''
},
onChange(item) {
let dateOne = moment(this.queryParamOne[item][0]).format('YYYY-MM-DD')
let dateTwo = moment(this.queryParamOne[item][1]).format('YYYY-MM-DD')
this.queryParamOne[item] = [dateOne, dateTwo]
this.queryParamOne[item + '_name'] = [dateOne, dateTwo]
this.queryParamOne[item] = dateOne ? [dateOne, dateTwo] : []
this.queryParamOne[item + '_name'] = dateOne ? [dateOne, dateTwo] : []
},
getCondition() {
let query = {
@@ -493,23 +494,19 @@
this.db_field_name = db_field_name
},
ParamSeach() {
let queryParam = JSON.parse(JSON.stringify(this.queryParamOne))
this.queryParamSeach = ''
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
queryParam[val] = queryParam[val].join(',')
}
if (val.includes('_name')) {
this.queryParamSeach = this.queryParamSeach + queryParam[val] + ','
}
})
this.queryParamSeach = this.queryParamSeach.substr(0, this.queryParamSeach.length - 1)
let queryParam = JSON.parse(JSON.stringify(this.searchQueryOne))
if (queryParam[this.selectModel]) {
this.queryParamSeach = this.selectModelName + '' + queryParam[this.selectModel]
} else {
this.queryParamSeach = ''
}
},
searchData(data, selectModel) {
searchData(data, selectModel, name) {
this.queryParam = {}
this.searchQueryOne = data || {}
this.queryParam = { ...this.queryParamOne, ...data }
this.selectModel = selectModel
this.selectModelName = name
this.ParamSeach()
this.pageNo = 1
if (this.isTrue) {
@@ -518,11 +515,12 @@
this.getParagraphInfoList(1)
}
},
searchDataTwo(data, selectModel) {
searchDataTwo(data, selectModel, name) {
this.queryParam = {}
this.searchQueryOne = data || {}
this.queryParam = { ...this.queryParamOne, ...data }
this.selectModel = selectModel
this.selectModelName = name
this.ParamSeach()
this.pageNo = 1
if (this.isTrue) {
@@ -636,7 +634,7 @@
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: item.id.slice(0,32),
id: item.id.slice(0, 32),
title: item.title,
serial_number: item.serial_number
}
@@ -71,6 +71,7 @@
queryCondition: 'search/document/queryCondition'
},
selectModel: '',
selectModelName: '',
queryParam: {},
selectValueTwo: ''
}
@@ -86,7 +87,7 @@
onSearch(event) {
this.queryParam[this.selectModel] = event
if (this.$refs.DocumentLibraryRef) {
this.$refs.DocumentLibraryRef.searchData(this.queryParam, this.selectModel)
this.$refs.DocumentLibraryRef.searchData(this.queryParam, this.selectModel, this.selectModelName)
}
},
wholeOnSearch(event) {
@@ -99,7 +100,7 @@
this.$refs.wholeRef.searchDataTwo(event)
} else if (this.$refs.DocumentLibraryRef) {
this.queryParam[this.selectModel] = event
this.$refs.DocumentLibraryRef.searchDataTwo(this.queryParam, this.selectModel)
this.$refs.DocumentLibraryRef.searchDataTwo(this.queryParam, this.selectModel, this.selectModelName)
}
},
getCondition() {
@@ -112,6 +113,7 @@
this.searchOption = res.result || []
if (this.searchOption.length > 0) {
this.selectModel = this.searchOption[0].db_field_name
this.selectModelName = this.searchOption[0].db_field_txt
}
} else {
this.searchOption = []
@@ -119,6 +121,14 @@
})
},
selectModelChange(event) {
let content = this.searchOption.filter((res) => {
return res.db_field_name === event
})
if (content && content.length > 0) {
this.selectModelName = content[0].db_field_txt
} else {
this.selectModelName = ''
}
this.queryParam = {}
}
}