updated status contain
This commit is contained in:
parent
ca5b49d16b
commit
f891926553
3 changed files with 28 additions and 9 deletions
|
|
@ -12,6 +12,7 @@ import config from "@/app.config";
|
|||
import CardTop from "@/modules/05_placement/components/PersonalList/StatCard.vue";
|
||||
import AddTablePosition from "@/modules/05_placement/components/PersonalList/Table.vue";
|
||||
|
||||
import type { StatResponse } from "@/modules/05_placement/interface/response/Main";
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
|
@ -25,12 +26,13 @@ const round = ref<string>("");
|
|||
const title = ref<string>("");
|
||||
const examData = ref<any>();
|
||||
const roleAdmin = ref<boolean>(false);
|
||||
const stat = ref<any>({
|
||||
const stat = ref<StatResponse>({
|
||||
total: 0,
|
||||
unContain: 0,
|
||||
prepareContain: 0,
|
||||
contain: 0,
|
||||
disclaim: 0,
|
||||
report: 0,
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -49,6 +51,7 @@ async function getStat() {
|
|||
prepareContain: statCard.prepareContain,
|
||||
contain: statCard.contain,
|
||||
disclaim: statCard.disclaim,
|
||||
report: statCard.report,
|
||||
};
|
||||
DataStore.checkLoad(1);
|
||||
})
|
||||
|
|
@ -131,6 +134,11 @@ onMounted(async () => {
|
|||
label="จำนวนที่เตรียมบรรจุ"
|
||||
color="#2EA0FF"
|
||||
/>
|
||||
<CardTop
|
||||
:amount="stat.report"
|
||||
label="ส่งไปออกคำสั่ง"
|
||||
color="orange"
|
||||
/>
|
||||
<CardTop
|
||||
:amount="stat.contain"
|
||||
label="จำนวนที่บรรจุแล้ว"
|
||||
|
|
|
|||
|
|
@ -245,10 +245,12 @@ function convertContainStatus(val: string, type: string = "") {
|
|||
return "ยังไม่บรรจุ";
|
||||
case "PREPARE-CONTAIN":
|
||||
return "เตรียม" + (!type ? type : "บรรจุ");
|
||||
case "CONTAIN":
|
||||
case "DONE":
|
||||
return (!type ? type : "บรรจุ") + "แล้ว";
|
||||
case "DISCLAIM":
|
||||
return "สละสิทธิ์";
|
||||
case "REPORT":
|
||||
return "ส่งไปออกคำสั่ง";
|
||||
default:
|
||||
return "-";
|
||||
}
|
||||
|
|
@ -356,7 +358,7 @@ async function getTable() {
|
|||
data.statusId == "PREPARE-CONTAIN" &&
|
||||
data.node == null
|
||||
? "ขอผ่อนผัน"
|
||||
: data.statusId == "CONTAIN"
|
||||
: data.statusId == "DONE"
|
||||
? convertTypeCommand(data.typeCommand) + "แล้ว"
|
||||
: convertContainStatus(data.statusId) +
|
||||
(data.typeCommand != ""
|
||||
|
|
@ -384,7 +386,7 @@ async function getTable() {
|
|||
// รายชื่อทั้งหมด
|
||||
rows.value = await (roleAdmin.value
|
||||
? rowsAll.value
|
||||
: rowsAll.value.filter((x: any) => x.statusId !== "CONTAIN"));
|
||||
: rowsAll.value.filter((x: any) => x.statusId !== "DONE"));
|
||||
// รายชื่อไปยังหน่วยงาน
|
||||
rowsFilter.value = await rows.value.filter(
|
||||
(e: any) =>
|
||||
|
|
@ -748,9 +750,9 @@ function openModalOrder(val: boolean) {
|
|||
|
||||
watch(containStatus, () => {
|
||||
if (containStatus.value) {
|
||||
rows.value = rowsAll.value.filter((x: any) => x.statusId == "CONTAIN");
|
||||
rows.value = rowsAll.value.filter((x: any) => x.statusId == "DONE");
|
||||
} else {
|
||||
rows.value = rowsAll.value.filter((x: any) => x.statusId != "CONTAIN");
|
||||
rows.value = rowsAll.value.filter((x: any) => x.statusId != "DONE");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -804,7 +806,7 @@ onMounted(async () => {
|
|||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="
|
||||
props.row.statusId !== 'CONTAIN' &&
|
||||
props.row.statusId !== 'DONE' &&
|
||||
(checkPermission($route)?.attrIsGet ||
|
||||
checkPermission($route)?.attrIsUpdate)
|
||||
"
|
||||
|
|
@ -834,7 +836,7 @@ onMounted(async () => {
|
|||
<q-item
|
||||
v-if="
|
||||
props.row.nodeName !== null &&
|
||||
props.row.statusId !== 'CONTAIN' &&
|
||||
props.row.statusId !== 'DONE' &&
|
||||
props.row.statusId !== 'DISCLAIM' &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
|
|
|
|||
|
|
@ -101,4 +101,13 @@ interface Education {
|
|||
startDate: string;
|
||||
}
|
||||
|
||||
export type { OpType, DataPerson, Education };
|
||||
interface StatResponse {
|
||||
total: number;
|
||||
unContain: number;
|
||||
prepareContain: number;
|
||||
contain: number;
|
||||
disclaim: number;
|
||||
report: number;
|
||||
}
|
||||
|
||||
export type { OpType, DataPerson, Education, StatResponse };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue