เพิ่มประเภททุน ปรับ ui
This commit is contained in:
parent
12c255e82f
commit
43f4cecf7f
2 changed files with 85 additions and 66 deletions
|
|
@ -103,15 +103,19 @@ const scholarshipTypeOp = ref<DataOptions[]>([
|
||||||
{ id: "DOMESTICE", name: "การศึกษาในประเทศ" },
|
{ id: "DOMESTICE", name: "การศึกษาในประเทศ" },
|
||||||
{
|
{
|
||||||
id: "NOABROAD",
|
id: "NOABROAD",
|
||||||
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)",
|
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "ABROAD",
|
id: "ABROAD",
|
||||||
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)",
|
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "EXECUTIVE",
|
id: "EXECUTIVE",
|
||||||
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร)",
|
name: " ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรประเภทนักบริหาร)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "RESEARCH",
|
||||||
|
name: "ศึกษา ฝึกอบรม ประชุม ดูงาน และปฏิบัติการวิจัย ณ ต่างประเทศ",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -288,8 +292,8 @@ async function clickUpload(file: any) {
|
||||||
await http
|
await http
|
||||||
.post(
|
.post(
|
||||||
config.API.developmentSalaryFile(
|
config.API.developmentSalaryFile(
|
||||||
"ระบบพัฒนาบุคคล",
|
"พัฒนาบุคคล",
|
||||||
"ฟอร์มรายงานตัวกลับเข้ารับราชการ",
|
"ฟอร์มรายงานตัวกลับ",
|
||||||
id.value
|
id.value
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
|
|
@ -346,17 +350,16 @@ function getFile() {
|
||||||
http
|
http
|
||||||
.get(
|
.get(
|
||||||
config.API.developmentSalaryFile(
|
config.API.developmentSalaryFile(
|
||||||
"ระบบพัฒนาบุคคล",
|
"พัฒนาบุคคล",
|
||||||
"ฟอร์มรายงานตัวกลับเข้ารับราชการ",
|
"ฟอร์มรายงานตัวกลับ",
|
||||||
id.value
|
id.value
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const dataFile = res.data;
|
if (res) {
|
||||||
fileList.value = dataFile[0];
|
const dataFile = res.data;
|
||||||
})
|
fileList.value = dataFile[0];
|
||||||
.catch((e) => {
|
}
|
||||||
messageError($q, e);
|
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {});
|
||||||
}
|
}
|
||||||
|
|
@ -409,26 +412,41 @@ onMounted(async () => {
|
||||||
<div class="row q-col-gutter-x-sm full-width">
|
<div class="row q-col-gutter-x-sm full-width">
|
||||||
<div class="col-2 q-pa-none">
|
<div class="col-2 q-pa-none">
|
||||||
<q-btn
|
<q-btn
|
||||||
class="full-width"
|
flat
|
||||||
|
icon="mdi-dots-vertical"
|
||||||
|
color="grey-8"
|
||||||
|
for="#cancel"
|
||||||
|
dense
|
||||||
|
round
|
||||||
unelevated
|
unelevated
|
||||||
color="edit"
|
|
||||||
label="แก้ไขข้อมูลรายงานตัวกลับเข้ารับราชการ"
|
|
||||||
@click="onOpenReturn"
|
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูลรายงานตัวกลับเข้ารับราชการ</q-tooltip>
|
<q-menu>
|
||||||
</q-btn>
|
<q-list>
|
||||||
</div>
|
<q-item clickable v-close-popup @click="onOpenReturn">
|
||||||
<div class="col-2">
|
<q-item-section>
|
||||||
<q-btn
|
<q-item-label>
|
||||||
class="full-width"
|
<q-icon name="edit" color="edit" size="18px" />
|
||||||
unelevated
|
แก้ไขข้อมูลรายงานตัวกลับเข้ารับราชการ
|
||||||
color="primary"
|
</q-item-label>
|
||||||
label="ดาวน์โหลดฟอร์มต้นแบบ"
|
</q-item-section>
|
||||||
@click="onDownload"
|
</q-item>
|
||||||
>
|
<q-item clickable v-close-popup @click="onDownload">
|
||||||
<q-tooltip>ดาวน์โหลดฟอร์มต้นแบบ</q-tooltip>
|
<q-item-section>
|
||||||
|
<q-item-label>
|
||||||
|
<q-icon
|
||||||
|
name="download"
|
||||||
|
color="primary"
|
||||||
|
size="18px"
|
||||||
|
/>
|
||||||
|
ดาวน์โหลดฟอร์มต้นแบบ
|
||||||
|
</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
</q-menu>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<div v-if="fileList == null" class="col-3">
|
<div v-if="fileList == null" class="col-3">
|
||||||
<q-file
|
<q-file
|
||||||
|
|
@ -460,16 +478,18 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</q-file>
|
</q-file>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="col-2">
|
<div v-else class="col-2 text-right">
|
||||||
<q-btn
|
<q-btn
|
||||||
color="primary"
|
size="12px"
|
||||||
class="full-width"
|
flat
|
||||||
label="ดาวน์โหลดไฟล์เอกสาร"
|
round
|
||||||
unelevated
|
dense
|
||||||
|
color="blue"
|
||||||
|
icon="mdi-download"
|
||||||
@click="downloadFile(fileList)"
|
@click="downloadFile(fileList)"
|
||||||
>
|
>
|
||||||
<q-tooltip>ดาวน์โหลดไฟล์เอกสาร</q-tooltip>
|
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip></q-btn
|
||||||
</q-btn>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const router = useRouter();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
|
|
||||||
const profilId = ref<string>('')
|
const profilId = ref<string>("");
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
|
|
@ -26,21 +26,22 @@ const rows = ref<any>();
|
||||||
const year = ref<number>(0);
|
const year = ref<number>(0);
|
||||||
const type = ref<string>("DOMESTICE");
|
const type = ref<string>("DOMESTICE");
|
||||||
const scholarshipTypeOp = ref<DataOptions[]>([
|
const scholarshipTypeOp = ref<DataOptions[]>([
|
||||||
{
|
{ id: "DOMESTICE", name: "การศึกษาในประเทศ" },
|
||||||
id: "DOMESTICE",
|
|
||||||
name: "การศึกษาในประเทศ",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: "NOABROAD",
|
id: "NOABROAD",
|
||||||
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)",
|
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "ABROAD",
|
id: "ABROAD",
|
||||||
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)",
|
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "EXECUTIVE",
|
id: "EXECUTIVE",
|
||||||
name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร)",
|
name: " ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรประเภทนักบริหาร)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "RESEARCH",
|
||||||
|
name: "ศึกษา ฝึกอบรม ประชุม ดูงาน และปฏิบัติการวิจัย ณ ต่างประเทศ",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -79,16 +80,14 @@ const visibleColumns = ref<string[]>(["scholarshipYear", "scholarshipType"]);
|
||||||
/** ดึงข้อมูล */
|
/** ดึงข้อมูล */
|
||||||
function getData() {
|
function getData() {
|
||||||
http
|
http
|
||||||
.get(config.API.developmentScholarship+`/user/${profilId.value}`)
|
.get(config.API.developmentScholarship + `/user/${profilId.value}`)
|
||||||
.then((res)=>{
|
.then((res) => {
|
||||||
rows.value = res.data.result
|
rows.value = res.data.result;
|
||||||
}).catch((e)=>{
|
})
|
||||||
messageError($q,e)
|
.catch((e) => {
|
||||||
}).finally(()=>{
|
messageError($q, e);
|
||||||
|
})
|
||||||
})
|
.finally(() => {});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onEdit(id: string) {
|
function onEdit(id: string) {
|
||||||
|
|
@ -117,8 +116,8 @@ function getProfileId() {
|
||||||
http
|
http
|
||||||
.get(config.API.profilePosition())
|
.get(config.API.profilePosition())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
profilId.value = res.data.result.profileId
|
profilId.value = res.data.result.profileId;
|
||||||
getData()
|
getData();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -129,17 +128,17 @@ function getProfileId() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertType(val: string) {
|
function convertType(val: string) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "DOMESTICE":
|
case "DOMESTICE":
|
||||||
return "การศึกษาในประเทศ";
|
return "การศึกษาในประเทศ";
|
||||||
case "NOABROAD":
|
case "NOABROAD":
|
||||||
return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)";
|
return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)";
|
||||||
case "ABROAD":
|
case "ABROAD":
|
||||||
return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)";
|
return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)";
|
||||||
case "EXECUTIVE":
|
case "EXECUTIVE":
|
||||||
return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร)";
|
return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร)";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getProfileId();
|
getProfileId();
|
||||||
|
|
@ -299,7 +298,7 @@ onMounted(async () => {
|
||||||
{{ col.value ? col.value + 543 : "-" }}
|
{{ col.value ? col.value + 543 : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'scholarshipType'">
|
<div v-else-if="col.name == 'scholarshipType'">
|
||||||
{{ col.value ? convertType(col.value): "-" }}
|
{{ col.value ? convertType(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue