From aaf3711a9fcf1a19eba6b2cca9808fbd50832c2b Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期二, 26 八月 2025 11:08:14 +0800
Subject: [PATCH] 提醒挪位置
---
src/page/index/top/top-menu.vue | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 47 insertions(+), 1 deletions(-)
diff --git a/src/page/index/top/top-menu.vue b/src/page/index/top/top-menu.vue
index bd351a6..8d3c509 100644
--- a/src/page/index/top/top-menu.vue
+++ b/src/page/index/top/top-menu.vue
@@ -6,6 +6,25 @@
<span>{{ itemHome.name }}</span>
</template>
</el-menu-item>
+ <el-menu-item index="0" @click="openTodo(itemHome)">
+
+ <template #title>
+
+ <el-tooltip
+ class="box-item"
+ effect="dark"
+ :content="`鎮ㄦ湁${logsLen}鏉′换鍔¢渶瑕佸鐞哷"
+ placement="top-start"
+ >
+ <el-badge :value="logsLen" :max="99">
+ {{ itemTodo.name }}
+ </el-badge>
+ <!-- <span >{{ itemTodo.name }}</span>-->
+ </el-tooltip>
+
+
+ </template>
+ </el-menu-item>
<template v-for="(item, index) in items" :key="index">
<el-menu-item :index="item.id + ''" @click="openMenu(item)">
@@ -18,9 +37,14 @@
</el-menu>
</template>
+<style lang="scss" scoped>
+.todoItems {
+ margin-left:15px;
+}
+</style>
<script>
import { mapGetters } from 'vuex';
-
+import { getList } from '@/api/flow/todolist'; //浠诲姟鎻愰啋
export default {
name: 'top-menu',
data() {
@@ -29,14 +53,26 @@
name: '棣栭〉',
source: 'iconfont iconicon_work',
},
+ itemTodo: {
+ name: '浠诲姟鎻愰啋',
+ source: 'iconfont iconicon_work',
+ },
activeIndex: '0',
items: [],
+
+ logsLen: 0,//浠诲姟鎻愰啋鏁伴噺
};
},
inject: ['index'],
created() {
this.getMenu();
+
+ this.getCount()
+ setInterval(() => {
+ this.getCount();
+ }, 2*60*1000);
},
+
computed: {
...mapGetters(['tagCurrent', 'menu', 'tagWel']),
},
@@ -53,6 +89,16 @@
this.items = res;
});
},
+ openTodo() {
+ this.$router.push({ path: '/flow/todoindex' });
+ //this.box = false;
+ },
+ getCount() {
+ getList(1,10).then((res) => {
+ this.logsLen = res.data.data.total;
+ this.dataList = res.data.data.records;
+ });
+ }
},
};
</script>
--
Gitblit v1.9.3