รายการโครงการ => fix bug
This commit is contained in:
parent
dd2ee43bab
commit
4842a8de5f
1 changed files with 107 additions and 124 deletions
|
|
@ -168,7 +168,6 @@ function onDownload() {
|
|||
/** function ปิด Dialog เพิ่มโครงการ/หลักสูตรการฝึกอบรม*/
|
||||
function closeDialog() {
|
||||
modal.value = false;
|
||||
|
||||
formProject.year = null;
|
||||
formProject.projectName = "";
|
||||
formProject.orgRevisionId = "";
|
||||
|
|
@ -213,7 +212,6 @@ function fetchActive() {
|
|||
* @param id โครงสร้างปจุบัน
|
||||
*/
|
||||
function fetchTree(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.orgByid(id.toString()))
|
||||
.then((res) => {
|
||||
|
|
@ -223,8 +221,6 @@ function fetchTree(id: string) {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
@ -338,135 +334,122 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-9 q-pa-md row">
|
||||
<div class="col-12">
|
||||
<q-toolbar style="padding: 0">
|
||||
<div class="row items-center q-gutter-sm">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formQuery.year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
style="width: 150px"
|
||||
@update:model-value="fetchListProjectNew"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:model-value="
|
||||
formQuery.year === 0
|
||||
? 'ทั้งหมด'
|
||||
: Number(formQuery.year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-if="formQuery.year" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(formQuery.year = 0), fetchListProjectNew()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
v-model="formQuery.status"
|
||||
:options="statusOpt"
|
||||
label="สถานะโครงการ"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
emit-value
|
||||
map-options
|
||||
@update:model-value="fetchListProjectNew"
|
||||
/>
|
||||
<q-toolbar-title>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="add"
|
||||
color="primary"
|
||||
@click="onAdd()"
|
||||
>
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</q-toolbar-title>
|
||||
</div>
|
||||
<q-space />
|
||||
<div class="row q-gutter-sm">
|
||||
<div>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-arrow-down-bold-circle-outline"
|
||||
color="blue"
|
||||
@click="onDownload"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div>
|
||||
<q-toolbar class="row col-8 q-pa-none q-gutter-x-sm" style="padding: 0">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formQuery.year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
style="width: 150px"
|
||||
@update:model-value="fetchListProjectNew"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="formQuery.keyword"
|
||||
ref="filterRef"
|
||||
lazy-rules
|
||||
outlined
|
||||
placeholder="ค้นหา"
|
||||
@keyup.enter="fetchListProjectNew"
|
||||
:model-value="
|
||||
formQuery.year === 0
|
||||
? 'ทั้งหมด'
|
||||
: Number(formQuery.year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="formQuery.keyword == ''" name="search" />
|
||||
<template v-if="formQuery.year" v-slot:append>
|
||||
<q-icon
|
||||
v-if="formQuery.keyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="
|
||||
(formQuery.keyword = ''),
|
||||
fetchListProject(),
|
||||
(formQuery.page = 1)
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(formQuery.year = 0), fetchListProjectNew()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
<div>
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
</template>
|
||||
</datepicker>
|
||||
<q-select
|
||||
dense
|
||||
outlined
|
||||
v-model="formQuery.status"
|
||||
:options="statusOpt"
|
||||
label="สถานะโครงการ"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
emit-value
|
||||
map-options
|
||||
@update:model-value="fetchListProjectNew"
|
||||
/>
|
||||
<q-toolbar-title>
|
||||
<q-btn flat round dense icon="add" color="primary" @click="onAdd()">
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</q-toolbar-title>
|
||||
|
||||
<q-space />
|
||||
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-arrow-down-bold-circle-outline"
|
||||
color="blue"
|
||||
@click="onDownload"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
v-model="formQuery.keyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
placeholder="ค้นหา"
|
||||
@keyup.enter="fetchListProjectNew"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="formQuery.keyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="formQuery.keyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="
|
||||
(formQuery.keyword = ''),
|
||||
fetchListProject(),
|
||||
(formQuery.page = 1)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
</q-toolbar>
|
||||
|
||||
<div class="col-12">
|
||||
|
|
@ -673,7 +656,7 @@ onMounted(() => {
|
|||
|
||||
.tree-container {
|
||||
overflow: auto;
|
||||
height: 80vh;
|
||||
height: 75vh;
|
||||
border: 1px solid #e6e6e7;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue