|
@@ -8,6 +8,12 @@
|
|
|
<span :class="{ icon_heart_red: follow.followed, icon_heart_gray: !follow.followed }"></span>
|
|
|
<span class="follow-text">{{ follow.followed ? '已关注' : '关注' }}</span>
|
|
|
</div>
|
|
|
+ <div style="margin-left:10px;" v-if="isNewEnt.isNew">
|
|
|
+ <div class="u-follow" @click="setClaimed">
|
|
|
+ <span :class="{ 'el-icon-jy-renling-active': claim.claimed, 'el-icon-jy-renling-01': !claim.claimed }"></span>
|
|
|
+ <span class="follow-text">{{ claim.claimed ? '取消认领' : '认领客户' }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="u-type">
|
|
|
<div class="u-t-item">
|
|
@@ -20,6 +26,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- 认领添加标签 -->
|
|
|
+ <v-popper ref="popperRef" @getClientList="getClaimStatus"></v-popper>
|
|
|
<!-- 超级订阅用户、免费用户显示 -->
|
|
|
<div>
|
|
|
<div class="free-bg" v-if="userInfo.isFree && userInfo.freeBuyerPort === 0">
|
|
@@ -133,6 +141,7 @@ import ContactList from '@/components/contact-info/ContactInfo'
|
|
|
import MaskCard from '@/components/mask-card/MaskCard.vue'
|
|
|
import CollectInfo from '@/components/collect-info/CollectInfo.vue'
|
|
|
import Empty from '@/components/common/Empty'
|
|
|
+import vPopper from '@/components/common/Popper.vue'
|
|
|
import { Button, Dialog } from 'element-ui'
|
|
|
import {
|
|
|
getBuyerSelect,
|
|
@@ -140,7 +149,8 @@ import {
|
|
|
getUsage,
|
|
|
getVipBuyerSelect,
|
|
|
setLogs,
|
|
|
- setStatusCustomer
|
|
|
+ setStatusCustomer,
|
|
|
+ claimchecked
|
|
|
} from '@/api/modules'
|
|
|
import { mapState } from 'vuex'
|
|
|
|
|
@@ -163,13 +173,18 @@ export default {
|
|
|
DynamicList,
|
|
|
[Dialog.name]: Dialog,
|
|
|
[Button.name]: Button,
|
|
|
- Empty
|
|
|
+ Empty,
|
|
|
+ vPopper
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
isDialogShow: false,
|
|
|
loading: true,
|
|
|
buyerTipDialog: false,
|
|
|
+ claim: {
|
|
|
+ claimed: false,
|
|
|
+ loading: false
|
|
|
+ },
|
|
|
dynamicKey: new Date().getTime(),//筛选重新渲染动态数据
|
|
|
info: {
|
|
|
buyerName: '',
|
|
@@ -300,6 +315,7 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState({
|
|
|
+ isNewEnt: state => state.user.isNewEnt,
|
|
|
userInfo: state => state.user.info
|
|
|
}),
|
|
|
conf7 () {
|
|
@@ -436,12 +452,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
+ this.info.buyerName = decodeURIComponent(this.$route.params.entName)
|
|
|
this.$store.dispatch('user/getUserPower')
|
|
|
},
|
|
|
mounted () {
|
|
|
- this.info.buyerName = decodeURIComponent(this.$route.params.entName)
|
|
|
- // this.getBigUpgradeMap()
|
|
|
this.getFollowState()
|
|
|
+ // this.getBigUpgradeMap()
|
|
|
var _this = this
|
|
|
$.ajax({
|
|
|
url: '/publicapply/bidcoll/power',
|
|
@@ -486,6 +502,66 @@ export default {
|
|
|
window.removeEventListener('scroll', this.watchScroll)
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 认领状态、是否认领
|
|
|
+ getClaimStatus () {
|
|
|
+ claimchecked({
|
|
|
+ names: this.info.buyerName
|
|
|
+ }).then(res => {
|
|
|
+ if (res.error_code === 0 && res.data) {
|
|
|
+ this.claim.claimed = res.data.iscoll
|
|
|
+ this.info.id = res.data.names[0] ? res.data.names[0].split(',')[1] : ''
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 认领-取消认领
|
|
|
+ setClaimed (e) {
|
|
|
+ const top = e.target.offsetTop + 22
|
|
|
+ if (this.claim.claimed) {
|
|
|
+ this.ajaxForCollectChange(this.info.id, (res) => {
|
|
|
+ if (res.data) {
|
|
|
+ this.$toast('已取消认领!')
|
|
|
+ this.getClaimStatus()
|
|
|
+ } else {
|
|
|
+ if (res.error_msg) {
|
|
|
+ this.$toast(res.error_msg)
|
|
|
+ } else {
|
|
|
+ this.$toast('取消认领失败!')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$refs.popperRef.tagsRenShow({
|
|
|
+ liHeight: 80,
|
|
|
+ show: true,
|
|
|
+ data: this.info.buyerName,
|
|
|
+ i: 0
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ajaxForCollectChange (ids, callback) {
|
|
|
+ function collBidAction (ids, callback) {
|
|
|
+ const _this = this
|
|
|
+ var params = {
|
|
|
+ name: ids,
|
|
|
+ mold: 1,
|
|
|
+ D: true,
|
|
|
+ label: ''
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ contentType: 'application/json',
|
|
|
+ url: '/entnicheNew/customer/attention',
|
|
|
+ data: JSON.stringify(params),
|
|
|
+ dataType: 'json',
|
|
|
+ success: function (r) {
|
|
|
+ if (r) {
|
|
|
+ callback && callback(r)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return collBidAction(ids, callback)
|
|
|
+ },
|
|
|
// 页面滚动方法
|
|
|
watchScroll () {
|
|
|
const scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
|
|
@@ -612,6 +688,7 @@ export default {
|
|
|
this.follow.followed = res.data
|
|
|
}
|
|
|
})
|
|
|
+ this.getClaimStatus()
|
|
|
},
|
|
|
setFollow () {
|
|
|
if (this.follow.loading) return
|
|
@@ -665,6 +742,8 @@ export default {
|
|
|
/* eslint-enable */
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+@include diy-icon('renling-01', 20, 20);
|
|
|
+@include diy-icon('renling-active', 20, 20);
|
|
|
::v-deep {
|
|
|
.release_main {
|
|
|
position: relative;
|
|
@@ -695,7 +774,9 @@ export default {
|
|
|
background: url('~@/assets/images/icon/icon-favorite.png') no-repeat;
|
|
|
background-size: contain;
|
|
|
}
|
|
|
-
|
|
|
+.unit-portrayal-content {
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
.unit-portrayal {
|
|
|
.empty-container.mtb60 {
|
|
|
background: #fff;
|