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}`, probationReport: `${report}`,
probationSurvey: `${probation}/survey/admin`, probationSurvey: `${probation}/survey/admin`,
//ราชชื่อเลือกผู้มีอำนาจออกคำสั่ง
probationCommanderDirector : `${orgProfile}/profile/commander-director-position`,
}; };

View file

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

View file

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