From c5a05c15df6c01602f259a49ff470fa996579b0b Mon Sep 17 00:00:00 2001
From: lawrencehj <1934378145@qq.com>
Date: 星期五, 26 三月 2021 19:58:46 +0800
Subject: [PATCH] 启动时清除先前注册上级平台的缓存
---
web_src/src/components/devicePosition.vue | 34 ++++++++++++++++++++++++----------
1 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/web_src/src/components/devicePosition.vue b/web_src/src/components/devicePosition.vue
index 2910623..4a52c74 100644
--- a/web_src/src/components/devicePosition.vue
+++ b/web_src/src/components/devicePosition.vue
@@ -81,7 +81,7 @@
parentChannelId: this.$route.params.parentChannelId,
updateLooper: 0, //鏁版嵁鍒锋柊杞鏍囧織
total: 0,
- beforeUrl: "/videoList",
+ beforeUrl: "/deviceList",
isLoging: false,
autoList: false,
};
@@ -111,7 +111,7 @@
// this.currentPage = parseInt(this.$route.params.page);
// this.count = parseInt(this.$route.params.count);
// if (this.parentChannelId == "" || this.parentChannelId == 0) {
- // this.beforeUrl = "/videoList";
+ // this.beforeUrl = "/deviceList";
// }
},
initBaiduMap() {
@@ -181,10 +181,17 @@
self.total = res.data.length;
self.mobilePositionList = res.data;
console.log(self.mobilePositionList);
- // 闃叉鍑虹幇琛ㄦ牸閿欎綅
- self.$nextTick(() => {
- self.showMarkPoints(self);
- });
+ if (self.total == 0) {
+ self.$message({
+ showClose: true,
+ message: '鏈壘鍒扮鍚堟潯浠剁殑绉诲姩浣嶇疆淇℃伅',
+ type: 'error'
+ });
+ } else {
+ self.$nextTick(() => {
+ self.showMarkPoints(self);
+ });
+ }
})
.catch(function (error) {
console.log(error);
@@ -201,10 +208,17 @@
self.total = res.data.length;
self.mobilePositionList.push(res.data);
console.log(self.mobilePositionList);
- // 闃叉鍑虹幇琛ㄦ牸閿欎綅
- self.$nextTick(() => {
- self.showMarkPoints(self);
- });
+ if (self.total == 0) {
+ self.$message({
+ showClose: true,
+ message: '鏈壘鍒扮鍚堟潯浠剁殑绉诲姩浣嶇疆淇℃伅',
+ type: 'error'
+ });
+ } else {
+ self.$nextTick(() => {
+ self.showMarkPoints(self);
+ });
+ }
})
.catch(function (error) {
console.log(error);
--
Gitblit v1.8.0