From bdfabf5a34092c02b5445ad50a0daafcbaa49721 Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期三, 30 九月 2020 09:56:45 +0800
Subject: [PATCH] 应用中心商城应用激活
---
src/components/LeftNav.vue | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/src/components/LeftNav.vue b/src/components/LeftNav.vue
index fc28117..8a1411e 100644
--- a/src/components/LeftNav.vue
+++ b/src/components/LeftNav.vue
@@ -391,7 +391,6 @@
},
lockSwitch() {
this.TreeDataPool.readonly = !this.TreeDataPool.readonly;
- console.log(this.TreeDataPool.readonly)
},
gbLockSwitch() {
this.TreeDataPool.gbReadonly = !this.TreeDataPool.gbReadonly;
@@ -549,7 +548,7 @@
let succeed = 0;
let failed = 0;
-
+ let promiseArr = [];
for (let item in sheetArray) {
let camera = this.newCamera();
camera.areaid = this.importAreaId;
@@ -557,26 +556,27 @@
camera.rtsp = String(sheetArray[item].rtsp);
camera.addr = String(sheetArray[item].addr);
- createCamera(camera).then(rsp => {
- if (rsp && rsp.success) {
+ promiseArr.push(createCamera(camera));
+ }
+ let _this = this;
+ Promise.allSettled(promiseArr).then(res=>{
+ res.forEach(item=>{
+ if(item.status === 'fulfilled'){
succeed++;
- } else {
+ }else{
failed++;
}
- }).catch(err => {
- failed++;
- })
- }
-
- let _this = this
- setTimeout(() => {
- this.menuLoading = false;
+ });
+ _this.menuLoading = false;
_this.$message({
type: "success",
message: "鎿嶄綔瀹屾垚, 瀵煎叆鎴愬姛:" + succeed + "涓� 澶辫触:" + failed + "涓�"
})
_this.TreeDataPool.fetchTreeData();
- }, 2000)
+ }).catch(e=>{
+ console.log(e)
+ });
+
}
} catch (e) {
this.menuLoading = false
@@ -623,8 +623,9 @@
border: none;
box-shadow: none;
.el-tabs__header {
+ display: none;
border-bottom: none;
- margin: 0 0 15px;
+ //margin: 0 0 15px;
}
.el-tabs__content {
padding: 0;
@@ -751,6 +752,7 @@
.search-input {
padding-top: 8px;
padding-bottom: 12px;
+ text-align: left;
.dev-tree-close {
width: 10%;
margin-left: 10px;
--
Gitblit v1.8.0