Browse Source

提交阿代码

wangxiaogang 3 years ago
parent
commit
d18977a5ca
1 changed files with 34 additions and 33 deletions
  1. 34 33
      src/web/staticres/js/pur-search-index-pc.js

+ 34 - 33
src/web/staticres/js/pur-search-index-pc.js

@@ -463,7 +463,8 @@ var vm = new Vue({
             this.getList(p)
         },
         goTitle(name) {
-            location.href = '/entpc/unit_portrayal/' + name
+            // location.href = '/entpc/unit_portrayal/' + name
+            window.open('/entpc/unit_portrayal/' + name)
         },
         // 全选
         allChange() {
@@ -496,24 +497,24 @@ var vm = new Vue({
                 $('.check-all').prop('checked', false)
             }
             this.selectName = arr1
-            // var tempArray1 = this.arrDefault(this.selectName, this.attentionName)
-            // var tempArray2 = this.arrDefault(this.selectName, this.claimcheckName)
-            // if (tempArray1.length == 0) {
-            //     this.follow = true
-            //     if (this.selectName.length == 0) {
-            //         this.follow = false
-            //     }
-            // } else {
-            //     this.follow = false
-            // }
-            // if (tempArray2.length == 0) {
-            //     this.claim = true
-            //     if (this.selectName.length == 0) {
-            //         this.claim = false
-            //     }
-            // } else {
-            //     this.claim = false
-            // }
+            var tempArray1 = this.arrDefault(this.selectName, this.attentionName)
+            var tempArray2 = this.arrDefault(this.selectName, this.claimcheckName)
+            if (tempArray1.length == 0) {
+                this.follow = true
+                if (this.selectName.length == 0) {
+                    this.follow = false
+                }
+            } else {
+                this.follow = false
+            }
+            if (tempArray2.length == 0) {
+                this.claim = true
+                if (this.selectName.length == 0) {
+                    this.claim = false
+                }
+            } else {
+                this.claim = false
+            }
         },
         // 是否关注企业
         attentionCheck(arrs, item) {
@@ -592,16 +593,16 @@ var vm = new Vue({
                         }
                     } else {
                         _this.getList(_this.listState.pageNum)
-                        if (per && this.follow) {
-                            this.follow = false
-                        } else {
-                            this.follow = true
-                        }
-                        if (per && this.claim) {
-                            this.claim = false
-                        } else {
-                            this.claim = true
-                        }
+                        // if (per && this.follow) {
+                        //     this.follow = false
+                        // } else {
+                        //     this.follow = true
+                        // }
+                        // if (per && this.claim) {
+                        //     this.claim = false
+                        // } else {
+                        //     this.claim = true
+                        // }
                     }
                 }.bind(this)
             })
@@ -629,20 +630,20 @@ var vm = new Vue({
                 var tempArray2 = this.arrDefault(this.selectName, this.claimcheckName)
                 if (type == 0) {
                     if (tempArray1.length == 0) {// 批量取关
-                        // this.follow = true
+                        this.follow = true
                         this.attention(String(this.selectName), type, true, 'pi') 
                     } else if (tempArray1.length == this.selectName.length) {// 批量关注
-                        // this.follow = false
+                        this.follow = false
                         this.attention(String(this.selectName), type, false, 'pi')
                     } else {
                         toastFn('关注和取消不能同时进行!', 2000)
                     }
                 } else {
                     if (tempArray2.length == 0) {// 批量取认领
-                        // this.claim = true
+                        this.claim = true
                         this.attention(String(this.selectName), type, true, 'pi') 
                     } else if (tempArray2.length == this.selectName.length) {// 批量认领
-                        // this.claim = false
+                        this.claim = false
                         this.attention(String(this.selectName), type, false, 'pi')
                     } else {
                         toastFn('认领和取消不能同时进行!', 2000)