修改虚拟清单的高级检索

This commit is contained in:
qq787203167
2022-04-21 13:58:51 +08:00
parent b484a80a45
commit c2f4f52f34
3 changed files with 821 additions and 8 deletions
@@ -34,6 +34,9 @@
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{ $t('query') }}</a-button>
<a-button class="box-button" style="margin-left: 8px"
@click="searchReset">{{ $t('reset') }}</a-button>
@@ -240,6 +243,7 @@ import listAddModel from './listAddModel'
import listEditModel from './listEditModel'
import batSetting from './batSetting'
import transferList from './transferList'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
import {getAction, postAction, downloadFile, deleteAction} from '@/api/manage'
import moment from 'moment'
import {mapGetters} from 'vuex'
@@ -252,7 +256,8 @@ export default {
listAddModel,
listEditModel,
batSetting,
transferList
transferList,
globalAdvancedQuery
},
data() {
return {
@@ -475,6 +480,7 @@ export default {
visibleFile: false,
dataSourceFile: [],
confirmLoading: false,
queryParamQuery:{},
isDisplay: true,
selectedRowKeys: [],
visible: false,
@@ -504,7 +510,54 @@ export default {
transferUrl: ''//调取
},
loading: false,
dataSource: []
dataSource: [],
// fieldList | array |✔| 需要查询的列集合示例如下,type类型有:date/datetime/string/int/number
fieldList: [
{
type: 'string',
value: 'correspondingStandard',
text: this.$t('correspondingStandard')
},
{
type: 'date',
value: 'implementType',
text: this.$t('implementationCategory'),
dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: 'date',
value: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
text: this.$t('ImplementationDate')
},
{
type: 'date',
value: 'implementTime',
text: this.$t('vehicleInProductionDate')
},
{
type: 'string',
value: 'wvtaId',
text: 'WVTA ID'
},
{
type: '',
value: 'attestationType',
text: this.$t('certificationType'),
dictCode: 'attestation_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'attestationRank',
text: this.$t('certificationLevel'),
dictCode: 'attestation_rank'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'dutyTerritory',
text: this.$t('areaOfResponsibility'),
dictCode: 'duty_territory'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
}
]
}
},
@@ -619,8 +672,22 @@ export default {
addModelList() {
this.getList()
},
handleSuperQuery(params, matchType) {
let sqp = {}
if (!params || (params && params.length == 0)) {
sqp['superQueryParams'] = ''
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
} else {
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
sqp['superQueryMatchType'] = matchType
}
this.queryParamQuery = sqp
this.getList()
},
getList() {
let query = {
...this.queryParamQuery,
...this.queryParam,
projectLibraryId: this.$route.query.id
}