|
@@ -14,39 +14,33 @@
|
|
|
</div>
|
|
|
<div class="header-right">
|
|
|
<div class="right-top">
|
|
|
- <el-popover v-model="hotVisibile" class="right-top-item" placement="bottom-start" popper-class="hot-popper-box" width="420" trigger="click" @show="showHotPopover">
|
|
|
+ <el-popover v-model="hotVisibile" class="right-top-item" placement="bottom-start" popper-class="hot-popper-box" width="480" trigger="click" @show="showHotPopover">
|
|
|
<el-tabs v-model="curHotTab" @tab-click="getHotData">
|
|
|
<el-tab-pane label="热门应用" name="hotSys">
|
|
|
<div style="margin-bottom: 5px;">提示:根据应用浏览数量排行</div>
|
|
|
<div v-loading="sysLoading" class="top-item-box">
|
|
|
<div v-for="(item, index) in sysTopData" :key="item.id" class="top-item">
|
|
|
- <span :class="['top-rank', index<=2 ? 'top-rank_'+index : '']">{{ index + 1 }}</span>
|
|
|
- <span>
|
|
|
- <el-avatar :size="32" fit="fill" :src="item.icon | formatFileUrl" />
|
|
|
- </span>
|
|
|
- <ellipsis-tooltip :content="item.systemName" placement="top" class="top-name" width="200px">
|
|
|
- <a @click="$jumpTo('app', item.id, item.systemName, item.url)">{{ item.systemName }}</a>
|
|
|
- </ellipsis-tooltip>
|
|
|
- <span class="top-count"><svg-icon icon-class="remen" class="hot-icon" />{{ formatCount(item.hits) }}</span>
|
|
|
+ <div :class="['top-rank', index<=2 ? 'top-rank_'+index : '']">{{ index + 1 }}</div>
|
|
|
+ <el-avatar :size="32" fit="fill" :src="item.icon | formatFileUrl" />
|
|
|
+ <a class="top-name" @click="$jumpTo('app', item.id, item.systemName, item.url)">{{ item.systemName }}</a>
|
|
|
+ <div class="top-count"><svg-icon icon-class="remen" class="hot-icon" />{{ formatCount(item.hits) }}</div>
|
|
|
<el-button v-if="item.isStar === 1" type="primary" size="small" style="width:68px; cursor: default">已收藏</el-button>
|
|
|
<el-button v-else size="small" style="width:68px" @click="addSysFavorite(item.id, index)">收藏</el-button>
|
|
|
</div>
|
|
|
- <div class="more-item"><span style="cursor: pointer;" @click="showMoreHot('sys')">查看更多</span></div>
|
|
|
+ <div class="more-item"><span style="cursor: pointer;" @click="showMoreHot('System')">查看更多</span></div>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="热门业务" name="hotBiz">
|
|
|
<div style="margin-bottom: 5px;">提示:根据业务浏览数量排行</div>
|
|
|
<div v-loading="bizLoading" class="top-item-box">
|
|
|
<div v-for="(item, index) in bizTopData" :key="item.id" class="top-item">
|
|
|
- <span :class="['top-rank', index<=2 ? 'top-rank_'+index : '']">{{ index + 1 }}</span>
|
|
|
- <ellipsis-tooltip :content="item.businessName" placement="top" class="top-name" width="200px">
|
|
|
- <a @click="$jumpTo('business', item.id, item.businessName, item.url)">{{ item.businessName }}</a>
|
|
|
- </ellipsis-tooltip>
|
|
|
- <span class="top-count"><svg-icon icon-class="remen" class="hot-icon" />{{ formatCount(item.hits) }}</span>
|
|
|
+ <div :class="['top-rank', index<=2 ? 'top-rank_'+index : '']">{{ index + 1 }}</div>
|
|
|
+ <a class="top-name" @click="$jumpTo('business', item.id, item.businessName, item.url)">{{ item.businessName }}</a>
|
|
|
+ <div class="top-count"><svg-icon icon-class="remen" class="hot-icon" />{{ formatCount(item.hits) }}</div>
|
|
|
<el-button v-if="item.isStar === 1" type="primary" size="small" style="width:68px; cursor: default">已收藏</el-button>
|
|
|
<el-button v-else size="small" style="width:68px" @click="addBizFavorite(item.appId, item.id, index)">收藏</el-button>
|
|
|
</div>
|
|
|
- <div class="more-item"><span style="cursor: pointer;" @click="showMoreHot('biz')">查看更多</span></div>
|
|
|
+ <div class="more-item"><span style="cursor: pointer;" @click="showMoreHot('Biz')">查看更多</span></div>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
@@ -120,13 +114,11 @@ import { fetchTableList } from '@/api/message'
|
|
|
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import Search from '@/components/HeaderSearch'
|
|
|
-import EllipsisTooltip from '@/components/EllipsisTooltip'
|
|
|
|
|
|
export default {
|
|
|
name: 'HeaderTop',
|
|
|
components: {
|
|
|
- Search,
|
|
|
- EllipsisTooltip
|
|
|
+ Search
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -159,6 +151,7 @@ export default {
|
|
|
])
|
|
|
},
|
|
|
methods: {
|
|
|
+ formatCount,
|
|
|
async logout() {
|
|
|
await this.$store.dispatch('user/logout').then((res) => {
|
|
|
location.href = res['casLogoutUrl']
|
|
@@ -180,7 +173,10 @@ export default {
|
|
|
},
|
|
|
showMoreHot(path) {
|
|
|
this.hotVisibile = false
|
|
|
- this.$router.push(`/${path}`)
|
|
|
+ this.$router.replace({
|
|
|
+ path: `/redirect/name/${path}`,
|
|
|
+ query: { order: 'hits' }
|
|
|
+ })
|
|
|
},
|
|
|
getHotData() {
|
|
|
const params = {
|
|
@@ -311,9 +307,6 @@ export default {
|
|
|
showMoreMsg() {
|
|
|
this.msgVisible = false
|
|
|
this.$router.push('/home')
|
|
|
- },
|
|
|
- formatCount(count) {
|
|
|
- return formatCount(count)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -396,14 +389,11 @@ export default {
|
|
|
height: 50px;
|
|
|
color: rgba(0,0,0,0.85);
|
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
align-items: center;
|
|
|
+ gap: 10px;
|
|
|
|
|
|
&>* {
|
|
|
- display: inline-block;
|
|
|
- }
|
|
|
- &>*+* {
|
|
|
- margin-left: 10px;
|
|
|
+ flex: none;
|
|
|
}
|
|
|
.top-rank {
|
|
|
width: 20px;
|
|
@@ -426,10 +416,15 @@ export default {
|
|
|
}
|
|
|
|
|
|
.top-name {
|
|
|
- width: 270px;
|
|
|
- margin-bottom: 5px;
|
|
|
+ flex: auto;
|
|
|
+
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
.top-count{
|
|
|
+ width: 100px;
|
|
|
+ text-align: right;
|
|
|
color: #FF5030;
|
|
|
}
|
|
|
.hot-icon {
|