|
@@ -1,15 +1,45 @@
|
|
|
<!-- 企业信息设置 -->
|
|
|
<template>
|
|
|
<div>
|
|
|
+ <div v-if="completeNum !== tabList?.length" class="white-bgc mb-3">
|
|
|
+ <ProgressBar
|
|
|
+ label="企业信息填写完成度:"
|
|
|
+ :num="completeNum"
|
|
|
+ :total="tabList?.length"
|
|
|
+ :fontSize="14"
|
|
|
+ :inlineDisplay="true"
|
|
|
+ style="width: 350px;"
|
|
|
+ ></ProgressBar>
|
|
|
+ </div>
|
|
|
<v-card class="card-box pa-5" style="min-height: 500px">
|
|
|
<v-tabs v-model="tab" @update:model-value="handleTabClick" align-tabs="start" color="primary" bg-color="#f7f8fa">
|
|
|
- <v-tab v-for="val in tabList" :key="val.value" :value="val.value">{{ val.label }}</v-tab>
|
|
|
+ <v-tab v-for="val in tabList" :key="val.value" :value="val.value" >
|
|
|
+ {{ val.label }}
|
|
|
+ <template v-slot:append>
|
|
|
+ <template v-if="val.status === false">
|
|
|
+ <v-icon color="orange">mdi-information-outline</v-icon>
|
|
|
+ <v-tooltip activator="parent" location="top">请完善{{ val.label }}</v-tooltip>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </v-tab>
|
|
|
</v-tabs>
|
|
|
- <v-window v-model="tab" class="mt-3">
|
|
|
+ <div class="mt-3">
|
|
|
+ <template v-for="item in tabList" :key="item.id">
|
|
|
+ <div v-show="item.value === tab">
|
|
|
+ <component
|
|
|
+ ref="tabRef"
|
|
|
+ class="mb-3"
|
|
|
+ :is="item.path"
|
|
|
+ @complete="complete"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <!-- <v-window v-model="tab" class="mt-3">
|
|
|
<v-window-item :value="val.value" v-for="val in tabList" :key="val.value">
|
|
|
<component :is="val.path" ref="tabRef"></component>
|
|
|
</v-window-item>
|
|
|
- </v-window>
|
|
|
+ </v-window> -->
|
|
|
</v-card>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -23,7 +53,8 @@ import welfareLabel from './informationSettingsComponents/welfareLabel.vue'
|
|
|
import enterpriseLabel from './informationSettingsComponents/enterpriseLabel.vue'
|
|
|
import businessInformation from './informationSettingsComponents/businessInformation.vue'
|
|
|
import authentication from './informationSettingsComponents/authentication.vue'
|
|
|
-import { ref, watch } from 'vue'
|
|
|
+import ProgressBar from '@/components/ProgressBar'
|
|
|
+import { ref, shallowRef, watch } from 'vue'
|
|
|
import {
|
|
|
useRoute,
|
|
|
// useRouter
|
|
@@ -34,17 +65,17 @@ const route = useRoute()
|
|
|
// const router = useRouter()
|
|
|
const { t } = useI18n()
|
|
|
// tab
|
|
|
-const tabRef = ref()
|
|
|
+const tabRef = shallowRef()
|
|
|
const tab = ref(1)
|
|
|
-const tabList = [
|
|
|
- { label: t('enterprise.infoSetting.basicInfo'), value: 1, path: basicInfo },
|
|
|
- { label: t('enterprise.infoSetting.enterpriseLogo'), value: 2, path: enterpriseLogo },
|
|
|
- { label: t('enterprise.infoSetting.enterpriseAlbum'), value: 3, path: enterpriseAlbum },
|
|
|
- { label: t('enterprise.infoSetting.welfareLabel'), value: 4, path: welfareLabel },
|
|
|
- { label: t('enterprise.infoSetting.enterpriseLabel'), value: 7, path: enterpriseLabel },
|
|
|
- { label: t('enterprise.infoSetting.businessInformation'), value: 5, path: businessInformation },
|
|
|
- { label: t('setting.realNameAuthentication'), value: 6, path: authentication },
|
|
|
-]
|
|
|
+const tabList = ref([
|
|
|
+ { label: t('enterprise.infoSetting.basicInfo'), value: 1, path: basicInfo, id: 'basicInfo' },
|
|
|
+ { label: t('enterprise.infoSetting.enterpriseLogo'), value: 2, path: enterpriseLogo, id: 'enterpriseLogo' },
|
|
|
+ { label: t('enterprise.infoSetting.enterpriseAlbum'), value: 3, path: enterpriseAlbum, id: 'enterpriseAlbum' },
|
|
|
+ { label: t('enterprise.infoSetting.welfareLabel'), value: 4, path: welfareLabel, id: 'welfareLabel' },
|
|
|
+ { label: t('enterprise.infoSetting.enterpriseLabel'), value: 7, path: enterpriseLabel, id: 'enterpriseLabel' },
|
|
|
+ { label: t('enterprise.infoSetting.businessInformation'), value: 5, path: businessInformation, id: 'businessInformation' },
|
|
|
+ { label: t('setting.realNameAuthentication'), value: 6, path: authentication, id: 'authentication' },
|
|
|
+])
|
|
|
|
|
|
watch(() => route?.query?.tabKey, (newVal) => { // newQuery, oldQuery
|
|
|
if (newVal) tab.value = newVal - 0
|
|
@@ -57,7 +88,28 @@ const handleTabClick = () => {
|
|
|
}
|
|
|
// router.push(`${route.path}?tabKey=${tab.value.toString()}`)
|
|
|
}
|
|
|
+
|
|
|
+const completeNum = ref(0)
|
|
|
+const complete = (val) => {
|
|
|
+ if (!val?.id) return
|
|
|
+ completeNum.value = 0
|
|
|
+ tabList.value.forEach(e => {
|
|
|
+ if (e.id === val.id) {
|
|
|
+ e.status = val.status || false
|
|
|
+ }
|
|
|
+ if (e.status) {
|
|
|
+ completeNum.value++
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+.topTip {
|
|
|
+ background-color: #f7f8fa;
|
|
|
+ color: #2f3640;
|
|
|
+ padding: 12px 20px;
|
|
|
+ margin: 10px 0 20px;
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
</style>
|