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