clear code + comment
This commit is contained in:
parent
a9609d2d7f
commit
ac70090e22
19 changed files with 231 additions and 166 deletions
|
|
@ -70,6 +70,8 @@ const notFound = ref<string>("ไม่พบข้อมูลที่ค้
|
|||
const noData = ref<string>("ไม่มีข้อมูล");
|
||||
const expanded = ref<Array<string | null>>([]);
|
||||
const expanded2 = ref<Array<string | null>>([]);
|
||||
|
||||
/** ดึงข้อมูลทั้งหมด */
|
||||
function fetchData() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -129,6 +131,7 @@ function fetchData() {
|
|||
});
|
||||
}
|
||||
|
||||
/** ดึงข้อมูล ยุทธศาสตร์/แผน */
|
||||
function fetchTree() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -145,6 +148,7 @@ function fetchTree() {
|
|||
});
|
||||
}
|
||||
|
||||
/** Main save */
|
||||
async function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
|
|
@ -161,6 +165,11 @@ async function onSubmit() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* update data
|
||||
* @param data ข้อมูลยุทธศาสตร์/แผน
|
||||
* @param type 1/2 เพื่อเเยก ยุทธศาสตร์1 ยุทธศาสตร์2
|
||||
*/
|
||||
function updateSelected(data: DataStrategic, type: string) {
|
||||
if (type === "1") {
|
||||
formData.strategyChildPlannedId = data.id;
|
||||
|
|
@ -171,6 +180,7 @@ function updateSelected(data: DataStrategic, type: string) {
|
|||
}
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
fetchTree();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue