From 7b691a737879925e1dd109571c36088a6174c817 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Thu, 24 Mar 2022 18:36:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=9B=B4=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/dict/JDictSelectTag.vue | 9 ++++- .../src/components/dict/JMultiSelectTag.vue | 10 ++++++ .../components/DocumentLibrary.vue | 35 +++++++++++++++++-- .../searchCenter/components/whole.vue | 8 ++++- 4 files changed, 57 insertions(+), 5 deletions(-) diff --git a/jero-web/src/components/dict/JDictSelectTag.vue b/jero-web/src/components/dict/JDictSelectTag.vue index badc2d298..85718732d 100644 --- a/jero-web/src/components/dict/JDictSelectTag.vue +++ b/jero-web/src/components/dict/JDictSelectTag.vue @@ -27,6 +27,7 @@ placeholder: String, triggerChange: Boolean, disabled: Boolean, + db_field_name:String, value: [String, Number], type: String, getPopupContainer:{ @@ -94,11 +95,17 @@ }else{ val = e } - console.log(val) + let content = '' + this.dictOptions.forEach(res=>{ + if (res.value == e){ + content = res.text || res.label + } + }) if(this.triggerChange){ this.$emit('change', val); }else{ this.$emit('input', val); + this.$emit('changeQuery', content,this.db_field_name); } }, setCurrentDictOptions(dictOptions){ diff --git a/jero-web/src/components/dict/JMultiSelectTag.vue b/jero-web/src/components/dict/JMultiSelectTag.vue index 0e48d3ca6..2867e7145 100644 --- a/jero-web/src/components/dict/JMultiSelectTag.vue +++ b/jero-web/src/components/dict/JMultiSelectTag.vue @@ -36,6 +36,7 @@ placeholder: String, disabled: Boolean, value: String, + db_field_name:String, type: String, options:Array, spliter:{ @@ -104,7 +105,16 @@ }, onChange (selectedValue) { + let content = [] + this.dictOptions.forEach(res=>{ + selectedValue.forEach(val=>{ + if (res.value == val){ + content.push(res.text || res.label) + } + }) + }) this.$emit('change', selectedValue.join(this.spliter)); + this.$emit('changeQuery', content.join(this.spliter),this.db_field_name); }, setCurrentDictOptions(dictOptions){ this.dictOptions = dictOptions diff --git a/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue b/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue index 2c60f3781..9c5840b93 100644 --- a/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue +++ b/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue @@ -11,6 +11,8 @@ :maxTagCount="1" :tree-data="item.tree" tree-checkable + @click="treeClick(item.db_field_name)" + @change="treeChange" :placeholder="$t('PleaseSelect')+item.db_field_txt" /> @@ -31,12 +33,15 @@
{{item.db_field_txt}}
@@ -182,6 +187,7 @@ queryParam: {}, visible: false, dataSource: [], + db_field_name: '', url: { queryCondition: 'search/document/queryCondition', getInfoList: 'search/document/getInfoList', @@ -397,11 +403,13 @@ }, dateChange(item) { this.queryParam[item] = moment(this.queryParam[item]).format('YYYY-MM-DD') + this.queryParam[item + '_name'] = moment(this.queryParam[item]).format('YYYY-MM-DD') }, onChange(item) { let dateOne = moment(this.queryParam[item][0]).format('YYYY-MM-DD') let dateTwo = moment(this.queryParam[item][1]).format('YYYY-MM-DD') this.queryParam[item] = [dateOne, dateTwo] + this.queryParam[item + '_name'] = [dateOne, dateTwo] }, getCondition() { let query = { @@ -419,12 +427,30 @@ searchReset() { this.pageNo = 1 this.queryParam = {} + this.queryParamSeach = '' this.getInfoList() }, searchQuery() { + let queryParam = JSON.parse(JSON.stringify(this.queryParam)) + 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) this.pageNo = 1 this.getInfoList() }, + treeChange(value, text) { + this.queryParam[this.db_field_name + '_name'] = text + }, + treeClick(db_field_name) { + this.db_field_name = db_field_name + }, searchData(data, selectModel) { this.queryParam = { ...this.queryParam, ...data } this.selectModel = selectModel @@ -434,16 +460,19 @@ this.queryParam.selectValueTwo = value this.getInfoList() }, + changeQuery(val, name) { + this.queryParam[name + '_name'] = val + }, getInfoList() { let queryParam = JSON.parse(JSON.stringify(this.queryParam)) - this.queryParamSeach = '' Object.keys(queryParam).forEach(val => { if (queryParam[val] instanceof Array) { queryParam[val] = queryParam[val].join(',') } - this.queryParamSeach = this.queryParamSeach + queryParam[val] + ',' + if (val.includes('_name')) { + delete queryParam[val] + } }) - this.queryParamSeach = this.queryParamSeach.substr(0, this.queryParamSeach.length - 1) let query = { pageNo: this.pageNo, pageSize: this.pageSize, diff --git a/jero-web/src/views/documentTools/searchCenter/components/whole.vue b/jero-web/src/views/documentTools/searchCenter/components/whole.vue index 01531e35a..9324c95e3 100644 --- a/jero-web/src/views/documentTools/searchCenter/components/whole.vue +++ b/jero-web/src/views/documentTools/searchCenter/components/whole.vue @@ -11,7 +11,7 @@
- {{item.module_type}} + @@ -39,6 +39,7 @@
暂无数据
+
{