[fix 87801] 高级搜索-列表字段调整

This commit is contained in:
danshihao
2024-07-31 20:05:24 +08:00
parent 3fe1c60f97
commit 2f139a8f91
+37 -24
View File
@@ -159,7 +159,7 @@
:scroll="{x: '100%'}" :scroll="{x: '100%'}"
ref="table" ref="table"
rowKey="id" rowKey="id"
:columns="columns" :columns="showColumns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
@change="handleTableChange"> @change="handleTableChange">
@@ -224,25 +224,20 @@ import {
StandardSource, StandardSource,
FieldType, FieldType,
EnterpriseStandardStatus, EnterpriseStandardStatus,
StandardStatus,
DisplayAreaManagement DisplayAreaManagement
} from '@/enums/commonEnums' } from '@/enums/commonEnums'
import { getAction } from '@/api/manage' import { getAction } from '@/api/manage'
import { getFormDictTreeList, queryDepartTreeList, getFileInfo } from '@/api/api' import { getFormDictTreeList, queryDepartTreeList, getFileInfo } from '@/api/api'
import { import {
getDomesticStandardList, getDomesticStandardList,
getOverseasStandardList,
getEnterStandardList, getEnterStandardList,
getDomesticStandardQuery, getDomesticStandardQuery,
getOverseasStandardQuery,
getEnterStandardQuery, getAdvancedSearchAll, getAdvancedSearchClause, exportAdvancedSearch getEnterStandardQuery, getAdvancedSearchAll, getAdvancedSearchClause, exportAdvancedSearch
} from '@/api/dashboard' } from '@/api/dashboard'
import JTable from '@/components/jero/JTable' import JTable from '@/components/jero/JTable'
import { import {
getDomesticStandardFormModal, getDomesticStandardFormModal,
getDomesticStandardDetail, getDomesticStandardDetail
getOverseasStandardForm,
getOverseasStandardDocumentInfo
} from '../../../api/standardRegulationLibraryApi' } from '../../../api/standardRegulationLibraryApi'
import { getEnterpriseStandardAddForm, getEnterpriseStandardInfoById } from '../../../api/enterpriseStandardLibraryApi' import { getEnterpriseStandardAddForm, getEnterpriseStandardInfoById } from '../../../api/enterpriseStandardLibraryApi'
import Vue from 'vue' import Vue from 'vue'
@@ -259,7 +254,7 @@ export default {
FieldType, FieldType,
loading: false, loading: false,
toggleSearchStatus: true, // 检索条件的展开和收起,false收缩状态 toggleSearchStatus: true, // 检索条件的展开和收起,false收缩状态
currStandardType: '1', currStandardType: '1', // 1外部 3企标 4条款 5全部
standardTypeOptions: [ standardTypeOptions: [
// 全部 // 全部
{ label: this.$t('dashboard.advancedSearch.all'), value: '5' }, { label: this.$t('dashboard.advancedSearch.all'), value: '5' },
@@ -309,13 +304,17 @@ export default {
dataIndex: 'standard_name', dataIndex: 'standard_name',
scopedSlots: { customRender: 'toDetail' } scopedSlots: { customRender: 'toDetail' }
}, },
// { // 发布日期 { // 发布日期
// title: this.$t('dashboard.advancedSearch.releaseDate'), title: this.$t('dashboard.advancedSearch.releaseDate'),
// align: 'center', align: 'center',
// width: 180, width: 180,
// dataIndex: 'release_date', dataIndex: 'release_date',
// scopedSlots: { customRender: 'text' } show: () => {
// }, // 全部和企标显示
return ['5', StandardSource.ENTERPRISE.value].includes(this.currStandardType)
},
scopedSlots: { customRender: 'text' }
},
{ // 实施日期 { // 实施日期
title: this.$t('dashboard.advancedSearch.materialDate'), title: this.$t('dashboard.advancedSearch.materialDate'),
align: 'center', align: 'center',
@@ -328,6 +327,10 @@ export default {
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'new_product_impl_date', dataIndex: 'new_product_impl_date',
show: () => {
// 全部和外部显示
return ['5', StandardSource.FOREIGN.value].includes(this.currStandardType)
},
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 新认证车实施日期 { // 新认证车实施日期
@@ -335,6 +338,10 @@ export default {
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'new_auth_impl_date', dataIndex: 'new_auth_impl_date',
show: () => {
// 全部和外部显示
return ['5', StandardSource.FOREIGN.value].includes(this.currStandardType)
},
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 标准状态 { // 标准状态
@@ -495,31 +502,37 @@ export default {
defaultEnStandardStatus: `${EnterpriseStandardStatus.CURRENTLY_EFFECTIVE.value}` defaultEnStandardStatus: `${EnterpriseStandardStatus.CURRENTLY_EFFECTIVE.value}`
} }
}, },
computed: {
// 真实显示的表格(全部\企标\外部)
showColumns () {
return this.columns.filter(item => {
if (typeof item.show === 'function') {
return item.show()
}
return true
})
}
},
watch: { watch: {
currStandardType: { currStandardType: {
immediate: true, immediate: true,
handler (val) { handler (val) {
if (val === '1') { if (val === '1') { // 外来标准
this.getQueryConditionFunc = getDomesticStandardQuery this.getQueryConditionFunc = getDomesticStandardQuery
this.getDataListFunc = getDomesticStandardList this.getDataListFunc = getDomesticStandardList
this.getFormFunc = getDomesticStandardFormModal this.getFormFunc = getDomesticStandardFormModal
this.getDocumentInfoFunc = getDomesticStandardDetail this.getDocumentInfoFunc = getDomesticStandardDetail
} else if (val === '2') { } else if (val === '3') { // 企标
this.getQueryConditionFunc = getOverseasStandardQuery
this.getDataListFunc = getOverseasStandardList
this.getFormFunc = getOverseasStandardForm
this.getDocumentInfoFunc = getOverseasStandardDocumentInfo
} else if (val === '3') {
this.getQueryConditionFunc = getEnterStandardQuery this.getQueryConditionFunc = getEnterStandardQuery
this.getDataListFunc = getEnterStandardList this.getDataListFunc = getEnterStandardList
this.getFormFunc = getEnterpriseStandardAddForm this.getFormFunc = getEnterpriseStandardAddForm
this.getDocumentInfoFunc = getEnterpriseStandardInfoById this.getDocumentInfoFunc = getEnterpriseStandardInfoById
} else if (val === '5') { } else if (val === '5') { // 全部
this.getQueryConditionFunc = getDomesticStandardQuery this.getQueryConditionFunc = getDomesticStandardQuery
this.getDataListFunc = getAdvancedSearchAll this.getDataListFunc = getAdvancedSearchAll
this.getFormFunc = getEnterpriseStandardAddForm this.getFormFunc = getEnterpriseStandardAddForm
this.getDocumentInfoFunc = getEnterpriseStandardInfoById this.getDocumentInfoFunc = getEnterpriseStandardInfoById
} else if (val === '4') { } else if (val === '4') { // 条款
this.getQueryConditionFunc = getDomesticStandardQuery this.getQueryConditionFunc = getDomesticStandardQuery
this.getDataListFunc = getAdvancedSearchClause this.getDataListFunc = getAdvancedSearchClause
this.getFormFunc = getEnterpriseStandardAddForm this.getFormFunc = getEnterpriseStandardAddForm