去掉搜索中心不必要的传参

This commit is contained in:
qq787203167
2022-04-01 14:19:36 +08:00
parent 5a7b7fb3d2
commit c969e356e1
2 changed files with 17 additions and 8 deletions
-3
View File
@@ -21,7 +21,6 @@ const service = axios.create({
})
const err = (error) => {
console.log(error)
if (error.response) {
let data = error.response.data
const token = Vue.ls.get(ACCESS_TOKEN)
@@ -199,9 +198,7 @@ function blobToJson(data) {
fileReader.onload = function() {
try {
let jsonData = JSON.parse(this.result) // 说明是普通对象数据,后台转换失败
console.log('jsonData', jsonData)
if (jsonData.status === 500) {
console.log('token----------', token)
if (token && jsonData.message.includes('Token失效')) {
Modal.error({
title: '登录已过期',
@@ -97,9 +97,16 @@
}
},
onSearch(event) {
this.queryParam[this.selectModel] = event
if (this.$refs.DocumentLibraryRef) {
this.$refs.DocumentLibraryRef.searchData(this.queryParam, this.selectModel, this.selectModelName)
if (event == '' || !event) {
this.queryParam = {}
if (this.$refs.DocumentLibraryRef) {
this.$refs.DocumentLibraryRef.searchData(this.queryParam, this.selectModel, this.selectModelName)
}
} else {
this.queryParam[this.selectModel] = event
if (this.$refs.DocumentLibraryRef) {
this.$refs.DocumentLibraryRef.searchData(this.queryParam, this.selectModel, this.selectModelName)
}
}
},
wholeOnSearch(event) {
@@ -111,8 +118,13 @@
if (this.$refs.wholeRef) {
this.$refs.wholeRef.searchDataTwo(event)
} else if (this.$refs.DocumentLibraryRef) {
this.queryParam[this.selectModel] = event
this.$refs.DocumentLibraryRef.searchDataTwo(this.queryParam, this.selectModel, this.selectModelName)
if (event == '' || !event) {
this.queryParam = {}
this.$refs.DocumentLibraryRef.searchDataTwo(this.queryParam, this.selectModel, this.selectModelName)
} else {
this.queryParam[this.selectModel] = event
this.$refs.DocumentLibraryRef.searchDataTwo(this.queryParam, this.selectModel, this.selectModelName)
}
}
},
getCondition() {