[update] 联调企标复审流程

This commit is contained in:
lideqin
2023-11-13 17:05:23 +08:00
parent 3ba58fed03
commit 2f0aff9002
13 changed files with 302 additions and 124 deletions
+87 -59
View File
@@ -6,6 +6,7 @@
<a-input-search class="input-search" :placeholder="$t('pleaseEnter')+$t('dashboard.generalSearch.queryCondition')" v-model="searchValue" enter-button @search="onSearch" />
<a class="search-link" @click="clickAdvancedSearch">{{ $t('dashboard.generalSearch.advancedSearch') }}</a>
<a class="search-link">{{ $t('dashboard.generalSearch.homePage') }}</a>
<a class="search-link" @click="clickSearchHistory">{{ $t('dashboard.generalSearch.searchHistory') }}</a>
</div>
</div>
<!-- 筛选区域 -->
@@ -46,35 +47,42 @@
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
</div>
</div>
<!-- 查询结果展示区域 -->
<div class="result-wrapper">
<div class="result-div" v-for="item in dataSource" :key="item.standardNumber">
<div class="result-title-wrapper">
<p class="result-title">{{ item.standard_number + ' ' + item.standard_name }}</p>
<p class="result-source">{{ item.source }}</p>
<p class="result-date">{{ item.publishDate }}</p>
</div>
<div class="result-content-wrapper">
<span class="result-field-span" v-for="field in formInLine" :key="field.dbFieldName">{{field.dbFieldTxt}}: {{ item[field.dbFieldName] || '--' }}</span>
<template v-if="dataSource && dataSource.length > 0">
<!-- 查询结果展示区域 -->
<div class="result-wrapper">
<div class="result-div" v-for="item in dataSource" :key="item.standardNumber">
<div class="result-title-wrapper">
<p class="result-title">{{ item.standard_number + ' ' + item.standard_name }}</p>
<p class="result-source">{{ item.source }}</p>
<p class="result-date">{{ item.publishDate }}</p>
</div>
<div class="result-content-wrapper">
<span class="result-field-span" v-for="field in formInLine" :key="field.dbFieldName">{{field.dbFieldTxt}}: {{ item[field.dbFieldName] || '--' }}</span>
</div>
</div>
</div>
</div>
<a-pagination
v-if="dataSource && dataSource.length > 0"
class="page-content"
show-quick-jumper
show-size-changer
v-model="ipagination.current"
:pageSize="ipagination.pageSize"
:pageSizeOptions="ipagination.pageSizeOptions"
:total="ipagination.total"
:showTotal="ipagination.showTotal"
/>
<a-pagination
v-if="dataSource && dataSource.length > 0"
class="page-content"
show-quick-jumper
show-size-changer
v-model="ipagination.current"
:pageSize="ipagination.pageSize"
:pageSizeOptions="ipagination.pageSizeOptions"
:total="ipagination.total"
:showTotal="ipagination.showTotal"
/>
</template>
<a-empty v-else />
<search-history-modal ref="searchHistoryModal"></search-history-modal>
</a-card>
</template>
<script>
import { ajaxGetDictItems, getCarTypeProjectList } from '@/api/api'
import SearchHistoryModal from './modules/SearchHistoryModal'
import { getSearchParamNum, getSearchParamNumFullText } from '@/api/dashboard'
// 国内的其他检索条件
const domesticOtherOptions = {
@@ -173,30 +181,31 @@ const enterpriseOtherOptions = {
export default {
name: 'GeneralSearch',
components: { SearchHistoryModal },
data () {
return {
searchValue: '', // 搜索框内容
toggleSearchStatus: false, // 检索条件收缩还是展开, false收缩状态
retrievalModeOptions: [
{ key: 1, label: '全文检索' },
{ key: 2, label: '标题检索' }
{ key: '1', label: '全文检索' },
{ key: '2', label: '标题检索' }
], // 检索方式可选择项
retrievalModeCurrent: 1, // 检索方式当前选中项
retrievalModeCurrent: '1', // 检索方式当前选中项
resourceTypeOptions: [
{ key: 1, label: '全部' },
{ key: 2, label: '国内标准法规' },
{ key: 3, label: '海外标准法规' },
{ key: 4, label: '企业标准' },
{ key: 5, label: '动态消息' }
{ key: 'all', label: '全部' },
{ key: '1', label: '国内标准法规' },
{ key: '2', label: '海外标准法规' },
{ key: '3', label: '企业标准' },
{ key: '4', label: '动态消息' }
], // 资源类型可选择项
resourceTypeCurrent: 1, // 资源类型当前选中项
resourceTypeCurrent: 'all', // 资源类型当前选中项
selectOptions: {}, // 其他筛选条件
dataSource: [
{ standard_number: 'GB 7258-12', standard_name: '机动车安全', source: '国内标准法规', publishDate: '2023-08-25' },
{ standard_number: 'GB 7258-12', standard_name: '机动车安全', source: '国内标准法规', publishDate: '2023-08-25' },
{ standard_number: 'GB 7258-12', standard_name: '机动车安全', source: '国内标准法规', publishDate: '2023-08-25' },
{ standard_number: 'GB 7258-12', standard_name: '机动车安全', source: '国内标准法规', publishDate: '2023-08-25' },
{ standard_number: 'GB 7258-12', standard_name: '机动车安全', source: '国内标准法规', publishDate: '2023-08-25' }
// { standard_number: 'GB 7258-12', standard_name: '机动车安全', source: '国内标准法规', publishDate: '2023-08-25' },
// { standard_number: 'GB 7258-12', standard_name: '机动车安全', source: '国内标准法规', publishDate: '2023-08-25' },
// { standard_number: 'GB 7258-12', standard_name: '机动车安全', source: '国内标准法规', publishDate: '2023-08-25' },
// { standard_number: 'GB 7258-12', standard_name: '机动车安全', source: '国内标准法规', publishDate: '2023-08-25' },
// { standard_number: 'GB 7258-12', standard_name: '机动车安全', source: '国内标准法规', publishDate: '2023-08-25' }
],
formInLine: [
{
@@ -231,31 +240,45 @@ export default {
methods: {
// 更新selectOptions中的options
initSelectOptionsData () {
for (const item in this.selectOptions) {
if (this.selectOptions[item].code) {
ajaxGetDictItems(this.selectOptions[item].code).then(res => {
if (res.success) {
this.selectOptions[item].options = res.result
this.selectOptions[item].options.unshift({ text: '全部', title: '全部', value: 'all' })
} else {
this.selectOptions[item].options = []
}
})
} else if (this.selectOptions[item].href) {
this.selectOptions[item].href().then(res => {
if (res.success) {
this.selectOptions[item].options = res.result
this.selectOptions[item].options.unshift({ text: '全部', title: '全部', value: 'all' })
} else {
this.selectOptions[item].options = []
}
})
}
}
// for (const item in this.selectOptions) {
// if (this.selectOptions[item].code) {
// ajaxGetDictItems(this.selectOptions[item].code).then(res => {
// if (res.success) {
// this.selectOptions[item].options = res.result
// this.selectOptions[item].options.unshift({ text: '全部', title: '全部', value: 'all' })
// } else {
// this.selectOptions[item].options = []
// }
// })
// } else if (this.selectOptions[item].href) {
// this.selectOptions[item].href().then(res => {
// if (res.success) {
// this.selectOptions[item].options = res.result
// this.selectOptions[item].options.unshift({ text: '全部', title: '全部', value: 'all' })
// } else {
// this.selectOptions[item].options = []
// }
// })
// }
// }
},
// 获取要显示数量的筛选条件的数据
initFilterData () {
const param = {}
param.resourceType = this.resourceTypeCurrent === 'all' ? null : this.resourceTypeCurrent
param.searchContent = this.searchValue
param.searchMode = this.retrievalModeCurrent
let func
if (this.retrievalModeCurrent === '1') {
func = getSearchParamNumFullText
} else {
func = getSearchParamNum
}
func(param).then(res => {
if (res.success) {
this.selectOptions = res.result
}
})
},
// 查询
onSearch () {},
@@ -279,7 +302,8 @@ export default {
this.selectOptions = {}
}
// 更新其他筛选项的数据
this.initSelectOptionsData()
// this.initSelectOptionsData()
this.initFilterData()
},
// 其他检索条件改变
selectOptionsChange (changeKey, value) {
@@ -294,6 +318,10 @@ export default {
this.$router.push({
path: '/advancedSearch'
})
},
// 点击检索历史
clickSearchHistory () {
this.$refs.searchHistoryModal.open()
}
}
}
@@ -0,0 +1,75 @@
<template>
<j-modal
:title="$t('dashboard.generalSearch.searchHistory')"
:maskClosable="false"
:width="width"
:visible="visible"
:confirm-loading="confirmLoading"
switchFullscreen
@cancel="handleCancel">
<a-spin :spinning="confirmLoading">
<template v-if="model">
<!--<div class="record-item" v-for="record in recordList" :key="record.id">-->
<!-- {{ record.content }}-->
<!--</div>-->
</template>
<a-empty v-else />
</a-spin>
<template v-slot:footer>
<a-button @click="handleBatchDel">{{ $t('batchDelete') }}</a-button>
<a-button @click="handleCancel">{{ $t('close') }}</a-button>
</template>
</j-modal>
</template>
<script>
import { getSearchHistoryData } from '../../../../api/dashboard'
export default {
name: 'SearchHistoryModal',
data () {
return {
width: 800,
visible: false,
confirmLoading: false,
model: {},
page: {
pageNo: 1,
pageSize: 50
}
}
},
mounted () {
this.initData()
},
methods: {
open () {
this.visible = true
},
// 获取列表数据
initData () {
const param = {}
param.pageNo = this.page.pageNo
param.pageSize = this.page.pageSize
getSearchHistoryData(param).then(res => {
if (res.success) {
this.model = res.result
console.log(res.result)
}
})
},
// 批量删除
handleBatchDel () {},
// 取消
handleCancel () {
this.visible = false
}
}
}
</script>
<style scoped>
</style>