fix
This commit is contained in:
parent
3736aa7e80
commit
cedcbb0eaa
8 changed files with 102 additions and 111 deletions
|
|
@ -9,13 +9,13 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||
|
||||
import type { ArrayPersonAdd } from "../../interface/response/Investigate";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
||||
import type { ArrayPersonAdd } from "../../interface/response/investigate";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
import type {
|
||||
FormData as FormDataComplaint,
|
||||
ArrayPerson,
|
||||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/Complaint";
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
|
||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||
|
|
@ -153,9 +153,9 @@ async function getDataComplaint() {
|
|||
}
|
||||
|
||||
/** ดึงข้อมูลรายละเอียด */
|
||||
function getData() {
|
||||
async function getData() {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(
|
||||
config.API.investigateByGetId(
|
||||
id.value,
|
||||
|
|
@ -206,14 +206,12 @@ function getData() {
|
|||
* @param id ระบุ บุคคล
|
||||
*/
|
||||
async function onSubmit(data: any) {
|
||||
// put
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.investigateById(id.value), data)
|
||||
.then(async (res) => {
|
||||
.then(async () => {
|
||||
await getData();
|
||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
// router.push(`/discipline/complaints`);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -245,7 +243,7 @@ function sentConfirmNoPerson() {
|
|||
.put(config.API.investigateApprove(id.value), {
|
||||
persons: [],
|
||||
})
|
||||
.then((res) => {
|
||||
.then(() => {
|
||||
getData();
|
||||
router.push(`/discipline/investigatefacts`);
|
||||
})
|
||||
|
|
@ -344,10 +342,11 @@ watch(
|
|||
);
|
||||
|
||||
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
|
||||
onMounted(() => {
|
||||
getData();
|
||||
onMounted(async () => {
|
||||
if (store.tabMenu == "complaints") {
|
||||
getDataComplaint();
|
||||
await Promise.all([getData(), getDataComplaint()]);
|
||||
} else {
|
||||
getData();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
@ -424,18 +423,19 @@ onMounted(() => {
|
|||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-card>
|
||||
|
||||
<PopupSendToNext
|
||||
:modal="modalPopup"
|
||||
:close="closePopup"
|
||||
title="ส่งไปสอบสวน"
|
||||
:rows="mainStore.rowsSend.filter((item: ArrayPersonAdd)=> item.isSend == 'NEW')"
|
||||
:columns="mainStore.columnsDirector"
|
||||
:visible-columns="mainStore.visibleColumnsDirector"
|
||||
@return-person="emitPerson"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<PopupSendToNext
|
||||
:modal="modalPopup"
|
||||
:close="closePopup"
|
||||
title="ส่งไปสอบสวน"
|
||||
:rows="mainStore.rowsSend.filter((item: ArrayPersonAdd)=> item.isSend == 'NEW')"
|
||||
:columns="mainStore.columnsDirector"
|
||||
:visible-columns="mainStore.visibleColumnsDirector"
|
||||
@return-person="emitPerson"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.q-tab-panel {
|
||||
padding: 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue