From a935450c18aa54589abce1c32bac4a18faeaea57 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期四, 04 三月 2021 18:56:27 +0800
Subject: [PATCH] 数据推送bug修改

---
 src/pages/ai/index/App.vue                        |  131 ++++++++++++++++++++------------
 src/pages/datapush/index/RightEvent.vue           |   37 ++++++++
 src/pages/desktop/index/components/ToolsEntry.vue |   22 +++++
 3 files changed, 136 insertions(+), 54 deletions(-)

diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue
index 8d2b2d9..3d93010 100644
--- a/src/pages/ai/index/App.vue
+++ b/src/pages/ai/index/App.vue
@@ -615,8 +615,8 @@
                     >
                   </div>
                   <div class="flex-list">
-                    <div v-if="!hasNewVersionSdk.length" class="empty-tip">
-                      鏆傛棤鏁版嵁锛岃绋嶅悗閲嶈瘯...
+                    <div v-if="hasNewVersionSdk.length==0" class="empty-tip">
+                      {{errMsg?errMsg:"鏆傛棤鏁版嵁锛岃绋嶅悗閲嶈瘯..."}}
                     </div>
                     <div
                       class="wrap-box"
@@ -918,17 +918,17 @@
                   v-for="(id, index) in curCheckTarget.productLabelId"
                   :key="index+'i'" 
                 >{{showNameById(id)}}</span> -->
-                  <el-tag type="info" color="#fff" v-if="!isSDKDialog">搴旂敤</el-tag>
-                  <el-tag type="info" color="#fff" v-if="isSDKDialog">绠楁硶</el-tag>
-                  <el-tag type="info" color="#fff" >杞欢</el-tag>
+                  <el-tag type="info" size="small" color="#fff" v-if="!isSDKDialog">搴旂敤</el-tag>
+                  <el-tag type="info" size="small" color="#fff" v-if="isSDKDialog">绠楁硶</el-tag>
+                  <el-tag type="info"  size="small" color="#fff" >杞欢</el-tag>
                 </div>
                 <div class="btns">
-                  <el-button size="medium" type="warning" v-if="needToUpgradeInWin" @click="upgradeSDKinWin" >{{
+                  <el-button size="small" type="warning"  v-if="needToUpgradeInWin" @click="upgradeSDKinWin" >{{
                     isUpgrading ? "鍗囩骇涓�.." : "鍗囩骇"
                   }}</el-button>
-                  <el-button size="medium" type="primary" v-if="isActive" @click="unloadSDKinWin">鍗歌浇</el-button>
-                  <el-button size="medium" type="primary" v-if="!isActive" @click="showInputCode=!showInputCode">涓嬭浇婵�娲�</el-button>
-                  <el-button size="medium" type="success" v-if="!isSDKDialog">鎵撳紑</el-button>
+                  <el-button size="small" type="primary" v-if="isActive" @click="unloadSDKinWin">鍗歌浇</el-button>
+                  <el-button size="small" type="primary" v-if="!isActive" @click="showInputCode=!showInputCode">涓嬭浇婵�娲�</el-button>
+                  <el-button size="small" type="success" v-if="!isSDKDialog" @click="openAPP(productDetail.productBaseId)">鎵撳紑</el-button>
                 </div>
                
               </div>
@@ -954,7 +954,7 @@
                   <div>
                     {{
                       productDetail.productVersion === ""
-                        ? "鏆傛棤鏁版嵁"
+                        ? "鏆傛棤"
                         : productDetail.productVersion
                     }}
                   </div>
@@ -964,7 +964,7 @@
                   <div>
                     {{
                       productDetail.description === ""
-                        ? "鏆傛棤鏁版嵁 绱㈤噰鐢ㄥぇ鏁版嵁鏋舵瀯锛屽垎甯冩绱㈡绉掔骇杩斿洖"
+                        ? "鏆傛棤"
                         : productDetail.description
                     }}
                   </div>
@@ -974,7 +974,7 @@
                   <div>
                     {{
                       productDetail.summary === ""
-                        ? "鏆傛棤鏁版嵁 鍙敮鎸佹捣閲忔暟鎹鏉傛绱㈡绉掔骇杩斿洖锛岃璁℃湁鏅鸿兘妫�绱㈡鍙敮鎸佹捣閲忔暟鎹鏉傛绱㈡妫�绱㈡绉掔骇杩斿洖锛岃璁℃湁鏅鸿兘妫�绱㈡鍙敮鎸佹捣閲忔暟鎹鏉傛绱㈡绉掔骇杩斿洖锛岃璁℃湁鏅�"
+                        ? "鏆傛棤"
                         : productDetail.summary
                     }}
                   </div>
@@ -985,7 +985,7 @@
         </div>
         <div class="box-bottom">
           <div class="bot-left">
-            <div class="part-title">鍔熻兘鐗圭偣</div>
+            <div class="part-title">{{isSDKDialog?"搴旂敤鍦烘櫙":"鍔熻兘鐗圭偣"}}</div>
             <div class="list-zone">
               <div
                 class="list-item"
@@ -993,12 +993,12 @@
                 :key="index"
               >
                 <el-tag type="" size="small" effect="dark">
-                  {{ item.title === "" ? "鏍囬鏆傛棤鏁版嵁" : item.title }}
+                  {{ item.title === "" ? "鏆傛棤鏁版嵁" : item.title }}
                 </el-tag>
                 <div class="desc">
                   {{
                     item.desc === ""
-                      ? "璇ユ绱㈤噰鐢ㄥぇ鏁版嵁鏋舵瀯锛屽垎甯冨紡鏁版嵁澶勭悊锛屽彲鏀寔娴烽噺鏁版嵁澶嶆潅妫�绱㈡绉掔骇杩斿洖锛岃璁℃湁鏅鸿兘妫�绱㈡锛屾悳绱㈠唴瀹瑰皢鏍规嵁TF/IDF绠楁硶璁$畻鎵�寰楀緱鍒嗭紝璇ョ畻娉曢�氳繃姝ゅ唴瀹瑰尮閰嶇▼搴︼紝璇嶉鏁帮紝璇嶉暱鍗犳瘮绛夛紝璁$畻鍑哄悓鎵�鎼滃唴瀹圭殑绗﹀悎搴︼紝杩斿洖绗﹀悎搴︽渶楂樼殑鏁版嵁锛岃嫢绗﹀悎搴︿竴鑷达紝灏嗚繑鍥炴嵁浠婃渶杩戠殑鏁版嵁"
+                      ? "鏆傛棤鏁版嵁"
                       : item.desc
                   }}
                 </div>
@@ -1029,12 +1029,16 @@
                     "
                     alt
                   />
-                  <div class="icon-name">
-                    {{ item.name === "" ? "鏆傛棤鏁版嵁" : item.name }}
+
+                <div class="icon-name">
+                  <el-tooltip class="" effect="dark" :content="item.name === '' ? '鏆傛棤鏁版嵁':item.name" placement="top-start">
+                  <span>{{ item.name === "" ? "鏆傛棤鏁版嵁" : item.name }}</span>
+                </el-tooltip>
                   </div>
+                  
                 </div>
                 <div class="look-button">
-                  <el-button type="primary" size="small" @click="checkInWindow(item)">鏌ョ湅</el-button>
+                  <el-button type="primary" size="mini" @click="checkInWindow(item)">鏌ョ湅</el-button>
                 </div>
               </div>
             </div>
@@ -1100,6 +1104,7 @@
   actApp,
 } from "@/api/app";
 
+import bus from '@/plugin/bus'
 import FileUploader from "@/components/subComponents/FileUpload/index";
 export default {
   name: "algorithmManage",
@@ -1202,6 +1207,7 @@
       forwardDisable:true,
       showInputCode:false,
       needToUpgradeInWin:false,
+      errMsg:"",
     };
   },
   directives: {
@@ -1211,12 +1217,14 @@
       },
     },
   },
+
   mounted() {
     // 鑾峰彇鎵�鏈夊簲鐢�
     this.autoRefreshAppAndSdkState();
 
     this.getUnActivedList();
     this.getUnActivedAppList();
+    
   },
   beforeDestroy() {
     this.autoRefresh = false;
@@ -1330,6 +1338,7 @@
       }
       
     },
+
     //绂荤嚎瀹夎
     offlineInstall() {
       this.installDialogVisible = false;
@@ -1364,7 +1373,10 @@
           });
         });
     },
-    
+    openAPP(id){
+      debugger
+      bus.$emit('open-app',id)
+    },
     downloadApp(app, action) {
       if (action == "upgrade") {
         app.upgradeLoading = true;
@@ -1793,10 +1805,11 @@
   }
   .product-detail-dialog {
     .dialog-title{
-      font-size: 14px;
+          font-size: 13px;
+
     }
     .el-dialog {
-      width: 55%;
+      width: 50%;
       min-width: 920px;
       position: relative;
     }
@@ -1818,7 +1831,7 @@
     }
     .el-dialog__body {
       background-color: rgba(222, 225, 230, 1);
-      padding: 10px 5px;
+          padding: 8px 3px;
       .button-group{
         position: absolute;
                top: 3px;
@@ -1826,7 +1839,8 @@
             left:6px;
                 left: 10px;
       .el-button--small {
-    padding: 6px 12px;
+        padding: 5px 12px;
+
     }
         button{
           // margin-right: 6px;
@@ -1839,31 +1853,32 @@
 
     .dialog-content {
       .box-top {
-        height: 350px;
+        height: 330px;
         .top-left {
           float: left;
           width: 55%;
           background-color: rgba(253, 253, 253, 1);
           margin: 0 0.5%;
-          height: 350px;
+          height: 330px;
           border-radius: 2px;
           .banner {
         text-align: center;
-            margin-top: 11px;
-
-        // margin-top: 15px;
+        margin-top: 3px;
            video {
 
             margin: 0px auto;
-                margin-top: 25px;
+                 margin-top: 23px;
 
             width: 443px;
           height: 277px;
             // background: aquamarine;
           }
           img{
-             max-width: 500px;
-                 margin-top: 21px;
+                max-width: 90%;
+
+                     margin-top: 28px;
+
+
 
           }
           }
@@ -1873,22 +1888,25 @@
           width: 43%;
           margin: 0 0.5%;
           // background-color: lightgoldenrodyellow;
-          height: 350px;
+          height: 330px;
           background-color: rgba(253, 253, 253, 1);
           position: relative;
           border-radius: 2px;
           overflow: hidden;
           .summary {
-         height: 135px;
+                height: 120px;
+
+
                 margin: 5px 5px 0 5px;
 
             .icon {
-              margin: 0 5px;
-              margin-top: 5px;
+             margin: 0 10px;
+                margin-top: 8px;
+
               float: left;
               .baseImg{
-                max-width: 120px;
-                max-height: 120px;
+         max-width: 106px;
+    max-height: 106px;
               }
             }
             
@@ -1897,7 +1915,8 @@
               position: absolute;
              left: 145px;
               .name {
-                font-size: 30px;
+                    font-size: 28px;
+
                 // font-weight: bold;
                 margin-bottom: 5px;
               }
@@ -1916,7 +1935,7 @@
               .el-input{
                 float: left;
                 width: 64%;
-                margin-right: 10px;
+                 margin-bottom: 8px;
               }
               el-button{
                 float: left;
@@ -1924,7 +1943,8 @@
             }
           .product-intruduction {
             height: 200px;
-            // background-color: lightgrey;
+               margin-top: 3px;
+
             .part-title {
               display: block;
                   line-height: 20px;
@@ -1936,7 +1956,8 @@
               width: fit-content;
               // margin-bottom: 8px;
                  height: 26px;
-margin-bottom: 6px;
+            margin-bottom: 8px;
+
             }
             .text {
                  height: 156px;
@@ -1946,17 +1967,21 @@
 
               .single-desc {
                    margin-bottom: 10px;
+                        font-size: 13px;
+
+
               }
             }
           }
         }
       }
       .box-bottom {
-        margin-top: 10px;
-        height: 260px;
+            margin-top: 8px;
+
+        height: 240px;
         .bot-left {
           width: 49%;
-          height: 260px;
+          height: 240px;
           background-color: rgba(253, 253, 253, 1);
           margin: 0 0.5%;
           border-radius: 2px;
@@ -1982,14 +2007,14 @@
               .desc {
                 background-color: rgba(242, 242, 242, 1.3);
                     margin: 4px 12px 0 12px;
-
+                    font-size: 12px;
               }
                margin-bottom: 12px;
             }
           }
         }
         .bot-right {
-          height: 260px;
+          height: 240px;
           float: left;
           background-color: rgba(253, 253, 253, 1);
           width: 49%;
@@ -2047,14 +2072,20 @@
                  text-align: center;
                 position: absolute;
                 top: 61%;
-                left: 7%;
-                width: 110px;
+                   left: 12%;
+    width: 100px;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    overflow: hidden;
+        font-size: 13px;
+
                 }
               }
               .look-button {
                 position: absolute;
-                left: 28%;
-                top: 75%;
+                      left: 30%;
+
+                top: 76%;
               }
             }
           }
diff --git a/src/pages/datapush/index/RightEvent.vue b/src/pages/datapush/index/RightEvent.vue
index dcaae85..a175c20 100644
--- a/src/pages/datapush/index/RightEvent.vue
+++ b/src/pages/datapush/index/RightEvent.vue
@@ -203,7 +203,7 @@
       <div slot="title" class="slot-title">
         <p>璇烽�夋嫨鎯宠鎺ㄩ�佺殑瀛楁</p>
         <div class="right">
-          <el-checkbox v-model="allFieldChecked"></el-checkbox>
+          <el-checkbox v-model="allFieldChecked" @change="allCheckChange"></el-checkbox>
         </div>
       </div>
       <div class="check-area" v-for="configObj in tempPushSet" :key="configObj.id">
@@ -215,7 +215,7 @@
         </div>
         <div class="flex-box flex-wrap">
           <div class="param flex-box" v-for="param in configObj.children" :key="param.id">
-            <el-checkbox v-model="param.checked"></el-checkbox>
+            <el-checkbox v-model="param.checked" @change="checkChildren"></el-checkbox>
             <span class="param-name">{{param.name}}</span>
             <el-input
               v-model="param.alias"
@@ -372,6 +372,28 @@
     openPushSetDialog() {
       this.pushFieldDialog = true;
       this.tempPushSet = JSON.parse(JSON.stringify(this.taskEditData.push_set));
+      this.checkFlag()
+    },
+    checkFlag(){
+      // debugger
+      let flag = true
+      this.tempPushSet.forEach(item => {
+        if (item.checked==false) {
+          flag = false
+        }
+      });
+      this.allFieldChecked=flag
+    },
+    checkChildren(val){
+      console.log(val,12121);
+      if (val==false) {
+        this.allFieldChecked=false
+      } else if(val==true && this.allFieldChecked==false){
+        this.$nextTick( ()=> {
+          this.checkFlag()
+        })
+      }
+
     },
     varifyField(param) {
       var reg = /^[A-Za-z]+[0-9-_]?$/;
@@ -388,6 +410,15 @@
     },
     canclePushFieldSet() {
       this.pushFieldDialog = false;
+    },
+    allCheckChange(val){
+  
+      this.tempPushSet.forEach(function (item) {
+          item.checked= val 
+          item.children.forEach(function (child) {
+            child.checked= val
+          })     
+      })
     },
     submitPushFieldSet() {
       let flag = false;
@@ -411,9 +442,11 @@
       this.pushFieldDialog = false;
     },
     toggleConfigCheck(configObj) {
+      
       configObj.children.forEach(child => {
         child.checked = configObj.checked
       })
+      this.checkFlag()
     },
     getPushFields() {
       let _this = this;
diff --git a/src/pages/desktop/index/components/ToolsEntry.vue b/src/pages/desktop/index/components/ToolsEntry.vue
index 6d329c8..aa26486 100644
--- a/src/pages/desktop/index/components/ToolsEntry.vue
+++ b/src/pages/desktop/index/components/ToolsEntry.vue
@@ -65,6 +65,7 @@
 import draggable from "vuedraggable"
 import { findAllSdk } from '@/api/taskMange';
 import {chunkArr} from '@/scripts/util';
+import bus from '@/plugin/bus'
 export default {
   name: 'toolsEntry',
   components: { draggable },
@@ -87,6 +88,7 @@
       ],
       //rowSize: 3,
       badgeNum: 0,
+      curDock: {}
     }
   },
   computed: {
@@ -139,7 +141,16 @@
         }
       }
     });
-
+    this.$nextTick( () =>{
+       bus.$on("open-app", (val)=> {
+        debugger
+        const cur = this.stateDocks.find( (item)=> {
+          return item.id == val
+        })
+        this.dockClick(cur)
+        this.curDock = cur
+    })
+    })
   },
   methods: {
     chunk (arr, size) {
@@ -163,7 +174,9 @@
         console.log(e)
       })
     },
+   
     dockClick (dock) {
+
       if (dock.type === '1') {
         window.open(dock.url);
       } else if (dock.type === '2' && !dock.isOpen) {
@@ -232,7 +245,12 @@
         screenshot: ''
       });
     }
-  }
+  },
+  watch:{
+    curDock:function (val) {
+      this.dockClick(val)
+    }
+  },
 };
 </script>
 

--
Gitblit v1.8.0