|
@@ -104,14 +104,12 @@ var vNode = {
|
|
|
svip: false, // 判断是否是超级订阅的企业画像
|
|
|
digshow: false, // 判断是否是超级订阅会员
|
|
|
overlayShow: true, // 弹窗遮罩是否显示
|
|
|
- isfree: false, // 是否是免费用户
|
|
|
isVip: false, // 只是超级订阅
|
|
|
bidcollPowerInfo: {
|
|
|
vip: 0,
|
|
|
text: '开通',
|
|
|
btntext: '去开通'
|
|
|
- }, // 判断是否是超级订阅升级版
|
|
|
- rootPower: {}
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created: function () {
|
|
@@ -174,30 +172,19 @@ var vNode = {
|
|
|
console.log('获取企业中标动态...')
|
|
|
}
|
|
|
_this.gotTab2 = true
|
|
|
- if(_this.conf._4 || _this.conf._13) {
|
|
|
- _this.digshow = false
|
|
|
- } else {
|
|
|
- _this.digshow = true
|
|
|
- }
|
|
|
- if(_this.rootPower.entniche) {
|
|
|
- if(!_this.rootPower.member && _this.rootPower.vip <= 0) {
|
|
|
- _this.getEntPortrait(function () {
|
|
|
- _this.initChartsData()
|
|
|
- })
|
|
|
- _this.gotTab2 = true
|
|
|
- _this.digshow = true
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
|
+ // 3个权限有1个就为true(取反为3个权限1个都没有)
|
|
|
+ hasOnePower: function () {
|
|
|
+ return this.conf._4 || this.conf._12 || this.conf._13
|
|
|
+ },
|
|
|
setShow: function() {
|
|
|
- if(this.digshow&&this.tabActiveName=='2') {
|
|
|
- return true
|
|
|
- }
|
|
|
+ // 必须在tab2,并且三个权限都没有,就用显示
|
|
|
+ return this.tabActiveName == '2' && !this.hasOnePower
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -222,7 +209,6 @@ var vNode = {
|
|
|
if (e === 'cancel') {
|
|
|
this.tabActiveName = '1'
|
|
|
done(false)
|
|
|
- this.digshow = true
|
|
|
this.overlayShow = true
|
|
|
} else if (e === 'confirm') {
|
|
|
// 去开通
|
|
@@ -434,76 +420,48 @@ var vNode = {
|
|
|
if (res.data) {
|
|
|
_this.powerInfo = res.data
|
|
|
}
|
|
|
- if (res.data && $.isArray(res.data.power) && res.data.memberStatus > 0) {
|
|
|
+ if (res.data && $.isArray(res.data.power)) {
|
|
|
// 显示完整企业画像(不完整的企业画像只有中标动态)
|
|
|
// _this.conf.showPortraitAll = true
|
|
|
// 根据power判断权限,企业画像包含权限(4,12,13)
|
|
|
var power = res.data.power
|
|
|
- if (power.indexOf(4) != -1 || _this.svip || res.data.viper) {
|
|
|
+ if (res.data.viper) {
|
|
|
+ _this.isVip = true
|
|
|
+ }
|
|
|
+ if (power.indexOf(4) != -1 || res.data.viper) {
|
|
|
// 获取企业画像信息-4
|
|
|
_this.conf._4 = true
|
|
|
}
|
|
|
if (power.indexOf(13) != -1 || res.data.viper) {
|
|
|
// 获取企业中标动态-13
|
|
|
_this.conf._13 = true
|
|
|
- } else {
|
|
|
- _this.digshow = true
|
|
|
- _this.entInfo.followSearchFinish = true
|
|
|
- _this.entInfo.entExist = false
|
|
|
}
|
|
|
if (power.indexOf(12) != -1) {
|
|
|
// 获取企业情报历史记录-12
|
|
|
_this.conf._12 = true
|
|
|
- } else {
|
|
|
- _this.conf._12 = false
|
|
|
}
|
|
|
- if (_this.conf._4 || _this.conf._13) {
|
|
|
- _this.digshow = false
|
|
|
+ // follow的权限:4.12.13只要有一个就可以
|
|
|
+ if (res.data.memberStatus > 0 && (power.indexOf(4) != -1||power.indexOf(12) != -1||power.indexOf(13) != -1)) {
|
|
|
+ _this.getEntFollowState()
|
|
|
} else {
|
|
|
- // 如果不是超级订阅会员,点击中标信息显示提示弹窗
|
|
|
- if (!res.data.viper) {
|
|
|
- _this.digshow = true
|
|
|
- } else {
|
|
|
- _this.digshow = false
|
|
|
- }
|
|
|
+ _this.entInfo.followSearchFinish = true
|
|
|
+ _this.entInfo.entExist = false
|
|
|
}
|
|
|
_this.singleTab = false
|
|
|
}
|
|
|
- // 如果不是大会员。判断是否是超级订阅会员,不是显示弹窗
|
|
|
- if (res.data.memberStatus <= 0 || !(_this.conf._4 || _this.conf._13)) {
|
|
|
- _this.singleTab = false
|
|
|
- if(res.data.vipStatus>0) {
|
|
|
- if (!res.data.viper) {
|
|
|
- _this.digshow = true
|
|
|
- _this.bidcollPowerInfo.text = '升级'
|
|
|
- _this.bidcollPowerInfo.btntext = '去升级'
|
|
|
- _this.bidcollPowerInfo.vip = 1
|
|
|
- } else {
|
|
|
- _this.isVip = true
|
|
|
- _this.conf._4 = true
|
|
|
- _this.digshow = false
|
|
|
- }
|
|
|
- } else {
|
|
|
- _this.digshow = true
|
|
|
+
|
|
|
+ if (res.data.vipStatus > 0) {
|
|
|
+ if (!res.data.viper) {
|
|
|
+ _this.bidcollPowerInfo.text = '升级'
|
|
|
+ _this.bidcollPowerInfo.btntext = '去升级'
|
|
|
+ _this.bidcollPowerInfo.vip = 1
|
|
|
}
|
|
|
- _this.entInfo.followSearchFinish = true
|
|
|
- _this.entInfo.entExist = false
|
|
|
- }
|
|
|
- if (_this.svip || res.data.viper) {
|
|
|
- _this.entInfo.followSearchFinish = true
|
|
|
- _this.entInfo.entExist = false
|
|
|
- }
|
|
|
- if(res.data.memberStatus > 0&&(power.indexOf(4) != -1||power.indexOf(12) != -1||power.indexOf(13) != -1)) {
|
|
|
- _this.entInfo.followSearchFinish = false
|
|
|
- _this.entInfo.entExist = true
|
|
|
- _this.getEntFollowState()
|
|
|
}
|
|
|
} else {
|
|
|
_this.$toast(res.error_msg)
|
|
|
}
|
|
|
},
|
|
|
complete: function () {
|
|
|
- _this.getUserRoot()
|
|
|
if (_this.loading) {
|
|
|
_this.loading.clear()
|
|
|
}
|
|
@@ -513,32 +471,6 @@ var vNode = {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 判断是否是免费用户
|
|
|
- getUserRoot: function() {
|
|
|
- let _this = this
|
|
|
- $.ajax({
|
|
|
- url: '/publicapply/bidcoll/power',
|
|
|
- type: 'POST',
|
|
|
- success: function(res) {
|
|
|
- _this.rootPower = res.data
|
|
|
- // 如果不是超级订阅会员,获取免费用户关键词
|
|
|
- if(res.data.member || res.data.entniche || res.data.vip > 0) {
|
|
|
- _this.isfree = false
|
|
|
- } else {
|
|
|
- _this.singleTab = false
|
|
|
- _this.digshow = true
|
|
|
- _this.isfree = true
|
|
|
- }
|
|
|
- // 如果只是商机管理用户,不能看企业画像中标信息
|
|
|
- if(res.data.entniche) {
|
|
|
- if(!res.data.member && res.data.vip <= 0) {
|
|
|
- _this.singleTab = false
|
|
|
- _this.digshow = true
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 修改企业关注状态
|
|
|
changeFollowStateRequest: function () {
|
|
|
var _this = this
|