ปรับ 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 { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateFactStore } from "@/modules/11_discipline/stroes/InvestigateFactStore";
|
||||
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
||||
const investigateFactStore = useInvestigateFactStore();
|
||||
const { filterFnOptionsType } = investigateFactStore;
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -15,6 +16,7 @@ const {
|
|||
success,
|
||||
} = mixin;
|
||||
const complaint = ref<string>("");
|
||||
const selected = ref<directorType[]>([]);
|
||||
const complaintdetail = ref<string>("");
|
||||
const detail = ref<string>("");
|
||||
const fault = ref<string>("");
|
||||
|
|
@ -28,7 +30,6 @@ const dateEnd = ref<Date>();
|
|||
const investigation = ref<string>("");
|
||||
|
||||
const daysExtend = ref<string>("");
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<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 config from "@/app.config";
|
||||
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[]>([
|
||||
"no",
|
||||
"subject",
|
||||
"beingInvestigated",
|
||||
"fault",
|
||||
"penaltyLevel",
|
||||
"caseFault",
|
||||
"name",
|
||||
"position",
|
||||
"duty",
|
||||
"email",
|
||||
"telephone",
|
||||
]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -28,52 +33,58 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "subject",
|
||||
name: "name",
|
||||
align: "left",
|
||||
label: "ชื่อ - นามสกุล",
|
||||
sortable: true,
|
||||
field: "subject",
|
||||
field: "name",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "beingInvestigated",
|
||||
name: "position",
|
||||
align: "left",
|
||||
label: "ตำแหน่ง",
|
||||
sortable: true,
|
||||
field: "beingInvestigated",
|
||||
field: "position",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "fault",
|
||||
name: "duty",
|
||||
align: "left",
|
||||
label: "หน้าที่",
|
||||
sortable: true,
|
||||
field: "fault",
|
||||
field: "duty",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "penaltyLevel",
|
||||
name: "email",
|
||||
align: "left",
|
||||
label: "อีเมล",
|
||||
sortable: true,
|
||||
field: "penaltyLevel",
|
||||
field: "email",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "caseFault",
|
||||
name: "telephone",
|
||||
align: "left",
|
||||
label: "เบอร์โทรศัพท์",
|
||||
sortable: true,
|
||||
field: "caseFault",
|
||||
field: "telephone",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
onMounted(async () => {
|
||||
await fecthInvestigateDisDirector();
|
||||
await hideLoader();
|
||||
});
|
||||
const selected = ref<directorType[]>([]);
|
||||
|
||||
const clickAdd = () => {
|
||||
console.log("clickadd");
|
||||
};
|
||||
|
|
@ -81,6 +92,7 @@ const clickAdd = () => {
|
|||
const popup = () => {
|
||||
modal.value = true;
|
||||
filterKeyword2.value = "";
|
||||
fecthInvestigateDisDirector();
|
||||
};
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -98,9 +110,10 @@ const {
|
|||
const initialPagination = ref<any>({
|
||||
rowsPerPage: 0,
|
||||
});
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const rows = ref<any[]>([]);
|
||||
const rows = ref([]);
|
||||
const modal = ref<boolean>(false);
|
||||
const $q = useQuasar();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
|
|
@ -120,29 +133,15 @@ const evidence = ref<string>("");
|
|||
const recordAccuser = ref<string>("");
|
||||
const witnesses = ref<string>("");
|
||||
const InvestResults = ref<string>("");
|
||||
const files = ref<any>();
|
||||
const filesEvidence = ref<any>();
|
||||
const filesRecordAccuser = ref<any>();
|
||||
const filesWitnesses = ref<any>();
|
||||
const filesEtc = ref<any>();
|
||||
const files = ref<File>();
|
||||
const filesEvidence = ref<File>();
|
||||
const filesRecordAccuser = ref<File>();
|
||||
const filesWitnesses = ref<File>();
|
||||
const filesEtc = ref<File>();
|
||||
const fileDocDataUpload = ref<File[]>([]);
|
||||
const refRaw = ref<string>("");
|
||||
const casefault = 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;
|
||||
|
||||
|
|
@ -150,54 +149,27 @@ const clickClose = () => {
|
|||
modal.value = false;
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
// if (route.params.id) {
|
||||
// // มี params id ให้ เรียกข้อมูลของรอบการเสนอขอ
|
||||
// await fetchData();
|
||||
// }
|
||||
});
|
||||
onMounted(async () => {});
|
||||
function fecthInvestigateDisDirector() {
|
||||
const data = [
|
||||
{
|
||||
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
|
||||
|
||||
|
|
@ -260,37 +232,6 @@ const addData = async () => {
|
|||
// 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 = () => {
|
||||
router.push(`/discipline/disciplinary`);
|
||||
|
|
@ -533,7 +474,9 @@ const clickBack = () => {
|
|||
class="col-xs-12 col-sm-3"
|
||||
outlined
|
||||
v-model="typefault"
|
||||
:options="optionsTypefault"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="investigateDis.optionsTypefault"
|
||||
label="ลักษณะความผิด"
|
||||
/>
|
||||
<q-select
|
||||
|
|
@ -541,7 +484,9 @@ const clickBack = () => {
|
|||
class="col-xs-12 col-sm-3"
|
||||
outlined
|
||||
v-model="faultLevel"
|
||||
:options="optionsfaultLevel"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="investigateDis.optionsfaultLevel"
|
||||
label="ระดับโทษความผิด"
|
||||
/>
|
||||
<q-input
|
||||
|
|
@ -693,7 +638,7 @@ const clickBack = () => {
|
|||
<Dialogbody
|
||||
v-model:Modal="modal"
|
||||
:clickClose="clickClose"
|
||||
:rows2="rows2"
|
||||
:rows2="investigateDis.rows2"
|
||||
v-model:filterKeyword2="filterKeyword2"
|
||||
v-model:type="type"
|
||||
/>
|
||||
|
|
@ -3,21 +3,21 @@ import { ref, computed, watchEffect } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
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 http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
const $q = useQuasar();
|
||||
const selected = ref<ResponseData[]>([]);
|
||||
const selected = ref<directorType[]>([]);
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
||||
|
||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const visibleColumns2 = ref<string[]>([
|
||||
"no",
|
||||
"fullname",
|
||||
"nameDirector",
|
||||
"position",
|
||||
"duty",
|
||||
"email",
|
||||
|
|
@ -36,11 +36,11 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "fullname",
|
||||
name: "nameDirector",
|
||||
align: "left",
|
||||
label: "ชื่อ-นามสกุล",
|
||||
sortable: true,
|
||||
field: "fullname",
|
||||
field: "nameDirector",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
|
|
@ -104,6 +104,7 @@ const checkSelected = computed(() => {
|
|||
if (selected.value.length === 0) {
|
||||
return true;
|
||||
}
|
||||
console.log(checkSelected.value);
|
||||
});
|
||||
|
||||
//popup ยืนยันส่งัว
|
||||
|
|
@ -206,7 +207,7 @@ watchEffect(() => {
|
|||
:filter="filterKeyword2"
|
||||
row-key="id"
|
||||
:visible-columns="visibleColumns2"
|
||||
selection="multiple"
|
||||
selection="single"
|
||||
v-model:selected="selected"
|
||||
>
|
||||
<template v-slot:header-selection="scope">
|
||||
|
|
@ -231,8 +232,8 @@ watchEffect(() => {
|
|||
<q-td key="no" :props="props">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
<q-td key="fullname" :props="props">
|
||||
{{ props.row.fullname }}
|
||||
<q-td key="nameDirector" :props="props">
|
||||
{{ props.row.nameDirector }}
|
||||
</q-td>
|
||||
<q-td key="position" :props="props">
|
||||
{{ 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">
|
||||
import { ref, useAttrs } from "vue";
|
||||
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
|
||||
|
|
@ -118,6 +76,46 @@ const resetFilter = () => {
|
|||
filterRef.value.focus();
|
||||
};
|
||||
</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">
|
||||
.icon-color {
|
||||
color: #4154b3;
|
||||
|
|
@ -139,40 +139,40 @@ function fecthInvestigateDis() {
|
|||
{
|
||||
subject: "ทุจริตในหน้าที่",
|
||||
interrogated: "ศิรินภา คงน้อยี่",
|
||||
fault: "0",
|
||||
penaltyLevel: "0",
|
||||
caseFault: "test",
|
||||
dateInvestigate: "test",
|
||||
fault: "1",
|
||||
penaltyLevel: "7",
|
||||
caseFault: "ทุจริตในหน้าที่",
|
||||
dateInvestigate: "1 ธ.ค. 2565",
|
||||
status: "0",
|
||||
active: "1",
|
||||
active: "2",
|
||||
},
|
||||
{
|
||||
subject: "ทุจริตในหน้าที่",
|
||||
interrogated: "นายนครชัย วันดี",
|
||||
interrogated: "ภัทรานุช คงน้อย",
|
||||
fault: "1",
|
||||
penaltyLevel: "0",
|
||||
caseFault: "test",
|
||||
dateInvestigate: "test",
|
||||
penaltyLevel: "7",
|
||||
caseFault: "ทุจริตในหน้าที่",
|
||||
dateInvestigate: "30 พ.ย. 2565",
|
||||
status: "0",
|
||||
active: "0",
|
||||
},
|
||||
{
|
||||
subject: "กระทำทุจริตเงินกองทุน",
|
||||
interrogated: "ปรมาพร ศรีมี",
|
||||
fault: "2",
|
||||
penaltyLevel: "1",
|
||||
caseFault: "พบการทุจริต",
|
||||
dateInvestigate: "14 ก.ย. 2565",
|
||||
status: "1",
|
||||
active: "1",
|
||||
},
|
||||
{
|
||||
subject: "กระทำทุจริตเงินกองทุน",
|
||||
interrogated: "นายกัณฐิมา กาฬสินธ์ุ",
|
||||
fault: "1",
|
||||
penaltyLevel: "0",
|
||||
caseFault: "test",
|
||||
dateInvestigate: "test",
|
||||
status: "0",
|
||||
active: "1",
|
||||
},
|
||||
{
|
||||
subject: "พูดจาไม่สุภาพ",
|
||||
interrogated: "นายปิยรมย์ ศิริธาราฟ",
|
||||
interrogated: "สมรัก ใจอารีย์",
|
||||
fault: "2",
|
||||
penaltyLevel: "0",
|
||||
caseFault: "test",
|
||||
dateInvestigate: "test",
|
||||
penaltyLevel: "1",
|
||||
caseFault: "พูดจาไม่สุภาพกับผู้บังคับบัญชา",
|
||||
dateInvestigate: "11 ส.ค. 2565",
|
||||
status: "0",
|
||||
active: "1",
|
||||
},
|
||||
|
|
@ -246,8 +246,14 @@ const deleteData = async (id: string) => {
|
|||
<q-td key="status" :props="props">
|
||||
{{ props.row.status }}
|
||||
</q-td>
|
||||
<q-td auto-width style="width: 10rem">
|
||||
<q-btn color="primary" class="q-px-xl q-py-xs">ยื่นยันผล</q-btn>
|
||||
<q-td style="font-size: 14px; width: 10rem">
|
||||
<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-tr>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -57,11 +57,9 @@
|
|||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
<q-table
|
||||
<d-table
|
||||
ref="table"
|
||||
flat
|
||||
bordered
|
||||
class="custom-header-table"
|
||||
v-bind="attrs"
|
||||
virtual-scroll
|
||||
:virtual-scroll-sticky-size-start="48"
|
||||
|
|
@ -92,7 +90,7 @@
|
|||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</q-table>
|
||||
</d-table>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, useAttrs } from "vue";
|
||||
|
|
|
|||
|
|
@ -1,50 +1,68 @@
|
|||
interface DataOption {
|
||||
id: string;
|
||||
name: string;
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
interface investigatefactsDataRowType {
|
||||
subject: string;
|
||||
interrogated: string;
|
||||
fault: string;
|
||||
status: string;
|
||||
active: string;
|
||||
subject: string;
|
||||
interrogated: string;
|
||||
fault: string;
|
||||
status: string;
|
||||
active: string;
|
||||
}
|
||||
interface MyObjectRef {
|
||||
orderType: any;
|
||||
orderBy: any;
|
||||
listInvestigation: any,
|
||||
authority: any,
|
||||
orderNumber: any,
|
||||
dateYear: any,
|
||||
date: any,
|
||||
authorityPosition: any,
|
||||
subject: any,
|
||||
mistakeDetail: any,
|
||||
[key: string]: any;
|
||||
orderType: any;
|
||||
orderBy: any;
|
||||
listInvestigation: any;
|
||||
authority: any;
|
||||
orderNumber: any;
|
||||
dateYear: any;
|
||||
date: any;
|
||||
authorityPosition: any;
|
||||
subject: any;
|
||||
mistakeDetail: any;
|
||||
[key: string]: any;
|
||||
}
|
||||
interface MyObjectComplaintsRef {
|
||||
complainantType: any
|
||||
complainant: any
|
||||
office: any
|
||||
agency: any
|
||||
topicComplaint: any
|
||||
datereceive: any
|
||||
dateconsideration: any
|
||||
offenseDescription: any
|
||||
considerationLevel: any
|
||||
datewarn: any
|
||||
receivecomplaints: any
|
||||
petitioner: any
|
||||
files: any
|
||||
[key: string]: any;
|
||||
complainantType: any;
|
||||
complainant: any;
|
||||
office: any;
|
||||
agency: any;
|
||||
topicComplaint: any;
|
||||
datereceive: any;
|
||||
dateconsideration: any;
|
||||
offenseDescription: any;
|
||||
considerationLevel: any;
|
||||
datewarn: any;
|
||||
receivecomplaints: any;
|
||||
petitioner: any;
|
||||
files: 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 {
|
||||
DataOption,
|
||||
investigatefactsDataRowType,
|
||||
MyObjectRef,
|
||||
MyObjectComplaintsRef,
|
||||
DataOption,
|
||||
investigatefactsDataRowType,
|
||||
MyObjectRef,
|
||||
MyObjectComplaintsRef,
|
||||
investigateDisDataRowType,
|
||||
directorType,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ const complaintMain = () =>
|
|||
const factsMain = () =>
|
||||
import("@/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue");
|
||||
const investigatefactsAdd = () =>
|
||||
import(
|
||||
"@/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue"
|
||||
);
|
||||
import("@/modules/11_discipline/components/2_InvestigateFacts/AddPage.vue");
|
||||
const disciplinaryMain = () =>
|
||||
import(
|
||||
"@/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue"
|
||||
|
|
@ -33,7 +31,7 @@ const reportType = () =>
|
|||
|
||||
const InvestigateDisciplinaryAdd = () =>
|
||||
import(
|
||||
"@/modules/11_discipline/components/3_InvestigateDisciplinary/addInvestigate.vue"
|
||||
"@/modules/11_discipline/components/3_InvestigateDisciplinary/AddPage.vue"
|
||||
);
|
||||
const orderPage = () =>
|
||||
import("@/modules/11_discipline/components/4_Order/OrderPage.vue");
|
||||
|
|
|
|||
|
|
@ -1,69 +1,109 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import type {
|
||||
investigateDisDataRowType,
|
||||
DataOption,
|
||||
directorType,
|
||||
} from "@/modules/11_discipline/interface/index/Main";
|
||||
|
||||
export const useInvestigateDisStore = defineStore("DisciplineInvestigateDis", () => {
|
||||
const rows = ref<any>([]);
|
||||
|
||||
async function fecthList(data: any) {
|
||||
let datalist = data.map((e: any) => ({
|
||||
subject: e.subject,
|
||||
interrogated: e.interrogated,
|
||||
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;
|
||||
console.log(rows.value);
|
||||
}
|
||||
function convertFault(val: string) {
|
||||
switch (val) {
|
||||
case "0":
|
||||
return "ความผิดวินัยยังไม่ระบุ";
|
||||
case "1":
|
||||
return "ความผิดวินัยไม่ร้ายแรง";
|
||||
case "2":
|
||||
return "ความผิดวินัยร้ายแรง";
|
||||
export const useInvestigateDisStore = defineStore(
|
||||
"DisciplineInvestigateDis",
|
||||
() => {
|
||||
const rows = ref<investigateDisDataRowType[]>([]);
|
||||
const rows2 = ref<directorType[]>([]);
|
||||
const selected = ref<directorType[]>([]);
|
||||
const optionsTypefault = ref<DataOption[]>([
|
||||
{ id: "0", name: "ไม่ระบุ" },
|
||||
{ id: "1", name: "ร้ายแรง" },
|
||||
{ id: "2", name: "ไม่ร้ายแรง" },
|
||||
]);
|
||||
const optionsfaultLevel = ref<DataOption[]>([
|
||||
{ id: "0", name: "ไม่ร้ายแรง" },
|
||||
{ id: "1", name: "ภาคทัณฑ์" },
|
||||
{ id: "2", name: "ตัดเงินเดือน" },
|
||||
{ id: "3", name: "ลดขั้นเงินเดือน" },
|
||||
{ id: "4", name: "ร้ายแรง" },
|
||||
{ id: "5", name: "ปลดออก" },
|
||||
{ id: "6", name: "ไล่ออก" },
|
||||
]);
|
||||
async function fecthList(data: investigateDisDataRowType[]) {
|
||||
let datalist: any[] = data.map((e: any) => ({
|
||||
subject: e.subject,
|
||||
interrogated: e.interrogated,
|
||||
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;
|
||||
}
|
||||
}
|
||||
function convertSatatus(val: string) {
|
||||
switch (val) {
|
||||
case "0":
|
||||
return "เสร็จสิ้นแล้ว";
|
||||
case "1":
|
||||
return "ยุติเรื่อง";
|
||||
async function fecthDirector(data: directorType[]) {
|
||||
let datalistDirector: any[] = data.map((e: any) => ({
|
||||
nameDirector: e.nameDirector,
|
||||
position: e.position,
|
||||
duty: e.duty,
|
||||
email: e.email,
|
||||
telephone: e.telephone,
|
||||
}));
|
||||
rows2.value = datalistDirector;
|
||||
selected.value = rows2.value;
|
||||
console.log(rows2.value);
|
||||
}
|
||||
}
|
||||
function activeStatus(val: string) {
|
||||
switch (val) {
|
||||
case "0":
|
||||
return "ยังไม่ได้ยืนยันผล";
|
||||
case "1":
|
||||
return "ยืนยันผลเเล้ว";
|
||||
function convertFault(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 "ไล่ออก";
|
||||
function convertSatatus(val: string) {
|
||||
switch (val) {
|
||||
case "0":
|
||||
return "เสร็จสิ้นแล้ว";
|
||||
case "1":
|
||||
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