เก็บ tab ใน store
This commit is contained in:
parent
d3d6feb379
commit
c3282f4738
3 changed files with 11 additions and 10 deletions
|
|
@ -11,8 +11,6 @@ import DeclarationHonor from "@/modules/04_registryPerson/components/detail/Achi
|
||||||
import ResultsPerformance from "@/modules/04_registryPerson/components/detail/Achievement/05_ResultsPerformance.vue";
|
import ResultsPerformance from "@/modules/04_registryPerson/components/detail/Achievement/05_ResultsPerformance.vue";
|
||||||
|
|
||||||
const storeRegistry = useRegistryNewDataStore();
|
const storeRegistry = useRegistryNewDataStore();
|
||||||
|
|
||||||
const tab = ref<string>("1");
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="row items-center q-my-md">
|
<div class="row items-center q-my-md">
|
||||||
|
|
@ -25,8 +23,9 @@ const tab = ref<string>("1");
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-tabs
|
<q-tabs
|
||||||
v-model="tab"
|
v-model="storeRegistry.tab"
|
||||||
active-color="blue-8"
|
active-color="blue-8"
|
||||||
align="left"
|
align="left"
|
||||||
bordered
|
bordered
|
||||||
|
|
@ -43,24 +42,24 @@ const tab = ref<string>("1");
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-tab-panels v-model="tab" animated>
|
<q-tab-panels v-model="storeRegistry.tab" animated>
|
||||||
<q-tab-panel name="1">
|
<q-tab-panel name="1">
|
||||||
<ProfessionalLicense :is-leave="storeRegistry.isLeave"/>
|
<ProfessionalLicense :is-leave="storeRegistry.isLeave" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="2">
|
<q-tab-panel name="2">
|
||||||
<Train :is-leave="storeRegistry.isLeave"/>
|
<Train :is-leave="storeRegistry.isLeave" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="3">
|
<q-tab-panel name="3">
|
||||||
<Insignia :is-leave="storeRegistry.isLeave"/>
|
<Insignia :is-leave="storeRegistry.isLeave" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="4">
|
<q-tab-panel name="4">
|
||||||
<DeclarationHonor :is-leave="storeRegistry.isLeave"/>
|
<DeclarationHonor :is-leave="storeRegistry.isLeave" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="4">
|
<q-tab-panel name="4">
|
||||||
<PerformSpecialWork />
|
<PerformSpecialWork />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="5">
|
<q-tab-panel name="5">
|
||||||
<ResultsPerformance :is-leave="storeRegistry.isLeave"/>
|
<ResultsPerformance :is-leave="storeRegistry.isLeave" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ const { messageError } = useCounterMixin();
|
||||||
|
|
||||||
export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const tab = ref<string>("1");
|
||||||
const routerName = ref<any>();
|
const routerName = ref<any>();
|
||||||
const searchTypeOption = computed<DataOption[]>(() => {
|
const searchTypeOption = computed<DataOption[]>(() => {
|
||||||
return [
|
return [
|
||||||
|
|
@ -260,5 +261,6 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
||||||
createPathUploadFlie,
|
createPathUploadFlie,
|
||||||
getPathUploadFlie,
|
getPathUploadFlie,
|
||||||
uploadFile,
|
uploadFile,
|
||||||
|
tab
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ onMounted(() => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
icon="mdi-arrow-left"
|
icon="mdi-arrow-left"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="router.push('/development')"
|
@click="router.go(-1)"
|
||||||
/>
|
/>
|
||||||
{{
|
{{
|
||||||
checkRoutePermission
|
checkRoutePermission
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue