修改搜搜中心

This commit is contained in:
qq787203167
2022-03-25 19:16:56 +08:00
parent b2468052c7
commit dfb94dae42
2 changed files with 55 additions and 39 deletions
@@ -7,7 +7,7 @@
<span class="text-sel">{{item.db_field_txt}}</span> <span class="text-sel">{{item.db_field_txt}}</span>
<a-tree-select <a-tree-select
class="text-select" class="text-select"
v-model="queryParam[item.db_field_name]" v-model="queryParamOne[item.db_field_name]"
:maxTagCount="1" :maxTagCount="1"
:tree-data="item.tree" :tree-data="item.tree"
tree-checkable tree-checkable
@@ -20,17 +20,17 @@
item.field_show_type == '9' || item.field_show_type == '10' || item.field_show_type == '11'"> item.field_show_type == '9' || item.field_show_type == '10' || item.field_show_type == '11'">
<span class="text-sel">{{item.db_field_txt}}</span> <span class="text-sel">{{item.db_field_txt}}</span>
<a-input class="text-select" <a-input class="text-select"
v-model="queryParam[item.db_field_name]" v-model="queryParamOne[item.db_field_name]"
:placeholder="$t('PleaseEnter')+item.db_field_txt"/> :placeholder="$t('PleaseEnter')+item.db_field_txt"/>
</div> </div>
<div class="text-left-select" v-if="item.field_show_type == '2'"> <div class="text-left-select" v-if="item.field_show_type == '2'">
<span class="text-sel">{{item.db_field_txt}}</span> <span class="text-sel">{{item.db_field_txt}}</span>
<a-input-number class="text-select" :placeholder="$t('PleaseEnter')+item.db_field_txt" <a-input-number class="text-select" :placeholder="$t('PleaseEnter')+item.db_field_txt"
v-model="queryParam[item.db_field_name]" :min="1" :max="99999999"/> v-model="queryParamOne[item.db_field_name]" :min="1" :max="99999999"/>
</div> </div>
<div class="text-left-select" v-if="item.field_show_type == '3'"> <div class="text-left-select" v-if="item.field_show_type == '3'">
<span class="text-sel">{{item.db_field_txt}}</span> <span class="text-sel">{{item.db_field_txt}}</span>
<j-dict-select-tag class="text-select" v-model="queryParam[item.db_field_name]" <j-dict-select-tag class="text-select" v-model="queryParamOne[item.db_field_name]"
:placeholder="$t('PleaseSelect')+item.db_field_txt" :placeholder="$t('PleaseSelect')+item.db_field_txt"
:type="'select'" :type="'select'"
:db_field_name="item.db_field_name" :db_field_name="item.db_field_name"
@@ -39,7 +39,7 @@
</div> </div>
<div class="text-left-select" v-if="item.field_show_type == '4'"> <div class="text-left-select" v-if="item.field_show_type == '4'">
<span class="text-sel">{{item.db_field_txt}}</span> <span class="text-sel">{{item.db_field_txt}}</span>
<j-multi-select-tag class="text-select" v-model="queryParam[item.db_field_name]" <j-multi-select-tag class="text-select" v-model="queryParamOne[item.db_field_name]"
:db_field_name="item.db_field_name" :db_field_name="item.db_field_name"
@changeQuery="changeQuery" @changeQuery="changeQuery"
:placeholder="$t('PleaseSelect')+item.db_field_txt" :type="'select'" :placeholder="$t('PleaseSelect')+item.db_field_txt" :type="'select'"
@@ -50,11 +50,11 @@
<a-date-picker class="text-select" <a-date-picker class="text-select"
:placeholder="$t('PleaseSelect')+item.db_field_txt" :placeholder="$t('PleaseSelect')+item.db_field_txt"
@change="dateChange(item.db_field_name)" @change="dateChange(item.db_field_name)"
v-model="queryParam[item.db_field_name]"/> v-model="queryParamOne[item.db_field_name]"/>
</div> </div>
<div class="text-left-select" v-if="item.field_show_type == '6'"> <div class="text-left-select" v-if="item.field_show_type == '6'">
<span class="text-sel">{{item.db_field_txt}}</span> <span class="text-sel">{{item.db_field_txt}}</span>
<a-range-picker class="text-select" v-model="queryParam[item.db_field_name]" <a-range-picker class="text-select" v-model="queryParamOne[item.db_field_name]"
:placeholder="$t('PleaseSelect')+item.db_field_txt" :placeholder="$t('PleaseSelect')+item.db_field_txt"
@change="onChange(item.db_field_name)"></a-range-picker> @change="onChange(item.db_field_name)"></a-range-picker>
</div> </div>
@@ -306,7 +306,9 @@
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
queryParamSeach: '', queryParamSeach: '',
mapOne: {}, mapOne: {},
mapTwo: {} mapTwo: {},
queryParamOne: {},
searchQueryOne: {}
} }
}, },
watch: { watch: {
@@ -336,10 +338,11 @@
}, },
selectListModel(val) { selectListModel(val) {
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
this.isTrue = val == 'list' ? true : false this.isTrue = val == 'list' ? true : false
if (this.isTrue){ if (this.isTrue) {
this.getInfoList(1) this.getInfoList(1)
}else{ } else {
this.getParagraphInfoList(1) this.getParagraphInfoList(1)
} }
}, },
@@ -356,19 +359,21 @@
} }
}, },
pageOnChange(page, pageSize) { pageOnChange(page, pageSize) {
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
this.pageNo = page this.pageNo = page
if (this.isTrue){ if (this.isTrue) {
this.getInfoList(1) this.getInfoList(1)
}else{ } else {
this.getParagraphInfoList(1) this.getParagraphInfoList(1)
} }
}, },
SizeChange(page, pageSize) { SizeChange(page, pageSize) {
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
this.pageNo = 1 this.pageNo = 1
this.pageSize = pageSize this.pageSize = pageSize
if (this.isTrue){ if (this.isTrue) {
this.getInfoList(1) this.getInfoList(1)
}else{ } else {
this.getParagraphInfoList(1) this.getParagraphInfoList(1)
} }
}, },
@@ -425,14 +430,14 @@
}) })
}, },
dateChange(item) { dateChange(item) {
this.queryParam[item] = moment(this.queryParam[item]).format('YYYY-MM-DD') this.queryParamOne[item] = moment(this.queryParamOne[item]).format('YYYY-MM-DD')
this.queryParam[item + '_name'] = moment(this.queryParam[item]).format('YYYY-MM-DD') this.queryParamOne[item + '_name'] = moment(this.queryParamOne[item]).format('YYYY-MM-DD')
}, },
onChange(item) { onChange(item) {
let dateOne = moment(this.queryParam[item][0]).format('YYYY-MM-DD') let dateOne = moment(this.queryParamOne[item][0]).format('YYYY-MM-DD')
let dateTwo = moment(this.queryParam[item][1]).format('YYYY-MM-DD') let dateTwo = moment(this.queryParamOne[item][1]).format('YYYY-MM-DD')
this.queryParam[item] = [dateOne, dateTwo] this.queryParamOne[item] = [dateOne, dateTwo]
this.queryParam[item + '_name'] = [dateOne, dateTwo] this.queryParamOne[item + '_name'] = [dateOne, dateTwo]
}, },
getCondition() { getCondition() {
let query = { let query = {
@@ -449,31 +454,33 @@
}, },
searchReset() { searchReset() {
this.pageNo = 1 this.pageNo = 1
this.queryParam = {} this.queryParamOne = {}
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
this.queryParamSeach = '' this.queryParamSeach = ''
if (this.isTrue){ if (this.isTrue) {
this.getInfoList(1) this.getInfoList(1)
}else{ } else {
this.getParagraphInfoList(1) this.getParagraphInfoList(1)
} }
}, },
searchQuery() { searchQuery() {
this.ParamSeach() this.ParamSeach()
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
this.pageNo = 1 this.pageNo = 1
if (this.isTrue){ if (this.isTrue) {
this.getInfoList(1) this.getInfoList(1)
}else{ } else {
this.getParagraphInfoList(1) this.getParagraphInfoList(1)
} }
}, },
treeChange(value, text) { treeChange(value, text) {
this.queryParam[this.db_field_name + '_name'] = text this.queryParamOne[this.db_field_name + '_name'] = text
}, },
treeClick(db_field_name) { treeClick(db_field_name) {
this.db_field_name = db_field_name this.db_field_name = db_field_name
}, },
ParamSeach() { ParamSeach() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam)) let queryParam = JSON.parse(JSON.stringify(this.queryParamOne))
this.queryParamSeach = '' this.queryParamSeach = ''
Object.keys(queryParam).forEach(val => { Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) { if (queryParam[val] instanceof Array) {
@@ -486,29 +493,33 @@
this.queryParamSeach = this.queryParamSeach.substr(0, this.queryParamSeach.length - 1) this.queryParamSeach = this.queryParamSeach.substr(0, this.queryParamSeach.length - 1)
}, },
searchData(data, selectModel) { searchData(data, selectModel) {
this.queryParam = { ...this.queryParam, ...data } this.queryParam = {}
this.searchQueryOne = data || {}
this.queryParam = { ...this.queryParamOne, ...data }
this.selectModel = selectModel this.selectModel = selectModel
this.ParamSeach() this.ParamSeach()
this.pageNo = 1 this.pageNo = 1
if (this.isTrue){ if (this.isTrue) {
this.getInfoList(1) this.getInfoList(1)
}else{ } else {
this.getParagraphInfoList(1) this.getParagraphInfoList(1)
} }
}, },
searchDataTwo(data, selectModel) { searchDataTwo(data, selectModel) {
this.queryParam = { ...this.queryParam, ...data } this.queryParam = {}
this.searchQueryOne = data || {}
this.queryParam = { ...this.queryParamOne, ...data }
this.selectModel = selectModel this.selectModel = selectModel
this.ParamSeach() this.ParamSeach()
this.pageNo = 1 this.pageNo = 1
if (this.isTrue){ if (this.isTrue) {
this.getInfoList(2) this.getInfoList(2)
}else{ } else {
this.getParagraphInfoList(2) this.getParagraphInfoList(2)
} }
}, },
changeQuery(val, name) { changeQuery(val, name) {
this.queryParam[name + '_name'] = val this.queryParamOne[name + '_name'] = val
}, },
getInfoList(num) { getInfoList(num) {
let queryParam = JSON.parse(JSON.stringify(this.queryParam)) let queryParam = JSON.parse(JSON.stringify(this.queryParam))
@@ -520,6 +531,7 @@
delete queryParam[val] delete queryParam[val]
} }
}) })
this.mapTwo = {}
if (num == 1) { if (num == 1) {
this.mapOne = queryParam this.mapOne = queryParam
} else if (num == 2) { } else if (num == 2) {
@@ -549,7 +561,7 @@
} }
}) })
}, },
getParagraphInfoList(num){ getParagraphInfoList(num) {
let queryParam = JSON.parse(JSON.stringify(this.queryParam)) let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => { Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) { if (queryParam[val] instanceof Array) {
@@ -559,12 +571,13 @@
delete queryParam[val] delete queryParam[val]
} }
}) })
this.mapTwo = {}
if (num == 1) { if (num == 1) {
this.mapOne = queryParam this.mapOne = queryParam
} else if (num == 2) { } else if (num == 2) {
this.mapTwo = queryParam this.mapTwo = queryParam
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) let checkboxText = JSON.parse(JSON.stringify(this.checkboxText))
this.mapTwo.ids = selectedRowKeys.join(',') this.mapTwo.ids = checkboxText.join(',')
} }
let query = { let query = {
pageNo: this.pageNo, pageNo: this.pageNo,
@@ -5,7 +5,7 @@
<div class="search-detail"> <div class="search-detail">
<div class="search-detail-wrap"> <div class="search-detail-wrap">
<a-input-group class="input-group" compact v-if="active === $t('DocumentLibrary')"> <a-input-group class="input-group" compact v-if="active === $t('DocumentLibrary')">
<a-select v-model="selectModel"> <a-select v-model="selectModel" @change="selectModelChange">
<a-select-option :value="item.db_field_name" <a-select-option :value="item.db_field_name"
v-for="(item,index) in searchOption" :key="index"> v-for="(item,index) in searchOption" :key="index">
{{item.db_field_txt}} {{item.db_field_txt}}
@@ -98,7 +98,7 @@
this.$refs.wholeRef.searchDataTwo(event) this.$refs.wholeRef.searchDataTwo(event)
} else if (this.$refs.DocumentLibraryRef) { } else if (this.$refs.DocumentLibraryRef) {
this.queryParam[this.selectModel] = event this.queryParam[this.selectModel] = event
this.$refs.DocumentLibraryRef.searchDataTwo(this.queryParam,this.selectModel) this.$refs.DocumentLibraryRef.searchDataTwo(this.queryParam, this.selectModel)
} }
}, },
getCondition() { getCondition() {
@@ -116,6 +116,9 @@
this.searchOption = [] this.searchOption = []
} }
}) })
},
selectModelChange(event) {
this.queryParam = {}
} }
} }
} }