[update] 修改一般检索,高级检索联调
This commit is contained in:
@@ -22,11 +22,11 @@ const getOverseasStandardQuery = (params) => getAction('/laws/standard/overseas/
|
|||||||
const getEnterStandardQuery = (params) => getAction('/laws/standard/enterprise/getQueryCondition', params)
|
const getEnterStandardQuery = (params) => getAction('/laws/standard/enterprise/getQueryCondition', params)
|
||||||
|
|
||||||
// 国内标准的高级搜索,查询列表数据
|
// 国内标准的高级搜索,查询列表数据
|
||||||
const getDomesticStandardList = (params) => getAction('/laws//standard/domestic/getCommonPage', params)
|
const getDomesticStandardList = (params) => postAction('/laws//standard/domestic/getCommonPage', params)
|
||||||
// 国外标准的高级搜索,查询列表数据
|
// 国外标准的高级搜索,查询列表数据
|
||||||
const getOverseasStandardList = (params) => getAction('/laws//standard/overseas/getCommonPage', params)
|
const getOverseasStandardList = (params) => postAction('/laws//standard/overseas/getCommonPage', params)
|
||||||
// 企标的高级搜索,查询列表数据
|
// 企标的高级搜索,查询列表数据
|
||||||
const getEnterStandardList = (params) => getAction('/laws/standard/enterprise/getCommonPage', params)
|
const getEnterStandardList = (params) => postAction('/laws/standard/enterprise/getCommonPage', params)
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getSearchHistoryData,
|
getSearchHistoryData,
|
||||||
|
|||||||
@@ -18,5 +18,13 @@ module.exports = {
|
|||||||
standardGradeClassification: 'Standard Grade Classification',
|
standardGradeClassification: 'Standard Grade Classification',
|
||||||
all: 'All',
|
all: 'All',
|
||||||
releaseDate: 'Release Date'
|
releaseDate: 'Release Date'
|
||||||
|
},
|
||||||
|
// 高级搜索
|
||||||
|
advancedSearch: {
|
||||||
|
standardNum: '标准号',
|
||||||
|
standardName: '标准名称',
|
||||||
|
releaseDate: '发布日期',
|
||||||
|
materialDate: '实施日期',
|
||||||
|
standardStatus: '标准状态'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,5 +18,13 @@ module.exports = {
|
|||||||
standardGradeClassification: '标准等级分类',
|
standardGradeClassification: '标准等级分类',
|
||||||
all: '全部',
|
all: '全部',
|
||||||
releaseDate: '发布日期'
|
releaseDate: '发布日期'
|
||||||
|
},
|
||||||
|
// 高级搜索
|
||||||
|
advancedSearch: {
|
||||||
|
standardNum: '标准号',
|
||||||
|
standardName: '标准名称',
|
||||||
|
releaseDate: '发布日期',
|
||||||
|
materialDate: '实施日期',
|
||||||
|
standardStatus: '标准状态'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,6 @@
|
|||||||
<!-- 日期区间 -->
|
<!-- 日期区间 -->
|
||||||
<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]"
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
|
||||||
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>
|
||||||
@@ -123,7 +122,7 @@
|
|||||||
<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>
|
<div class="table-wrapper">
|
||||||
<j-table
|
<j-table
|
||||||
:can-drag="true"
|
:can-drag="true"
|
||||||
:scroll="{x: '100%'}"
|
:scroll="{x: '100%'}"
|
||||||
@@ -177,12 +176,49 @@ export default {
|
|||||||
span: 14
|
span: 14
|
||||||
},
|
},
|
||||||
getQueryConditionFunc: undefined, // 获取查询条件列表
|
getQueryConditionFunc: undefined, // 获取查询条件列表
|
||||||
|
getDataListFunc: undefined, // 获取数据列表
|
||||||
minLength: 2,
|
minLength: 2,
|
||||||
searchList: [], // 搜索条件
|
searchList: [], // 搜索条件
|
||||||
optionsData: [], // 搜索条件下拉数据
|
optionsData: [], // 搜索条件下拉数据
|
||||||
categoryTreeList: [], // 组织机构下拉框数据
|
categoryTreeList: [], // 组织机构下拉框数据
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
columns: [],
|
columns: [
|
||||||
|
{ // 标准号
|
||||||
|
title: this.$t('dashboard.advancedSearch.standardNum'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'standard_number',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{ // 标准名称
|
||||||
|
title: this.$t('dashboard.advancedSearch.standardName'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'standard_name',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{ // 发布日期
|
||||||
|
title: this.$t('dashboard.advancedSearch.releaseDate'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'release_date',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{ // 实施日期
|
||||||
|
title: this.$t('dashboard.advancedSearch.materialDate'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'implementation_date',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{ // 标准状态
|
||||||
|
title: this.$t('dashboard.advancedSearch.standardStatus'),
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'standard_state_dictText',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}
|
||||||
|
],
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
/* 分页参数 */
|
/* 分页参数 */
|
||||||
ipagination: {
|
ipagination: {
|
||||||
@@ -204,12 +240,16 @@ export default {
|
|||||||
handler (val) {
|
handler (val) {
|
||||||
if (val === '1') {
|
if (val === '1') {
|
||||||
this.getQueryConditionFunc = getDomesticStandardQuery
|
this.getQueryConditionFunc = getDomesticStandardQuery
|
||||||
|
this.getDataListFunc = getDomesticStandardList
|
||||||
} else if (val === '2') {
|
} else if (val === '2') {
|
||||||
this.getQueryConditionFunc = getOverseasStandardQuery
|
this.getQueryConditionFunc = getOverseasStandardQuery
|
||||||
|
this.getDataListFunc = getOverseasStandardList
|
||||||
} else if (val === '3') {
|
} else if (val === '3') {
|
||||||
this.getQueryConditionFunc = getEnterStandardQuery
|
this.getQueryConditionFunc = getEnterStandardQuery
|
||||||
|
this.getDataListFunc = getEnterStandardList
|
||||||
}
|
}
|
||||||
this.getSearch()
|
this.getSearch()
|
||||||
|
// this.loadData(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -306,20 +346,18 @@ 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
|
||||||
}
|
}
|
||||||
const params = this.getQueryParams()// 查询条件
|
const params = this.getQueryParams()// 查询条件
|
||||||
let func
|
|
||||||
if (this.currStandardType === StandardSource.DOMESTIC.value) {
|
|
||||||
func = getDomesticStandardList
|
|
||||||
} else if (this.currStandardType === StandardSource.OVERSEAS.value) {
|
|
||||||
func = getOverseasStandardList
|
|
||||||
} else if (this.currStandardType === StandardSource.ENTERPRISE.value) {
|
|
||||||
func = getEnterStandardList
|
|
||||||
}
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
func(params).then((res) => {
|
this.getDataListFunc(params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.dataSource = res.result.records || res.result
|
this.dataSource = res.result.records || res.result
|
||||||
if (res.result.total) {
|
if (res.result.total) {
|
||||||
@@ -431,4 +469,8 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-wrapper {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
<!-- 查询结果展示区域 -->
|
<!-- 查询结果展示区域 -->
|
||||||
<div class="result-wrapper">
|
<div class="result-wrapper">
|
||||||
<a-spin :spinning="loading">
|
<a-spin :spinning="loading">
|
||||||
<div class="result-div" v-for="item in dataSource" :key="item.standardNumber">
|
<div class="result-div" v-for="item in dataSource" :key="item.id">
|
||||||
<div class="result-title-wrapper">
|
<div class="result-title-wrapper">
|
||||||
<!-- 正在搜索,标题根据搜索内容高亮显示 -->
|
<!-- 正在搜索,标题根据搜索内容高亮显示 -->
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
@@ -73,9 +73,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<p class="result-date">{{ $t('dashboard.generalSearch.releaseDate') }} {{ item.releaseDate || global.emptyLine }}</p>
|
<p class="result-date">{{ $t('dashboard.generalSearch.releaseDate') }} {{ item.releaseDate || global.emptyLine }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="result-content-wrapper">
|
<div v-if="item.resourceType !== '4'" class="result-content-wrapper">
|
||||||
{{ item.content }}
|
{{ item.content }}
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else v-html="item.content" class="result-content-wrapper"></div>
|
||||||
</div>
|
</div>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user