แก้ไขบัคปรับ ui
รายการคำขอประเมิน การประชุม
This commit is contained in:
parent
7065ea1a5d
commit
6b7e8eda4a
3 changed files with 54 additions and 8 deletions
|
|
@ -11,7 +11,9 @@ import config from "@/app.config";
|
||||||
import type { formData } from "@/modules/09_leave/interface/request/workTime";
|
import type { formData } from "@/modules/09_leave/interface/request/workTime";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const personalId = ref<string>(route.params.id.toString());
|
const personalId = ref<string>(route.params.id as string);
|
||||||
|
console.log(personalId.value);
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
|
|
@ -21,6 +23,7 @@ const {
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
success,
|
success,
|
||||||
date2Thai,
|
date2Thai,
|
||||||
|
dateToISO,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/**เมื่อเริ่มโหลดหน้า
|
/**เมื่อเริ่มโหลดหน้า
|
||||||
|
|
@ -53,7 +56,6 @@ const fetchData = async () => {
|
||||||
.get(config.API.meetingById(personalId.value))
|
.get(config.API.meetingById(personalId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const dataApi = res.data.result;
|
const dataApi = res.data.result;
|
||||||
personalId.value = dataApi.id;
|
|
||||||
data.title = dataApi.Tittle;
|
data.title = dataApi.Tittle;
|
||||||
data.rounded = dataApi.Round;
|
data.rounded = dataApi.Round;
|
||||||
data.consider = dataApi.Result;
|
data.consider = dataApi.Result;
|
||||||
|
|
@ -78,16 +80,18 @@ const fetchData = async () => {
|
||||||
*/
|
*/
|
||||||
function onSubmit(formData: FormData) {
|
function onSubmit(formData: FormData) {
|
||||||
dialogConfirm($q, () => putData(formData));
|
dialogConfirm($q, () => putData(formData));
|
||||||
|
console.log(personalId.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function putData(formData: FormData) {
|
function putData(formData: FormData) {
|
||||||
|
console.log(personalId.value);
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(config.API.meetingById(personalId.value), {
|
.put(config.API.meetingById(personalId.value), {
|
||||||
Round: formData.rounded ?? "",
|
Round: formData.rounded ?? "",
|
||||||
Tittle: formData.title,
|
Tittle: formData.title,
|
||||||
DateStart: formData.dateMeetingStart,
|
DateStart: dateToISO(formData.dateMeetingStart),
|
||||||
DateEnd: formData.dateMeetingEnd,
|
DateEnd: dateToISO(formData.dateMeetingEnd),
|
||||||
Result: formData.consider,
|
Result: formData.consider,
|
||||||
Duration: formData.period,
|
Duration: formData.period,
|
||||||
})
|
})
|
||||||
|
|
@ -98,7 +102,8 @@ function putData(formData: FormData) {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
router.push(`/discipline/meeting`);
|
hideLoader();
|
||||||
|
router.push(`/evaluate/meeting`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ interface MainList {
|
||||||
interface FormData {
|
interface FormData {
|
||||||
rounded: string;
|
rounded: string;
|
||||||
dateMeeting: string;
|
dateMeeting: string;
|
||||||
dateMeetingStart: Date | null;
|
dateMeetingStart: Date;
|
||||||
dateMeetingEnd: Date | null;
|
dateMeetingEnd: Date;
|
||||||
consider: string;
|
consider: string;
|
||||||
period: string;
|
period: string;
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,10 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function filterFn() {
|
||||||
|
getList();
|
||||||
|
console.log("enter", filter.value);
|
||||||
|
}
|
||||||
function getList() {
|
function getList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
|
|
@ -68,7 +72,9 @@ function getList() {
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||||
const data = res.data.result;
|
const data = res.data.result.data;
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
store.fetchData(data);
|
store.fetchData(data);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -92,6 +98,41 @@ onMounted(async () => {
|
||||||
รายการคำขอประเมิน
|
รายการคำขอประเมิน
|
||||||
</div>
|
</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm q-pt-sm q-pa-md">
|
<q-card flat bordered class="col-12 q-mt-sm q-pt-sm q-pa-md">
|
||||||
|
<div class="row col-12 q-col-gutter-sm q-mb-sm">
|
||||||
|
<q-space />
|
||||||
|
<q-input
|
||||||
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
|
id="filterTable"
|
||||||
|
for="filterTable"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
v-model="filter"
|
||||||
|
label="ค้นหา"
|
||||||
|
debounce="300"
|
||||||
|
@keydown.enter.prevent="filterFn"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
|
||||||
|
<q-select
|
||||||
|
id="visibleColumns"
|
||||||
|
for="visibleColumns"
|
||||||
|
v-model="store.visibleColumns"
|
||||||
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="store.columns"
|
||||||
|
option-value="name"
|
||||||
|
options-cover
|
||||||
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<d-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue