เพิม interface row
This commit is contained in:
parent
c42400e57c
commit
d94531204a
12 changed files with 99 additions and 133 deletions
|
|
@ -7,7 +7,8 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useTransferDataStore } from "@/modules/05_placement/store"
|
||||
import Dialogbody from "@/modules/05_placement/components/AppointMent/Dialogbody.vue"
|
||||
import DialogOrgTree from "@/modules/05_placement/components/AppointMent/AppointmentModal.vue";
|
||||
|
||||
import type { listAppointType,resData,orgFilter } from "@/modules/05_placement/interface/response/AppointMent"
|
||||
import type { OpType } from "@/modules/05_placement/interface/response/Main"
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
|
@ -26,16 +27,16 @@ const {
|
|||
} = mixin;
|
||||
|
||||
const router = useRouter();
|
||||
const rows = ref<any>([]);
|
||||
const rows2 = ref<any>([]);
|
||||
const rows = ref<listAppointType[]>([]);
|
||||
const rows2 = ref<listAppointType[]>([]);
|
||||
const modalTree = ref<boolean>(false);
|
||||
const personal = ref<any[]>([]);
|
||||
const personalId = ref<string>("");
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterKeyword2 = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
const listRecevice = ref<any>([]);
|
||||
const optionsType = ref<any[]>([]);
|
||||
const listRecevice = ref<resData[]>([]);
|
||||
const optionsType = ref<OpType[]>([]);
|
||||
const type = ref<string>("");
|
||||
|
||||
const visibleColumns = ref<string[]>([
|
||||
|
|
@ -147,7 +148,7 @@ const fecthlistappointment = async () => {
|
|||
.then((res) => {
|
||||
let response = res.data.result;
|
||||
listRecevice.value = response;
|
||||
rows.value = response.map((e: any) => ({
|
||||
rows.value = response.map((e: resData) => ({
|
||||
personalId: e.id,
|
||||
citizenId: e.citizenId,
|
||||
fullname: e.prefix + e.firstname + " " + e.lastname,
|
||||
|
|
@ -165,11 +166,10 @@ const fecthlistappointment = async () => {
|
|||
positionPath: e.positionPath,
|
||||
status: statusText(e.status),
|
||||
createdAt: date2Thai(e.createdAt),
|
||||
|
||||
birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth),
|
||||
}));
|
||||
rows2.value = rows.value.filter(
|
||||
(e: any) =>
|
||||
(e: orgFilter) =>
|
||||
e.orgName !== null &&
|
||||
e.status !== "ส่งรายชื่อไปออกคำสั่ง" &&
|
||||
e.status !== "ออกคำสั่งเสร็จแล้ว"
|
||||
|
|
@ -189,7 +189,7 @@ const fecthTypeOption = async () => {
|
|||
.get(config.API.typeOrder())
|
||||
.then((res) => {
|
||||
optionsType.value = res.data.result.filter(
|
||||
(e: any) =>
|
||||
(e: OpType) =>
|
||||
e.commandCode === "C-PM-05" ||
|
||||
e.commandCode === "C-PM-06" ||
|
||||
e.commandCode === "C-PM-07"
|
||||
|
|
@ -203,7 +203,7 @@ const fecthTypeOption = async () => {
|
|||
// เปิดโครงสร้าง
|
||||
const openModalTree = (id: string) => {
|
||||
personalId.value = id;
|
||||
personal.value = listRecevice.value.filter((e: any) => e.id === id);
|
||||
personal.value = listRecevice.value.filter((e) => e.id === id);
|
||||
modalTree.value = true;
|
||||
};
|
||||
//เเจ้งเตือนลบข้อมูล
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue