From 5dc36d1e0ea55358eb5b7273943897a75403993c Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期四, 13 八月 2020 17:26:09 +0800
Subject: [PATCH] 修复底库分页全屏不显示,场景编辑可选参数默认选中第一个operator,表单必填项红星对齐方式修改

---
 src/pages/cameraAccess/components/scene/Editor.vue |   23 +++++++----
 public/index.html                                  |   11 +++++
 src/pages/library/index/App.vue                    |    7 +++
 src/pages/cameraAccess/components/CameraInfo.vue   |    4 +-
 src/pages/library/components/personList.vue        |   39 +++++++++++++------
 5 files changed, 60 insertions(+), 24 deletions(-)

diff --git a/public/index.html b/public/index.html
index 0caaffd..485bf69 100644
--- a/public/index.html
+++ b/public/index.html
@@ -341,7 +341,16 @@
       outline: none!important;
       border-color: #3D68E1!important;
     } */
-    
+    .el-select-dropdown__list{
+      text-align: left;
+    }
+    .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before{
+      margin-left: -8px!important;
+      margin-right: 0;
+    }
+    .el-input.is-disabled .el-input__suffix{
+      visibility: hidden;
+    }
     </style>
 
   </head>
diff --git a/src/pages/cameraAccess/components/CameraInfo.vue b/src/pages/cameraAccess/components/CameraInfo.vue
index 227a5c3..da5c685 100644
--- a/src/pages/cameraAccess/components/CameraInfo.vue
+++ b/src/pages/cameraAccess/components/CameraInfo.vue
@@ -9,7 +9,7 @@
         </el-col>
         <el-col :span="9" :offset="1">
           <el-form-item label="鍧愭爣" style="width:100%;">
-            <label slot="label">&nbsp;&nbsp;&nbsp;鍧愭爣</label>
+            <label slot="label">鍧愭爣</label>
             <el-col :span="11">
               <el-input
                 v-model="form.latitude"
@@ -59,7 +59,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="9" :offset="1" style="padding-left: 11px;">
+        <el-col :span="9" :offset="1" >
           <el-form-item label="浜嬩欢澹伴煶">
             <div class="flex-wrap" style="margin-left:-10px">
               <el-switch v-model="form.voiceEnable" active-color="#409eff" :width="50"></el-switch>
diff --git a/src/pages/cameraAccess/components/scene/Editor.vue b/src/pages/cameraAccess/components/scene/Editor.vue
index 7ddb8a9..fdfb3c9 100644
--- a/src/pages/cameraAccess/components/scene/Editor.vue
+++ b/src/pages/cameraAccess/components/scene/Editor.vue
@@ -23,7 +23,7 @@
               :class="{ init: index == 0 }"
               v-cloak
               v-for="(sdkItem, index) in sdkGroup"
-              :key="sdkItem.id"
+              :key="index"
             >
               <div class="connection" v-if="index !== 0">
                 <el-select
@@ -213,6 +213,7 @@
                     ></el-input>-->
 
                     <el-select
+                      :disabled="optArgItem.operators.length==1"
                       v-model="optArgItem.operator"
                       size="mini"
                       @change="selOperator(optArgItem)"
@@ -560,7 +561,6 @@
       this.sdkGroup[index].isSpread = !this.sdkGroup[index].isSpread
     },
     addOptionalArg(sdkItem) {
-      debugger
       sdkItem.initAddOptional = false
       sdkItem.optArg.forEach(arg => {
         sdkItem.optNames.forEach(name => {
@@ -591,7 +591,11 @@
 
         this.setOptArgValueOptions(copyArgTemp)
       }
-
+      //榛樿閫変腑绗竴涓猳perator
+      //if (copyArgTemp.operators.length == 1) {
+        this.$set(copyArgTemp, 'operator', copyArgTemp.operators[0].operator)
+      //}
+  
       if (copyArgTemp.default_value) {
         this.$set(copyArgTemp, 'sdk_arg_value', copyArgTemp.default_value)
       }
@@ -635,7 +639,10 @@
       if (argObj.type == 'option') {
         this.setOptArgValueOptions(argObj);
       }
-      debugger
+      //榛樿閫変腑绗竴涓猳perator
+      //if (argObj.operators.length == 1) {
+        this.$set(argObj, 'operator', argObj.operators[0].operator)
+      //}
       //鏇挎崲鏂扮殑鍙傛暟閰嶇疆瀵硅薄
       sdkItem.optArg.forEach((arg, index) => {
         if (arg.sort == optArgItem.sort) {
@@ -1092,9 +1099,7 @@
       //   return
       // }
       let ruleInfo = JSON.parse(ruleTxt);
-      debugger;
 
-      //let ruleInfo = JSON.parse(ruleTxt)
       this.editRule(ruleInfo)
       // 濡傛灉鏄仈鍔ㄤ换鍔�, 鏌ヨ鑱斿姩鎽勫儚鏈哄垪琛�, 灏嗘爲閫変腑鐨勫垪琛ㄦ洿鏀逛负璇ユ潯瑙勫垯鎵�闇�瑕佺殑鎽勫儚鏈�, 骞跺浠藉綋鍓嶇殑閫変腑鐘舵��, 瑙勫垯淇濆瓨鍚庢仮澶�
       // if (this.isLinkRule) {
@@ -1182,10 +1187,10 @@
             }
           })
           if (optItem) {
-            if (optItem.operators.length > 1) {
+            //if (optItem.operators.length > 1) {
               optItem.operator = arg.operator
               //this.selOperator(optItem)
-            }
+            //}
 
             //璧嬪��
             optItem.sdk_arg_value = arg.sdk_arg_value
@@ -1199,6 +1204,8 @@
             if (optItem.type == 'option') {
               this.setOptArgValueOptions(optItem)
             }
+          
+
             optArg.push(optItem)
           } else {
             defaultArg.forEach(d => {
diff --git a/src/pages/library/components/personList.vue b/src/pages/library/components/personList.vue
index 7194efd..6ade657 100644
--- a/src/pages/library/components/personList.vue
+++ b/src/pages/library/components/personList.vue
@@ -55,7 +55,7 @@
       <el-col :span="2">
         <div class="text-left">
           <upload
-            limitTypes=".jpg,.png,.jpeg,.gif,.mp4"
+            limitTypes=".jpg,.png,.jpeg"
             limitSize
             uploadBtntext="涓婁紶鐓х墖"
             uploadBtnIcon
@@ -188,7 +188,7 @@
         </el-table-column>
       </el-table>
     </div>
-    <div class="pt5 pb20" style="height:40px;position:relative">
+    <div class="pt5 " style="height:40px;position:relative">
       <el-pagination
         @current-change="refrash"
         :current-page="BaseManageData.page"
@@ -815,18 +815,33 @@
         }
       }
     },
+    // tosearch(item) {
+    //   // console.log("璺宠浆鍦板潃", item)
+    //   var curWwwPath = window.document.location.href;
+    //   var pathname = window.document.location.pathname;
+    //   var pos = curWwwPath.indexOf(pathname);
+    //   var localhostPath = curWwwPath.substring(0, pos); //ip+port
+    //   var href = localhostPath + "/Layout/Searching"
+    //   let captureId = item.id == "" ? item.personId : item.id
+    //   var url = item.personPicUrl ? item.personPicUrl : item.personPicUrl
+    //   // console.log("璺宠浆鍦板潃",href,"url",url)
+    //   var compType = 0
+    //   window.open(href + '?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + url + '&compType=' + compType)
+    // },
     tosearch(item) {
-      // console.log("璺宠浆鍦板潃", item)
-      var curWwwPath = window.document.location.href;
-      var pathname = window.document.location.pathname;
-      var pos = curWwwPath.indexOf(pathname);
-      var localhostPath = curWwwPath.substring(0, pos); //ip+port
-      var href = localhostPath + "/Layout/Searching"
+      //let captureId = item.id == "" ? item.baseInfo[0].targetId : item.id
       let captureId = item.id == "" ? item.personId : item.id
-      var url = item.personPicUrl ? item.personPicUrl : item.personPicUrl
-      // console.log("璺宠浆鍦板潃",href,"url",url)
-      var compType = 0
-      window.open(href + '?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + url + '&compType=' + compType)
+      let imgUrl = item.personPicUrl ? item.personPicUrl : item.personPicUrl
+      let compType = 1 //  鏁版嵁鏉ヨ嚜浜巈s
+      if (!item.id || item.id == "") {
+        compType = 0 // 鏁版嵁鏉ヨ嚜浜庡簳搴�
+      }
+      // window.open(href + '?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + url + '&compType=' + compType)
+
+      let message = 'toSearch?showType=findByPic&targetId=' + captureId + '&picSmUrl=' + imgUrl + '&compType=' + compType;
+      window.parent.postMessage({
+        msg: message
+      }, "*")
     },
     copyClick(row) {
       this.BaseManageData.personId = row.id
diff --git a/src/pages/library/index/App.vue b/src/pages/library/index/App.vue
index 3bb206e..bb63ca9 100644
--- a/src/pages/library/index/App.vue
+++ b/src/pages/library/index/App.vue
@@ -126,9 +126,11 @@
   box-sizing: border-box;
   background-color: #e9ebf2;
   min-width: 1315px;
+  height: 100%;
 }
 .base-overflow {
-  overflow: visible !important;
+  height: 100%;
+  //overflow: visible !important;
   background-color: #ffffff;
   box-sizing: border-box;
   // padding: 20px 10px 0 10px;
@@ -143,6 +145,7 @@
   border-radius: 5px;
 }
 .data-left-box {
+  height: 100%;
   @media screen and (max-width: 1440px) {
     width: 23%;
   }
@@ -156,6 +159,8 @@
   border-right: 1px solid #e0e0e0;
 }
 .data-right-box {
+  height: calc(100% - 40px);
+  overflow-y: auto;
   @media screen and (max-width: 1440px) {
     width: 77%;
   }

--
Gitblit v1.8.0