zhangzengfei
2021-06-11 fa7044f3ccc9a91bc2bc117d1a06f650d86554f2
src/pages/desktop/index/components/ToolsEntry.vue
@@ -28,33 +28,12 @@
                  <div class="app-icon">
                    <img
                      :src="item.iconBlob.indexOf(',')>0? item.iconBlob:`data:image/png;base64,${item.iconBlob}`"
                      style="width:82%"
                    />
                  </div>
                  <div class="app-name">{{item.sdk_name}}</div>
                </div>
              </div>
            </div>
            <!-- </draggable> -->
            <!-- <div class="app" v-for="dock in stateDocks" :key="dock.id" @click="dockClick(dock)">
              <div class="wrap">
                <div class="app-icon">
                  <img :src="dock.src" :alt="dock.alt" />
                </div>
                <div class="app-name">{{dock.title}}</div>
              </div>
            </div>
            <div class="app sdk" v-for="(item,index) in sdkList" :key="index+'sdk'">
              <div class="wrap">
                <div class="app-icon">
                  <img
                    :src="item.iconBlob.indexOf(',')>0? item.iconBlob:`data:image/png;base64,${item.iconBlob}`"
                    style="width:82%"
                  />
                </div>
                <div class="app-name">{{item.sdk_name}}</div>
              </div>
            </div>-->
          </div>
        </el-carousel-item>
      </el-carousel>
@@ -107,13 +86,10 @@
      if (window.innerHeight >= 930) {
        //this.rowSize = 4;
        arr = this.chunk(tempArr, 24);
        //arr = chunkArr(tempArr,24);
      } else {
        //this.rowSize = 3;
        arr = this.chunk(tempArr, 18);
        //arr = chunkArr(tempArr, 18);
      }
      console.log(arr)
      return arr
    },
    badgeNum() {
@@ -139,8 +115,6 @@
          location.assign("/");
          return;
        }
        // 打开检索, toSearch?showType=findByPic&targetId=108ba0bc-b0a1-433d-8e1e-d5d2e712b53b&picSmUrl=192.168.20.10:6700/47628,7cc869f3a9c714&compType=1
        if (msg.indexOf("toSearch") >= 0) {
          let params = msg.substring(7);
          this.addFrameByName("search", params)
@@ -181,13 +155,10 @@
        console.log(e)
      })
    },
    dockClick(dock) {
      if (dock.type === '1') {
        window.open(dock.url);
      } else if (dock.type === '2' && !dock.isOpen) {
        this.$store.dispatch('desktop/addFrame', {
          id: dock.id,
          icon: dock.src,
@@ -212,6 +183,7 @@
      } else if (dock.type === '2' && dock.isOpen) {
        this.$store.commit('desktop/resetMinFrame', dock.id);
      }
    },
    resetDockItem() {
      const dockItems = document.getElementsByClassName('dock-item');
@@ -231,7 +203,6 @@
          dock = app;
        }
      });
      if (dock.isOpen) {
        this.$store.dispatch('desktop/closeFrame', dock);
      }
@@ -252,7 +223,6 @@
      });
    },
    addFrameByID(id, params) {
      let dock = null;
      let toClose = null
      this.$store.state.desktop.docks.forEach(app => {
@@ -304,9 +274,12 @@
            height: 110px;
            margin: auto;
            position: relative;
            border-radius: 10px;
            img {
              vertical-align: middle;
              margin-right: -3px;
              width: 82px;
              // height: 82px;
            }
            .badge {
              position: absolute;