แก้ สืบ สอบ
This commit is contained in:
parent
749113a3cc
commit
480393efe3
8 changed files with 375 additions and 31 deletions
|
|
@ -3,7 +3,7 @@ import { useRouter, useRoute } from "vue-router";
|
|||
import { onMounted, ref, watch, reactive, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import moment from "moment";
|
||||
|
||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||
import DialogDirector from "@/modules/11_discipline/components/DialogDirector.vue";
|
||||
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||
import Table from "@/modules/11_discipline/components/DirectorTable.vue";
|
||||
|
|
@ -30,7 +30,7 @@ const toggleModal = () => (modalPerson.value = !modalPerson.value);
|
|||
/**เรียกใช้ store */
|
||||
const investigateFactStore = useInvestigateFactStore();
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
const modalPopup = ref<boolean>(false);
|
||||
const mixin = useCounterMixin();
|
||||
const { filterFnOptionsType } = investigateFactStore;
|
||||
const {
|
||||
|
|
@ -490,7 +490,7 @@ function calendarOpen() {
|
|||
/** เปลี่ยนสี เมื่อ readonly
|
||||
* @param val true/false
|
||||
*/
|
||||
function inputEdit(val:boolean){
|
||||
function inputEdit(val: boolean) {
|
||||
return {
|
||||
"full-width cursor-pointer ": val,
|
||||
"full-width cursor-pointer inputgreen": !val,
|
||||
|
|
@ -513,6 +513,33 @@ function inputEditExtend(val: boolean) {
|
|||
}
|
||||
}
|
||||
|
||||
function openModal(){
|
||||
modalPopup.value = true
|
||||
}
|
||||
function closePopup() {
|
||||
modalPopup.value = false;
|
||||
}
|
||||
|
||||
function emitPerson(data: FormData[]) {
|
||||
const dataMapId = data.map((item: FormData) => item.id);
|
||||
console.log(dataMapId);
|
||||
// showLoader();
|
||||
// http
|
||||
// .put(config.API.investigateApprove(id.value), {
|
||||
// persons: dataMapId,
|
||||
// })
|
||||
// .then((res) => {
|
||||
// // router.push(`/discipline/investigatefacts`);
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// getData();
|
||||
// });
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
mainStore.rowsAdd = [];
|
||||
getOc();
|
||||
|
|
@ -521,7 +548,6 @@ onMounted(async () => {
|
|||
<template>
|
||||
<div class="row col-12 bg-white">
|
||||
<div class="col-sm-12 col-md-9">
|
||||
|
||||
<div v-if="isSave" class="q-pa-sm q-gutter-sm">
|
||||
<q-banner
|
||||
inline-actions
|
||||
|
|
@ -538,7 +564,6 @@ onMounted(async () => {
|
|||
<q-card bordered>
|
||||
<div class="col-12 row q-pa-md q-col-gutter-md">
|
||||
<div class="col-xs-12 row q-col-gutter-md">
|
||||
|
||||
<div class="col-xs-12 col-sm-3" id="respondentType">
|
||||
<q-select
|
||||
:class="inputEdit(isReadonly)"
|
||||
|
|
@ -599,7 +624,17 @@ onMounted(async () => {
|
|||
@update:model-value="changeFormData()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="col-xs-12 col-sm-4"
|
||||
v-if="route.name === 'disciplineInvestigatefactsEdit'"
|
||||
>
|
||||
<q-btn
|
||||
class="q-pa-sm"
|
||||
color="orange"
|
||||
label="ส่งรายชื่อไปออกคำสั่งยุติเรื่อง"
|
||||
@click="openModal"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="row col-12"
|
||||
v-if="formData.respondentType === 'PERSON'"
|
||||
|
|
@ -629,7 +664,6 @@ onMounted(async () => {
|
|||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="col-xs-12 q-pa-sm">
|
||||
|
||||
<d-table
|
||||
ref="table"
|
||||
:columns="mainStore.columnsRespondent"
|
||||
|
|
@ -654,7 +688,7 @@ onMounted(async () => {
|
|||
col.label
|
||||
}}</span>
|
||||
</q-th>
|
||||
<q-th auto-width></q-th>
|
||||
<!-- <q-th auto-width></q-th> -->
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
|
|
@ -695,7 +729,7 @@ onMounted(async () => {
|
|||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<!-- <q-td auto-width>
|
||||
<q-btn
|
||||
v-if="!isReadonly"
|
||||
size="12px"
|
||||
|
|
@ -708,7 +742,7 @@ onMounted(async () => {
|
|||
@click="deletePerson(props.row.personId)"
|
||||
><q-tooltip>ลบผู้ถูกร้องเรียน</q-tooltip></q-btn
|
||||
>
|
||||
</q-td>
|
||||
</q-td> -->
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
|
|
@ -1465,6 +1499,17 @@ onMounted(async () => {
|
|||
:close="calendarModalclose"
|
||||
:lists="props.data.investigationExtendHistory"
|
||||
/>
|
||||
|
||||
<PopupSendToNext
|
||||
:modal="modalPopup"
|
||||
:close="closePopup"
|
||||
title="ส่งรายชื่อไปออกคำสั่งยุติเรื่อง"
|
||||
:rows="mainStore.rowsAdd"
|
||||
:columns="mainStore.columnsDirector"
|
||||
:visibleColumns="mainStore.visibleColumnsDirector"
|
||||
@return-person="emitPerson"
|
||||
:checked-val="false"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||
import CalandarDialog from "@/modules/11_discipline/components/3_InvestigateDisciplinary/CalandarDialog.vue";
|
||||
/**import type*/
|
||||
import moment from "moment";
|
||||
|
|
@ -12,6 +13,7 @@ import type {
|
|||
FormData,
|
||||
DisciplinaryRef,
|
||||
Director,
|
||||
PersonsArray
|
||||
} from "@/modules/11_discipline/interface/request/disciplinary";
|
||||
import type {
|
||||
DataOption,
|
||||
|
|
@ -36,7 +38,7 @@ import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
|||
|
||||
const calendarModal = ref<boolean>(false);
|
||||
const calendarModalclose = () => (calendarModal.value = !calendarModal.value);
|
||||
|
||||
const modalPopup = ref<boolean>(false);
|
||||
const complainstStore = useComplainstDataStore();
|
||||
const investigateDis = useInvestigateDisStore();
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
|
@ -488,6 +490,34 @@ function inputEditExtend(val: boolean) {
|
|||
};
|
||||
}
|
||||
}
|
||||
|
||||
function openModal(){
|
||||
modalPopup.value = true
|
||||
}
|
||||
function closePopup() {
|
||||
modalPopup.value = false;
|
||||
}
|
||||
|
||||
function emitPerson(data: PersonsArray[]) {
|
||||
const dataMapId = data.map((item: PersonsArray) => item.id);
|
||||
console.log(dataMapId);
|
||||
// showLoader();
|
||||
// http
|
||||
// .put(config.API.investigateApprove(id.value), {
|
||||
// persons: dataMapId,
|
||||
// })
|
||||
// .then((res) => {
|
||||
// // router.push(`/discipline/investigatefacts`);
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// getData();
|
||||
// });
|
||||
}
|
||||
|
||||
/** Hook */
|
||||
onMounted(async () => {
|
||||
mainStore.rowsAdd = [];
|
||||
|
|
@ -576,8 +606,8 @@ onMounted(async () => {
|
|||
@update:model-value="changeFormData()"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3" id="consideredAgency">
|
||||
<!-- <q-select
|
||||
<!-- <div class="col-xs-12 col-sm-3" id="consideredAgency">
|
||||
<q-select
|
||||
ref="consideredAgencyRef"
|
||||
for="selectAgency"
|
||||
dense
|
||||
|
|
@ -604,10 +634,20 @@ onMounted(async () => {
|
|||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select> -->
|
||||
</q-select>
|
||||
</div> -->
|
||||
<div
|
||||
class="col-xs-12 col-sm-4"
|
||||
v-if="route.name === 'disciplineDisciplinaryEdit'"
|
||||
>
|
||||
<q-btn
|
||||
class="q-pa-sm"
|
||||
color="orange"
|
||||
label="ส่งรายชื่อไปออกคำสั่งยุติเรื่อง"
|
||||
@click="openModal"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="row col-12"
|
||||
v-if="formData.respondentType === 'PERSON'"
|
||||
|
|
@ -661,7 +701,7 @@ onMounted(async () => {
|
|||
col.label
|
||||
}}</span>
|
||||
</q-th>
|
||||
<q-th auto-width></q-th>
|
||||
<!-- <q-th auto-width></q-th> -->
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
|
|
@ -702,7 +742,7 @@ onMounted(async () => {
|
|||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<!-- <q-td auto-width>
|
||||
<q-btn
|
||||
v-if="!isReadonly"
|
||||
size="12px"
|
||||
|
|
@ -715,7 +755,7 @@ onMounted(async () => {
|
|||
@click="deletePerson(props.row.personId)"
|
||||
><q-tooltip>ลบผู้ถูกร้องเรียน</q-tooltip></q-btn
|
||||
>
|
||||
</q-td>
|
||||
</q-td> -->
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
|
|
@ -1619,6 +1659,18 @@ onMounted(async () => {
|
|||
:close="calendarModalclose"
|
||||
:lists="formData.disciplinaryExtendHistory"
|
||||
/>
|
||||
|
||||
<PopupSendToNext
|
||||
:modal="modalPopup"
|
||||
:close="closePopup"
|
||||
title="ส่งรายชื่อไปออกคำสั่งยุติเรื่อง"
|
||||
:rows="mainStore.rowsAdd"
|
||||
:columns="mainStore.columnsDirector"
|
||||
:visibleColumns="mainStore.visibleColumnsDirector"
|
||||
@return-person="emitPerson"
|
||||
:checked-val="false"
|
||||
/>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ const props = defineProps({
|
|||
getData: Function,
|
||||
rows2: Array,
|
||||
filterKeyword2: String,
|
||||
title: String,
|
||||
});
|
||||
|
||||
const checkSelected = computed(() => {
|
||||
|
|
@ -68,8 +69,8 @@ const saveOrder = () => {
|
|||
dialogConfirm(
|
||||
$q,
|
||||
() => Ordersave(),
|
||||
"ยืนยันส่งไปออกคำสั่ง",
|
||||
"ต้องการยืนยันส่งไปออกคำสั่งใช่หรือไม่?"
|
||||
`ยืนยัน${props.title}`,
|
||||
`ต้องการยืนยัน${props.title}ใช่หรือไม่?`
|
||||
);
|
||||
} else {
|
||||
dialogMessageNotify($q, "กรุณาเลือกประเภทคำสั่ง");
|
||||
|
|
@ -86,7 +87,7 @@ const Ordersave = async () => {
|
|||
await http
|
||||
.put(config.API.reportresult(type.value as string), body)
|
||||
.then((res: any) => {
|
||||
success($q, "ส่งไปออกคำสั่งสำเร็จ");
|
||||
success($q, `${props.title}สำเร็จ`);
|
||||
props.closeModal?.();
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -153,7 +154,7 @@ onMounted(async () => {
|
|||
<template>
|
||||
<q-dialog v-model="props.Modal">
|
||||
<q-card style="width: 1200px; max-width: 80vw">
|
||||
<DialogHeader tittle="ส่งไปออกคำสั่ง" :close="closeModal" />
|
||||
<DialogHeader :tittle="props.title" :close="closeModal" />
|
||||
<q-separator />
|
||||
<q-card-section class="q-pt-none">
|
||||
<div class="row justify-between">
|
||||
|
|
@ -271,7 +272,7 @@ onMounted(async () => {
|
|||
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
<q-btn
|
||||
label="ส่งไปออกคำสั่ง"
|
||||
:label="props.title"
|
||||
@click="saveOrder"
|
||||
:disable="checkSelected"
|
||||
color="public"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ const { showLoader, hideLoader, messageError } = mixin;
|
|||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
|
||||
const titlePopup = ref<string>('')
|
||||
|
||||
/**
|
||||
* บันทึกข้อมูลที่เเก้ไข
|
||||
|
|
@ -48,8 +48,9 @@ function closeModal() {
|
|||
|
||||
|
||||
/** ยืนยัน ส่งไปออกคำสั่ง */
|
||||
function sentIssue() {
|
||||
function sentIssue(title:string) {
|
||||
modal.value = true;
|
||||
titlePopup.value = title
|
||||
}
|
||||
|
||||
const idInvestigate = ref<string>("");
|
||||
|
|
@ -279,9 +280,15 @@ watch(
|
|||
<div class="q-gutter-x-sm">
|
||||
<q-btn
|
||||
v-if="status === 'DONE'"
|
||||
label="ส่งไปออกคำสั่ง"
|
||||
label="ส่งไปออกคำสั่งลงโทษทางวินัย"
|
||||
color="public"
|
||||
@click="sentIssue"
|
||||
@click="sentIssue('ส่งไปออกคำสั่งลงโทษทางวินัย')"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="status === 'DONE'"
|
||||
label="ส่งไปออกคำสั่งงดโทษ/เพิ่มโทษ"
|
||||
color="public"
|
||||
@click="sentIssue('ส่งไปออกคำสั่งงดโทษ/เพิ่มโทษ')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -328,6 +335,7 @@ watch(
|
|||
</div>
|
||||
|
||||
<DialogSendToCommand
|
||||
:title="titlePopup"
|
||||
v-model:Modal="modal"
|
||||
:closeModal="closeModal"
|
||||
:rows2="[]"
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import type {
|
|||
FormRef,
|
||||
DataOption,
|
||||
DataOptionRes,
|
||||
FileArray,
|
||||
} from "@/modules/11_discipline/interface/request/result";
|
||||
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
|
@ -56,9 +57,20 @@ const props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
const ArrayFile = reactive<FileArray>({
|
||||
id: "",
|
||||
fileName: "",
|
||||
pathName: "",
|
||||
});
|
||||
/** ข้อมูล v-model ของฟอร์ม */
|
||||
const formData = reactive<FormData>({
|
||||
resultDescription: "",
|
||||
disciplineType: "",
|
||||
titleType: "",
|
||||
oc: "",
|
||||
file: null,
|
||||
disciplineComplaint_Appeal_Docs: [ArrayFile],
|
||||
year: new Date().getFullYear(),
|
||||
});
|
||||
|
||||
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
||||
|
|
@ -184,11 +196,61 @@ function changeFormData() {
|
|||
/**เมื่อเริ่มโหลดหน้า
|
||||
* ส่งข้อมูลจำลองไปยัง store
|
||||
*/
|
||||
|
||||
function uploadFile() {
|
||||
/** uploadFile */
|
||||
// const Data = new FormData();
|
||||
// Data.append("file", formData.file);
|
||||
// showLoader();
|
||||
// http
|
||||
// .put(config.API.appealUpLoadFile(formData.id), Data)
|
||||
// .then((res) => {
|
||||
// console.log(res);
|
||||
// success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
// props.getData();
|
||||
// // router.push(`/discipline/complaints`);
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// hideLoader();
|
||||
// formData.file = null;
|
||||
// });
|
||||
}
|
||||
|
||||
function downloadFile(link: string) {
|
||||
// window.open(link, "_blank");
|
||||
}
|
||||
|
||||
function deleteFile(id: string) {
|
||||
// dialogRemove($q, () => confirmDelete(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* ยืนยัน ลบ ไฟล์
|
||||
* @param id id file
|
||||
*/
|
||||
function confirmDelete(id: string) {
|
||||
// showLoader();
|
||||
// http
|
||||
// .delete(config.API.appealDeleteFile(formData.id, id))
|
||||
// .then((res) => {
|
||||
// success($q, `ลบไฟล์สำเร็จ`);
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// props.getData();
|
||||
// });
|
||||
}
|
||||
|
||||
onMounted(async () => {});
|
||||
</script>
|
||||
<template>
|
||||
<div class="row col-12">
|
||||
<div class="col-12">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col-sm-12 col-md-9">
|
||||
<div v-if="isSave" class="q-pa-sm q-gutter-sm">
|
||||
<q-banner
|
||||
inline-actions
|
||||
|
|
@ -200,7 +262,7 @@ onMounted(async () => {});
|
|||
</q-banner>
|
||||
</div>
|
||||
<form @submit.prevent="validateForm">
|
||||
<q-card>
|
||||
<q-card bordered>
|
||||
<div class="q-pa-md">
|
||||
<div class="row col-12 q-gutter-sm">
|
||||
<div class="col-xs-12 col-sm-2">
|
||||
|
|
@ -383,6 +445,72 @@ onMounted(async () => {});
|
|||
@update:model-value="changeFormData()"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col-3">
|
||||
<q-input
|
||||
v-model="formData.disciplineType"
|
||||
dense
|
||||
outlined
|
||||
label="ประเภทวินัย"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<q-input
|
||||
v-model="formData.titleType"
|
||||
dense
|
||||
outlined
|
||||
label="ประเภทของเรื่อง"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<q-input
|
||||
v-model="formData.oc"
|
||||
dense
|
||||
outlined
|
||||
label="หน่วยงาน/ส่วนราชการ"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="formData.year"
|
||||
class="col-2"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:model-value="
|
||||
formData.year === 0
|
||||
? null
|
||||
: Number(formData.year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<q-separator />
|
||||
|
|
@ -409,5 +537,89 @@ onMounted(async () => {});
|
|||
/> -->
|
||||
</form>
|
||||
</div>
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
<div class="col-sm-12 col-md-3">
|
||||
<q-card bordered class="row col-12" style="border: 1px solid #d6dee1">
|
||||
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||
อัปโหลดไฟล์เอกสารหลักฐาน
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="col-12 q-pa-sm row">
|
||||
<q-file
|
||||
for="inputFiles"
|
||||
class="col-11"
|
||||
outlined
|
||||
dense
|
||||
v-model="formData.file"
|
||||
@added="uploadFile"
|
||||
label="ไฟล์เอกสารหลักฐาน"
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
accept=".pdf,.xlsx,.doc"
|
||||
clearable
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" color="primary" />
|
||||
</template>
|
||||
</q-file>
|
||||
|
||||
<div class="col-1 self-center text-center">
|
||||
<q-btn
|
||||
v-if="formData.file && isReadonly"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="uploadFile"
|
||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="formData.disciplineComplaint_Appeal_Docs.length > 0"
|
||||
class="col-xs-12 q-pa-sm row"
|
||||
>
|
||||
<q-list
|
||||
v-for="data in formData.disciplineComplaint_Appeal_Docs"
|
||||
:key="data.id"
|
||||
class="full-width"
|
||||
bordered
|
||||
separator
|
||||
>
|
||||
<q-item clickable v-ripple>
|
||||
<q-item-section>{{ data.fileName }}</q-item-section>
|
||||
<q-space />
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="blue"
|
||||
icon="mdi-download"
|
||||
@click="downloadFile(data.pathName)"
|
||||
><q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="red"
|
||||
class="q-ml-sm"
|
||||
icon="mdi-delete-outline"
|
||||
@click="deleteFile(data.id)"
|
||||
><q-tooltip>ลบไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
<div class="col-12 q-pa-sm" v-else>
|
||||
<q-card class="q-pa-md" bordered> ไม่มีรายการเอกสาร </q-card>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import type { MyObjectAppealRef,HistoryStatusType } from "@/modules/11_disciplin
|
|||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||
const mainStore = useDisciplineMainStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
/** รับ props มาจากหน้าหลัก */
|
||||
const props = defineProps({
|
||||
data: {
|
||||
|
|
@ -321,6 +322,7 @@ onMounted(() => {
|
|||
<div class="q-pa-md">
|
||||
<div class="q-gutter-y-sm">
|
||||
<div class="row q-gutter-x-sm">
|
||||
|
||||
<div class="col-3">
|
||||
<q-select
|
||||
ref="typeRef"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,18 @@
|
|||
interface FormData {
|
||||
resultDescription: string;
|
||||
disciplineType: string;
|
||||
titleType: string;
|
||||
oc: string;
|
||||
file: any
|
||||
disciplineComplaint_Appeal_Docs: [FileArray]
|
||||
year: number | null;
|
||||
}
|
||||
|
||||
interface FileArray {
|
||||
id:string
|
||||
fileName:string
|
||||
pathName:string
|
||||
}
|
||||
interface FormRef {
|
||||
resultDescription: object | null;
|
||||
[key: string]: any;
|
||||
|
|
@ -39,4 +50,4 @@ interface PersonType {
|
|||
posNo: string
|
||||
organization: string
|
||||
}
|
||||
export type { FormData, FormRef, DataOption, DataOptionRes, PersonType, DataListRow };
|
||||
export type { FormData, FormRef, DataOption, DataOptionRes, PersonType, DataListRow ,FileArray};
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ export const useInvestigateFactStore = defineStore(
|
|||
"investigationDetail",
|
||||
"dateInvestigate",
|
||||
"investigationStatusResult",
|
||||
"createdAt",
|
||||
"status",
|
||||
]);
|
||||
|
||||
|
|
@ -144,6 +145,17 @@ export const useInvestigateFactStore = defineStore(
|
|||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
align: "left",
|
||||
label: "วันที่สืบสวน",
|
||||
sortable: true,
|
||||
field: "createdAt",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "status",
|
||||
align: "left",
|
||||
|
|
@ -213,6 +225,7 @@ export const useInvestigateFactStore = defineStore(
|
|||
investigationStatusResult: mainStore.convertStatusResult(
|
||||
e.investigationStatusResult
|
||||
),
|
||||
createdAt: date2Thai(e.createdAt as Date),
|
||||
status: convertStatus(e.status),
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue