This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-07-03 13:20:18 +07:00
parent 4842a8de5f
commit 7a3e916039
4 changed files with 45 additions and 13 deletions

View file

@ -786,7 +786,6 @@ onMounted(() => {
<q-dialog v-model="modal" class="dialog" persistent>
<q-card style="min-width: 80%">
<q-form @submit.prevent greedy @validation-success="onSubmit(typeForm)">
{{ typeForm }} {{ isEdit }}
<DialogHeader
:tittle="
isEdit

View file

@ -36,7 +36,7 @@ const pagination = ref({
});
const rows = ref<any[]>([]);
const agencyOp = ref<[]>([]);
const agencyOp = ref<any[]>([]);
const itemMenu = ref<ItemsMenu[]>([
{
label: "ไฟล์ .xlsx",
@ -136,11 +136,18 @@ function fetchListOrg() {
showLoader();
http
.get(config.API.developmentHistoryListOrg("employee", formFilter.year))
.then((res) => {
.then(async (res) => {
formFilter.root = null;
rows.value = [];
agencyOp.value = res.data.result;
getData();
const option = [{ name: "ทั้งหมด", id: null }];
const optionNew = await res.data.result.map((e: string) => ({
name: e,
id: e,
}));
option.push(...optionNew);
agencyOp.value = option;
// agencyOp.value = res.data.result;
await getData();
})
.catch((err) => {
messageError($q, err);
@ -296,7 +303,17 @@ onMounted(() => {
option-label="name"
@update:model-value="(formFilter.page = 1), getData()"
style="min-width: 150px"
/>
map-options
emit-value
>
<template v-if="formFilter.root" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="(formFilter.root = null), fetchListOrg()"
class="cursor-pointer"
/>
</template>
</q-select>
<!-- <q-btn flat round dense icon="add" color="primary" @click="onAdd()">
<q-tooltip>เพ</q-tooltip>

View file

@ -38,7 +38,7 @@ const router = useRouter();
const store = useDevelopmentDataStore();
const $q = useQuasar();
const { showLoader, hideLoader, messageError } = useCounterMixin();
const agencyOp = ref<[]>([]);
const agencyOp = ref<any[]>([]);
const rows = ref<any[]>([]);
const visibleColumns = ref<string[]>([
@ -149,12 +149,19 @@ function fetchListOrg() {
showLoader();
http
.get(config.API.developmentHistoryListOrg("officer", formFilter.year))
.then((res) => {
.then(async (res) => {
console.log(res);
formFilter.root = null;
formFilter.page = 1;
rows.value = [];
agencyOp.value = res.data.result;
getData();
const option = [{ name: "ทั้งหมด", id: null }];
const optionNew = await res.data.result.map((e: string) => ({
name: e,
id: e,
}));
option.push(...optionNew);
agencyOp.value = option;
await getData();
})
.catch((err) => {
messageError($q, err);
@ -313,7 +320,16 @@ onMounted(() => {
option-label="name"
@update:model-value="(formFilter.page = 1), getData()"
style="min-width: 150px"
/>
map-options
emit-value
>
<template v-if="formFilter.root" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="(formFilter.root = null), fetchListOrg()"
class="cursor-pointer"
/> </template
></q-select>
</q-toolbar>
<q-toolbar class="col-4 q-pa-none q-gutter-x-sm">
<q-space />

View file

@ -401,7 +401,7 @@ onMounted(() => {
<q-space />
<q-btn
<!-- <q-btn
flat
round
dense
@ -410,7 +410,7 @@ onMounted(() => {
@click="onDownload"
>
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
</q-btn> -->
<q-input
standout