[update] 修改搜索中心bug
This commit is contained in:
@@ -7,13 +7,16 @@
|
||||
<!-- <img v-else src="~@/assets/logo.png" alt="logo">-->
|
||||
<!-- update-begin- author:sunjianlei --- date:20190814 --- for: logo颜色根据主题颜色变化 -->
|
||||
|
||||
<h1 v-if="showTitle">{{ title }}</h1>
|
||||
<img v-if="showTitle" src='../../assets/image/analysisLogo.png'/>
|
||||
<!--<img src="~@/assets/image/analysisLogo.png" alt="logo">-->
|
||||
<!--<h1 v-if="showTitle">{{ title }}</h1>-->
|
||||
</router-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mixin } from '@/utils/mixin.js'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Logo',
|
||||
@@ -21,7 +24,7 @@ export default {
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: '研发云平台',
|
||||
default: 'SRMS',
|
||||
required: false
|
||||
},
|
||||
showTitle: {
|
||||
@@ -34,6 +37,11 @@ export default {
|
||||
type: Object,
|
||||
default: () => ({ name: 'dashboard' })
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
collapsed () {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -52,7 +60,7 @@ export default {
|
||||
background-color: transparent !important;
|
||||
|
||||
h1 {
|
||||
color: #222222 !important;
|
||||
color: @primary-color !important;
|
||||
}
|
||||
|
||||
a {
|
||||
|
||||
@@ -134,6 +134,14 @@
|
||||
:pagination="ipagination"
|
||||
@change="handleTableChange">
|
||||
|
||||
<template v-slot:toDetail="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
</a-spin>
|
||||
@@ -189,14 +197,14 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'standard_number',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'toDetail' }
|
||||
},
|
||||
{ // 标准名称
|
||||
title: this.$t('dashboard.advancedSearch.standardName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'standard_name',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'toDetail' }
|
||||
},
|
||||
{ // 发布日期
|
||||
title: this.$t('dashboard.advancedSearch.releaseDate'),
|
||||
@@ -266,10 +274,29 @@ export default {
|
||||
path: '/generalSearch'
|
||||
})
|
||||
},
|
||||
// 跳转详情
|
||||
handleGoDetail (record) {
|
||||
let path = ''
|
||||
// 需要先判断是哪种标准
|
||||
if (this.currStandardType === '1') {
|
||||
path = '/standardRegulationLibrary/DomesticStandardDetail'
|
||||
} else if (this.currStandardType === '2') {
|
||||
path = '/standardRegulationLibrary/OverseasStandardDetail'
|
||||
} else if (this.currStandardType === '3') {
|
||||
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
|
||||
}
|
||||
this.$openPageNewSheet({
|
||||
path: path,
|
||||
query: {
|
||||
id: record.id
|
||||
}
|
||||
})
|
||||
},
|
||||
// 标准类型改变
|
||||
standardTypeChange (value) {
|
||||
this.currStandardType = value
|
||||
this.queryParam = {}
|
||||
this.dataSource = []
|
||||
},
|
||||
onChange (item) {
|
||||
if (this.queryParam[item] && this.queryParam[item].length > 0) {
|
||||
@@ -405,6 +432,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
.tab-wrapper {
|
||||
span {
|
||||
margin-right: 20px;
|
||||
|
||||
@@ -50,10 +50,10 @@
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
<div class="toggle-div" @click="handleToggleChange" v-if="selectOptions && Object.keys(selectOptions).length !== 0">
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="toggle-div" @click="handleToggleChange" v-if="selectOptions && Object.keys(selectOptions).length !== 0">
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
|
||||
</div>
|
||||
<!-- 结果展示 -->
|
||||
<template v-if="dataSource && dataSource.length > 0">
|
||||
@@ -66,7 +66,7 @@
|
||||
<template #title>
|
||||
<span v-html="item.title"></span>
|
||||
</template>
|
||||
<p class="result-title" v-html="item.title"></p>
|
||||
<p class="result-title" v-html="item.title" @click="goDetail(item)"></p>
|
||||
</a-tooltip>
|
||||
<div class="result-source-wrapper">
|
||||
<p class="result-source">{{ resourceTypeOptions.find(i => i.key === item.resourceType).label }}</p>
|
||||
@@ -328,6 +328,17 @@ export default {
|
||||
// 检索方式改变
|
||||
retrievalModeChange (key) {
|
||||
this.retrievalModeCurrent = key
|
||||
this.ipagination = {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
|
||||
},
|
||||
total: 0,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true
|
||||
}
|
||||
// 更新其他筛选项的数据
|
||||
if (this.resourceTypeCurrent !== 'all') {
|
||||
this.initFilterData()
|
||||
@@ -337,6 +348,17 @@ export default {
|
||||
// 资源类型改变
|
||||
resourceTypeChange (key) {
|
||||
this.resourceTypeCurrent = key
|
||||
this.ipagination = {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
|
||||
},
|
||||
total: 0,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true
|
||||
}
|
||||
// 更新其他筛选项的数据
|
||||
if (key !== 'all') {
|
||||
this.initFilterData()
|
||||
@@ -371,6 +393,26 @@ export default {
|
||||
// 点击检索历史
|
||||
clickSearchHistory () {
|
||||
this.$refs.searchHistoryModal.open()
|
||||
},
|
||||
// 跳转详情
|
||||
goDetail (record) {
|
||||
let path = ''
|
||||
// 需要先判断是哪种标准
|
||||
if (record.resourceType === '1') {
|
||||
path = '/standardRegulationLibrary/DomesticStandardDetail'
|
||||
} else if (record.resourceType === '2') {
|
||||
path = '/standardRegulationLibrary/OverseasStandardDetail'
|
||||
} else if (record.resourceType === '3') {
|
||||
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
|
||||
} else if (record.resourceType === '4') {
|
||||
path = '/standardRegulationLibrary/DynamicMessageDetail'
|
||||
}
|
||||
this.$openPageNewSheet({
|
||||
path: path,
|
||||
query: {
|
||||
id: record.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -419,7 +461,8 @@ export default {
|
||||
.filter-area-div {
|
||||
padding: 10px 20px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #E5E6EB;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
.filter-row {
|
||||
height: auto;
|
||||
line-height: 44px;
|
||||
@@ -463,6 +506,8 @@ export default {
|
||||
.toggle-div {
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #E5E6EB;
|
||||
/deep/ .anticon {
|
||||
height: 8px;
|
||||
}
|
||||
@@ -470,6 +515,7 @@ export default {
|
||||
|
||||
// 查询结果展示区域
|
||||
.result-wrapper {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 24px;
|
||||
}
|
||||
@@ -502,6 +548,7 @@ export default {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
.result-source-wrapper {
|
||||
min-width: 100px;
|
||||
|
||||
@@ -109,14 +109,14 @@ export default {
|
||||
title: this.$t('workCenter.enStandardChange.proposingDepartment'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'proposingDepartment',
|
||||
dataIndex: 'orgCode_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 提出人
|
||||
title: this.$t('workCenter.enStandardChange.introducer'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'introducer',
|
||||
dataIndex: 'createBy_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user