แก้ฟิวตำแหน่ง
This commit is contained in:
parent
9b2bc64958
commit
5a0bf37501
2 changed files with 170 additions and 145 deletions
|
|
@ -3,20 +3,30 @@ import { ref, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useTransferDataStore } from "@/modules/05_placement/store"
|
import { useTransferDataStore } from "@/modules/05_placement/store";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { listMain,listMainAPI } from "@/modules/05_placement/interface/response/OhterMain"
|
import type {
|
||||||
import type { OpType } from "@/modules/05_placement/interface/response/Main"
|
listMain,
|
||||||
|
listMainAPI,
|
||||||
|
} from "@/modules/05_placement/interface/response/OhterMain";
|
||||||
|
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import Dialogbody from "@/modules/05_placement/components/Other/Dialogbody.vue"
|
import Dialogbody from "@/modules/05_placement/components/Other/Dialogbody.vue";
|
||||||
|
|
||||||
const storeFn = useTransferDataStore();
|
const storeFn = useTransferDataStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const { statusText } = storeFn
|
const { statusText } = storeFn;
|
||||||
const { showLoader, hideLoader, success, messageError, date2Thai, dialogRemove } = mixin;
|
const {
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
success,
|
||||||
|
messageError,
|
||||||
|
date2Thai,
|
||||||
|
dialogRemove,
|
||||||
|
} = mixin;
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
@ -36,7 +46,15 @@ const pagination = ref({
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
const visibleColumns = ref<string[]>([ "no", "fullname", "position", "positionLevel", "organizationPositionOld", "createdAt", "statustext"]);
|
const visibleColumns = ref<string[]>([
|
||||||
|
"no",
|
||||||
|
"fullname",
|
||||||
|
"positionPath",
|
||||||
|
"positionLevel",
|
||||||
|
"organizationPositionOld",
|
||||||
|
"createdAt",
|
||||||
|
"statustext",
|
||||||
|
]);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -57,11 +75,11 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "positionPath",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งในสายงาน",
|
label: "ตำแหน่งในสายงาน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "position",
|
field: "positionPath",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -121,6 +139,7 @@ const fecthlistOthet = async () => {
|
||||||
organizationPositionOld: r.organizationPositionOld ?? "-",
|
organizationPositionOld: r.organizationPositionOld ?? "-",
|
||||||
posNo: r.posNo ?? "-",
|
posNo: r.posNo ?? "-",
|
||||||
position: r.position ?? "-",
|
position: r.position ?? "-",
|
||||||
|
positionPath: r.positionPath ?? "-",
|
||||||
positionLevel: r.positionLevel ?? "-",
|
positionLevel: r.positionLevel ?? "-",
|
||||||
positionLevelOld: r.positionLevelOld ?? "-",
|
positionLevelOld: r.positionLevelOld ?? "-",
|
||||||
positionNumberOld: r.positionNumberOld ?? "-",
|
positionNumberOld: r.positionNumberOld ?? "-",
|
||||||
|
|
@ -133,8 +152,7 @@ const fecthlistOthet = async () => {
|
||||||
fullname: `${r.prefix ?? ""}${r.firstname ?? ""} ${r.lastname ?? ""}`,
|
fullname: `${r.prefix ?? ""}${r.firstname ?? ""} ${r.lastname ?? ""}`,
|
||||||
}));
|
}));
|
||||||
rows2.value = rows.value.filter(
|
rows2.value = rows.value.filter(
|
||||||
(e: listMain) =>
|
(e: listMain) => e.status !== "REPORT" && e.status !== "DONE"
|
||||||
e.status !== "REPORT" && e.status !== "DONE"
|
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -152,7 +170,8 @@ const fecthTypeOption = async () => {
|
||||||
.get(config.API.typeOrder())
|
.get(config.API.typeOrder())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
optionsType.value = res.data.result.filter(
|
optionsType.value = res.data.result.filter(
|
||||||
(e: OpType) => e.commandCode === "C-PM-08" || e.commandCode === "C-PM-09"
|
(e: OpType) =>
|
||||||
|
e.commandCode === "C-PM-08" || e.commandCode === "C-PM-09"
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -179,7 +198,6 @@ const deleteOther = async (id: string) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//----(รีเซ็ตข้อมูลในช่อง input)------//
|
//----(รีเซ็ตข้อมูลในช่อง input)------//
|
||||||
const resetFilter = () => {
|
const resetFilter = () => {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
|
|
@ -187,7 +205,6 @@ const resetFilter = () => {
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//----(เปิด Dialog)------//
|
//----(เปิด Dialog)------//
|
||||||
const popup = () => {
|
const popup = () => {
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
|
|
@ -222,23 +239,35 @@ onMounted(() => {
|
||||||
<div class="row q-pa-md">
|
<div class="row q-pa-md">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<q-btn @click="popup()" size="14px" flat round color="add" icon="mdi-account-arrow-right">
|
<q-btn
|
||||||
|
@click="popup()"
|
||||||
|
size="14px"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="add"
|
||||||
|
icon="mdi-account-arrow-right"
|
||||||
|
>
|
||||||
<q-tooltip>ส่งไปออกคำสั่งรายการอื่นๆ</q-tooltip>
|
<q-tooltip>ส่งไปออกคำสั่งรายการอื่นๆ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-input
|
<q-input
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
ref="filterRef"
|
ref="filterRef"
|
||||||
outlined
|
outlined
|
||||||
debounce="300"
|
debounce="300"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
<q-icon v-if="filterKeyword !== ''" name="clear" class="cursor-pointer" @click="resetFilter"/>
|
<q-icon
|
||||||
|
v-if="filterKeyword !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<q-select
|
<q-select
|
||||||
|
|
@ -248,13 +277,14 @@ onMounted(() => {
|
||||||
dense
|
dense
|
||||||
options-dense
|
options-dense
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
emit-value map-options
|
emit-value
|
||||||
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
options-cover
|
options-cover
|
||||||
style="min-width: 150px"
|
style="min-width: 150px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 q-pt-sm">
|
<div class="col-12 q-pt-sm">
|
||||||
|
|
@ -286,8 +316,8 @@ onMounted(() => {
|
||||||
<q-td key="fullname" :props="props">
|
<q-td key="fullname" :props="props">
|
||||||
{{ props.row.fullname }}
|
{{ props.row.fullname }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="position" :props="props">
|
<q-td key="positionPath" :props="props">
|
||||||
{{ props.row.position }}
|
{{ props.row.positionPath }}
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="positionLevel" :props="props">
|
<q-td key="positionLevel" :props="props">
|
||||||
{{ props.row.positionLevel }}
|
{{ props.row.positionLevel }}
|
||||||
|
|
@ -331,14 +361,14 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
<Dialogbody
|
<Dialogbody
|
||||||
v-model:Modal="modal"
|
v-model:Modal="modal"
|
||||||
:clickClose="clickClose"
|
:clickClose="clickClose"
|
||||||
:optionsType="optionsType"
|
:optionsType="optionsType"
|
||||||
:rows2="rows2"
|
:rows2="rows2"
|
||||||
v-model:filterKeyword2="filterKeyword2"
|
v-model:filterKeyword2="filterKeyword2"
|
||||||
v-model:type="type"
|
v-model:type="type"
|
||||||
:fecthlistOthet="fecthlistOthet"
|
:fecthlistOthet="fecthlistOthet"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
|
||||||
|
|
@ -1,104 +1,99 @@
|
||||||
// ข้อมูลที่เก็บ
|
// ข้อมูลที่เก็บ
|
||||||
interface listMain {
|
interface listMain {
|
||||||
personalId:string
|
personalId: string;
|
||||||
fullname:string
|
fullname: string;
|
||||||
prefix:string
|
prefix: string;
|
||||||
firstName:string
|
firstName: string;
|
||||||
lastName:string
|
lastName: string;
|
||||||
date:Date
|
date: Date;
|
||||||
isActive:boolean
|
isActive: boolean;
|
||||||
organization:string
|
organization: string;
|
||||||
organizationPositionOld:string
|
organizationPositionOld: string;
|
||||||
posNo:string
|
posNo: string;
|
||||||
position:string
|
position: string;
|
||||||
positionLevel:string
|
positionLevel: string;
|
||||||
positionLevelOld:string
|
positionLevelOld: string;
|
||||||
positionNumberOld:string
|
positionNumberOld: string;
|
||||||
positionTypeOld:string
|
positionTypeOld: string;
|
||||||
reason:string
|
reason: string;
|
||||||
salary:number
|
salary: number;
|
||||||
status:string
|
status: string;
|
||||||
statustext:string
|
statustext: string;
|
||||||
createdAt:Date
|
createdAt: Date;
|
||||||
}
|
}
|
||||||
//ข้อมูลจาก api
|
//ข้อมูลจาก api
|
||||||
interface listMainAPI {
|
interface listMainAPI {
|
||||||
id:string
|
id: string;
|
||||||
firstname:string
|
firstname: string;
|
||||||
prefix:string
|
prefix: string;
|
||||||
firstName:string
|
firstName: string;
|
||||||
lastname:string
|
lastname: string;
|
||||||
date:Date
|
date: Date;
|
||||||
isActive:boolean
|
isActive: boolean;
|
||||||
organization:string
|
organization: string;
|
||||||
organizationPositionOld:string
|
organizationPositionOld: string;
|
||||||
posNo:string
|
positionPath: string;
|
||||||
position:string
|
posNo: string;
|
||||||
positionLevel:string
|
position: string;
|
||||||
positionLevelOld:string
|
positionLevel: string;
|
||||||
positionNumberOld:string
|
positionLevelOld: string;
|
||||||
positionTypeOld:string
|
positionNumberOld: string;
|
||||||
reason:string
|
positionTypeOld: string;
|
||||||
salary:number
|
reason: string;
|
||||||
status:string
|
salary: number;
|
||||||
statustext:string
|
status: string;
|
||||||
createdAt:Date
|
statustext: string;
|
||||||
|
createdAt: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OtherdataInterface {
|
interface OtherdataInterface {
|
||||||
citizenId: string;
|
citizenId: string;
|
||||||
prefixId: string;
|
prefixId: string;
|
||||||
firstname: string;
|
firstname: string;
|
||||||
lastname: string;
|
lastname: string;
|
||||||
}
|
|
||||||
|
|
||||||
interface resApiData {
|
|
||||||
data:{
|
|
||||||
result:{
|
|
||||||
id: string
|
|
||||||
profileId: string
|
|
||||||
citizenId: string
|
|
||||||
prefix: string
|
|
||||||
prefixId: string
|
|
||||||
firstname: string
|
|
||||||
lastname: string
|
|
||||||
dateOfBirth: Date
|
|
||||||
gender: string
|
|
||||||
nationality: string
|
|
||||||
race: string
|
|
||||||
religion: string
|
|
||||||
bloodGroup: string
|
|
||||||
relationship: string
|
|
||||||
telephoneNumber: string
|
|
||||||
status: string
|
|
||||||
amount: number
|
|
||||||
recruitDate: Date
|
|
||||||
posNoId: string
|
|
||||||
positionId: string
|
|
||||||
positionPathSideId: string
|
|
||||||
positionTypeId: string
|
|
||||||
positionLineId: string
|
|
||||||
positionLevelId: string
|
|
||||||
organizationPositionId: string
|
|
||||||
createdAt: Date
|
|
||||||
reason: string
|
|
||||||
educationOld: string
|
|
||||||
amountOld: number
|
|
||||||
positionTypeOld: string
|
|
||||||
positionLevelOld: string
|
|
||||||
positionNumberOld: string
|
|
||||||
organizationPositionOld: string
|
|
||||||
positionDate: Date
|
|
||||||
avatar: string
|
|
||||||
commandType: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export type {
|
|
||||||
listMain,
|
|
||||||
listMainAPI,
|
|
||||||
OtherdataInterface,
|
|
||||||
resApiData
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface resApiData {
|
||||||
|
data: {
|
||||||
|
result: {
|
||||||
|
id: string;
|
||||||
|
profileId: string;
|
||||||
|
citizenId: string;
|
||||||
|
prefix: string;
|
||||||
|
prefixId: string;
|
||||||
|
firstname: string;
|
||||||
|
lastname: string;
|
||||||
|
dateOfBirth: Date;
|
||||||
|
gender: string;
|
||||||
|
nationality: string;
|
||||||
|
race: string;
|
||||||
|
religion: string;
|
||||||
|
bloodGroup: string;
|
||||||
|
relationship: string;
|
||||||
|
telephoneNumber: string;
|
||||||
|
status: string;
|
||||||
|
amount: number;
|
||||||
|
recruitDate: Date;
|
||||||
|
posNoId: string;
|
||||||
|
positionId: string;
|
||||||
|
positionPathSideId: string;
|
||||||
|
positionTypeId: string;
|
||||||
|
positionLineId: string;
|
||||||
|
positionLevelId: string;
|
||||||
|
organizationPositionId: string;
|
||||||
|
createdAt: Date;
|
||||||
|
reason: string;
|
||||||
|
educationOld: string;
|
||||||
|
amountOld: number;
|
||||||
|
positionTypeOld: string;
|
||||||
|
positionLevelOld: string;
|
||||||
|
positionNumberOld: string;
|
||||||
|
organizationPositionOld: string;
|
||||||
|
positionDate: Date;
|
||||||
|
avatar: string;
|
||||||
|
commandType: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export type { listMain, listMainAPI, OtherdataInterface, resApiData };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue