소스 검색

Merge branch 'main' into feature/v1.0.45

lianbingjie 1 년 전
부모
커밋
db5415cda6

+ 24 - 2
apps/bigmember_pc/src/views/article-content/components/ContentBIActions.vue

@@ -98,11 +98,14 @@ export default {
       dialogVisible: false,
       IframeSrc: '',
       getEntData: {},
-      showPropertyDialog: false
+      showPropertyDialog: false,
+      haspowers: {}, // 判断客户类型
+      inBITopNet: '' // 判断是否是拓普
     }
   },
   created() {
     this.getEntInfo()
+    this.getHasPowers()
     this.getParams()
   },
   props: {
@@ -118,6 +121,10 @@ export default {
   },
   computed: {
     getList() {
+      // 拓普不显示任何按钮
+      if (this.inBITopNet) {
+        return []
+      }
       if (this.list[0].active === 0 && this.property !== 'BIProperty') {
         return this.list.slice(0, 1)
       } else if (this.property === 'BIProperty') {
@@ -127,7 +134,12 @@ export default {
         })
         return this.list
       } else {
-        return this.list
+        // 如果是营销通用版且无bi_yx_topnet,则只显示收录,有bi_yx_topnet,显示全部
+        if (this.haspowers.bi_yx_topnet) {
+          return this.list
+        } else {
+          return this.list.slice(0, 1)
+        }
       }
     }
   },
@@ -206,6 +218,7 @@ export default {
       const urlParams = new URLSearchParams(window.location.search)
       this.pageType = urlParams.get('resource')
       this.property = urlParams.get('property')
+      this.inBITopNet = urlParams.get('crm_type')
       this.fromJhfp = urlParams.get('from')
       if (this.pageType === 'BI' || this.property === 'BIProperty') {
         $('.com-tagsbar').hide()
@@ -314,6 +327,15 @@ export default {
           break
       }
     },
+    // 判断大客,大客还显示创建按钮, 营销通用版和非大客只显示收录按钮 P560版本调整
+    getHasPowers() {
+      const url = '/jyapi/resourceCenter/haspowers'
+      this.ajaxComponent(url).then((res) => {
+        if (res.error_code === 0) {
+          this.haspowers = res.data
+        }
+      })
+    },
     // 判断是否能创建
     isCanAdd(type) {
       const url = '/jyapi/crmApplication/info/canAdd'

+ 2 - 1
apps/bigmember_pc/src/views/search/bidding/index.vue

@@ -27,6 +27,7 @@ const {
   isInApp,
   inBIPropertyIframe,
   inResourceBIIframe,
+  inBITopNet,
   inInjectBI,
   isInBI,
   isVip,
@@ -162,7 +163,7 @@ const articleRef = ref({
               </template>
               <template #right-handle-container>
                 <div
-                  v-if="inBIPropertyIframe || inResourceBIIframe"
+                  v-if="(inBIPropertyIframe || inResourceBIIframe) && !inBITopNet"
                   class="bi-employ-bid"
                   @click.prevent.stop="onSingleEmploy(item)"
                 >

+ 17 - 3
apps/bigmember_pc/src/views/search/bidding/model/base.js

@@ -94,6 +94,9 @@ export default function () {
   // 营销BI嵌套
   const inResourceBIIframe = useRoute().query.resource === 'BI'
 
+  // 是否是拓普权限
+  const inBITopNet = useRoute().query.crm_type
+
   // 是否山川应用嵌入环境 添加操作按钮 (个人年终报告嵌套)
   const inInjectBI = useRoute().query.report === 'bi' || (location.href.indexOf('/jylab/bi/index') !== -1)
 
@@ -490,10 +493,20 @@ export default function () {
       aHref+= '?kds=' + encodeURIComponent(inputKeywordsState.value.input)
     }
     if (getParam('resource') === 'BI') {
-      if(getParam('property') === 'BIProperty') {
-        aHref += aHref.indexOf('?') > -1 ? '&resource=BI&property=BIProperty' : '?resource=BI&property=BIProperty'
+      if (getParam('property') === 'BIProperty') {
+        aHref +=
+          aHref.indexOf('?') > -1
+            ? '&resource=BI&property=BIProperty'
+            : '?resource=BI&property=BIProperty'
       } else {
-        aHref += aHref.indexOf('?') > -1 ? '&resource=BI' : '?resource=BI'
+        if (inBITopNet) {
+          aHref +=
+            aHref.indexOf('?') > -1
+              ? '&resource=BI&crm_type=1'
+              : '?resource=BI&crm_type=1'
+        } else {
+          aHref += aHref.indexOf('?') > -1 ? '&resource=BI' : '?resource=BI'
+        }
       }
     }
 
@@ -1455,6 +1468,7 @@ export default function () {
     isInWeb,
     inResourceBIIframe,
     inBIPropertyIframe,
+    inBITopNet,
     inInjectBI,
     isInBI,
     isFree,