From 13514e95ffc45c976806e8e752adb42e0c47052f Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期五, 31 七月 2020 17:37:22 +0800
Subject: [PATCH] 临时将card组件的轮播图片层级降低,添加了测试用的文件夹

---
 src/pages/desktop/index/components/DFrame.vue |   44 ++++++++++++++++++++++++++++++++++----------
 1 files changed, 34 insertions(+), 10 deletions(-)

diff --git a/src/pages/desktop/index/components/DFrame.vue b/src/pages/desktop/index/components/DFrame.vue
index 7e78066..72e5d61 100644
--- a/src/pages/desktop/index/components/DFrame.vue
+++ b/src/pages/desktop/index/components/DFrame.vue
@@ -36,8 +36,18 @@
     return {
       fullScreen: false,
       width: this.data.width || 1024,
-      height: this.data.height || 512
+      height: this.data.height || 512,
+      dragLock: false,
+      resizeLock: false
     }
+  },
+  mounted() {
+    window.addEventListener('message', e => {
+      console.log(e)
+      if (e.data && e.data.msg == "logout") {
+        location.assign("/");
+      }
+    })
   },
   methods: {
     closeFrame: function () {
@@ -57,7 +67,7 @@
         alt: this.data.title,
         type: "3"
       });
-      this.refreshDock();
+      //this.refreshDock();
     },
     refreshDock: function () {
       setTimeout(function () {
@@ -66,13 +76,18 @@
         for (let i = 0; i < dockItems.length; i++) {
           dockItems[i].width = 60;
         }
-        dockMask.style.width = dockItems.length * 60 + 40 + 'px';
+        //dockMask.style.width = dockItems.length * 60 + 40 + 'px';
       }, 10);
     }
   },
   directives: {
     drag(el) {
+      
+      if(el.dragLock){
+        return
+      }
       el.onmousedown = function (e) {
+        el.dragLock = true;
         let disx = e.clientX - el.parentElement.offsetLeft;
         let disy = e.clientY - el.parentElement.offsetTop;
         el.style.cursor = 'move';
@@ -82,13 +97,18 @@
           el.parentElement.style.top = e.clientY - disy + 'px';
         };
         document.onmouseup = function () {
-          document.onmousemove = document.onmouseup = void 0;
+          el.dragLock = false;
+          document.onmousemove = document.onmouseup = null;
           el.style.cursor = 'unset';
         };
       }
     },
     resize(el, binding, vnode) {
+      if(el.resizeLock){
+        return;
+      }
       el.onmousedown = function (e) {
+        el.resizeLock = true;
         let disx = e.clientX;
         let disy = e.clientY;
         let disw = vnode.context.width;
@@ -100,7 +120,8 @@
           vnode.context.height = dish + e.clientY - disy;
         };
         document.onmouseup = function () {
-          document.onmousemove = document.onmouseup = void 0;
+          el.resizeLock = false;
+          document.onmousemove = document.onmouseup = null;
           el.style.cursor = 'unset';
         };
       }
@@ -170,22 +191,24 @@
 }
 
 .d-frame-title-content img {
-  width: 25px;
-  height: 25px;
+  width: auto;
+  height: 18px;
   position: relative;
   top: 3px;
+  margin-right: 6px;
 }
 
 .d-frame-title-content span {
   position: relative;
-  top: -3px;
+  top: -1px;
+  /* font-family: '榛戜綋'; */
 }
 
 .d-frame-content {
   width: 100%;
   height: calc(100% - 30px);
   border-radius: 0 0 4px 4px;
-  background-color: azure;
+  background-color: #fff;
 }
 
 .d-frame-content iframe {
@@ -200,7 +223,8 @@
   right: 0;
   width: 15px;
   height: 15px;
-  z-index: 100;
+  z-index: 1000;
+  cursor: nwse-resize;
   background: url("/images/resize.png") no-repeat;
 }
 </style>
\ No newline at end of file

--
Gitblit v1.8.0