【中汽测试】标准预警加时间段搜索

This commit is contained in:
赵霄
2023-11-10 18:01:07 +08:00
parent 13db11445c
commit ecfcf94804
@@ -49,19 +49,33 @@
/>
</a-form-model-item>
</a-col>
<template v-if="toggleSearchStatus">
<!--实施日期-->
<a-form-model-item :label="$t('enterpriseStandardLibrary.publicize.materialDate')"
:labelCol="labelCol"
:wrapperCol="wrapperCol">
<a-range-picker
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
v-model="queryParam.date"
:disabled="false"/>
</a-form-model-item>
</template>
<a-col :md="6" :sm="8">
<div style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary"
@click="searchQuery"
icon="search"
style="margin-left: 8px"
v-has="'standardWarning:search'">
{{ $t('query') }}
</a-button>
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
</div>
</a-col>
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a @click="handleToggleSearch">
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
</a>
<a-button type="primary"
@click="searchQuery"
icon="search"
style="margin-left: 8px"
v-has="'standardWarning:search'">
{{ $t('query') }}
</a-button>
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
</div>
</a-row>
</a-form>
</div>
@@ -110,6 +124,7 @@ import { queryDepartTreeList, ajaxGetDictItems } from '../../../api/api'
import JTable from '../../../components/jero/JTable'
import { mapGetters } from 'vuex'
import { StandardSource } from '../../../enums/commonEnums'
import { filterObj } from '../../../utils/util'
export default {
name: 'StandardWarningList',
@@ -126,20 +141,20 @@ export default {
{
dataIndex: 'source_dictText',
title: this.$t('standardSelect.source'),
width: 150
width: 90
},
// 标准号
{
dataIndex: 'standardNumber',
title: this.$t('standardNumber'),
width: 150,
width: 250,
scopedSlots: { customRender: 'detail' }
},
// 标准名称
{
dataIndex: 'standardName',
title: this.$t('standardName'),
width: 150,
width: 250,
scopedSlots: { customRender: 'detail' }
},
// 新车型实施日期
@@ -262,6 +277,24 @@ export default {
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
getQueryParams () {
// 获取查询条件
const sqp = {}
if (this.superQueryParams) {
sqp.superQueryParams = encodeURI(this.superQueryParams)
sqp.superQueryMatchType = this.superQueryMatchType
}
const param = Object.assign(sqp, this.queryParam, this.isorter, this.filters)
param.field = this.getQueryField()
param.pageNo = this.ipagination.current
param.pageSize = this.ipagination.pageSize
if (param.date && param.date.length > 0) {
param.startDate = param.date[0]
param.endDate = param.date[1]
delete param.date
}
return filterObj(param)
},
}
}
</script>