|
@@ -87,13 +87,16 @@
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</v-toolbar>
|
|
</v-toolbar>
|
|
- <!-- <Dialog :visible="show" title="提示" :footer="false" widthType="2" @close="show = false">
|
|
|
|
- <div class="mb-3 text-center" style="color: #999;">
|
|
|
|
|
|
+ <CtDialog :visible="show" title="提示" :footer="true" widthType="2" @close="show = false" @submit="handleSubmit">
|
|
|
|
+ <!-- <div class="mb-3 text-center" style="color: #999;">
|
|
<div class="mb-5">您还未加入或注册企业, 请选择您要操作的类型!</div>
|
|
<div class="mb-5">您还未加入或注册企业, 请选择您要操作的类型!</div>
|
|
<v-btn class="half-button" size="small" color="primary" variant="tonal" @click="handleChange(0)">加入企业</v-btn>
|
|
<v-btn class="half-button" size="small" color="primary" variant="tonal" @click="handleChange(0)">加入企业</v-btn>
|
|
<v-btn class="half-button ml-5" size="small" color="primary" variant="tonal" @click="handleChange(1)">{{ $t('enterprise.registeringNewEnterprise') }}</v-btn>
|
|
<v-btn class="half-button ml-5" size="small" color="primary" variant="tonal" @click="handleChange(1)">{{ $t('enterprise.registeringNewEnterprise') }}</v-btn>
|
|
- </div>
|
|
|
|
- </Dialog> -->
|
|
|
|
|
|
+ </div> -->
|
|
|
|
+ <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-group>
|
|
|
|
+ </CtDialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -103,6 +106,7 @@ import { getToken } from '@/utils/auth'
|
|
import { useUserStore } from '@/store/user'
|
|
import { useUserStore } from '@/store/user'
|
|
import { useLocaleStore } from '@/store/locale'
|
|
import { useLocaleStore } from '@/store/locale'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
|
|
+import CtDialog from '@/components/CtDialog'
|
|
import { getUserBindEnterpriseList, getUserRegisterEnterpriseApply } from '@/api/personal/user'
|
|
import { getUserBindEnterpriseList, getUserRegisterEnterpriseApply } from '@/api/personal/user'
|
|
defineOptions({ name: 'personal-navbar' })
|
|
defineOptions({ name: 'personal-navbar' })
|
|
|
|
|
|
@@ -126,8 +130,12 @@ const list = ref([
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const handleLogoClick = () => { router.push({ path: '/home'}) }
|
|
const handleLogoClick = () => { router.push({ path: '/home'}) }
|
|
|
|
+const handleSubmit = () => { toEnterprise(radios.value) }
|
|
|
|
|
|
// 查看用户是否有企业
|
|
// 查看用户是否有企业
|
|
|
|
+const show = ref(false)
|
|
|
|
+const radios = ref(null)
|
|
|
|
+const enterpriseList = ref([])
|
|
const changeLoginType = async () => {
|
|
const changeLoginType = async () => {
|
|
// router.push({ path: '/login' })
|
|
// router.push({ path: '/login' })
|
|
// router.push({ name: 'login', query: { loginType: 330 } })
|
|
// router.push({ name: 'login', query: { loginType: 330 } })
|
|
@@ -136,8 +144,9 @@ const changeLoginType = async () => {
|
|
// localStorage.setItem('companyInfo', JSON.stringify(data))
|
|
// localStorage.setItem('companyInfo', JSON.stringify(data))
|
|
// changeRole()
|
|
// changeRole()
|
|
if (data.length > 1) {
|
|
if (data.length > 1) {
|
|
- // 未开发
|
|
|
|
- toEnterprise(data[0].enterpriseId)
|
|
|
|
|
|
+ show.value = true
|
|
|
|
+ enterpriseList.value = data
|
|
|
|
+ radios.value = data[0].enterpriseId
|
|
} else {
|
|
} else {
|
|
//只有一个企业直接切换
|
|
//只有一个企业直接切换
|
|
toEnterprise(data[0].enterpriseId)
|
|
toEnterprise(data[0].enterpriseId)
|