[update] 一般检索,增加标准状态设置搜索条件
This commit is contained in:
@@ -17,7 +17,8 @@ module.exports = {
|
||||
standardState: '标准状态',
|
||||
standardGradeClassification: '标准等级分类',
|
||||
all: '全部',
|
||||
releaseDate: '发布日期'
|
||||
releaseDate: '发布日期',
|
||||
standardStatusSet: '标准状态设置'
|
||||
},
|
||||
// 高级搜索
|
||||
advancedSearch: {
|
||||
|
||||
@@ -42,6 +42,15 @@
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- 标准状态设置 -->
|
||||
<a-row :gutter="24" class="filter-row">
|
||||
<a-col :md="6" class="label-col"><span class="search_label">{{ $t('dashboard.generalSearch.standardStatusSet') }}</span></a-col>
|
||||
<a-col :md="18" class="option-col">
|
||||
<div v-for="item in standardStatusSetOptions" :key="item.key" class="option-div" :class="standardStatusSetCurrent === item.key ? 'option-curr' : ''" @click="standardStatusSetChange(item.key)">
|
||||
{{ item.label }}
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- 其他筛选条件 -->
|
||||
<template v-if="toggleSearchStatus">
|
||||
<template v-for="(value, key) in selectOptionsKeys">
|
||||
@@ -153,6 +162,12 @@ export default {
|
||||
{ key: '4', label: '动态消息' }
|
||||
],
|
||||
resourceTypeCurrent: 'all', // 资源类型当前选中项
|
||||
// 标准状态设置可选择项
|
||||
standardStatusSetOptions: [
|
||||
{ key: '1', label: '不包含废止标准' },
|
||||
{ key: '2', label: '包含废止标准' }
|
||||
],
|
||||
standardStatusSetCurrent: '1', // 标准状态设置当前选中项
|
||||
selectOptions: {}, // 其他筛选条件
|
||||
selectOptionsKeys: [
|
||||
'standardClass', // 标准类别
|
||||
@@ -285,6 +300,8 @@ export default {
|
||||
param.resourceType = this.resourceTypeCurrent === 'all' ? null : this.resourceTypeCurrent
|
||||
// 检索内容
|
||||
param.searchContent = this.searchValue
|
||||
// 标准状态设置
|
||||
param.standardStateSet = this.standardStatusSetCurrent
|
||||
// 其他筛选条件
|
||||
for (const item in this.selectOptions) {
|
||||
param[item] = this.selectOptions[item].current === 'all' ? null : this.selectOptions[item].current
|
||||
@@ -383,6 +400,22 @@ export default {
|
||||
}
|
||||
this.onSearch()
|
||||
},
|
||||
// 标准状态设置改变
|
||||
standardStatusSetChange (key) {
|
||||
this.standardStatusSetCurrent = key
|
||||
this.ipagination = {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
|
||||
},
|
||||
total: 0,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true
|
||||
}
|
||||
this.onSearch()
|
||||
},
|
||||
// 其他检索条件改变
|
||||
selectOptionsChange (changeKey, value) {
|
||||
console.log(changeKey, value)
|
||||
|
||||
Reference in New Issue
Block a user