优化显示列
(cherry picked from commit ef4943d0fad11af48916a7f096906d21be3c6917)
This commit is contained in:
@@ -93,8 +93,6 @@ new Vue({
|
|||||||
Toast(e.message)
|
Toast(e.message)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log('跳转到搜索页')
|
|
||||||
this.$router.push({ path: '/search/generalSearch' })
|
|
||||||
},
|
},
|
||||||
render: h => h(App)
|
render: h => h(App)
|
||||||
}).$mount('#app')
|
}).$mount('#app')
|
||||||
|
|||||||
@@ -14,21 +14,6 @@
|
|||||||
@search="onInputSearch"
|
@search="onInputSearch"
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
<!-- 搜索框部分 -->
|
|
||||||
<!-- <div class="top-search-div">-->
|
|
||||||
<!-- <div class="top-search-div-content">-->
|
|
||||||
<!-- <a-input-search class="input-search"-->
|
|
||||||
<!-- :class="!isHasPermission('dashboard:generalSearch:search') ? 'search-no-btn' : ''"-->
|
|
||||||
<!-- :placeholder="$t('pleaseEnter')+$t('dashboard.generalSearch.queryCondition')"-->
|
|
||||||
<!-- v-model="searchValue"-->
|
|
||||||
<!-- :maxLength="50"-->
|
|
||||||
<!-- @search="onInputSearch()">-->
|
|
||||||
<!-- <van-button type="primary" slot="enterButton">-->
|
|
||||||
<!-- <i class="iconfont icon-Searchbar_Search_icon"></i>-->
|
|
||||||
<!-- </van-button>-->
|
|
||||||
<!-- </a-input-search>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- 筛选区域 -->
|
<!-- 筛选区域 -->
|
||||||
<div class="filter-area-div" ref="filterArea">
|
<div class="filter-area-div" ref="filterArea">
|
||||||
<!-- 检索方式 -->
|
<!-- 检索方式 -->
|
||||||
@@ -80,42 +65,22 @@
|
|||||||
<template v-if="dataSource && dataSource.length > 0">
|
<template v-if="dataSource && dataSource.length > 0">
|
||||||
<!-- 查询结果展示区域 -->
|
<!-- 查询结果展示区域 -->
|
||||||
<div class="result-wrapper">
|
<div class="result-wrapper">
|
||||||
<div class="result-div" v-for="item in dataSource" :key="item.id">
|
<van-cell v-for="item in dataSource" :key="item.id" @click="filePreviewAll(item)">
|
||||||
<div class="result-title-wrapper">
|
<template #title class="result-title-wrapper">
|
||||||
<!-- 正在搜索,标题根据搜索内容高亮显示 -->
|
<span class="result-title" v-html="item.title" ></span>
|
||||||
<a-tooltip>
|
<br/>
|
||||||
<template #title>
|
<van-tag color="#E63636" class="result-source">{{ getTagLabel(item) }}</van-tag>
|
||||||
<span v-html="item.title"></span>
|
<div class="inline"> </div>
|
||||||
</template>
|
<van-tag color="#B7B7B7" class="result-abolish" v-show="judgeAbolish(item)" >{{ StandardStatus.ABOLISH.text }}</van-tag>
|
||||||
<p class="result-title" v-html="item.title" @click="filePreviewAll(item)"></p>
|
<p class="inline-right">{{ item.releaseDate || global.emptyLine }}</p>
|
||||||
</a-tooltip>
|
</template>
|
||||||
<div class="result-source-wrapper">
|
|
||||||
<p class="result-source">{{ resourceTypeOptions.find(i => i.key === item.resourceType).label }}</p>
|
|
||||||
</div>
|
|
||||||
<div v-show="judgeAbolish(item)" class="result-source-wrapper" >
|
|
||||||
<p class="result-abolish">{{ StandardStatus.ABOLISH.text }}</p>
|
|
||||||
</div>
|
|
||||||
<p class="result-date">{{ $t('dashboard.generalSearch.releaseDate') }} {{ item.releaseDate || global.emptyLine }}</p>
|
|
||||||
</div>
|
|
||||||
<template v-if="retrievalModeCurrent === '1'">
|
<template v-if="retrievalModeCurrent === '1'">
|
||||||
<!-- 全文检索 -->
|
<!-- 全文检索 -->
|
||||||
<div v-html="item.content" class="result-content-wrapper"></div>
|
<div v-html="item.content" class="result-content-wrapper"></div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</van-cell>
|
||||||
</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"-->
|
|
||||||
<!-- @change="pageChange"-->
|
|
||||||
<!-- @showSizeChange="pageSizeChange"-->
|
|
||||||
<!-- />-->
|
|
||||||
<van-pagination
|
<van-pagination
|
||||||
v-if="dataSource && dataSource.length > 0"
|
v-if="dataSource && dataSource.length > 0"
|
||||||
class="page-content"
|
class="page-content"
|
||||||
@@ -132,12 +97,6 @@
|
|||||||
@showSizeChange="pageSizeChange"
|
@showSizeChange="pageSizeChange"
|
||||||
force-ellipses
|
force-ellipses
|
||||||
/>
|
/>
|
||||||
<!-- <van-pagination-->
|
|
||||||
<!-- v-model="currentPage"-->
|
|
||||||
<!-- :total-items="125"-->
|
|
||||||
<!-- :show-page-size="3"-->
|
|
||||||
<!-- force-ellipses-->
|
|
||||||
<!-- />-->
|
|
||||||
</template>
|
</template>
|
||||||
<van-empty v-else class="empty-content" description="暂无数据" />
|
<van-empty v-else class="empty-content" description="暂无数据" />
|
||||||
|
|
||||||
@@ -270,6 +229,11 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
isHasPermission,
|
isHasPermission,
|
||||||
|
|
||||||
|
getTagLabel (item) {
|
||||||
|
const resourceTypeOption = this.resourceTypeOptions.find(i => i.key === item.resourceType)
|
||||||
|
if (resourceTypeOption && resourceTypeOption.label) return resourceTypeOption.label
|
||||||
|
},
|
||||||
|
|
||||||
loadResultFromSession () {
|
loadResultFromSession () {
|
||||||
// 从session获取搜索结果
|
// 从session获取搜索结果
|
||||||
this.searchParam = JSON.parse(sessionStorage.getItem('searchParam'))
|
this.searchParam = JSON.parse(sessionStorage.getItem('searchParam'))
|
||||||
@@ -408,6 +372,8 @@ export default {
|
|||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
func(this.searchParam).then(res => {
|
func(this.searchParam).then(res => {
|
||||||
|
console.log('res', res)
|
||||||
|
this.loading = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.dataSource = res.result.records
|
this.dataSource = res.result.records
|
||||||
if (res.result.total) {
|
if (res.result.total) {
|
||||||
@@ -769,6 +735,16 @@ export default {
|
|||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
|
.custom-title {
|
||||||
|
margin-right: 4px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-icon {
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
//居中
|
//居中
|
||||||
.center-flex {
|
.center-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -894,6 +870,20 @@ export default {
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.result-title {
|
||||||
|
color: #1D2129;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFang SC-Semibold, PingFang SC;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 28px;
|
||||||
|
margin-right: 20px;
|
||||||
|
max-height: calc(100% - 340px);
|
||||||
|
//overflow: hidden;
|
||||||
|
//text-overflow: ellipsis;
|
||||||
|
//white-space: nowrap;
|
||||||
|
//cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
// 单个查询结果
|
// 单个查询结果
|
||||||
.result-div {
|
.result-div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -910,19 +900,7 @@ export default {
|
|||||||
p {
|
p {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
.result-title {
|
|
||||||
color: #1D2129;
|
|
||||||
font-size: 18px;
|
|
||||||
font-family: PingFang SC-Semibold, PingFang SC;
|
|
||||||
font-weight: 600;
|
|
||||||
line-height: 28px;
|
|
||||||
margin-right: 20px;
|
|
||||||
max-height: calc(100% - 340px);
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.result-source-wrapper {
|
.result-source-wrapper {
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
}
|
}
|
||||||
@@ -1008,4 +986,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inline-right{
|
||||||
|
display: inline-block;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline{
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user