修改搜搜中心
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<span class="text-sel">{{item.db_field_txt}}</span>
|
||||
<a-tree-select
|
||||
class="text-select"
|
||||
v-model="queryParam[item.db_field_name]"
|
||||
v-model="queryParamOne[item.db_field_name]"
|
||||
:maxTagCount="1"
|
||||
:tree-data="item.tree"
|
||||
tree-checkable
|
||||
@@ -20,17 +20,17 @@
|
||||
item.field_show_type == '9' || item.field_show_type == '10' || item.field_show_type == '11'">
|
||||
<span class="text-sel">{{item.db_field_txt}}</span>
|
||||
<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"/>
|
||||
</div>
|
||||
<div class="text-left-select" v-if="item.field_show_type == '2'">
|
||||
<span class="text-sel">{{item.db_field_txt}}</span>
|
||||
<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 class="text-left-select" v-if="item.field_show_type == '3'">
|
||||
<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"
|
||||
:type="'select'"
|
||||
:db_field_name="item.db_field_name"
|
||||
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
<div class="text-left-select" v-if="item.field_show_type == '4'">
|
||||
<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"
|
||||
@changeQuery="changeQuery"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt" :type="'select'"
|
||||
@@ -50,11 +50,11 @@
|
||||
<a-date-picker class="text-select"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
@change="dateChange(item.db_field_name)"
|
||||
v-model="queryParam[item.db_field_name]"/>
|
||||
v-model="queryParamOne[item.db_field_name]"/>
|
||||
</div>
|
||||
<div class="text-left-select" v-if="item.field_show_type == '6'">
|
||||
<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"
|
||||
@change="onChange(item.db_field_name)"></a-range-picker>
|
||||
</div>
|
||||
@@ -306,7 +306,9 @@
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
queryParamSeach: '',
|
||||
mapOne: {},
|
||||
mapTwo: {}
|
||||
mapTwo: {},
|
||||
queryParamOne: {},
|
||||
searchQueryOne: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -336,10 +338,11 @@
|
||||
|
||||
},
|
||||
selectListModel(val) {
|
||||
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
|
||||
this.isTrue = val == 'list' ? true : false
|
||||
if (this.isTrue){
|
||||
if (this.isTrue) {
|
||||
this.getInfoList(1)
|
||||
}else{
|
||||
} else {
|
||||
this.getParagraphInfoList(1)
|
||||
}
|
||||
},
|
||||
@@ -356,19 +359,21 @@
|
||||
}
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
|
||||
this.pageNo = page
|
||||
if (this.isTrue){
|
||||
if (this.isTrue) {
|
||||
this.getInfoList(1)
|
||||
}else{
|
||||
} else {
|
||||
this.getParagraphInfoList(1)
|
||||
}
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
if (this.isTrue){
|
||||
if (this.isTrue) {
|
||||
this.getInfoList(1)
|
||||
}else{
|
||||
} else {
|
||||
this.getParagraphInfoList(1)
|
||||
}
|
||||
},
|
||||
@@ -425,14 +430,14 @@
|
||||
})
|
||||
},
|
||||
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')
|
||||
this.queryParamOne[item] = moment(this.queryParamOne[item]).format('YYYY-MM-DD')
|
||||
this.queryParamOne[item + '_name'] = moment(this.queryParamOne[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]
|
||||
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]
|
||||
},
|
||||
getCondition() {
|
||||
let query = {
|
||||
@@ -449,31 +454,33 @@
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.queryParamOne = {}
|
||||
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
|
||||
this.queryParamSeach = ''
|
||||
if (this.isTrue){
|
||||
if (this.isTrue) {
|
||||
this.getInfoList(1)
|
||||
}else{
|
||||
} else {
|
||||
this.getParagraphInfoList(1)
|
||||
}
|
||||
},
|
||||
searchQuery() {
|
||||
this.ParamSeach()
|
||||
this.queryParam = { ...this.queryParamOne, ...this.searchQueryOne }
|
||||
this.pageNo = 1
|
||||
if (this.isTrue){
|
||||
if (this.isTrue) {
|
||||
this.getInfoList(1)
|
||||
}else{
|
||||
} else {
|
||||
this.getParagraphInfoList(1)
|
||||
}
|
||||
},
|
||||
treeChange(value, text) {
|
||||
this.queryParam[this.db_field_name + '_name'] = text
|
||||
this.queryParamOne[this.db_field_name + '_name'] = text
|
||||
},
|
||||
treeClick(db_field_name) {
|
||||
this.db_field_name = db_field_name
|
||||
},
|
||||
ParamSeach() {
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParamOne))
|
||||
this.queryParamSeach = ''
|
||||
Object.keys(queryParam).forEach(val => {
|
||||
if (queryParam[val] instanceof Array) {
|
||||
@@ -486,29 +493,33 @@
|
||||
this.queryParamSeach = this.queryParamSeach.substr(0, this.queryParamSeach.length - 1)
|
||||
},
|
||||
searchData(data, selectModel) {
|
||||
this.queryParam = { ...this.queryParam, ...data }
|
||||
this.queryParam = {}
|
||||
this.searchQueryOne = data || {}
|
||||
this.queryParam = { ...this.queryParamOne, ...data }
|
||||
this.selectModel = selectModel
|
||||
this.ParamSeach()
|
||||
this.pageNo = 1
|
||||
if (this.isTrue){
|
||||
if (this.isTrue) {
|
||||
this.getInfoList(1)
|
||||
}else{
|
||||
} else {
|
||||
this.getParagraphInfoList(1)
|
||||
}
|
||||
},
|
||||
searchDataTwo(data, selectModel) {
|
||||
this.queryParam = { ...this.queryParam, ...data }
|
||||
this.queryParam = {}
|
||||
this.searchQueryOne = data || {}
|
||||
this.queryParam = { ...this.queryParamOne, ...data }
|
||||
this.selectModel = selectModel
|
||||
this.ParamSeach()
|
||||
this.pageNo = 1
|
||||
if (this.isTrue){
|
||||
if (this.isTrue) {
|
||||
this.getInfoList(2)
|
||||
}else{
|
||||
} else {
|
||||
this.getParagraphInfoList(2)
|
||||
}
|
||||
},
|
||||
changeQuery(val, name) {
|
||||
this.queryParam[name + '_name'] = val
|
||||
this.queryParamOne[name + '_name'] = val
|
||||
},
|
||||
getInfoList(num) {
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
@@ -520,6 +531,7 @@
|
||||
delete queryParam[val]
|
||||
}
|
||||
})
|
||||
this.mapTwo = {}
|
||||
if (num == 1) {
|
||||
this.mapOne = queryParam
|
||||
} else if (num == 2) {
|
||||
@@ -549,7 +561,7 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
getParagraphInfoList(num){
|
||||
getParagraphInfoList(num) {
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
Object.keys(queryParam).forEach(val => {
|
||||
if (queryParam[val] instanceof Array) {
|
||||
@@ -559,12 +571,13 @@
|
||||
delete queryParam[val]
|
||||
}
|
||||
})
|
||||
this.mapTwo = {}
|
||||
if (num == 1) {
|
||||
this.mapOne = queryParam
|
||||
} else if (num == 2) {
|
||||
this.mapTwo = queryParam
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
this.mapTwo.ids = selectedRowKeys.join(',')
|
||||
let checkboxText = JSON.parse(JSON.stringify(this.checkboxText))
|
||||
this.mapTwo.ids = checkboxText.join(',')
|
||||
}
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="search-detail">
|
||||
<div class="search-detail-wrap">
|
||||
<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"
|
||||
v-for="(item,index) in searchOption" :key="index">
|
||||
{{item.db_field_txt}}
|
||||
@@ -98,7 +98,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)
|
||||
}
|
||||
},
|
||||
getCondition() {
|
||||
@@ -116,6 +116,9 @@
|
||||
this.searchOption = []
|
||||
}
|
||||
})
|
||||
},
|
||||
selectModelChange(event) {
|
||||
this.queryParam = {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user