Przeglądaj źródła

Merge remote-tracking branch 'origin/visu_resources' into visu_resources

wangzhe 2 lat temu
rodzic
commit
7a2b261524

+ 2 - 13
src/components/vBottomMenu.vue

@@ -152,7 +152,7 @@
           </div>
         </div>
         <el-badge :value="taskCount" slot="reference">
-          <el-button size="small" icon="el-icon-bank-card" @click="refreshTaskList">任务</el-button>
+          <el-button size="small" icon="el-icon-bank-card" >任务</el-button>
         </el-badge>
       </el-popover>
       <el-popover placement="top" trigger="click">
@@ -506,12 +506,6 @@ export default {
     deptTreeselect().then(response => {
       this.deptOptionsLiandong = response.data
     })
-    /** 获取任务 */
-    this.selectTaskList()
-    /** 获取消息个数 */
-    this.selectMessageCount()
-    /** 获取消息列表 */
-    this.selectMessageList()
   },
   methods: {
     filterbanNode(value, data) {
@@ -697,10 +691,6 @@ export default {
         }, 1000)
       })
     },
-    refreshTaskList() {
-      //刷新任务列表
-      this.selectTaskList()
-    },
     selectTaskList: async function() {
       //获取任务列表
       selectTaskBO().then(res => {
@@ -710,8 +700,6 @@ export default {
     },
     selectMessageById(id) {
       selectMessageById(id).then(response => {
-        /** 获取消息个数 */
-        this.selectMessageCount();
         /** 获取消息列表 */
         this.selectMessageList();
       });
@@ -726,6 +714,7 @@ export default {
     selectMessageList(){
       selectMessageList(Cookies.get("userId")).then(response => {
         this.messageList = response.data
+        this.messageCount = response.data.length
       });
     },
     handleCheckedCitiesChangeBan(value) {

+ 2 - 2
src/router/index.js

@@ -65,7 +65,7 @@ export const constantRoutes = [{
 		name: 'leader',
 		component: () => import('@/views/leader'),
 		meta: {
-			title: '网格化'
+			title: ' 资源人员'
 		}
 	},
   {
@@ -125,7 +125,7 @@ export const constantRoutesNew = [{
 		name: 'leader',
 		component: () => import('@/views/leader'),
 		meta: {
-			title: '网格化'
+			title: ' 资源人员'
 		}
 	},
   {

+ 1 - 1
src/views/bigdata/bigdata.vue

@@ -258,7 +258,7 @@ export default {
         },
         {
           path: '/leader',
-          name: '网格化'
+          name: ' 资源人员'
         },
         {
           path: '/tianzhangzhi',

+ 5 - 0
src/views/datacenter.vue

@@ -104,6 +104,7 @@ export default {
   },
   mounted() {
     this.getResource()
+    this.bottomMenuList() //获取底部公共组件消息和任务
   },
   data() {
     return {
@@ -134,6 +135,10 @@ export default {
 
   methods: {
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+    bottomMenuList() {
+      this.$refs.bottomMenu.selectTaskList()//获取任务列表
+      this.$refs.bottomMenu.selectMessageList()//获取消息列表
+    },
     showDialog(click) {
       if (click == 'eventLocation') {
         this.$refs.eventLocation.showEventLocation()

+ 5 - 0
src/views/forest.vue

@@ -515,6 +515,7 @@
           this.getSupermap(this.getCurrentDataStr(), true);
         }
       }, 10000)
+      this.bottomMenuList() //获取底部公共组件消息和任务
     },
     data() {
       return {
@@ -1183,6 +1184,10 @@
       /** ----------------------------------weosocket结束------------------------------------- */
 
       /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+      bottomMenuList() {
+        this.$refs.bottomMenu.selectTaskList()//获取任务列表
+        this.$refs.bottomMenu.selectMessageList()//获取消息列表
+      },
       showDialog(click) {
         if (click == 'eventLocation') {
           this.$refs.eventLocation.showEventLocation()

+ 7 - 0
src/views/leader.vue

@@ -150,8 +150,15 @@ export default {
     window.choseLayerSwitchingList = this.choseLayerSwitchingList
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
+  mounted(){
+    this.bottomMenuList() //获取底部公共组件消息和任务
+  },
   methods: {
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+    bottomMenuList() {
+      this.$refs.bottomMenu.selectTaskList()//获取任务列表
+      this.$refs.bottomMenu.selectMessageList()//获取消息列表
+    },
     showDialog(click) {
       if (click == 'eventLocation') {
         this.$refs.eventLocation.showEventLocation()

+ 5 - 0
src/views/monitor.vue

@@ -178,6 +178,7 @@ export default {
   mounted() {
     this.selectDeviceType(-1)
     this.selectKeyAreaList()
+    this.bottomMenuList() //获取底部公共组件消息和任务
   },
   data() {
     return {
@@ -253,6 +254,10 @@ export default {
       })
     },
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+    bottomMenuList() {
+      this.$refs.bottomMenu.selectTaskList()//获取任务列表
+      this.$refs.bottomMenu.selectMessageList()//获取消息列表
+    },
     showDialog(click) {
       if (click == 'eventLocation') {
         this.$refs.eventLocation.showEventLocation()

+ 7 - 0
src/views/tianzhangzhi.vue

@@ -144,6 +144,9 @@ export default {
     window.choseLayerSwitchingList = this.choseLayerSwitchingList
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
+  mounted(){
+    this.bottomMenuList() //获取底部公共组件消息和任务
+  },
   methods: {
     getPointListByGd(id){
       //耕地地图展示区域
@@ -181,6 +184,10 @@ export default {
       })
     },
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+    bottomMenuList() {
+      this.$refs.bottomMenu.selectTaskList()//获取任务列表
+      this.$refs.bottomMenu.selectMessageList()//获取消息列表
+    },
     showDialog(click) {
       if (click == 'eventLocation') {
         this.$refs.eventLocation.showEventLocation()