Merge branch 'develop' of https://github.com/Frappet/BMA-EHR-USER into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-12 16:12:59 +07:00
commit 01b550520e
5 changed files with 34 additions and 25 deletions

View file

@ -31,6 +31,10 @@ export const useAppealComplainStore = defineStore("appealComplainStore", () => {
{ id: "DONE", name: "ปิดคำร้อง" }, { id: "DONE", name: "ปิดคำร้อง" },
]); ]);
/**
*
* @param data API
*/
function fetchAppealComplain(data: MainList[]) { function fetchAppealComplain(data: MainList[]) {
let dataList: RowList[] = data.map((e: MainList) => ({ let dataList: RowList[] = data.map((e: MainList) => ({
id: e.id, id: e.id,
@ -49,7 +53,11 @@ export const useAppealComplainStore = defineStore("appealComplainStore", () => {
rows.value = dataList; rows.value = dataList;
} }
/**
* text
* @param val status
* @returns
*/
const typeConvert = (val: string) => { const typeConvert = (val: string) => {
switch (val) { switch (val) {
case "APPEAL": case "APPEAL":
@ -61,6 +69,11 @@ export const useAppealComplainStore = defineStore("appealComplainStore", () => {
} }
}; };
/**
* text
* @param val status
* @returns
*/
function statusTothai(val: string){ function statusTothai(val: string){
switch (val) { switch (val) {
case "NEW": case "NEW":

View file

@ -5,7 +5,6 @@ import { useRouter, useRoute } from "vue-router";
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
import type { QForm } from "quasar";
import Form from "@/modules/07_appealComplain/views/Form.vue"; import Form from "@/modules/07_appealComplain/views/Form.vue";
@ -20,6 +19,8 @@ const formProfile = reactive<any>({
fullname: "", fullname: "",
citizenId: "", citizenId: "",
}); });
/** ดึงข้อมูลจาก keycloak*/
function getProFile() { function getProFile() {
showLoader(); showLoader();
http http
@ -39,6 +40,11 @@ function getProFile() {
hideLoader(); hideLoader();
}); });
} }
/**
* นทกขอม
* @param data ฟอรมขอม
*/
function onSubmit(data: any) { function onSubmit(data: any) {
const formData = new FormData(); const formData = new FormData();
formData.append("profileId", data.profileId); formData.append("profileId", data.profileId);
@ -68,6 +74,7 @@ function onSubmit(data: any) {
hideLoader(); hideLoader();
}); });
} }
onMounted(() => { onMounted(() => {
getProFile(); getProFile();
}); });

View file

@ -6,7 +6,6 @@ import { useCounterMixin } from "@/stores/mixin";
import genReport from "@/plugins/genreport"; import genReport from "@/plugins/genreport";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
import type { QForm } from "quasar";
import type { import type {
EditDataList, EditDataList,
HistoryStatusType, HistoryStatusType,
@ -20,8 +19,7 @@ const route = useRoute();
const id = ref<string>(route.params.id as string); const id = ref<string>(route.params.id as string);
const $q = useQuasar(); const $q = useQuasar();
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const myform = ref<QForm | null>(null); const { messageError, showLoader, hideLoader } = mixin;
const { fails, success, messageError, showLoader, hideLoader } = mixin;
const historyStatusOb = reactive<HistoryStatusType>({ const historyStatusOb = reactive<HistoryStatusType>({
status: "", status: "",
@ -80,6 +78,9 @@ function getData() {
}); });
} }
/** /
* @param fileName อไฟล
*/
async function getReport(fileName: string) { async function getReport(fileName: string) {
showLoader(); showLoader();
await http await http

View file

@ -2,17 +2,13 @@
import { ref, reactive, defineProps, watch } from "vue"; import { ref, reactive, defineProps, watch } from "vue";
import { useAppealComplainStore } from "@/modules/07_appealComplain/store"; import { useAppealComplainStore } from "@/modules/07_appealComplain/store";
import { useCounterMixin } from "@/stores/mixin"; 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 { MyObjectAppealRef } from "@/modules/07_appealComplain/interface/request/appeal";
import type { import type {
EditDataList,
HistoryStatusType, HistoryStatusType,
FileObType, FileObType,
} from "@/modules/07_appealComplain/interface/response/mainType"; } from "@/modules/07_appealComplain/interface/response/mainType";
import http from "@/plugins/http";
import config from "@/app.config";
const $q = useQuasar(); const $q = useQuasar();
const isReadOnly = ref<boolean>(false); const isReadOnly = ref<boolean>(false);
@ -135,13 +131,6 @@ watch(props.data, () => {
formData.disciplineComplaint_Appeal_Docs = formData.disciplineComplaint_Appeal_Docs =
props.data.disciplineComplaint_Appeal_Docs; props.data.disciplineComplaint_Appeal_Docs;
formData.historyStatus = props.data.historyStatus; formData.historyStatus = props.data.historyStatus;
// dataStore.getRow([
// {
// profileId: props.data.profileId,
// fullname: props.data.fullname,
// citizenId: props.data.citizenId,
// },
// ]);
}); });
function inputEdit(val: boolean) { function inputEdit(val: boolean) {

View file

@ -10,7 +10,6 @@ import { useAppealComplainStore } from "@/modules/07_appealComplain/store";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
import Table from "@/components/Table.vue";
import type { FormType } from "@/modules/07_appealComplain/interface/response/mainType"; import type { FormType } from "@/modules/07_appealComplain/interface/response/mainType";
import type { DataOption } from "@/modules/07_appealComplain/interface/index/main"; 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(`/`); router.push(`/`);
}; };
/** ดึงข้อมูลเมื่อมีการปรับฟิลเตอร์ */
function dataUpdate() { function dataUpdate() {
getData(); getData();
} }
/** ดึงข้อมูลจาก keyword*/
function filterFn() { function filterFn() {
getData(); getData();
} }
@ -227,9 +221,14 @@ watch(
} }
); );
/**
* เปดหนาแกไข
* @param id id ของ คคล
*/
function editPage(id: string) { function editPage(id: string) {
router.push(`/appeal-complain/${id}`); router.push(`/appeal-complain/${id}`);
} }
function redirectToPageadd() { function redirectToPageadd() {
// dataStore.rowsAdd = [] // dataStore.rowsAdd = []
router.push(`/appeal-complain/add`); router.push(`/appeal-complain/add`);