浏览代码

周界防范

wangtao 2 年之前
父节点
当前提交
9d6085d13a
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/views/device/guard/index.vue

+ 3 - 3
src/views/device/guard/index.vue

@@ -463,11 +463,11 @@ export default {
                   }
                 }
                 // console.log(this.fq)
-                //  console.log(arr)
+                 console.log(arr)
                 // if(this.fq.length>1){
                 if(arr.length>1){
                   for(let i =0;i<arr.length;i++){
-                    if(arr[i].connId == arr[0].connId){
+                    if(arr[i].connId == arr[arr.length-1].connId){
                       this.fq.push(arr[i])
                     }
                   }
@@ -492,7 +492,7 @@ export default {
       }else{
         operateType = 3
       }
-            api.sf({device:JSON.stringify({"nMachine":Number(this.form.connId),"nAreaNo":Number(this.form.dkAreaNo),"operateType":operateType})}).then((response) => {
+            api.sf({device:JSON.stringify({"nMachine":Number(this.fq[0].connId),"nAreaNo":Number(this.form.dkAreaNo),"operateType":operateType})}).then((response) => {
 
             })
       // axios.post( "http://10.208.0.198:8888", {"nMachine":Number(this.form.connId),"nAreaNo":Number(this.form.dkAreaNo),"operateType":operateType},{