修改禅道已知bug

This commit is contained in:
qq787203167
2022-03-30 14:23:02 +08:00
parent 9692401b1e
commit 94a25c4b7a
4 changed files with 30 additions and 23 deletions
@@ -97,7 +97,6 @@
</div> </div>
<a-form-model-item class="itemModel" :prop="item.db_field_name"> <a-form-model-item class="itemModel" :prop="item.db_field_name">
<a-range-picker class="box-input" v-model="formInline[item.db_field_name]" <a-range-picker class="box-input" v-model="formInline[item.db_field_name]"
:placeholder="$t('PleaseSelect')+item.db_field_txt"
:disabled="disabled" :disabled="disabled"
@change="onChange(item.db_field_name)"></a-range-picker> @change="onChange(item.db_field_name)"></a-range-picker>
</a-form-model-item> </a-form-model-item>
@@ -124,7 +123,7 @@
</div> </div>
</a-col> </a-col>
<a-col :span="24" v-else-if="item.field_show_type === '8'"> <a-col :span="24" v-else-if="item.field_show_type === '8' || item.field_show_type === 'text'">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="item.field_must_input == 1">*</span> <span class="Required" v-if="item.field_must_input == 1">*</span>
@@ -136,7 +136,7 @@
:loading="loading" :loading="loading"
> >
<span slot="content" slot-scope="text,record"> <span slot="content" slot-scope="text,record">
<a-tooltip placement="top"> <a-tooltip placement="topLeft">
<template slot="title"> <template slot="title">
<span v-html="text"></span> <span v-html="text"></span>
</template> </template>
@@ -318,6 +318,7 @@
queryParamSeach: '', queryParamSeach: '',
mapOne: {}, mapOne: {},
mapTwo: {}, mapTwo: {},
selectModelName: '',
queryParamOne: {}, queryParamOne: {},
searchQueryOne: {} searchQueryOne: {}
} }
@@ -443,14 +444,14 @@
}) })
}, },
dateChange(item) { dateChange(item) {
this.queryParamOne[item] = 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'] = 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) { onChange(item) {
let dateOne = moment(this.queryParamOne[item][0]).format('YYYY-MM-DD') let dateOne = moment(this.queryParamOne[item][0]).format('YYYY-MM-DD')
let dateTwo = moment(this.queryParamOne[item][1]).format('YYYY-MM-DD') let dateTwo = moment(this.queryParamOne[item][1]).format('YYYY-MM-DD')
this.queryParamOne[item] = [dateOne, dateTwo] this.queryParamOne[item] = dateOne ? [dateOne, dateTwo] : []
this.queryParamOne[item + '_name'] = [dateOne, dateTwo] this.queryParamOne[item + '_name'] = dateOne ? [dateOne, dateTwo] : []
}, },
getCondition() { getCondition() {
let query = { let query = {
@@ -493,23 +494,19 @@
this.db_field_name = db_field_name this.db_field_name = db_field_name
}, },
ParamSeach() { ParamSeach() {
let queryParam = JSON.parse(JSON.stringify(this.queryParamOne)) let queryParam = JSON.parse(JSON.stringify(this.searchQueryOne))
if (queryParam[this.selectModel]) {
this.queryParamSeach = this.selectModelName + ':' + queryParam[this.selectModel]
} else {
this.queryParamSeach = '' 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)
}, },
searchData(data, selectModel) { searchData(data, selectModel, name) {
this.queryParam = {} this.queryParam = {}
this.searchQueryOne = data || {} this.searchQueryOne = data || {}
this.queryParam = { ...this.queryParamOne, ...data } this.queryParam = { ...this.queryParamOne, ...data }
this.selectModel = selectModel this.selectModel = selectModel
this.selectModelName = name
this.ParamSeach() this.ParamSeach()
this.pageNo = 1 this.pageNo = 1
if (this.isTrue) { if (this.isTrue) {
@@ -518,11 +515,12 @@
this.getParagraphInfoList(1) this.getParagraphInfoList(1)
} }
}, },
searchDataTwo(data, selectModel) { searchDataTwo(data, selectModel, name) {
this.queryParam = {} this.queryParam = {}
this.searchQueryOne = data || {} this.searchQueryOne = data || {}
this.queryParam = { ...this.queryParamOne, ...data } this.queryParam = { ...this.queryParamOne, ...data }
this.selectModel = selectModel this.selectModel = selectModel
this.selectModelName = name
this.ParamSeach() this.ParamSeach()
this.pageNo = 1 this.pageNo = 1
if (this.isTrue) { if (this.isTrue) {
@@ -71,6 +71,7 @@
queryCondition: 'search/document/queryCondition' queryCondition: 'search/document/queryCondition'
}, },
selectModel: '', selectModel: '',
selectModelName: '',
queryParam: {}, queryParam: {},
selectValueTwo: '' selectValueTwo: ''
} }
@@ -86,7 +87,7 @@
onSearch(event) { onSearch(event) {
this.queryParam[this.selectModel] = event this.queryParam[this.selectModel] = event
if (this.$refs.DocumentLibraryRef) { if (this.$refs.DocumentLibraryRef) {
this.$refs.DocumentLibraryRef.searchData(this.queryParam, this.selectModel) this.$refs.DocumentLibraryRef.searchData(this.queryParam, this.selectModel, this.selectModelName)
} }
}, },
wholeOnSearch(event) { wholeOnSearch(event) {
@@ -99,7 +100,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, this.selectModelName)
} }
}, },
getCondition() { getCondition() {
@@ -112,6 +113,7 @@
this.searchOption = res.result || [] this.searchOption = res.result || []
if (this.searchOption.length > 0) { if (this.searchOption.length > 0) {
this.selectModel = this.searchOption[0].db_field_name this.selectModel = this.searchOption[0].db_field_name
this.selectModelName = this.searchOption[0].db_field_txt
} }
} else { } else {
this.searchOption = [] this.searchOption = []
@@ -119,6 +121,14 @@
}) })
}, },
selectModelChange(event) { 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 = {} this.queryParam = {}
} }
} }