彭宇 2 роки тому
батько
коміт
ebe7833c53

+ 1 - 8
src/components/vBottomMenu.vue

@@ -505,18 +505,10 @@
 			deptTreeselect().then(response => {
 				this.deptOptionsLiandong = response.data
 			});
-      /** 获取任务 */
-      this.selectTaskList()
-      /** 获取消息个数 */
-      this.selectMessageCount();
-      /** 获取消息列表 */
-      this.selectMessageList();
 		},
 		methods: {
       selectMessageById(id) {
         selectMessageById(id).then(response => {
-          /** 获取消息个数 */
-          this.selectMessageCount();
           /** 获取消息列表 */
           this.selectMessageList();
         });
@@ -531,6 +523,7 @@
       selectMessageList(){
         selectMessageList(Cookies.get("userId")).then(response => {
           this.messageList = response.data
+          this.messageCount = response.data.length
         });
       },
 			filterbanNode(value, data) {

+ 5 - 0
src/views/afforestation.vue

@@ -114,6 +114,7 @@ export default {
   mounted() {
     this.getInit();
     this.listPublishTask();
+    this.bottomMenuList() //获取底部公共组件消息和任务
   },
   data() {
     return {
@@ -139,6 +140,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/animal.vue

@@ -180,9 +180,14 @@ export default {
     // this.getInit();
     this.getAnimalRemotelist();
     this.selectAnimalCountByType();
+    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/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/disaster.vue

@@ -360,6 +360,7 @@ export default {
   },
   mounted() {
     this.getInit()
+    this.bottomMenuList() //获取底部公共组件消息和任务
   },
   data() {
     return {
@@ -446,6 +447,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

@@ -191,8 +191,15 @@
 			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()

+ 5 - 0
src/views/trees.vue

@@ -90,9 +90,14 @@ export default {
   mounted() {
     this.selectCenterdataTForestTreesGroupByType();
     this.getTreesRemoteList();
+    this.bottomMenuList() //获取底部公共组件消息和任务
   },
   methods: {
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+    bottomMenuList() {
+      this.$refs.bottomMenu.selectTaskList()//获取任务列表
+      this.$refs.bottomMenu.selectMessageList()//获取消息列表
+    },
     showDialog(click) {
       if (click == 'eventLocation') {
         this.$refs.eventLocation.showEventLocation()