จัดโค้ดวินัย
This commit is contained in:
parent
71d3b54ef0
commit
7262000680
37 changed files with 492 additions and 697 deletions
|
|
@ -6,7 +6,6 @@ const router = useRouter();
|
|||
|
||||
/** บันทึกข้อมูลเเละ route กลับหน้าหลัก */
|
||||
async function onSubmit(){
|
||||
console.log("add");
|
||||
router.push(`/discipline/investigatefacts`);
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -153,14 +153,12 @@ async function view(text: string) {
|
|||
function gotoPrevMonth() {
|
||||
const calen = fullCalendar.value.getApi();
|
||||
calen.prev();
|
||||
console.log("b", calen.getDate());
|
||||
updateDateMonth(calen.getDate());
|
||||
}
|
||||
|
||||
function gotoNextMonth() {
|
||||
const calen = fullCalendar.value.getApi();
|
||||
calen.next();
|
||||
console.log("n", calen.getDate());
|
||||
updateDateMonth(calen.getDate());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ async function fetchCalendar() {
|
|||
mounth: dateMonth.value.month,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
const data = [
|
||||
{
|
||||
groupId: "2",
|
||||
|
|
|
|||
|
|
@ -142,7 +142,6 @@ function getData() {
|
|||
.get(config.API.investigateById(id.value))
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
// console.log(dataList);
|
||||
data.id = dataList.id;
|
||||
data.idComplaint = dataList.idComplaint;
|
||||
data.respondentType = dataList.respondentType;
|
||||
|
|
@ -165,7 +164,6 @@ function getData() {
|
|||
data.investigationDaysExtend = dataList.investigationDaysExtend;
|
||||
data.investigationExtendHistory =
|
||||
dataList.investigationExtendHistory ?? [];
|
||||
// console.log(dataList);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -253,11 +251,6 @@ function cancelInvestigate() {
|
|||
);
|
||||
}
|
||||
|
||||
/** ฟังชั่น ส่งไปสอบสวน*/
|
||||
function confirmSentInvestigate() {
|
||||
console.log("sent");
|
||||
}
|
||||
|
||||
/** ฟังชั่น ยุติเรื่อง*/
|
||||
function confirmEndInvestigate() {
|
||||
showLoader();
|
||||
|
|
@ -293,7 +286,6 @@ function confirmCancelInvestigate() {
|
|||
|
||||
function emitPerson(data: FormData[]) {
|
||||
const dataMapId = data.map((item: FormData) => item.id);
|
||||
console.log(dataMapId);
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.investigateApprove(id.value), {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ const router = useRouter();
|
|||
const id = ref<string>(route.params.id as string);
|
||||
const modalPerson = ref<boolean>(false);
|
||||
const toggleModal = () => (modalPerson.value = !modalPerson.value);
|
||||
|
||||
/**เรียกใช้ store */
|
||||
const investigateFactStore = useInvestigateFactStore();
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
|
@ -47,13 +48,21 @@ const {
|
|||
} = mixin;
|
||||
const investigateDis = useInvestigateDisStore();
|
||||
|
||||
// const complaintsOptions = ref<any>([]);
|
||||
const modal = ref<boolean>(false);
|
||||
const filterKeyword2 = ref<string>("");
|
||||
const type = ref<string>("");
|
||||
const modalEditDirector = ref<boolean>(false);
|
||||
const editDirectorId = ref<string>();
|
||||
const dutyVal = ref<string>();
|
||||
|
||||
const filter = ref<string>("");
|
||||
const isUpdate = ref<boolean>(false);
|
||||
const filterTable = ref<string>("");
|
||||
const filterKeyword = ref<string>("");
|
||||
const maxPage = ref<number>(1);
|
||||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
|
||||
/** ตัวแปร ref สำหรับแสดง validate */
|
||||
const complaintRef = ref<Object | null>(null);
|
||||
const complaintdetailRef = ref<Object | null>(null);
|
||||
|
|
@ -90,8 +99,6 @@ const props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
const filter = ref<string>("");
|
||||
|
||||
/** ข้อมูล v-model ของฟอร์ม */
|
||||
const formData = reactive<FormData>({
|
||||
id: "",
|
||||
|
|
@ -168,7 +175,6 @@ function validateForm() {
|
|||
onSubmit();
|
||||
} else {
|
||||
console.log("ไม่ผ่าน ");
|
||||
// console.log(hasError);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -226,9 +232,6 @@ function resetExtend() {
|
|||
formData.investigationDaysExtend = 0;
|
||||
}
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
const filterKeyword2 = ref<string>("");
|
||||
const type = ref<string>("");
|
||||
/** เปิด dialog */
|
||||
function onClickOpenPopup() {
|
||||
modal.value = true;
|
||||
|
|
@ -305,7 +308,6 @@ function uploadFileRelevant() {
|
|||
http
|
||||
.put(config.API.investigateRelevantUploadFile(formData.id), Data)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
props.getData();
|
||||
// router.push(`/discipline/complaints`);
|
||||
|
|
@ -319,6 +321,7 @@ function uploadFileRelevant() {
|
|||
});
|
||||
}
|
||||
|
||||
/** อัปโหลดไฟล์ */
|
||||
function uploadFile() {
|
||||
const Data = new FormData();
|
||||
Data.append("file", formData.documentFile);
|
||||
|
|
@ -326,7 +329,6 @@ function uploadFile() {
|
|||
http
|
||||
.put(config.API.investigateUploadFile(formData.id), Data)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
props.getData();
|
||||
// router.push(`/discipline/complaints`);
|
||||
|
|
@ -553,9 +555,6 @@ function emitPerson(data: FormData[]) {
|
|||
});
|
||||
}
|
||||
|
||||
const modalEditDirector = ref<boolean>(false);
|
||||
const editDirectorId = ref<string>();
|
||||
const dutyVal = ref<string>();
|
||||
function openEditDirector(id: string, duty: string) {
|
||||
editDirectorId.value = id;
|
||||
modalEditDirector.value = true;
|
||||
|
|
@ -566,7 +565,7 @@ function closeEditDirector() {
|
|||
modalEditDirector.value = false;
|
||||
}
|
||||
|
||||
const saveDuty = async (id: string, duty: string) => {
|
||||
async function saveDuty(id: string, duty: string){
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.investigateEditDuty(formData.id, id), { duty: duty })
|
||||
|
|
|
|||
|
|
@ -81,11 +81,6 @@ async function getList() {
|
|||
|
||||
const attrs = ref<any>(useAttrs());
|
||||
|
||||
/**ไปยังหน้าเพิ่มข้อมูล */
|
||||
const clickAdd = () => {
|
||||
router.push(`/discipline/investigatefacts/add`);
|
||||
};
|
||||
|
||||
/**
|
||||
* ไปหน้าแก้ไข
|
||||
* @param id ไอดีเฉพาะ รายบุคคล
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue