hanbaoshan
2020-10-15 355de6d28489e9ff3d17138575c2fef32266930e
src/components/LeftNav.vue
@@ -151,6 +151,9 @@
            </el-submenu>
          </el-menu>
        </el-tab-pane>
        <el-tab-pane label="集群" name="cluster" :style="`height:${height - 56}px;`" v-if="showCluster">
        </el-tab-pane>
        <el-tab-pane
          label="数据栈"
          name="dataStack"
@@ -289,6 +292,9 @@
    showCam() {
      return this.appName === "Camera" || this.appName === "Search";
    },
    showCluster() {
      return this.appName === "Cluster"
    },
    showDataStack() {
      return this.appName === "DataStack" || this.appName === "Search";
    },
@@ -391,7 +397,6 @@
    },
    lockSwitch() {
      this.TreeDataPool.readonly = !this.TreeDataPool.readonly;
      console.log(this.TreeDataPool.readonly)
    },
    gbLockSwitch() {
      this.TreeDataPool.gbReadonly = !this.TreeDataPool.gbReadonly;
@@ -549,7 +554,7 @@
            let succeed = 0;
            let failed = 0;
            let promiseArr = [];
            for (let item in sheetArray) {
              let camera = this.newCamera();
              camera.areaid = this.importAreaId;
@@ -557,26 +562,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 +629,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 +758,7 @@
    .search-input {
      padding-top: 8px;
      padding-bottom: 12px;
      text-align: left;
      .dev-tree-close {
        width: 10%;
        margin-left: 10px;