调取功能增加高级搜索

This commit is contained in:
zyx.net
2023-01-12 16:36:30 +08:00
parent 8ca063c633
commit 78fe3d9913
2 changed files with 171 additions and 24 deletions
@@ -30,19 +30,11 @@
v-model="queryParam.title"></j-input>
</div>
</a-col>
<a-col :md="12" :sm="5">
<div class="box-title-text">
<div class="title-text" :title="$t('areaOfResponsibility')">
<span>{{ $t('areaOfResponsibility') }}</span>
</div>
<j-multi-select-tag class="box-input" v-model="queryParam.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</div>
</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>
</a-col>
@@ -83,10 +75,13 @@
<script>
import { getAction, postAction } from '@/api/manage'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
export default {
name: 'transferList',
components: {},
components: {
globalAdvancedQuery
},
props: ['url'],
data() {
return {
@@ -190,6 +185,68 @@ export default {
width: 180
},
],
fieldList: [
{
type: 'string',
value: 'subtitle',
text: this.$t('subtitle')
},
{
type: 'string',
value: 'correspondingStandard',
text: this.$t('correspondingStandard')
},
{
type: 'string',
value: 'subtitle',
text: this.$t('subtitle')
},
{
type: '',
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 是什么,都显示为字典下拉框
},
{
type: '',
value: 'region',
text: this.$t('zoneOfApplication'),
dictCode: 'region'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
],
dataList: [],
content: [],
loading: false,
@@ -221,6 +278,9 @@ export default {
this.pageNo = 1
this.queryParam = {}
this.replacePage()
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
},
onChange(page, pageSize) {
this.pageNo = page
@@ -231,10 +291,24 @@ export default {
this.pageSize = pageSize
this.replacePage()
},
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.replacePage()
},
replacePage() {
let query = {
// pageNo: this.pageNo,
// pageSize: this.pageSize,
...this.queryParamQuery,
...this.queryParam,
dummyInventoryBaseId: this.dummyInventoryBaseId
}
@@ -30,19 +30,11 @@
v-model="queryParam.title"></j-input>
</div>
</a-col>
<a-col :md="12" :sm="5">
<div class="box-title-text">
<div class="title-text" :title="$t('areaOfResponsibility')">
<span>{{ $t('areaOfResponsibility') }}</span>
</div>
<j-multi-select-tag class="box-input" v-model="queryParam.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="12" :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>
</a-col>
@@ -83,10 +75,13 @@
<script>
import { getAction, postAction } from '@/api/manage'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
export default {
name: 'transferList',
components: {},
components: {
globalAdvancedQuery
},
props: ['url'],
data() {
return {
@@ -189,6 +184,68 @@ export default {
width: 180
},
],
fieldList: [
{
type: 'string',
value: 'subtitle',
text: this.$t('subtitle')
},
{
type: 'string',
value: 'correspondingStandard',
text: this.$t('correspondingStandard')
},
{
type: 'string',
value: 'subtitle',
text: this.$t('subtitle')
},
{
type: '',
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 是什么,都显示为字典下拉框
},
{
type: '',
value: 'region',
text: this.$t('zoneOfApplication'),
dictCode: 'region'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
],
dataList: [],
content: [],
loading: false,
@@ -217,6 +274,8 @@ export default {
this.pageNo = 1
this.queryParam = {}
this.replacePage()
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
},
onChange(page, pageSize) {
this.pageNo = page
@@ -227,10 +286,24 @@ export default {
this.pageSize = pageSize
this.replacePage()
},
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.replacePage()
},
replacePage() {
let query = {
// pageNo: this.pageNo,
// pageSize: this.pageSize,
...this.queryParamQuery,
...this.queryParam,
dummyInventoryBaseId: this.dummyInventoryBaseId
}