fix ระบบพัฒนาบุคคล
This commit is contained in:
parent
74981c4217
commit
247989c9e8
7 changed files with 2387 additions and 2369 deletions
|
|
@ -60,9 +60,9 @@ function getClass() {
|
|||
}
|
||||
|
||||
/** ดึงข้อมูล */
|
||||
function fetchData() {
|
||||
async function fetchData() {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.developmentHistoryListByid("officer", id.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
|
|
@ -104,9 +104,9 @@ function fetchData() {
|
|||
}
|
||||
|
||||
/** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
if (id.value) {
|
||||
fetchData();
|
||||
await fetchData();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
@ -232,7 +232,11 @@ onMounted(() => {
|
|||
</div>
|
||||
|
||||
<div class="col-12 col-sm-12 col-md-7">
|
||||
{{ Number(formMainProject.year) + 543 ?? "-" }}
|
||||
{{
|
||||
formMainProject.year
|
||||
? Number(formMainProject.year) + 543
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row col-12">
|
||||
|
|
|
|||
|
|
@ -254,7 +254,6 @@ watch(
|
|||
:options="govOp"
|
||||
map-options
|
||||
emit-value
|
||||
:class="getClass()"
|
||||
@update:model-value="inputSearch = ''"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -264,7 +263,6 @@ watch(
|
|||
outlined
|
||||
label="ค้นหา"
|
||||
v-model="inputSearch"
|
||||
:class="getClass()"
|
||||
:mask="search === 'citizenId' ? '#############' : undefined"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -274,7 +272,7 @@ watch(
|
|||
class="full-width full-height"
|
||||
unelevated
|
||||
color="teal"
|
||||
@click="searchFilter()"
|
||||
@click="(formFilter.page = 1), searchFilter()"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -235,7 +235,11 @@ onMounted(() => {
|
|||
</div>
|
||||
|
||||
<div class="col-12 col-sm-12 col-md-7">
|
||||
{{ Number(formMainProject.year) + 543 ?? "-" }}
|
||||
{{
|
||||
formMainProject.year
|
||||
? Number(formMainProject.year) + 543
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row col-12">
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -134,12 +134,13 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
|
||||
/** ดึงข้อมูลหน่วยงาน เเละ เรียกใช้ฟังชั่น ดึงข้อมูล */
|
||||
function fetchListOrg() {
|
||||
async function fetchListOrg() {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.developmentHistoryListOrg("employee", formFilter.year))
|
||||
.then(async (res) => {
|
||||
formFilter.root = null;
|
||||
formFilter.page = 1;
|
||||
rows.value = [];
|
||||
const option = [{ name: "ทั้งหมด", id: null }];
|
||||
const optionNew = await res.data.result.map((e: string) => ({
|
||||
|
|
@ -192,9 +193,9 @@ function onEdit(id: string) {
|
|||
}
|
||||
|
||||
/** ดึงข้อมูล */
|
||||
function getData() {
|
||||
async function getData() {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.post(config.API.developmentHistoryList("employee"), formFilter)
|
||||
.then((res) => {
|
||||
const data = res.data.result.data;
|
||||
|
|
@ -241,8 +242,8 @@ watch(
|
|||
);
|
||||
|
||||
/** ดึงข้อมูลเมื่อโหลดหน้าเสร็จสิ้น */
|
||||
onMounted(() => {
|
||||
fetchListOrg();
|
||||
onMounted(async () => {
|
||||
await fetchListOrg();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -387,7 +388,6 @@ onMounted(() => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -167,10 +167,12 @@ function fetchListOrg() {
|
|||
}));
|
||||
option.push(...optionNew);
|
||||
agencyOp.value = option;
|
||||
getData();
|
||||
await getData();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
@ -178,9 +180,9 @@ function fetchListOrg() {
|
|||
/**
|
||||
* function เรียกข้อมูลรายการประวัติการฝึกอบรม/ดูงานของข้าราชการกรุงเทพมหานครสามัญ
|
||||
*/
|
||||
function getData() {
|
||||
async function getData() {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.post(config.API.developmentHistoryList("officer"), formFilter)
|
||||
.then((res) => {
|
||||
const data = res.data.result.data;
|
||||
|
|
@ -217,10 +219,9 @@ function onDownload(type: string) {
|
|||
year: formFilter.year,
|
||||
root: formFilter.root,
|
||||
})
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
|
||||
genReportXLSX(
|
||||
.then(async (res) => {
|
||||
const dataList = await res.data.result;
|
||||
await genReportXLSX(
|
||||
dataList,
|
||||
"รายการประวัติการฝึกอบรม/ดูงานของข้าราชการกรุงเทพมหานครสามัญ",
|
||||
type
|
||||
|
|
@ -408,7 +409,6 @@ onMounted(() => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import genReportXLSX from "@/plugins/genreportxlsx";
|
|||
|
||||
import type {
|
||||
DataOption,
|
||||
ItemsDownload,
|
||||
NewPagination,
|
||||
} from "@/modules/15_development/interface/index/Main";
|
||||
import type { ListSholarship } from "@/modules/15_development/interface/response/Scholarship";
|
||||
|
|
@ -327,7 +326,6 @@ onMounted(() => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue