fix เครื่องราช
This commit is contained in:
parent
2b691a746d
commit
4586aef931
9 changed files with 86 additions and 134 deletions
|
|
@ -82,7 +82,6 @@ const employeeClassOps = ref<OptionData[]>(DataStore.employeeClassOps); //ปร
|
|||
const dialogWarn = ref<boolean>(false);
|
||||
const checkboxData = ref<CheckboxData[]>([]);
|
||||
|
||||
const organizationOptions = ref<OptionData[]>([{ id: "1", name: "ทั้งหมด" }]);
|
||||
const filterOrganizationOP = ref<OptionData[]>([]);
|
||||
|
||||
/** หัวตาราง*/
|
||||
|
|
@ -768,7 +767,7 @@ function filterSelector(val: string, update: Function, name: string) {
|
|||
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
||||
);
|
||||
} else if (name === "filterOrganizationOP") {
|
||||
filterOrganizationOP.value = organizationOptions.value.filter(
|
||||
filterOrganizationOP.value = DataStore.optionsTypeOc.filter(
|
||||
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
||||
);
|
||||
}
|
||||
|
|
@ -791,8 +790,10 @@ function clearInsigniaFilters(name: string) {
|
|||
|
||||
/** Hook*/
|
||||
onMounted(async () => {
|
||||
organizationOptions.value = await DataStore.optionsTypeOc;
|
||||
organization.value = await DataStore.typeOc;
|
||||
console.log(DataStore.optionsTypeOc);
|
||||
|
||||
filterOrganizationOP.value = await DataStore.optionsTypeOc;
|
||||
organization.value = DataStore.typeOc;
|
||||
|
||||
if (organization.value !== "" || organization.value !== undefined) {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
|
|
@ -805,7 +806,6 @@ onMounted(async () => {
|
|||
DataStore.mainTab = props.tab;
|
||||
}
|
||||
}
|
||||
filterOrganizationOP.value = organizationOptions.value;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ function filterSelector(val: string, update: Function, name: string) {
|
|||
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
||||
);
|
||||
} else if (name === "filterOrganizationOP") {
|
||||
filterOrganizationOP.value = organizationOptions.value.filter(
|
||||
filterOrganizationOP.value = DataStore.optionsTypeOc.filter(
|
||||
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
||||
);
|
||||
}
|
||||
|
|
@ -259,7 +259,7 @@ function clearInsigniaFilters(name: string) {
|
|||
|
||||
/*** Hook*/
|
||||
onMounted(async () => {
|
||||
organizationOptions.value = await DataStore.optionsTypeOc;
|
||||
filterOrganizationOP.value = await DataStore.optionsTypeOc;
|
||||
organization.value = await DataStore.typeOc;
|
||||
if (organization.value !== "" || organization.value !== undefined) {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
|
|
@ -272,7 +272,6 @@ onMounted(async () => {
|
|||
DataStore.mainTab = props.tab;
|
||||
}
|
||||
}
|
||||
filterOrganizationOP.value = organizationOptions.value;
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ function filterSelector(val: string, update: Function, name: string) {
|
|||
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
||||
);
|
||||
} else if (name === "filterOrganizationOP") {
|
||||
filterOrganizationOP.value = organizationOptions.value.filter(
|
||||
filterOrganizationOP.value = DataStore.optionsTypeOc.filter(
|
||||
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
|
||||
);
|
||||
}
|
||||
|
|
@ -259,7 +259,7 @@ function clearInsigniaFilters(name: string) {
|
|||
|
||||
/** Hook*/
|
||||
onMounted(async () => {
|
||||
organizationOptions.value = DataStore.optionsTypeOc;
|
||||
filterOrganizationOP.value = await DataStore.optionsTypeOc;
|
||||
organization.value = await DataStore.typeOc;
|
||||
if (organization.value !== "" || organization.value !== undefined) {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
|
|
@ -272,9 +272,9 @@ onMounted(async () => {
|
|||
DataStore.mainTab = props.tab;
|
||||
}
|
||||
}
|
||||
filterOrganizationOP.value = organizationOptions.value;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="col-12 row q-pa-md">
|
||||
<div class="row col-12">
|
||||
|
|
@ -528,6 +528,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<DialogInformation
|
||||
:modal="dialogNote"
|
||||
:title="noteTitle"
|
||||
|
|
|
|||
|
|
@ -85,42 +85,36 @@ onMounted(async () => {
|
|||
DataStore.mainTab = props.tab;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="col-12 row q-pa-md">
|
||||
<div class="row col-12">
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
row-key="name"
|
||||
dense
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td key="no" style="width: 50px" :props="props">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
<q-td key="orgName" style="width: 300px" :props="props">
|
||||
{{ props.row.orgName }}
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<d-table
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
row-key="name"
|
||||
dense
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">{{
|
||||
col.name == "no" ? props.rowIndex + 1 : col.value
|
||||
}}</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue