ระบบพัฒนาในเมนูโครงการ ตอนบันทึกผลเพิ่มส่งข้อมูล IDP ลงทะเบียนประวัติ ==> API
This commit is contained in:
parent
b059e3a770
commit
efad04ba6f
2 changed files with 20 additions and 43 deletions
|
|
@ -8,23 +8,14 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import type { QTableProps } from "quasar";
|
||||
import type { ResRecord } from "@/modules/15_development/interface/response/Main";
|
||||
|
||||
/**
|
||||
* usec
|
||||
*/
|
||||
const route = useRoute();
|
||||
const $q = useQuasar();
|
||||
const id = ref<string>(route.params.id.toString());
|
||||
const { date2Thai } = useCounterMixin();
|
||||
|
||||
/**
|
||||
* prosp
|
||||
*/
|
||||
//prosp
|
||||
const isProfile = defineModel<boolean>("isProfile", { required: true });
|
||||
const listPerson = defineModel<ResRecord[]>("listPerson", { required: true });
|
||||
|
||||
/**
|
||||
* ข้อมุล Table
|
||||
*/
|
||||
//ข้อมุล Table
|
||||
const keyword = ref<string>("");
|
||||
const rows = ref<ResRecord[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -231,9 +222,7 @@ function formBmaofficer(val: string) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* function เรียกข้อมูลโครงการ
|
||||
*/
|
||||
/** function เรียกข้อมูลโครงการ*/
|
||||
function fetchDataProject() {
|
||||
rows.value = listPerson.value.filter(
|
||||
(e: ResRecord) => e.isProfile === isProfile.value
|
||||
|
|
|
|||
|
|
@ -13,9 +13,6 @@ import type { ResRecord } from "@/modules/15_development/interface/response/Main
|
|||
import Record from "@/modules/15_development/components/Record.vue";
|
||||
import DialogRecordPerson from "@/modules/15_development/components/DialogRecordPerson.vue";
|
||||
|
||||
/**
|
||||
* use
|
||||
*/
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
|
@ -23,9 +20,7 @@ const store = useDevelopmentDataStore();
|
|||
const { showLoader, hideLoader, messageError, dialogConfirm, success } =
|
||||
useCounterMixin();
|
||||
|
||||
/**
|
||||
* ตัวแปร
|
||||
*/
|
||||
//ตัวแปร
|
||||
const projectId = ref<string>(route.params.id.toLocaleString()); //id route
|
||||
const tab = ref<string>("IN"); //tab
|
||||
const title = ref<string>(""); // หัวข้อ
|
||||
|
|
@ -54,9 +49,7 @@ async function fetchData(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function เรียกข้อมูลรายชื่อทั้งหมด
|
||||
*/
|
||||
/** function เรียกข้อมูลรายชื่อทั้งหมด*/
|
||||
async function fetchDataProject() {
|
||||
isLoadPage.value = false;
|
||||
showLoader();
|
||||
|
|
@ -103,9 +96,7 @@ function clickUpload(file: any) {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* function ส่งไปบันทึกที่ทะเบียนประวัติ
|
||||
*/
|
||||
/** function ส่งไปบันทึกที่ทะเบียนประวัติ*/
|
||||
function sendRecordRegistry() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
@ -127,33 +118,29 @@ function sendRecordRegistry() {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* function ส่งข้อมูลการพัฒนารายบุคคลไปบันทึกที่ทะเบียนประวัติ
|
||||
*/
|
||||
/** function ส่งข้อมูลการพัฒนารายบุคคลไปบันทึกที่ทะเบียนประวัติ (IDP)*/
|
||||
function sendDevalopRegistry() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
// showLoader();
|
||||
// http
|
||||
// .get(config.API.developmentMainTab("tab6/done", projectId.value))
|
||||
// .then(async () => {
|
||||
// await fetchDataProject();
|
||||
// await success($q, "ส่งข้อมูลสำเร็จ");
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// hideLoader();
|
||||
// });
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.developmentMainTab("tab6/done-idp", projectId.value))
|
||||
.then(async () => {
|
||||
await fetchDataProject();
|
||||
await success($q, "ส่งข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
hideLoader();
|
||||
});
|
||||
},
|
||||
"ยืนยันการส่งข้อมูลการพัฒนารายบุคคลไปบันทึกที่ทะเบียนประวัติ",
|
||||
"ต้องการยืนยันการส่งข้อมูลการพัฒนารายบุคคลไปบันทึกที่ทะเบียนประวัติหรือไม่"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* function ดาวน์โหลดไฟล์ต้นแบบ
|
||||
*/
|
||||
/** function ดาวน์โหลดไฟล์ต้นแบบ*/
|
||||
function downloadFile() {
|
||||
const link = document.createElement("a");
|
||||
link.href = `${window.location.protocol}//${window.location.host}/default-บันทึกผล.xlsx`;
|
||||
|
|
@ -232,6 +219,7 @@ onMounted(() => {
|
|||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="listPerson.length > 0"
|
||||
size="md"
|
||||
icon="mdi-clipboard-account-outline"
|
||||
round
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue