[update] 修改主分支高级检索

This commit is contained in:
lideqin
2023-11-30 10:35:51 +08:00
parent fef49bcce5
commit c9ded972ef
3 changed files with 150 additions and 145 deletions
+3 -3
View File
@@ -15,11 +15,11 @@ const getSearchParamNumFullText = (params) => getAction('/home/lawsHomeSearch/ge
const generalSearchFullTextSearch = (params) => getAction('/home/lawsHomeSearch/getNormalSearchAllPage', params) const generalSearchFullTextSearch = (params) => getAction('/home/lawsHomeSearch/getNormalSearchAllPage', params)
// 国内标准的高级搜索,查询搜索条件 // 国内标准的高级搜索,查询搜索条件
const getDomesticStandardQuery = (params) => getAction('/laws/standard/domestic/getQueryCondition', params) const getDomesticStandardQuery = (params) => getAction('/laws/standard/domestic/getAdvancedQueryCondition', params)
// 国外标准的高级搜索,查询搜索条件 // 国外标准的高级搜索,查询搜索条件
const getOverseasStandardQuery = (params) => getAction('/laws/standard/overseas/getQueryCondition', params) const getOverseasStandardQuery = (params) => getAction('/laws/standard/overseas/getAdvancedQueryCondition', params)
// 企业标准的高级搜索,查询搜索条件 // 企业标准的高级搜索,查询搜索条件
const getEnterStandardQuery = (params) => getAction('/laws/standard/enterprise/getQueryCondition', params) const getEnterStandardQuery = (params) => getAction('/laws/standard/enterprise/getAdvancedQueryCondition', params)
// 国内标准的高级搜索,查询列表数据 // 国内标准的高级搜索,查询列表数据
const getDomesticStandardList = (params) => postAction('/laws//standard/domestic/getCommonPage', params) const getDomesticStandardList = (params) => postAction('/laws//standard/domestic/getCommonPage', params)
+145 -140
View File
@@ -1,141 +1,142 @@
<template> <template>
<a-card :bordered="false"> <a-card :bordered="false">
<!-- 一般检索和高级检索的tab切换 --> <a-spin :spinning="loading">
<div class="tab-wrapper"> <!-- 一般检索和高级检索的tab切换 -->
<span class="tab-title" @click="clickGeneralSearch">一般检索</span> <div class="tab-wrapper">
<span class="tab-title tab-title-curr">高级检索</span> <span class="tab-title" @click="clickGeneralSearch">一般检索</span>
<a @click="handleToggleChange">{{ toggleSearchStatus ? '收起条件' : '展开条件' }}</a> <span class="tab-title tab-title-curr">高级检索</span>
</div> <a @click="handleToggleChange">{{ toggleSearchStatus ? '收起条件' : '展开条件' }}</a>
<a-divider>检索类别</a-divider> </div>
<div class="filter-area-div" ref="filterArea"> <a-divider>检索类别</a-divider>
<a-row :gutter="24" class="filter-row"> <div class="filter-area-div" ref="filterArea">
<a-col :md="2" class="label-col"><span class="search_label">标准类型</span></a-col> <a-row :gutter="24" class="filter-row">
<a-col :md="18" class="option-col"> <a-col :md="2" class="label-col"><span class="search_label">标准类型</span></a-col>
<div v-for="item in standardTypeOptions" :key="item.value" class="option-div" :class="currStandardType === item.value ? 'option-curr' : ''" @click="standardTypeChange(item.value)"> <a-col :md="18" class="option-col">
{{ item.label }} <div v-for="item in standardTypeOptions" :key="item.value" class="option-div" :class="currStandardType === item.value ? 'option-curr' : ''" @click="standardTypeChange(item.value)">
</div> {{ item.label }}
</a-col> </div>
</a-row> </a-col>
</div> </a-row>
<a-form v-if="toggleSearchStatus" layout="inline" @keyup.enter.native="searchQuery"> </div>
<a-row :gutter="24"> <a-form v-if="toggleSearchStatus" layout="inline" @keyup.enter.native="searchQuery">
<a-col :md="(24 / (minLength + 1))" <a-row :gutter="24">
:sm="(24 / minLength)" <a-col :md="(24 / (minLength + 1))"
v-for="(item) in searchList" :sm="(24 / minLength)"
:key="item.id" v-for="(item) in searchList"
style="line-height: 48px"> :key="item.id"
<!-- 树形选择器 --> style="line-height: 48px">
<a-form-item :label="item.dbFieldTxt" :labelCol="labelCol" :wrapperCol="wrapperCol" :colon="false"> <!-- 树形选择器 -->
<template v-if="item.fieldShowType === FieldType.TREE.value"> <a-form-item :label="item.dbFieldTxt" :labelCol="labelCol" :wrapperCol="wrapperCol" :colon="false">
<a-tree-select <template v-if="item.fieldShowType === FieldType.TREE.value">
tree-node-filter-prop="title" <a-tree-select
v-model="queryParam[item.dbFieldName]" tree-node-filter-prop="title"
:maxTagCount="1" v-model="queryParam[item.dbFieldName]"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :maxTagCount="1"
:tree-data="optionsData[item.dbFieldName]" :getPopupContainer="triggerNode=> triggerNode.parentNode"
tree-checkable :tree-data="optionsData[item.dbFieldName]"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" tree-checkable
/> :placeholder="$t('pleaseSelect')+item.dbFieldTxt"
</template> />
<!-- 树形选择器单选 --> </template>
<template v-if="item.fieldShowType === FieldType.TREE_SINGLE.value"> <!-- 树形选择器单选 -->
<a-tree-select <template v-if="item.fieldShowType === FieldType.TREE_SINGLE.value">
tree-node-filter-prop="title" <a-tree-select
v-model="queryParam[item.dbFieldName]" tree-node-filter-prop="title"
:maxTagCount="1" v-model="queryParam[item.dbFieldName]"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :maxTagCount="1"
:tree-data="optionsData[item.dbFieldName]" :getPopupContainer="triggerNode=> triggerNode.parentNode"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" :tree-data="optionsData[item.dbFieldName]"
/> :placeholder="$t('pleaseSelect')+item.dbFieldTxt"
</template> />
<!-- 输入框 --> </template>
<template <!-- 输入框 -->
v-if="[FieldType.TEXT_BOX.value, FieldType.TEXTAREA.value,FieldType.USER_SINGLE.value, <template
v-if="[FieldType.TEXT_BOX.value, FieldType.TEXTAREA.value,FieldType.USER_SINGLE.value,
FieldType.STANDARD_MORE.value,FieldType.TREE_MODAL_SELECT.value] FieldType.STANDARD_MORE.value,FieldType.TREE_MODAL_SELECT.value]
.includes(item.fieldShowType)"> .includes(item.fieldShowType)">
<a-input :placeholder="$t('pleaseEnter')+item.dbFieldTxt" <a-input :placeholder="$t('pleaseEnter')+item.dbFieldTxt"
v-model="queryParam[item.dbFieldName]"></a-input> v-model="queryParam[item.dbFieldName]"></a-input>
</template> </template>
<!-- 日期区间 --> <!-- 日期区间 -->
<template v-else-if="[FieldType.DATE_SINGLE.value, FieldType.DATE_MORE.value].includes(item.fieldShowType)"> <template v-else-if="[FieldType.DATE_SINGLE.value, FieldType.DATE_MORE.value].includes(item.fieldShowType)">
<a-range-picker v-model="queryParam[item.dbFieldName]" <a-range-picker v-model="queryParam[item.dbFieldName]"
format="YYYY-MM-DD" value-format="YYYY-MM-DD" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="onChange(item.dbFieldName)"></a-range-picker> @change="onChange(item.dbFieldName)"></a-range-picker>
</template> </template>
<!-- 字典单选框 --> <!-- 字典单选框 -->
<template v-else-if="item.fieldShowType === FieldType.OPTION_SINGLE.value"> <template v-else-if="item.fieldShowType === FieldType.OPTION_SINGLE.value">
<j-dict-select-tag v-model="queryParam[item.dbFieldName]" <j-dict-select-tag v-model="queryParam[item.dbFieldName]"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" :placeholder="$t('pleaseSelect')+item.dbFieldTxt"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="item.dictField" /> :triggerChange="false" :dictCode="item.dictField" />
</template> </template>
<!-- 字典多选框 --> <!-- 字典多选框 -->
<template v-else-if="item.fieldShowType === FieldType.OPTION_MORE.value"> <template v-else-if="item.fieldShowType === FieldType.OPTION_MORE.value">
<j-multi-select-tag v-model="queryParam[item.dbFieldName]" <j-multi-select-tag v-model="queryParam[item.dbFieldName]"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" :placeholder="$t('pleaseSelect')+item.dbFieldTxt"
:type="'select'" :maxTagCount="1" :type="'select'" :maxTagCount="1"
:triggerChange="false" :dictCode="item.dictField"/> :triggerChange="false" :dictCode="item.dictField"/>
</template> </template>
<!-- 组织机构选择 --> <!-- 组织机构选择 -->
<template v-else-if="item.fieldShowType === FieldType.ORGAN_SINGLE.value"> <template v-else-if="item.fieldShowType === FieldType.ORGAN_SINGLE.value">
<a-tree-select <a-tree-select
tree-node-filter-prop="title" tree-node-filter-prop="title"
v-model="queryParam[item.dbFieldName]" v-model="queryParam[item.dbFieldName]"
:maxTagCount="1" :maxTagCount="1"
:show-search="true" :show-search="true"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input" class="box-input"
style="width: 100%" style="width: 100%"
:tree-data="categoryTreeList" :tree-data="categoryTreeList"
:placeholder="$t('pleaseSelect') + item.dbFieldTxt" :placeholder="$t('pleaseSelect') + item.dbFieldTxt"
/> />
</template> </template>
<!-- 组织机构多选 --> <!-- 组织机构多选 -->
<template v-else-if="item.fieldShowType === FieldType.ORGAN_MORE.value"> <template v-else-if="item.fieldShowType === FieldType.ORGAN_MORE.value">
<a-tree-select <a-tree-select
tree-node-filter-prop="title" tree-node-filter-prop="title"
v-model="queryParam[item.dbFieldName]" v-model="queryParam[item.dbFieldName]"
:maxTagCount="1" :maxTagCount="1"
:show-search="true" :show-search="true"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input" class="box-input"
style="width: 100%" style="width: 100%"
:tree-data="categoryTreeList" :tree-data="categoryTreeList"
:placeholder="$t('pleaseSelect') + item.dbFieldTxt" :placeholder="$t('pleaseSelect') + item.dbFieldTxt"
treeCheckable treeCheckable
treeCheckStrictly treeCheckStrictly
/> />
</template> </template>
<!-- 年份选择 --> <!-- 年份选择 -->
<template v-else-if="item.fieldShowType === FieldType.YEAR_PICKER.value"> <template v-else-if="item.fieldShowType === FieldType.YEAR_PICKER.value">
<j-date show-type="year" <j-date show-type="year"
:allowClear="false" :allowClear="false"
v-model="queryParam[item.dbFieldName]" v-model="queryParam[item.dbFieldName]"
date-format="YYYY" date-format="YYYY"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" /> :placeholder="$t('pleaseSelect')+item.dbFieldTxt" />
</template> </template>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
<div class="table-page-search-submitButtons"> <div class="table-page-search-submitButtons">
<a-button icon="search" type="primary" @click="searchQuery" :loading="loading">{{ $t('query') }}</a-button> <a-button icon="search" type="primary" @click="searchQuery" :loading="loading">{{ $t('query') }}</a-button>
<a-button icon="reload" type="primary" ghost style="margin-left: 8px" @click="searchReset" :loading="loading">{{ $t('reset') }}</a-button> <a-button icon="reload" type="primary" ghost style="margin-left: 8px" @click="searchReset" :loading="loading">{{ $t('reset') }}</a-button>
</div> </div>
<div class="table-wrapper"> <div class="table-wrapper">
<j-table <j-table
:can-drag="true" :can-drag="true"
:scroll="{x: '100%'}" :scroll="{x: '100%'}"
ref="table" ref="table"
rowKey="id" rowKey="id"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
:loading="loading" @change="handleTableChange">
@change="handleTableChange">
</j-table> </j-table>
</div> </div>
</a-spin>
</a-card> </a-card>
</template> </template>
@@ -297,11 +298,14 @@ export default {
const params = { const params = {
module: this.currStandardType module: this.currStandardType
} }
this.loading = true
this.getQueryConditionFunc(params).then((res) => { this.getQueryConditionFunc(params).then((res) => {
if (res.success) { if (res.success) {
this.searchList = res.result this.searchList = res.result
this.getOptionsData() // 获取下拉数据 this.getOptionsData() // 获取下拉数据
} }
}).finally(() => {
this.loading = false
}) })
}, },
/** /**
@@ -346,12 +350,6 @@ export default {
return filterObj(param) return filterObj(param)
}, },
loadData (arg) { loadData (arg) {
const flag = Object.values(this.queryParam).some(v => !!v || v === 0)
if (!flag) {
// 提示至少填写一项
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return
}
if (arg === 1) { if (arg === 1) {
this.ipagination.current = 1 this.ipagination.current = 1
} }
@@ -387,12 +385,19 @@ export default {
}, },
// 查询 // 查询
searchQuery () { searchQuery () {
const flag = Object.values(this.queryParam).some(v => !!v || v === 0)
if (!flag) {
// 提示至少填写一项
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return
}
this.loadData(1) this.loadData(1)
}, },
// 重置 // 重置
searchReset () { searchReset () {
this.queryParam = {} this.queryParam = {}
this.loadData(1) this.dataSource = []
this.ipagination.total = 0
} }
} }
} }
@@ -173,11 +173,11 @@
</a-col> </a-col>
</template> </template>
<!--其它模块展示--> <!--其它模块展示-->
<template> <template v-if="isSearch">
<p class="tag-info">{{ $t('system.tag.displayOtherModules') }}</p> <p class="tag-info">{{ $t('system.tag.displayOtherModules') }}</p>
<a-divider dashed /> <a-divider dashed />
<!--搜索中心展示--> <!--搜索中心展示-->
<a-col :span="24"> <a-col :span="24" v-if="isSearch">
<a-form-model-item :label="$t('system.tag.searchCenterDisplay')" prop="isShowSearch"> <a-form-model-item :label="$t('system.tag.searchCenterDisplay')" prop="isShowSearch">
<j-dict-select-tag type="list" v-model="form.isShowSearch" dictCode="yn" <j-dict-select-tag type="list" v-model="form.isShowSearch" dictCode="yn"
:placeholder="$t('system.tag.selectSearchCenterDisplayed')" /> :placeholder="$t('system.tag.selectSearchCenterDisplayed')" />