From a51a787a5ecb7d249dba434be74160c85516c555 Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期三, 05 八月 2020 10:25:12 +0800
Subject: [PATCH] minDock高亮显示

---
 src/pages/algorithmManage/index/App.vue |  185 +++++++++++++++++-----------------------------
 1 files changed, 68 insertions(+), 117 deletions(-)

diff --git a/src/pages/algorithmManage/index/App.vue b/src/pages/algorithmManage/index/App.vue
index c2966a5..f220764 100644
--- a/src/pages/algorithmManage/index/App.vue
+++ b/src/pages/algorithmManage/index/App.vue
@@ -39,9 +39,10 @@
 
                         <div class="list-complete-item-handle">
                           <div class="svg-wrap">
-                            <svg class="icon" aria-hidden="true" style="font-size:7rem;">
+                            <!-- <svg class="icon" aria-hidden="true" style="font-size:7rem;">
                               <use :xlink:href="`#${item.icon}`" />
-                            </svg>
+                            </svg> -->
+                            <img class="baseImg" :src="`data:image/png;base64,${item.iconBlob}`" alt="">
                           </div>
                           <div class="alg-name">
                             <div style="padding:0px 10px 0px 10px;">
@@ -65,8 +66,12 @@
                           <div class="svg-wrap">
                             <!-- <svg class="icon" aria-hidden="true" style="font-size:7rem;">
                               <use :xlink:href="`#${item.icon}`" />
-                            </svg> -->
-                            <img class="baseImg" :src="`data:image/png;base64,${item.iconBlob}`" alt="">
+                            </svg>-->
+                            <img
+                              class="baseImg"
+                              :src="`data:image/png;base64,${item.iconBlob}`"
+                              alt
+                            />
                           </div>
                           <div class="alg-name">
                             <div style="padding:0px 10px 0px 10px;">
@@ -100,9 +105,10 @@
                         <div class="list-complete-item-handle">
                           <!-- <span :class="`iconfont ${item.icon}`" style="font-size:3rem;"></span> -->
                           <div class="svg-wrap">
-                            <svg class="icon" aria-hidden="true" style="font-size:7rem;">
+                            <!-- <svg class="icon" aria-hidden="true" style="font-size:7rem;">
                               <use :xlink:href="`#${item.icon}`" />
-                            </svg>
+                            </svg> -->
+                            <img class="baseImg" :src="`data:image/png;base64,${item.iconBlob}`" alt="">
                           </div>
                           <div class="alg-name">
                             <div style="padding:0px 10px 0px 10px;">
@@ -703,7 +709,7 @@
                 </div>
               </div>
             </div>
-          </div> -->
+          </div>-->
         </div>
       </div>
     </div>
@@ -746,7 +752,6 @@
     },
     installedList() {
       return this.TaskMange.list1.filter(sdk => {
-        debugger
         return sdk.installed === true;
       });
     },
@@ -845,7 +850,7 @@
   },
   directives: {
     focus: {
-      inserted: function(el) {
+      inserted: function (el) {
         el.querySelector("input").focus();
       }
     }
@@ -868,7 +873,7 @@
       //this.activeCode
       this.actStep++
     },
-    getCodeDetail() {},
+    getCodeDetail() { },
     checkMyAlgorith() {
       this.actDrawerShow = false;
       this.activeName = "myAlgorithm";
@@ -908,7 +913,7 @@
       //     });
       //   });
 
-      this.$confirm('','绠楁硶淇℃伅',{
+      this.$confirm('', '绠楁硶淇℃伅', {
         message: `<div class="installInfo">
                     <div><span>绠楁硶鍚嶇О锛�</span><span>${file.filename}</span></div>
                     <div><span>瀹夎鐗堟湰锛�</span><span></span></div>
@@ -923,7 +928,7 @@
         this.isInstall = true;
         //瀹夎
         installSdk(file).then(res => {
-          if(res.success){
+          if (res.success) {
             debugger
             this.isInstall = false;
             //this.$refs['progressBar'].style.width = 100%
@@ -932,16 +937,16 @@
               type: 'success',
               message: '瀹夎鎴愬姛,灏嗚烦杞嚦鎴戠殑绠楁硶涓煡鐪�'
             });
-            setTimeout(()=>{
+            setTimeout(() => {
               this.findAllSdk();
               this.activeName = 'myAlgorithm';
-            },3000)
+            }, 3000)
           }
         });
       }).catch(() => {
         console.log('鍙栨秷瀹夎')
       })
-      
+
     },
 
     onFileAdded(f) {
@@ -1035,7 +1040,7 @@
         .then(() => {
           this.deleteTask(data);
         })
-        .catch(err => {});
+        .catch(err => { });
     },
     clickSetAlgo(row, data) {
       // window.console.log(row, data, "缂栬緫浠诲姟涓煇涓�涓畻娉�");
@@ -1224,7 +1229,7 @@
         .then(() => {
           this.delTaskSdk(task, sdk);
         })
-        .catch(err => {});
+        .catch(err => { });
     },
     selectChange(event, type, data) {
       if (type === "options1") {
@@ -1549,21 +1554,7 @@
       // console.log(item, '淇敼鍚嶇О')
       this.$set(item, "isEdit", false);
     },
-    updateTemplates() {
-      getAllTemplate().then(rsp => {
-        if (rsp && rsp.success) {
-          this.sceneTemplates = rsp.data;
-          this.sceneTemplates.forEach(element => {
-            element.icon = [
-              "iconrenlianjiance",
-              "icongetijingzhi",
-              "iconchouyan-copy",
-              "iconrenshukouzhao"
-            ];
-          });
-        }
-      });
-    },
+    
     cleanTemplateForm() {
       this.appSceneForm.name = "";
       this.appSceneForm.desc = "";
@@ -1573,9 +1564,7 @@
       this.$refs.ruleEditor.cleanRule();
     },
     handleTabClick() {
-      if (this.activeName == "appScenarios") {
-        this.updateTemplates();
-      }
+     
     },
     handleCreateScene() {
       this.sceneDialogVisible = true;
@@ -1602,42 +1591,8 @@
       this.sceneDialogVisible = true;
       this.dialogTitle = '缂栬緫鍦烘櫙妯℃澘';
     },
-    handleDelScene(item){
-      this.$confirm('姝ゆ搷浣滃皢鍒犻櫎璇ュ簲鐢ㄥ満鏅ā鏉�, 鏄惁缁х画?', '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning'
-      }).then(() => {
-        deleteTemplate(item.id).then(res=>{
-          if(res && res.success){
-            this.updateTemplates();
-            this.$message({
-              type: 'success',
-              message: '鍒犻櫎鎴愬姛!'
-            });
-          }
-        })
-        
-      }).catch(() => {
-        console.log('鍙栨秷鍒犻櫎');
-      });
-    },
-    handleSaveTemplate() {
-      let editorResp = this.$refs.ruleEditor.submitRule();
-      this.appSceneForm.rules = JSON.stringify(editorResp.rules);
-      this.appSceneForm.txt = editorResp.text;
-
-      saveTemplate(this.appSceneForm).then(rsp => {
-        if (rsp && rsp.success) {
-          this.$notify({
-            type: "success",
-            message: "妯℃澘鍒涘缓鎴愬姛"
-          });
-          this.updateTemplates();
-          this.sceneDialogVisible = false;
-        }
-      });
-    }
+   
+    
   }
 };
 </script>
@@ -1645,7 +1600,7 @@
 .s-task-manage {
   width: 100% !important;
   height: 100%;
-  
+
   box-sizing: border-box;
   background-color: rgb(233, 235, 242);
   padding: 10px;
@@ -1692,20 +1647,18 @@
   cursor: pointer;
 }
 
-
-
-.installInfo{
+.installInfo {
   text-indent: 2em;
   font-size: 14px;
   color: #777;
-  p{
+  p {
     text-align: center;
     color: #666;
   }
 }
 .task-manage {
   height: 100%;
-  .installModel{
+  .installModel {
     width: 100%;
     height: 100%;
     background-color: rgba(0, 0, 0, 0.7);
@@ -1713,7 +1666,7 @@
     top: 0;
     left: 0;
     z-index: 100;
-    .progress-bar{
+    .progress-bar {
       width: 70%;
       height: 17px;
       border-radius: 3px;
@@ -1721,10 +1674,10 @@
       position: absolute;
       top: 50%;
       left: 50%;
-      background: url(../../../assets/gif/green.gif);
+      background: url("/images/algo/green.gif");
       overflow: hidden;
-      transform: translate(-50%,-50%);
-      .inner-bar{
+      transform: translate(-50%, -50%);
+      .inner-bar {
         position: absolute;
         top: 0;
         left: 0;
@@ -1752,7 +1705,7 @@
   //     width: 58% !important;
   //   }
   // }
-  .edit-rules-box{
+  .edit-rules-box {
     padding: 0 2px 0 13px;
   }
   .common {
@@ -1833,7 +1786,7 @@
           margin-bottom: 30px;
           .inner {
             width: 80%;
-           
+
             box-sizing: border-box;
             position: relative;
             font-size: 14px;
@@ -1844,12 +1797,12 @@
             box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.07);
             border-radius: 4px;
             margin: auto;
-            &:hover{
-              .mask{
+            &:hover {
+              .mask {
                 display: block;
               }
             }
-            .mask{
+            .mask {
               position: absolute;
               top: 0;
               left: 0;
@@ -1861,18 +1814,18 @@
               z-index: 1;
               border-radius: 3px;
               display: none;
-              .tool{
+              .tool {
                 position: absolute;
                 top: 49%;
                 left: 50%;
-                transform: translate(-50%,-50%);
-                i{
+                transform: translate(-50%, -50%);
+                i {
                   font-size: 50px;
                 }
-                i:nth-of-type(1){
+                i:nth-of-type(1) {
                   margin-right: 30px;
                 }
-                i:nth-of-type(2){
+                i:nth-of-type(2) {
                   color: red;
                 }
               }
@@ -1884,7 +1837,7 @@
               margin: auto;
               justify-content: center;
               align-content: center;
-              align-items: center;        
+              align-items: center;
               .single,
               .double,
               .third,
@@ -1919,54 +1872,54 @@
               }
               .single {
                 margin: auto;
-                .svg-wrap{
+                .svg-wrap {
                   top: 50%;
                   left: 50%;
-                  transform: translate(-50%,-50%);
+                  transform: translate(-50%, -50%);
                   box-shadow: none;
                 }
               }
-              .double{
-                .svg-wrap:nth-of-type(1){
+              .double {
+                .svg-wrap:nth-of-type(1) {
                   top: 50%;
                   transform: translateY(-50%);
                   left: 0;
                 }
-                .svg-wrap:nth-of-type(2){
+                .svg-wrap:nth-of-type(2) {
                   top: 50%;
                   transform: translateY(-50%);
                   right: 0;
                 }
               }
-              .third{
-                .svg-wrap:nth-of-type(1){
+              .third {
+                .svg-wrap:nth-of-type(1) {
                   top: 0;
                   left: 0;
                 }
-                .svg-wrap:nth-of-type(2){
+                .svg-wrap:nth-of-type(2) {
                   top: 0;
                   right: 0;
                 }
-                .svg-wrap:nth-of-type(3){
+                .svg-wrap:nth-of-type(3) {
                   top: 50%;
                   left: 50%;
                   transform: translateX(-50%);
                 }
               }
-              .four{
-                .svg-wrap:nth-of-type(1){
+              .four {
+                .svg-wrap:nth-of-type(1) {
                   top: 0;
                   left: 0;
                 }
-                .svg-wrap:nth-of-type(2){
+                .svg-wrap:nth-of-type(2) {
                   top: 0;
                   right: 0;
                 }
-                .svg-wrap:nth-of-type(3){
+                .svg-wrap:nth-of-type(3) {
                   top: 50%;
-                  left: 0;                
+                  left: 0;
                 }
-                .svg-wrap:nth-of-type(4){
+                .svg-wrap:nth-of-type(4) {
                   top: 50%;
                   right: 0;
                 }
@@ -1982,7 +1935,6 @@
               left: 0;
             }
           }
-          
         }
       }
       .store-list {
@@ -2008,12 +1960,11 @@
               width: 80%;
               margin: auto;
               padding-top: 80%;
-              svg{
+              svg {
                 position: absolute;
                 top: 50%;
                 left: 50%;
-                transform: translate(-50%,-50%);
-
+                transform: translate(-50%, -50%);
               }
             }
             .alg-name {
@@ -2096,9 +2047,9 @@
         }
         .text-right {
           padding-right: 30px;
-          .tip{
+          .tip {
             color: #999;
-            line-height: 38px;  
+            line-height: 38px;
           }
         }
       }
@@ -2390,22 +2341,22 @@
       height: 100%;
       padding-bottom: 10px;
       text-align: center;
-      .svg-wrap{
+      .svg-wrap {
         width: 80%;
         margin: auto;
         padding-top: 80%;
         position: relative;
-        svg{
+        svg {
           position: absolute;
           top: 50%;
           left: 50%;
-          transform: translate(-50%,-50%);
+          transform: translate(-50%, -50%);
         }
         .baseImg {
           position: absolute;
           top: 50%;
           left: 50%;
-          transform: translate(-50%,-50%);
+          transform: translate(-50%, -50%);
         }
       }
     }

--
Gitblit v1.8.0