fix การทดลองปฏิบัติหน้าที่ราชการ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-01-24 17:24:19 +07:00
parent 122811b2cf
commit 144b4abea6
3 changed files with 16 additions and 2 deletions

View file

@ -98,4 +98,9 @@ export default {
//รายงาน
probationReport: `${report}`,
probationSurvey: `${probation}/survey/admin`,
//ราชชื่อเลือกผู้มีอำนาจออกคำสั่ง
probationCommanderDirector : `${orgProfile}/profile/commander-director-position`,
};

View file

@ -2,6 +2,7 @@
import { ref, watch } from "vue";
import { useQuasar } from "quasar";
import { useRoute } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
@ -11,12 +12,15 @@ import type { QTableProps } from "quasar";
import DialogHeader from "@/components/DialogHeader.vue";
const $q = useQuasar();
const route = useRoute();
const { showLoader, hideLoader, messageError } = useCounterMixin();
const modal = defineModel<boolean>("modal", { required: true }); //popup /
const emit = defineEmits(["update-authority"]);
const personalId = ref<string>(route.params.personalId.toString());
const selected = ref<any[]>([]);
const isAct = ref<boolean>(false);
const search = ref<string>("");
@ -106,12 +110,13 @@ function onCloseDialog() {
function fetchList() {
showLoader();
http
.post(config.API.commandDirector, {
.post(config.API.probationCommanderDirector, {
isDirector: true, // fix true
isAct: isAct.value,
keyword: search.value.trim(),
page: page.value,
pageSize: pageSize.value,
profileId: personalId.value,
})
.then((res) => {
const data = res.data.result;

View file

@ -158,6 +158,7 @@ async function fecthAssign() {
* @param id personal id
*/
const fecthResult = async (id: string) => {
showLoader();
const noNumber = props?.tab ? Number(props?.tab.charAt(4)) : "";
await http
.get(config.API.createformReport(id) + `&evaluate_no=${noNumber}`)
@ -184,7 +185,10 @@ const fecthResult = async (id: string) => {
changeReson52(Number(data.pass_result));
}
})
.catch((e) => {});
.catch((e) => {})
.finally(() => {
hideLoader();
});
};
/** เช็คก่อน save */