fix bug
This commit is contained in:
parent
4842a8de5f
commit
7a3e916039
4 changed files with 45 additions and 13 deletions
|
|
@ -786,7 +786,6 @@ onMounted(() => {
|
||||||
<q-dialog v-model="modal" class="dialog" persistent>
|
<q-dialog v-model="modal" class="dialog" persistent>
|
||||||
<q-card style="min-width: 80%">
|
<q-card style="min-width: 80%">
|
||||||
<q-form @submit.prevent greedy @validation-success="onSubmit(typeForm)">
|
<q-form @submit.prevent greedy @validation-success="onSubmit(typeForm)">
|
||||||
{{ typeForm }} {{ isEdit }}
|
|
||||||
<DialogHeader
|
<DialogHeader
|
||||||
:tittle="
|
:tittle="
|
||||||
isEdit
|
isEdit
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ const pagination = ref({
|
||||||
});
|
});
|
||||||
|
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
const agencyOp = ref<[]>([]);
|
const agencyOp = ref<any[]>([]);
|
||||||
const itemMenu = ref<ItemsMenu[]>([
|
const itemMenu = ref<ItemsMenu[]>([
|
||||||
{
|
{
|
||||||
label: "ไฟล์ .xlsx",
|
label: "ไฟล์ .xlsx",
|
||||||
|
|
@ -136,11 +136,18 @@ function fetchListOrg() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.developmentHistoryListOrg("employee", formFilter.year))
|
.get(config.API.developmentHistoryListOrg("employee", formFilter.year))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
formFilter.root = null;
|
formFilter.root = null;
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
agencyOp.value = res.data.result;
|
const option = [{ name: "ทั้งหมด", id: null }];
|
||||||
getData();
|
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) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -296,7 +303,17 @@ onMounted(() => {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
@update:model-value="(formFilter.page = 1), getData()"
|
@update:model-value="(formFilter.page = 1), getData()"
|
||||||
style="min-width: 150px"
|
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-btn flat round dense icon="add" color="primary" @click="onAdd()">
|
||||||
<q-tooltip>เพิ่ม</q-tooltip>
|
<q-tooltip>เพิ่ม</q-tooltip>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ const router = useRouter();
|
||||||
const store = useDevelopmentDataStore();
|
const store = useDevelopmentDataStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||||
const agencyOp = ref<[]>([]);
|
const agencyOp = ref<any[]>([]);
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
|
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
|
|
@ -149,12 +149,19 @@ function fetchListOrg() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.developmentHistoryListOrg("officer", formFilter.year))
|
.get(config.API.developmentHistoryListOrg("officer", formFilter.year))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
|
console.log(res);
|
||||||
formFilter.root = null;
|
formFilter.root = null;
|
||||||
formFilter.page = 1;
|
formFilter.page = 1;
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
agencyOp.value = res.data.result;
|
const option = [{ name: "ทั้งหมด", id: null }];
|
||||||
getData();
|
const optionNew = await res.data.result.map((e: string) => ({
|
||||||
|
name: e,
|
||||||
|
id: e,
|
||||||
|
}));
|
||||||
|
option.push(...optionNew);
|
||||||
|
agencyOp.value = option;
|
||||||
|
await getData();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -313,7 +320,16 @@ onMounted(() => {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
@update:model-value="(formFilter.page = 1), getData()"
|
@update:model-value="(formFilter.page = 1), getData()"
|
||||||
style="min-width: 150px"
|
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>
|
||||||
<q-toolbar class="col-4 q-pa-none q-gutter-x-sm">
|
<q-toolbar class="col-4 q-pa-none q-gutter-x-sm">
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
|
||||||
|
|
@ -401,7 +401,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
|
|
@ -410,7 +410,7 @@ onMounted(() => {
|
||||||
@click="onDownload"
|
@click="onDownload"
|
||||||
>
|
>
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
standout
|
standout
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue