Merge branch 'develop' of https://github.com/Frappet/BMA-EHR-USER into develop
This commit is contained in:
commit
01b550520e
5 changed files with 34 additions and 25 deletions
|
|
@ -31,6 +31,10 @@ export const useAppealComplainStore = defineStore("appealComplainStore", () => {
|
|||
{ id: "DONE", name: "ปิดคำร้อง" },
|
||||
]);
|
||||
|
||||
/**
|
||||
* จัดข้อมูลที่ได้รับมา
|
||||
* @param data ข้อมูลจาก API
|
||||
*/
|
||||
function fetchAppealComplain(data: MainList[]) {
|
||||
let dataList: RowList[] = data.map((e: MainList) => ({
|
||||
id: e.id,
|
||||
|
|
@ -49,7 +53,11 @@ export const useAppealComplainStore = defineStore("appealComplainStore", () => {
|
|||
rows.value = dataList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* แปลงข้อมูลที่รับมา เป็น text
|
||||
* @param val status
|
||||
* @returns ส่งค่าที่แปลง ออกไป
|
||||
*/
|
||||
const typeConvert = (val: string) => {
|
||||
switch (val) {
|
||||
case "APPEAL":
|
||||
|
|
@ -61,6 +69,11 @@ export const useAppealComplainStore = defineStore("appealComplainStore", () => {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* แปลงข้อมูลที่รับมา เป็น text
|
||||
* @param val status
|
||||
* @returns ส่งค่าที่แปลง ออกไป
|
||||
*/
|
||||
function statusTothai(val: string){
|
||||
switch (val) {
|
||||
case "NEW":
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import { useRouter, useRoute } from "vue-router";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import type { QForm } from "quasar";
|
||||
|
||||
import Form from "@/modules/07_appealComplain/views/Form.vue";
|
||||
|
||||
|
|
@ -20,6 +19,8 @@ const formProfile = reactive<any>({
|
|||
fullname: "",
|
||||
citizenId: "",
|
||||
});
|
||||
|
||||
/** ดึงข้อมูลจาก keycloak*/
|
||||
function getProFile() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -39,6 +40,11 @@ function getProFile() {
|
|||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* บันทึกข้อมูล
|
||||
* @param data ฟอร์มข้อมูล
|
||||
*/
|
||||
function onSubmit(data: any) {
|
||||
const formData = new FormData();
|
||||
formData.append("profileId", data.profileId);
|
||||
|
|
@ -68,6 +74,7 @@ function onSubmit(data: any) {
|
|||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getProFile();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import genReport from "@/plugins/genreport";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import type { QForm } from "quasar";
|
||||
import type {
|
||||
EditDataList,
|
||||
HistoryStatusType,
|
||||
|
|
@ -20,8 +19,7 @@ const route = useRoute();
|
|||
const id = ref<string>(route.params.id as string);
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const myform = ref<QForm | null>(null);
|
||||
const { fails, success, messageError, showLoader, hideLoader } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
|
||||
const historyStatusOb = reactive<HistoryStatusType>({
|
||||
status: "",
|
||||
|
|
@ -80,6 +78,9 @@ function getData() {
|
|||
});
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลหน้า แก้ไขอุทธรณ์/ร้องทุกข์
|
||||
* @param fileName ชื่อไฟล์
|
||||
*/
|
||||
async function getReport(fileName: string) {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
|
|||
|
|
@ -2,17 +2,13 @@
|
|||
import { ref, reactive, defineProps, watch } from "vue";
|
||||
import { useAppealComplainStore } from "@/modules/07_appealComplain/store";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { is, useQuasar } from "quasar";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { MyObjectAppealRef } from "@/modules/07_appealComplain/interface/request/appeal";
|
||||
import type {
|
||||
EditDataList,
|
||||
HistoryStatusType,
|
||||
FileObType,
|
||||
} from "@/modules/07_appealComplain/interface/response/mainType";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
const $q = useQuasar();
|
||||
|
||||
const isReadOnly = ref<boolean>(false);
|
||||
|
|
@ -135,13 +131,6 @@ watch(props.data, () => {
|
|||
formData.disciplineComplaint_Appeal_Docs =
|
||||
props.data.disciplineComplaint_Appeal_Docs;
|
||||
formData.historyStatus = props.data.historyStatus;
|
||||
// dataStore.getRow([
|
||||
// {
|
||||
// profileId: props.data.profileId,
|
||||
// fullname: props.data.fullname,
|
||||
// citizenId: props.data.citizenId,
|
||||
// },
|
||||
// ]);
|
||||
});
|
||||
|
||||
function inputEdit(val: boolean) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import { useAppealComplainStore } from "@/modules/07_appealComplain/store";
|
|||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import Table from "@/components/Table.vue";
|
||||
|
||||
import type { FormType } from "@/modules/07_appealComplain/interface/response/mainType";
|
||||
import type { DataOption } from "@/modules/07_appealComplain/interface/index/main";
|
||||
|
|
@ -188,13 +187,6 @@ const getData = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นกดเพิ่มไปหน้าเพิ่ม
|
||||
*/
|
||||
const clickAdd = async () => {
|
||||
router.push(`/appeal-complain/add`);
|
||||
};
|
||||
|
||||
/**
|
||||
* กดเพื่อย้อนกลับ
|
||||
*/
|
||||
|
|
@ -202,10 +194,12 @@ const clickBack = () => {
|
|||
router.push(`/`);
|
||||
};
|
||||
|
||||
/** ดึงข้อมูลเมื่อมีการปรับฟิลเตอร์ */
|
||||
function dataUpdate() {
|
||||
getData();
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลจาก keyword*/
|
||||
function filterFn() {
|
||||
getData();
|
||||
}
|
||||
|
|
@ -227,9 +221,14 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* เปิดหน้าแก้ไข
|
||||
* @param id id ของ บุคคล
|
||||
*/
|
||||
function editPage(id: string) {
|
||||
router.push(`/appeal-complain/${id}`);
|
||||
}
|
||||
|
||||
function redirectToPageadd() {
|
||||
// dataStore.rowsAdd = []
|
||||
router.push(`/appeal-complain/add`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue