فهرست منبع

fix: 企业画像逻辑调整,企业情报监控逻辑调整

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 6 ماه پیش
والد
کامیت
ea9cef0055

+ 0 - 1
src/config.yaml

@@ -1,7 +1,6 @@
 etcd:
   hosts:
     - 192.168.3.207:2379
-    - 192.168.3.165:2379
     - 192.168.3.204:2379
 userCenterKey: "usercenter.rpc" #用户中台rpc
 powerCheckCenterKey: "powercheck.rpc" #权益校验中台

+ 9 - 9
src/db.json

@@ -1,26 +1,26 @@
 {
   "mongodb": {
     "main": {
-      "address": "192.168.3.206:27080",
+      "address": "192.168.3.149:27180",
       "size": 10,
       "dbName": "qfw"
     },
     "log": {
-      "address": "192.168.3.206:27090",
+      "address": "192.168.3.149:27190",
       "size": 5,
       "dbName": "qfw",
       "userName": "admin",
       "password": "123456"
     },
     "ent": {
-      "address": "192.168.3.206:27002",
+      "address": "192.168.3.149:27102",
       "size": 5,
       "dbName": "mixdata",
       "userName": "jyDevGroup",
       "password": "jy@DevGroup"
     },
     "bidding": {
-      "address": "192.168.3.206:27002",
+      "address": "192.168.3.149:27102",
       "size": 5,
       "dbName": "qfw_data",
       "replSet": "",
@@ -32,7 +32,7 @@
   },
   "elasticsearch": {
     "main": {
-      "address": "http://192.168.3.149:9200",
+      "address": "http://192.168.3.149:9201,http://192.168.3.241:9206",
       "size": 30,
       "version": "v7",
       "userName": "",
@@ -41,7 +41,7 @@
       "esType": "bidding"
     },
     "other": {
-      "address": "http://192.168.3.149:9200",
+      "address": "http://192.168.3.149:9201,http://192.168.3.241:9206",
       "size": 30,
       "version": "v7",
       "userName": "",
@@ -50,7 +50,7 @@
       "esType": "bidding_year"
     },
     "free": {
-      "address": "http://192.168.3.149:9200",
+      "address": "http://192.168.3.149:9201,http://192.168.3.241:9206",
       "size": 30,
       "version": "v7",
       "userName": "",
@@ -59,7 +59,7 @@
       "esType": "bidding"
     },
     "doc": {
-      "address": "http://192.168.3.242:9200",
+      "address": "http://192.168.3.149:9201,http://192.168.3.241:9206",
       "size": 30,
       "version": "v7",
       "userName": "elastic",
@@ -87,7 +87,7 @@
     },
     "base": {
       "dBName": "base_service",
-      "address" : "192.168.3.14:4000",
+      "address" : "192.168.3.217:4000",
       "userName": "root",
       "passWord": "=PDT49#80Z!RVv52_z",
       "maxOpenConns": 5,

+ 4 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/ent_follow.css

@@ -148,6 +148,9 @@
 .ent-grouping .grouping-list {
   display: flex;
   flex-wrap: wrap;
+  max-height: 2.04rem;
+  overflow: hidden;
+  overflow-y: auto;
 }
 
 .ent-grouping .grouping-list .grouping-item {
@@ -173,7 +176,7 @@
   display: flex;
   justify-content: center;
   align-items: center;
-  margin-top: .04rem;
+  margin-top: .24rem;
   font-size: .28rem;
   line-height: .4rem;
   color: #2ABED1;

+ 12 - 0
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_follow.js

@@ -200,6 +200,14 @@ var vNode = {
           }
           console.log(this.selectGroupList)
           const lengthBool = this.selectGroupList.length > 0
+          if(!lengthBool) {
+            this.groupingList.forEach(s => {
+              s.active = false
+              if(s.name === '全部') {
+                s.active = true
+              }
+            })
+          }
 
           this.getEntFollowList({
             group: lengthBool ? this.selectGroupList.map(s => s.id).join(',') : ''
@@ -217,6 +225,10 @@ var vNode = {
             // 重新加载数据
             // 将 loading 设置为 true,表示处于加载状态
             this.listInfo.loading = true
+            // 将分组选择置为全部
+            this.groupingList.forEach(item => {
+              item.active = item.name === '全部' ? true : false
+            })
             // 请求数据
             this.getEntFollowList()
             

+ 51 - 5
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -404,6 +404,26 @@ var vNode = {
     updateGroupList () {
       this.getEntGroupList()
     },
+    // 查看监控动态
+    lookDynamic () {
+      this.scrollToTab('4')
+    },
+    // 获取企业分组列表, 当关注达到上限时,这个接口照样返回列表,而labelGroup接口不会返回,所有更改企业分组时选择这个接口显示列表
+    getEntGroupListData () {
+      var _this = this
+      $.ajax({
+        url: '/bigmember/follow/ent/labelGroupList',
+        type: 'POST',
+        success: function (res) {
+          if (res.error_code === 0) {
+            res.data.groupUseArr.forEach(function (item) {
+              item.name = item.s_name
+            })
+            _this.groupingList = res.data.groupUseArr || []
+          }
+        }
+      })
+    },
     // 获取企业分组列表
     getEntGroupList () {
       var _this = this
@@ -417,9 +437,10 @@ var vNode = {
           if (res.error_code === 0) {
             _this.groupingList = res.data || []
             _this.showGroupingDialog = true
-            if(!_this.entInfo.follow) {
-              _this.$refs.portrayalGrouping.setState(['默认分组'])
-            }
+            // 回显上次选择的分组
+            const selectList = _this.groupingList.filter(item => item.select)
+            _this.$refs.portrayalGrouping.setState(selectList)
+            
           } else {
             if(!res?.data?.status) {
                 // 监控达到上限
@@ -907,7 +928,7 @@ var vNode = {
     },
     changeGroupState: function (type) {
       console.log(type);
-      this.getEntGroupList() 
+      this.getEntGroupListData() 
       this.$nextTick(() => {
         this.setGroupState = type
         this.showGroupingDialog = true
@@ -993,7 +1014,7 @@ var vNode = {
                 confirmButtonColor: '#2ABED1',
                 showConfirmButton: true,
                 showCancelButton: true,
-                cancelButtonText: '返回',
+                cancelButtonText: '我再想想',
                 // cancelButtonColor: '#5F5E64'
               }).then(() =>{
                 if(utils.$envs.inWX){
@@ -1204,6 +1225,31 @@ var vNode = {
                 })
                 return
               }
+              if(!_this.powerInfo.isFree && !res.data.msg_open && res.data.status){
+                _this.$dialog({
+                  width: 303,
+                  className: 'monitor-dialog',
+                  title: '监控成功',
+                  message: '您可前往“工作台-商机-业主监控”查看业主最新招标动态。为保证您能及时获取新增监控信息推送,请前往开启推送提醒。',
+                  messageAlign:'center',
+                  confirmButtonText: '去开启',
+                  confirmButtonColor: '#2ABED1',
+                  showConfirmButton: true,
+                  showCancelButton: true,
+                  cancelButtonText: '暂不开启',
+                  // cancelButtonColor: '#5F5E64'
+                }).then(() =>{
+                  //  展开监控菜单 active:3
+                  window.location.href = location.origin + '/jy_mobile/push/pushsetting?active=4'
+                })
+        
+              } else if(!_this.powerInfo.isFree && res.data.msg_open && res.data.status){
+                _this.$toast({
+                  duration: 2000,
+                  message: '监控成功,您可前往“工作台-商机-业主监控”查看'
+                })
+        
+              }
             } else {
               return _this.showToast(res.error_msg || '监控失败')
             }

+ 1 - 0
src/jfw/modules/app/src/web/templates/big-member/page_ent_portrait.html

@@ -709,6 +709,7 @@
                   :monitor="!!entInfo.follow"
                   @lookmore="lookMore"
                   @change="changeGroupState"
+                  @lookdynamic="lookDynamic"
                   @monitorclick="changeFollowState"
                   :downshow="true"
                   :islogin="isLogin"

+ 3 - 3
src/jfw/modules/app/src/web/templates/followent/list.html

@@ -85,7 +85,7 @@
 				if(frontarr[f]["i_apppushunread"]==1){
 					redSpot = '<i class="redspot"></i>';
 				}
-				fronthtml +="<li data-id='"+frontarr[f]["fid"]+"' Sort='"+lastpushtime+"'>"
+				fronthtml +="<li data-id='"+frontarr[f]["fid"]+"' ent-id='"+frontarr[f]["s_entId"]+"' Sort='"+lastpushtime+"'>"
 	                +"<div class='jyfwlistno'>"+listno+".</div>"
 	                +"<div class='jyfwlisttitle'>"+entname+"</div>"
 	                +"<div style='clear:both;'></div>"+rem
@@ -118,7 +118,7 @@
 				if(lastarr[l]["i_apppushunread"]==1){
 					redSpot = '<i class="redspot"></i>';
 				}
-				lasthtml +="<li class='jyovertime' data-id='"+lastarr[l]["fid"]+"'>"
+				lasthtml +="<li class='jyovertime' data-id='"+lastarr[l]["fid"]+"' ent-id='"+lastarr[l]["s_entId"]+"'>"
 				+"<div class='jyfwlistno'>"+listno+".</div>"
 				+"<div class='jyfwlisttitle'>"+lastarr[l]["s_entname"]+"</div>"
 				+"<div style='clear:both;'></div>"+rem
@@ -135,7 +135,7 @@
 	            if(sessionStorage){
 	                sessionStorage.version="0";
 	            }
-	            window.location.href = "/jyapp/followent/detail/"+$(this).attr("data-id");
+	            window.location.href = "/jyapp/followent/detail/"+$(this).attr("data-id") + '?entId=' + $(this).attr("ent-id");
 	        });
 		});
 

+ 7 - 2
src/jfw/modules/app/src/web/templates/followent/set.html

@@ -129,10 +129,15 @@ if(sessionStorage){
 		$("#sure").click(function(){
 			easyPopup.hide();
 			//发送Ajax请求,取消关注
-      const eid = window.location.href.split("/")[6]
+      const fid = window.location.href.split("/")[6]
+      const url = new URL(window.location.href); // 获取当前页面的URL
+      const params = new URLSearchParams(url.search); // 获取查询字符串部分
+
+      // 获取单个参数
+      const eId = params.get('entId');
 			$.post(
 				"/bigmember/follow/ent/delFollow",
-				{"entId":eid},
+				{"entId":eId},
 				function(r){
 					if(r.data == "success"){
 						if(sessionStorage){

+ 2 - 2
src/jfw/modules/followent/src/web/templates/weixin/list.html

@@ -149,7 +149,7 @@ initShare({{.T.signature}},{{.T.openid}},2,"jy_extend",{{.T.nickname}},{{.T.avat
     				if(frontarr[f]["i_apppushunread"]==1){
     					redSpot = '<i class="redspot"></i>';
     				}
-            fronthtml +="<li data-id='"+frontarr[f]["fid"]+"' Sort='"+lastpushtime+"'>"
+            fronthtml +="<li data-id='"+frontarr[f]["fid"]+"' ent-id='"+frontarr[f]["s_entId"]+"' Sort='"+lastpushtime+"'>"
                 +"<div class='jyfwlistno'>"+listno+".</div>"
                 +"<div class='jyfwlisttitle'>"+entname+"</div>"
                 +"<div style='clear:both;'></div>"+rem
@@ -182,7 +182,7 @@ initShare({{.T.signature}},{{.T.openid}},2,"jy_extend",{{.T.nickname}},{{.T.avat
     					redSpot = '<i class="redspot"></i>';
     				}
             var listno = parseInt(l)+parseInt(1)+jyno;
-            lasthtml +="<li class='jyovertime' data-id='"+lastarr[l]["fid"]+"'>"
+            lasthtml +="<li class='jyovertime' data-id='"+lastarr[l]["fid"]+"' ent-id='"+lastarr[l]["s_entId"]+"'>"
             +"<div class='jyfwlistno'>"+listno+".</div>"
             +"<div class='jyfwlisttitle'>"+lastarr[l]["s_entname"]+"</div>"
             +"<div style='clear:both;'></div>"+rem

+ 7 - 2
src/jfw/modules/followent/src/web/templates/weixin/set.html

@@ -149,10 +149,15 @@ if(sessionStorage){
 		$("#sure").click(function(){
 			easyPopup.hide();
 			//发送Ajax请求,取消关注
-      const eid = window.location.href.split("/")[6]
+      const fid = window.location.href.split("/")[6]
+      const url = new URL(window.location.href); // 获取当前页面的URL
+      const params = new URLSearchParams(url.search); // 获取查询字符串部分
+
+      // 获取单个参数
+      const eId = params.get('entId');
 			$.post(
 				"/bigmember/follow/ent/delFollow",
-        {"fid":eid},
+        {"entId":eId},
 				function(r){
 					if(r.data == "success"){
 						if(sessionStorage){

+ 50 - 5
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -383,6 +383,26 @@ var vNode = {
     updateGroupList () {
       this.getEntGroupList()
     },
+    // 查看监控动态
+    lookDynamic () {
+      this.scrollToTab('4')
+    },
+    // 获取企业分组列表, 当关注达到上限时,这个接口照样返回列表,而labelGroup接口不会返回,所有更改企业分组时选择这个接口显示列表
+    getEntGroupListData () {
+      var _this = this
+      $.ajax({
+        url: '/bigmember/follow/ent/labelGroupList',
+        type: 'POST',
+        success: function (res) {
+          if (res.error_code === 0) {
+            res.data.groupUseArr.forEach(function (item) {
+              item.name = item.s_name
+            })
+            _this.groupingList = res.data.groupUseArr || []
+          }
+        }
+      })
+    },
     // 获取企业分组列表
     getEntGroupList () {
       var _this = this
@@ -396,9 +416,9 @@ var vNode = {
           if (res.error_code === 0) {
             _this.groupingList = res.data || []
             _this.showGroupingDialog = true
-            if(!_this.entInfo.follow) {
-              _this.$refs.portrayalGrouping.setState(['默认分组'])
-            }
+            // 回显上次选择的分组
+            const selectList = _this.groupingList.filter(item => item.select)
+            _this.$refs.portrayalGrouping.setState(selectList)
           } else {
             if(!res?.data?.status) {
               // 监控达到上限
@@ -866,7 +886,7 @@ var vNode = {
     },
     changeGroupState: function (type) {
       console.log(type);
-      this.getEntGroupList() 
+      this.getEntGroupListData() 
       this.$nextTick(() => {
         this.setGroupState = type
         this.showGroupingDialog = true
@@ -947,7 +967,7 @@ var vNode = {
                 confirmButtonColor: '#2ABED1',
                 showConfirmButton: true,
                 showCancelButton: true,
-                cancelButtonText: '返回',
+                cancelButtonText: '我再想想',
                 // cancelButtonColor: '#5F5E64'
               }).then(() =>{
                 if(utils.$envs.inWX){
@@ -1155,6 +1175,31 @@ var vNode = {
                 })
                 return
               }
+              if(!_this.powerInfo.isFree && !res.data.msg_open && res.data.status){
+                _this.$dialog({
+                  width: 303,
+                  className: 'monitor-dialog',
+                  title: '监控成功',
+                  message: '您可前往“工作台-商机-业主监控”查看业主最新招标动态。为保证您能及时获取新增监控信息推送,请前往开启推送提醒。',
+                  messageAlign:'center',
+                  confirmButtonText: '去开启',
+                  confirmButtonColor: '#2ABED1',
+                  showConfirmButton: true,
+                  showCancelButton: true,
+                  cancelButtonText: '暂不开启',
+                  // cancelButtonColor: '#5F5E64'
+                }).then(() =>{
+                  //  展开监控菜单 active:3
+                  window.location.href = location.origin + '/jy_mobile/push/pushsetting?active=4'
+                })
+        
+              } else if(!_this.powerInfo.isFree && res.data.msg_open && res.data.status){
+                _this.$toast({
+                  duration: 2000,
+                  message: '监控成功,您可前往“工作台-商机-业主监控”查看'
+                })
+        
+              }
             } else {
               return _this.showToast(res.error_msg || '监控失败')
             }

+ 30 - 19
src/web/staticres/common-module/mobile-portrayal-footer/js/mobile-portrayal-footer.js

@@ -179,21 +179,25 @@ var mobilePortrayalFooter = {
         name_list:[decodeURIComponent(utils.getParam('entName'))]
       }
       if(this_.monitor){ // 已监控
-        if (this.customMonitor) {
-          this.$emit('monitorclick', true)
+        if (this_.customMonitor) {
+          this_.$emit('monitorclick', true)
         } else {
-          $.ajax({
-            type: 'POST',
-            url: '/publicapply/customer/check',
-            contentType: 'application/json',
-            data: JSON.stringify(params),
-            success: function(res) {
-              this_.yes_monitor(res.data) // 弹出取消监控弹窗
-            }
-          })
+          if(this_.portraitOrigin === 'ent'){
+            this_.yes_monitor(this_.entInfo)
+          } else {
+            $.ajax({
+              type: 'POST',
+              url: '/publicapply/customer/check',
+              contentType: 'application/json',
+              data: JSON.stringify(params),
+              success: function(res) {
+                this_.yes_monitor(res.data) // 弹出取消监控弹窗
+              }
+            })
+          }
         }
       } else{ //未监控 去监控
-        this.$emit('monitorclick')
+        this_.$emit('monitorclick')
       }
     },300),
     monitorCancellation (){ // 取消监控
@@ -201,7 +205,7 @@ var mobilePortrayalFooter = {
         width: 303,
         className: 'monitor-dialog',
         title: '确定不再监控?',
-        message: '取消监控,将错过业主最新动态推送',
+        message: `取消监控,将错过${this.setMonitorObj}最新动态推送`,
         messageAlign:'center',
         confirmButtonText: '确认取消',
         // confirmButtonColor: '#2ABED1',
@@ -218,9 +222,12 @@ var mobilePortrayalFooter = {
       this.$emit('claimclick')
     },
     lookDynamic (){
-      try{
-        this.$parent.$refs.scrollspyTabs.scrollTo('2'); //触发引用此组件父级tab 滚动至招标动态
-      }catch(e){
+      this.$emit('lookdynamic')
+      if(!this.portraitOrigin){
+        try{
+          this.$parent.$refs.scrollspyTabs.scrollTo('2'); //触发引用此组件父级tab 滚动至招标动态
+        }catch(e){
+        }
       }
     },
     //  采购单位监控点击相关
@@ -230,7 +237,11 @@ var mobilePortrayalFooter = {
         if(utils.$envs.inWX){
           window.location.href = '/jylab/followent/entList'
         } else {
-          window.location.href = '/jyapp/big/page/ent_follow'
+          if(this.allpower.memberStatus > 0) {
+            window.location.href = '/jyapp/big/page/ent_follow'
+          } else {
+            window.location.href = '/jyapp/followent/entList'
+          }
         }
       } else {
         // 非企业画像跳转至对应的监控列表页
@@ -283,8 +294,8 @@ var mobilePortrayalFooter = {
     },
     yes_monitor (data, isInit){
       if(this.portraitOrigin === 'ent'){
-        this.surplus = this.entInfo.info.surplus
-        this.use = this.entInfo.info.used
+        this.surplus = data.info.surplus
+        this.use = data.info.used
       } else {
         this.surplus = data.count.surplus
         this.use = data.count.use