瀏覽代碼

个人工作台分页

wangziqian 4 年之前
父節點
當前提交
63e57aeccb

+ 13 - 1
src/layout/components/Sidebar/SidebarItem.vue

@@ -4,10 +4,10 @@
       <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
         <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
           <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
+          <div v-show="onlyOneChild.meta.title === '个人工作台' || onlyOneChild.meta.title === '团队工作台'" class="if-notice" />
         </el-menu-item>
       </app-link>
     </template>
-
     <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
       <template slot="title">
         <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
@@ -93,3 +93,15 @@ export default {
   }
 }
 </script>
+<style lang="scss" scoped>
+.if-notice {
+  position: absolute;
+  height: 10px;
+  width: 10px;
+  background-color: tomato;
+  border-radius: 50%;
+  top: 50%;
+  right: 20%;
+  transform: translateY(-50%);
+}
+</style>

+ 0 - 1
src/router/index.js

@@ -635,7 +635,6 @@ const createRouter = () => new Router({
 
 const router = createRouter()
 router.beforeEach((to, from, next) => {
-  console.log(this)
   if (to.name !== '接口管理') {
     next()
   } else {

+ 10 - 0
src/views/workbench/person/index.vue

@@ -266,6 +266,16 @@ export default {
       ]
     }
   },
+  watch: {
+    activeName: {
+      handler(newV) {
+        Number(newV) > 0
+          ? this.$router.push({ path: this.$route.path, query: { page: newV }})
+          : this.$router.push({ path: this.$route.path, query: { page: '1' }})
+      },
+      immediate: true
+    }
+  },
   created() {
     this.showTeamAndMemberEnum()
   },

+ 10 - 0
src/views/workbench/team/index.vue

@@ -211,6 +211,16 @@ export default {
       mapMemberColor: new Map()// 人员对应颜色表
     }
   },
+  watch: {
+    activeName: {
+      handler(newV) {
+        Number(newV) > 0
+          ? this.$router.push({ path: this.$route.path, query: { page: newV }})
+          : this.$router.push({ path: this.$route.path, query: { page: '1' }})
+      },
+      immediate: true
+    }
+  },
   mounted() {
     this.settingGetBizList()
     this.queryTeamInfoList()