|
@@ -107,7 +107,7 @@
|
|
<v-radio-group v-model="radios">
|
|
<v-radio-group v-model="radios">
|
|
<v-radio v-for="item in enterpriseList" :key="item.enterpriseId" color="primary" :label="item.enterpriseName" :value="item.enterpriseId"></v-radio>
|
|
<v-radio v-for="item in enterpriseList" :key="item.enterpriseId" color="primary" :label="item.enterpriseName" :value="item.enterpriseId"></v-radio>
|
|
</v-radio-group>
|
|
</v-radio-group>
|
|
- <v-btn v-if="showRegistering" class="buttons" @click="handleRegistering">注册企业</v-btn>
|
|
|
|
|
|
+ <v-btn :loading="loading1" class="mt-2 mb-3" style="width: 100%;" color="primary" variant="tonal" @click="handleRegistering">{{ btnType ? '注册新企业' : '查看申请进度' }}</v-btn>
|
|
</CtDialog>
|
|
</CtDialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -178,18 +178,13 @@ const show = ref(false)
|
|
const radios = ref(null)
|
|
const radios = ref(null)
|
|
const enterpriseList = ref([])
|
|
const enterpriseList = ref([])
|
|
const changeLoginType = async () => {
|
|
const changeLoginType = async () => {
|
|
|
|
+ getApplyInfo() // 注册/注册进度
|
|
const data = await getUserBindEnterpriseList() // 申请通过才有数据,否则空数组
|
|
const data = await getUserBindEnterpriseList() // 申请通过才有数据,否则空数组
|
|
enterpriseList.value = data || []
|
|
enterpriseList.value = data || []
|
|
if (data?.length) {
|
|
if (data?.length) {
|
|
- if (data.length > 1) {
|
|
|
|
- show.value = true
|
|
|
|
- radios.value = data[0].enterpriseId
|
|
|
|
- } else {
|
|
|
|
- //只有一个企业直接切换
|
|
|
|
- toEnterprise(data[0].enterpriseId)
|
|
|
|
- }
|
|
|
|
|
|
+ radios.value = data[0].enterpriseId
|
|
|
|
+ show.value = true
|
|
}
|
|
}
|
|
- else getApplyInfo()
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// 切换为招聘者
|
|
// 切换为招聘者
|
|
@@ -203,19 +198,22 @@ const toEnterprise = async (enterpriseId) => {
|
|
window.location.href = '/enterpriseVerification'
|
|
window.location.href = '/enterpriseVerification'
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const btnType = ref(0)
|
|
// 查看用户是否有在申请中的数据
|
|
// 查看用户是否有在申请中的数据
|
|
const getApplyInfo = async () => {
|
|
const getApplyInfo = async () => {
|
|
const data = await getUserRegisterEnterpriseApply()
|
|
const data = await getUserRegisterEnterpriseApply()
|
|
- const bool = data && Object.keys(data).length // 已经有数据说明已经申请过了
|
|
|
|
- const path = bool ? '/recruit/enterprise/register/inReview' : '/recruit/enterprise/register'
|
|
|
|
- router.replace({ path })
|
|
|
|
|
|
+ localStorage.setItem('userApplyInfo', JSON.stringify(data))
|
|
|
|
+ const status = data?.status || null // 有数据说明有申请
|
|
|
|
+ btnType.value = (!status || data?.status !== '1') ? 0 : 1 // 0没有数据或者没有正在审核,1.有审核数据
|
|
}
|
|
}
|
|
|
|
|
|
-const showRegistering = ref(false)
|
|
|
|
-if (window.location.hostname === 'localhost' || window.location.hostname === '192.168.3.218' || window.location.hostname === '192.168.3.152') {
|
|
|
|
- showRegistering.value = true
|
|
|
|
|
|
+// 注册/查看申请进度
|
|
|
|
+const loading1 = ref(false)
|
|
|
|
+const handleRegistering = () => {
|
|
|
|
+ loading1.value = true
|
|
|
|
+ const path = btnType.value ? '/recruit/enterprise/register' : '/recruit/enterprise/register/inReview'
|
|
|
|
+ router.replace({ path })
|
|
}
|
|
}
|
|
-const handleRegistering = () => { router.push('/recruit/enterprise/register') }
|
|
|
|
|
|
|
|
const handleToPersonalCenter = () => {
|
|
const handleToPersonalCenter = () => {
|
|
router.push({ path: paths[5] })
|
|
router.push({ path: paths[5] })
|