ปรับโค้ดวินัย
This commit is contained in:
parent
1483bbcac7
commit
c81b5db558
17 changed files with 93 additions and 196 deletions
|
|
@ -5,30 +5,23 @@ import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.
|
|||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
import type {
|
||||
FormData,
|
||||
ArrayPerson,
|
||||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
|
||||
const mainStore = useDisciplineMainStore();
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
|
||||
const {
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
success,
|
||||
messageError
|
||||
} = mixin;
|
||||
const { dialogConfirm, showLoader, hideLoader, success, messageError } = mixin;
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
|
|
@ -152,6 +145,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
/** หัวข้อที่เเสดงในตาราง */
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
|
|
@ -197,7 +191,10 @@ async function getData() {
|
|||
});
|
||||
}
|
||||
|
||||
/** ฟังชั่น แก้ไข */
|
||||
/**
|
||||
* บันทึกข้อมูล
|
||||
* @param data ข้อมูลจากฟอร์ม
|
||||
*/
|
||||
async function onSubmit(data: any) {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -329,7 +326,6 @@ function sendPersonToNext(data: ArrayPerson[]) {
|
|||
|
||||
/** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */
|
||||
onMounted(() => {
|
||||
// fetchData();
|
||||
getData();
|
||||
});
|
||||
</script>
|
||||
|
|
@ -382,4 +378,3 @@ onMounted(() => {
|
|||
/>
|
||||
</div>
|
||||
</template>
|
||||
@/modules/11_discipline/store/store
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
|||
const $q = useQuasar();
|
||||
const fileDocDataUpload = ref<File[]>([]);
|
||||
const channelOptions = ref<DataOption[]>([]);
|
||||
|
||||
/** เรียกใช้ store */
|
||||
const mixin = useCounterMixin();
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
|
@ -105,15 +106,8 @@ const objectComplaintsRef: MyObjectComplaintsRef = {
|
|||
organizationId: organizationIdRef,
|
||||
consideredAgency: consideredAgencyRef,
|
||||
title: titleRef,
|
||||
// description: descriptionRef,
|
||||
dateReceived: dateReceivedRef,
|
||||
// dateConsideration: dateConsiderationRef,
|
||||
offenseDetails: offenseDetailsRef,
|
||||
// levelConsideration: levelConsiderationRef,
|
||||
// dateNotification: dateNotificationRef,
|
||||
// complaintFrom: complaintFromRef,
|
||||
// appellant: appellantRef,
|
||||
// result: resultRef,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -341,15 +335,24 @@ function inputEdit(val: boolean) {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* pop up รายละเอียดบุคคล
|
||||
* @param id id ของบุคคล
|
||||
*/
|
||||
function onclickViewinfo(id: string) {
|
||||
modalPersonal.value = true;
|
||||
personId.value = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* ปิด modal
|
||||
* @param modal false
|
||||
*/
|
||||
function updatemodalPersonal(modal: boolean) {
|
||||
modalPersonal.value = modal;
|
||||
}
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(() => {
|
||||
mainStore.rowsAdd = [];
|
||||
getListChannel();
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ function filterFn() {
|
|||
getList();
|
||||
}
|
||||
|
||||
|
||||
function resetFilter() {
|
||||
filterKeyword.value = "";
|
||||
if (filterRef.value) {
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, type PropType } from "vue";
|
||||
// import config from "@/app.config";
|
||||
// import http from "@/plugins/http";
|
||||
import { useQuasar } from "quasar";
|
||||
import FullCalendar from "@fullcalendar/vue3";
|
||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||
import type { CalendarOptions } from "@fullcalendar/core";
|
||||
import timeGridPlugin from "@fullcalendar/timegrid";
|
||||
import interactionPlugin from "@fullcalendar/interaction";
|
||||
import allLocales from "@fullcalendar/core/locales-all";
|
||||
import listPlugin from "@fullcalendar/list";
|
||||
import moment from "moment";
|
||||
|
||||
import type { CalendarOptions } from "@fullcalendar/core";
|
||||
import type { DataDateMonthObject } from "@/modules/09_leave/interface/response/leave";
|
||||
import type { ExtendHistoryObject } from "@/modules/11_discipline/interface/response/Main";
|
||||
|
||||
|
|
@ -80,19 +78,6 @@ const dateMonth = ref<DataDateMonthObject>({
|
|||
year: new Date().getFullYear(),
|
||||
});
|
||||
|
||||
/** function เรียกข่อมูล calendar*/
|
||||
// function getRandomColor() {
|
||||
// return (
|
||||
// "hsl(" +
|
||||
// 360 * Math.random() +
|
||||
// "," +
|
||||
// (25 + 70 * Math.random()) +
|
||||
// "%," +
|
||||
// (85 + 10 * Math.random()) +
|
||||
// "%)"
|
||||
// );
|
||||
// }
|
||||
|
||||
async function fetchCalendar() {
|
||||
showLoader();
|
||||
const defaultColor = "#e3fdda";
|
||||
|
|
@ -123,14 +108,6 @@ async function fetchCalendar() {
|
|||
}, 1000);
|
||||
}
|
||||
|
||||
// function generateGradientColors(length: number) {
|
||||
// const colors = [];
|
||||
// for (let i = 0; i < length; i++) {
|
||||
// colors.push(getRandomColor());
|
||||
// }
|
||||
// return colors;
|
||||
// }
|
||||
|
||||
/**
|
||||
* function convert เดือนปี
|
||||
* @param val เดือนปี
|
||||
|
|
|
|||
|
|
@ -70,6 +70,12 @@ const phone = ref("000-00000000");
|
|||
const reason = ref("ยกเลิกการลา");
|
||||
const model = ref(null);
|
||||
const modeCancel = ref(true);
|
||||
const dateMonth = ref<DataDateMonthObject>({
|
||||
month: new Date().getMonth(),
|
||||
year: new Date().getFullYear(),
|
||||
});
|
||||
|
||||
const dateYear = ref<number>(new Date().getFullYear());
|
||||
|
||||
async function fetchCalendar() {
|
||||
showLoader();
|
||||
|
|
@ -107,13 +113,6 @@ async function fetchCalendar() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
||||
*/
|
||||
onMounted(async () => {
|
||||
fetchCalendar();
|
||||
});
|
||||
|
||||
/** function เปลี่ยนปฎิทิน*/
|
||||
function changCalendar() {
|
||||
fetchCalendar();
|
||||
|
|
@ -128,23 +127,18 @@ async function cancel(text: string) {
|
|||
modalCancel.value = true;
|
||||
modeCancel.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นเปิด model
|
||||
* @param text
|
||||
*/
|
||||
const view = async (text: string) => {
|
||||
async function view(text: string){
|
||||
title.value = text;
|
||||
modalCancel.value = true;
|
||||
modeCancel.value = false;
|
||||
};
|
||||
|
||||
const dateMonth = ref<DataDateMonthObject>({
|
||||
month: new Date().getMonth(),
|
||||
year: new Date().getFullYear(),
|
||||
});
|
||||
|
||||
const dateYear = ref<number>(new Date().getFullYear());
|
||||
const updateMonth = async (e: DataDateMonthObject) => {
|
||||
async function updateMonth(e: DataDateMonthObject){
|
||||
if (e != null) {
|
||||
dateYear.value = e.year;
|
||||
|
||||
|
|
@ -152,10 +146,17 @@ const updateMonth = async (e: DataDateMonthObject) => {
|
|||
}
|
||||
};
|
||||
|
||||
const monthYearThai = (val: DataDateMonthObject) => {
|
||||
function monthYearThai(val: DataDateMonthObject){
|
||||
if (val == null) return "";
|
||||
else return monthYear2Thai(val.month, val.year);
|
||||
};
|
||||
|
||||
/**
|
||||
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
||||
*/
|
||||
onMounted(async () => {
|
||||
fetchCalendar();
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="q-ma-sm">
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import type {
|
|||
MyObjectInvestigateRef,
|
||||
} from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
|
||||
import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
|
|
@ -137,23 +136,6 @@ const formData = reactive<FormData>({
|
|||
isDisciplinary: false,
|
||||
});
|
||||
|
||||
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
||||
const objectInvestigate: MyObjectInvestigateRef = {
|
||||
// complaint: complaintRef,
|
||||
// complaintdetail: complaintdetailRef,
|
||||
// investigationDescription: investigationDescriptionRef,
|
||||
// fault: faultRef,
|
||||
// investigationDetailOther: investigationDetailOtherRef,
|
||||
// fileComplaint: fileComplaintRef,
|
||||
// date: dateRef,
|
||||
// dateEnd: dateEndRef,
|
||||
// investigationDetail: investigationDetailRef,
|
||||
// daysExtend: daysExtendRef,
|
||||
// investigationStatusResult: investigationStatusResultRef,
|
||||
// investigationCauseText: investigationCauseTextRef,
|
||||
// result: resultRef,
|
||||
};
|
||||
|
||||
const rows = ref([]);
|
||||
const rowsChack = ref([]);
|
||||
const statusStep = computed(() => {
|
||||
|
|
@ -181,23 +163,8 @@ const calendarModalclose = () => (calendarModal.value = !calendarModal.value);
|
|||
|
||||
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
||||
function validateForm() {
|
||||
const hasError = [];
|
||||
for (const key in objectInvestigate) {
|
||||
if (Object.prototype.hasOwnProperty.call(objectInvestigate, key)) {
|
||||
const property = objectInvestigate[key];
|
||||
if (property.value && typeof property.value.validate === "function") {
|
||||
const isValid = property.value.validate();
|
||||
hasError.push(isValid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hasError.every((result) => result === true)) {
|
||||
countNum.value = 1
|
||||
onSubmit();
|
||||
} else {
|
||||
console.log("ไม่ผ่าน ");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -581,14 +548,13 @@ function emitPerson(data: FormData[]) {
|
|||
Id: dataMapId,
|
||||
})
|
||||
.then((res) => {
|
||||
// router.push(`/discipline/investigatefacts`);
|
||||
getOc();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
getOc();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -157,29 +157,12 @@ async function fetchCalendar() {
|
|||
*/
|
||||
onMounted(async () => {
|
||||
fetchCalendar();
|
||||
// if (fullCalendar !== undefined) {
|
||||
// const calen = fullCalendar.value.getApi();
|
||||
// const date = new Date(dateMonth.value.year, dateMonth.value.month);
|
||||
// calen.gotoDate(date);
|
||||
// }
|
||||
});
|
||||
|
||||
function changCalendar() {
|
||||
fetchCalendar();
|
||||
// const calen = fullCalendar.value.getApi();
|
||||
// const date = new Date(dateMonth.value.year, dateMonth.value.month);
|
||||
// calen.gotoDate(date);
|
||||
}
|
||||
|
||||
/**
|
||||
* ค่า props(วันเดือนปีที่เลือก) ตอนอัพเดท ค่าฏิทินให้อัพเดทใหม่
|
||||
*/
|
||||
// watch(props, async (count, prevCount) => {
|
||||
// const calen = fullCalendar.value.getApi();
|
||||
// const date = new Date(props.dateYear, props.dateMonth);
|
||||
// calen.gotoDate(date);
|
||||
// });
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นยกเลิก model
|
||||
* @param text
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ function validateForm() {
|
|||
}
|
||||
}
|
||||
if (hasError.every((result) => result === true)) {
|
||||
countNum.value = 1
|
||||
countNum.value = 1;
|
||||
onSubmit();
|
||||
}
|
||||
}
|
||||
|
|
@ -230,7 +230,7 @@ async function calEndDate(val: string) {
|
|||
changeFormData();
|
||||
const date = await new Date(props.data.disciplinaryDateEnd);
|
||||
formData.disciplinaryDateEnd = await new Date(
|
||||
date.setDate(date.getDate() + (Number(val)))
|
||||
date.setDate(date.getDate() + Number(val))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -374,7 +374,7 @@ async function fetchDatadetail() {
|
|||
|
||||
function returnCount(num: number) {
|
||||
countNum.value = num;
|
||||
console.log(countNum.value)
|
||||
console.log(countNum.value);
|
||||
}
|
||||
|
||||
async function addPerson(data: any) {
|
||||
|
|
@ -557,14 +557,13 @@ function emitPerson(data: PersonsArray[]) {
|
|||
Id: dataMapId,
|
||||
})
|
||||
.then((res) => {
|
||||
// router.push(`/discipline/investigatefacts`);
|
||||
fetchOrganization();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
fetchOrganization();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -596,7 +595,6 @@ async function saveDuty(id: string, duty: string, resolution: string) {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
@ -772,15 +770,15 @@ onMounted(async () => {
|
|||
<q-tr :props="props" class="cursor-pointer">
|
||||
<td>
|
||||
<q-btn
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="info"
|
||||
icon="info"
|
||||
@click="onclickViewinfo(props.row.personId)"
|
||||
>
|
||||
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="info"
|
||||
icon="info"
|
||||
@click="onclickViewinfo(props.row.personId)"
|
||||
>
|
||||
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
</td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
|
|
@ -977,7 +975,6 @@ onMounted(async () => {
|
|||
for="#daysExtend"
|
||||
outlined
|
||||
dense
|
||||
|
||||
ref="daysExtendRef"
|
||||
v-model="formData.daysExtend"
|
||||
:options="investigateDis.daysExtendOps"
|
||||
|
|
@ -1089,7 +1086,6 @@ onMounted(async () => {
|
|||
"
|
||||
outlined
|
||||
dense
|
||||
|
||||
hide-bottom-space
|
||||
borderless
|
||||
:model-value="
|
||||
|
|
@ -1225,7 +1221,6 @@ onMounted(async () => {
|
|||
: null
|
||||
"
|
||||
:label="`${'วันที่รายงานผลการสอบสวน'}`"
|
||||
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
@ -1361,7 +1356,6 @@ onMounted(async () => {
|
|||
ref="disciplinaryInvestigateAtRef"
|
||||
v-model="formData.disciplinaryInvestigateAt"
|
||||
label="สอบสวนที่"
|
||||
|
||||
@update:model-value="changeFormData()"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -1382,7 +1376,6 @@ onMounted(async () => {
|
|||
hide-bottom-space
|
||||
:options="investigateDis.optionsfaultLevel"
|
||||
label="ระดับโทษความผิด"
|
||||
|
||||
group-label="group"
|
||||
group-values="options"
|
||||
@update:model-value="changeFormData()"
|
||||
|
|
@ -1496,37 +1489,35 @@ onMounted(async () => {
|
|||
<div class="col-12"><q-separator /></div>
|
||||
|
||||
<div class="q-pa-sm row q-col-gutter-sm">
|
||||
|
||||
<div class="col-3">
|
||||
<q-select
|
||||
:class="inputEdit(isReadonly)"
|
||||
for="#fault"
|
||||
outlined
|
||||
dense
|
||||
:readonly="isReadonly"
|
||||
ref="disciplinaryStatusResultRef"
|
||||
v-model="formData.disciplinaryStatusResult"
|
||||
:options="mainStore.statusResultOptions"
|
||||
label="ผลการสอบสวน"
|
||||
emit-value
|
||||
hide-bottom-space
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
use-input
|
||||
@filter="(inputValue: any,
|
||||
<div class="col-3">
|
||||
<q-select
|
||||
:class="inputEdit(isReadonly)"
|
||||
for="#fault"
|
||||
outlined
|
||||
dense
|
||||
:readonly="isReadonly"
|
||||
ref="disciplinaryStatusResultRef"
|
||||
v-model="formData.disciplinaryStatusResult"
|
||||
:options="mainStore.statusResultOptions"
|
||||
label="ผลการสอบสวน"
|
||||
emit-value
|
||||
hide-bottom-space
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
use-input
|
||||
@filter="(inputValue: any,
|
||||
doneFn: Function) => investigateDis.filterFnOptionsType(inputValue, doneFn, 'offenseDetailsOps'
|
||||
)"
|
||||
@update:model-value="changeFormData()"
|
||||
><template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
|
||||
@update:model-value="changeFormData()"
|
||||
><template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
|
||||
<div
|
||||
v-if="
|
||||
|
|
@ -1561,7 +1552,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" col-12">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="inputEdit(isReadonly)"
|
||||
:readonly="isReadonly"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
watchEffect,
|
||||
watch,
|
||||
type PropType,
|
||||
onMounted,
|
||||
} from "vue";
|
||||
import { QForm, useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watchEffect, watch, type PropType } from "vue";
|
||||
import { ref, computed, watchEffect, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer";
|
||||
|
|
@ -56,7 +56,7 @@ const checkSelected = computed(() => {
|
|||
});
|
||||
|
||||
//popup ยืนยันส่งัว
|
||||
const saveOrder = () => {
|
||||
function saveOrder(){
|
||||
if (type.value) {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, watch } from "vue";
|
||||
import { ref, reactive, watch } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
|
||||
|
|
@ -18,7 +17,6 @@ import type {
|
|||
DataOptionRes,
|
||||
FileArray,
|
||||
} from "@/modules/11_discipline/interface/request/result";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
|
|
@ -26,7 +24,6 @@ const personId = ref<string>("");
|
|||
const countNum = ref<number>(1);
|
||||
const mainStore = useDisciplineMainStore();
|
||||
const modalPerson = ref<boolean>(false);
|
||||
const toggleModal = () => (modalPerson.value = !modalPerson.value);
|
||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||
const dataStore = useDisciplineResultStore();
|
||||
const mixin = useCounterMixin();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const typeReport = route.params.type.toString();
|
|||
|
||||
const store = useReportDataStore();
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError, showLoader, hideLoader, date2Thai } = mixin;
|
||||
const { date2Thai } = mixin;
|
||||
const { filterFnOptionsType } = store;
|
||||
|
||||
const $q = useQuasar();
|
||||
|
|
|
|||
|
|
@ -13,14 +13,10 @@ import Form from '@/modules/11_discipline/components/6_BasicInformation/Channel/
|
|||
const $q = useQuasar()
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
date2Thai,
|
||||
dateToISO,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dialogConfirm,
|
||||
success,
|
||||
dialogMessageNotify,
|
||||
} = mixin;
|
||||
|
||||
const router = useRouter();
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import Form from "@/modules/11_discipline/components/6_BasicInformation/Channel/Form.vue";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/director";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute } from "vue-router";
|
||||
import router from "@/router";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/director";
|
||||
|
||||
const route = useRoute();
|
||||
const typeId = ref<string>(route.params.id.toString());
|
||||
|
|
@ -48,6 +48,10 @@ function onSubmit(type:string) {
|
|||
dialogConfirm($q, () => putData(type));
|
||||
}
|
||||
|
||||
/**
|
||||
* อัปเดตข้อมูล
|
||||
* @param type ช่องทางการร้องเรียน
|
||||
*/
|
||||
function putData(type: string) {
|
||||
showLoader();
|
||||
http
|
||||
|
|
|
|||
|
|
@ -427,10 +427,6 @@ function updatemodalPersonal(modal: boolean) {
|
|||
>
|
||||
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
<!-- <q-icon name="info" color="info" size="sm"
|
||||
><q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||
</q-icon> -->
|
||||
<!-- </router-link> -->
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
|
|
|
|||
|
|
@ -45,14 +45,14 @@ const myForm = ref<QForm | null>(null);
|
|||
/**
|
||||
* ฟังก์ชั่น Save
|
||||
*/
|
||||
async function submit(){
|
||||
async function submit() {
|
||||
if (myForm.value !== null) {
|
||||
myForm.value.validate().then((success) => {
|
||||
if (success) {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
await props.save(props.id, duty.value,resolution.value);
|
||||
await props.save(props.id, duty.value, resolution.value);
|
||||
duty.value = "";
|
||||
resolution.value = "";
|
||||
},
|
||||
|
|
@ -62,10 +62,10 @@ async function submit(){
|
|||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
watch(props, () => {
|
||||
console.log(props.command)
|
||||
console.log(props.command);
|
||||
duty.value = props?.duty;
|
||||
resolution.value = props?.command;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -44,15 +44,8 @@ interface MyObjectComplaintsRef {
|
|||
organizationId: object | null;
|
||||
consideredAgency: object | null;
|
||||
title: object | null;
|
||||
// description: object | null;
|
||||
dateReceived: object | null;
|
||||
// dateConsideration: object | null;
|
||||
offenseDetails: object | null;
|
||||
// levelConsideration: object | null;
|
||||
// dateNotification: object | null;
|
||||
// complaintFrom: object | null;
|
||||
// appellant: object | null;
|
||||
// result: object | null;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue