Merge branch 'develop' into devTee
# Conflicts: # src/modules/15_development/views/EmployeeHistory.vue # src/modules/15_development/views/History.vue
This commit is contained in:
commit
025b1e538e
140 changed files with 3102 additions and 2938 deletions
|
|
@ -205,9 +205,10 @@ async function clickUpload(file: any) {
|
|||
formData.append("file", selectedFile);
|
||||
await http
|
||||
.post(config.API.developmentMainTab("tab6", id.value), formData)
|
||||
.then((res) => {
|
||||
.then(() => {
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
getData();
|
||||
files.value = null;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -365,8 +366,13 @@ onMounted(() => {
|
|||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-if="props.row.isDone">
|
||||
<q-icon name="mdi-check" color="green" size="xs">
|
||||
<q-td>
|
||||
<q-icon
|
||||
name="mdi-check"
|
||||
color="green"
|
||||
size="xs"
|
||||
v-if="props.row.isDone"
|
||||
>
|
||||
<q-tooltip>ส่งไปบันทึกที่ทะเบียนประวัติแล้ว</q-tooltip>
|
||||
</q-icon>
|
||||
</q-td>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@ import config from "@/app.config";
|
|||
import genReportXLSX from "@/plugins/genreportxlsx";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import type { NewPagination } from "@/modules/15_development/interface/index/Main";
|
||||
import type {
|
||||
NewPagination,
|
||||
ItemsMenu,
|
||||
} from "@/modules/15_development/interface/index/Main";
|
||||
|
||||
/** importStore*/
|
||||
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
|
||||
|
|
@ -18,10 +21,7 @@ const store = useDevelopmentDataStore();
|
|||
const $q = useQuasar();
|
||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
|
||||
const pagination = ref({
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
|
||||
const maxPage = ref<number>(1);
|
||||
const totalList = ref<number>(0); //จำนวนข้อมูลรายการ
|
||||
|
|
@ -29,15 +29,35 @@ const totalList = ref<number>(0); //จำนวนข้อมูลราย
|
|||
const formFilter = reactive({
|
||||
root: null,
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 10,
|
||||
keyword: "",
|
||||
year: new Date().getFullYear(),
|
||||
});
|
||||
|
||||
const rows = ref<any>([]);
|
||||
const pagination = ref({
|
||||
page: formFilter.page,
|
||||
rowsPerPage: formFilter.pageSize,
|
||||
});
|
||||
|
||||
const rows = ref<any[]>([]);
|
||||
const agencyOp = ref<[]>([]);
|
||||
const itemMenu = ref<ItemsMenu[]>([
|
||||
{
|
||||
label: "ไฟล์ .xlsx",
|
||||
value: "xlsx",
|
||||
icon: "mdi-file-excel",
|
||||
color: "green",
|
||||
},
|
||||
{
|
||||
label: "ไฟล์ .PDF",
|
||||
value: "pdf",
|
||||
icon: "mdi-file-pdf",
|
||||
color: "red",
|
||||
},
|
||||
]);
|
||||
|
||||
const visibleColumns = ref<string[]>([
|
||||
"year",
|
||||
"citizenId",
|
||||
"name",
|
||||
"position",
|
||||
|
|
@ -48,6 +68,16 @@ const visibleColumns = ref<string[]>([
|
|||
]);
|
||||
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "year",
|
||||
align: "left",
|
||||
label: "ปีงบประมาณ",
|
||||
sortable: true,
|
||||
field: "year",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => v + 543,
|
||||
},
|
||||
{
|
||||
name: "citizenId",
|
||||
align: "left",
|
||||
|
|
@ -125,7 +155,7 @@ function fetchListOrg() {
|
|||
}
|
||||
|
||||
/** download file */
|
||||
function onDownload() {
|
||||
function onDownload(type: string) {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.developmentReportHistoryOfficer(), {
|
||||
|
|
@ -134,7 +164,7 @@ function onDownload() {
|
|||
})
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
genReportXLSX(dataList, "รายการประวัติฝึกอบรม/ดูงานลูกจ้าง");
|
||||
genReportXLSX(dataList, "รายการประวัติฝึกอบรม/ดูงานลูกจ้าง", type);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -171,6 +201,7 @@ function getData() {
|
|||
level: item.posLevel ? item.posLevel : null,
|
||||
positionSide: item.posExecutive ? item.posExecutive : null,
|
||||
projectName: item.projectName ? item.projectName : null,
|
||||
year: item.year ? item.year : null,
|
||||
}));
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -198,6 +229,8 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
fetchListOrg();
|
||||
});
|
||||
|
|
@ -276,13 +309,28 @@ onMounted(() => {
|
|||
<q-toolbar class="col-4 text-white q-pa-none q-gutter-x-sm">
|
||||
<q-space />
|
||||
<q-btn
|
||||
v-if="formFilter.root !== null"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-arrow-down-bold-circle-outline"
|
||||
color="blue"
|
||||
@click="onDownload"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
v-for="items in itemMenu"
|
||||
@click="onDownload(items.value)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon :color="items.color" :name="items.icon" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ items.label }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<div class="col-4">
|
||||
|
|
|
|||
|
|
@ -5,23 +5,22 @@ import { useQuasar, type QTableProps } from "quasar";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import genReportXLSX from "@/plugins/genreportxlsx";
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
/**importType*/
|
||||
import type { NewPagination } from "@/modules/15_development/interface/index/Main";
|
||||
import type {
|
||||
NewPagination,
|
||||
ItemsMenu,
|
||||
} from "@/modules/15_development/interface/index/Main";
|
||||
|
||||
/** importStore*/
|
||||
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const pagination = ref({
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
|
||||
const formFilter = reactive({
|
||||
root: null,
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 10,
|
||||
keyword: "",
|
||||
year: new Date().getFullYear(),
|
||||
});
|
||||
|
|
@ -29,14 +28,22 @@ const formFilter = reactive({
|
|||
const maxPage = ref<number>(1);
|
||||
const totalList = ref<number>(0); //จำนวนข้อมูลรายการ
|
||||
|
||||
const pagination = ref({
|
||||
page: formFilter.page,
|
||||
rowsPerPage: formFilter.pageSize,
|
||||
});
|
||||
|
||||
/** use*/
|
||||
const router = useRouter();
|
||||
const store = useDevelopmentDataStore();
|
||||
const $q = useQuasar();
|
||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
const rows = ref<any>([]);
|
||||
|
||||
const agencyOp = ref<[]>([]);
|
||||
const rows = ref<any[]>([]);
|
||||
|
||||
const visibleColumns = ref<string[]>([
|
||||
"year",
|
||||
"citizenId",
|
||||
"name",
|
||||
"position",
|
||||
|
|
@ -47,6 +54,16 @@ const visibleColumns = ref<string[]>([
|
|||
]);
|
||||
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "year",
|
||||
align: "left",
|
||||
label: "ปีงบประมาณ",
|
||||
sortable: true,
|
||||
field: "year",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => v + 543,
|
||||
},
|
||||
{
|
||||
name: "citizenId",
|
||||
align: "left",
|
||||
|
|
@ -113,6 +130,21 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
|
||||
const itemMenu = ref<ItemsMenu[]>([
|
||||
{
|
||||
label: "ไฟล์ .xlsx",
|
||||
value: "xlsx",
|
||||
icon: "mdi-file-excel",
|
||||
color: "green",
|
||||
},
|
||||
{
|
||||
label: "ไฟล์ .PDF",
|
||||
value: "pdf",
|
||||
icon: "mdi-file-pdf",
|
||||
color: "red",
|
||||
},
|
||||
]);
|
||||
|
||||
/** ดึงข้อมูลหน่วยงาน */
|
||||
function fetchListOrg() {
|
||||
showLoader();
|
||||
|
|
@ -152,6 +184,7 @@ function getData() {
|
|||
level: item.posLevel ? item.posLevel : null,
|
||||
projectName: item.projectName ? item.projectName : null,
|
||||
positionSide: item.posExecutive ? item.posExecutive : null,
|
||||
year: item.year ? item.year : null,
|
||||
}));
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -162,8 +195,7 @@ function getData() {
|
|||
});
|
||||
}
|
||||
|
||||
/** download file */
|
||||
function onDownload() {
|
||||
function onDownload(type: string) {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.developmentReportHistory(), {
|
||||
|
|
@ -172,9 +204,11 @@ function onDownload() {
|
|||
})
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
|
||||
genReportXLSX(
|
||||
dataList,
|
||||
"รายการประวัติการฝึกอบรม/ดูงานของข้าราชการกรุงเทพมหานครสามัญ"
|
||||
"รายการประวัติการฝึกอบรม/ดูงานของข้าราชการกรุงเทพมหานครสามัญ",
|
||||
type
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -280,16 +314,32 @@ onMounted(() => {
|
|||
/>
|
||||
</div>
|
||||
</q-toolbar>
|
||||
<q-toolbar class="col-4 text-white q-pa-none q-gutter-x-sm">
|
||||
<q-toolbar class="col-4 q-pa-none q-gutter-x-sm">
|
||||
<q-space />
|
||||
|
||||
<q-btn
|
||||
v-if="formFilter.root !== null"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-arrow-down-bold-circle-outline"
|
||||
color="blue"
|
||||
@click="onDownload"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
v-for="items in itemMenu"
|
||||
@click="onDownload(items.value)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon :color="items.color" :name="items.icon" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ items.label }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<div class="col-4">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue