fix: tab default tab
This commit is contained in:
parent
601537049d
commit
6af275330c
1 changed files with 15 additions and 13 deletions
|
|
@ -413,7 +413,7 @@ const workNameRef = ref();
|
|||
const selectProduct = ref<ProductList[]>([]);
|
||||
const currentWorkIndex = ref<number>(0);
|
||||
|
||||
const currentServiceTab = ref(1);
|
||||
const serviceTab = ref(1);
|
||||
const propertiesDialog = ref<boolean>(false);
|
||||
|
||||
const totalProduct = ref<number>(0);
|
||||
|
|
@ -901,7 +901,7 @@ async function assignFormDataProductService(id: string) {
|
|||
const res = await fetchListServiceById(id);
|
||||
|
||||
if (res) {
|
||||
currentServiceTab.value = 1;
|
||||
serviceTab.value = 1;
|
||||
statusToggle.value = res.status === 'INACTIVE' ? false : true;
|
||||
profileUrl.value = res.imageUrl;
|
||||
profileSubmit.value = true;
|
||||
|
|
@ -964,6 +964,7 @@ const prevProduct = ref<ProductCreate>({
|
|||
});
|
||||
|
||||
function assignFormDataProduct(data: ProductList) {
|
||||
productTab.value = 1;
|
||||
statusToggle.value = data.status === 'INACTIVE' ? false : true;
|
||||
profileUrl.value = `${baseUrl.value}/product/${data?.id}/image`;
|
||||
|
||||
|
|
@ -1444,10 +1445,11 @@ watch(
|
|||
icon="mdi-folder-multiple-plus"
|
||||
@click="
|
||||
async () => {
|
||||
serviceTab = 1;
|
||||
clearFormGroup();
|
||||
clearFormService();
|
||||
await fetchListOfOptionBranch();
|
||||
currentServiceTab = 1;
|
||||
serviceTab = 1;
|
||||
dialogService = true;
|
||||
}
|
||||
"
|
||||
|
|
@ -4164,8 +4166,8 @@ watch(
|
|||
class="no-padding items-center rounded full-width"
|
||||
:class="{ 'q-mt-xs': v > 1 }"
|
||||
active-class="product-form-active"
|
||||
:active="currentServiceTab === v"
|
||||
@click="currentServiceTab = v"
|
||||
:active="serviceTab === v"
|
||||
@click="serviceTab = v"
|
||||
>
|
||||
<span class="full-width q-py-sm" style="padding-inline: 20px">
|
||||
{{ v === 1 ? $t('serviceInformation') : $t('workInformation') }}
|
||||
|
|
@ -4179,7 +4181,7 @@ watch(
|
|||
style="height: 100%; max-height: 100%; overflow-y: auto"
|
||||
>
|
||||
<BasicInformation
|
||||
v-if="currentServiceTab === 1"
|
||||
v-if="serviceTab === 1"
|
||||
dense
|
||||
service
|
||||
v-model:options-branch="branchOption"
|
||||
|
|
@ -4192,7 +4194,7 @@ watch(
|
|||
/>
|
||||
|
||||
<FormServiceWork
|
||||
v-if="currentServiceTab === 2"
|
||||
v-if="serviceTab === 2"
|
||||
v-model:work-items="workItems"
|
||||
dense
|
||||
@addProduct="
|
||||
|
|
@ -4222,7 +4224,7 @@ watch(
|
|||
</div>
|
||||
<div
|
||||
class="col-2 surface-1 q-mx-lg q-mb-lg rounded bordered row"
|
||||
v-if="currentServiceTab === 1"
|
||||
v-if="serviceTab === 1"
|
||||
style="overflow: hidden"
|
||||
>
|
||||
<FormServiceProperties
|
||||
|
|
@ -4383,8 +4385,8 @@ watch(
|
|||
class="no-padding items-center rounded full-width"
|
||||
:class="{ 'q-mt-xs': v > 1 }"
|
||||
active-class="product-form-active"
|
||||
:active="currentServiceTab === v"
|
||||
@click="currentServiceTab = v"
|
||||
:active="serviceTab === v"
|
||||
@click="serviceTab = v"
|
||||
>
|
||||
<span class="full-width q-py-sm" style="padding-inline: 20px">
|
||||
{{ v === 1 ? $t('serviceInformation') : $t('workInformation') }}
|
||||
|
|
@ -4398,7 +4400,7 @@ watch(
|
|||
style="height: 100%; max-height: 100%; overflow-y: auto"
|
||||
>
|
||||
<BasicInformation
|
||||
v-if="currentServiceTab === 1"
|
||||
v-if="serviceTab === 1"
|
||||
:readonly="!infoServiceEdit"
|
||||
dense
|
||||
service
|
||||
|
|
@ -4413,7 +4415,7 @@ watch(
|
|||
/>
|
||||
|
||||
<FormServiceWork
|
||||
v-if="currentServiceTab === 2"
|
||||
v-if="serviceTab === 2"
|
||||
:readonly="!infoServiceEdit"
|
||||
v-model:work-items="workItems"
|
||||
dense
|
||||
|
|
@ -4444,7 +4446,7 @@ watch(
|
|||
</div>
|
||||
<div
|
||||
class="col-2 surface-1 q-mx-lg q-mb-lg rounded bordered row"
|
||||
v-if="currentServiceTab === 1"
|
||||
v-if="serviceTab === 1"
|
||||
style="overflow: hidden"
|
||||
>
|
||||
<FormServiceProperties
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue