|
@@ -2,27 +2,8 @@
|
|
|
<Layout class="ent-portrayal">
|
|
|
<div class="ent-header">
|
|
|
<div class="name">{{ entName }}</div>
|
|
|
- <div class="ent_follow" @click="setFollow()">
|
|
|
- <span :class="follow.classActive"></span>
|
|
|
- <span class="follow_text">{{ follow.text }}</span>
|
|
|
- </div>
|
|
|
+ <EntFollowStar :id="eId" />
|
|
|
</div>
|
|
|
- <!-- 关注分组选择dialog -->
|
|
|
- <el-dialog
|
|
|
- custom-class="sub-dialog"
|
|
|
- :visible.sync="follow.dialog"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :show-close="false"
|
|
|
- center
|
|
|
- top="25vh"
|
|
|
- width="460px"
|
|
|
- >
|
|
|
- <GroupSelector
|
|
|
- :initGroupInfo="follow.groupInitData.join(',')"
|
|
|
- @onCancel="setFollowCancel"
|
|
|
- @onConfirm="setFollowConfirmed"
|
|
|
- ></GroupSelector>
|
|
|
- </el-dialog>
|
|
|
<div class="ent-content" v-loading="loading">
|
|
|
<div class="tab-header" :class="{'fixed-nav': navFixed}" id="entTabNav">
|
|
|
<a :class="[activeName == '1' ? 'active' : '']" @click="handleClick('1')">企业信息</a>
|
|
@@ -89,13 +70,13 @@ import Layout from '@/components/common/ContentLayout.vue'
|
|
|
import BidInfoActive from './components/BidInfoActive'
|
|
|
import ContactList from '@/components/contact-info/ContactInfo'
|
|
|
import MaskCard from '@/components/mask-card/MaskCard.vue'
|
|
|
-import GroupSelector from '@/components/selector/GroupSelector.vue'
|
|
|
import Empty from '@/components/common/Empty'
|
|
|
import DynamicList from './components/DynamicList'
|
|
|
+import EntFollowStar from './components/EntFollowStar.vue'
|
|
|
import { mapState } from 'vuex'
|
|
|
import { Dialog, Input, TabPane, Tabs } from 'element-ui'
|
|
|
import { dateFormatter, moneyUnit } from '@/utils'
|
|
|
-import { getEntWinnerSelect, getfollowCheck, setCancelEnt, setFollowEnt } from '@/api/modules'
|
|
|
+import { getEntWinnerSelect } from '@/api/modules'
|
|
|
|
|
|
function getImgForVipUpgrade (name, bg = false, suffix = '.png') {
|
|
|
return require('@/assets/images/vip/' + (bg ? 'bg/mask/' : '') + name + suffix)
|
|
@@ -115,8 +96,8 @@ export default {
|
|
|
BidInfoActive,
|
|
|
ContactList,
|
|
|
MaskCard,
|
|
|
- GroupSelector,
|
|
|
Empty,
|
|
|
+ EntFollowStar,
|
|
|
DynamicList
|
|
|
},
|
|
|
data () {
|
|
@@ -133,13 +114,6 @@ export default {
|
|
|
start: 0,
|
|
|
end: 0
|
|
|
},
|
|
|
- follow: {
|
|
|
- classActive: 'icon_heart_gray',
|
|
|
- text: '关注',
|
|
|
- groupInitData: ['A'],
|
|
|
- dialog: false,
|
|
|
- loading: false
|
|
|
- },
|
|
|
eId: this.$route.params.eId,
|
|
|
entName: '',
|
|
|
EntHistoryTip: {
|
|
@@ -268,7 +242,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
- this.getFollow()
|
|
|
this.getSelect()
|
|
|
},
|
|
|
mounted () {
|
|
@@ -334,20 +307,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 查询项目是否关注
|
|
|
- getFollow () {
|
|
|
- getfollowCheck({ entId: this.eId }).then(res => {
|
|
|
- if (res.error_code === 0) {
|
|
|
- if (res.data.followed) {
|
|
|
- this.follow.classActive = 'icon_heart_red'
|
|
|
- this.follow.text = '已关注'
|
|
|
- } else {
|
|
|
- this.follow.classActive = 'icon_heart_gray'
|
|
|
- this.follow.text = '关注'
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
getEntInfo (data) {
|
|
|
this.proData = [
|
|
|
{
|
|
@@ -370,49 +329,6 @@ export default {
|
|
|
this.dateRange.start = dateFormatter(data.timeRange.start * 1000, 'yyyy/MM/dd')
|
|
|
this.dateRange.end = dateFormatter(data.timeRange.end * 1000, 'yyyy/MM/dd')
|
|
|
},
|
|
|
- // 关注
|
|
|
- setFollow () {
|
|
|
- if (this.follow.text === '关注') {
|
|
|
- this.follow.dialog = true
|
|
|
- } else {
|
|
|
- setCancelEnt({ entId: this.eId }).then(res => {
|
|
|
- if (res.error_code === 0) {
|
|
|
- if (res.data === 'success') {
|
|
|
- this.follow.classActive = 'icon_heart_gray'
|
|
|
- this.follow.text = '关注'
|
|
|
- this.$toast('取消关注成功')
|
|
|
- } else {
|
|
|
- this.$toast(res.error_msg || '取消关注失败')
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- setFollowConfirmed (data) {
|
|
|
- if (this.follow.loading) return
|
|
|
- this.follow.loading = true
|
|
|
- setFollowEnt({
|
|
|
- entId: this.eId,
|
|
|
- group: data
|
|
|
- }).then(res => {
|
|
|
- if (res.error_code === 0) {
|
|
|
- // 关闭弹窗
|
|
|
- this.setFollowCancel()
|
|
|
- if (res.data === 'success') {
|
|
|
- this.follow.classActive = 'icon_heart_red'
|
|
|
- this.follow.text = '已关注'
|
|
|
- }
|
|
|
- this.$toast(res.error_msg || '关注成功,已添加至企业情报监控内')
|
|
|
- } else {
|
|
|
- this.$toast(res.error_msg || '关注失败')
|
|
|
- }
|
|
|
- }).finally(() => {
|
|
|
- this.follow.loading = false
|
|
|
- })
|
|
|
- },
|
|
|
- setFollowCancel () {
|
|
|
- this.follow.dialog = false
|
|
|
- },
|
|
|
openBigPage (item) {
|
|
|
try {
|
|
|
// eslint-disable-next-line no-undef
|
|
@@ -432,16 +348,6 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-::v-deep .sub-dialog {
|
|
|
- background-color: transparent;
|
|
|
- box-shadow: none;
|
|
|
-
|
|
|
- .el-dialog__header,
|
|
|
- .el-dialog__body {
|
|
|
- padding: 0;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
.ent-portrayal {
|
|
|
margin: 32px auto;
|
|
|
|
|
@@ -456,38 +362,6 @@ export default {
|
|
|
font-size: 24px;
|
|
|
color: #171826;
|
|
|
}
|
|
|
-
|
|
|
- .ent_follow {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- cursor: pointer;
|
|
|
-
|
|
|
- .icon_heart_gray {
|
|
|
- margin-right: 4px;
|
|
|
- display: flex;
|
|
|
- width: 18px;
|
|
|
- height: 18px;
|
|
|
- background: url('~@/assets/images/icon/icon-heart.png') no-repeat;
|
|
|
- background-size: contain;
|
|
|
- }
|
|
|
-
|
|
|
- .icon_heart_red {
|
|
|
- margin-right: 4px;
|
|
|
- display: flex;
|
|
|
- width: 18px;
|
|
|
- height: 18px;
|
|
|
- background: url('~@/assets/images/icon/icon-favorite.png') no-repeat;
|
|
|
- background-size: contain;
|
|
|
- }
|
|
|
-
|
|
|
- .follow_text {
|
|
|
- font-size: 14px;
|
|
|
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
|
|
|
- font-weight: 400;
|
|
|
- color: #686868;
|
|
|
- line-height: 22px;
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
.tab-header {
|