<!-- 企业信息设置 -->
<template>
  <div>
    <v-card class="card-box pa-5" style="min-height: 500px">
      <div>
        <v-tabs v-model="tab" @update:model-value="handleTabClick" align-tabs="start" color="primary" bg-color="#fff">
          <v-tab :value="1">{{ $t('enterprise.infoSetting.basicInfo') }}</v-tab>
          <v-tab :value="2">{{ $t('enterprise.infoSetting.enterpriseLogo') }}</v-tab>
          <v-tab :value="3">{{ $t('enterprise.infoSetting.enterpriseAlbum') }}</v-tab>
          <v-tab :value="4">{{ $t('enterprise.infoSetting.welfareLabel') }}</v-tab>
          <v-tab :value="5">{{ $t('enterprise.infoSetting.enterpriseVideo') }}</v-tab>
          <v-tab :value="6">{{ $t('enterprise.infoSetting.recruitmentQRCode') }}</v-tab>
        </v-tabs>
        <v-window v-model="tab" class="mt-3">
          <v-window-item :value="1">
            <basicInfo></basicInfo>
          </v-window-item>
          <v-window-item :value="2">
            <enterpriseLogo></enterpriseLogo>
          </v-window-item>
          <v-window-item :value="3">
            <enterpriseAlbum></enterpriseAlbum>
          </v-window-item>
          <v-window-item :value="4">
            <welfareLabel></welfareLabel>
          </v-window-item>
          <v-window-item :value="5">
            <enterpriseVideo></enterpriseVideo>
          </v-window-item>
          <v-window-item :value="6">
            <recruitmentQRCode></recruitmentQRCode>
          </v-window-item>
        </v-window>
      </div>
    </v-card>
  </div>
</template>

<script setup>
import basicInfo from './informationSettingsComponents/basicInfo.vue'
import enterpriseLogo from './informationSettingsComponents/enterpriseLogo.vue'
import enterpriseAlbum from './informationSettingsComponents/enterpriseAlbum.vue'
import welfareLabel from './informationSettingsComponents/welfareLabel.vue'
import enterpriseVideo from './informationSettingsComponents/enterpriseVideo.vue'
import recruitmentQRCode from './informationSettingsComponents/recruitmentQRCode.vue'
import { provide, ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
const route = useRoute(); const router = useRouter()
defineOptions({ name: 'enterprise-system-management-information-settings'})

const infoData = {
  name: '苏州工业园区娄葑镇香草叶咖啡店', // 企业名称
  suoZaiDi: '江苏 苏州 吴中区',
  diZhi: '苏州工业园区斜塘林泉街598号邻里中心翰林大厦2幢N111室',
  key1: '120.67439051247,31.349085947054',
  time: new Date().getTime(),
  select: '1',
  net: 'https://www.baidu.com',
  content: '香草叶总部位于苏州，始创于2010年；主营业务是中西结合简餐，以西式为主，适宜商务宴请、休闲小憩、情侣约会、家庭和朋友聚餐。创始人基于对西餐的热爱和菜品高品质的要求，不断研发和丰富菜品，中西结合式简餐，深受顾客朋友们的喜爱。诚邀志同道合者，热爱餐饮业的有志之士加盟香草叶！',
}
provide('infoData', JSON.stringify(infoData))

// tab
const tab = ref(1)
watch(() => route?.query?.tabKey, (newVal) => { if (newVal) tab.value = newVal - 0 })
const handleTabClick = () => {
  router.push(`${route.path}?tabKey=${tab.value.toString()}`)
}
</script>

<style scoped lang="scss">
</style>
