(false); //สถานะการแสดงเพิ่มแบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ
+function fetchCheckCommittee() {
+ http
+ .get(config.API.probationCommittee + `/${personalId.value}`)
+ .then((res) => {
+ const data = res.data.result;
+ isCommittee.value = data;
+ })
+ .catch((err) => {
+ messageError($q, err);
+ });
+}
+
function onSearch() {
rows.value = onSearchDataTable(
filterKeyword.value,
@@ -294,7 +301,12 @@ function onSearch() {
/** get ค่า เมื่อโหลดหน้า */
onMounted(async () => {
- await Promise.all([getpersonalList(), getAssignList(), fetchProfilePhoto()]);
+ await Promise.all([
+ getpersonalList(),
+ getAssignList(),
+ fetchProfilePhoto(),
+ fetchCheckCommittee(),
+ ]);
});
@@ -389,8 +401,7 @@ onMounted(async () => {
([]);
const visibleColumnsRespondent = ref([
"info",
"no",
+ "citizenId",
"name",
"position",
"organization",
@@ -102,6 +103,15 @@ const columnsRespondent = ref([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
+ {
+ name: "citizenId",
+ align: "left",
+ label: "เลขประจำตัวประชาชน",
+ sortable: false,
+ field: "citizenId",
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ },
{
name: "name",
align: "left",
@@ -162,7 +172,7 @@ function searchInput() {
showLoader();
const body = {
fieldName: type.value,
- keyword: search.value,
+ keyword: search.value ? search.value.trim() : "",
};
http
.post(
@@ -190,6 +200,7 @@ function searchInput() {
organization: e.organization ?? "-",
phone: e.phone ?? "-",
email: e.email ?? "-",
+ citizenId: e.citizenId ?? "-",
}));
rows.value = list;
@@ -296,7 +307,6 @@ onMounted(async () => {
hide-bottom-space
dense
label="คำค้น"
- :rules="[(val:string) => !!val || `กรุณากรอกคำค้น`]"
>
{
outline
label="ค้นหา"
class="full-width q-py-sm q-px-md"
- @click="searchInput()"
+ @click="(pagination.page = 1), searchInput()"
>
diff --git a/src/modules/18_command/components/DialogPreviewCommand.vue b/src/modules/18_command/components/DialogPreviewCommand.vue
index 68aa9a5d9..fba7461de 100644
--- a/src/modules/18_command/components/DialogPreviewCommand.vue
+++ b/src/modules/18_command/components/DialogPreviewCommand.vue
@@ -125,18 +125,6 @@ async function fetchDataCommand(type: string) {
.finally(() => {
hideLoader();
});
- // await http
- // .get(config.API.commandRegisterByType(commandId.value, type))
- // .then(async (res) => {
- // const dataMain = await res.data.result;
- // if (type === "cover") {
- // dataCover.value = dataMain;
- // issue.value = await res.data.result.data.commandTitle;
- // await fetchPDF(dataCover.value);
- // } else {
- // dataAttachment.value = dataMain;
- // }
- // });
}
/** ฟังชั่นกำหนดค่าของ PDF*/
@@ -165,29 +153,6 @@ async function fetchPDF(data: any, type: string = "docx?folder=command") {
messageError($q, err);
isLoadView.value = true;
});
-
- // await axios
- // .post(config.API.reportTemplate + `/${type}`, data, {
- // headers: {
- // accept: "application/pdf",
- // "content-Type": "application/json",
- // },
- // responseType: "blob",
- // })
- // .then(async (res) => {
- // const blob = new Blob([res.data]);
- // const objectUrl = URL.createObjectURL(blob);
- // const pdfData = usePDF(`${objectUrl}`);
- // setTimeout(() => {
- // pdfSrc.value = pdfData.pdf.value;
- // numOfPages.value = pdfData.pages.value;
- // isLoadView.value = true;
- // }, 1500);
- // })
- // .catch(async (e) => {
- // messageError($q, e);
- // isLoadView.value = true;
- // });
}
watch(
@@ -205,6 +170,9 @@ watch(
.finally(() => {
hideLoader();
});
+ } else {
+ tab.value = "main";
+ pdfSrc.value = undefined;
}
}
);
diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue
index 9712517f2..bfa7c088b 100644
--- a/src/views/MainLayout.vue
+++ b/src/views/MainLayout.vue
@@ -84,13 +84,7 @@ const modalLoginLinkage = ref(false); //เข้าสู่ระบ
// landing page redirect
const landingPageUrl = ref(getLandingUrl());
function getLandingUrl() {
- if (window.location.hostname === "bmasso.bma.go.th") {
- return `${configParam.landingPageUrl}/landing?mode=dev`;
- } else if (window.location.hostname === "bma-ehr.frappet.com") {
- return `${configParam.landingPageUrl}/landing?mode=prod`;
- } else {
- return `${configParam.landingPageUrl}/landing?mode=dev`;
- }
+ return `${configParam.landingPageUrl}/landing`;
}
async function fetchmsgNoread() {