|
|
@@ -7,50 +7,19 @@
|
|
|
<router-view v-if="!$route.meta.keepAlive"></router-view>
|
|
|
</div>
|
|
|
<div v-if="!$route.meta.hideTabBar" class="layout-footer">
|
|
|
- <TabBar :data="tabTars" @change="handleChange" />
|
|
|
+ <TabBar />
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import TabBar from '@/components/TabBar'
|
|
|
-import { userInfo,getDot } from '@/api/public'
|
|
|
+import { userInfo } from '@/api/public'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
container: null,
|
|
|
include: [],
|
|
|
- tabTars: [
|
|
|
- {
|
|
|
- title: '待办',
|
|
|
- to: {
|
|
|
- name: 'works'
|
|
|
- },
|
|
|
- icon: 'home-o',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '消息',
|
|
|
- to: {
|
|
|
- name: 'message'
|
|
|
- },
|
|
|
- icon: 'comment-o',
|
|
|
- dot:false
|
|
|
- },
|
|
|
- {
|
|
|
- title: '菜单',
|
|
|
- to: {
|
|
|
- name: 'menu'
|
|
|
- },
|
|
|
- icon: 'apps-o'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '我的',
|
|
|
- to: {
|
|
|
- name: 'isMy'
|
|
|
- },
|
|
|
- icon: 'user-o'
|
|
|
- }
|
|
|
- ]
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
@@ -58,7 +27,6 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getUserInfo();
|
|
|
- this.getDotData();
|
|
|
},
|
|
|
watch: {
|
|
|
$route(to, from) {
|
|
|
@@ -82,14 +50,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getDotData(){
|
|
|
- getDot().then(res=>{
|
|
|
- this.tabTars[1].dot = res.data;
|
|
|
- })
|
|
|
- },
|
|
|
getUserInfo() {
|
|
|
userInfo().then(info => {
|
|
|
- console.log(info, 'info')
|
|
|
this.$store.commit('SET_USER_NAME', info.user.name)
|
|
|
this.$store.commit('SET_USER_ROLELIST', info.roleList)
|
|
|
this.$store.commit('SET_USER_ID', info.user.id)
|
|
|
@@ -99,15 +61,10 @@ export default {
|
|
|
//登陆之后手动触发一次水印数据刷新
|
|
|
this.$parent.$refs.watercom.getWater(1)
|
|
|
})
|
|
|
- this.$store.dispatch('getOrgTree')
|
|
|
- this.$store.dispatch('getOrgTreeHangshe')
|
|
|
+ this.$store.dispatch('getOrgTree');
|
|
|
+ this.$store.dispatch('getOrgTreeHangshe');
|
|
|
+ this.$store.dispatch('redDot')
|
|
|
},
|
|
|
- handleChange(v) {
|
|
|
- if(v == 1){
|
|
|
- this.getDotData();
|
|
|
- }
|
|
|
- console.log('tab value:', v)
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
</script>
|