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