|
|
@ -1,29 +1,25 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<!-- 政务端消息通知数量 -->
|
|
|
|
<!-- 政务端消息通知数量 -->
|
|
|
|
<!-- 大于0的时候显示的图标 -->
|
|
|
|
<!-- 大于0的时候显示的图标 -->
|
|
|
|
<el-badge :is-dot="countstwo > 0" class="item" v-if="checkRole(['common'])">
|
|
|
|
<el-badge :is-dot="countstwo > 0" class="item" v-if="checkRole(['common'])">
|
|
|
|
<span class="el-dropdown-link">
|
|
|
|
<img src="@/assets/images/icon-tz@2x.png" alt="">
|
|
|
|
<i class="el-icon-bell"></i>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</el-badge>
|
|
|
|
</el-badge>
|
|
|
|
<!-- 企业端消息通知数量 -->
|
|
|
|
<!-- 企业端消息通知数量 -->
|
|
|
|
<el-badge :is-dot="counts > 0" class="item" v-if="showCompanySection">
|
|
|
|
<el-badge :is-dot="counts > 0" class="item" v-if="showCompanySection">
|
|
|
|
<span class="el-dropdown-link">
|
|
|
|
<img src="@/assets/images/icon-tz@2x.png" alt="">
|
|
|
|
<i class="el-icon-bell"></i>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</el-badge>
|
|
|
|
</el-badge>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { checkRole } from "@/utils/permission";
|
|
|
|
import { checkRole } from "@/utils/permission";
|
|
|
|
import { getMessageCount,getMessageCounttwo } from '@/api/ManageApi/index'
|
|
|
|
import { getMessageCount, getMessageCounttwo } from '@/api/ManageApi/index'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
counts: 0 ,
|
|
|
|
counts: 0,
|
|
|
|
countstwo: 0,
|
|
|
|
countstwo: 0,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -54,8 +50,8 @@ export default {
|
|
|
|
console.error('获取数据失败:', error);
|
|
|
|
console.error('获取数据失败:', error);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 获取数据
|
|
|
|
// 获取数据
|
|
|
|
async getCountstwo() {
|
|
|
|
async getCountstwo() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const response = await getMessageCounttwo();
|
|
|
|
const response = await getMessageCounttwo();
|
|
|
|
if (response && response.code === 200) {
|
|
|
|
if (response && response.code === 200) {
|
|
|
@ -84,8 +80,13 @@ export default {
|
|
|
|
color: black;
|
|
|
|
color: black;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
img {
|
|
|
|
|
|
|
|
width: 1.5rem;
|
|
|
|
|
|
|
|
height: 1.6rem;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-dropdown-link i {
|
|
|
|
.el-dropdown-link i {
|
|
|
|
font-size: 2rem;
|
|
|
|
font-size: 1rem;
|
|
|
|
/* 增大图标的大小 */
|
|
|
|
/* 增大图标的大小 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|