ปรับ ui การสอบสวนความผิดทางวินัย
This commit is contained in:
parent
b00a946c64
commit
09d44c24d7
9 changed files with 306 additions and 301 deletions
|
|
@ -3,6 +3,7 @@ import router from "@/router";
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInvestigateFactStore } from "@/modules/11_discipline/stroes/InvestigateFactStore";
|
import { useInvestigateFactStore } from "@/modules/11_discipline/stroes/InvestigateFactStore";
|
||||||
|
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
||||||
const investigateFactStore = useInvestigateFactStore();
|
const investigateFactStore = useInvestigateFactStore();
|
||||||
const { filterFnOptionsType } = investigateFactStore;
|
const { filterFnOptionsType } = investigateFactStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -15,6 +16,7 @@ const {
|
||||||
success,
|
success,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const complaint = ref<string>("");
|
const complaint = ref<string>("");
|
||||||
|
const selected = ref<directorType[]>([]);
|
||||||
const complaintdetail = ref<string>("");
|
const complaintdetail = ref<string>("");
|
||||||
const detail = ref<string>("");
|
const detail = ref<string>("");
|
||||||
const fault = ref<string>("");
|
const fault = ref<string>("");
|
||||||
|
|
@ -28,7 +30,6 @@ const dateEnd = ref<Date>();
|
||||||
const investigation = ref<string>("");
|
const investigation = ref<string>("");
|
||||||
|
|
||||||
const daysExtend = ref<string>("");
|
const daysExtend = ref<string>("");
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,20 @@ 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 Dialogbody from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Dialogbody.vue";
|
import Dialogbody from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Dialogbody.vue";
|
||||||
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/director.vue";
|
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/DirectorTable.vue";
|
||||||
|
import { useInvestigateDisStore } from "@/modules/11_discipline/stroes/InvestigateDisStore";
|
||||||
|
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
|
||||||
|
const investigateDis = useInvestigateDisStore();
|
||||||
|
const { fecthDirector } = investigateDis;
|
||||||
|
|
||||||
const visibleColumns = ref<String[]>([
|
const visibleColumns = ref<String[]>([
|
||||||
"no",
|
"no",
|
||||||
"subject",
|
"name",
|
||||||
"beingInvestigated",
|
"position",
|
||||||
"fault",
|
"duty",
|
||||||
"penaltyLevel",
|
"email",
|
||||||
"caseFault",
|
"telephone",
|
||||||
]);
|
]);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -28,52 +33,58 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "subject",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ - นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "subject",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "beingInvestigated",
|
name: "position",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่ง",
|
label: "ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "beingInvestigated",
|
field: "position",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "fault",
|
name: "duty",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "หน้าที่",
|
label: "หน้าที่",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "fault",
|
field: "duty",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "penaltyLevel",
|
name: "email",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "อีเมล",
|
label: "อีเมล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "penaltyLevel",
|
field: "email",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "caseFault",
|
name: "telephone",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เบอร์โทรศัพท์",
|
label: "เบอร์โทรศัพท์",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "caseFault",
|
field: "telephone",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await fecthInvestigateDisDirector();
|
||||||
|
await hideLoader();
|
||||||
|
});
|
||||||
|
const selected = ref<directorType[]>([]);
|
||||||
|
|
||||||
const clickAdd = () => {
|
const clickAdd = () => {
|
||||||
console.log("clickadd");
|
console.log("clickadd");
|
||||||
};
|
};
|
||||||
|
|
@ -81,6 +92,7 @@ const clickAdd = () => {
|
||||||
const popup = () => {
|
const popup = () => {
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
filterKeyword2.value = "";
|
filterKeyword2.value = "";
|
||||||
|
fecthInvestigateDisDirector();
|
||||||
};
|
};
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -98,9 +110,10 @@ const {
|
||||||
const initialPagination = ref<any>({
|
const initialPagination = ref<any>({
|
||||||
rowsPerPage: 0,
|
rowsPerPage: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const rows = ref<any[]>([]);
|
const rows = ref([]);
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
|
|
@ -120,29 +133,15 @@ const evidence = ref<string>("");
|
||||||
const recordAccuser = ref<string>("");
|
const recordAccuser = ref<string>("");
|
||||||
const witnesses = ref<string>("");
|
const witnesses = ref<string>("");
|
||||||
const InvestResults = ref<string>("");
|
const InvestResults = ref<string>("");
|
||||||
const files = ref<any>();
|
const files = ref<File>();
|
||||||
const filesEvidence = ref<any>();
|
const filesEvidence = ref<File>();
|
||||||
const filesRecordAccuser = ref<any>();
|
const filesRecordAccuser = ref<File>();
|
||||||
const filesWitnesses = ref<any>();
|
const filesWitnesses = ref<File>();
|
||||||
const filesEtc = ref<any>();
|
const filesEtc = ref<File>();
|
||||||
const fileDocDataUpload = ref<File[]>([]);
|
const fileDocDataUpload = ref<File[]>([]);
|
||||||
const refRaw = ref<string>("");
|
const refRaw = ref<string>("");
|
||||||
const casefault = ref<string>("");
|
const casefault = ref<string>("");
|
||||||
const whereInvestigate = ref<string>("");
|
const whereInvestigate = ref<string>("");
|
||||||
const optionsTypefault = ref([
|
|
||||||
{ label: "ไม่ระบุ", value: 1 },
|
|
||||||
{ label: "ร้ายแรง ", value: 2 },
|
|
||||||
{ label: "ไม่ร้ายแรง", value: 3 },
|
|
||||||
]);
|
|
||||||
const optionsfaultLevel = ref([
|
|
||||||
{ label: "ไม่ร้ายแรง", value: 1 },
|
|
||||||
{ label: "ภาคทัณฑ์ ", value: 2 },
|
|
||||||
{ label: "ตัดเงินเดือน", value: 3 },
|
|
||||||
{ label: "ลดขั้นเงินเดือน", value: 4 },
|
|
||||||
{ label: "ร้ายแรง", value: 5 },
|
|
||||||
{ label: "ปลดออก", value: 6 },
|
|
||||||
{ label: "ไล่ออก", value: 7 },
|
|
||||||
]);
|
|
||||||
|
|
||||||
const routeName = router.currentRoute.value.name;
|
const routeName = router.currentRoute.value.name;
|
||||||
|
|
||||||
|
|
@ -150,54 +149,27 @@ const clickClose = () => {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {});
|
||||||
// if (route.params.id) {
|
function fecthInvestigateDisDirector() {
|
||||||
// // มี params id ให้ เรียกข้อมูลของรอบการเสนอขอ
|
const data = [
|
||||||
// await fetchData();
|
{
|
||||||
// }
|
nameDirector: "นาง เกสินี เจียรสุมัย",
|
||||||
});
|
position: "ครู",
|
||||||
|
duty: "ประธาน",
|
||||||
|
email: "e@email.com",
|
||||||
|
telephone: "0800808080",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
nameDirector: "นาย สรวิชญ์ พลสิทธิ์",
|
||||||
|
position: "ทดลองงาน",
|
||||||
|
duty: "เลขานุการ",
|
||||||
|
email: "g@gmail.com",
|
||||||
|
telephone: "0614565145",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
fecthDirector(data); // ส่งข้อมูลไป stores
|
||||||
|
}
|
||||||
// เรียกข้อมูลของรอบการเสนอขอ
|
// เรียกข้อมูลของรอบการเสนอขอ
|
||||||
const fetchData = async () => {
|
|
||||||
// edit.value = true;
|
|
||||||
// showLoader();
|
|
||||||
// await http
|
|
||||||
// .get(config.API.getRoundInsignia(id.value))
|
|
||||||
// .then((res) => {
|
|
||||||
// const data = res.data.result;
|
|
||||||
// id.value = data.period_id;
|
|
||||||
// roundInsig.value =
|
|
||||||
// options.value.filter((r: any) => r.value == data.period_round).length >
|
|
||||||
// 0
|
|
||||||
// ? options.value.filter((r: any) => r.value == data.period_round)[0]
|
|
||||||
// : null;
|
|
||||||
// yearly.value = data.period_year;
|
|
||||||
// datelast.value = data.period_amount;
|
|
||||||
// dateInvestigate.value = new Date(data.period_start);
|
|
||||||
// dateAllegation.value = new Date(data.period_end);
|
|
||||||
// files.value = data.period_doc;
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
};
|
|
||||||
|
|
||||||
const deleteData = async (id: string) => {
|
|
||||||
// showLoader();
|
|
||||||
// await http
|
|
||||||
// .delete(config.API.periodExamId(id))
|
|
||||||
// .then((res) => {
|
|
||||||
// success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(async () => {
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
};
|
|
||||||
|
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
|
|
||||||
|
|
@ -260,37 +232,6 @@ const addData = async () => {
|
||||||
// hideLoader();
|
// hideLoader();
|
||||||
// });
|
// });
|
||||||
};
|
};
|
||||||
// แก้ไขข้อมูล
|
|
||||||
const editData = async (id: string) => {
|
|
||||||
// const formData = new FormData();
|
|
||||||
// const name = `รอบการเสนอขอพระราชทานเครื่องราชรอบที่ ${
|
|
||||||
// roundInsig.value.value
|
|
||||||
// } ปี ${yearly.value + 543}`;
|
|
||||||
// formData.append("name", name);
|
|
||||||
// formData.append("year", yearly.value.toString());
|
|
||||||
// formData.append("amount", datelast.value.toString());
|
|
||||||
// formData.append("round", roundInsig.value.value);
|
|
||||||
// if (dateInvestigate.value !== null) {
|
|
||||||
// formData.append("startDate", dateToISO(dateInvestigate.value));
|
|
||||||
// }
|
|
||||||
// if (dateAllegation.value !== null) {
|
|
||||||
// formData.append("endDate", dateToISO(dateAllegation.value));
|
|
||||||
// }
|
|
||||||
// formData.append("file", files.value);
|
|
||||||
// showLoader();
|
|
||||||
// await http
|
|
||||||
// .put(config.API.editRoundInsignia(id), formData)
|
|
||||||
// .then(() => {
|
|
||||||
// success($q, "แก้ไขข้อมูลสำเร็จ");
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(async () => {
|
|
||||||
// hideLoader();
|
|
||||||
// clickBack();
|
|
||||||
// });
|
|
||||||
};
|
|
||||||
|
|
||||||
const clickBack = () => {
|
const clickBack = () => {
|
||||||
router.push(`/discipline/disciplinary`);
|
router.push(`/discipline/disciplinary`);
|
||||||
|
|
@ -533,7 +474,9 @@ const clickBack = () => {
|
||||||
class="col-xs-12 col-sm-3"
|
class="col-xs-12 col-sm-3"
|
||||||
outlined
|
outlined
|
||||||
v-model="typefault"
|
v-model="typefault"
|
||||||
:options="optionsTypefault"
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
:options="investigateDis.optionsTypefault"
|
||||||
label="ลักษณะความผิด"
|
label="ลักษณะความผิด"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
|
@ -541,7 +484,9 @@ const clickBack = () => {
|
||||||
class="col-xs-12 col-sm-3"
|
class="col-xs-12 col-sm-3"
|
||||||
outlined
|
outlined
|
||||||
v-model="faultLevel"
|
v-model="faultLevel"
|
||||||
:options="optionsfaultLevel"
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
:options="investigateDis.optionsfaultLevel"
|
||||||
label="ระดับโทษความผิด"
|
label="ระดับโทษความผิด"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -693,7 +638,7 @@ const clickBack = () => {
|
||||||
<Dialogbody
|
<Dialogbody
|
||||||
v-model:Modal="modal"
|
v-model:Modal="modal"
|
||||||
:clickClose="clickClose"
|
:clickClose="clickClose"
|
||||||
:rows2="rows2"
|
:rows2="investigateDis.rows2"
|
||||||
v-model:filterKeyword2="filterKeyword2"
|
v-model:filterKeyword2="filterKeyword2"
|
||||||
v-model:type="type"
|
v-model:type="type"
|
||||||
/>
|
/>
|
||||||
|
|
@ -3,21 +3,21 @@ import { ref, computed, watchEffect } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer";
|
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
|
||||||
import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
|
import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const selected = ref<ResponseData[]>([]);
|
const selected = ref<directorType[]>([]);
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
||||||
|
|
||||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||||
const visibleColumns2 = ref<string[]>([
|
const visibleColumns2 = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"fullname",
|
"nameDirector",
|
||||||
"position",
|
"position",
|
||||||
"duty",
|
"duty",
|
||||||
"email",
|
"email",
|
||||||
|
|
@ -36,11 +36,11 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "fullname",
|
name: "nameDirector",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ-นามสกุล",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "fullname",
|
field: "nameDirector",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
@ -104,6 +104,7 @@ const checkSelected = computed(() => {
|
||||||
if (selected.value.length === 0) {
|
if (selected.value.length === 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
console.log(checkSelected.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
//popup ยืนยันส่งัว
|
//popup ยืนยันส่งัว
|
||||||
|
|
@ -206,7 +207,7 @@ watchEffect(() => {
|
||||||
:filter="filterKeyword2"
|
:filter="filterKeyword2"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="visibleColumns2"
|
:visible-columns="visibleColumns2"
|
||||||
selection="multiple"
|
selection="single"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
>
|
>
|
||||||
<template v-slot:header-selection="scope">
|
<template v-slot:header-selection="scope">
|
||||||
|
|
@ -231,8 +232,8 @@ watchEffect(() => {
|
||||||
<q-td key="no" :props="props">
|
<q-td key="no" :props="props">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="fullname" :props="props">
|
<q-td key="nameDirector" :props="props">
|
||||||
{{ props.row.fullname }}
|
{{ props.row.nameDirector }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="position" :props="props">
|
<q-td key="position" :props="props">
|
||||||
{{ props.row.position }}
|
{{ props.row.position }}
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,3 @@
|
||||||
<template>
|
|
||||||
<div class="q-pb-sm row q-col-gutter-sm">
|
|
||||||
<!-- -->
|
|
||||||
<q-space />
|
|
||||||
</div>
|
|
||||||
<q-table
|
|
||||||
ref="table"
|
|
||||||
flat
|
|
||||||
bordered
|
|
||||||
class="custom-header-table"
|
|
||||||
v-bind="attrs"
|
|
||||||
virtual-scroll
|
|
||||||
:virtual-scroll-sticky-size-start="48"
|
|
||||||
dense
|
|
||||||
:pagination-label="paginationLabel"
|
|
||||||
v-model:pagination="pagination"
|
|
||||||
>
|
|
||||||
<template v-slot:header="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
|
||||||
<span class="text-weight-medium" v-html="col.label" />
|
|
||||||
</q-th>
|
|
||||||
<q-th auto-width v-if="nornmalData == true" />
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
<template #body="props">
|
|
||||||
<slot v-bind="props" name="columns"></slot>
|
|
||||||
</template>
|
|
||||||
<template v-slot:pagination="scope">
|
|
||||||
<q-pagination
|
|
||||||
v-model="pagination.page"
|
|
||||||
active-color="primary"
|
|
||||||
color="dark"
|
|
||||||
:max="scope.pagesNumber"
|
|
||||||
:max-pages="5"
|
|
||||||
size="sm"
|
|
||||||
boundary-links
|
|
||||||
direction-links
|
|
||||||
></q-pagination>
|
|
||||||
</template>
|
|
||||||
</q-table>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs } from "vue";
|
import { ref, useAttrs } from "vue";
|
||||||
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
|
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
|
||||||
|
|
@ -118,6 +76,46 @@ const resetFilter = () => {
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="q-pb-sm row q-col-gutter-sm">
|
||||||
|
<!-- -->
|
||||||
|
<q-space />
|
||||||
|
</div>
|
||||||
|
<d-table
|
||||||
|
ref="table"
|
||||||
|
flat
|
||||||
|
v-bind="attrs"
|
||||||
|
virtual-scroll
|
||||||
|
:virtual-scroll-sticky-size-start="48"
|
||||||
|
dense
|
||||||
|
:pagination-label="paginationLabel"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
>
|
||||||
|
<template v-slot:header="props">
|
||||||
|
<q-tr :props="props">
|
||||||
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
|
<span class="text-weight-medium" v-html="col.label" />
|
||||||
|
</q-th>
|
||||||
|
<q-th auto-width v-if="nornmalData == true" />
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template #body="props">
|
||||||
|
<slot v-bind="props" name="columns"></slot>
|
||||||
|
</template>
|
||||||
|
<template v-slot:pagination="scope">
|
||||||
|
<q-pagination
|
||||||
|
v-model="pagination.page"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="scope.pagesNumber"
|
||||||
|
:max-pages="5"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
></q-pagination>
|
||||||
|
</template>
|
||||||
|
</d-table>
|
||||||
|
</template>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.icon-color {
|
.icon-color {
|
||||||
color: #4154b3;
|
color: #4154b3;
|
||||||
|
|
@ -139,40 +139,40 @@ function fecthInvestigateDis() {
|
||||||
{
|
{
|
||||||
subject: "ทุจริตในหน้าที่",
|
subject: "ทุจริตในหน้าที่",
|
||||||
interrogated: "ศิรินภา คงน้อยี่",
|
interrogated: "ศิรินภา คงน้อยี่",
|
||||||
fault: "0",
|
fault: "1",
|
||||||
penaltyLevel: "0",
|
penaltyLevel: "7",
|
||||||
caseFault: "test",
|
caseFault: "ทุจริตในหน้าที่",
|
||||||
dateInvestigate: "test",
|
dateInvestigate: "1 ธ.ค. 2565",
|
||||||
status: "0",
|
status: "0",
|
||||||
active: "1",
|
active: "2",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
subject: "ทุจริตในหน้าที่",
|
subject: "ทุจริตในหน้าที่",
|
||||||
interrogated: "นายนครชัย วันดี",
|
interrogated: "ภัทรานุช คงน้อย",
|
||||||
fault: "1",
|
fault: "1",
|
||||||
penaltyLevel: "0",
|
penaltyLevel: "7",
|
||||||
caseFault: "test",
|
caseFault: "ทุจริตในหน้าที่",
|
||||||
dateInvestigate: "test",
|
dateInvestigate: "30 พ.ย. 2565",
|
||||||
|
status: "0",
|
||||||
|
active: "0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
subject: "กระทำทุจริตเงินกองทุน",
|
||||||
|
interrogated: "ปรมาพร ศรีมี",
|
||||||
|
fault: "2",
|
||||||
|
penaltyLevel: "1",
|
||||||
|
caseFault: "พบการทุจริต",
|
||||||
|
dateInvestigate: "14 ก.ย. 2565",
|
||||||
status: "1",
|
status: "1",
|
||||||
active: "1",
|
active: "1",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
subject: "กระทำทุจริตเงินกองทุน",
|
|
||||||
interrogated: "นายกัณฐิมา กาฬสินธ์ุ",
|
|
||||||
fault: "1",
|
|
||||||
penaltyLevel: "0",
|
|
||||||
caseFault: "test",
|
|
||||||
dateInvestigate: "test",
|
|
||||||
status: "0",
|
|
||||||
active: "1",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
subject: "พูดจาไม่สุภาพ",
|
subject: "พูดจาไม่สุภาพ",
|
||||||
interrogated: "นายปิยรมย์ ศิริธาราฟ",
|
interrogated: "สมรัก ใจอารีย์",
|
||||||
fault: "2",
|
fault: "2",
|
||||||
penaltyLevel: "0",
|
penaltyLevel: "1",
|
||||||
caseFault: "test",
|
caseFault: "พูดจาไม่สุภาพกับผู้บังคับบัญชา",
|
||||||
dateInvestigate: "test",
|
dateInvestigate: "11 ส.ค. 2565",
|
||||||
status: "0",
|
status: "0",
|
||||||
active: "1",
|
active: "1",
|
||||||
},
|
},
|
||||||
|
|
@ -246,8 +246,14 @@ const deleteData = async (id: string) => {
|
||||||
<q-td key="status" :props="props">
|
<q-td key="status" :props="props">
|
||||||
{{ props.row.status }}
|
{{ props.row.status }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width style="width: 10rem">
|
<q-td style="font-size: 14px; width: 10rem">
|
||||||
<q-btn color="primary" class="q-px-xl q-py-xs">ยื่นยันผล</q-btn>
|
<q-btn
|
||||||
|
v-if="props.row.active === 'ยืนยันผล'"
|
||||||
|
color="primary"
|
||||||
|
class="q-px-md q-py-xs"
|
||||||
|
>ยืนยันผล</q-btn
|
||||||
|
>
|
||||||
|
<span v-else>{{ props.row.active }}</span>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -57,11 +57,9 @@
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
flat
|
flat
|
||||||
bordered
|
|
||||||
class="custom-header-table"
|
|
||||||
v-bind="attrs"
|
v-bind="attrs"
|
||||||
virtual-scroll
|
virtual-scroll
|
||||||
:virtual-scroll-sticky-size-start="48"
|
:virtual-scroll-sticky-size-start="48"
|
||||||
|
|
@ -92,7 +90,7 @@
|
||||||
direction-links
|
direction-links
|
||||||
></q-pagination>
|
></q-pagination>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</d-table>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs } from "vue";
|
import { ref, useAttrs } from "vue";
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,68 @@
|
||||||
interface DataOption {
|
interface DataOption {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
interface investigatefactsDataRowType {
|
interface investigatefactsDataRowType {
|
||||||
subject: string;
|
subject: string;
|
||||||
interrogated: string;
|
interrogated: string;
|
||||||
fault: string;
|
fault: string;
|
||||||
status: string;
|
status: string;
|
||||||
active: string;
|
active: string;
|
||||||
}
|
}
|
||||||
interface MyObjectRef {
|
interface MyObjectRef {
|
||||||
orderType: any;
|
orderType: any;
|
||||||
orderBy: any;
|
orderBy: any;
|
||||||
listInvestigation: any,
|
listInvestigation: any;
|
||||||
authority: any,
|
authority: any;
|
||||||
orderNumber: any,
|
orderNumber: any;
|
||||||
dateYear: any,
|
dateYear: any;
|
||||||
date: any,
|
date: any;
|
||||||
authorityPosition: any,
|
authorityPosition: any;
|
||||||
subject: any,
|
subject: any;
|
||||||
mistakeDetail: any,
|
mistakeDetail: any;
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
interface MyObjectComplaintsRef {
|
interface MyObjectComplaintsRef {
|
||||||
complainantType: any
|
complainantType: any;
|
||||||
complainant: any
|
complainant: any;
|
||||||
office: any
|
office: any;
|
||||||
agency: any
|
agency: any;
|
||||||
topicComplaint: any
|
topicComplaint: any;
|
||||||
datereceive: any
|
datereceive: any;
|
||||||
dateconsideration: any
|
dateconsideration: any;
|
||||||
offenseDescription: any
|
offenseDescription: any;
|
||||||
considerationLevel: any
|
considerationLevel: any;
|
||||||
datewarn: any
|
datewarn: any;
|
||||||
receivecomplaints: any
|
receivecomplaints: any;
|
||||||
petitioner: any
|
petitioner: any;
|
||||||
files: any
|
files: any;
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface investigateDisDataRowType {
|
||||||
|
subject: string;
|
||||||
|
interrogated: string;
|
||||||
|
fault: string;
|
||||||
|
penaltyLevel: string;
|
||||||
|
caseFault: string;
|
||||||
|
dateInvestigate: string;
|
||||||
|
status: string;
|
||||||
|
active: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface directorType {
|
||||||
|
nameDirector: string;
|
||||||
|
position: string;
|
||||||
|
duty: string;
|
||||||
|
email: string;
|
||||||
|
telephone: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
DataOption,
|
DataOption,
|
||||||
investigatefactsDataRowType,
|
investigatefactsDataRowType,
|
||||||
MyObjectRef,
|
MyObjectRef,
|
||||||
MyObjectComplaintsRef,
|
MyObjectComplaintsRef,
|
||||||
|
investigateDisDataRowType,
|
||||||
|
directorType,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,7 @@ const complaintMain = () =>
|
||||||
const factsMain = () =>
|
const factsMain = () =>
|
||||||
import("@/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue");
|
import("@/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue");
|
||||||
const investigatefactsAdd = () =>
|
const investigatefactsAdd = () =>
|
||||||
import(
|
import("@/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue");
|
||||||
"@/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue"
|
|
||||||
);
|
|
||||||
const disciplinaryMain = () =>
|
const disciplinaryMain = () =>
|
||||||
import(
|
import(
|
||||||
"@/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue"
|
"@/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue"
|
||||||
|
|
@ -33,7 +31,7 @@ const reportType = () =>
|
||||||
|
|
||||||
const InvestigateDisciplinaryAdd = () =>
|
const InvestigateDisciplinaryAdd = () =>
|
||||||
import(
|
import(
|
||||||
"@/modules/11_discipline/components/3_InvestigateDisciplinary/addInvestigate.vue"
|
"@/modules/11_discipline/components/3_InvestigateDisciplinary/AddPage.vue"
|
||||||
);
|
);
|
||||||
const orderPage = () =>
|
const orderPage = () =>
|
||||||
import("@/modules/11_discipline/components/4_Order/OrderPage.vue");
|
import("@/modules/11_discipline/components/4_Order/OrderPage.vue");
|
||||||
|
|
|
||||||
|
|
@ -1,69 +1,109 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
import type {
|
||||||
|
investigateDisDataRowType,
|
||||||
|
DataOption,
|
||||||
|
directorType,
|
||||||
|
} from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
|
||||||
export const useInvestigateDisStore = defineStore("DisciplineInvestigateDis", () => {
|
export const useInvestigateDisStore = defineStore(
|
||||||
const rows = ref<any>([]);
|
"DisciplineInvestigateDis",
|
||||||
|
() => {
|
||||||
async function fecthList(data: any) {
|
const rows = ref<investigateDisDataRowType[]>([]);
|
||||||
let datalist = data.map((e: any) => ({
|
const rows2 = ref<directorType[]>([]);
|
||||||
subject: e.subject,
|
const selected = ref<directorType[]>([]);
|
||||||
interrogated: e.interrogated,
|
const optionsTypefault = ref<DataOption[]>([
|
||||||
fault: convertFault(e.fault),
|
{ id: "0", name: "ไม่ระบุ" },
|
||||||
penaltyLevel: convertPenaltyLevel(e.penaltyLevel),
|
{ id: "1", name: "ร้ายแรง" },
|
||||||
caseFault: e.caseFault,
|
{ id: "2", name: "ไม่ร้ายแรง" },
|
||||||
dateInvestigate: e.dateInvestigate,
|
]);
|
||||||
status: convertSatatus(e.status),
|
const optionsfaultLevel = ref<DataOption[]>([
|
||||||
active: activeStatus(e.active),
|
{ id: "0", name: "ไม่ร้ายแรง" },
|
||||||
}));
|
{ id: "1", name: "ภาคทัณฑ์" },
|
||||||
rows.value = datalist;
|
{ id: "2", name: "ตัดเงินเดือน" },
|
||||||
console.log(rows.value);
|
{ id: "3", name: "ลดขั้นเงินเดือน" },
|
||||||
}
|
{ id: "4", name: "ร้ายแรง" },
|
||||||
function convertFault(val: string) {
|
{ id: "5", name: "ปลดออก" },
|
||||||
switch (val) {
|
{ id: "6", name: "ไล่ออก" },
|
||||||
case "0":
|
]);
|
||||||
return "ความผิดวินัยยังไม่ระบุ";
|
async function fecthList(data: investigateDisDataRowType[]) {
|
||||||
case "1":
|
let datalist: any[] = data.map((e: any) => ({
|
||||||
return "ความผิดวินัยไม่ร้ายแรง";
|
subject: e.subject,
|
||||||
case "2":
|
interrogated: e.interrogated,
|
||||||
return "ความผิดวินัยร้ายแรง";
|
fault: convertFault(e.fault),
|
||||||
|
penaltyLevel: convertPenaltyLevel(e.penaltyLevel),
|
||||||
|
caseFault: e.caseFault,
|
||||||
|
dateInvestigate: e.dateInvestigate,
|
||||||
|
status: convertSatatus(e.status),
|
||||||
|
active: activeStatus(e.active),
|
||||||
|
}));
|
||||||
|
rows.value = datalist;
|
||||||
}
|
}
|
||||||
}
|
async function fecthDirector(data: directorType[]) {
|
||||||
function convertSatatus(val: string) {
|
let datalistDirector: any[] = data.map((e: any) => ({
|
||||||
switch (val) {
|
nameDirector: e.nameDirector,
|
||||||
case "0":
|
position: e.position,
|
||||||
return "เสร็จสิ้นแล้ว";
|
duty: e.duty,
|
||||||
case "1":
|
email: e.email,
|
||||||
return "ยุติเรื่อง";
|
telephone: e.telephone,
|
||||||
|
}));
|
||||||
|
rows2.value = datalistDirector;
|
||||||
|
selected.value = rows2.value;
|
||||||
|
console.log(rows2.value);
|
||||||
}
|
}
|
||||||
}
|
function convertFault(val: string) {
|
||||||
function activeStatus(val: string) {
|
switch (val) {
|
||||||
switch (val) {
|
case "0":
|
||||||
case "0":
|
return "ความผิดวินัยยังไม่ระบุ";
|
||||||
return "ยังไม่ได้ยืนยันผล";
|
case "1":
|
||||||
case "1":
|
return "ความผิดวินัยไม่ร้ายแรง";
|
||||||
return "ยืนยันผลเเล้ว";
|
case "2":
|
||||||
|
return "ความผิดวินัยร้ายแรง";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
function convertSatatus(val: string) {
|
||||||
function convertPenaltyLevel(val: string) {
|
switch (val) {
|
||||||
switch (val) {
|
case "0":
|
||||||
case "0":
|
return "เสร็จสิ้นแล้ว";
|
||||||
return "ไม่ร้ายแรง";
|
case "1":
|
||||||
case "1":
|
return "ยุติเรื่อง";
|
||||||
return "ภาคทัณฑ์";
|
}
|
||||||
case "3":
|
|
||||||
return "ตัดเงินเดือน";
|
|
||||||
case "4":
|
|
||||||
return "ลดขั้นเงินเดือน";
|
|
||||||
case "5":
|
|
||||||
return "ร้ายแรง";
|
|
||||||
case "6":
|
|
||||||
return "ปลดออก";
|
|
||||||
case "7":
|
|
||||||
return "ไล่ออก";
|
|
||||||
}
|
}
|
||||||
|
function activeStatus(val: string) {
|
||||||
|
switch (val) {
|
||||||
|
case "0":
|
||||||
|
return "กำลังยืนยันผล";
|
||||||
|
case "1":
|
||||||
|
return "ยืนยันผลเเล้ว";
|
||||||
|
case "2":
|
||||||
|
return "ยืนยันผล";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function convertPenaltyLevel(val: string) {
|
||||||
|
switch (val) {
|
||||||
|
case "0":
|
||||||
|
return "ไม่ร้ายแรง";
|
||||||
|
case "1":
|
||||||
|
return "ภาคทัณฑ์";
|
||||||
|
case "3":
|
||||||
|
return "ตัดเงินเดือน";
|
||||||
|
case "4":
|
||||||
|
return "ลดขั้นเงินเดือน";
|
||||||
|
case "5":
|
||||||
|
return "ร้ายแรง";
|
||||||
|
case "6":
|
||||||
|
return "ปลดออก";
|
||||||
|
case "7":
|
||||||
|
return "ไล่ออก";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
fecthList,
|
||||||
|
rows,
|
||||||
|
rows2,
|
||||||
|
optionsTypefault,
|
||||||
|
optionsfaultLevel,
|
||||||
|
fecthDirector,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
return {
|
);
|
||||||
fecthList,
|
|
||||||
rows,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue