informationSettings.vue 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!-- 企业信息设置 -->
  2. <template>
  3. <div>
  4. <v-card class="card-box pa-5" style="min-height: 500px">
  5. <v-tabs v-model="tab" @update:model-value="handleTabClick" align-tabs="start" color="primary" bg-color="#f7f8fa">
  6. <v-tab v-for="val in tabList" :key="val.value" :value="val.value">{{ val.label }}</v-tab>
  7. </v-tabs>
  8. <v-window v-model="tab" class="mt-3">
  9. <v-window-item :value="val.value" v-for="val in tabList" :key="val.value">
  10. <component :is="val.path" ref="tabRef"></component>
  11. </v-window-item>
  12. </v-window>
  13. </v-card>
  14. </div>
  15. </template>
  16. <script setup>
  17. defineOptions({ name: 'enterprise-system-management-information-settings'})
  18. import basicInfo from './informationSettingsComponents/basicInfo.vue'
  19. import enterpriseLogo from './informationSettingsComponents/enterpriseLogo.vue'
  20. import enterpriseAlbum from './informationSettingsComponents/enterpriseAlbum.vue'
  21. import welfareLabel from './informationSettingsComponents/welfareLabel.vue'
  22. import enterpriseLabel from './informationSettingsComponents/enterpriseLabel.vue'
  23. import businessInformation from './informationSettingsComponents/businessInformation.vue'
  24. import authentication from './informationSettingsComponents/authentication.vue'
  25. import { ref, watch } from 'vue'
  26. import {
  27. useRoute,
  28. // useRouter
  29. } from 'vue-router'
  30. import { useI18n } from '@/hooks/web/useI18n'
  31. const route = useRoute()
  32. // const router = useRouter()
  33. const { t } = useI18n()
  34. // tab
  35. const tabRef = ref()
  36. const tab = ref(1)
  37. const tabList = [
  38. { label: t('enterprise.infoSetting.basicInfo'), value: 1, path: basicInfo },
  39. { label: t('enterprise.infoSetting.enterpriseLogo'), value: 2, path: enterpriseLogo },
  40. { label: t('enterprise.infoSetting.enterpriseAlbum'), value: 3, path: enterpriseAlbum },
  41. { label: t('enterprise.infoSetting.welfareLabel'), value: 4, path: welfareLabel },
  42. { label: t('enterprise.infoSetting.enterpriseLabel'), value: 7, path: enterpriseLabel },
  43. { label: t('enterprise.infoSetting.businessInformation'), value: 5, path: businessInformation },
  44. { label: t('setting.realNameAuthentication'), value: 6, path: authentication },
  45. ]
  46. watch(() => route?.query?.tabKey, (newVal) => { if (newVal) tab.value = newVal - 0 })
  47. const handleTabClick = () => {
  48. // 基本信息-获取企业管理员实名认证信息
  49. if (tab.value === 1) {
  50. tabRef.value[0].getAuthInfo()
  51. }
  52. // router.push(`${route.path}?tabKey=${tab.value.toString()}`)
  53. }
  54. </script>
  55. <style scoped lang="scss">
  56. </style>