Prechádzať zdrojové kódy

可视化任务列表

彭宇 2 rokov pred
rodič
commit
4c157b2d60

+ 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 => {
@@ -709,8 +699,6 @@
 			},
       selectMessageById(id) {
         selectMessageById(id).then(response => {
-          /** 获取消息个数 */
-          this.selectMessageCount();
           /** 获取消息列表 */
           this.selectMessageList();
         });
@@ -725,6 +713,7 @@
       selectMessageList(){
         selectMessageList(Cookies.get("userId")).then(response => {
           this.messageList = response.data
+          this.messageCount = response.data.length
         });
       },
 			handleCheckedCitiesChangeBan(value) {

+ 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/gather.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()

+ 7 - 0
src/views/leader.vue

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

+ 5 - 0
src/views/water.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()