Merge branch 'develop' of https://github.com/Frappet/bma-ehr-frontend into develop
# Conflicts: # src/modules/11_discipline/store/InvestigateDisStore.ts
This commit is contained in:
commit
9e8516fc0b
10 changed files with 297 additions and 195 deletions
|
|
@ -2,15 +2,21 @@
|
||||||
import { ref, reactive, watch } from "vue";
|
import { ref, reactive, watch } from "vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import type { FormDetail } from "@/modules/09_leave/interface/response/work";
|
import type { FormDetail } from "@/modules/09_leave/interface/response/work";
|
||||||
|
|
||||||
/** importStores */
|
/** importStores */
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
||||||
|
|
||||||
/** useStore */
|
/** useStore */
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, showLoader, hideLoader } = mixin;
|
const stores = useWorklistDataStore();
|
||||||
|
const { date2Thai, showLoader, hideLoader, messageError } = mixin;
|
||||||
|
const { convertSatatus } = stores;
|
||||||
|
|
||||||
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
|
|
||||||
/** props จาก TableList */
|
/** props จาก TableList */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -22,7 +28,7 @@ const props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
require: true,
|
require: true,
|
||||||
},
|
},
|
||||||
colse: {
|
close: {
|
||||||
type: Function,
|
type: Function,
|
||||||
require: true,
|
require: true,
|
||||||
},
|
},
|
||||||
|
|
@ -63,9 +69,7 @@ async function fetchDetailByid(id: string) {
|
||||||
formData.checkInImg = data.checkInImg;
|
formData.checkInImg = data.checkInImg;
|
||||||
formData.checkInLat = data.checkInLat ? data.checkInLat : "";
|
formData.checkInLat = data.checkInLat ? data.checkInLat : "";
|
||||||
formData.checkInLon = data.checkInLon ? data.checkInLon : "";
|
formData.checkInLon = data.checkInLon ? data.checkInLon : "";
|
||||||
formData.checkInLocation = data.checkInLocation
|
formData.checkInLocation = data.checkInPOI ? data.checkInPOI : "-";
|
||||||
? data.checkInLocation
|
|
||||||
: "-";
|
|
||||||
formData.checkInTime = data.checkInTime ? data.checkInTime : "-";
|
formData.checkInTime = data.checkInTime ? data.checkInTime : "-";
|
||||||
formData.checkOutDate = data.checkOutDate && date2Thai(data.checkOutDate);
|
formData.checkOutDate = data.checkOutDate && date2Thai(data.checkOutDate);
|
||||||
formData.checkOutImg = data.checkOutImg;
|
formData.checkOutImg = data.checkOutImg;
|
||||||
|
|
@ -76,27 +80,32 @@ async function fetchDetailByid(id: string) {
|
||||||
: "-";
|
: "-";
|
||||||
formData.checkOutTime = data.checkOutTime ? data.checkOutTime : "-";
|
formData.checkOutTime = data.checkOutTime ? data.checkOutTime : "-";
|
||||||
formData.fullName = data.fullName;
|
formData.fullName = data.fullName;
|
||||||
formData.checkOutLocation = data.checkOutLocation
|
formData.checkOutLocation = data.checkOutPOI ? data.checkOutPOI : "-";
|
||||||
? data.checkOutLocation
|
|
||||||
: "-";
|
|
||||||
formData.checkInDescription = data.checkInDescription
|
formData.checkInDescription = data.checkInDescription
|
||||||
? data.checkInDescription
|
? data.checkInDescription
|
||||||
: "-";
|
: "-";
|
||||||
formData.checkOutDescription = data.checkOutDescription
|
formData.checkOutDescription = data.checkOutDescription
|
||||||
? data.checkOutDescription
|
? data.checkOutDescription
|
||||||
: "-";
|
: "-";
|
||||||
formData.checkInStatus = data.checkInStatus;
|
formData.checkInStatus = data.checkInStatus
|
||||||
formData.checkOutStatus = data.checkOutStatus;
|
? convertSatatus(data.checkInStatus)
|
||||||
|
: "-";
|
||||||
|
formData.checkOutStatus = data.checkOutStatus
|
||||||
|
? convertSatatus(data.checkOutStatus)
|
||||||
|
: "-";
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
closePopup();
|
||||||
})
|
})
|
||||||
.catch((err) => {})
|
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Function ปิด popup */
|
/** Function ปิด popup */
|
||||||
function colsePopup() {
|
function closePopup() {
|
||||||
props.colse ? props.colse() : false;
|
props.close ? props.close() : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|
@ -122,7 +131,7 @@ watch(
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
style="color: #eb0505; background-color: #ffdede"
|
style="color: #eb0505; background-color: #ffdede"
|
||||||
@click="colsePopup"
|
@click="closePopup"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
@ -152,14 +161,26 @@ watch(
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-2">
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label class="text-grey-8">สถานะ</q-item-label>
|
<q-item-label class="text-grey-8"
|
||||||
|
>สถานะเวลาเข้างาน
|
||||||
|
</q-item-label>
|
||||||
<q-item-label>{{ formData.checkInStatus }}</q-item-label>
|
<q-item-label>{{ formData.checkInStatus }}</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-2">
|
||||||
|
<q-item>
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label class="text-grey-8"
|
||||||
|
>สถานะเวลาออก</q-item-label
|
||||||
|
>
|
||||||
|
<q-item-label>{{ formData.checkOutStatus }}</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
<div class="row q-gutter-md q-pt-md">
|
<div class="row q-gutter-md q-pt-md">
|
||||||
|
|
|
||||||
|
|
@ -143,20 +143,22 @@ async function fetchListTimeRecord() {
|
||||||
(e: DataResTime) => ({
|
(e: DataResTime) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
fullName: e.fullName,
|
fullName: e.fullName,
|
||||||
checkInDate: e.checkInDate && date2Thai(e.checkInDate),
|
checkInDate: e.checkInDate ? date2Thai(e.checkInDate) : "-",
|
||||||
checkInTime: e.checkInTime,
|
checkInTime: e.checkInTime,
|
||||||
checkInLocation: e.checkInLocation,
|
checkInLocation: e.checkInLocation,
|
||||||
checkInLat: e.checkInLat,
|
checkInLat: e.checkInLat,
|
||||||
checkInLon: e.checkInLon,
|
checkInLon: e.checkInLon,
|
||||||
checkInStatus:
|
checkInStatus: e.checkInStatus
|
||||||
e.checkInStatus && workStore.convertSatatus(e.checkInStatus),
|
? workStore.convertSatatus(e.checkInStatus)
|
||||||
checkOutDate: e.checkOutDate && date2Thai(e.checkOutDate),
|
: "-",
|
||||||
checkOutLocation: e.checkOutLocation,
|
checkOutDate: e.checkOutDate ? date2Thai(e.checkOutDate) : "-",
|
||||||
checkOutTime: e.checkOutTime,
|
checkOutLocation: e.checkOutLocation ? e.checkOutLocation : "-",
|
||||||
checkOutLat: e.checkOutLat,
|
checkOutTime: e.checkOutTime ? e.checkOutTime : "-",
|
||||||
checkOutLon: e.checkOutLon,
|
checkOutLat: e.checkOutLocation ? e.checkOutLat : "",
|
||||||
checkOutStatus:
|
checkOutLon: e.checkOutLocation ? e.checkOutLon : "",
|
||||||
e.checkOutStatus && workStore.convertSatatus(e.checkOutStatus),
|
checkOutStatus: e.checkOutStatus
|
||||||
|
? workStore.convertSatatus(e.checkOutStatus)
|
||||||
|
: "-",
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
rows.value = datalist;
|
rows.value = datalist;
|
||||||
|
|
@ -204,6 +206,7 @@ onMounted(async () => {
|
||||||
:rowsPerPage="rowsPerPage"
|
:rowsPerPage="rowsPerPage"
|
||||||
:maxPage="maxPage"
|
:maxPage="maxPage"
|
||||||
@update:pagination="updatePaging"
|
@update:pagination="updatePaging"
|
||||||
|
:tab="'1'"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
@ -20,7 +21,9 @@ import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
||||||
/** useStore */
|
/** useStore */
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const workStore = useWorklistDataStore();
|
const workStore = useWorklistDataStore();
|
||||||
const { date2Thai, dateToISO, showLoader, hideLoader } = mixin;
|
const { date2Thai, dateToISO, showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
|
|
||||||
/** ข้อมูลตาราง*/
|
/** ข้อมูลตาราง*/
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
|
@ -125,7 +128,7 @@ async function fetchListLogRecord() {
|
||||||
rows.value = datalist;
|
rows.value = datalist;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
messageError($q, err);
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|
@ -162,6 +165,7 @@ onMounted(async () => {
|
||||||
:rowsPerPage="rowsPerPage"
|
:rowsPerPage="rowsPerPage"
|
||||||
:maxPage="maxPage"
|
:maxPage="maxPage"
|
||||||
@update:pagination="updatePagingProp"
|
@update:pagination="updatePagingProp"
|
||||||
|
:tab="'2'"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,10 @@ const props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
require: true,
|
require: true,
|
||||||
},
|
},
|
||||||
|
tab: {
|
||||||
|
type: String,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(["update:pagination"]);
|
const emit = defineEmits(["update:pagination"]);
|
||||||
|
|
@ -65,12 +69,14 @@ function updateProp(newPagination: any, page: number) {
|
||||||
* @param data ข้อมูลรายละเอียด
|
* @param data ข้อมูลรายละเอียด
|
||||||
*/
|
*/
|
||||||
function clickDetail(data: any) {
|
function clickDetail(data: any) {
|
||||||
modal.value = true;
|
if (props.tab === "1") {
|
||||||
dataDetail.value = data;
|
modal.value = true;
|
||||||
|
dataDetail.value = data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Function ปิด popup */
|
/** Function ปิด popup */
|
||||||
function colseDeyail() {
|
function closeDetail() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -150,7 +156,7 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
|
||||||
<DialogDetail :modal="modal" :detail="dataDetail" :colse="colseDeyail" />
|
<DialogDetail :modal="modal" :detail="dataDetail" :close="closeDetail" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,8 @@ export const useWorklistDataStore = defineStore("work", () => {
|
||||||
return "สาย";
|
return "สาย";
|
||||||
case "ABSENT":
|
case "ABSENT":
|
||||||
return "ขาดราชการ";
|
return "ขาดราชการ";
|
||||||
|
default:
|
||||||
|
return "-";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watchEffect, watch, onMounted } from "vue";
|
import { ref, computed, watchEffect, watch, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
|
@ -154,7 +152,7 @@ function Reset() {
|
||||||
/** เช็คค่า props.Modal === true */
|
/** เช็คค่า props.Modal === true */
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
if (props.Modal === true) {
|
if (props.Modal === true) {
|
||||||
selected.value = [];
|
// selected.value = [];
|
||||||
props.getList();
|
props.getList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, reactive, ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -10,6 +10,15 @@ import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.
|
||||||
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
import FormInvestigatefacts from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue"; //สืบสวนข้อเท็จจริง
|
||||||
import FormDisciplinary from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue"; // สอบสวนความผิดทางวินัย
|
import FormDisciplinary from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue"; // สอบสวนความผิดทางวินัย
|
||||||
import type { FormData } from "@/modules/11_discipline/interface/request/disciplinary";
|
import type { FormData } from "@/modules/11_discipline/interface/request/disciplinary";
|
||||||
|
import type {
|
||||||
|
FormData as FormDataComplaint,
|
||||||
|
ArrayPerson,
|
||||||
|
ArrayFileList,
|
||||||
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
|
|
||||||
|
import type {
|
||||||
|
FormData as FormInvestigateFact,
|
||||||
|
} from "@/modules/11_discipline/interface/request/investigateFact";
|
||||||
|
|
||||||
/**import store*/
|
/**import store*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
@ -25,7 +34,7 @@ const route = useRoute();
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const data = ref<object>();
|
const data = ref<object>();
|
||||||
|
|
||||||
/** function fetchData สอบสวนคาวมผิดทางวินัย*/
|
/** function fetchData สอบสวนความผิดทางวินัย*/
|
||||||
async function fetchDetailDisciplinary() {
|
async function fetchDetailDisciplinary() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -47,7 +56,24 @@ async function fetchDetailInvestigate() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.disciplineInvestigateById(id.value))
|
.get(config.API.disciplineInvestigateById(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
data.value = res.data.result;
|
const dataList = res.data.result;
|
||||||
|
dataInvestigatefacts.id = dataList.id;
|
||||||
|
dataInvestigatefacts.idComplaint = dataList.idComplaint;
|
||||||
|
dataInvestigatefacts.respondentType = dataList.respondentType;
|
||||||
|
dataInvestigatefacts.persons = dataList.persons;
|
||||||
|
dataInvestigatefacts.investigationDetail = dataList.investigationDetail;
|
||||||
|
dataInvestigatefacts.investigationDetailOther = dataList.investigationDetailOther;
|
||||||
|
dataInvestigatefacts.investigationDateStart = dataList.investigationDateStart;
|
||||||
|
dataInvestigatefacts.investigationDateEnd = dataList.investigationDateEnd;
|
||||||
|
dataInvestigatefacts.investigationDescription = dataList.investigationDescription;
|
||||||
|
dataInvestigatefacts.investigationCauseText = dataList.investigationCauseText;
|
||||||
|
dataInvestigatefacts.status = dataList.status;
|
||||||
|
dataInvestigatefacts.result = dataList.result;
|
||||||
|
dataInvestigatefacts.directors = dataList.director;
|
||||||
|
dataInvestigatefacts.disciplineInvestigateDocs = dataList.disciplineInvestigateDocs;
|
||||||
|
dataInvestigatefacts.disciplineInvestigateRelevantDocs =
|
||||||
|
dataList.disciplineInvestigateRelevantDocs;
|
||||||
|
dataInvestigatefacts.investigationStatusResult = dataList.investigationStatusResult;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -63,7 +89,24 @@ async function fetchDetailComplaints() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.disciplineComplaintsById(id.value))
|
.get(config.API.disciplineComplaintsById(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
data.value = res.data.result;
|
const dataList = res.data.result;
|
||||||
|
dataComplaints.id = dataList.id;
|
||||||
|
dataComplaints.respondentType = dataList.respondentType;
|
||||||
|
dataComplaints.organizationId = dataList.organizationId;
|
||||||
|
dataComplaints.consideredAgency = dataList.consideredAgency;
|
||||||
|
dataComplaints.title = dataList.title;
|
||||||
|
dataComplaints.description = dataList.description;
|
||||||
|
dataComplaints.dateReceived = dataList.dateReceived;
|
||||||
|
dataComplaints.levelConsideration = dataList.levelConsideration;
|
||||||
|
dataComplaints.dateConsideration = dataList.dateConsideration;
|
||||||
|
dataComplaints.offenseDetails = dataList.offenseDetails;
|
||||||
|
dataComplaints.dateNotification = dataList.dateNotification;
|
||||||
|
dataComplaints.complaintFrom = dataList.complaintFrom;
|
||||||
|
dataComplaints.appellant = dataList.appellant;
|
||||||
|
dataComplaints.status = dataList.status;
|
||||||
|
dataComplaints.persons = dataList.persons;
|
||||||
|
dataComplaints.result = dataList.result;
|
||||||
|
dataComplaints.disciplineComplaintDocs = dataList.disciplineComplaintDocs;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -177,6 +220,78 @@ watch(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** ข้อมูล v-model ของฟอร์มเรื่องร้องเรียน */
|
||||||
|
const personObjComplaint = reactive<ArrayPerson>({
|
||||||
|
personId: "",
|
||||||
|
idcard: "",
|
||||||
|
name: "",
|
||||||
|
prefix: "",
|
||||||
|
firstName: "",
|
||||||
|
lastName: "",
|
||||||
|
posNo: "",
|
||||||
|
position: "",
|
||||||
|
positionLevel: "",
|
||||||
|
salary: null,
|
||||||
|
organization: "",
|
||||||
|
});
|
||||||
|
|
||||||
|
const fileListObjComplaint = reactive<ArrayFileList>({
|
||||||
|
id: "",
|
||||||
|
pathName: "",
|
||||||
|
fileName: "",
|
||||||
|
});
|
||||||
|
|
||||||
|
const dataComplaints = reactive<FormDataComplaint>({
|
||||||
|
id: "",
|
||||||
|
respondentType: "",
|
||||||
|
organizationId: "",
|
||||||
|
consideredAgency: "",
|
||||||
|
title: "",
|
||||||
|
description: "",
|
||||||
|
dateReceived: null,
|
||||||
|
dateConsideration: null,
|
||||||
|
offenseDetails: "",
|
||||||
|
levelConsideration: "",
|
||||||
|
dateNotification: null,
|
||||||
|
complaintFrom: "",
|
||||||
|
appellant: "",
|
||||||
|
documentFile: null,
|
||||||
|
status: "",
|
||||||
|
persons: [personObjComplaint],
|
||||||
|
result: "",
|
||||||
|
disciplineComplaintDocs: [fileListObjComplaint],
|
||||||
|
});
|
||||||
|
|
||||||
|
/** ข้อมูล v-model ของฟอร์มสืบสวน */
|
||||||
|
const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
||||||
|
id: "",
|
||||||
|
idComplaint: "",
|
||||||
|
investigationDetail: "",
|
||||||
|
complaint: "",
|
||||||
|
complaintdetail: "",
|
||||||
|
investigationDescription: "",
|
||||||
|
fault: "",
|
||||||
|
investigationDetailOther: "",
|
||||||
|
evidenceFiles: null,
|
||||||
|
fileComplaint: null,
|
||||||
|
clickTime: false,
|
||||||
|
investigationDateStart: null,
|
||||||
|
investigationDateEnd: null,
|
||||||
|
daysExtend: null,
|
||||||
|
investigationStatusResult: "",
|
||||||
|
investigationCauseText: "",
|
||||||
|
complaintStatus: "",
|
||||||
|
result: "",
|
||||||
|
directors: [],
|
||||||
|
disciplineInvestigateDocs: [],
|
||||||
|
disciplineInvestigateRelevantDocs: [],
|
||||||
|
status: "",
|
||||||
|
documentFile: null,
|
||||||
|
respondentType: "",
|
||||||
|
organizationId: "",
|
||||||
|
persons: [],
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="col-xs-12 col-sm-12 col-md-11">
|
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||||
|
|
@ -223,19 +338,20 @@ watch(
|
||||||
class="rounded-borders"
|
class="rounded-borders"
|
||||||
indicator-color="primary"
|
indicator-color="primary"
|
||||||
active-bg-color="teal-1"
|
active-bg-color="teal-1"
|
||||||
active-class="text-primary"
|
active-color="primary"
|
||||||
|
active-class="bg-teal-1"
|
||||||
>
|
>
|
||||||
<q-tab name="complaints" label="เรื่องร้องเรียน" />
|
<q-tab name="complaints" label="เรื่องร้องเรียน (สำเนา)" />
|
||||||
<q-tab name="investigatefacts" label="สืบสวนข้อเท็จจริง" />
|
<q-tab name="investigatefacts" label="สืบสวนข้อเท็จจริง (สำเนา)" />
|
||||||
<q-tab name="disciplinary" label="สอบสวนความผิดทางวินัย" />
|
<q-tab name="disciplinary" label="สอบสวนความผิดทางวินัย" />
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-tab-panels v-model="store.tabMenu" animated>
|
<q-tab-panels v-model="store.tabMenu" animated>
|
||||||
<q-tab-panel name="complaints">
|
<q-tab-panel name="complaints">
|
||||||
<FormComplaints :on-submit="onSubmit" :data="data" />
|
<FormComplaints :on-submit="onSubmit" :data="dataComplaints" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="investigatefacts">
|
<q-tab-panel name="investigatefacts">
|
||||||
<FormInvestigatefacts :on-submit="onSubmit" :data="data" />
|
<FormInvestigatefacts :on-submit="onSubmit" :data="dataInvestigatefacts" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="disciplinary">
|
<q-tab-panel name="disciplinary">
|
||||||
<FormDisciplinary
|
<FormDisciplinary
|
||||||
|
|
|
||||||
|
|
@ -2,18 +2,10 @@
|
||||||
import { ref, onMounted, reactive, watch } from "vue";
|
import { ref, onMounted, reactive, watch } from "vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
|
||||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
|
||||||
|
|
||||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
|
||||||
import Dialogbody from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Dialogbody.vue";
|
|
||||||
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/DirectorTable.vue";
|
|
||||||
import UploadFile from "@/modules/11_discipline/components/UploadFile.vue";
|
|
||||||
|
|
||||||
|
/**import type*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
FormData,
|
FormData,
|
||||||
|
|
@ -29,29 +21,35 @@ import type {
|
||||||
} from "@/modules/11_discipline/interface/index/Main";
|
} from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type { DataOptionRes } from "@/modules/11_discipline/interface/response/Main";
|
import type { DataOptionRes } from "@/modules/11_discipline/interface/response/Main";
|
||||||
|
|
||||||
|
/** import components*/
|
||||||
|
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||||
|
import Dialogbody from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Dialogbody.vue";
|
||||||
|
import Table from "@/modules/11_discipline/components/3_InvestigateDisciplinary/DirectorTable.vue";
|
||||||
|
import UploadFile from "@/modules/11_discipline/components/UploadFile.vue";
|
||||||
|
|
||||||
|
/** import store*/
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||||
|
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||||
|
|
||||||
const complainstStore = useComplainstDataStore();
|
const complainstStore = useComplainstDataStore();
|
||||||
const investigateDis = useInvestigateDisStore();
|
const investigateDis = useInvestigateDisStore();
|
||||||
// const { fecthDirector } = investigateDis;
|
const { filterSelector } = complainstStore; // function จาก store complainstStore
|
||||||
const { selectComplainantTpye, filterSelector } = complainstStore; // function จาก store complainstStore
|
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, showLoader, hideLoader, dialogConfirm } = mixin;
|
const { date2Thai, showLoader, hideLoader, dialogConfirm, messageError } =
|
||||||
const router = useRouter();
|
mixin;
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const rows = ref<Director[]>([]);
|
|
||||||
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);
|
||||||
const type = ref<string>("");
|
const type = ref<string>("");
|
||||||
const myForm = ref<QForm | null>(null); //form data input
|
const modal = ref<boolean>(false);
|
||||||
const edit = ref<boolean>(false);
|
const rows = ref<Director[]>([]);
|
||||||
const dateInvestigate = ref<Date>(new Date());
|
|
||||||
const dateAllegation = ref<Date>(new Date());
|
|
||||||
const dateEvident = ref<Date>(new Date());
|
|
||||||
|
|
||||||
const fileDocDataUpload = ref<File[]>([]);
|
|
||||||
|
|
||||||
const modalPerson = ref<boolean>(false);
|
const modalPerson = ref<boolean>(false);
|
||||||
|
/** search data table*/
|
||||||
|
const filter = ref<string>("");
|
||||||
|
|
||||||
function toggleModal() {
|
function toggleModal() {
|
||||||
modalPerson.value = !modalPerson.value;
|
modalPerson.value = !modalPerson.value;
|
||||||
}
|
}
|
||||||
|
|
@ -132,6 +130,7 @@ const columnsPerson = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/** formData*/
|
||||||
const formData = reactive<FormData>({
|
const formData = reactive<FormData>({
|
||||||
respondentType: "",
|
respondentType: "",
|
||||||
organizationId: "",
|
organizationId: "",
|
||||||
|
|
@ -163,6 +162,10 @@ const formData = reactive<FormData>({
|
||||||
// organizationId: "",
|
// organizationId: "",
|
||||||
// consideredAgency: "",
|
// consideredAgency: "",
|
||||||
});
|
});
|
||||||
|
const disciplineDisciplinary_DocSummaryEvidences = ref<FileLists[]>([]);
|
||||||
|
const disciplineDisciplinary_DocRecordAccusers = ref<FileLists[]>([]);
|
||||||
|
const disciplineDisciplinary_DocWitnessess = ref<FileLists[]>([]);
|
||||||
|
const disciplineDisciplinary_DocOthers = ref<FileLists[]>([]);
|
||||||
|
|
||||||
/** ตัวแปร ref สำหรับแสดง validate */
|
/** ตัวแปร ref สำหรับแสดง validate */
|
||||||
const respondentTypeRef = ref<Object | null>(null);
|
const respondentTypeRef = ref<Object | null>(null);
|
||||||
|
|
@ -179,20 +182,26 @@ const disciplinaryRecordAccuserRef = ref<Object | null>(null);
|
||||||
const disciplinaryWitnessesRef = ref<Object | null>(null);
|
const disciplinaryWitnessesRef = ref<Object | null>(null);
|
||||||
const resultRef = ref<Object | null>(null);
|
const resultRef = ref<Object | null>(null);
|
||||||
|
|
||||||
// const typefaultRef = ref<Object | null>(null);
|
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
||||||
// const faultLevelRef = ref<Object | null>(null);
|
const objectdisciplinary: DisciplinaryRef = {
|
||||||
// const detailComplaintRef = ref<Object | null>(null);
|
respondentType: respondentTypeRef,
|
||||||
// const whereInvestigateRef = ref<Object | null>(null);
|
organizationId: organizationIdRef,
|
||||||
// const witnessesRef = ref<Object | null>(null);
|
consideredAgency: consideredAgencyRef,
|
||||||
// const InvestResultsRef = ref<Object | null>(null);
|
disciplinaryDateAllegation: disciplinaryDateAllegationRef,
|
||||||
// const filesEvidenceRef = ref<Object | null>(null);
|
disciplinaryDateEvident: disciplinaryDateEvidentRef,
|
||||||
// const filesRecordAccuserRef = ref<Object | null>(null);
|
disciplinaryCaseFault: disciplinaryCaseFaultRef,
|
||||||
// const filesWitnessesRef = ref<Object | null>(null);
|
disciplinaryInvestigateAt: disciplinaryInvestigateAtRef,
|
||||||
// const filesEtcRef = ref<Object | null>(null);
|
disciplinaryFaultLevel: disciplinaryFaultLevelRef,
|
||||||
// const trueDetailRef = ref<Object | null>(null);
|
disciplinaryRefLaw: disciplinaryRefLawRef,
|
||||||
// const evidenceRef = ref<Object | null>(null);
|
disciplinarySummaryEvidence: disciplinarySummaryEvidenceRef,
|
||||||
// const recordAccuserRef = ref<Object | null>(null);
|
disciplinaryRecordAccuser: disciplinaryRecordAccuserRef,
|
||||||
// const complaintsOptions = ref<any>([]);
|
disciplinaryWitnesses: disciplinaryWitnessesRef,
|
||||||
|
result: resultRef,
|
||||||
|
};
|
||||||
|
|
||||||
|
const initialPagination = ref<any>({
|
||||||
|
rowsPerPage: 0,
|
||||||
|
});
|
||||||
|
|
||||||
/** รับ props มาจากหน้าหลัก */
|
/** รับ props มาจากหน้าหลัก */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -211,53 +220,12 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
const emit = defineEmits(["submit:disciplinary"]);
|
const emit = defineEmits(["submit:disciplinary"]);
|
||||||
|
|
||||||
const initialPagination = ref<any>({
|
|
||||||
rowsPerPage: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
/** ข้อมูล v-model ของฟอร์ม */
|
|
||||||
|
|
||||||
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
|
||||||
const objectdisciplinary: DisciplinaryRef = {
|
|
||||||
respondentType: respondentTypeRef,
|
|
||||||
organizationId: organizationIdRef,
|
|
||||||
consideredAgency: consideredAgencyRef,
|
|
||||||
disciplinaryDateAllegation: disciplinaryDateAllegationRef,
|
|
||||||
disciplinaryDateEvident: disciplinaryDateEvidentRef,
|
|
||||||
disciplinaryCaseFault: disciplinaryCaseFaultRef,
|
|
||||||
disciplinaryInvestigateAt: disciplinaryInvestigateAtRef,
|
|
||||||
disciplinaryFaultLevel: disciplinaryFaultLevelRef,
|
|
||||||
disciplinaryRefLaw: disciplinaryRefLawRef,
|
|
||||||
disciplinarySummaryEvidence: disciplinarySummaryEvidenceRef,
|
|
||||||
disciplinaryRecordAccuser: disciplinaryRecordAccuserRef,
|
|
||||||
disciplinaryWitnesses: disciplinaryWitnessesRef,
|
|
||||||
result: resultRef,
|
|
||||||
// typefault: typefaultRef,
|
|
||||||
// faultLevel: faultLevelRef,
|
|
||||||
// refLaw: refLawRef,
|
|
||||||
// detailComplaint: detailComplaintRef,
|
|
||||||
// whereInvestigate: whereInvestigateRef,
|
|
||||||
// trueDetail: trueDetailRef,
|
|
||||||
// evidence: evidenceRef,
|
|
||||||
// recordAccuser: recordAccuserRef,
|
|
||||||
// witnesses: witnessesRef,
|
|
||||||
// InvestResults: InvestResultsRef,
|
|
||||||
// filesEvidence: filesEvidenceRef,
|
|
||||||
// filesRecordAccuser: filesRecordAccuserRef,
|
|
||||||
// filesWitnesses: filesWitnessesRef,
|
|
||||||
// filesEtc: filesEtcRef,
|
|
||||||
};
|
|
||||||
|
|
||||||
const disciplineDisciplinary_DocSummaryEvidences = ref<FileLists[]>([]);
|
|
||||||
const disciplineDisciplinary_DocRecordAccusers = ref<FileLists[]>([]);
|
|
||||||
const disciplineDisciplinary_DocWitnessess = ref<FileLists[]>([]);
|
|
||||||
const disciplineDisciplinary_DocOthers = ref<FileLists[]>([]);
|
|
||||||
|
|
||||||
/** เปิด dialog */
|
/** เปิด dialog */
|
||||||
function popup() {
|
function popup() {
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
filterKeyword2.value = "";
|
filterKeyword2.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังชั่นปิด dialog */
|
/** ฟังชั่นปิด dialog */
|
||||||
function clickClose() {
|
function clickClose() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
|
|
@ -281,16 +249,6 @@ function validateForm() {
|
||||||
console.log("ไม่ผ่าน ");
|
console.log("ไม่ผ่าน ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** search data table*/
|
|
||||||
const filter = ref<string>("");
|
|
||||||
const routeName = router.currentRoute.value.name;
|
|
||||||
|
|
||||||
// async function fileUploadDoc(files: any) {
|
|
||||||
// files.forEach((file: any) => {
|
|
||||||
// fileDocDataUpload.value.push(file);
|
|
||||||
// });
|
|
||||||
// console.log(fileDocDataUpload.value);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชั่นสำหรับบันทึกข้อมูล ระบบจะแสดง dialog ให้ยืนยันการบันทึก
|
* ฟังก์ชั่นสำหรับบันทึกข้อมูล ระบบจะแสดง dialog ให้ยืนยันการบันทึก
|
||||||
|
|
@ -313,9 +271,9 @@ async function deleteData(id: string) {
|
||||||
console.log("delete");
|
console.log("delete");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** เรียกข้อมูลรายละเอียด*/
|
||||||
async function fetchDatadetail() {
|
async function fetchDatadetail() {
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
console.log(props.data);
|
|
||||||
formData.respondentType = props.data.respondentType;
|
formData.respondentType = props.data.respondentType;
|
||||||
formData.organizationId = props.data.organizationId;
|
formData.organizationId = props.data.organizationId;
|
||||||
formData.consideredAgency = props.data.consideredAgency;
|
formData.consideredAgency = props.data.consideredAgency;
|
||||||
|
|
@ -340,11 +298,8 @@ async function fetchDatadetail() {
|
||||||
props.data.disciplineDisciplinary_DocWitnessess;
|
props.data.disciplineDisciplinary_DocWitnessess;
|
||||||
disciplineDisciplinary_DocOthers.value =
|
disciplineDisciplinary_DocOthers.value =
|
||||||
props.data.disciplineDisciplinary_DocOthers;
|
props.data.disciplineDisciplinary_DocOthers;
|
||||||
// formData.InvestResults = props.data.InvestResults;
|
|
||||||
// formData.filesEvidence = props.data.filesEvidence;
|
/** MAP รายชื่อกรรมการ หน้าหลัก */
|
||||||
// formData.filesRecordAccuser = props.data.filesRecordAccuser;
|
|
||||||
// formData.filesWitnesses = props.data.filesWitnesses;
|
|
||||||
// formData.filesEtc = props.data.filesEtc;
|
|
||||||
let datalistDirector: responseType[] = formData.directors.map(
|
let datalistDirector: responseType[] = formData.directors.map(
|
||||||
(e: directorType) => ({
|
(e: directorType) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
|
|
@ -353,19 +308,21 @@ async function fetchDatadetail() {
|
||||||
prefix: e.prefix,
|
prefix: e.prefix,
|
||||||
firstName: e.firstName,
|
firstName: e.firstName,
|
||||||
lastName: e.lastName,
|
lastName: e.lastName,
|
||||||
position: e.position,
|
position: e.position ? e.position : "-",
|
||||||
email: e.email,
|
email: e.email ? e.email : "-",
|
||||||
phone: e.phone,
|
phone: e.phone ? e.phone : "-",
|
||||||
total: e.total,
|
total: e.total ?? "-",
|
||||||
duty: e.duty,
|
duty: e.duty ? e.duty : "-",
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
rows.value = datalistDirector;
|
rows.value = datalistDirector;
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(formData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function add ผู้ถูกร้องเรียนใน table
|
||||||
|
* @param data รายชื่อ ผู้ถูกร้องเรียน
|
||||||
|
*/
|
||||||
async function addPerson(data: Persons[]) {
|
async function addPerson(data: Persons[]) {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -387,6 +344,8 @@ async function addPerson(data: Persons[]) {
|
||||||
formData.persons = mergedArray;
|
formData.persons = mergedArray;
|
||||||
toggleModal();
|
toggleModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function รับข้อมูลรายชื่อผู้ถูกร้องเรียน*/
|
||||||
function handleSave(returnData: any) {
|
function handleSave(returnData: any) {
|
||||||
addPerson(returnData);
|
addPerson(returnData);
|
||||||
}
|
}
|
||||||
|
|
@ -404,6 +363,7 @@ watch(
|
||||||
);
|
);
|
||||||
|
|
||||||
const organizationOption = ref<DataOption[]>([]);
|
const organizationOption = ref<DataOption[]>([]);
|
||||||
|
/** function เรียกรายชื่อหน่วยงาน*/
|
||||||
async function fetchOrganization() {
|
async function fetchOrganization() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.typeOc())
|
.get(config.API.typeOc())
|
||||||
|
|
@ -415,15 +375,17 @@ async function fetchOrganization() {
|
||||||
}));
|
}));
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
messageError($q, err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** query string*/
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
const rowsPerPage = ref<number>(10);
|
const rowsPerPage = ref<number>(10);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
const filterKeyword2 = ref<string>("");
|
const filterKeyword2 = ref<string>("");
|
||||||
const listDirector = ref<any>([]);
|
const listDirector = ref<any>([]);
|
||||||
|
/** function เรียกรายชื่อกรรมการ*/
|
||||||
async function fetchDListDirector() {
|
async function fetchDListDirector() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -447,63 +409,52 @@ async function fetchDListDirector() {
|
||||||
total: e.total,
|
total: e.total,
|
||||||
duty: e.duty,
|
duty: e.duty,
|
||||||
}));
|
}));
|
||||||
listDirector.value = datalistDirector;
|
|
||||||
|
/** หารานชื่อกรรมการที่ไม่ซ้ำ*/
|
||||||
|
listDirector.value = datalistDirector.filter(
|
||||||
|
(i) => !rows.value.some((e) => e.directorId === i.id)
|
||||||
|
);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function อัดเดท Paging กรรมการ
|
||||||
|
* @param rpp ต่อหน้า
|
||||||
|
* @param p หน้า
|
||||||
|
*/
|
||||||
async function updatePaging(rpp: number, p: number) {
|
async function updatePaging(rpp: number, p: number) {
|
||||||
page.value = p;
|
page.value = p;
|
||||||
rowsPerPage.value = rpp;
|
rowsPerPage.value = rpp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function return รายชื่อกรรมการที่เลือก
|
||||||
|
* @param data รายชื่อกรรมการที่เลือก
|
||||||
|
*/
|
||||||
async function returnDirector(data: any) {
|
async function returnDirector(data: any) {
|
||||||
const dataList = data.map((item: any) => item.id);
|
const dataList = data.map((item: any) => item.id);
|
||||||
formData.directors.push(dataList);
|
formData.directors = dataList;
|
||||||
rows.value.push(...data);
|
rows.value = data;
|
||||||
clickClose();
|
clickClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function selectComplainant(val: string) {
|
async function selectComplainant(val: string) {
|
||||||
formData.organizationId = "";
|
formData.organizationId = "";
|
||||||
formData.consideredAgency = "";
|
formData.consideredAgency = "";
|
||||||
if (val === "0") {
|
// if (val === "0") {
|
||||||
await fetchListname(); // ถ้าเลือกบุกคลจะเรียก function fetchListname เรียกรายชื่อจากทะเบียน
|
// await fetchListname(); // ถ้าเลือกบุกคลจะเรียก function fetchListname เรียกรายชื่อจากทะเบียน
|
||||||
} else if (val === "1") {
|
// } else if (val === "1") {
|
||||||
await fetchOffice(); // ถ้าเลือกหน่วยงานจะเรียก function fetchOffice เรียกโครงสร้างสำนักงาน
|
// await fetchOffice(); // ถ้าเลือกหน่วยงานจะเรียก function fetchOffice เรียกโครงสร้างสำนักงาน
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** เรียกรายชื่อ */
|
/** Hook */
|
||||||
async function fetchListname() {
|
|
||||||
const listName = [
|
|
||||||
{
|
|
||||||
id: "1",
|
|
||||||
name: "นายเอ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "2",
|
|
||||||
name: "นายบี",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "3",
|
|
||||||
name: "นายชี",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
selectComplainantTpye(listName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** เรียกโครงสร้างสำนักงาน */
|
|
||||||
async function fetchOffice() {}
|
|
||||||
|
|
||||||
/**เมื่อเริ่มโหลดหน้า
|
|
||||||
* ส่งข้อมูลจำลองไปยัง store
|
|
||||||
*/
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchOrganization();
|
await fetchOrganization();
|
||||||
});
|
});
|
||||||
|
|
@ -571,8 +522,8 @@ onMounted(async () => {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-xs-12 col-sm-3" id="consideredAgency">
|
<div class="col-xs-12 col-sm-3" id="consideredAgency">
|
||||||
<q-select
|
<!-- <q-select
|
||||||
ref="consideredAgencyRef"
|
ref="consideredAgencyRef"
|
||||||
for="selectAgency"
|
for="selectAgency"
|
||||||
dense
|
dense
|
||||||
|
|
@ -599,8 +550,8 @@ onMounted(async () => {
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</template>
|
</template>
|
||||||
</q-select>
|
</q-select> -->
|
||||||
</div> -->
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="formData.respondentType !== 'ORGANIZATION'"
|
v-if="formData.respondentType !== 'ORGANIZATION'"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ export const useComplainstDataStore = defineStore(
|
||||||
const visibleColumns = ref<string[]>([]);
|
const visibleColumns = ref<string[]>([]);
|
||||||
const columns = ref<QTableProps["columns"]>([]);
|
const columns = ref<QTableProps["columns"]>([]);
|
||||||
|
|
||||||
|
|
||||||
function fetchComplainstAdd(data: ArrayPerson[]) {
|
function fetchComplainstAdd(data: ArrayPerson[]) {
|
||||||
rowsAdd.value = data;
|
rowsAdd.value = data;
|
||||||
}
|
}
|
||||||
|
|
@ -119,8 +118,7 @@ export const useComplainstDataStore = defineStore(
|
||||||
function filterSelector(val: string, update: Function, type: string) {
|
function filterSelector(val: string, update: Function, type: string) {
|
||||||
update(() => {
|
update(() => {
|
||||||
const needle = val.toLowerCase();
|
const needle = val.toLowerCase();
|
||||||
|
if (type === "filterrespondentType") {
|
||||||
if (type === "filtercomplainantType") {
|
|
||||||
complainantoptions.value = complainantoptionsMain.value.filter(
|
complainantoptions.value = complainantoptionsMain.value.filter(
|
||||||
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
(v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,10 @@ export const useInvestigateDisStore = defineStore(
|
||||||
title: e.title,
|
title: e.title,
|
||||||
respondentType: convertRespondentType(e.respondentType),
|
respondentType: convertRespondentType(e.respondentType),
|
||||||
offenseDetails: convertFault(e.offenseDetails),
|
offenseDetails: convertFault(e.offenseDetails),
|
||||||
disciplinaryFaultLevel: e.disciplinaryFaultLevel,
|
disciplinaryFaultLevel: e.disciplinaryFaultLevel ?? "-",
|
||||||
disciplinaryCaseFault: e.disciplinaryCaseFault,
|
disciplinaryCaseFault: e.disciplinaryCaseFault ?? "-",
|
||||||
status: e.status,
|
status: e.status ?? "-",
|
||||||
createdAt: date2Thai(e.createdAt),
|
createdAt: e.createdAt ? date2Thai(e.createdAt) : "-",
|
||||||
}));
|
}));
|
||||||
|
|
||||||
rows.value = datalist;
|
rows.value = datalist;
|
||||||
|
|
@ -90,6 +90,8 @@ export const useInvestigateDisStore = defineStore(
|
||||||
return "ความผิดวินัยไม่ร้ายแรง";
|
return "ความผิดวินัยไม่ร้ายแรง";
|
||||||
case "DEADLY":
|
case "DEADLY":
|
||||||
return "ความผิดวินัยร้ายแรง";
|
return "ความผิดวินัยร้ายแรง";
|
||||||
|
default:
|
||||||
|
return "-";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function convertSatatus(val: string) {
|
function convertSatatus(val: string) {
|
||||||
|
|
@ -306,6 +308,7 @@ export const useInvestigateDisStore = defineStore(
|
||||||
optionsTypefault,
|
optionsTypefault,
|
||||||
optionsfaultLevel,
|
optionsfaultLevel,
|
||||||
fecthDirector,
|
fecthDirector,
|
||||||
|
|
||||||
visibleColumns,
|
visibleColumns,
|
||||||
columns,
|
columns,
|
||||||
visibleColumnsDirector,
|
visibleColumnsDirector,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue