ปรับวินัย
This commit is contained in:
parent
4f0584c415
commit
141a8aa435
6 changed files with 53 additions and 103 deletions
|
|
@ -211,13 +211,12 @@ function confirmDelete(id: string) {
|
||||||
.delete(config.API.complaintFileDelete(formData.id, id))
|
.delete(config.API.complaintFileDelete(formData.id, id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, `ลบไฟล์สำเร็จ`);
|
success($q, `ลบไฟล์สำเร็จ`);
|
||||||
|
props.getData();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {});
|
||||||
props.getData();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -81,22 +81,22 @@ const dateMonth = ref<DataDateMonthObject>({
|
||||||
});
|
});
|
||||||
|
|
||||||
/** function เรียกข่อมูล calendar*/
|
/** function เรียกข่อมูล calendar*/
|
||||||
function getRandomColor() {
|
// function getRandomColor() {
|
||||||
return (
|
// return (
|
||||||
"hsl(" +
|
// "hsl(" +
|
||||||
360 * Math.random() +
|
// 360 * Math.random() +
|
||||||
"," +
|
// "," +
|
||||||
(25 + 70 * Math.random()) +
|
// (25 + 70 * Math.random()) +
|
||||||
"%," +
|
// "%," +
|
||||||
(85 + 10 * Math.random()) +
|
// (85 + 10 * Math.random()) +
|
||||||
"%)"
|
// "%)"
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
async function fetchCalendar() {
|
async function fetchCalendar() {
|
||||||
showLoader();
|
showLoader();
|
||||||
const defaultColor = "#E3FDDA";
|
const defaultColor = "#e3fdda";
|
||||||
const gradientColors = generateGradientColors(props.lists.length);
|
const gradientColors = '#f7d0dd'
|
||||||
|
|
||||||
const events = await props.lists.map(
|
const events = await props.lists.map(
|
||||||
(e: ExtendHistoryObject, index: number) => ({
|
(e: ExtendHistoryObject, index: number) => ({
|
||||||
|
|
@ -107,7 +107,7 @@ async function fetchCalendar() {
|
||||||
allDay: false,
|
allDay: false,
|
||||||
color:
|
color:
|
||||||
props.lists.length > 1 && index > 0
|
props.lists.length > 1 && index > 0
|
||||||
? gradientColors[index]
|
? gradientColors
|
||||||
: defaultColor,
|
: defaultColor,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
@ -123,13 +123,13 @@ async function fetchCalendar() {
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateGradientColors(length: number) {
|
// function generateGradientColors(length: number) {
|
||||||
const colors = [];
|
// const colors = [];
|
||||||
for (let i = 0; i < length; i++) {
|
// for (let i = 0; i < length; i++) {
|
||||||
colors.push(getRandomColor());
|
// colors.push(getRandomColor());
|
||||||
}
|
// }
|
||||||
return colors;
|
// return colors;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function convert เดือนปี
|
* function convert เดือนปี
|
||||||
|
|
|
||||||
|
|
@ -410,12 +410,13 @@ function confirmDeleteRelevant(id: string) {
|
||||||
.delete(config.API.investigateRelevantFileDelete(formData.id, id))
|
.delete(config.API.investigateRelevantFileDelete(formData.id, id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, `ลบไฟล์สำเร็จ`);
|
success($q, `ลบไฟล์สำเร็จ`);
|
||||||
|
props.getData();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
props.getData();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -437,12 +438,13 @@ function confirmDelete(id: string) {
|
||||||
.delete(config.API.investigateFileDelete(formData.id, id))
|
.delete(config.API.investigateFileDelete(formData.id, id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, `ลบไฟล์สำเร็จ`);
|
success($q, `ลบไฟล์สำเร็จ`);
|
||||||
|
props.getData();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
props.getData();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
async function addPerson(data: any) {
|
async function addPerson(data: any) {
|
||||||
|
|
@ -611,12 +613,13 @@ async function saveDuty(id: string, duty: string, resolution: string) {
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
success($q, "บันทึกสำเร็จ");
|
success($q, "บันทึกสำเร็จ");
|
||||||
closeEditDirector();
|
closeEditDirector();
|
||||||
|
props.getData?.();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
props.getData?.();
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -580,23 +580,6 @@ function closeEditDirector() {
|
||||||
modalEditDirector.value = false;
|
modalEditDirector.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// async function saveDuty(id: string, duty: string) {
|
|
||||||
// showLoader();
|
|
||||||
// await http
|
|
||||||
// .put(config.API.disciplinaryEditDuty(props.data.id, id), { duty: duty })
|
|
||||||
// .then((res: any) => {
|
|
||||||
// success($q, "บันทึกสำเร็จ");
|
|
||||||
// closeEditDirector();
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// messageError($q, e);
|
|
||||||
// })
|
|
||||||
// .finally(async () => {
|
|
||||||
// props.fetchData();
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
async function saveDuty(id: string, duty: string, resolution: string) {
|
async function saveDuty(id: string, duty: string, resolution: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -607,12 +590,13 @@ async function saveDuty(id: string, duty: string, resolution: string) {
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
success($q, "บันทึกสำเร็จ");
|
success($q, "บันทึกสำเร็จ");
|
||||||
closeEditDirector();
|
closeEditDirector();
|
||||||
|
props.fetchData();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
props.fetchData();
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1057,11 +1041,6 @@ onMounted(async () => {
|
||||||
)
|
)
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
:rules="[
|
|
||||||
(val) =>
|
|
||||||
!!val ||
|
|
||||||
`${'กรุณาเลือกวันที่เริ่มการสอบสวน'}`,
|
|
||||||
]"
|
|
||||||
:label="`${'วันที่เริ่มการสอบสวน'}`"
|
:label="`${'วันที่เริ่มการสอบสวน'}`"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
|
|
@ -1110,7 +1089,7 @@ onMounted(async () => {
|
||||||
"
|
"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
borderless
|
borderless
|
||||||
:model-value="
|
:model-value="
|
||||||
|
|
@ -1120,11 +1099,6 @@ onMounted(async () => {
|
||||||
)
|
)
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
:rules="[
|
|
||||||
(val) =>
|
|
||||||
!!val ||
|
|
||||||
`${'กรุณาเลือกวันที่สิ้นสุดการสอบสวน'}`,
|
|
||||||
]"
|
|
||||||
:label="`${'วันที่สิ้นสุดการสอบสวน'}`"
|
:label="`${'วันที่สิ้นสุดการสอบสวน'}`"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
|
|
@ -1204,11 +1178,6 @@ onMounted(async () => {
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
:label="`${'วันที่สรุปพยานหลักฐาน'}`"
|
:label="`${'วันที่สรุปพยานหลักฐาน'}`"
|
||||||
:rules="[
|
|
||||||
(val) =>
|
|
||||||
!!val || `${'กรุณาเลือกวันที่สรุปพยานหลักฐาน'}`,
|
|
||||||
]"
|
|
||||||
lazy-rules
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -1256,11 +1225,7 @@ onMounted(async () => {
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
:label="`${'วันที่รายงานผลการสอบสวน'}`"
|
:label="`${'วันที่รายงานผลการสอบสวน'}`"
|
||||||
:rules="[
|
|
||||||
(val) =>
|
|
||||||
!!val || `${'กรุณาเลือกวันที่รายงานผลการสอบสวน'}`,
|
|
||||||
]"
|
|
||||||
lazy-rules
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -1381,8 +1346,6 @@ onMounted(async () => {
|
||||||
for="#casefault"
|
for="#casefault"
|
||||||
label="กรณีมีความผิด"
|
label="กรณีมีความผิด"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกกรณีมีความผิด'}`]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1398,8 +1361,7 @@ onMounted(async () => {
|
||||||
ref="disciplinaryInvestigateAtRef"
|
ref="disciplinaryInvestigateAtRef"
|
||||||
v-model="formData.disciplinaryInvestigateAt"
|
v-model="formData.disciplinaryInvestigateAt"
|
||||||
label="สอบสวนที่"
|
label="สอบสวนที่"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกสอบสวนที่'}`]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1420,10 +1382,7 @@ onMounted(async () => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:options="investigateDis.optionsfaultLevel"
|
:options="investigateDis.optionsfaultLevel"
|
||||||
label="ระดับโทษความผิด"
|
label="ระดับโทษความผิด"
|
||||||
:rules="[
|
|
||||||
(val) => !!val || `${'กรุณาเลือกระดับโทษความผิด'}`,
|
|
||||||
]"
|
|
||||||
lazy-rules
|
|
||||||
group-label="group"
|
group-label="group"
|
||||||
group-values="options"
|
group-values="options"
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
|
|
@ -1453,10 +1412,6 @@ onMounted(async () => {
|
||||||
ref="disciplinaryRefLawRef"
|
ref="disciplinaryRefLawRef"
|
||||||
v-model="formData.disciplinaryRefLaw"
|
v-model="formData.disciplinaryRefLaw"
|
||||||
label="อ้างอิงมาตราตามกฎหมาย"
|
label="อ้างอิงมาตราตามกฎหมาย"
|
||||||
:rules="[
|
|
||||||
(val) => !!val || `${'กรุณากรอกอ้างอิงมาตราตามกฎหมาย'}`,
|
|
||||||
]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1474,8 +1429,6 @@ onMounted(async () => {
|
||||||
v-model="formData.disciplinarySummaryEvidence"
|
v-model="formData.disciplinarySummaryEvidence"
|
||||||
label="สรุปพยานหลักฐานสนับสนุนข้อกล่าวหา"
|
label="สรุปพยานหลักฐานสนับสนุนข้อกล่าวหา"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกสรุปพยานหลักฐานสนับสนุนข้อกล่าวหา'}`]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1492,8 +1445,6 @@ onMounted(async () => {
|
||||||
label="บันทึกถ้อยคำของผู้กล่าวหา"
|
label="บันทึกถ้อยคำของผู้กล่าวหา"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกบันทึกถ้อยคำของผู้กล่าวหา'}`]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1510,8 +1461,6 @@ onMounted(async () => {
|
||||||
label="พยานและบันทึกถ้อยคำพยาน"
|
label="พยานและบันทึกถ้อยคำพยาน"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกพยานและบันทึกถ้อยคำพยาน'}`]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1528,8 +1477,6 @@ onMounted(async () => {
|
||||||
label="ผลการสอบสวน"
|
label="ผลการสอบสวน"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกผลการสอบสวน'}`]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1557,12 +1504,8 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
lazy-rules
|
|
||||||
ref="disciplinaryStatusResultRef"
|
ref="disciplinaryStatusResultRef"
|
||||||
v-model="formData.disciplinaryStatusResult"
|
v-model="formData.disciplinaryStatusResult"
|
||||||
:rules="[
|
|
||||||
(val) => !!val || `${'กรุณาเลือกผลการสอบสวน'}`,
|
|
||||||
]"
|
|
||||||
:options="mainStore.statusResultOptions"
|
:options="mainStore.statusResultOptions"
|
||||||
label="ผลการสอบสวน"
|
label="ผลการสอบสวน"
|
||||||
emit-value
|
emit-value
|
||||||
|
|
@ -1599,10 +1542,6 @@ onMounted(async () => {
|
||||||
dense
|
dense
|
||||||
ref="disciplinaryCauseTextRef"
|
ref="disciplinaryCauseTextRef"
|
||||||
v-model="formData.disciplinaryCauseText"
|
v-model="formData.disciplinaryCauseText"
|
||||||
:rules="[
|
|
||||||
(val) =>
|
|
||||||
!!val || `${'กรุณาเลือกร้ายแรง/ไม่ร้ายแรง'}`,
|
|
||||||
]"
|
|
||||||
:options="investigateDis.causeTextOptions"
|
:options="investigateDis.causeTextOptions"
|
||||||
label="ร้ายแรง/ไม่ร้ายแรง"
|
label="ร้ายแรง/ไม่ร้ายแรง"
|
||||||
emit-value
|
emit-value
|
||||||
|
|
@ -1630,10 +1569,8 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
ref="disciplinaryResultRef"
|
ref="disciplinaryResultRef"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
|
||||||
borderless
|
borderless
|
||||||
v-model="formData.disciplinaryResult"
|
v-model="formData.disciplinaryResult"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกเหตุผล'}`]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'เหตุผล'}`"
|
:label="`${'เหตุผล'}`"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|
|
||||||
|
|
@ -94,8 +94,8 @@ watch(props, () => {
|
||||||
dense
|
dense
|
||||||
class="col-12 q-mb-sm"
|
class="col-12 q-mb-sm"
|
||||||
debounce="300"
|
debounce="300"
|
||||||
placeholder="มติ/คำสั่งแต่งตั้ง"
|
placeholder="มติ/คำสั่ง"
|
||||||
:rules="[(val) => !!val || `กรุณากรอก มติ/คำสั่งแต่งตั้ง`]"
|
:rules="[(val) => !!val || `กรุณากรอก มติ/คำสั่ง`]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ export const useInvestigateDisStore = defineStore(
|
||||||
"offenseDetails",
|
"offenseDetails",
|
||||||
"disciplinaryFaultLevel",
|
"disciplinaryFaultLevel",
|
||||||
"disciplinaryCaseFault",
|
"disciplinaryCaseFault",
|
||||||
|
"disciplinaryDate",
|
||||||
"createdAt",
|
"createdAt",
|
||||||
"status",
|
"status",
|
||||||
]);
|
]);
|
||||||
|
|
@ -148,10 +149,19 @@ export const useInvestigateDisStore = defineStore(
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "createdAt",
|
name: "disciplinaryDate",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันที่สอบสวน",
|
label: "วันที่สอบสวน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
field: "disciplinaryDate",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "createdAt",
|
||||||
|
align: "left",
|
||||||
|
label: "วันที่รับเรื่อง",
|
||||||
|
sortable: true,
|
||||||
field: "createdAt",
|
field: "createdAt",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
|
@ -217,7 +227,7 @@ export const useInvestigateDisStore = defineStore(
|
||||||
{
|
{
|
||||||
name: "commandNo",
|
name: "commandNo",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "มติ",
|
label: "มติ/คำสั่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "commandNo",
|
field: "commandNo",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
|
|
@ -251,11 +261,12 @@ export const useInvestigateDisStore = defineStore(
|
||||||
async function fetchList(data: investigateDisDataRowType[]) {
|
async function fetchList(data: investigateDisDataRowType[]) {
|
||||||
let datalist: any[] = data.map((e: any) => ({
|
let datalist: any[] = data.map((e: any) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
title: e.title ? e.title :'-',
|
title: e.title ? e.title : '-',
|
||||||
respondentType: e.respondentType ? convertRespondentType(e.respondentType):'-',
|
respondentType: e.respondentType ? convertRespondentType(e.respondentType) : '-',
|
||||||
offenseDetails: e.offenseDetails ? convertFault(e.offenseDetails):'-',
|
offenseDetails: e.offenseDetails ? convertFault(e.offenseDetails) : '-',
|
||||||
disciplinaryFaultLevel: e.disciplinaryFaultLevel ?? "-",
|
disciplinaryFaultLevel: e.disciplinaryFaultLevel ?? "-",
|
||||||
disciplinaryCaseFault: e.disciplinaryCaseFault ?? "-",
|
disciplinaryCaseFault: e.disciplinaryCaseFault ?? "-",
|
||||||
|
disciplinaryDate: e.disciplinaryDateStart && e.disciplinaryDateEnd ? `${date2Thai(e.disciplinaryDateStart)} - ${date2Thai(e.disciplinaryDateEnd)}` : '-',
|
||||||
status: convertStatus(e.status) ?? "-",
|
status: convertStatus(e.status) ?? "-",
|
||||||
createdAt: e.createdAt ? date2Thai(e.createdAt) : "-",
|
createdAt: e.createdAt ? date2Thai(e.createdAt) : "-",
|
||||||
}));
|
}));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue