*
diff --git a/jero-web/src/views/documentManage/library/docDetail/index.vue b/jero-web/src/views/documentManage/library/docDetail/index.vue
index 08877cd6d..f41cb40c4 100644
--- a/jero-web/src/views/documentManage/library/docDetail/index.vue
+++ b/jero-web/src/views/documentManage/library/docDetail/index.vue
@@ -136,7 +136,7 @@
:loading="loading"
>
-
+
diff --git a/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue b/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue
index 5971f6f7d..5871d6f63 100644
--- a/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue
+++ b/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue
@@ -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
}
diff --git a/jero-web/src/views/documentTools/searchCenter/index.vue b/jero-web/src/views/documentTools/searchCenter/index.vue
index e9902c841..4a60dabe2 100644
--- a/jero-web/src/views/documentTools/searchCenter/index.vue
+++ b/jero-web/src/views/documentTools/searchCenter/index.vue
@@ -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 = {}
}
}