Merge branch 'develop' into nice_dev
This commit is contained in:
commit
42c0eb669f
11 changed files with 604 additions and 346 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
import env from "../index";
|
import env from "../index";
|
||||||
const discipline = `${env.API_URI}/discipline`;
|
const discipline = `${env.API_URI}/discipline/disciplinary`;
|
||||||
const investigate = `${env.API_URI}/discipline/investigate`;
|
const investigate = `${env.API_URI}/discipline/investigate`;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -46,18 +46,18 @@ export default {
|
||||||
investigateApprove: (id: string) => `${investigate}/approve/${id}`,
|
investigateApprove: (id: string) => `${investigate}/approve/${id}`,
|
||||||
|
|
||||||
/** ระบบวินัยเรื่องสอบสวน */
|
/** ระบบวินัยเรื่องสอบสวน */
|
||||||
disciplineDisciplinary: () => `${discipline}/disciplinary`,
|
disciplineDisciplinary: () => `${discipline}`,
|
||||||
disciplineDisciplinaryById: (id: string) =>
|
disciplineDisciplinaryById: (id: string) => `${discipline}/${id}`,
|
||||||
`${discipline}/disciplinary/${id}`,
|
disciplineInvestigateById: (id: string) => `${discipline}/investigate/${id}`,
|
||||||
disciplineInvestigateById: (id: string) =>
|
disciplineComplaintsById: (id: string) => `${discipline}/complaint/${id}`,
|
||||||
`${discipline}/disciplinary/investigate/${id}`,
|
|
||||||
disciplineComplaintsById: (id: string) =>
|
|
||||||
`${discipline}/disciplinary/complaint/${id}`,
|
|
||||||
disciplineDirector: () => `${discipline}/director`,
|
disciplineDirector: () => `${discipline}/director`,
|
||||||
disciplineDoc: (type: string, id: string) =>
|
disciplineDoc: (type: string, id: string) =>
|
||||||
`${discipline}/disciplinary/${type}/file/${id}`,
|
`${discipline}/${type}/file/${id}`,
|
||||||
disciplineByIdDoc: (type: string, id: string, docId: string) =>
|
disciplineByIdDoc: (type: string, id: string, docId: string) =>
|
||||||
`${discipline}/disciplinary/${type}/file/${id}/${docId}`,
|
`${discipline}/disciplinary/${type}/file/${id}/${docId}`,
|
||||||
|
disciplinaryReject: (id: string) => `${discipline}/reject/${id}`,
|
||||||
|
disciplinaryResume: (id: string) => `${discipline}/resume/${id}`,
|
||||||
|
disciplinaryApprove: (id: string) => `${discipline}/approve/${id}`,
|
||||||
|
|
||||||
/** รายการผลการพิจารณาทางวินัย*/
|
/** รายการผลการพิจารณาทางวินัย*/
|
||||||
listResult: () => `${discipline}/result`,
|
listResult: () => `${discipline}/result`,
|
||||||
|
|
|
||||||
|
|
@ -452,7 +452,7 @@ const menuList = readonly<any[]>([
|
||||||
role: "discipline",
|
role: "discipline",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 11.6,
|
key: 11.5,
|
||||||
label: "รายงาน",
|
label: "รายงาน",
|
||||||
path: "disciplineReport",
|
path: "disciplineReport",
|
||||||
role: "discipline",
|
role: "discipline",
|
||||||
|
|
@ -460,7 +460,7 @@ const menuList = readonly<any[]>([
|
||||||
{
|
{
|
||||||
label: "ข้อมูลพื้นฐาน",
|
label: "ข้อมูลพื้นฐาน",
|
||||||
path: "",
|
path: "",
|
||||||
key: 11.6,
|
key: 11.7,
|
||||||
role: "discipline",
|
role: "discipline",
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -26,33 +26,6 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
||||||
const selectDate = ref<Date | null>(new Date());
|
const selectDate = ref<Date | null>(new Date());
|
||||||
const fiscalYear = ref<string | null>("0");
|
const fiscalYear = ref<string | null>("0");
|
||||||
const DataMainOrig = ref<DataRows[]>([]); // ข้อมูลหลักดั้งเดิม
|
const DataMainOrig = ref<DataRows[]>([]); // ข้อมูลหลักดั้งเดิม
|
||||||
// async function fecthList(data: ListData[]) {
|
|
||||||
// let datalist: DataRows[] = data.map((e: ListData) => ({
|
|
||||||
// id: e.id,
|
|
||||||
// fullname: e.fullname,
|
|
||||||
// date: date2Thai(new Date(e.date), false, true),
|
|
||||||
// dateFix: date2Thai(new Date(e.dateFix)),
|
|
||||||
// timeMorning:
|
|
||||||
// e.startTimeMorning == null
|
|
||||||
// ? "-"
|
|
||||||
// : e.startTimeMorning + " - " + e.endTimeMorning,
|
|
||||||
// timeAfternoon:
|
|
||||||
// e.startTimeAfternoon == null
|
|
||||||
// ? "-"
|
|
||||||
// : e.startTimeAfternoon + " - " + e.endTimeAfternoon,
|
|
||||||
// startTimeMorning: e.startTimeMorning,
|
|
||||||
// endTimeMorning: e.endTimeMorning,
|
|
||||||
// startTimeAfternoon: e.startTimeAfternoon,
|
|
||||||
// endTimeAfternoon: e.endTimeAfternoon,
|
|
||||||
// checkIn: e.checkOut,
|
|
||||||
// checkOut: e.checkOut,
|
|
||||||
// status: e.status,
|
|
||||||
// checkInStatus: convertStatus(e.checkInStatus),
|
|
||||||
// checkOutStatus: convertStatus(e.checkOutStatus),
|
|
||||||
// }));
|
|
||||||
// rows.value = datalist;
|
|
||||||
// DataMainOrig.value = datalist;
|
|
||||||
// }
|
|
||||||
const DataMainUpdate = ref<DataRows[]>([]); // ข้อมูลเปลี่ยนแปลง
|
const DataMainUpdate = ref<DataRows[]>([]); // ข้อมูลเปลี่ยนแปลง
|
||||||
const DataMain = (val: DataRows[]) => (DataMainOrig.value = val);
|
const DataMain = (val: DataRows[]) => (DataMainOrig.value = val);
|
||||||
const DataUpdate = (filterYear: string) => {
|
const DataUpdate = (filterYear: string) => {
|
||||||
|
|
@ -68,15 +41,16 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
||||||
const year = ref<number>(2023);
|
const year = ref<number>(2023);
|
||||||
const month = ref<number>(11);
|
const month = ref<number>(11);
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
|
const total = ref<number>(0);
|
||||||
const pageSize = ref<number>(10);
|
const pageSize = ref<number>(10);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
|
const maxPage = ref<number>(0);
|
||||||
// Pagination - update rowsPerPage
|
// Pagination - update rowsPerPage
|
||||||
async function updatePagination(newPagination: any) {
|
// async function updatePagination(newPagination: any) {
|
||||||
initialPagination.value = newPagination;
|
// initialPagination.value = newPagination;
|
||||||
// currentPage.value = 1;
|
// // currentPage.value = 1;
|
||||||
console.log("updatePagination");
|
// console.log("updatePagination");
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Pagination - initial pagination
|
// Pagination - initial pagination
|
||||||
const initialPagination = ref<any>({
|
const initialPagination = ref<any>({
|
||||||
|
|
@ -86,21 +60,6 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
||||||
// rowsPerPage: pageSize,
|
// rowsPerPage: pageSize,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Pagination - page & change page & get new data
|
|
||||||
// const currentPage = ref<number>(1);
|
|
||||||
// watch(
|
|
||||||
// [() => currentPage.value, () => initialPagination.value.rowsPerPage],
|
|
||||||
// () => {
|
|
||||||
// emit(
|
|
||||||
// "update:change-page",
|
|
||||||
// currentPage.value,
|
|
||||||
// initialPagination.value.rowsPerPage,
|
|
||||||
// true
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
|
|
||||||
// const emit = defineEmits(["update:change-page"]);
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชั่น api เปลี่ยนหน้า
|
* ฟังก์ชั่น api เปลี่ยนหน้า
|
||||||
* @param pageVal page
|
* @param pageVal page
|
||||||
|
|
@ -123,12 +82,16 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
||||||
config.API.specialTime() +
|
config.API.specialTime() +
|
||||||
`?year=${year.value}&month=${month.value}&page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}`
|
`?year=${year.value}&month=${month.value}&page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}`
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
let data = res.data.result;
|
let data = res.data.result.data;
|
||||||
|
total.value = res.data.result.total;
|
||||||
|
maxPage.value = await Math.ceil(total.value / pageSize.value);
|
||||||
|
maxPage.value = maxPage.value < 1 ? 1 : maxPage.value;
|
||||||
|
rows.value = [];
|
||||||
data.map((e: any) => {
|
data.map((e: any) => {
|
||||||
rows.value.push({
|
rows.value.push({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
fullname: e.fullname,
|
fullname: e.fullName,
|
||||||
date: date2Thai(new Date(e.checkDate), false, true),
|
date: date2Thai(new Date(e.checkDate), false, true),
|
||||||
dateFix: date2Thai(new Date(e.createdAt)),
|
dateFix: date2Thai(new Date(e.createdAt)),
|
||||||
timeMorning:
|
timeMorning:
|
||||||
|
|
@ -299,7 +262,11 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => {
|
||||||
optionStatus,
|
optionStatus,
|
||||||
fetchData,
|
fetchData,
|
||||||
changePage,
|
changePage,
|
||||||
initialPagination,
|
total,
|
||||||
updatePagination,
|
maxPage,
|
||||||
|
year,
|
||||||
|
page,
|
||||||
|
pageSize,
|
||||||
|
month,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ import config from "@/app.config";
|
||||||
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { identity } from "@fullcalendar/core/internal";
|
import { identity } from "@fullcalendar/core/internal";
|
||||||
|
|
||||||
|
/**ตัวแปรที่ใช้ */
|
||||||
const dataSpecialTime = useSpecialTimeStore();
|
const dataSpecialTime = useSpecialTimeStore();
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -20,21 +22,14 @@ const modalUnapprove = ref(false);
|
||||||
const modalApprove = ref(false);
|
const modalApprove = ref(false);
|
||||||
const detailData = ref<any>();
|
const detailData = ref<any>();
|
||||||
const editCheck = ref<string>("");
|
const editCheck = ref<string>("");
|
||||||
|
|
||||||
const pagination = ref({
|
|
||||||
// sortBy: "desc",
|
|
||||||
descending: false,
|
|
||||||
page: 1,
|
|
||||||
rowsPerPage: 10,
|
|
||||||
});
|
|
||||||
|
|
||||||
const dialogTitle = ref<string>("");
|
const dialogTitle = ref<string>("");
|
||||||
const dialogDesc = ref<string>("");
|
const dialogDesc = ref<string>("");
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const reasonNote = ref<string>("");
|
|
||||||
const dateDialog = ref<string>("");
|
const dateDialog = ref<string>("");
|
||||||
const dateFixDialog = ref<string>("");
|
const dateFixDialog = ref<string>("");
|
||||||
|
|
||||||
|
/**ฟังก์ชั่นไม่อนุมัติ */
|
||||||
const unapprove = async (fullname: string, personId: string) => {
|
const unapprove = async (fullname: string, personId: string) => {
|
||||||
id.value = personId;
|
id.value = personId;
|
||||||
dialogTitle.value = " ไม่อนุมัติการลงเวลาพิเศษของ" + fullname;
|
dialogTitle.value = " ไม่อนุมัติการลงเวลาพิเศษของ" + fullname;
|
||||||
|
|
@ -42,6 +37,9 @@ const unapprove = async (fullname: string, personId: string) => {
|
||||||
modalUnapprove.value = true;
|
modalUnapprove.value = true;
|
||||||
// rejectData();
|
// rejectData();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** function Model */
|
||||||
|
//เปิด
|
||||||
function openModal(
|
function openModal(
|
||||||
data: any,
|
data: any,
|
||||||
check: string,
|
check: string,
|
||||||
|
|
@ -60,6 +58,7 @@ function openModal(
|
||||||
}
|
}
|
||||||
console.log(data);
|
console.log(data);
|
||||||
}
|
}
|
||||||
|
//ปิด
|
||||||
const closeDialog = () => {
|
const closeDialog = () => {
|
||||||
modalUnapprove.value = false;
|
modalUnapprove.value = false;
|
||||||
modalApprove.value = false;
|
modalApprove.value = false;
|
||||||
|
|
@ -94,63 +93,63 @@ const resetFilter = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// paging
|
||||||
|
const page = ref<number>(1);
|
||||||
|
const pageSize = ref<number>(10);
|
||||||
|
const filter = ref<string>(""); //search data table
|
||||||
|
/**
|
||||||
|
* ฟังก์ชั่น api เปลี่ยนหน้า
|
||||||
|
* @param pageVal page
|
||||||
|
* @param pageSizeVal pagesize
|
||||||
|
*/
|
||||||
|
async function changePage(pageVal: number, pageSizeVal: number) {
|
||||||
|
// page.value = await pageVal;
|
||||||
|
// pageSize.value = await pageSizeVal;
|
||||||
|
// dataSpecialTime.fetchData();
|
||||||
|
console.log("test");
|
||||||
|
}
|
||||||
|
// Pagination - initial pagination
|
||||||
|
const initialPagination = ref<any>({
|
||||||
|
sortBy: null,
|
||||||
|
descending: false,
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: pageSize, // set ตาม page หลักส่งมา
|
||||||
|
});
|
||||||
|
const emit = defineEmits(["update:change-page"]);
|
||||||
|
// Pagination - page & change page & get new data
|
||||||
|
const currentPage = ref<number>(1);
|
||||||
|
watch(
|
||||||
|
[() => currentPage.value, () => initialPagination.value.rowsPerPage],
|
||||||
|
async () => {
|
||||||
|
dataSpecialTime.page = currentPage.value;
|
||||||
|
await dataSpecialTime.fetchData();
|
||||||
|
// emit(
|
||||||
|
// "update:change-page",
|
||||||
|
// currentPage.value,
|
||||||
|
// initialPagination.value.rowsPerPage,
|
||||||
|
// true
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// Pagination - update rowsPerPage
|
||||||
|
async function updatePagination(newPagination: any) {
|
||||||
|
currentPage.value = 1;
|
||||||
|
dataSpecialTime.pageSize = initialPagination.value.rowsPerPage;
|
||||||
|
dataSpecialTime.page = 1; // set current page เป็น 1 เสมอเมื่อเปลี่ยน per row
|
||||||
|
}
|
||||||
|
|
||||||
|
/**Hook */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// fecthList([
|
console.log("test");
|
||||||
// {
|
await dataSpecialTime.fetchData();
|
||||||
// id: "eefa2f4f-c507-4a42-8567-4fadb8dc1f50",
|
|
||||||
// fullname: "นางสาวณัฐกา ชมสิน",
|
|
||||||
// date: "2023-11-01 08:54",
|
|
||||||
// dateFix: "2023-10-30",
|
|
||||||
// startTimeMorning: "08:00",
|
|
||||||
// endTimeMorning: "12:00",
|
|
||||||
// startTimeAfternoon: "08:00",
|
|
||||||
// endTimeAfternoon: "12:00",
|
|
||||||
// status: "PENDING",
|
|
||||||
// checkInStatus: "normal",
|
|
||||||
// checkOutStatus: "late",
|
|
||||||
// checkIn: "08:00",
|
|
||||||
// checkOut: "12.00",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: "00000000-0000-0000-0000-000000000000",
|
|
||||||
// fullname: "นางสาวรัชภรณ์ ภักดี",
|
|
||||||
// date: "2023-10-30 08:55",
|
|
||||||
// dateFix: "2023-10-29",
|
|
||||||
// startTimeMorning: "08:00",
|
|
||||||
// endTimeMorning: "12:00",
|
|
||||||
// startTimeAfternoon: null,
|
|
||||||
// endTimeAfternoon: null,
|
|
||||||
// status: "APPROVE",
|
|
||||||
// checkInStatus: "normal",
|
|
||||||
// checkOutStatus: "late",
|
|
||||||
// checkIn: "08:00",
|
|
||||||
// checkOut: "12.00",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: "00000000-0000-0000-0000-000000000000",
|
|
||||||
// fullname: "นางสาวภาพรรณ ลออ",
|
|
||||||
// date: "2023-10-31 18:54",
|
|
||||||
// dateFix: "2023-10-30",
|
|
||||||
// startTimeMorning: null,
|
|
||||||
// endTimeMorning: null,
|
|
||||||
// startTimeAfternoon: "13:00",
|
|
||||||
// endTimeAfternoon: "16:30",
|
|
||||||
// status: "REJECT",
|
|
||||||
// checkInStatus: "normal",
|
|
||||||
// checkOutStatus: "late",
|
|
||||||
// checkIn: "08:00",
|
|
||||||
// checkOut: "12.00",
|
|
||||||
// },
|
|
||||||
// ]);
|
|
||||||
dataSpecialTime.fetchData();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** Function Date */
|
||||||
const selectedDate = ref<string>("");
|
const selectedDate = ref<string>("");
|
||||||
const dateMonth = ref<any>({
|
const dateMonth = ref<any>({
|
||||||
month: new Date().getMonth(),
|
month: new Date().getMonth(),
|
||||||
year: new Date().getFullYear(),
|
year: new Date().getFullYear(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const monthYearThai = (val: any) => {
|
const monthYearThai = (val: any) => {
|
||||||
if (val == null) return "";
|
if (val == null) return "";
|
||||||
else return monthYear2Thai(val.month, val.year);
|
else return monthYear2Thai(val.month, val.year);
|
||||||
|
|
@ -244,13 +243,26 @@ const monthYearThai = (val: any) => {
|
||||||
row-key="tb-list"
|
row-key="tb-list"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
:paging="true"
|
:paging="false"
|
||||||
dense
|
dense
|
||||||
:pagination="dataSpecialTime.initialPagination"
|
|
||||||
:visible-columns="dataSpecialTime.visibleColumns"
|
:visible-columns="dataSpecialTime.visibleColumns"
|
||||||
:rows-per-page-options="[1, 10, 25, 50, 100]"
|
:rows-per-page-options="[5, 10, 25, 50, 100]"
|
||||||
@update:pagination="dataSpecialTime.updatePagination"
|
v-model:pagination="initialPagination"
|
||||||
|
@update:pagination="updatePagination"
|
||||||
>
|
>
|
||||||
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ dataSpecialTime.total }} รายการ
|
||||||
|
<q-pagination
|
||||||
|
v-model="currentPage"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max-pages="5"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
:max="Number(dataSpecialTime.maxPage)"
|
||||||
|
></q-pagination>
|
||||||
|
</template>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
|
|
|
||||||
|
|
@ -74,12 +74,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const fileListOj = reactive<ArrayFileList>({
|
|
||||||
id: "",
|
|
||||||
pathName: "",
|
|
||||||
fileName: "",
|
|
||||||
});
|
|
||||||
|
|
||||||
const formData = reactive<FormData>({
|
const formData = reactive<FormData>({
|
||||||
id: "",
|
id: "",
|
||||||
respondentType: "",
|
respondentType: "",
|
||||||
|
|
@ -261,20 +255,20 @@ async function fileUploadDoc(documentFile: any) {
|
||||||
*/
|
*/
|
||||||
function selectLevel(val: string) {
|
function selectLevel(val: string) {
|
||||||
let dayNum = 0;
|
let dayNum = 0;
|
||||||
if (val == "3") {
|
if (val == "VERY_URGENT") {
|
||||||
dayNum = 15; // ด่วนมาก
|
dayNum = 15; // ด่วนมาก
|
||||||
} else if (val == "1") {
|
} else if (val == "URGENT") {
|
||||||
dayNum = 30; // ด่วน
|
dayNum = 30; // ด่วน
|
||||||
} else {
|
} else {
|
||||||
dayNum = 45; // ปกติ
|
dayNum = 45; // ปกติ
|
||||||
}
|
}
|
||||||
// วันแจ้งเตือนล่วงหน้า
|
// วันแจ้งเตือนล่วงหน้า
|
||||||
if (formData.dateConsideration) {
|
if (formData.dateReceived) {
|
||||||
const currentDate = new Date(formData.dateConsideration);
|
const currentDate = new Date(formData.dateReceived);
|
||||||
const newDate = new Date(
|
const newDate = new Date(
|
||||||
currentDate.getTime() + dayNum * 24 * 60 * 60 * 1000
|
currentDate.getTime() + dayNum * 24 * 60 * 60 * 1000
|
||||||
);
|
);
|
||||||
formData.dateNotification = newDate;
|
formData.dateConsideration = newDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -410,6 +404,7 @@ function upLoadFileDoc() {
|
||||||
|
|
||||||
async function addPerson(data: any) {
|
async function addPerson(data: any) {
|
||||||
toggleModal();
|
toggleModal();
|
||||||
|
changeFormData();
|
||||||
await complainstStore.fetchComplainstAdd(data);
|
await complainstStore.fetchComplainstAdd(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -425,20 +420,24 @@ function deletePerson(id: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function removePerson(id: string) {
|
function removePerson(id: string) {
|
||||||
isSave.value = true;
|
changeFormData();
|
||||||
const dataRow = complainstStore.rowsAdd;
|
const dataRow = complainstStore.rowsAdd;
|
||||||
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
const updatedRows = dataRow.filter((item: any) => item.personId !== id);
|
||||||
complainstStore.rowsAdd = updatedRows;
|
complainstStore.rowsAdd = updatedRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getList() {
|
function getListChannel() {
|
||||||
http.get(config.API.complaintListOp()).then((res) => {
|
http.get(config.API.complaintListOp()).then((res) => {
|
||||||
complaintFromtoptions.value = res.data.result.data;
|
complaintFromtoptions.value = res.data.result.data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeFormData() {
|
||||||
|
isSave.value = props.data != null ?? true;
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getListChannel();
|
||||||
getOc();
|
getOc();
|
||||||
complainstStore.columns = columns.value;
|
complainstStore.columns = columns.value;
|
||||||
complainstStore.visibleColumns = visibleColumns.value;
|
complainstStore.visibleColumns = visibleColumns.value;
|
||||||
|
|
@ -487,6 +486,7 @@ onMounted(() => {
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'filterrespondentType'
|
doneFn: Function) => filterSelector(inputValue, doneFn, 'filterrespondentType'
|
||||||
)"
|
)"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
>
|
>
|
||||||
<template v-slot:no-option>
|
<template v-slot:no-option>
|
||||||
<q-item>
|
<q-item>
|
||||||
|
|
@ -522,6 +522,7 @@ onMounted(() => {
|
||||||
label="เลือกสำนักงาน"
|
label="เลือกสำนักงาน"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกสำนักงาน'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกสำนักงาน'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -548,6 +549,7 @@ onMounted(() => {
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'filterconsideredAgencytoptions'
|
doneFn: Function) => filterSelector(inputValue, doneFn, 'filterconsideredAgencytoptions'
|
||||||
)"
|
)"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
>
|
>
|
||||||
<template v-slot:no-option>
|
<template v-slot:no-option>
|
||||||
<q-item>
|
<q-item>
|
||||||
|
|
@ -686,6 +688,7 @@ onMounted(() => {
|
||||||
label="เรื่องร้องเรียน"
|
label="เรื่องร้องเรียน"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="5"
|
rows="5"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -705,6 +708,7 @@ onMounted(() => {
|
||||||
label="รายละเอียดเรื่องร้องเรียน"
|
label="รายละเอียดเรื่องร้องเรียน"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="5"
|
rows="5"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -720,6 +724,7 @@ onMounted(() => {
|
||||||
"
|
"
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
|
|
@ -784,7 +789,8 @@ onMounted(() => {
|
||||||
]"
|
]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
selectLevel(formData.levelConsideration)
|
selectLevel(formData.levelConsideration);
|
||||||
|
changeFormData();
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -793,9 +799,7 @@ onMounted(() => {
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
menu-class-name="modalfix"
|
||||||
v-model="formData.dateConsideration"
|
v-model="formData.dateConsideration"
|
||||||
@update:model-value="
|
@update:model-value="changeFormData()"
|
||||||
selectLevel(formData.levelConsideration)
|
|
||||||
"
|
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
:readonly="
|
:readonly="
|
||||||
formData.status !== 'NEW' && formData.status !== ''
|
formData.status !== 'NEW' && formData.status !== ''
|
||||||
|
|
@ -866,6 +870,7 @@ onMounted(() => {
|
||||||
map-options
|
map-options
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกลักษณะความผิด'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกลักษณะความผิด'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -881,6 +886,7 @@ onMounted(() => {
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
|
|
@ -945,6 +951,7 @@ onMounted(() => {
|
||||||
(val) => !!val || `${'กรุณาเลือกรับเรื่องร้องเรียน'}`,
|
(val) => !!val || `${'กรุณาเลือกรับเรื่องร้องเรียน'}`,
|
||||||
]"
|
]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -964,6 +971,7 @@ onMounted(() => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="5"
|
rows="5"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-12">
|
<div class="col-xs-12 col-sm-12">
|
||||||
|
|
@ -984,6 +992,7 @@ onMounted(() => {
|
||||||
label="ผลการตรวจสอบเรื่องร้องเรียน"
|
label="ผลการตรวจสอบเรื่องร้องเรียน"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="5"
|
rows="5"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1100,7 +1109,7 @@ onMounted(() => {
|
||||||
</q-list>
|
</q-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 q-mt-sm" v-if="fileList.length == 0">
|
<div class="col-12 q-pa-sm" v-if="fileList.length == 0">
|
||||||
<q-card class="q-pa-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
<q-card class="q-pa-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import http from "@/plugins/http";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
const modalPerson = ref<boolean>(false);
|
const modalPerson = ref<boolean>(false);
|
||||||
const toggleModal = () => (modalPerson.value = !modalPerson.value);
|
const toggleModal = () => (modalPerson.value = !modalPerson.value);
|
||||||
/**เรียกใช้ store */
|
/**เรียกใช้ store */
|
||||||
|
|
@ -134,6 +135,15 @@ const initialPagination = ref<any>({
|
||||||
|
|
||||||
/** หัวตาราง */
|
/** หัวตาราง */
|
||||||
const columnsPerson = ref<QTableProps["columns"]>([
|
const columnsPerson = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "info",
|
||||||
|
align: "center",
|
||||||
|
label: "",
|
||||||
|
sortable: false,
|
||||||
|
field: "info",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -210,6 +220,7 @@ const columnsPerson = ref<QTableProps["columns"]>([
|
||||||
|
|
||||||
/** หัวข้อที่เเสดงในตาราง */
|
/** หัวข้อที่เเสดงในตาราง */
|
||||||
const visibleColumnsPerson = ref<string[]>([
|
const visibleColumnsPerson = ref<string[]>([
|
||||||
|
"info",
|
||||||
"no",
|
"no",
|
||||||
"idcard",
|
"idcard",
|
||||||
"name",
|
"name",
|
||||||
|
|
@ -715,7 +726,27 @@ onMounted(async () => {
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div v-else-if="col.name == 'info'">
|
||||||
|
<q-btn
|
||||||
|
size="14px"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
color="info"
|
||||||
|
icon="info"
|
||||||
|
@click="
|
||||||
|
router.push(`/registry/${props.row.personId}`)
|
||||||
|
"
|
||||||
|
><q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-else-if="col.name === 'organization'"
|
||||||
|
class="table_ellipsis"
|
||||||
|
>
|
||||||
|
{{ props.row.organization }}
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -1234,9 +1265,15 @@ onMounted(async () => {
|
||||||
formData.disciplineInvestigateRelevantDocs.length === 0
|
formData.disciplineInvestigateRelevantDocs.length === 0
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-card class="q-pa-md q-ma-xs" bordered> ไม่มีรายการเอกสาร </q-card>
|
<q-card class="q-pa-md q-ma-xs" bordered>
|
||||||
|
ไม่มีรายการเอกสาร
|
||||||
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
<q-list separator class="full-width q-mt-md" v-if="props.data.disciplineInvestigateRelevantDocs.length >0">
|
<q-list
|
||||||
|
separator
|
||||||
|
class="full-width q-mt-md"
|
||||||
|
v-if="props.data.disciplineInvestigateRelevantDocs.length > 0"
|
||||||
|
>
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
v-ripple
|
v-ripple
|
||||||
|
|
@ -1279,94 +1316,94 @@ onMounted(async () => {
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<q-card
|
<q-card bordered class="row col-12" style="border: 1px solid #d6dee1">
|
||||||
bordered
|
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
class="row col-12"
|
อัปโหลดไฟล์เอกสารหลักฐาน
|
||||||
style="border: 1px solid #d6dee1"
|
</div>
|
||||||
|
<div class="col-12"><q-separator /></div>
|
||||||
|
<q-file
|
||||||
|
v-if="formData.status === 'NEW'"
|
||||||
|
class="col-10 q-pa-sm"
|
||||||
|
for="#documentFile"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
v-model="formData.documentFile"
|
||||||
|
label="ไฟล์เอกสารหลักฐาน"
|
||||||
|
hide-bottom-space
|
||||||
>
|
>
|
||||||
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
<template v-slot:prepend>
|
||||||
อัปโหลดไฟล์เอกสารหลักฐาน
|
<q-icon name="attach_file" color="primary" />
|
||||||
</div>
|
</template>
|
||||||
<div class="col-12"><q-separator /></div>
|
</q-file>
|
||||||
<q-file
|
|
||||||
v-if="formData.status === 'NEW'"
|
|
||||||
class="col-10 q-pa-sm"
|
|
||||||
for="#documentFile"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
v-model="formData.documentFile"
|
|
||||||
label="ไฟล์เอกสารหลักฐาน"
|
|
||||||
hide-bottom-space
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon name="attach_file" color="primary" />
|
|
||||||
</template>
|
|
||||||
</q-file>
|
|
||||||
|
|
||||||
<div class="col-2 self-center">
|
|
||||||
<q-btn
|
|
||||||
v-if="formData.documentFile"
|
|
||||||
size="14px"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
color="add"
|
|
||||||
icon="mdi-upload"
|
|
||||||
@click="uploadFile"
|
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-if="formData.disciplineInvestigateDocs.length === 0"
|
|
||||||
class="col-12"
|
|
||||||
>
|
|
||||||
<q-card class="q-pa-md q-ma-xs" bordered> ไม่มีรายการเอกสาร </q-card>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-xs-12 q-pa-sm row" v-if="props.data.disciplineInvestigateDocs.length >0">
|
<div class="col-2 self-center">
|
||||||
<q-list separator class="full-width">
|
<q-btn
|
||||||
<q-item
|
v-if="formData.documentFile"
|
||||||
clickable
|
size="14px"
|
||||||
v-ripple
|
flat
|
||||||
v-for="file in props.data.disciplineInvestigateDocs"
|
round
|
||||||
:key="file.id"
|
dense
|
||||||
>
|
color="add"
|
||||||
<q-item-section>{{ file.fileName }}</q-item-section>
|
icon="mdi-upload"
|
||||||
<q-item-section avatar>
|
@click="uploadFile"
|
||||||
<div class="row">
|
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||||
<div>
|
>
|
||||||
<q-btn
|
</div>
|
||||||
dense
|
<div
|
||||||
flat
|
v-if="formData.disciplineInvestigateDocs.length === 0"
|
||||||
round
|
class="col-12"
|
||||||
size="12px"
|
>
|
||||||
color="blue"
|
<q-card class="q-pa-md q-ma-xs" bordered>
|
||||||
icon="mdi-download-outline"
|
ไม่มีรายการเอกสาร
|
||||||
@click="downloadFile(file.pathName)"
|
</q-card>
|
||||||
>
|
</div>
|
||||||
<q-tooltip>ดาวน์โหลดเอกสารหลักฐาน</q-tooltip>
|
|
||||||
</q-btn>
|
<div
|
||||||
</div>
|
class="col-xs-12 q-pa-sm row"
|
||||||
<div>
|
v-if="props.data.disciplineInvestigateDocs.length > 0"
|
||||||
<q-btn
|
>
|
||||||
v-if="formData.status === 'NEW'"
|
<q-list separator class="full-width">
|
||||||
dense
|
<q-item
|
||||||
flat
|
clickable
|
||||||
round
|
v-ripple
|
||||||
size="12px"
|
v-for="file in props.data.disciplineInvestigateDocs"
|
||||||
color="red"
|
:key="file.id"
|
||||||
icon="mdi-delete-outline"
|
>
|
||||||
@click="deleteFile(file.id)"
|
<q-item-section>{{ file.fileName }}</q-item-section>
|
||||||
><q-tooltip>ลบเอกสารหลักฐาน</q-tooltip></q-btn
|
<q-item-section avatar>
|
||||||
>
|
<div class="row">
|
||||||
</div>
|
<div>
|
||||||
|
<q-btn
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
size="12px"
|
||||||
|
color="blue"
|
||||||
|
icon="mdi-download-outline"
|
||||||
|
@click="downloadFile(file.pathName)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ดาวน์โหลดเอกสารหลักฐาน</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
<div>
|
||||||
</q-item>
|
<q-btn
|
||||||
</q-list>
|
v-if="formData.status === 'NEW'"
|
||||||
</div>
|
dense
|
||||||
</q-card>
|
flat
|
||||||
|
round
|
||||||
|
size="12px"
|
||||||
|
color="red"
|
||||||
|
icon="mdi-delete-outline"
|
||||||
|
@click="deleteFile(file.id)"
|
||||||
|
><q-tooltip>ลบเอกสารหลักฐาน</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -2,23 +2,25 @@
|
||||||
import { onMounted, reactive, ref, watch } from "vue";
|
import { onMounted, reactive, ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import Popup from "@/modules/11_discipline/components/1_Complaint/Popup.vue";
|
||||||
/**import component*/
|
/**import component*/
|
||||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||||
import FormDisciplinary from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue"; // สอบสวนความผิดทางวินัย
|
import FormDisciplinary from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue"; // สอบสวนความผิดทางวินัย
|
||||||
import type { FormData } from "@/modules/11_discipline/interface/request/disciplinary";
|
import type {
|
||||||
|
FormData,
|
||||||
|
PersonsArray,
|
||||||
|
} from "@/modules/11_discipline/interface/request/disciplinary";
|
||||||
import type {
|
import type {
|
||||||
FormData as FormDataComplaint,
|
FormData as FormDataComplaint,
|
||||||
ArrayPerson,
|
ArrayPerson,
|
||||||
ArrayFileList,
|
ArrayFileList,
|
||||||
} from "@/modules/11_discipline/interface/request/complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
|
|
||||||
import type {
|
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
FormData as FormInvestigateFact,
|
|
||||||
} from "@/modules/11_discipline/interface/request/investigateFact";
|
|
||||||
|
|
||||||
/**import store*/
|
/**import store*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
@ -31,9 +33,10 @@ const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
|
const modalPopup = ref<boolean>(false);
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const data = ref<object>();
|
const data = ref<object>();
|
||||||
const status = ref<string>("")
|
const status = ref<string>("");
|
||||||
|
|
||||||
/** function fetchData สอบสวนความผิดทางวินัย*/
|
/** function fetchData สอบสวนความผิดทางวินัย*/
|
||||||
async function fetchDetailDisciplinary() {
|
async function fetchDetailDisciplinary() {
|
||||||
|
|
@ -42,7 +45,7 @@ async function fetchDetailDisciplinary() {
|
||||||
.get(config.API.disciplineDisciplinaryById(id.value))
|
.get(config.API.disciplineDisciplinaryById(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
data.value = res.data.result;
|
data.value = res.data.result;
|
||||||
status.value = res.data.result.status
|
status.value = res.data.result.status;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -64,18 +67,24 @@ async function fetchDetailInvestigate() {
|
||||||
dataInvestigatefacts.respondentType = dataList.respondentType;
|
dataInvestigatefacts.respondentType = dataList.respondentType;
|
||||||
dataInvestigatefacts.persons = dataList.persons;
|
dataInvestigatefacts.persons = dataList.persons;
|
||||||
dataInvestigatefacts.investigationDetail = dataList.investigationDetail;
|
dataInvestigatefacts.investigationDetail = dataList.investigationDetail;
|
||||||
dataInvestigatefacts.investigationDetailOther = dataList.investigationDetailOther;
|
dataInvestigatefacts.investigationDetailOther =
|
||||||
dataInvestigatefacts.investigationDateStart = dataList.investigationDateStart;
|
dataList.investigationDetailOther;
|
||||||
|
dataInvestigatefacts.investigationDateStart =
|
||||||
|
dataList.investigationDateStart;
|
||||||
dataInvestigatefacts.investigationDateEnd = dataList.investigationDateEnd;
|
dataInvestigatefacts.investigationDateEnd = dataList.investigationDateEnd;
|
||||||
dataInvestigatefacts.investigationDescription = dataList.investigationDescription;
|
dataInvestigatefacts.investigationDescription =
|
||||||
dataInvestigatefacts.investigationCauseText = dataList.investigationCauseText;
|
dataList.investigationDescription;
|
||||||
|
dataInvestigatefacts.investigationCauseText =
|
||||||
|
dataList.investigationCauseText;
|
||||||
dataInvestigatefacts.status = dataList.status;
|
dataInvestigatefacts.status = dataList.status;
|
||||||
dataInvestigatefacts.result = dataList.result;
|
dataInvestigatefacts.result = dataList.result;
|
||||||
dataInvestigatefacts.directors = dataList.director;
|
dataInvestigatefacts.directors = dataList.director;
|
||||||
dataInvestigatefacts.disciplineInvestigateDocs = dataList.disciplineInvestigateDocs;
|
dataInvestigatefacts.disciplineInvestigateDocs =
|
||||||
|
dataList.disciplineInvestigateDocs;
|
||||||
dataInvestigatefacts.disciplineInvestigateRelevantDocs =
|
dataInvestigatefacts.disciplineInvestigateRelevantDocs =
|
||||||
dataList.disciplineInvestigateRelevantDocs;
|
dataList.disciplineInvestigateRelevantDocs;
|
||||||
dataInvestigatefacts.investigationStatusResult = dataList.investigationStatusResult;
|
dataInvestigatefacts.investigationStatusResult =
|
||||||
|
dataList.investigationStatusResult;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -155,12 +164,25 @@ const onSubmit = async (id: string) => {
|
||||||
|
|
||||||
/** ยืนยัน ส่งไปออกคำสั่ง */
|
/** ยืนยัน ส่งไปออกคำสั่ง */
|
||||||
function sentIssue() {
|
function sentIssue() {
|
||||||
dialogConfirm(
|
console.log("sent");
|
||||||
$q,
|
modalPopup.value = true;
|
||||||
() => confirmSentIssue(),
|
}
|
||||||
"ยืนยันส่งไปสรุปผลการพิจารณา",
|
|
||||||
"ต้องการยืนยันส่งไปสรุปผลการพิจารณาใช่หรือไม่?"
|
function sentIssueGate() {
|
||||||
);
|
dialogConfirm($q, () => confirmSentIssueGate(),'ยืนยันส่งไปสรุปผลการพิจารณา','ต้องการยืนยันส่งไปสรุปผลการพิจารณาใช่หรือไม่?');
|
||||||
|
}
|
||||||
|
|
||||||
|
function confirmSentIssueGate() {
|
||||||
|
showLoader()
|
||||||
|
http
|
||||||
|
.get(config.API.disciplinaryApprove(id.value))
|
||||||
|
.then((res) => {})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
fetchDetailDisciplinary();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ยืนยัน ยุติเรื่อง */
|
/** ยืนยัน ยุติเรื่อง */
|
||||||
|
|
@ -186,16 +208,41 @@ function cancelInvestigate() {
|
||||||
/** ฟังชั่น ส่งไปออกคำสั่ง*/
|
/** ฟังชั่น ส่งไปออกคำสั่ง*/
|
||||||
function confirmSentIssue() {
|
function confirmSentIssue() {
|
||||||
console.log("sent");
|
console.log("sent");
|
||||||
|
modalPopup.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังชั่น ยุติเรื่อง*/
|
/** ฟังชั่น ยุติเรื่อง*/
|
||||||
function confirmEndInvestigate() {
|
function confirmEndInvestigate() {
|
||||||
console.log("sent");
|
console.log("sent");
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.disciplinaryReject(id.value))
|
||||||
|
.then((res) => {})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
fetchDetailDisciplinary();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังชั่น ยกเลิกการยุติเรื่อง*/
|
/** ฟังชั่น ยกเลิกการยุติเรื่อง*/
|
||||||
function confirmCancelInvestigate() {
|
function confirmCancelInvestigate() {
|
||||||
console.log("sent");
|
console.log("sent");
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.disciplinaryResume(id.value))
|
||||||
|
.then((res) => {})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
fetchDetailDisciplinary();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function closePopup() {
|
||||||
|
modalPopup.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||||
|
|
@ -243,6 +290,125 @@ const fileListObjComplaint = reactive<ArrayFileList>({
|
||||||
fileName: "",
|
fileName: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function emitPerson(data: PersonsArray[]) {
|
||||||
|
console.log(data);
|
||||||
|
// const dataMapId = data.map((item: PersonsArray) => item.id);
|
||||||
|
// console.log(dataMapId);
|
||||||
|
// showLoader();
|
||||||
|
// http
|
||||||
|
// .put(config.API.investigateApprove(id.value), {
|
||||||
|
// persons: dataMapId,
|
||||||
|
// })
|
||||||
|
// .then((res) => {
|
||||||
|
// // router.push(`/discipline/investigatefacts`);
|
||||||
|
// })
|
||||||
|
// .catch((e) => {
|
||||||
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// hideLoader();
|
||||||
|
// fetchDetailDisciplinary();
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** หัวตาราง */
|
||||||
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "info",
|
||||||
|
align: "left",
|
||||||
|
label: "",
|
||||||
|
sortable: false,
|
||||||
|
field: "info",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "no",
|
||||||
|
align: "left",
|
||||||
|
label: "ลำดับ",
|
||||||
|
sortable: false,
|
||||||
|
field: "no",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "idcard",
|
||||||
|
align: "left",
|
||||||
|
label: "เลขบัตรประชาชน",
|
||||||
|
sortable: true,
|
||||||
|
field: "idcard",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "name",
|
||||||
|
align: "left",
|
||||||
|
label: "ชื่อ - นามสกุล",
|
||||||
|
sortable: true,
|
||||||
|
field: "name",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "posNo",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่งเลขที่",
|
||||||
|
sortable: true,
|
||||||
|
field: "posNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "position",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "position",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "positionLevel",
|
||||||
|
align: "left",
|
||||||
|
label: "ระดับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "positionLevel",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "salary",
|
||||||
|
align: "left",
|
||||||
|
label: "เงินเดือน",
|
||||||
|
sortable: true,
|
||||||
|
field: "salary",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "organization",
|
||||||
|
align: "left",
|
||||||
|
label: "หน่วยงาน",
|
||||||
|
sortable: true,
|
||||||
|
field: "organization",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
/** หัวข้อที่เเสดงในตาราง */
|
||||||
|
const visibleColumns = ref<string[]>([
|
||||||
|
"info",
|
||||||
|
"no",
|
||||||
|
"idcard",
|
||||||
|
"name",
|
||||||
|
"posNo",
|
||||||
|
"position",
|
||||||
|
"positionLevel",
|
||||||
|
"salary",
|
||||||
|
"organization",
|
||||||
|
]);
|
||||||
|
|
||||||
const dataComplaints = reactive<FormDataComplaint>({
|
const dataComplaints = reactive<FormDataComplaint>({
|
||||||
id: "",
|
id: "",
|
||||||
respondentType: "",
|
respondentType: "",
|
||||||
|
|
@ -314,7 +480,7 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||||
v-if="status === 'NEW'"
|
v-if="status === 'NEW'"
|
||||||
label="ส่งไปสรุปผลการพิจารณา"
|
label="ส่งไปสรุปผลการพิจารณา"
|
||||||
color="public"
|
color="public"
|
||||||
@click="sentIssue"
|
@click="sentIssueGate"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="status === 'NEW'"
|
v-if="status === 'NEW'"
|
||||||
|
|
@ -358,7 +524,10 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||||
<FormComplaints :on-submit="onSubmit" :data="dataComplaints" />
|
<FormComplaints :on-submit="onSubmit" :data="dataComplaints" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="investigatefacts">
|
<q-tab-panel name="investigatefacts">
|
||||||
<FormInvestigatefacts :on-submit="onSubmit" :data="dataInvestigatefacts" />
|
<FormInvestigatefacts
|
||||||
|
:on-submit="onSubmit"
|
||||||
|
:data="dataInvestigatefacts"
|
||||||
|
/>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="disciplinary">
|
<q-tab-panel name="disciplinary">
|
||||||
<FormDisciplinary
|
<FormDisciplinary
|
||||||
|
|
@ -371,6 +540,16 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<Popup
|
||||||
|
:modal="modalPopup"
|
||||||
|
:close="closePopup"
|
||||||
|
title="ส่งไปพักราชการ"
|
||||||
|
:rows="store.rowSent"
|
||||||
|
:columns="columns"
|
||||||
|
:visibleColumns="visibleColumns"
|
||||||
|
@return-person="emitPerson"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { ref, onMounted, reactive, watch } from "vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute,useRouter } from "vue-router";
|
||||||
|
|
||||||
/**import type*/
|
/**import type*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
@ -40,6 +40,7 @@ const { date2Thai, showLoader, hideLoader, dialogConfirm, messageError } =
|
||||||
mixin;
|
mixin;
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
|
|
@ -57,6 +58,15 @@ function toggleModal() {
|
||||||
|
|
||||||
/** หัวตารางของรายการผู้ถูกสอบสวน กรณีบุคคล */
|
/** หัวตารางของรายการผู้ถูกสอบสวน กรณีบุคคล */
|
||||||
const columnsPerson = ref<QTableProps["columns"]>([
|
const columnsPerson = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "info",
|
||||||
|
align: "center",
|
||||||
|
label: "",
|
||||||
|
sortable: false,
|
||||||
|
field: "info",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -347,6 +357,8 @@ async function fetchDatadetail() {
|
||||||
disciplineDisciplinary_DocRelevants.value =
|
disciplineDisciplinary_DocRelevants.value =
|
||||||
props.data.disciplineDisciplinary_DocRelevants;
|
props.data.disciplineDisciplinary_DocRelevants;
|
||||||
|
|
||||||
|
investigateDis.rowSent = formData.persons
|
||||||
|
|
||||||
/** MAP รายชื่อกรรมการ หน้าหลัก */
|
/** MAP รายชื่อกรรมการ หน้าหลัก */
|
||||||
let datalistDirector: responseType[] = formData.directors.map(
|
let datalistDirector: responseType[] = formData.directors.map(
|
||||||
(e: directorType) => ({
|
(e: directorType) => ({
|
||||||
|
|
@ -390,6 +402,7 @@ async function addPerson(data: Persons[]) {
|
||||||
}));
|
}));
|
||||||
const mergedArray = [...formData.persons, ...newPerson];
|
const mergedArray = [...formData.persons, ...newPerson];
|
||||||
formData.persons = mergedArray;
|
formData.persons = mergedArray;
|
||||||
|
investigateDis.rowSent = formData.persons
|
||||||
toggleModal();
|
toggleModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -669,7 +682,27 @@ onMounted(async () => {
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div v-else-if="col.name == 'info'">
|
||||||
|
<q-btn
|
||||||
|
size="14px"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
color="info"
|
||||||
|
icon="info"
|
||||||
|
@click="
|
||||||
|
router.push(`/registry/${props.row.personId}`)
|
||||||
|
"
|
||||||
|
><q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-else-if="col.name === 'organization'"
|
||||||
|
class="table_ellipsis"
|
||||||
|
>
|
||||||
|
{{ props.row.organization }}
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -1364,7 +1397,7 @@ onMounted(async () => {
|
||||||
label="เลือกไฟล์"
|
label="เลือกไฟล์"
|
||||||
:files="disciplineDisciplinary_DocRelevants"
|
:files="disciplineDisciplinary_DocRelevants"
|
||||||
:id="id"
|
:id="id"
|
||||||
type="relevants"
|
type="relevant"
|
||||||
:fetchData="props.fetchData"
|
:fetchData="props.fetchData"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, success, messageError } = mixin;
|
const { showLoader, hideLoader, success, messageError,dialogRemove } = mixin;
|
||||||
|
|
||||||
const fileRef = ref<Object | null>(null);
|
const fileRef = ref<Object | null>(null);
|
||||||
const file = ref<any>();
|
const file = ref<any>();
|
||||||
|
|
@ -72,12 +72,17 @@ async function uploadFile() {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function popupRemove(id:string){
|
||||||
|
dialogRemove($q,()=> removeFile(id))
|
||||||
|
}
|
||||||
|
|
||||||
async function removeFile(id: string) {
|
async function removeFile(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.disciplineByIdDoc(props.type, props.id, id))
|
.delete(config.API.disciplineByIdDoc(props.type, props.id, id))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
success($q, "ลบไฟล์สำเร็จ");
|
||||||
props.fetchData();
|
props.fetchData();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -99,92 +104,90 @@ function downloadFile(link: string) {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-card flat class="q-pa-md" bordered>
|
<q-card flat class="q-pa-md" bordered>
|
||||||
<div class="col-12 row q-col-gutter-md">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
<div class="row col-12">
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
<q-card bordered class="row col-12" style="border: 1px solid #d6dee1">
|
{{ title }}
|
||||||
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
|
||||||
{{ title }}
|
|
||||||
</div>
|
|
||||||
<div class="col-12"><q-separator /></div>
|
|
||||||
<div class="col-xs-12 q-pa-sm row">
|
|
||||||
<q-file
|
|
||||||
class="col-11"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
ref="fileRef"
|
|
||||||
for="#files"
|
|
||||||
v-model="file"
|
|
||||||
:label="label"
|
|
||||||
hide-bottom-space
|
|
||||||
lazy-rules
|
|
||||||
accept=".pdf,.xlsx,.doc"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon name="attach_file" />
|
|
||||||
</template>
|
|
||||||
</q-file>
|
|
||||||
<div class="col-1 self-center">
|
|
||||||
<q-btn
|
|
||||||
size="14px"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
color="add"
|
|
||||||
icon="mdi-upload"
|
|
||||||
@click="uploadFile()"
|
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="props.files.length > 0" class="col-xs-12 q-pa-sm row">
|
|
||||||
<q-list
|
|
||||||
v-for="(f, index) in props.files"
|
|
||||||
:key="index"
|
|
||||||
bordered
|
|
||||||
separator
|
|
||||||
class="full-width"
|
|
||||||
>
|
|
||||||
<q-item clickable v-ripple>
|
|
||||||
<q-item-section>{{ f.fileName }}</q-item-section>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<div class="row">
|
|
||||||
<div>
|
|
||||||
<q-btn
|
|
||||||
dense
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
size="12px"
|
|
||||||
color="blue"
|
|
||||||
icon="mdi-download-outline"
|
|
||||||
@click="downloadFile(f.pathName)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ดาวน์โหลดเอกสาร</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<q-btn
|
|
||||||
dense
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
size="12px"
|
|
||||||
color="red"
|
|
||||||
icon="mdi-delete-outline"
|
|
||||||
@click="removeFile(f.id)"
|
|
||||||
><q-tooltip>ลบเอกสาร</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12 q-mt-sm" v-if="props.files.length == 0">
|
|
||||||
<q-card class="q-pa-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-11 q-pa-sm">
|
||||||
|
<q-file
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
ref="fileRef"
|
||||||
|
for="#files"
|
||||||
|
v-model="file"
|
||||||
|
:label="label"
|
||||||
|
hide-bottom-space
|
||||||
|
lazy-rules
|
||||||
|
accept=".pdf,.xlsx,.doc"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="attach_file" />
|
||||||
|
</template>
|
||||||
|
</q-file>
|
||||||
|
</div>
|
||||||
|
<div class="col-1 self-center text-center">
|
||||||
|
<q-btn
|
||||||
|
v-if="file"
|
||||||
|
size="14px"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
color="add"
|
||||||
|
icon="mdi-upload"
|
||||||
|
@click="uploadFile()"
|
||||||
|
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="props.files.length > 0" class="col-xs-12 q-pa-sm row">
|
||||||
|
<q-list
|
||||||
|
v-for="(f, index) in props.files"
|
||||||
|
:key="index"
|
||||||
|
bordered
|
||||||
|
separator
|
||||||
|
class="full-width"
|
||||||
|
>
|
||||||
|
<q-item clickable v-ripple>
|
||||||
|
<q-item-section>{{ f.fileName }}</q-item-section>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<div class="row">
|
||||||
|
<div>
|
||||||
|
<q-btn
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
size="12px"
|
||||||
|
color="blue"
|
||||||
|
icon="mdi-download-outline"
|
||||||
|
@click="downloadFile(f.pathName)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ดาวน์โหลดเอกสาร</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<q-btn
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
size="12px"
|
||||||
|
color="red"
|
||||||
|
icon="mdi-delete-outline"
|
||||||
|
@click="popupRemove(f.id)"
|
||||||
|
><q-tooltip>ลบเอกสาร</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 q-ma-xs" v-if="props.files.length == 0">
|
||||||
|
<q-card class="q-pa-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,19 @@ interface Persons {
|
||||||
organization: string; //สังกัด
|
organization: string; //สังกัด
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
interface PersonsArray {
|
||||||
|
id: string; //id อ้างอิง profile
|
||||||
|
idcard: string; //รหัสบัตรประชาชน
|
||||||
|
prefix: string; //คำนำหน้า
|
||||||
|
firstName: string; //ชื่อ
|
||||||
|
lastName: string; //นามสกุล
|
||||||
|
posNo: string; //เลขที่ตำแหน่ง
|
||||||
|
position: string; //ตำแหน่ง
|
||||||
|
positionLevel: string; //ระดับ
|
||||||
|
salary: number; //เงินเดือน
|
||||||
|
organization: string; //สังกัด
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
interface Director {
|
interface Director {
|
||||||
directorId?: string;
|
directorId?: string;
|
||||||
duty?: string;
|
duty?: string;
|
||||||
|
|
@ -115,4 +128,4 @@ interface DisciplinaryRef {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { FormData, DisciplinaryRef, Persons, Director };
|
export type { FormData, DisciplinaryRef, Persons, Director,PersonsArray };
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ import type {
|
||||||
DataOptioGroup,
|
DataOptioGroup,
|
||||||
DataNumberOption,
|
DataNumberOption,
|
||||||
} from "@/modules/11_discipline/interface/index/Main";
|
} from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
import type {
|
||||||
|
Persons
|
||||||
|
} from "@/modules/11_discipline/interface/request/disciplinary";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
|
|
@ -18,6 +21,7 @@ export const useInvestigateDisStore = defineStore(
|
||||||
() => {
|
() => {
|
||||||
const tabMenu = ref<string>("disciplinary");
|
const tabMenu = ref<string>("disciplinary");
|
||||||
const rows = ref<investigateDisDataRowType[]>([]);
|
const rows = ref<investigateDisDataRowType[]>([]);
|
||||||
|
const rowSent = ref<Persons[]>([]);
|
||||||
const rows2 = ref<directorType[]>([]);
|
const rows2 = ref<directorType[]>([]);
|
||||||
const selected = ref<directorType[]>([]);
|
const selected = ref<directorType[]>([]);
|
||||||
|
|
||||||
|
|
@ -346,6 +350,7 @@ export const useInvestigateDisStore = defineStore(
|
||||||
fetchList,
|
fetchList,
|
||||||
rows,
|
rows,
|
||||||
rows2,
|
rows2,
|
||||||
|
rowSent,
|
||||||
offenseDetailsOps,
|
offenseDetailsOps,
|
||||||
optionsfaultLevel,
|
optionsfaultLevel,
|
||||||
fecthDirector,
|
fecthDirector,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue