เพิ่มประเภททุน ปรับ ui
This commit is contained in:
parent
12c255e82f
commit
43f4cecf7f
2 changed files with 85 additions and 66 deletions
|
|
@ -16,7 +16,7 @@ const router = useRouter();
|
|||
const $q = useQuasar();
|
||||
const filterKeyword = ref<string>("");
|
||||
|
||||
const profilId = ref<string>('')
|
||||
const profilId = ref<string>("");
|
||||
const currentPage = ref<number>(1);
|
||||
const maxPage = ref<number>(1);
|
||||
const page = ref<number>(1);
|
||||
|
|
@ -26,21 +26,22 @@ const rows = ref<any>();
|
|||
const year = ref<number>(0);
|
||||
const type = ref<string>("DOMESTICE");
|
||||
const scholarshipTypeOp = ref<DataOptions[]>([
|
||||
{
|
||||
id: "DOMESTICE",
|
||||
name: "การศึกษาในประเทศ",
|
||||
},
|
||||
{ id: "DOMESTICE", name: "การศึกษาในประเทศ" },
|
||||
{
|
||||
id: "NOABROAD",
|
||||
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)",
|
||||
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)",
|
||||
},
|
||||
{
|
||||
id: "ABROAD",
|
||||
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)",
|
||||
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)",
|
||||
},
|
||||
{
|
||||
id: "EXECUTIVE",
|
||||
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร)",
|
||||
name: " ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรประเภทนักบริหาร)",
|
||||
},
|
||||
{
|
||||
id: "RESEARCH",
|
||||
name: "ศึกษา ฝึกอบรม ประชุม ดูงาน และปฏิบัติการวิจัย ณ ต่างประเทศ",
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
@ -79,16 +80,14 @@ const visibleColumns = ref<string[]>(["scholarshipYear", "scholarshipType"]);
|
|||
/** ดึงข้อมูล */
|
||||
function getData() {
|
||||
http
|
||||
.get(config.API.developmentScholarship+`/user/${profilId.value}`)
|
||||
.then((res)=>{
|
||||
rows.value = res.data.result
|
||||
}).catch((e)=>{
|
||||
messageError($q,e)
|
||||
}).finally(()=>{
|
||||
|
||||
})
|
||||
|
||||
|
||||
.get(config.API.developmentScholarship + `/user/${profilId.value}`)
|
||||
.then((res) => {
|
||||
rows.value = res.data.result;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
}
|
||||
|
||||
function onEdit(id: string) {
|
||||
|
|
@ -117,8 +116,8 @@ function getProfileId() {
|
|||
http
|
||||
.get(config.API.profilePosition())
|
||||
.then((res) => {
|
||||
profilId.value = res.data.result.profileId
|
||||
getData()
|
||||
profilId.value = res.data.result.profileId;
|
||||
getData();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -129,17 +128,17 @@ function getProfileId() {
|
|||
}
|
||||
|
||||
function convertType(val: string) {
|
||||
switch (val) {
|
||||
case "DOMESTICE":
|
||||
return "การศึกษาในประเทศ";
|
||||
case "NOABROAD":
|
||||
return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)";
|
||||
case "ABROAD":
|
||||
return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)";
|
||||
case "EXECUTIVE":
|
||||
return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร)";
|
||||
}
|
||||
switch (val) {
|
||||
case "DOMESTICE":
|
||||
return "การศึกษาในประเทศ";
|
||||
case "NOABROAD":
|
||||
return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)";
|
||||
case "ABROAD":
|
||||
return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)";
|
||||
case "EXECUTIVE":
|
||||
return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร)";
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
getProfileId();
|
||||
|
|
@ -299,7 +298,7 @@ onMounted(async () => {
|
|||
{{ col.value ? col.value + 543 : "-" }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'scholarshipType'">
|
||||
{{ col.value ? convertType(col.value): "-" }}
|
||||
{{ col.value ? convertType(col.value) : "-" }}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue