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: "ปิดคำร้อง" },
]);
/**
*
* @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":

View file

@ -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();
});

View file

@ -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

View file

@ -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) {

View file

@ -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`);