Merge branch 'working' into develop
This commit is contained in:
commit
19e41782c0
7 changed files with 87 additions and 72 deletions
|
|
@ -489,9 +489,9 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
v-model="formData.title"
|
v-model="formData.title"
|
||||||
:rules="[(val) => !!val || 'กรุณากรอกอุทธรณ์/ร้องทุกข์']"
|
:rules="[(val) => !!val || 'กรุณากรอกเรื่องอุทธรณ์/ร้องทุกข์']"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
label="อุทธรณ์/ร้องทุกข์"
|
label="เรื่องอุทธรณ์/ร้องทุกข์"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -411,9 +411,9 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12" v-if="store.currentStep == 8"><q-separator /></div>
|
||||||
<div class="row col-12 q-pa-sm">
|
<div class="row col-12 q-pa-sm" v-if="store.currentStep == 8">
|
||||||
<div v-if="store.currentStep == 8" class="row col-12">
|
<div class="row col-12">
|
||||||
<q-file
|
<q-file
|
||||||
ref="fileEvaluation81Ref"
|
ref="fileEvaluation81Ref"
|
||||||
v-model="fileEvaluation81"
|
v-model="fileEvaluation81"
|
||||||
|
|
@ -497,9 +497,9 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12" v-if="store.currentStep == 8"><q-separator /></div>
|
||||||
<div class="col-12 q-pa-sm">
|
<div class="col-12 q-pa-sm" v-if="store.currentStep == 8">
|
||||||
<div v-if="store.currentStep == 8" class="row col-12">
|
<div class="row col-12">
|
||||||
<q-file
|
<q-file
|
||||||
ref="fileEvaluation82Ref"
|
ref="fileEvaluation82Ref"
|
||||||
v-model="fileEvaluation82"
|
v-model="fileEvaluation82"
|
||||||
|
|
@ -581,9 +581,9 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12" v-if="store.currentStep == 8"><q-separator /></div>
|
||||||
<div class="col-12 q-pa-sm">
|
<div class="col-12 q-pa-sm" v-if="store.currentStep == 8">
|
||||||
<div v-if="store.currentStep == 8" class="row col-12">
|
<div class="row col-12">
|
||||||
<q-file
|
<q-file
|
||||||
ref="fileEvaluation83Ref"
|
ref="fileEvaluation83Ref"
|
||||||
v-model="fileEvaluation83"
|
v-model="fileEvaluation83"
|
||||||
|
|
@ -666,9 +666,9 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12" v-if="store.currentStep == 8"><q-separator /></div>
|
||||||
<div class="col-12 q-pa-sm">
|
<div class="col-12 q-pa-sm" v-if="store.currentStep == 8">
|
||||||
<div v-if="store.currentStep == 8" class="row col-12">
|
<div class="row col-12">
|
||||||
<q-file
|
<q-file
|
||||||
ref="fileEvaluation84Ref"
|
ref="fileEvaluation84Ref"
|
||||||
v-model="fileEvaluation84"
|
v-model="fileEvaluation84"
|
||||||
|
|
@ -751,10 +751,10 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12" v-if="store.currentStep == 8"><q-separator /></div>
|
||||||
<div class="col-12 q-pa-sm">
|
<div class="col-12 q-pa-sm" v-if="store.currentStep == 8">
|
||||||
<div class="row q-col-gutter-md col-12">
|
<div class="row q-col-gutter-md col-12">
|
||||||
<div v-if="store.currentStep == 8" class="row col-12">
|
<div class="row col-12">
|
||||||
<q-file
|
<q-file
|
||||||
ref="fileEvaluation85Ref"
|
ref="fileEvaluation85Ref"
|
||||||
v-model="fileEvaluation85"
|
v-model="fileEvaluation85"
|
||||||
|
|
@ -835,9 +835,9 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12" v-if="store.currentStep == 8"><q-separator /></div>
|
||||||
<div class="col-12 q-pa-sm">
|
<div class="col-12 q-pa-sm" v-if="store.currentStep == 8">
|
||||||
<div v-if="store.currentStep == 8" class="row col-12">
|
<div class="row col-12">
|
||||||
<q-file
|
<q-file
|
||||||
ref="fileEvaluation86Ref"
|
ref="fileEvaluation86Ref"
|
||||||
v-model="fileEvaluation86"
|
v-model="fileEvaluation86"
|
||||||
|
|
|
||||||
|
|
@ -26,13 +26,13 @@ function copyLink() {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="row q-pa-md">
|
<div class="row q-pa-md">
|
||||||
<div class="col-12 row items-center justify-center">
|
<div class="col-12 row items-center justify-center q-col-gutter-sm">
|
||||||
<div class="row"><strong>Public URL : </strong>
|
<div class="row q-pr-md"><strong>Public URL : </strong>
|
||||||
<a :href="`${link}/${id}`" class="q-pl-sm"> {{link}}/{{ id }}
|
<a :href="`${link}/${id}`" class="q-pl-sm"> {{link}}/{{ id }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<q-space/>
|
<q-space/>
|
||||||
<div class="q-pt-sm">
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
outline
|
outline
|
||||||
icon="mdi-content-copy"
|
icon="mdi-content-copy"
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ function addData(formData: any) {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="$router.push(`/evaluate/meeting`)"
|
@click="$router.push(`/evaluate/meeting`)"
|
||||||
/>
|
/>
|
||||||
เพิ่มรายการการประชุม
|
เพิ่มการประชุม
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Form :on-submit="onSubmit" />
|
<Form :on-submit="onSubmit" />
|
||||||
|
|
|
||||||
|
|
@ -273,6 +273,7 @@ onMounted(() => {
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
for="selectDate"
|
for="selectDate"
|
||||||
|
ref="dateMeetingStartRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -283,6 +284,7 @@ onMounted(() => {
|
||||||
"
|
"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'วันเวลาที่เริ่มต้นการประชุม'}`"
|
:label="`${'วันเวลาที่เริ่มต้นการประชุม'}`"
|
||||||
|
:rules="[(val: string) => !!val || `${'กรุณาเลือกวันเวลาที่เริ่มต้นการประชุม'}`]"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer text-primary">
|
<q-icon name="event" class="cursor-pointer text-primary">
|
||||||
|
|
@ -309,6 +311,7 @@ onMounted(() => {
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
for="selectDate"
|
for="selectDate"
|
||||||
|
ref="dateMeetingEndRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -318,7 +321,8 @@ onMounted(() => {
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'วันเวลาที่สิ้นสุด'}`"
|
:label="`${'วันเวลาสิ้นสุดการประชุม'}`"
|
||||||
|
:rules="[(val: string) => !!val || `${'กรุณาเลือกวันเวลาสิ้นสุดการประชุม'}`]"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer text-primary">
|
<q-icon name="event" class="cursor-pointer text-primary">
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ function filterFn() {
|
||||||
color="add"
|
color="add"
|
||||||
icon="mdi-plus"
|
icon="mdi-plus"
|
||||||
>
|
>
|
||||||
<q-tooltip>เพิ่มรายชื่อกรรมการ</q-tooltip>
|
<q-tooltip>เพิ่มการประชุม</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
|
||||||
|
|
@ -54,14 +54,7 @@ const role = ref<string[]>([]);
|
||||||
const notiTrigger = ref<boolean>(false);
|
const notiTrigger = ref<boolean>(false);
|
||||||
const text = ref<string>("");
|
const text = ref<string>("");
|
||||||
|
|
||||||
const notiList = ref<notiType[]>([
|
const notiList = ref<notiType[]>([]);
|
||||||
{
|
|
||||||
id: "1",
|
|
||||||
sender: "ท",
|
|
||||||
body: "ขอแก้ไขข้อมูลทะเบียนประวัติ",
|
|
||||||
timereceive: new Date(),
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const options = ref<optionType[]>([
|
const options = ref<optionType[]>([
|
||||||
{
|
{
|
||||||
icon: "mdi-account-cog",
|
icon: "mdi-account-cog",
|
||||||
|
|
@ -83,29 +76,49 @@ const options = ref<optionType[]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const getDataNotification = async (index: number) => {
|
const getDataNotification = async (index: number, type: string) => {
|
||||||
// showLoader();
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.msgNotificate + `?page=${index}&pageSize=${20}`)
|
.get(config.API.msgNotificate + `?page=${index}&pageSize=${20}`)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const response = res.data.result.data;
|
const response = res.data.result.data;
|
||||||
totalInbox.value = res.data.result.total;
|
|
||||||
let list: notiType[] = [];
|
let list: notiType[] = [];
|
||||||
response.map((e: any) => {
|
|
||||||
list.push({
|
if (type === "DEL") {
|
||||||
id: e.id,
|
totalInbox.value = res.data.result.total;
|
||||||
sender:
|
if (notiList.value.length === 16) {
|
||||||
e.createdFullName == "" || e.createdFullName == null
|
notiList.value = [];
|
||||||
? "เจ้าหน้าที่"[0]
|
response.map((e: any) => {
|
||||||
: e.createdFullName[0],
|
list.push({
|
||||||
body: e.body ?? "",
|
id: e.id,
|
||||||
timereceive: new Date(e.receiveDate),
|
sender:
|
||||||
|
e.createdFullName == "" || e.createdFullName == null
|
||||||
|
? "เจ้าหน้าที่"[0]
|
||||||
|
: e.createdFullName[0],
|
||||||
|
body: e.body ?? "",
|
||||||
|
timereceive: new Date(e.receiveDate),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
notiList.value.push(...list);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
response.map((e: any) => {
|
||||||
|
list.push({
|
||||||
|
id: e.id,
|
||||||
|
sender:
|
||||||
|
e.createdFullName == "" || e.createdFullName == null
|
||||||
|
? "เจ้าหน้าที่"[0]
|
||||||
|
: e.createdFullName[0],
|
||||||
|
body: e.body ?? "",
|
||||||
|
timereceive: new Date(e.receiveDate),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
notiList.value.push(...list);
|
||||||
notiList.value.push(...list);
|
totalInbox.value = res.data.result.total;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
// messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// hideLoader();
|
// hideLoader();
|
||||||
|
|
@ -219,7 +232,7 @@ onMounted(async () => {
|
||||||
await fetchroleUser(keycloak.tokenParsed.role);
|
await fetchroleUser(keycloak.tokenParsed.role);
|
||||||
}
|
}
|
||||||
|
|
||||||
await getDataNotification(1);
|
await getDataNotification(1, "NOMAL");
|
||||||
myEventHandler(null, false);
|
myEventHandler(null, false);
|
||||||
window.addEventListener("resize", (e: any) => {
|
window.addEventListener("resize", (e: any) => {
|
||||||
myEventHandler(e, true);
|
myEventHandler(e, true);
|
||||||
|
|
@ -410,32 +423,30 @@ if (keycloak.tokenParsed != null) {
|
||||||
role.value = keycloak.tokenParsed.role;
|
role.value = keycloak.tokenParsed.role;
|
||||||
}
|
}
|
||||||
|
|
||||||
const deleteData = async (id: string) => {
|
const clickDelete = async (id: string, index: number) => {
|
||||||
console.log("delete=", id);
|
dialogRemove($q, async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.msgId(id))
|
.delete(config.API.msgId(id))
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
notiList.value.splice(index, 1);
|
||||||
})
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e);
|
.catch((e) => {
|
||||||
})
|
messageError($q, e);
|
||||||
.finally(async () => {
|
})
|
||||||
getDataNotification(1);
|
.finally(async () => {
|
||||||
hideLoader();
|
getDataNotification(1, "DEL");
|
||||||
});
|
hideLoader();
|
||||||
};
|
});
|
||||||
|
});
|
||||||
const clickDelete = (id: string) => {
|
|
||||||
dialogRemove($q, () => deleteData(id));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const totalInbox = ref<number>(0);
|
const totalInbox = ref<number>(0);
|
||||||
function onLoad(index: any, done: any) {
|
function onLoad(index: any, done: any) {
|
||||||
if (notiList.value.length < totalInbox.value) {
|
if (notiList.value.length < totalInbox.value) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getDataNotification(index + 1);
|
getDataNotification(index + 1, "NOMAL");
|
||||||
done();
|
done();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
@ -510,8 +521,8 @@ function onLoad(index: any, done: any) {
|
||||||
>
|
>
|
||||||
<q-list
|
<q-list
|
||||||
style="min-width: 300px"
|
style="min-width: 300px"
|
||||||
v-for="n in notiList"
|
v-for="(n, index) in notiList"
|
||||||
:key="n.id"
|
:key="index"
|
||||||
>
|
>
|
||||||
<q-item v-ripple class="mytry q-py-xs" dense>
|
<q-item v-ripple class="mytry q-py-xs" dense>
|
||||||
<q-item-section avatar top style="min-width: 40px">
|
<q-item-section avatar top style="min-width: 40px">
|
||||||
|
|
@ -537,7 +548,7 @@ function onLoad(index: any, done: any) {
|
||||||
dense
|
dense
|
||||||
icon="mdi-close"
|
icon="mdi-close"
|
||||||
class="mybtn q-mx-xs"
|
class="mybtn q-mx-xs"
|
||||||
@click="clickDelete(n.id)"
|
@click="clickDelete(n.id, index)"
|
||||||
></q-btn>
|
></q-btn>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-separator color="grey-2" />
|
<q-separator color="grey-2" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue