|
@@ -7,8 +7,6 @@
|
|
<div class="ml-4">
|
|
<div class="ml-4">
|
|
<div class="contact-name">
|
|
<div class="contact-name">
|
|
{{ info.enterprise.name }}
|
|
{{ info.enterprise.name }}
|
|
- <!-- <v-icon :color="statusInfo.color" size="20">{{ statusInfo.mdi }}</v-icon>
|
|
|
|
- <span :style="{'color': statusInfo.color,'font-size': '14px'}">{{ statusInfo.label }}</span> -->
|
|
|
|
</div>
|
|
</div>
|
|
<div class="contact-info">
|
|
<div class="contact-info">
|
|
{{ info.scaleName }}
|
|
{{ info.scaleName }}
|
|
@@ -68,8 +66,6 @@
|
|
|
|
|
|
<!-- 快速登录 -->
|
|
<!-- 快速登录 -->
|
|
<loginPage v-if="showLogin" @loginSuccess="loginSuccess" @close="loginClose"></loginPage>
|
|
<loginPage v-if="showLogin" @loginSuccess="loginSuccess" @close="loginClose"></loginPage>
|
|
- <!-- 完善个人信息 -->
|
|
|
|
- <!-- <fillPage v-if="showFill" @success="fillSuccess"></fillPage> -->
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -78,7 +74,6 @@ defineOptions({ name: 'enterprise-details'})
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
import EnterpriseIntroduction from './components/introduction.vue'
|
|
import EnterpriseIntroduction from './components/introduction.vue'
|
|
import recruitmentPositions from './components/positions.vue'
|
|
import recruitmentPositions from './components/positions.vue'
|
|
-// import { getEnterpriseAuthDetails } from '@/api/position'
|
|
|
|
import { getEnterpriseDetails, getEnterpriseSubscribeCheck, getEnterpriseSubscribe, getEnterpriseUnsubscribe, enterpriseClick } from '@/api/enterprise'
|
|
import { getEnterpriseDetails, getEnterpriseSubscribeCheck, getEnterpriseSubscribe, getEnterpriseUnsubscribe, enterpriseClick } from '@/api/enterprise'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
@@ -86,22 +81,13 @@ import { useRoute, useRouter } from 'vue-router'
|
|
import { getToken } from '@/utils/auth'
|
|
import { getToken } from '@/utils/auth'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import loginPage from '@/views/common/loginDialog.vue'
|
|
import loginPage from '@/views/common/loginDialog.vue'
|
|
-// import fillPage from '@/views/common/fill/dialog.vue'
|
|
|
|
-
|
|
|
|
-const props = defineProps({
|
|
|
|
- id: {
|
|
|
|
- type: String,
|
|
|
|
- default: ''
|
|
|
|
- }
|
|
|
|
-})
|
|
|
|
-
|
|
|
|
|
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
|
+const { id } = router.currentRoute.value.params
|
|
const tab = ref(1)
|
|
const tab = ref(1)
|
|
const savedTab = new URLSearchParams(window.location.search).get('key')
|
|
const savedTab = new URLSearchParams(window.location.search).get('key')
|
|
tab.value = savedTab ? (savedTab === 'briefIntroduction' ? 1 : 2) : 1
|
|
tab.value = savedTab ? (savedTab === 'briefIntroduction' ? 1 : 2) : 1
|
|
-// router.push(`${route.path}?key=${savedTab ? savedTab : 'briefIntroduction'}`)
|
|
|
|
|
|
|
|
const handleTabClick = () => {
|
|
const handleTabClick = () => {
|
|
router.push(`${route.path}?key=${tab.value === 1 ? 'briefIntroduction' : 'recruitmentPositions'}`)
|
|
router.push(`${route.path}?key=${tab.value === 1 ? 'briefIntroduction' : 'recruitmentPositions'}`)
|
|
@@ -109,41 +95,26 @@ const handleTabClick = () => {
|
|
|
|
|
|
// 企业埋点
|
|
// 企业埋点
|
|
const handleEnterpriseClick = async () => {
|
|
const handleEnterpriseClick = async () => {
|
|
- if (!props.id) return
|
|
|
|
- await enterpriseClick({ id: props.id })
|
|
|
|
|
|
+ if (id) return
|
|
|
|
+ await enterpriseClick({ id })
|
|
}
|
|
}
|
|
handleEnterpriseClick()
|
|
handleEnterpriseClick()
|
|
|
|
|
|
-// const statusList = [
|
|
|
|
-// { label: '未认证', color: '#fb8c00', value: null, mdi: 'mdi-shield-remove' },
|
|
|
|
-// { label: '审核中', color: '#fb8c00', value: '0', mdi: 'mdi-shield-half-full' },
|
|
|
|
-// { label: '已认证', color: 'var(--v-primary-base)', value: '1', mdi: 'mdi-shield-check' },
|
|
|
|
-// { label: '已驳回', color: '#fe574a', value: '2', mdi: 'mdi-shield-off' }
|
|
|
|
-// ]
|
|
|
|
-
|
|
|
|
// 企业详情
|
|
// 企业详情
|
|
const info = ref({})
|
|
const info = ref({})
|
|
-// const authInfo = ref({})
|
|
|
|
const getDetails = async () => {
|
|
const getDetails = async () => {
|
|
- if (!props.id) return
|
|
|
|
- const data = await getEnterpriseDetails({ id: props.id })
|
|
|
|
|
|
+ if (!id) return
|
|
|
|
+ const data = await getEnterpriseDetails({ id })
|
|
// 成立日期
|
|
// 成立日期
|
|
if (data?.business?.establishmentTime) {
|
|
if (data?.business?.establishmentTime) {
|
|
data.business.establishmentTime = timesTampChange(data.business.establishmentTime, 'Y-M-D')
|
|
data.business.establishmentTime = timesTampChange(data.business.establishmentTime, 'Y-M-D')
|
|
}
|
|
}
|
|
|
|
|
|
info.value = { ...data, ...dealDictObjData({}, data.enterprise) }
|
|
info.value = { ...data, ...dealDictObjData({}, data.enterprise) }
|
|
- getCollectionStatus(props.id)
|
|
|
|
- // 企业实名认证信息
|
|
|
|
- // authInfo.value = await getEnterpriseAuthDetails(props.id)
|
|
|
|
|
|
+ getCollectionStatus(id)
|
|
}
|
|
}
|
|
getDetails()
|
|
getDetails()
|
|
|
|
|
|
-// const statusInfo = computed(() => {
|
|
|
|
-// const obj = (authInfo.value && Object.keys(authInfo.value).length) ? statusList.find(e => e.value === authInfo.value.status) : statusList[0]
|
|
|
|
-// return obj
|
|
|
|
-// })
|
|
|
|
-
|
|
|
|
// 效验求职者是否关注该企业
|
|
// 效验求职者是否关注该企业
|
|
const isCollection = ref(false)
|
|
const isCollection = ref(false)
|
|
const getCollectionStatus = async (id) => {
|
|
const getCollectionStatus = async (id) => {
|
|
@@ -157,14 +128,13 @@ const handleFollow = async () => {
|
|
if (!getToken()) {
|
|
if (!getToken()) {
|
|
showLogin.value = true // 打开快速登录弹窗
|
|
showLogin.value = true // 打开快速登录弹窗
|
|
Snackbar.warning('您还未登录,请先登录后再试')
|
|
Snackbar.warning('您还未登录,请先登录后再试')
|
|
- //
|
|
|
|
nextFunc.value = handleFollow // 登录成功后要执行的操作
|
|
nextFunc.value = handleFollow // 登录成功后要执行的操作
|
|
loginCloseWarningWord = '您已取消登录,无法关注企业' // 取消登录提示语
|
|
loginCloseWarningWord = '您已取消登录,无法关注企业' // 取消登录提示语
|
|
return
|
|
return
|
|
}
|
|
}
|
|
const api = isCollection.value ? getEnterpriseUnsubscribe : getEnterpriseSubscribe
|
|
const api = isCollection.value ? getEnterpriseUnsubscribe : getEnterpriseSubscribe
|
|
- await api(isCollection.value ? props.id : { enterpriseId: props.id })
|
|
|
|
- getCollectionStatus(props.id)
|
|
|
|
|
|
+ await api(isCollection.value ? id : { enterpriseId: id })
|
|
|
|
+ getCollectionStatus(id)
|
|
}
|
|
}
|
|
|
|
|
|
// 工商信息
|
|
// 工商信息
|