|
@@ -9,10 +9,18 @@
|
|
|
<span class="el-icon-jy-share"></span>
|
|
|
<span class="follow-text">转给同事</span>
|
|
|
</div>
|
|
|
- <div class="u-follow" @click="setFollow" v-show="bigmember || isNewEnt.isNew">
|
|
|
- <span :class="{ icon_heart_red: follow.followed, icon_heart_gray: !follow.followed }"></span>
|
|
|
- <span class="follow-text">{{ follow.followed ? '已关注' : '关注' }}</span>
|
|
|
- </div>
|
|
|
+ <el-popover
|
|
|
+ popper-class="monitor-popover"
|
|
|
+ placement="bottom"
|
|
|
+ width="224"
|
|
|
+ trigger="hover"
|
|
|
+ >
|
|
|
+ <div slot="reference" class="u-follow" @click="setFollow">
|
|
|
+ <span class="iconfont" :class="{ 'icon-yijiankong': follow.followed, 'icon-jiankong': !follow.followed }"></span>
|
|
|
+ <span class="follow-text">{{ follow.followed ? '已监控' : '监控' }}</span>
|
|
|
+ </div>
|
|
|
+ <monitor-com @showNeedSubmit="showNeedSubmit" @show="monitorInfo.showD4 = true" :already-num="monitorInfo.alreadyNum" :remain-num="monitorInfo.remainNum" @monitorCancel="monitorCancel" @monitorStatus="monitorStatus" :show-list="monitorInfo.showList"></monitor-com>
|
|
|
+ </el-popover>
|
|
|
<div style="margin-left:10px;" v-if="isNewEnt.isNew || isEntService">
|
|
|
<div class="u-follow" @click="setClaimed">
|
|
|
<span
|
|
@@ -200,6 +208,34 @@
|
|
|
<el-dialog class="unit-dialog-group" title="联系客服" :visible.sync="isDialogShow">
|
|
|
<div class="unit-dialog-content">如有疑问,请联系客服:400-108-6670</div>
|
|
|
</el-dialog>
|
|
|
+ <common-dialog center custom-class="monitor-class" width="380px" :visible="monitorInfo.showD1" title="监控成功">
|
|
|
+ <template #footer>
|
|
|
+ <button class="action-button confirm" @click="setMonitorConfirm('1')">去开启</button>
|
|
|
+ <button class="action-button cancel" @click="setMonitorCancel('1')">暂不开启</button>
|
|
|
+ </template>
|
|
|
+ 您可前往“工作台-商机-业主监控”查看业主最新招标动态。为保证您能及时获取新增监控信息推送,请前往开启推送提醒。
|
|
|
+ </common-dialog>
|
|
|
+ <common-dialog center custom-class="monitor-class" width="380px" :visible="monitorInfo.showD2" title="确定不再监控?">
|
|
|
+ <template #footer>
|
|
|
+ <button class="action-button confirm" @click="setMonitorConfirm('2')">我再想想</button>
|
|
|
+ <button class="action-button cancel" @click="setMonitorCancel('2')">确认取消</button>
|
|
|
+ </template>
|
|
|
+ 取消监控,将错过业主最新动态推送
|
|
|
+ </common-dialog>
|
|
|
+ <common-dialog center custom-class="monitor-class" width="380px" :visible="monitorInfo.showD3" title="监控业主个数已达上限">
|
|
|
+ <template #footer>
|
|
|
+ <button class="action-button confirm" @click="setMonitorConfirm('3')">联系客服</button>
|
|
|
+ <button class="action-button cancel" @click="setMonitorCancel('3')">返回</button>
|
|
|
+ </template>
|
|
|
+ 您最多可监控{{monitorInfo.remainNum + monitorInfo.alreadyNum}}个业主,可联系客服,申请监控更多业主
|
|
|
+ </common-dialog>
|
|
|
+ <common-dialog center custom-class="monitor-class" width="380px" :visible="monitorInfo.showD4" title="申请监控更多业主">
|
|
|
+ <template #footer>
|
|
|
+ <button class="action-button confirm" @click="setMonitorConfirm('4')">联系客服</button>
|
|
|
+ <button class="action-button cancel" @click="setMonitorCancel('4')">返回</button>
|
|
|
+ </template>
|
|
|
+ 您可联系客服,申请升级产品套餐,监控更多业主
|
|
|
+ </common-dialog>
|
|
|
<CollectInfo ref="collectRef"></CollectInfo>
|
|
|
<!-- 分享弹窗 -->
|
|
|
<shareBox ref="shareBox"></shareBox>
|
|
@@ -211,6 +247,7 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import Layout from '@/components/common/ContentLayout'
|
|
|
+import commonDialog from '@/components/dialog/Dialog.vue'
|
|
|
import UnitChart from './components/UnitChart'
|
|
|
import DynamicList from './components/DynamicList'
|
|
|
import BidInfoActive from './components/BidInfoActive'
|
|
@@ -223,7 +260,9 @@ import vPopper from '@/components/common/Popper.vue'
|
|
|
import shareBox from '@/components/shareBox/index.vue'
|
|
|
import AsideNewscards from './components/AsideNewscards.vue'
|
|
|
import WorkspaceButtonGroup from '@/components/dialog/WorkspaceButtonGroup.vue'
|
|
|
-import { Button, Dialog } from 'element-ui'
|
|
|
+import monitorCom from '@/components/common/Monitor.vue'
|
|
|
+import { Button, Dialog, Popover } from 'element-ui'
|
|
|
+import { openSelfLink } from '@/utils/'
|
|
|
import {
|
|
|
getBuyerSelect,
|
|
|
getStatusCustomer,
|
|
@@ -257,10 +296,13 @@ export default {
|
|
|
WorkspaceButtonGroup,
|
|
|
[Dialog.name]: Dialog,
|
|
|
[Button.name]: Button,
|
|
|
+ [Popover.name]: Popover,
|
|
|
Empty,
|
|
|
vPopper,
|
|
|
shareBox,
|
|
|
- crmAction
|
|
|
+ crmAction,
|
|
|
+ monitorCom,
|
|
|
+ commonDialog
|
|
|
},
|
|
|
props: {
|
|
|
_buyerName: {
|
|
@@ -469,10 +511,26 @@ export default {
|
|
|
buyerList: [],
|
|
|
entInfoData: {},
|
|
|
scrollEcho: true,
|
|
|
- timer_: null
|
|
|
+ timer_: null,
|
|
|
+ monitorInfo: {
|
|
|
+ showList: [],
|
|
|
+ remainNum: 0,
|
|
|
+ alreadyNum: 0,
|
|
|
+ showD1: false,
|
|
|
+ showD2: false,
|
|
|
+ showD3: false,
|
|
|
+ showD4: false
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
+ loading (newval) {
|
|
|
+ if(!newval) {
|
|
|
+ if(this.getActive) {
|
|
|
+ this.handleClick(this.getActive)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
chartShowArr(newval) {
|
|
|
if (newval.indexOf(true) !== -1) {
|
|
|
this.emptyShow = false
|
|
@@ -503,6 +561,11 @@ export default {
|
|
|
this.getSelect()
|
|
|
// this.getClaimStatus()
|
|
|
}
|
|
|
+ },
|
|
|
+ 'follow.followed': {
|
|
|
+ handler(newVal) {
|
|
|
+ this.setMonitorInfo()
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -678,6 +741,9 @@ export default {
|
|
|
employType: 3,
|
|
|
idArr: this.info.buyerName,
|
|
|
}
|
|
|
+ },
|
|
|
+ getActive () {
|
|
|
+ return this.$route.query.active
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -761,6 +827,75 @@ export default {
|
|
|
window.removeEventListener('scroll', this.watchScroll)
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 查看监控状态
|
|
|
+ monitorStatus () {
|
|
|
+ this.handleClick('2')
|
|
|
+ },
|
|
|
+ setMonitorConfirm (data) {
|
|
|
+ switch (data) {
|
|
|
+ case "1":
|
|
|
+ window.open('/page_workDesktop/work-bench/app/big/push_setting')
|
|
|
+ const urls = this.$router.resolve({
|
|
|
+ path: '/push_setting'
|
|
|
+ })
|
|
|
+ this.monitorInfo.showD1 = false
|
|
|
+ openSelfLink(urls)
|
|
|
+ this.monitorInfo.showD1 = false
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ this.monitorInfo.showD2 = false
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ this.contactCustomer(this)
|
|
|
+ this.monitorInfo.showD3 = false
|
|
|
+ break;
|
|
|
+ case "4":
|
|
|
+ this.contactCustomer(this)
|
|
|
+ this.monitorInfo.showD4 = false
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 显示留资
|
|
|
+ showNeedSubmit () {
|
|
|
+ this.$refs.collectRef.noCallApiFn('pc_buyer_monitor_more', true)
|
|
|
+ },
|
|
|
+ // 取消监控
|
|
|
+ monitorCancel () {
|
|
|
+ this.monitorInfo.showD2 = true
|
|
|
+ },
|
|
|
+ setMonitorCancel (data) {
|
|
|
+ switch (data) {
|
|
|
+ case "1":
|
|
|
+ this.monitorInfo.showD1 = false
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ this.setFollow('cancel')
|
|
|
+ this.monitorInfo.showD2 = false
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ this.monitorInfo.showD3 = false
|
|
|
+ break;
|
|
|
+ case "4":
|
|
|
+ this.monitorInfo.showD4 = false
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ setMonitorInfo () {
|
|
|
+ if(this.userInfo.isFree) {
|
|
|
+ this.monitorInfo.showList = [1]
|
|
|
+ } else {
|
|
|
+ if (this.follow.followed) {
|
|
|
+ this.monitorInfo.showList = [2, 3, 4]
|
|
|
+ } else {
|
|
|
+ this.monitorInfo.showList = [1, 3]
|
|
|
+ }
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+ },
|
|
|
handleClick(index) {
|
|
|
if (this.timer_) {
|
|
|
clearTimeout(this.timer_)
|
|
@@ -1046,15 +1181,27 @@ export default {
|
|
|
getFollowState() {
|
|
|
if (!this.info.buyerName) return
|
|
|
// 查询当前企业是否在 关注的客户 列表中
|
|
|
- getStatusCustomer({ name: this.info.buyerName }).then(res => {
|
|
|
- if (res && res.error_code === 0 && res.data) {
|
|
|
- this.follow.followed = res.data
|
|
|
+ getStatusCustomer({ name_list: [this.info.buyerName] }).then(res => {
|
|
|
+ if (res && res.error_code === 0) {
|
|
|
+ if(JSON.stringify(res.data.follow) !== '{}') {
|
|
|
+ this.follow.followed = true
|
|
|
+ } else {
|
|
|
+ this.follow.followed = false
|
|
|
+ }
|
|
|
+ this.monitorInfo.alreadyNum = res?.data.count?.use
|
|
|
+ this.monitorInfo.remainNum = res?.data.count?.surplus
|
|
|
+ this.setMonitorInfo()
|
|
|
}
|
|
|
})
|
|
|
this.getClaimStatus()
|
|
|
},
|
|
|
- setFollow() {
|
|
|
+ setFollow(str) {
|
|
|
+ if (this.userInfo.isFree) {
|
|
|
+ this.$refs.collectRef.noCallApiFn('pc_buyer_monitor_freeuser', true)
|
|
|
+ return
|
|
|
+ }
|
|
|
if (this.follow.loading) return
|
|
|
+ if (str !== 'cancel' && this.follow.followed) return
|
|
|
const data = {
|
|
|
name: this.info.buyerName,
|
|
|
province: this.info.province,
|
|
@@ -1064,21 +1211,39 @@ export default {
|
|
|
this.follow.loading = true
|
|
|
// 潜在客户挖掘/我的客户-关注
|
|
|
setStatusCustomer(data).then(res => {
|
|
|
- if (res && res.error_code === 0 && res.data) {
|
|
|
- if (this.follow.followed) {
|
|
|
- // 取消关注操作返回
|
|
|
- this.$toast('取消关注成功')
|
|
|
- this.follow.followed = false
|
|
|
+ if (res && res.error_code === 0) {
|
|
|
+ if(res.data.status) {
|
|
|
+ if (this.follow.followed) {
|
|
|
+ // 取消监控操作返回
|
|
|
+ this.$toast('取消监控成功')
|
|
|
+ this.monitorInfo.showD1 = false
|
|
|
+ this.follow.followed = false
|
|
|
+ } else {
|
|
|
+ // 监控操作
|
|
|
+ // 没有打开推送设置显示去开启弹窗
|
|
|
+ if(!res.data.msg_open) {
|
|
|
+ this.monitorInfo.showD1 = true
|
|
|
+ } else {
|
|
|
+ this.$toast('监控成功,您可前往“工作台-商机-业主监控”查看')
|
|
|
+ }
|
|
|
+ this.follow.followed = true
|
|
|
+ }
|
|
|
} else {
|
|
|
- // 关注操作返回
|
|
|
- this.follow.followed = true
|
|
|
- this.$toast('关注成功,请前往“客户监控”中查看')
|
|
|
+ if(res.data.limit_status === 1) {
|
|
|
+ // 超级订阅用户打开留资弹窗
|
|
|
+ this.$refs.collectRef.noCallApiFn('pc_buyer_monitor_limit', true)
|
|
|
+ } else if(res.data.limit_status === 2) {
|
|
|
+ this.monitorInfo.showD3 = true
|
|
|
+ } else {
|
|
|
+ this.$toast('监控失败')
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
if (res.error_msg) {
|
|
|
this.$toast(res.error_msg)
|
|
|
}
|
|
|
}
|
|
|
+ this.getFollowState()
|
|
|
}).finally(() => {
|
|
|
this.follow.loading = false
|
|
|
})
|
|
@@ -1125,6 +1290,14 @@ export default {
|
|
|
@include diy-icon('renling-01', 20, 20);
|
|
|
@include diy-icon('renling-active', 20, 20);
|
|
|
@include diy-icon('share', 20, 20);
|
|
|
+::v-deep{
|
|
|
+ .el-dialog {
|
|
|
+ margin-top: 30vh!important;
|
|
|
+ }
|
|
|
+ .el-dialog--center .el-dialog__body{
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+}
|
|
|
.upgrade-mask-group{
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 32px;
|
|
@@ -1150,7 +1323,6 @@ export default {
|
|
|
.free-bg-container {
|
|
|
margin: 16px 0;
|
|
|
}
|
|
|
-
|
|
|
::v-deep {
|
|
|
.release_main {
|
|
|
position: relative;
|
|
@@ -1185,11 +1357,6 @@ export default {
|
|
|
height: 18px;
|
|
|
}
|
|
|
|
|
|
-.icon_heart_gray {
|
|
|
- background: url('~@/assets/images/icon/icon-heart.png') no-repeat;
|
|
|
- background-size: contain;
|
|
|
-}
|
|
|
-
|
|
|
.icon_heart_red {
|
|
|
background: url('~@/assets/images/icon/icon-favorite.png') no-repeat;
|
|
|
background-size: contain;
|
|
@@ -1202,6 +1369,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.icon-yijiankong {
|
|
|
+ font-size: 20px;
|
|
|
+ color: #FF9F40;
|
|
|
+}
|
|
|
+.icon-jiankong {
|
|
|
+ font-size: 20px;
|
|
|
+ color: #9B9CA3;
|
|
|
+}
|
|
|
|
|
|
.unit-portrayal-content {
|
|
|
position: relative;
|
|
@@ -1429,7 +1604,20 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ ::v-deep{
|
|
|
+ .monitor-class {
|
|
|
+ padding: 32px;
|
|
|
+ .el-dialog__header {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+ .el-dialog__body {
|
|
|
+ padding: 20px 0 32px;
|
|
|
+ }
|
|
|
+ .el-dialog__footer{
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
.unit-type {
|
|
|
position: relative;
|
|
|
padding: 32px 40px;
|