|
@@ -19,6 +19,7 @@
|
|
|
<div class="btn" @click="toPageHandle('/mainOfficeCenter')">
|
|
|
<img src="@/assets/imgs/OA/bjzx_icon.png" alt="" />
|
|
|
<p>办件中心</p>
|
|
|
+ <div class="tip" v-show="attendCount > 0">{{ attendCount }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="menus-tabs">
|
|
@@ -52,6 +53,7 @@ import { useTagsViewStore } from '@/store/modules/tagsView'
|
|
|
import MenusActive from './menusActive.vue'
|
|
|
import { useQuery } from '@tanstack/vue-query'
|
|
|
import { getRecordsDetail } from '@/api/oa/staffRecords'
|
|
|
+import { getAttendCount } from '@/api/oa/index'
|
|
|
|
|
|
defineOptions({ name: 'Header' })
|
|
|
const { t } = useI18n()
|
|
@@ -75,6 +77,20 @@ const { data } = useQuery(['fetch-staff-detail-left', userId], async () => {
|
|
|
return await getRecordsDetail({ userId })
|
|
|
})
|
|
|
|
|
|
+/***
|
|
|
+ * 根据用户ID获取待办角标
|
|
|
+ */
|
|
|
+const attendCount = ref<number>(0)
|
|
|
+const initAttendCount = async () => {
|
|
|
+ const result = await getAttendCount({
|
|
|
+ userId: userId
|
|
|
+ })
|
|
|
+ if (result) {
|
|
|
+ attendCount.value = result
|
|
|
+ }
|
|
|
+}
|
|
|
+initAttendCount()
|
|
|
+
|
|
|
const mouseenterIndex = ref(-1)
|
|
|
const loginOut = () => {
|
|
|
ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), {
|
|
@@ -97,7 +113,6 @@ const reactiveData: any = reactive({
|
|
|
})
|
|
|
|
|
|
const initMenus = async () => {
|
|
|
- const uid = currentRoute.value
|
|
|
let locals: any = localStorage.getItem('roleRouters')
|
|
|
let roleRouters = JSON.parse(JSON.parse(locals).v)?.[0]?.children
|
|
|
|
|
@@ -245,7 +260,20 @@ onMounted(() => {
|
|
|
height: 40px;
|
|
|
padding: 0 20px;
|
|
|
margin-bottom: 10px;
|
|
|
-
|
|
|
+ position: relative;
|
|
|
+ .tip {
|
|
|
+ background-color: #f00;
|
|
|
+ position: absolute;
|
|
|
+ right: 15px;
|
|
|
+ top: -10px;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #fff;
|
|
|
+ width: 22px;
|
|
|
+ height: 22px;
|
|
|
+ line-height: 22px;
|
|
|
+ border-radius: 50%;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
.btn {
|
|
|
display: flex;
|
|
|
width: 100%;
|