เก็บ 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";
|
||||
|
||||
const storeRegistry = useRegistryNewDataStore();
|
||||
|
||||
const tab = ref<string>("1");
|
||||
</script>
|
||||
<template>
|
||||
<div class="row items-center q-my-md">
|
||||
|
|
@ -25,8 +23,9 @@ const tab = ref<string>("1");
|
|||
</div>
|
||||
|
||||
<q-separator />
|
||||
|
||||
<q-tabs
|
||||
v-model="tab"
|
||||
v-model="storeRegistry.tab"
|
||||
active-color="blue-8"
|
||||
align="left"
|
||||
bordered
|
||||
|
|
@ -43,24 +42,24 @@ const tab = ref<string>("1");
|
|||
</q-tabs>
|
||||
<q-separator />
|
||||
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<q-tab-panels v-model="storeRegistry.tab" animated>
|
||||
<q-tab-panel name="1">
|
||||
<ProfessionalLicense :is-leave="storeRegistry.isLeave"/>
|
||||
<ProfessionalLicense :is-leave="storeRegistry.isLeave" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="2">
|
||||
<Train :is-leave="storeRegistry.isLeave"/>
|
||||
<Train :is-leave="storeRegistry.isLeave" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="3">
|
||||
<Insignia :is-leave="storeRegistry.isLeave"/>
|
||||
<Insignia :is-leave="storeRegistry.isLeave" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="4">
|
||||
<DeclarationHonor :is-leave="storeRegistry.isLeave"/>
|
||||
<DeclarationHonor :is-leave="storeRegistry.isLeave" />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="4">
|
||||
<PerformSpecialWork />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="5">
|
||||
<ResultsPerformance :is-leave="storeRegistry.isLeave"/>
|
||||
<ResultsPerformance :is-leave="storeRegistry.isLeave" />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ const { messageError } = useCounterMixin();
|
|||
|
||||
export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
||||
const route = useRoute();
|
||||
const tab = ref<string>("1");
|
||||
const routerName = ref<any>();
|
||||
const searchTypeOption = computed<DataOption[]>(() => {
|
||||
return [
|
||||
|
|
@ -260,5 +261,6 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
|||
createPathUploadFlie,
|
||||
getPathUploadFlie,
|
||||
uploadFile,
|
||||
tab
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ onMounted(() => {
|
|||
class="q-mr-sm"
|
||||
icon="mdi-arrow-left"
|
||||
color="primary"
|
||||
@click="router.push('/development')"
|
||||
@click="router.go(-1)"
|
||||
/>
|
||||
{{
|
||||
checkRoutePermission
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue