ソースを参照

可视化任务列表

彭宇 2 年 前
コミット
bb82ac094e

+ 2 - 13
src/components/vBottomMenu.vue

@@ -151,7 +151,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">
@@ -505,12 +505,6 @@
 			deptTreeselect().then(response => {
 				this.deptOptionsLiandong = response.data
 			})
-      /** 获取任务 */
-      this.selectTaskList()
-      /** 获取消息个数 */
-      this.selectMessageCount();
-      /** 获取消息列表 */
-      this.selectMessageList();
 		},
 		methods: {
 			filterbanNode(value, data) {
@@ -696,10 +690,6 @@
 					}, 1000)
 				})
 			},
-			refreshTaskList() {
-				//刷新任务列表
-				this.selectTaskList()
-			},
 			selectTaskList: async function() {
 				//获取任务列表
 				selectTaskBO().then(res => {
@@ -710,8 +700,6 @@
 
       selectMessageById(id) {
         selectMessageById(id).then(response => {
-          /** 获取消息个数 */
-          this.selectMessageCount();
           /** 获取消息列表 */
           this.selectMessageList();
         });
@@ -726,6 +714,7 @@
       selectMessageList(){
         selectMessageList(Cookies.get("userId")).then(response => {
           this.messageList = response.data
+          this.messageCount = response.data.length
         });
       },
 			handleCheckedCitiesChangeBan(value) {

+ 4 - 4
src/router/index.js

@@ -62,12 +62,12 @@ export const constantRoutes = [
 		}
 	},
   {
-		//网格化
+		//消防人员
 		path: '/leader',
 		name: 'leader',
 		component: () => import('@/views/leader'),
 		meta: {
-			title: '网格化'
+			title: '消防人员'
 		}
 	},
 	{
@@ -116,12 +116,12 @@ export const constantRoutesNew = [{
 		}
 	},
   {
-    //网格化
+    //消防人员
     path: '/leader',
     name: 'leader',
     component: () => import('@/views/leader'),
     meta: {
-      title: '网格化'
+      title: '消防人员'
     }
   },
   {

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

@@ -227,9 +227,9 @@ export default {
           name: '监控中心'
         },
         {
-          //网格化
+          //消防人员
           path: '/leader',
-          name: '网格化'
+          name: '消防人员'
         },
         {
           //统计分析

+ 5 - 0
src/views/datacenter.vue

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

@@ -508,6 +508,7 @@
           this.getSupermap(this.getCurrentDataStr(), true);
         }
       }, 10000)
+      this.bottomMenuList() //获取底部公共组件消息和任务
     },
     data() {
       return {
@@ -1176,6 +1177,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

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