Merge branch 'develop' into warunee-dev
# Conflicts: # src/modules/11_discipline/router.ts
This commit is contained in:
commit
8113b723ad
26 changed files with 1080 additions and 631 deletions
|
|
@ -278,7 +278,7 @@ const openModalCalendar = (rows: any) => {
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
<div>
|
<div>
|
||||||
<q-btn color="info" @click="$router.push('/exit-Interview/edit-question')">แก้ไขคำถาม</q-btn>
|
<q-btn color="blue-9" icon="mdi-square-edit-outline" outline @click="$router.push('/exit-Interview/edit-question')"><span class="q-pl-sm">แก้ไขคำถาม</span></q-btn>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-input class="col-xs-12 col-sm-3 col-md-2" standout dense v-model="filterKeyword" ref="filterRef" outlined
|
<q-input class="col-xs-12 col-sm-3 col-md-2" standout dense v-model="filterKeyword" ref="filterRef" outlined
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,8 @@ function colsePopup() {
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="props.modal">
|
<q-dialog v-model="props.modal">
|
||||||
<q-card style="width: 950px; max-width: 80vw">
|
<q-card style="width: 950px; max-width: 80vw">
|
||||||
<q-card-section>
|
|
||||||
<q-toolbar>
|
<q-toolbar>
|
||||||
<q-toolbar-title>
|
<q-toolbar-title class="text-subtitle1 text-weight-bold">
|
||||||
<span style="margin-right: 0"> รายละเอียดการลงเวลาของ</span>
|
<span style="margin-right: 0"> รายละเอียดการลงเวลาของ</span>
|
||||||
<span class="text-primary">{{ titlename }}</span>
|
<span class="text-primary">{{ titlename }}</span>
|
||||||
</q-toolbar-title>
|
</q-toolbar-title>
|
||||||
|
|
@ -57,22 +56,19 @@ function colsePopup() {
|
||||||
@click="colsePopup"
|
@click="colsePopup"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
</q-card-section>
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-pt-none">
|
<q-card-section class="q-pa-none">
|
||||||
<div class="q-pa-md">
|
<div class="q-pa-md">
|
||||||
<q-banner
|
<q-card
|
||||||
inline-actions
|
bordered
|
||||||
rounded
|
class="q-pa-sm bg-grey-1"
|
||||||
class="bg-grey-2"
|
|
||||||
style="border: 2px solid rgb(239, 236, 236)"
|
|
||||||
>
|
>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label class="text-grey-5"
|
<q-item-label class="text-grey-8"
|
||||||
>ชื่อ-นามสกุล</q-item-label
|
>ชื่อ-นามสกุล</q-item-label
|
||||||
>
|
>
|
||||||
<q-item-label>{{ titlename }}</q-item-label>
|
<q-item-label>{{ titlename }}</q-item-label>
|
||||||
|
|
@ -83,7 +79,7 @@ function colsePopup() {
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label class="text-grey-5">
|
<q-item-label class="text-grey-8">
|
||||||
วันที่เข้างาน</q-item-label
|
วันที่เข้างาน</q-item-label
|
||||||
>
|
>
|
||||||
<q-item-label>05 ต.ค. 56</q-item-label>
|
<q-item-label>05 ต.ค. 56</q-item-label>
|
||||||
|
|
@ -93,12 +89,12 @@ function colsePopup() {
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label class="text-grey-5">สถานะ</q-item-label>
|
<q-item-label class="text-grey-8">สถานะ</q-item-label>
|
||||||
<q-item-label>{{ status }}</q-item-label>
|
<q-item-label>{{ status }}</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col row items-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="!statusEdit"
|
v-if="!statusEdit"
|
||||||
dense
|
dense
|
||||||
|
|
@ -106,8 +102,7 @@ function colsePopup() {
|
||||||
round
|
round
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="mdi-pencil"
|
icon="mdi-pencil"
|
||||||
size="sm"
|
size="12px"
|
||||||
class="q-mt-lg"
|
|
||||||
@click="statusEdit = true"
|
@click="statusEdit = true"
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไข</q-tooltip>
|
<q-tooltip>แก้ไข</q-tooltip>
|
||||||
|
|
@ -119,8 +114,7 @@ function colsePopup() {
|
||||||
round
|
round
|
||||||
color="red"
|
color="red"
|
||||||
icon="mdi-undo"
|
icon="mdi-undo"
|
||||||
size="sm"
|
size="12px"
|
||||||
class="q-mt-lg"
|
|
||||||
@click="statusEdit = false"
|
@click="statusEdit = false"
|
||||||
>
|
>
|
||||||
<q-tooltip>ยกเลิก</q-tooltip>
|
<q-tooltip>ยกเลิก</q-tooltip>
|
||||||
|
|
@ -131,30 +125,29 @@ function colsePopup() {
|
||||||
round
|
round
|
||||||
color="secondary"
|
color="secondary"
|
||||||
icon="save"
|
icon="save"
|
||||||
size="sm"
|
size="12px"
|
||||||
class="q-mt-lg"
|
class="q-ml-sm"
|
||||||
>
|
>
|
||||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-banner>
|
</q-card>
|
||||||
<div class="row q-gutter-md q-mt-md">
|
<div class="row q-gutter-md q-pt-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-card flat bordered>
|
<q-card flat bordered>
|
||||||
<q-card-section>
|
|
||||||
<div class="q-pa-md q-gutter-md">
|
<div class="q-pa-md q-gutter-md">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-grey-6">เวลาเข้างาน</div>
|
<div class="col text-grey-8">เวลาเข้างาน</div>
|
||||||
<div class="col">{{ timeIn }}</div>
|
<div class="col">{{ timeIn }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-grey-6">พิกัด</div>
|
<div class="col text-grey-8">พิกัด</div>
|
||||||
<div class="col">{{ coordinatesIn }}</div>
|
<div class="col">{{ coordinatesIn }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6 text-grey-6">รูปภาพ</div>
|
<div class="col-6 text-grey-8">รูปภาพ</div>
|
||||||
<div class="col-5">
|
<div class="col-5">
|
||||||
<q-img
|
<q-img
|
||||||
style="
|
style="
|
||||||
|
|
@ -167,27 +160,25 @@ function colsePopup() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-grey-6">หมายเหตุ</div>
|
<div class="col text-grey-8">หมายเหตุ</div>
|
||||||
<div class="col">-</div>
|
<div class="col">-</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-card flat bordered>
|
<q-card flat bordered>
|
||||||
<q-card-section>
|
|
||||||
<div class="q-pa-md q-gutter-md">
|
<div class="q-pa-md q-gutter-md">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-grey-6">เวลาออกงาน</div>
|
<div class="col text-grey-8">เวลาออกงาน</div>
|
||||||
<div class="col">{{ timeOut }}</div>
|
<div class="col">{{ timeOut }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-grey-6">พิกัด</div>
|
<div class="col text-grey-8">พิกัด</div>
|
||||||
<div class="col">{{ coordinatesOut }}</div>
|
<div class="col">{{ coordinatesOut }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6 text-grey-6">รูปภาพ</div>
|
<div class="col-6 text-grey-8">รูปภาพ</div>
|
||||||
<div class="col-5">
|
<div class="col-5">
|
||||||
<q-img
|
<q-img
|
||||||
style="
|
style="
|
||||||
|
|
@ -200,11 +191,10 @@ function colsePopup() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-grey-6">หมายเหตุ</div>
|
<div class="col text-grey-8">หมายเหตุ</div>
|
||||||
<div class="col">-</div>
|
<div class="col">-</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -51,28 +51,28 @@ function changTab() {
|
||||||
<div class="toptitle text-dark col-12 row items-center">รายการลา</div>
|
<div class="toptitle text-dark col-12 row items-center">รายการลา</div>
|
||||||
<div>
|
<div>
|
||||||
<!-- <q-card flat bordered class="col-12 q-mt-sm"> -->
|
<!-- <q-card flat bordered class="col-12 q-mt-sm"> -->
|
||||||
<div class="q-pa-md">
|
<q-card bordered flat >
|
||||||
<q-tabs
|
<q-tabs
|
||||||
v-model="leaveStore.tab"
|
v-model="leaveStore.tab"
|
||||||
dense
|
dense
|
||||||
align="left"
|
align="left"
|
||||||
inline-label
|
inline-label
|
||||||
class="bg-grey-4 rounded-borders"
|
class="rounded-borders"
|
||||||
indicator-color="white"
|
indicator-color="primary"
|
||||||
|
active-bg-color="teal-1"
|
||||||
|
active-class="text-primary"
|
||||||
>
|
>
|
||||||
<q-tab
|
<q-tab
|
||||||
@click="changTab"
|
@click="changTab"
|
||||||
name="1"
|
name="1"
|
||||||
label="รายการลาที่อยู่ระหว่างดำเนิดการ"
|
label="รายการลาที่อยู่ระหว่างดำเนิดการ"
|
||||||
:class="
|
|
||||||
leaveStore.tab == '1' ? 'bg-white text-primary rounded-borders ' : ''
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<q-badge
|
<q-badge
|
||||||
color="grey-4"
|
color="grey-4"
|
||||||
:class="
|
:class="
|
||||||
leaveStore.tab == '1'
|
leaveStore.tab == '1'
|
||||||
? 'q-px-sm text-weight-medium text-primary q-ml-xl'
|
? 'q-px-sm text-weight-medium text-primary q-ml-xl bg-teal-1'
|
||||||
: 'q-px-sm text-weight-medium text-black q-ml-xl'
|
: 'q-px-sm text-weight-medium text-black q-ml-xl'
|
||||||
"
|
"
|
||||||
:label="leaveStore.amounttab1"
|
:label="leaveStore.amounttab1"
|
||||||
|
|
@ -83,17 +83,13 @@ function changTab() {
|
||||||
@click="changTab"
|
@click="changTab"
|
||||||
name="2"
|
name="2"
|
||||||
label="รายการลาทั้งหมด"
|
label="รายการลาทั้งหมด"
|
||||||
:class="
|
|
||||||
leaveStore.tab == '2'
|
|
||||||
? 'bg-white text-primary rounded rounded-borders '
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<q-badge
|
<q-badge
|
||||||
color="grey-4"
|
color="grey-4"
|
||||||
:class="
|
:class="
|
||||||
leaveStore.tab == '2'
|
leaveStore.tab == '2'
|
||||||
? 'q-px-sm text-weight-medium text-primary q-ml-xl'
|
? 'q-px-sm text-weight-medium text-primary q-ml-xl bg-teal-1'
|
||||||
: 'q-px-sm text-weight-medium text-black q-ml-xl'
|
: 'q-px-sm text-weight-medium text-black q-ml-xl'
|
||||||
"
|
"
|
||||||
:label="leaveStore.amounttab2"
|
:label="leaveStore.amounttab2"
|
||||||
|
|
@ -101,6 +97,7 @@ function changTab() {
|
||||||
/>
|
/>
|
||||||
</q-tab>
|
</q-tab>
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
|
<q-separator />
|
||||||
|
|
||||||
<q-tab-panels v-model="leaveStore.tab" animated>
|
<q-tab-panels v-model="leaveStore.tab" animated>
|
||||||
<q-tab-panel name="1">
|
<q-tab-panel name="1">
|
||||||
|
|
@ -113,8 +110,8 @@ function changTab() {
|
||||||
<TableList />
|
<TableList />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</div>
|
|
||||||
<!-- </q-card> -->
|
<!-- </q-card> -->
|
||||||
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,27 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
import type { DataOption } from "../../interface/index/Main";
|
// import Type
|
||||||
|
import type {
|
||||||
|
DataOption,
|
||||||
|
MyObjectComplaintsRef,
|
||||||
|
} from "../../interface/index/Main";
|
||||||
|
|
||||||
// importStroe
|
// importStroe
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useComplainstDataStore } from "../../stroes/ComplaintsStore";
|
import { useComplainstDataStore } from "../../stroes/ComplaintsStore";
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, dialogConfirm } = mixin;
|
const { date2Thai, dialogConfirm } = mixin; //function จาก stores หลัก
|
||||||
|
|
||||||
const complainstStore = useComplainstDataStore();
|
const complainstStore = useComplainstDataStore();
|
||||||
const { selectComplainantTpye, filterSelector, fectOptioin } = complainstStore;
|
const { selectComplainantTpye, filterSelector, fectOptioin } = complainstStore; // function จาก store complainstStore
|
||||||
|
|
||||||
|
// options ทั้งหมด
|
||||||
const complainantoptions = ref<DataOption[]>([
|
const complainantoptions = ref<DataOption[]>([
|
||||||
{ id: "0", name: "บุคคล" },
|
{ id: "0", name: "บุคคล" },
|
||||||
{ id: "1", name: "หน่ายงาน" },
|
{ id: "1", name: "หน่ายงาน" },
|
||||||
|
|
@ -67,15 +71,15 @@ const fileDocDataUpload = ref<File[]>([]);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fectOptioin(complainantoptions.value, agencytoptions.value);
|
fectOptioin(complainantoptions.value, agencytoptions.value);
|
||||||
});
|
});
|
||||||
|
// เลือกผู้ร้องเรียน
|
||||||
async function selectComplainant(val: string) {
|
async function selectComplainant(val: string) {
|
||||||
complainant.value = "";
|
complainant.value = "";
|
||||||
office.value = "";
|
office.value = "";
|
||||||
agency.value = "";
|
agency.value = "";
|
||||||
if (val === "0") {
|
if (val === "0") {
|
||||||
await fectListname();
|
await fectListname(); // ถ้าเลือกบุกคลจะเรียก function fectListname เรียกรายชื่อจากทะเบียน
|
||||||
} else if (val === "1") {
|
} else if (val === "1") {
|
||||||
await fectOffice();
|
await fectOffice(); // ถ้าเลือกหน่วยงานจะเรียก function fectOffice เรียกโครงสร้างสำนักงาน
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// เรียกรายชื่อ
|
// เรียกรายชื่อ
|
||||||
|
|
@ -96,6 +100,7 @@ async function fectListname() {
|
||||||
];
|
];
|
||||||
selectComplainantTpye(listName);
|
selectComplainantTpye(listName);
|
||||||
}
|
}
|
||||||
|
// เรียกโครงสร้างสำนักงาน
|
||||||
async function fectOffice() {
|
async function fectOffice() {
|
||||||
// const listOffice = [
|
// const listOffice = [
|
||||||
// {
|
// {
|
||||||
|
|
@ -112,22 +117,23 @@ async function fectOffice() {
|
||||||
// },
|
// },
|
||||||
// ];
|
// ];
|
||||||
}
|
}
|
||||||
|
// อัพโหลดไฟล์
|
||||||
const fileUploadDoc = async (files: any) => {
|
const fileUploadDoc = async (files: any) => {
|
||||||
files.forEach((file: any) => {
|
files.forEach((file: any) => {
|
||||||
fileDocDataUpload.value.push(file);
|
fileDocDataUpload.value.push(file);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// เลือกระดับการพิจารณา
|
||||||
function selectLevel(val: string) {
|
function selectLevel(val: string) {
|
||||||
let dayNum = 0;
|
let dayNum = 0;
|
||||||
if (val == "0") {
|
if (val == "0") {
|
||||||
dayNum = 45;
|
dayNum = 45; // ปกติ
|
||||||
} else if (val == "1") {
|
} else if (val == "1") {
|
||||||
dayNum = 30;
|
dayNum = 30; // ด่วน
|
||||||
} else {
|
} else {
|
||||||
dayNum = 15;
|
dayNum = 15; // ด่วนมาก
|
||||||
}
|
}
|
||||||
|
// วันแจ้งเตือนล่วงหน้า
|
||||||
if (dateconsideration.value) {
|
if (dateconsideration.value) {
|
||||||
const currentDate = new Date(dateconsideration.value);
|
const currentDate = new Date(dateconsideration.value);
|
||||||
const newDate = new Date(
|
const newDate = new Date(
|
||||||
|
|
@ -136,7 +142,56 @@ function selectLevel(val: string) {
|
||||||
datewarn.value = newDate;
|
datewarn.value = newDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// validateForm
|
||||||
|
const complainantTypeRef = ref<any>(null);
|
||||||
|
const complainantRef = ref<any>(null);
|
||||||
|
const officeRef = ref<any>(null);
|
||||||
|
const agencyRef = ref<any>(null);
|
||||||
|
const topicComplaintRef = ref<any>(null);
|
||||||
|
const detailRef = ref<any>(null);
|
||||||
|
const datereceiveRef = ref<any>();
|
||||||
|
const dateconsiderationRef = ref<any>(null);
|
||||||
|
const offenseDescriptionRef = ref<any>(null);
|
||||||
|
const considerationLevelRef = ref<any>(null);
|
||||||
|
const datewarnRef = ref<any>(null);
|
||||||
|
const receivecomplaintsRef = ref<any>(null);
|
||||||
|
const petitionerRef = ref<any>(null);
|
||||||
|
const filesRef = ref<any>(null);
|
||||||
|
|
||||||
|
const objectComplaintsRef: MyObjectComplaintsRef = {
|
||||||
|
complainantType: complainantTypeRef,
|
||||||
|
complainant: complainantRef,
|
||||||
|
office: officeRef,
|
||||||
|
agency: agencyRef,
|
||||||
|
topicComplaint: topicComplaintRef,
|
||||||
|
detail: detailRef,
|
||||||
|
datereceive: datereceiveRef,
|
||||||
|
dateconsideration: dateconsiderationRef,
|
||||||
|
offenseDescription: offenseDescriptionRef,
|
||||||
|
considerationLevel: considerationLevelRef,
|
||||||
|
datewarn: datewarnRef,
|
||||||
|
receivecomplaints: receivecomplaintsRef,
|
||||||
|
petitioner: petitionerRef,
|
||||||
|
files: filesRef,
|
||||||
|
};
|
||||||
|
function validateForm() {
|
||||||
|
const hasError = [];
|
||||||
|
for (const key in objectComplaintsRef) {
|
||||||
|
if (Object.prototype.hasOwnProperty.call(objectComplaintsRef, key)) {
|
||||||
|
const property = objectComplaintsRef[key];
|
||||||
|
if (property.value && typeof property.value.validate === "function") {
|
||||||
|
const isValid = property.value.validate();
|
||||||
|
hasError.push(isValid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasError.every((result) => result === true)) {
|
||||||
|
onSubmit();
|
||||||
|
} else {
|
||||||
|
console.log("ไม่ผ่าน ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// บันทึกข้อมูล
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
|
|
@ -162,13 +217,14 @@ function onSubmit() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 q-mt-sm">
|
<div class="col-12 q-mt-sm">
|
||||||
<q-card flat bordered>
|
<q-card flat bordered>
|
||||||
<q-form @submit.prevent="onSubmit">
|
<form @submit.prevent="validateForm">
|
||||||
<div class="col-12 row q-pa-md">
|
<div class="col-12 row q-pa-md">
|
||||||
<div
|
<div
|
||||||
class="col-xs-12 col-sm-12 row q-col-gutter-x-md q-col-gutter-y-xs"
|
class="col-xs-12 col-sm-12 row q-col-gutter-x-md q-col-gutter-y-xs"
|
||||||
>
|
>
|
||||||
<div class="col-xs-12 col-sm-2">
|
<div class="col-xs-12 col-sm-2">
|
||||||
<q-select
|
<q-select
|
||||||
|
ref="complainantTypeRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="complainantType"
|
v-model="complainantType"
|
||||||
|
|
@ -185,26 +241,58 @@ function onSubmit() {
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'filtercomplainantType'
|
doneFn: Function) => filterSelector(inputValue, doneFn, 'filtercomplainantType'
|
||||||
)"
|
)"
|
||||||
/>
|
>
|
||||||
|
<template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey">
|
||||||
|
ไม่มีข้อมูล
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-2" v-if="complainantType === '0'">
|
<div class="col-xs-12 col-sm-2" v-if="complainantType === '0'">
|
||||||
<q-select
|
<q-select
|
||||||
|
ref="complainantRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="complainant"
|
v-model="complainant"
|
||||||
:options="complainstStore.optionListName"
|
:options="complainstStore.optionListName"
|
||||||
label="ราชชื่อจากทะเบียรประวัติ"
|
label="รายชื่อจากทะเบียรประวัติ"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
/>
|
:rules="[(val) => !!val || `${'กรุณาเลือกรายชื่อ'}`]"
|
||||||
|
lazy-rules
|
||||||
|
use-input
|
||||||
|
@filter="(inputValue: any,
|
||||||
|
doneFn: Function) => filterSelector(inputValue, doneFn, 'filtercomplainantOP'
|
||||||
|
)"
|
||||||
|
><template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey">
|
||||||
|
ไม่มีข้อมูล
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-2" v-if="complainantType === '1'">
|
<div class="col-xs-12 col-sm-2" v-if="complainantType === '1'">
|
||||||
<q-input dense outlined v-model="office" label="เลือกสำนักงาน" />
|
<q-input
|
||||||
|
ref="officeRef"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
v-model="office"
|
||||||
|
label="เลือกสำนักงาน"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกสำนักงาน'}`]"
|
||||||
|
lazy-rules
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-2">
|
<div class="col-xs-12 col-sm-2">
|
||||||
<q-select
|
<q-select
|
||||||
|
ref="agencyRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="agency"
|
v-model="agency"
|
||||||
|
|
@ -220,10 +308,19 @@ function onSubmit() {
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'filteragencytoptions'
|
doneFn: Function) => filterSelector(inputValue, doneFn, 'filteragencytoptions'
|
||||||
)"
|
)"
|
||||||
/>
|
>
|
||||||
|
<template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey">
|
||||||
|
ไม่มีข้อมูล
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-12">
|
<div class="col-xs-12 col-sm-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="topicComplaintRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="topicComplaint"
|
v-model="topicComplaint"
|
||||||
|
|
@ -236,6 +333,7 @@ function onSubmit() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-12">
|
<div class="col-xs-12 col-sm-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="detailRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="detail"
|
v-model="detail"
|
||||||
|
|
@ -264,6 +362,7 @@ function onSubmit() {
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="datereceiveRef"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker"
|
class="full-width datepicker"
|
||||||
|
|
@ -306,6 +405,7 @@ function onSubmit() {
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="dateconsiderationRef"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker"
|
class="full-width datepicker"
|
||||||
|
|
@ -334,6 +434,7 @@ function onSubmit() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-2">
|
<div class="col-xs-12 col-sm-2">
|
||||||
<q-select
|
<q-select
|
||||||
|
ref="offenseDescriptionRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="offenseDescription"
|
v-model="offenseDescription"
|
||||||
|
|
@ -349,6 +450,7 @@ function onSubmit() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-2">
|
<div class="col-xs-12 col-sm-2">
|
||||||
<q-select
|
<q-select
|
||||||
|
ref="considerationLevelRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="considerationLevel"
|
v-model="considerationLevel"
|
||||||
|
|
@ -382,6 +484,7 @@ function onSubmit() {
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="datewarnRef"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker"
|
class="full-width datepicker"
|
||||||
|
|
@ -407,6 +510,7 @@ function onSubmit() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-2">
|
<div class="col-xs-12 col-sm-2">
|
||||||
<q-select
|
<q-select
|
||||||
|
ref="receivecomplaintsRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="receivecomplaints"
|
v-model="receivecomplaints"
|
||||||
|
|
@ -423,6 +527,7 @@ function onSubmit() {
|
||||||
<div class="col-xs-12 col-sm-6"></div>
|
<div class="col-xs-12 col-sm-6"></div>
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="petitionerRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="petitioner"
|
v-model="petitioner"
|
||||||
|
|
@ -433,6 +538,7 @@ function onSubmit() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<q-file
|
<q-file
|
||||||
|
ref="filesRef"
|
||||||
class="col-xs-12 col-sm-10"
|
class="col-xs-12 col-sm-10"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -443,6 +549,7 @@ function onSubmit() {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
accept=".pdf,.xlsx,.doc"
|
accept=".pdf,.xlsx,.doc"
|
||||||
clearable
|
clearable
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเพิ่มไฟล์เอกสารหลักฐาน'}`]"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="attach_file" />
|
<q-icon name="attach_file" />
|
||||||
|
|
@ -463,7 +570,7 @@ function onSubmit() {
|
||||||
><q-tooltip>บับทึกข้อมูล</q-tooltip></q-btn
|
><q-tooltip>บับทึกข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</q-form>
|
</form>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { useComplainstDataStore } from "../../stroes/ComplaintsStore";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const complainstStore = useComplainstDataStore();
|
const complainstStore = useComplainstDataStore();
|
||||||
const { fectComplainst } = complainstStore;
|
const { fectComplainst } = complainstStore; // function จาก stores
|
||||||
|
|
||||||
//ข้อมูล Table
|
//ข้อมูล Table
|
||||||
const filterTable = ref<string>("");
|
const filterTable = ref<string>("");
|
||||||
|
|
@ -99,6 +99,7 @@ onMounted(async () => {
|
||||||
await fecthListComplaints();
|
await fecthListComplaints();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// เรีนกรายการเรื่องร้องเรียน
|
||||||
async function fecthListComplaints() {
|
async function fecthListComplaints() {
|
||||||
const listData = [
|
const listData = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import { onMounted, ref } 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";
|
||||||
|
const investigateFactStore = useInvestigateFactStore();
|
||||||
|
const { filterFnOptionsType } = investigateFactStore;
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
messageError,
|
messageError,
|
||||||
|
|
@ -17,51 +20,14 @@ const detail = ref<string>("");
|
||||||
const fault = ref<string>("");
|
const fault = ref<string>("");
|
||||||
const results = ref<string>("");
|
const results = ref<string>("");
|
||||||
const other = ref<string>("");
|
const other = ref<string>("");
|
||||||
const evidenceFiles = ref<any>(null);
|
const evidenceFiles = ref<File | null>(null);
|
||||||
const fileComplaint = ref<any>(null);
|
const fileComplaint = ref<File | null>(null);
|
||||||
const clickTime = ref<boolean>(false);
|
const clickTime = ref<boolean>(false);
|
||||||
const date = ref<Date | null>(null);
|
const date = ref<Date>();
|
||||||
const dateEnd = ref<Date | null>(null);
|
const dateEnd = ref<Date>();
|
||||||
const investigation = ref<string>("");
|
const investigation = ref<string>("");
|
||||||
const faultOps = ref<any>([
|
|
||||||
{ id: "001", value: "ยังไม่ระบุ" },
|
|
||||||
{ id: "002", value: "ไม่ร้ายเเรง" },
|
|
||||||
{ id: "003", value: "ร้ายเเรง" },
|
|
||||||
]);
|
|
||||||
const faultOp = ref<any>();
|
|
||||||
const investigationOps = ref<any>([
|
|
||||||
{ id: "001", value: "เเต่งตั้งการสืบสวน" },
|
|
||||||
{ id: "002", value: "สืบสวนทางลับ" },
|
|
||||||
{ id: "003", value: "อื่นๆ" },
|
|
||||||
]);
|
|
||||||
const daysExtend = ref<string>("");
|
|
||||||
const daysExtendOp = ref<any>();
|
|
||||||
const daysExtendOps = ref<any>([
|
|
||||||
{ id: "000", value: "15 วัน" },
|
|
||||||
{ id: "001", value: "30 วัน" },
|
|
||||||
{ id: "002", value: "45 วัน" },
|
|
||||||
{ id: "003", value: "60 วัน" },
|
|
||||||
]);
|
|
||||||
const investigationOp = ref<any>();
|
|
||||||
|
|
||||||
function filterFnOptionsType(val: string, update: any, type: string) {
|
const daysExtend = ref<string>("");
|
||||||
update(() => {
|
|
||||||
const needle = val.toLowerCase();
|
|
||||||
if (type === "faultOp") {
|
|
||||||
faultOp.value = faultOps.value.filter(
|
|
||||||
(v: any) => v.value.toLowerCase().indexOf(needle) > -1
|
|
||||||
);
|
|
||||||
} else if (type === "investigationOp") {
|
|
||||||
investigationOp.value = investigationOps.value.filter(
|
|
||||||
(v: any) => v.value.toLowerCase().indexOf(needle) > -1
|
|
||||||
);
|
|
||||||
} else if (type === "daysExtendOp") {
|
|
||||||
daysExtendOp.value = daysExtendOps.value.filter(
|
|
||||||
(v: any) => v.value.toLowerCase().indexOf(needle) > -1
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
|
|
@ -103,11 +69,11 @@ function filterFnOptionsType(val: string, update: any, type: string) {
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
v-model="fault"
|
v-model="fault"
|
||||||
:options="faultOp"
|
:options="investigateFactStore.faultOp"
|
||||||
label="ลักษณะความผิด"
|
label="ลักษณะความผิด"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
option-label="value"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
|
|
@ -127,11 +93,11 @@ function filterFnOptionsType(val: string, update: any, type: string) {
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
v-model="investigation"
|
v-model="investigation"
|
||||||
:options="investigationOp"
|
:options="investigateFactStore.investigationOp"
|
||||||
label="ลักษณะการสืบสวน"
|
label="ลักษณะการสืบสวน"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
option-label="value"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
|
|
@ -195,7 +161,7 @@ function filterFnOptionsType(val: string, update: any, type: string) {
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
borderless
|
borderless
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date ? date2Thai(date) : null"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) =>
|
(val) =>
|
||||||
!!val || `${'กรุณาเลือกวันที่เริ่มการสอบสวน'}`,
|
!!val || `${'กรุณาเลือกวันที่เริ่มการสอบสวน'}`,
|
||||||
|
|
@ -234,9 +200,7 @@ function filterFnOptionsType(val: string, update: any, type: string) {
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
borderless
|
borderless
|
||||||
:model-value="
|
:model-value="dateEnd ? date2Thai(dateEnd) : null"
|
||||||
dateEnd !== null ? date2Thai(dateEnd) : null
|
|
||||||
"
|
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) =>
|
(val) =>
|
||||||
!!val || `${'กรุณาเลือกวันที่สิ้นสุดการสอบสวน'}`,
|
!!val || `${'กรุณาเลือกวันที่สิ้นสุดการสอบสวน'}`,
|
||||||
|
|
@ -262,14 +226,17 @@ function filterFnOptionsType(val: string, update: any, type: string) {
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
v-model="daysExtend"
|
v-model="daysExtend"
|
||||||
:options="daysExtendOp"
|
:options="investigateFactStore.daysExtendOp"
|
||||||
label="จำนวนวันที่ต้องการขยาย"
|
label="จำนวนวันที่ต้องการขยาย"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณาเลือกจำนวนวันที่ต้องการขยาย'}`,
|
(val) =>
|
||||||
|
clickTime === true
|
||||||
|
? !!val || 'กรุณาเลือกจำนวนวันที่ต้องการขยาย'
|
||||||
|
: true,
|
||||||
]"
|
]"
|
||||||
option-label="value"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
|
|
@ -2,26 +2,26 @@
|
||||||
import { ref, useAttrs, onMounted } from "vue";
|
import { ref, useAttrs, onMounted } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
// import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import config from "@/app.config";
|
// import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
// import http from "@/plugins/http";
|
||||||
|
|
||||||
import { useInvestigateFactStore } from '../../stroes/InvestigateFactStore'
|
import { useInvestigateFactStore } from '../../stroes/InvestigateFactStore'
|
||||||
const dataInvestigate = useInvestigateFactStore()
|
const dataInvestigate = useInvestigateFactStore()
|
||||||
const { fecthList } = dataInvestigate
|
const { fecthList } = dataInvestigate
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
// const mixin = useCounterMixin();
|
||||||
const {
|
// const {
|
||||||
date2Thai,
|
// date2Thai,
|
||||||
success,
|
// success,
|
||||||
messageError,
|
// messageError,
|
||||||
showLoader,
|
// showLoader,
|
||||||
hideLoader,
|
// hideLoader,
|
||||||
dialogConfirm,
|
// dialogConfirm,
|
||||||
dialogRemove,
|
// dialogRemove,
|
||||||
} = mixin;
|
// } = mixin;
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
|
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
|
|
@ -116,7 +116,7 @@ function fecthInvestigateFact() {
|
||||||
{
|
{
|
||||||
subject: "ทุจริตในหน้าที่",
|
subject: "ทุจริตในหน้าที่",
|
||||||
interrogated: "ศิรินภา คงน้อยี่",
|
interrogated: "ศิรินภา คงน้อยี่",
|
||||||
fault: "0",
|
fault: "1",
|
||||||
status: "0",
|
status: "0",
|
||||||
active:'1'
|
active:'1'
|
||||||
},
|
},
|
||||||
|
|
@ -130,15 +130,15 @@ function fecthInvestigateFact() {
|
||||||
{
|
{
|
||||||
subject: "กระทำทุจริตเงินกองทุน",
|
subject: "กระทำทุจริตเงินกองทุน",
|
||||||
interrogated: "นายกัณฐิมา กาฬสินธ์ุ",
|
interrogated: "นายกัณฐิมา กาฬสินธ์ุ",
|
||||||
fault: "1",
|
fault: "0",
|
||||||
status: "2",
|
status: "1",
|
||||||
active:'1'
|
active:'1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
subject: "พูดจาไม่สุภาพ",
|
subject: "พูดจาไม่สุภาพ",
|
||||||
interrogated: "นายปิยรมย์ ศิริธาราฟ",
|
interrogated: "นายปิยรมย์ ศิริธาราฟ",
|
||||||
fault: "2",
|
fault: "0",
|
||||||
status: "3",
|
status: "1",
|
||||||
active:'1'
|
active:'1'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
@ -210,7 +210,7 @@ onMounted(()=>{
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-table
|
<d-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="dataInvestigate.rows"
|
:rows="dataInvestigate.rows"
|
||||||
|
|
@ -228,7 +228,7 @@ onMounted(()=>{
|
||||||
>
|
>
|
||||||
<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" style="padding: 10px;color:#35373C;font-weight: 500;">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
<q-th auto-width />
|
||||||
|
|
@ -267,8 +267,8 @@ onMounted(()=>{
|
||||||
<q-td style="font-size: 14px;width: 10rem">
|
<q-td style="font-size: 14px;width: 10rem">
|
||||||
{{ props.row.active }}
|
{{ props.row.active }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width style="width: 10rem">
|
<q-td auto-width >
|
||||||
<q-btn v-if="props.row.status === 'ยุติเรื่อง'" color="primary" class="q-px-xl q-py-xs">ยกเลิกยุติเรื่อง</q-btn>
|
<q-btn v-if="props.row.status === 'ยุติเรื่อง'" class="q-px-xl q-py-xs text-white no-shadow" style="background-color:#00AA86 ; border-radius: 6px;">ยกเลิกยุติเรื่อง</q-btn>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -284,57 +284,10 @@ onMounted(()=>{
|
||||||
direction-links
|
direction-links
|
||||||
></q-pagination>
|
></q-pagination>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scope>
|
|
||||||
.filter-card {
|
|
||||||
background-color: #f1f1f1b0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-expired-account {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 15px;
|
|
||||||
line-height: 150%;
|
|
||||||
color: #35373c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-color {
|
|
||||||
color: #4154b3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-header-table {
|
|
||||||
max-height: 64vh;
|
|
||||||
|
|
||||||
.q-table tr:nth-child(odd) td {
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table tr:nth-child(even) td {
|
|
||||||
background: #f8f8f8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr {
|
|
||||||
background: #ecebeb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr th {
|
|
||||||
position: sticky;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* this will be the loading indicator */
|
|
||||||
.q-table thead tr:last-child th {
|
|
||||||
/* height of all previous header rows */
|
|
||||||
top: 48px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-table thead tr:first-child th {
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
@ -221,6 +193,10 @@ const checkSave = () => {
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const deleteData = async (id: string) => {
|
||||||
|
console.log("delete");
|
||||||
|
};
|
||||||
// บันทึกข้อมูล
|
// บันทึกข้อมูล
|
||||||
const SaveData = async () => {
|
const SaveData = async () => {
|
||||||
// if (edit.value) {
|
// if (edit.value) {
|
||||||
|
|
@ -260,37 +236,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 +478,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 +488,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 +642,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;
|
||||||
|
|
@ -128,7 +128,7 @@ const clickDelete = (id: string) => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
await deleteData(id);
|
// await deleteData(id);
|
||||||
})
|
})
|
||||||
.onCancel(() => {})
|
.onCancel(() => {})
|
||||||
.onDismiss(() => {});
|
.onDismiss(() => {});
|
||||||
|
|
@ -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",
|
||||||
},
|
},
|
||||||
|
|
@ -185,18 +185,18 @@ const clickAdd = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteData = async (id: string) => {
|
const deleteData = async (id: string) => {
|
||||||
showLoader();
|
// showLoader();
|
||||||
await http
|
// await http
|
||||||
.delete(config.API.periodExamId(id))
|
// .delete(config.API.periodExamId(id))
|
||||||
.then((res) => {
|
// .then((res) => {
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
// success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
// })
|
||||||
.catch((e) => {
|
// .catch((e) => {
|
||||||
messageError($q, e);
|
// messageError($q, e);
|
||||||
})
|
// })
|
||||||
.finally(async () => {
|
// .finally(async () => {
|
||||||
hideLoader();
|
// hideLoader();
|
||||||
});
|
// });
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -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";
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,9 @@ import { useOrderStore } from "../../stroes/OrderStore";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const OrderStore = useOrderStore();
|
const OrderStore = useOrderStore();
|
||||||
const { fecthOrder } = OrderStore;
|
const { fecthOrder } = OrderStore; // function จาก stores
|
||||||
|
|
||||||
|
// ข้อมูล table
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "subject",
|
name: "subject",
|
||||||
|
|
@ -74,13 +75,13 @@ const visibleColumns = ref<string[]>([
|
||||||
"signer",
|
"signer",
|
||||||
"statusorder",
|
"statusorder",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const filterTable = ref<string>("");
|
const filterTable = ref<string>("");
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fecthListOrder();
|
await fecthListOrder();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// เรียกรายการคำสั่ง จาก API
|
||||||
async function fecthListOrder() {
|
async function fecthListOrder() {
|
||||||
const listData = [
|
const listData = [
|
||||||
{
|
{
|
||||||
|
|
@ -108,9 +109,10 @@ async function fecthListOrder() {
|
||||||
statusorder: "เสร็จสิ้นแล้ว",
|
statusorder: "เสร็จสิ้นแล้ว",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
await fecthOrder(listData);
|
await fecthOrder(listData); // ส่งข้อมูลไปยัง stores
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// redirect ไปยังการเพิ่มออกคำสั่งลงโทษทางวินัย
|
||||||
function redirectToPageadd() {
|
function redirectToPageadd() {
|
||||||
router.push(`/discipline-order/add`);
|
router.push(`/discipline-order/add`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
|
// import step
|
||||||
import step01 from "./Step01.vue";
|
import step01 from "./Step01.vue";
|
||||||
import step02 from "./Step02.vue";
|
import step02 from "./Step02.vue";
|
||||||
import step03 from "./Step03.vue";
|
import step03 from "./Step03.vue";
|
||||||
|
|
@ -9,11 +10,12 @@ import step03 from "./Step03.vue";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const step = ref<number>(1);
|
const step = ref<number>(1);
|
||||||
|
// nextStep
|
||||||
const nextStep = async () => {
|
const nextStep = async () => {
|
||||||
localStorage.setItem("currentStep", step.value.toString());
|
localStorage.setItem("currentStep", step.value.toString());
|
||||||
step.value++;
|
step.value++;
|
||||||
};
|
};
|
||||||
|
// previousStep
|
||||||
const previousStep = async () => {
|
const previousStep = async () => {
|
||||||
localStorage.setItem("currentStep", step.value.toString());
|
localStorage.setItem("currentStep", step.value.toString());
|
||||||
step.value--;
|
step.value--;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
import type { DataOption, MyObjectRef } from "../../interface/index/Main";
|
||||||
// importStroe
|
// importStroe
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
|
@ -19,10 +21,74 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const next = () => props.next();
|
const next = () => props.next();
|
||||||
|
// Options ต่างๆ
|
||||||
const typeOrder = ref<string>("");
|
const orderTypeOptions = ref<DataOption[]>([
|
||||||
|
{ id: "0", name: "ประเภทคำสั่ง 1" },
|
||||||
|
{ id: "1", name: "ประเภทคำสั่ง 2" },
|
||||||
|
{ id: "2", name: "ประเภทคำสั่ง 3" },
|
||||||
|
]);
|
||||||
|
const orderByOptions = ref<DataOption[]>([
|
||||||
|
{ id: "0", name: "คำสั่งโดย 1" },
|
||||||
|
{ id: "1", name: "คำสั่งโดย 2" },
|
||||||
|
{ id: "2", name: "คำสั่งโดย 3" },
|
||||||
|
]);
|
||||||
|
const listInvestigationOptions = ref<DataOption[]>([
|
||||||
|
{ id: "0", name: "รายการสอบสวนความผิดทางวินัย 1" },
|
||||||
|
{ id: "1", name: "รายการสอบสวนความผิดทางวินัย 2" },
|
||||||
|
{ id: "2", name: "รายการสอบสวนความผิดทางวินัย 3" },
|
||||||
|
]);
|
||||||
|
// ตัวแปรทั้งหมด
|
||||||
|
const orderType = ref<string>("");
|
||||||
|
const orderBy = ref<string>("");
|
||||||
|
const listInvestigation = ref<string>("");
|
||||||
|
const authority = ref<string>("");
|
||||||
|
const orderNumber = ref<string>();
|
||||||
const dateYear = ref<number>(2023);
|
const dateYear = ref<number>(2023);
|
||||||
const date = ref<Date | null>(null);
|
const date = ref<Date | null>(null);
|
||||||
|
const authorityPosition = ref<string>("");
|
||||||
|
const subject = ref<string>("");
|
||||||
|
const mistakeDetail = ref<string>("");
|
||||||
|
|
||||||
|
// validateForm
|
||||||
|
const orderTypeRef = ref<any>(null);
|
||||||
|
const orderByRef = ref<any>(null);
|
||||||
|
const listInvestigationRef = ref<any>(null);
|
||||||
|
const authorityRef = ref<any>(null);
|
||||||
|
const orderNumberRef = ref<any>(null);
|
||||||
|
const dateYearRef = ref<any>(null);
|
||||||
|
const dateRef = ref<any>(null);
|
||||||
|
const authorityPositionRef = ref<any>(null);
|
||||||
|
const subjectRef = ref<any>(null);
|
||||||
|
const mistakeDetailRef = ref<any>(null);
|
||||||
|
const myObjectRef: MyObjectRef = {
|
||||||
|
orderType: orderTypeRef,
|
||||||
|
orderBy: orderByRef,
|
||||||
|
listInvestigation: listInvestigationRef,
|
||||||
|
authority: authorityRef,
|
||||||
|
orderNumber: orderNumberRef,
|
||||||
|
dateYear: dateYearRef,
|
||||||
|
date: dateRef,
|
||||||
|
authorityPosition: authorityPositionRef,
|
||||||
|
subject: subjectRef,
|
||||||
|
mistakeDetail: mistakeDetailRef,
|
||||||
|
};
|
||||||
|
function validateForm() {
|
||||||
|
const hasError = [];
|
||||||
|
for (const key in myObjectRef) {
|
||||||
|
if (Object.prototype.hasOwnProperty.call(myObjectRef, key)) {
|
||||||
|
const property = myObjectRef[key];
|
||||||
|
if (property.value && typeof property.value.validate === "function") {
|
||||||
|
const isValid = property.value.validate();
|
||||||
|
hasError.push(isValid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasError.every((result) => result === true)) {
|
||||||
|
onSubmit();
|
||||||
|
} else {
|
||||||
|
console.log("ไม่ผ่าน ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
|
|
@ -37,15 +103,17 @@ function onSubmit() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-form @submit.prevent="onSubmit">
|
<form @submit.prevent.stop="validateForm">
|
||||||
<div class="col-12 row q-pa-lg">
|
<div class="col-12 row q-pa-lg">
|
||||||
<div class="col-xs-12 col-sm-12 q-col-gutter-x-lg row q-col-gutter-y-xs">
|
<div class="col-xs-12 col-sm-12 q-col-gutter-x-lg row q-col-gutter-y-xs">
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
ประเภทคำสั่ง
|
ประเภทคำสั่ง
|
||||||
<q-select
|
<q-select
|
||||||
|
ref="orderTypeRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="typeOrder"
|
v-model="orderType"
|
||||||
|
:options="orderTypeOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
emit-value
|
emit-value
|
||||||
|
|
@ -58,9 +126,11 @@ function onSubmit() {
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
คำสั่งโดย
|
คำสั่งโดย
|
||||||
<q-select
|
<q-select
|
||||||
|
ref="orderByRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="typeOrder"
|
v-model="orderBy"
|
||||||
|
:options="orderByOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
emit-value
|
emit-value
|
||||||
|
|
@ -73,9 +143,11 @@ function onSubmit() {
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
เลือกรายการสอบสวนความผิดทางวินัย
|
เลือกรายการสอบสวนความผิดทางวินัย
|
||||||
<q-select
|
<q-select
|
||||||
|
ref="listInvestigationRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="typeOrder"
|
v-model="listInvestigation"
|
||||||
|
:options="listInvestigationOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
emit-value
|
emit-value
|
||||||
|
|
@ -90,9 +162,10 @@ function onSubmit() {
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
ผู้มีอำนาจลงนาม
|
ผู้มีอำนาจลงนาม
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="authorityRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="typeOrder"
|
v-model="authority"
|
||||||
placeholder="กรอกผู้มีอำนาจลงนาม"
|
placeholder="กรอกผู้มีอำนาจลงนาม"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกผู้มีอำนาจลงนาม'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกผู้มีอำนาจลงนาม'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -102,9 +175,10 @@ function onSubmit() {
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
คำสั่งที่
|
คำสั่งที่
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="orderNumberRef"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
v-model="typeOrder"
|
v-model="orderNumber"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอรคำสั่งที่'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอรคำสั่งที่'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -129,6 +203,7 @@ function onSubmit() {
|
||||||
}}</template>
|
}}</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="dateYearRef"
|
||||||
:model-value="dateYear + 543"
|
:model-value="dateYear + 543"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอก พ.ศ.'}`]"
|
||||||
:label="`${'พ.ศ.'}`"
|
:label="`${'พ.ศ.'}`"
|
||||||
|
|
@ -159,6 +234,7 @@ function onSubmit() {
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="dateRef"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker"
|
class="full-width datepicker"
|
||||||
|
|
@ -180,9 +256,10 @@ function onSubmit() {
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
ตำแหน่งผู้มีอำนาจลงนาม
|
ตำแหน่งผู้มีอำนาจลงนาม
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="authorityPositionRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="typeOrder"
|
v-model="authorityPosition"
|
||||||
placeholder="กรอกตำแหน่งผู้มีอำนาจลงนาม"
|
placeholder="กรอกตำแหน่งผู้มีอำนาจลงนาม"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งผู้มีอำนาจลงนาม'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งผู้มีอำนาจลงนาม'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -191,9 +268,10 @@ function onSubmit() {
|
||||||
<div class="col-xs-12 col-sm-6">
|
<div class="col-xs-12 col-sm-6">
|
||||||
คำสั่งเรื่อง
|
คำสั่งเรื่อง
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="subjectRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="typeOrder"
|
v-model="subject"
|
||||||
placeholder="กรอกคำสั่งเรื่อง"
|
placeholder="กรอกคำสั่งเรื่อง"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกคำสั่งเรื่อง'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกคำสั่งเรื่อง'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -202,9 +280,10 @@ function onSubmit() {
|
||||||
<div class="col-xs-12 col-sm-12">
|
<div class="col-xs-12 col-sm-12">
|
||||||
รายละเอียดการกระทำความผิด
|
รายละเอียดการกระทำความผิด
|
||||||
<q-input
|
<q-input
|
||||||
|
ref="mistakeDetailRef"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
v-model="typeOrder"
|
v-model="mistakeDetail"
|
||||||
placeholder="กรอกรายละเอียดการกระทำความผิด"
|
placeholder="กรอกรายละเอียดการกระทำความผิด"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกคำสั่งเรื่อง'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกคำสั่งเรื่อง'}`]"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -224,7 +303,7 @@ function onSubmit() {
|
||||||
type="submit"
|
type="submit"
|
||||||
/>
|
/>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
next: {
|
next: {
|
||||||
type: Function,
|
type: Function,
|
||||||
|
|
@ -11,10 +12,79 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
const next = () => props.next();
|
const next = () => props.next();
|
||||||
const previous = () => props.previous();
|
const previous = () => props.previous();
|
||||||
|
|
||||||
|
const name = ref<string>("");
|
||||||
|
const lastname = ref<string>("");
|
||||||
|
const age = ref<string>("");
|
||||||
|
|
||||||
|
const nameRef = ref<any>(null);
|
||||||
|
const ageRef = ref<any>(null);
|
||||||
|
const lastnameRef = ref<any>(null);
|
||||||
|
const myObject: MyObject = {
|
||||||
|
name: nameRef,
|
||||||
|
lastname: lastnameRef,
|
||||||
|
age: ageRef,
|
||||||
|
};
|
||||||
|
interface MyObject {
|
||||||
|
name: any;
|
||||||
|
lastname: any;
|
||||||
|
age: any;
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSubmit() {
|
||||||
|
const hasError = [];
|
||||||
|
for (const key in myObject) {
|
||||||
|
if (Object.prototype.hasOwnProperty.call(myObject, key)) {
|
||||||
|
const property = myObject[key];
|
||||||
|
if (property.value && typeof property.value.validate === "function") {
|
||||||
|
const isValid = property.value.validate();
|
||||||
|
hasError.push(isValid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasError.every((result) => result === true)) {
|
||||||
|
console.log("ผ่าน สำเร็จ!");
|
||||||
|
} else {
|
||||||
|
console.log("ไม่ผ่าน ");
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div><h1>step02</h1></div>
|
<div><h1>step02</h1></div>
|
||||||
|
<form @submit.prevent.stop="onSubmit" class="q-gutter-md">
|
||||||
|
<q-input
|
||||||
|
ref="nameRef"
|
||||||
|
filled
|
||||||
|
v-model="name"
|
||||||
|
label="Your name *"
|
||||||
|
hint="Name and surname"
|
||||||
|
lazy-rules
|
||||||
|
:rules="[(val) => !!val || `${'Name and surname'}`]"
|
||||||
|
/>
|
||||||
|
<q-input
|
||||||
|
ref="lastnameRef"
|
||||||
|
filled
|
||||||
|
v-model="lastname"
|
||||||
|
label="lastname *"
|
||||||
|
lazy-rules
|
||||||
|
:rules="[(val) => !!val || `${'lastname'}`]"
|
||||||
|
/>
|
||||||
|
<q-input
|
||||||
|
ref="ageRef"
|
||||||
|
filled
|
||||||
|
type="number"
|
||||||
|
v-model="age"
|
||||||
|
label="Your age *"
|
||||||
|
lazy-rules
|
||||||
|
:rules="[(val) => !!val || `${'Your age'}`]"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<q-btn label="Submit" type="submit" color="primary" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
<q-card-actions align="right">
|
<q-card-actions align="right">
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
|
|
@ -4,52 +4,31 @@ import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
import { useReportDataStore } from "@/modules/11_discipline/stroes/ReportStore";
|
import { useReportDataStore } from "@/modules/11_discipline/stroes/ReportStore";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
const date = ref<Date | null>(null);
|
const date = ref<Date>();
|
||||||
const dateEnd = ref<Date | null>(null);
|
const dateEnd = ref<Date>();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const typeReport = route.params.type.toString();
|
const typeReport = route.params.type.toString();
|
||||||
const store = useReportDataStore();
|
const store = useReportDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, showLoader, hideLoader, date2Thai } = mixin;
|
const { messageError, showLoader, hideLoader, date2Thai } = mixin;
|
||||||
const { optionReport } = store;
|
const { filterFnOptionsType } = store;
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const ocSelect = ref<string>("");
|
const ocSelect = ref<string>("");
|
||||||
const ocSelectOp = ref<any>();
|
|
||||||
const ocSelectOps = ref<any>([
|
|
||||||
{ id: "001", value: "กทม" },
|
|
||||||
{ id: "002", value: "กรุงเทพ" },
|
|
||||||
]);
|
|
||||||
const government = ref<string>("");
|
const government = ref<string>("");
|
||||||
const governmentOp = ref<any>();
|
const fault = ref<string>();
|
||||||
const governmentOps = ref<any>([
|
|
||||||
{ id: "001", value: "กทม" },
|
|
||||||
{ id: "002", value: "กรุงเทพ" },
|
|
||||||
{ id: "003", value: "bankok" },
|
|
||||||
]);
|
|
||||||
const fault = ref<any>();
|
|
||||||
const faultOp = ref<any>();
|
|
||||||
const faultOps = ref<any>([
|
|
||||||
{ id: "001", value: "ยังไม่ระบุ" },
|
|
||||||
{ id: "002", value: "ไม่ร้ายเเรง" },
|
|
||||||
{ id: "003", value: "ร้ายเเรง" },
|
|
||||||
]);
|
|
||||||
const pdfSrc = ref<any>();
|
const pdfSrc = ref<any>();
|
||||||
const numOfPages = ref<number>(0);
|
const numOfPages = ref<number>(0);
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
const titleReport = ref<string>("");
|
const titleReport = ref<string>("");
|
||||||
interface OptionReport {
|
|
||||||
id: string;
|
|
||||||
title: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
let report = optionReport.find((e: OptionReport) => e.id == typeReport);
|
let report = store.optionReport.find((e: DataOption) => e.id == typeReport);
|
||||||
report && (titleReport.value = report.title);
|
report && (titleReport.value = report.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
const splitterModel = ref(14);
|
const splitterModel = ref(14);
|
||||||
|
|
@ -75,25 +54,6 @@ const backPage = () => {
|
||||||
page.value--;
|
page.value--;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function filterFnOptionsType(val: string, update: any, type: string) {
|
|
||||||
update(() => {
|
|
||||||
const needle = val.toLowerCase();
|
|
||||||
if (type === "ocSelectOp") {
|
|
||||||
ocSelectOp.value = ocSelectOps.value.filter(
|
|
||||||
(v: any) => v.value.toLowerCase().indexOf(needle) > -1
|
|
||||||
);
|
|
||||||
} else if (type === "governmentOp") {
|
|
||||||
governmentOp.value = governmentOps.value.filter(
|
|
||||||
(v: any) => v.value.toLowerCase().indexOf(needle) > -1
|
|
||||||
);
|
|
||||||
} else if (type === "faultOp") {
|
|
||||||
faultOp.value = faultOps.value.filter(
|
|
||||||
(v: any) => v.value.toLowerCase().indexOf(needle) > -1
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle">
|
<div class="toptitle">
|
||||||
|
|
@ -133,7 +93,7 @@ function filterFnOptionsType(val: string, update: any, type: string) {
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
borderless
|
borderless
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date ? date2Thai(date) : null"
|
||||||
:label="`${'ตั้งเเต่วันที่'}`"
|
:label="`${'ตั้งเเต่วันที่'}`"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
|
|
@ -164,7 +124,7 @@ function filterFnOptionsType(val: string, update: any, type: string) {
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
borderless
|
borderless
|
||||||
:model-value="dateEnd !== null ? date2Thai(dateEnd) : null"
|
:model-value="dateEnd ? date2Thai(dateEnd) : null"
|
||||||
:label="`${'ถึงวันที่'}`"
|
:label="`${'ถึงวันที่'}`"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
|
|
@ -194,11 +154,11 @@ function filterFnOptionsType(val: string, update: any, type: string) {
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
v-model="ocSelect"
|
v-model="ocSelect"
|
||||||
:options="ocSelectOp"
|
:options="store.ocSelectOp"
|
||||||
label="เลือกหน่วยงาน/สำนักงานเขต"
|
label="เลือกหน่วยงาน/สำนักงานเขต"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
option-label="value"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
|
|
@ -219,11 +179,11 @@ function filterFnOptionsType(val: string, update: any, type: string) {
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
v-model="government"
|
v-model="government"
|
||||||
:options="governmentOp"
|
:options="store.governmentOp"
|
||||||
label="เลือกหน่วยงาน/สำนักงานเขต"
|
label="เลือกหน่วยงาน/สำนักงานเขต"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
option-label="value"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
|
|
@ -240,15 +200,15 @@ function filterFnOptionsType(val: string, update: any, type: string) {
|
||||||
</div>
|
</div>
|
||||||
<div v-if="typeReport > '2'" class="q-pl-xs">
|
<div v-if="typeReport > '2'" class="q-pl-xs">
|
||||||
<q-select
|
<q-select
|
||||||
class="bg-white"
|
class="bg-white"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
v-model="fault"
|
v-model="fault"
|
||||||
:options="faultOp"
|
:options="store.faultOp"
|
||||||
label="เลือกลักษณะความผิด"
|
label="เลือกลักษณะความผิด"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
option-label="value"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
|
|
@ -93,20 +93,15 @@ const clickAdd = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickDelete = (id: string) => {
|
const clickDelete = (id: string) => {
|
||||||
$q.dialog({
|
dialogRemove(
|
||||||
title: "ยืนยันการลบช่องทาง",
|
$q,
|
||||||
message: "ต้องการลบช่องทางนี้ใช่หรือไม่?",
|
async () => {
|
||||||
cancel: {
|
// await deleteData(id);
|
||||||
flat: true,
|
// await getData();
|
||||||
color: "negative",
|
|
||||||
},
|
},
|
||||||
persistent: true,
|
`ลบข้อมูล`
|
||||||
})
|
// `ลบข้อมูลของ ${name}`
|
||||||
.onOk(async () => {
|
);
|
||||||
console.log("delete");
|
|
||||||
})
|
|
||||||
.onCancel(() => {})
|
|
||||||
.onDismiss(() => {});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {});
|
onMounted(() => {});
|
||||||
|
|
@ -170,18 +165,11 @@ onMounted(() => {});
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-table
|
<d-table
|
||||||
ref="table"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
|
row-key="id"
|
||||||
:filter="filterKeyword"
|
:filter="filterKeyword"
|
||||||
row-key="interrogated"
|
|
||||||
flat
|
|
||||||
bordered
|
|
||||||
:paging="true"
|
|
||||||
dense
|
|
||||||
class="custom-header-table"
|
|
||||||
v-bind="attrs"
|
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
:pagination-label="paginationLabel"
|
:pagination-label="paginationLabel"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
|
|
@ -229,7 +217,7 @@ onMounted(() => {});
|
||||||
direction-links
|
direction-links
|
||||||
></q-pagination>
|
></q-pagination>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,214 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
|
import { useQuasar, QForm } from "quasar";
|
||||||
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const {
|
||||||
|
date2Thai,
|
||||||
|
dateToISO,
|
||||||
|
messageError,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
dialogConfirm,
|
||||||
|
success,
|
||||||
|
dialogMessageNotify,
|
||||||
|
} = mixin;
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const myForm = ref<QForm | null>(null); //form data input
|
||||||
|
const edit = ref<boolean>(false);
|
||||||
|
const channel = ref<string>("");
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
// if (route.params.id) {
|
||||||
|
// // มี params id ให้ เรียกข้อมูลของรอบการเสนอขอ
|
||||||
|
// await fetchData();
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
// เรียกข้อมูลของรอบการเสนอขอ
|
||||||
|
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;
|
||||||
|
// dateStart.value = new Date(data.period_start);
|
||||||
|
// dateEnd.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 checkSave = () => {
|
||||||
|
// if (myForm.value !== null) {
|
||||||
|
// myForm.value.validate().then(async (success) => {
|
||||||
|
// if (success) {
|
||||||
|
// dialogConfirm($q, () => SaveData());
|
||||||
|
// } else if (Number(datelast.value) !== 0) {
|
||||||
|
// dialogMessageNotify($q, "กรุณาเลือกรอบการเสนอขอพระราชทานเครื่องราชฯ");
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
// บันทึกข้อมูล
|
||||||
|
const SaveData = async () => {
|
||||||
|
// if (edit.value) {
|
||||||
|
// await editData(id.value);
|
||||||
|
// } else {
|
||||||
|
// await addData();
|
||||||
|
// clickBack();
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
// เพิ่มข้อมูลรอบการเสนอขอพระราชทานเครื่องราชฯ
|
||||||
|
const addData = async () => {
|
||||||
|
// 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 (dateStart.value !== null) {
|
||||||
|
// formData.append("startDate", dateToISO(dateStart.value));
|
||||||
|
// }
|
||||||
|
// if (dateEnd.value !== null) {
|
||||||
|
// formData.append("endDate", dateToISO(dateEnd.value));
|
||||||
|
// }
|
||||||
|
// formData.append("file", files.value);
|
||||||
|
// showLoader();
|
||||||
|
// await http
|
||||||
|
// .post(config.API.listRoundInsignia(), formData)
|
||||||
|
// .then(() => {
|
||||||
|
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
// })
|
||||||
|
// .catch((e) => {
|
||||||
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(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 (dateStart.value !== null) {
|
||||||
|
// formData.append("startDate", dateToISO(dateStart.value));
|
||||||
|
// }
|
||||||
|
// if (dateEnd.value !== null) {
|
||||||
|
// formData.append("endDate", dateToISO(dateEnd.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/channel`);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||||
|
<div class="toptitle col-12 row items-center">
|
||||||
|
<q-btn
|
||||||
|
icon="mdi-arrow-left"
|
||||||
|
unelevated
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
color="primary"
|
||||||
|
class="q-mr-sm"
|
||||||
|
@click="clickBack"
|
||||||
|
/>
|
||||||
|
{{ edit ? "ช่องทางการร้องเรียน" : "เพิ่มช่องทางการร้องเรียน" }}
|
||||||
|
</div>
|
||||||
|
<q-form ref="myForm">
|
||||||
|
<div class="col-12">
|
||||||
|
<q-card bordered>
|
||||||
|
<div class="col-12 row q-col-gutter-md q-pa-md">
|
||||||
|
<div class="col-xs-12 col-sm-12 row">
|
||||||
|
<q-separator />
|
||||||
|
<div class="col-12 row q-pa-sm q-col-gutter-sm">
|
||||||
|
<q-input
|
||||||
|
class="col-12"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
v-model="channel"
|
||||||
|
label="กรอกชื่อช่องทาง"
|
||||||
|
:rules="[(val:string) => !!val || `${'กรุณากรอกชื่อช่องทาง'}`]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<q-separator />
|
||||||
|
<q-separator />
|
||||||
|
<div class="row col-12 q-pa-sm">
|
||||||
|
<q-space />
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="public"
|
||||||
|
@click="checkSave"
|
||||||
|
icon="mdi-content-save-outline"
|
||||||
|
>
|
||||||
|
<q-tooltip>{{ edit ? "แก้ไขข้อมูล" : "บันทึกข้อมูล" }}</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
</q-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
@ -1,7 +1,68 @@
|
||||||
interface DataOption {
|
interface DataOption {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
interface investigatefactsDataRowType {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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,
|
||||||
|
MyObjectRef,
|
||||||
|
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/investigatefactsAdd.vue"
|
|
||||||
);
|
|
||||||
const disciplinaryMain = () =>
|
const disciplinaryMain = () =>
|
||||||
import(
|
import(
|
||||||
"@/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue"
|
"@/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue"
|
||||||
|
|
@ -32,16 +30,16 @@ const channelMain = () =>
|
||||||
);
|
);
|
||||||
const channelAdd = () =>
|
const channelAdd = () =>
|
||||||
import(
|
import(
|
||||||
"@/modules/11_discipline/components/6_BasicInformation/Channel/addChannel.vue"
|
"@/modules/11_discipline/components/6_BasicInformation/Channel/AddPage.vue"
|
||||||
);
|
);
|
||||||
const complaintAdd = () =>
|
const complaintAdd = () =>
|
||||||
import("@/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue");
|
import("@/modules/11_discipline/components/1_Complaint/AddComplaintPage.vue");
|
||||||
const reportType = () =>
|
const reportType = () =>
|
||||||
import("@/modules/11_discipline/components/5_Report/reportDetail.vue");
|
import("@/modules/11_discipline/components/5_Report/DetailPage.vue");
|
||||||
|
|
||||||
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");
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import type { DataOption } from "../interface/index/Main";
|
||||||
|
|
||||||
export const useComplainstDataStore = defineStore("DisciplineComplainst", () => {
|
export const useComplainstDataStore = defineStore("DisciplineComplainst", () => {
|
||||||
const rows = ref<any>([])
|
const rows = ref<any>([])
|
||||||
const optionListName = ref<any>([{}])
|
|
||||||
|
|
||||||
|
|
||||||
function fectComplainst(data: any) {
|
function fectComplainst(data: any) {
|
||||||
|
|
@ -21,49 +21,39 @@ export const useComplainstDataStore = defineStore("DisciplineComplainst", () =>
|
||||||
rows.value = datalist
|
rows.value = datalist
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectComplainantTpye(list: any) {
|
|
||||||
optionListName.value = list
|
|
||||||
}
|
|
||||||
|
|
||||||
const complainantoptionsMain = ref<DataOption[]>()
|
const complainantoptionsMain = ref<DataOption[]>()
|
||||||
const complainantoptions = ref<DataOption[]>()
|
const complainantoptions = ref<DataOption[]>()
|
||||||
const agencytoptionsMain = ref<DataOption[]>()
|
const agencytoptionsMain = ref<DataOption[]>()
|
||||||
const agencytoptions = ref<DataOption[]>()
|
const agencytoptions = ref<DataOption[]>()
|
||||||
|
const optionListNameMain = ref<DataOption[]>([])
|
||||||
|
const optionListName = ref<DataOption[]>([])
|
||||||
function fectOptioin(complainantoptions: any, agencytoptions: any) {
|
function fectOptioin(complainantoptions: any, agencytoptions: any) {
|
||||||
complainantoptionsMain.value = complainantoptions
|
complainantoptionsMain.value = complainantoptions
|
||||||
agencytoptionsMain.value = agencytoptions
|
agencytoptionsMain.value = agencytoptions
|
||||||
|
}
|
||||||
|
function selectComplainantTpye(list: any) {
|
||||||
|
optionListNameMain.value = list
|
||||||
|
optionListName.value = list
|
||||||
}
|
}
|
||||||
function filterSelector(val: any, update: Function, type: string) {
|
function filterSelector(val: any, update: Function, type: string) {
|
||||||
console.log(val, type);
|
update(() => {
|
||||||
let data: DataOption[] | undefined = undefined;
|
if (type === "filtercomplainantType" && complainantoptionsMain.value) {
|
||||||
let filter: DataOption[] | undefined = undefined;
|
complainantoptions.value = complainantoptionsMain.value.filter(
|
||||||
if (type == "filtercomplainantType") {
|
(e) => e.name.search(val) !== -1
|
||||||
data = complainantoptionsMain.value
|
);
|
||||||
} else if (type == "filteragencytoptions") {
|
} else if (type === "filteragencytoptions" && agencytoptionsMain.value) {
|
||||||
data = agencytoptionsMain.value
|
agencytoptions.value = agencytoptionsMain.value.filter(
|
||||||
}
|
(e) => e.name.search(val) !== -1
|
||||||
if (val == "") {
|
);
|
||||||
update(() => {
|
} else if (type === "filtercomplainantOP" && optionListNameMain.value) {
|
||||||
filter = data;
|
optionListName.value = optionListNameMain.value.filter(
|
||||||
});
|
(e) => e.name.search(val) !== -1
|
||||||
} else {
|
);
|
||||||
update(() => {
|
|
||||||
if (data) {
|
|
||||||
filter = data.filter(
|
|
||||||
(e) => e.name.search(val) !== -1
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (filter) {
|
|
||||||
if (type == "filtercomplainantType") {
|
|
||||||
complainantoptions.value = filter
|
|
||||||
} else if (type = "filteragencytoptions") {
|
|
||||||
agencytoptions.value = filter
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
rows,
|
rows,
|
||||||
|
|
|
||||||
|
|
@ -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,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,74 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
import type { investigatefactsDataRowType, DataOption } from '@/modules/11_discipline/interface/index/Main'
|
||||||
|
|
||||||
export const useInvestigateFactStore = defineStore("DisciplineInvestigateFact", () => {
|
export const useInvestigateFactStore = defineStore("DisciplineInvestigateFact", () => {
|
||||||
const rows = ref<any>([])
|
const rows = ref<investigatefactsDataRowType[]>([])
|
||||||
|
const faultOp = ref<DataOption[]>();
|
||||||
|
const daysExtendOp = ref<DataOption[]>();
|
||||||
|
const investigationOp = ref<DataOption[]>();
|
||||||
|
const daysExtendOps = ref<DataOption[]>([
|
||||||
|
{ id: "000", name: "15 วัน" },
|
||||||
|
{ id: "001", name: "30 วัน" },
|
||||||
|
{ id: "002", name: "45 วัน" },
|
||||||
|
{ id: "003", name: "60 วัน" },
|
||||||
|
]);
|
||||||
|
const investigationOps = ref<DataOption[]>([
|
||||||
|
{ id: "001", name: "เเต่งตั้งการสืบสวน" },
|
||||||
|
{ id: "002", name: "สืบสวนทางลับ" },
|
||||||
|
{ id: "003", name: "อื่นๆ" },
|
||||||
|
]);
|
||||||
|
const faultOps = ref<DataOption[]>([
|
||||||
|
{ id: "001", name: "ยังไม่ระบุ" },
|
||||||
|
{ id: "002", name: "ไม่ร้ายเเรง" },
|
||||||
|
{ id: "003", name: "ร้ายเเรง" },
|
||||||
|
]);
|
||||||
|
function filterFnOptionsType(val: string, update: any, type: string) {
|
||||||
|
update(() => {
|
||||||
|
const needle = val.toLowerCase();
|
||||||
|
|
||||||
async function fecthList(data: any) {
|
if (type === "faultOp") {
|
||||||
let datalist = data.map((e: any) => ({
|
faultOp.value = faultOps.value.filter(
|
||||||
|
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
|
);
|
||||||
|
|
||||||
|
} else if (type === "investigationOp") {
|
||||||
|
investigationOp.value = investigationOps.value.filter(
|
||||||
|
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
|
);
|
||||||
|
} else if (type === "daysExtendOp") {
|
||||||
|
daysExtendOp.value = daysExtendOps.value.filter(
|
||||||
|
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function fecthList(data: investigatefactsDataRowType[]) {
|
||||||
|
let datalist: investigatefactsDataRowType[] = data.map((e: any) => ({
|
||||||
subject: e.subject,
|
subject: e.subject,
|
||||||
interrogated: e.interrogated,
|
interrogated: e.interrogated,
|
||||||
fault: convertFault(e.fault),
|
fault: e.fault ?? convertFault(e.fault),
|
||||||
status: convertSatatus(e.status),
|
status: e.status ?? convertSatatus(e.status),
|
||||||
active: activeStatus(e.active)
|
active: e.active ?? activeStatus(e.active)
|
||||||
|
|
||||||
}))
|
}))
|
||||||
rows.value = datalist
|
rows.value = datalist
|
||||||
console.log(rows.value)
|
|
||||||
}
|
}
|
||||||
function convertFault(val: string) {
|
function convertFault(val: string) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "0":
|
case "0":
|
||||||
return "ความผิดวินัยยังไม่ระบุ"
|
|
||||||
case "1":
|
|
||||||
return "ความผิดวินัยไม่ร้ายแรง"
|
return "ความผิดวินัยไม่ร้ายแรง"
|
||||||
case "2":
|
case "1":
|
||||||
return "ความผิดวินัยร้ายแรง"
|
return "ความผิดวินัยร้ายแรง"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function convertSatatus(val: string) {
|
function convertSatatus(val: string) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "0":
|
case "0":
|
||||||
return "ยังไม่ระบุ"
|
|
||||||
case "1":
|
|
||||||
return "ร้ายแรง"
|
|
||||||
case "2":
|
|
||||||
return "ไม่ร้ายแรง"
|
|
||||||
case "3":
|
|
||||||
return "ยุติเรื่อง"
|
return "ยุติเรื่อง"
|
||||||
|
case "1":
|
||||||
|
return "เสร็จสิ้นเเล้ว"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function activeStatus(val: string) {
|
function activeStatus(val: string) {
|
||||||
|
|
@ -49,5 +82,12 @@ export const useInvestigateFactStore = defineStore("DisciplineInvestigateFact",
|
||||||
return {
|
return {
|
||||||
fecthList,
|
fecthList,
|
||||||
rows,
|
rows,
|
||||||
|
daysExtendOps,
|
||||||
|
investigationOps,
|
||||||
|
faultOps,
|
||||||
|
filterFnOptionsType,
|
||||||
|
faultOp,
|
||||||
|
daysExtendOp,
|
||||||
|
investigationOp,
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
@ -1,24 +1,62 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
import type { DataOption } from '@/modules/11_discipline/interface/index/Main'
|
||||||
export const useReportDataStore = defineStore("DisciplineReport11", () => {
|
export const useReportDataStore = defineStore("DisciplineReport11", () => {
|
||||||
interface OptionReport {
|
|
||||||
id: string;
|
const faultOp = ref<DataOption[]>();
|
||||||
title: string;
|
const ocSelectOp = ref<DataOption[]>();
|
||||||
}
|
const governmentOp = ref<DataOption[]>();
|
||||||
const optionReport = ref<OptionReport[]>([
|
const faultOps = ref<DataOption[]>([
|
||||||
{ id: "1", title: "รายงานเรื่องร้องเรียนแยกรายวัน รายเดือน รายปี" },
|
{ id: "001", name: "ยังไม่ระบุ" },
|
||||||
{ id: "2", title: "รายงานเรื่องร้องเรียนข้าราชการสามัญฯ ในสังกัดกรุงเทพมหานคร แยกตามหน่วยงาน" },
|
{ id: "002", name: "ไม่ร้ายเเรง" },
|
||||||
{ id: "3", title: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัย แยกตามลักษณะความผิด" },
|
{ id: "003", name: "ร้ายเเรง" },
|
||||||
{ id: "4", title: "รายงานรายชื่อข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด" },
|
]);
|
||||||
{ id: "5", title: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดแยกตามระดับความผิด" },
|
const ocSelectOps = ref<DataOption[]>([
|
||||||
{ id: "6", title: "รายงานรายชื่อข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด" },
|
{ id: "001", name: "กทม" },
|
||||||
{ id: "7", title: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกลักษณะความผิด" },
|
{ id: "002", name: "กรุงเทพ" },
|
||||||
{ id: "8", title: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกตามตำแหน่ง" },
|
]);
|
||||||
|
const governmentOps = ref<DataOption[]>([
|
||||||
|
{ id: "001", name: "กทม" },
|
||||||
|
{ id: "002", name: "กรุงเทพ" },
|
||||||
|
{ id: "003", name: "bankok" },
|
||||||
|
]);
|
||||||
|
const optionReport = ref<DataOption[]>([
|
||||||
|
{ id: "1", name: "รายงานเรื่องร้องเรียนแยกรายวัน รายเดือน รายปี" },
|
||||||
|
{ id: "2", name: "รายงานเรื่องร้องเรียนข้าราชการสามัญฯ ในสังกัดกรุงเทพมหานคร แยกตามหน่วยงาน" },
|
||||||
|
{ id: "3", name: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัย แยกตามลักษณะความผิด" },
|
||||||
|
{ id: "4", name: "รายงานรายชื่อข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด" },
|
||||||
|
{ id: "5", name: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดแยกตามระดับความผิด" },
|
||||||
|
{ id: "6", name: "รายงานรายชื่อข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแยกตามลักษณะความผิด" },
|
||||||
|
{ id: "7", name: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกลักษณะความผิด" },
|
||||||
|
{ id: "8", name: "รายงานจำนวนข้าราชการสามัญฯ ที่กระทำความผิดทางวินัยแต่ยุติเรื่อง แยกตามตำแหน่ง" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
function filterFnOptionsType(val: string, update: any, type: string) {
|
||||||
|
update(() => {
|
||||||
|
const needle = val.toLowerCase();
|
||||||
|
if (type === "ocSelectOp") {
|
||||||
|
ocSelectOp.value = ocSelectOps.value.filter(
|
||||||
|
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
|
);
|
||||||
|
} else if (type === "governmentOp") {
|
||||||
|
governmentOp.value = governmentOps.value.filter(
|
||||||
|
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
|
);
|
||||||
|
} else if (type === "faultOp") {
|
||||||
|
faultOp.value = faultOps.value.filter(
|
||||||
|
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
optionReport,
|
optionReport,
|
||||||
|
filterFnOptionsType,
|
||||||
|
faultOp,
|
||||||
|
ocSelectOp,
|
||||||
|
governmentOp,
|
||||||
|
faultOps,
|
||||||
|
ocSelectOps,
|
||||||
|
governmentOps,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue