โครงสร้างอัตรากำลัง => แก้ไขการ fetch โครางสร้าง ประวัติ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-03-05 10:31:05 +07:00
parent cd26f1a08a
commit b331a79277
3 changed files with 100 additions and 5 deletions

View file

@ -9,6 +9,7 @@ import { StructChart } from "structure-chart";
import "structure-chart/structure-chart.css";
import { useCounterMixin } from "@/stores/mixin";
import { useOrganizational } from "@/modules/02_organizationalNew/store/organizational";
import { log } from "console";
const mixin = useCounterMixin();
const store = useOrganizational();
@ -31,13 +32,12 @@ const savePDF = () => {
const loader = ref<boolean>(false); // Loader
onMounted(async () => {
// await fetchTreeRoot();
const id =
store.typeOrganizational === "current"
? store.activeId
: store.typeOrganizational === "draft"
? store.draftId
: "";
: store.historyId;
id && (await fetchStructChart(id, "0"));
});

View file

@ -234,7 +234,7 @@ function fetchDataPeriod(id: string) {
}
/**function เปลี่ยนกลุ่ม*/
function changeTabGroup() {
function changeTabGroup() {
formFilter.page = 1;
formFilter.pageSize = 10;
formFilter.keyword = "";
@ -319,7 +319,25 @@ onMounted(async () => {
</q-card>
</div>
<div class="row col justify-end items-center">
<q-btn color="blue-5" icon="download" label="ดาวน์โหลด" />
<q-btn-dropdown color="blue-5" label="ดาวน์โหลด">
<q-list>
<q-item
v-for="(item, index) in store.roundMainCode === 'APR'
? store.itemDownloadApr
: store.roundMainCode === 'OCT'
? store.itemDownloadOct
: []"
:key="index"
clickable
v-close-popup
>
<q-item-section>
<q-item-label>{{ item.name }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
<!-- <q-btn color="blue-5" icon="download" label="ดาวน์โหลด" /> -->
</div>
</div>
</div>

View file

@ -50,6 +50,82 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
},
]);
/** List Download รายงานของรอบเมษายน*/
const itemDownloadApr = ref<DataOption[]>([
{
id: "gov1-01",
name: "รายชื่อข้าราชการผู้ที่ครองตำแหน่ง ณ วันที่ 1 มีนาคม",
},
{
id: "gov1-02",
name: "บัญชีการคำนวณโควตาเลื่อนเงินเดือน รอบเมษายน",
},
{
id: "gov1-03",
name: "รายชื่อข้าราชการที่ได้รับการเสนอขอเลื่อนหนึ่งขั้น",
},
{
id: "gov1-04",
name: "แบบ 1 กท รอบเมษายน",
},
{
id: "gov1-05",
name: "แบบ 2 กท รอบเมษายน",
},
{
id: "gov1-06",
name: "แบบ 3 กท บัญชีแสดงวันลาครึ่งปี ขรก.",
},
{
id: "gov1-07",
name: "คำสั่งเลื่อนเงินเดือน รอบเมษายน",
},
{
id: "gov1-08",
name: "คำสั่งค่าตอบแทนพิเศษ และผู้ไม่ได้เลื่อน รอบเมษายน",
},
]);
/** List Download รายงานของรอบตุลาคม*/
const itemDownloadOct = ref<DataOption[]>([
{
id: "gov2-01",
name: "รายชื่อข้าราชการผู้ที่ครองตำแหน่ง ณ วันที่ 1 กันยายน",
},
{
id: "gov2-02",
name: "บัญชีการคำนวณวงเงินเลื่อนเงินเดือน รอบตุลาคม",
},
{
id: "gov2-03",
name: "รายชื่อข้าราชการผู้ที่ได้รับการเสนอขอเลื่อนเงินเดือนทั้งปีสองขั้น",
},
{
id: "gov2-04",
name: "แบบ 1 กท รอบตุลาคม",
},
{
id: "gov2-05",
name: "แบบ 2 กท รอบตุลาคม",
},
{
id: "gov2-06",
name: "แบบ 3 กท บัญชีแสดงวันลาครึ่งปี ขรก. ",
},
{
id: "gov2-07",
name: "คำสั่งเลื่อนเงินเดือนข้าราชการเกษียณ",
},
{
id: "gov2-08",
name: "คำสั่งเลื่อนเงินเดือน รอบตุลาคม",
},
{
id: "gov2-09",
name: "คำสั่งค่าตอบแทนพิเศษ และผู้ไม่ได้เลื่อนเงินเดือน รอบตุลาคม",
},
]);
function fetchPeriodLatest(data: DataPeriodLatest, type: string) {
groupId.value = type === "group1" ? data.group1id : data.group2id;
roundCode.value = data.period;
@ -60,13 +136,14 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
tabGroup,
tabType,
itemMenu,
itemDownloadOct,
itemDownloadApr,
groupId,
fetchPeriodLatest,
rootId,
roundCode,
groupOp,
roundMainCode,
remaining,
};
});