ปรับ ui
This commit is contained in:
parent
5d6c63f242
commit
202079bb13
15 changed files with 281 additions and 102 deletions
|
|
@ -26,16 +26,14 @@ export const useComplainstDataStore = defineStore(
|
|||
let dataList: DataListRow[] = data.map((e: DataList) => ({
|
||||
id: e.id,
|
||||
personId: e.personId,
|
||||
title: e.title,
|
||||
title: e.title ? e.title : '-',
|
||||
dateReceived: e.dateReceived ? date2Thai(e.dateReceived) : "-",
|
||||
respondentType: mainStore.convertComplaintType(e.respondentType),
|
||||
offenseDetails: mainStore.convertOffenseDetailst(e.offenseDetails),
|
||||
createdAt: date2Thai(e.createdAt)!,
|
||||
levelConsideration: levelConsiderationTran(e.levelConsideration),
|
||||
dateConsideration: e.dateConsideration
|
||||
? date2Thai(e.dateConsideration)
|
||||
: "-",
|
||||
status: statusTothai(e.status),
|
||||
respondentType: e.respondentType ? mainStore.convertComplaintType(e.respondentType) : '-',
|
||||
offenseDetails: e.offenseDetails ? mainStore.convertOffenseDetailst(e.offenseDetails) : '-',
|
||||
createdAt: e.createdAt ? date2Thai(e.createdAt)! : '-',
|
||||
levelConsideration: e.levelConsideration ? levelConsiderationTran(e.levelConsideration) : '-',
|
||||
dateConsideration: e.dateConsideration ? date2Thai(e.dateConsideration) : "-",
|
||||
status: e.status ? statusTothai(e.status) : '-',
|
||||
}));
|
||||
rows.value = dataList;
|
||||
}
|
||||
|
|
@ -69,6 +67,17 @@ export const useComplainstDataStore = defineStore(
|
|||
const optionListNameMain = ref<DataOption[]>([]);
|
||||
const optionListName = ref<DataOption[]>([]);
|
||||
|
||||
const statusOptions = ref<DataOption[]>([
|
||||
{ id: "ALL", name: "ทั้งหมด" },
|
||||
{ id: "NEW", name: "ใหม่" },
|
||||
{ id: "RECEIVE_DOC", name: "ได้รับเอกสารแล้ว" },
|
||||
{ id: "RECEIVE_APPEAL", name: "รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "NO_RECEIVE_APPEAL", name: "ไม่รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "DIAGNOSTIC", name: "ตั้งองค์คณะวินิจฉัย" },
|
||||
{ id: "SUMMARY", name: "สรุปผลการพิจารณา" },
|
||||
{ id: "DONE", name: "ปิดคำร้อง" },
|
||||
]);
|
||||
|
||||
function levelConsiderationTran(val: string) {
|
||||
return (
|
||||
levelConsiderationtOptions.value.find((v: any) => v.id === val)?.name ??
|
||||
|
|
@ -121,6 +130,7 @@ export const useComplainstDataStore = defineStore(
|
|||
organizationIdOp,
|
||||
ocListFn,
|
||||
levelConsiderationtOptions,
|
||||
statusOptions
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ export const useInvestigateDisStore = defineStore(
|
|||
{ id: "4", name: "ร้ายแรง", disable: true },
|
||||
{ id: "ปลดออก", name: "ปลดออก", disable: false },
|
||||
{ id: "ไล่ออก", name: "ไล่ออก", disable: false },
|
||||
{ id: "อื่นๆ", name: "อื่นๆ", disable: false },
|
||||
]);
|
||||
|
||||
const statusOps = ref<DataOption[]>([
|
||||
|
|
@ -66,7 +67,16 @@ export const useInvestigateDisStore = defineStore(
|
|||
{ id: "ร้ายแรง", name: "ร้ายแรง" },
|
||||
{ id: "ไม่ร้ายแรง", name: "ไม่ร้ายแรง" },
|
||||
]);
|
||||
|
||||
const statusOptions = ref<DataOption[]>([
|
||||
{ id: "ALL", name: "ทั้งหมด" },
|
||||
{ id: "NEW", name: "ใหม่" },
|
||||
{ id: "RECEIVE_DOC", name: "ได้รับเอกสารแล้ว" },
|
||||
{ id: "RECEIVE_APPEAL", name: "รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "NO_RECEIVE_APPEAL", name: "ไม่รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "DIAGNOSTIC", name: "ตั้งองค์คณะวินิจฉัย" },
|
||||
{ id: "SUMMARY", name: "สรุปผลการพิจารณา" },
|
||||
{ id: "DONE", name: "ปิดคำร้อง" },
|
||||
]);
|
||||
const visibleColumns = ref<String[]>([
|
||||
"no",
|
||||
"title",
|
||||
|
|
@ -235,9 +245,9 @@ export const useInvestigateDisStore = defineStore(
|
|||
async function fetchList(data: investigateDisDataRowType[]) {
|
||||
let datalist: any[] = data.map((e: any) => ({
|
||||
id: e.id,
|
||||
title: e.title,
|
||||
respondentType: convertRespondentType(e.respondentType),
|
||||
offenseDetails: convertFault(e.offenseDetails),
|
||||
title: e.title ? e.title :'-',
|
||||
respondentType: e.respondentType ? convertRespondentType(e.respondentType):'-',
|
||||
offenseDetails: e.offenseDetails ? convertFault(e.offenseDetails):'-',
|
||||
disciplinaryFaultLevel: e.disciplinaryFaultLevel ?? "-",
|
||||
disciplinaryCaseFault: e.disciplinaryCaseFault ?? "-",
|
||||
status: convertStatus(e.status) ?? "-",
|
||||
|
|
@ -322,6 +332,7 @@ export const useInvestigateDisStore = defineStore(
|
|||
|
||||
convertRespondentType,
|
||||
convertFault,
|
||||
statusOptions
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -62,6 +62,16 @@ export const useInvestigateFactStore = defineStore(
|
|||
investigationDetailOps.value
|
||||
);
|
||||
const faultOp = ref<DataOption[]>(faultOps.value);
|
||||
const statusOptions = ref<DataOption[]>([
|
||||
{ id: "ALL", name: "ทั้งหมด" },
|
||||
{ id: "NEW", name: "ใหม่" },
|
||||
{ id: "RECEIVE_DOC", name: "ได้รับเอกสารแล้ว" },
|
||||
{ id: "RECEIVE_APPEAL", name: "รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "NO_RECEIVE_APPEAL", name: "ไม่รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "DIAGNOSTIC", name: "ตั้งองค์คณะวินิจฉัย" },
|
||||
{ id: "SUMMARY", name: "สรุปผลการพิจารณา" },
|
||||
{ id: "DONE", name: "ปิดคำร้อง" },
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"title",
|
||||
|
|
@ -206,28 +216,26 @@ export const useInvestigateFactStore = defineStore(
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async function fecthList(data: ListData[]) {
|
||||
rows.value = await data.map((e: ListData) => {
|
||||
return {
|
||||
id: e.id,
|
||||
title: e.title,
|
||||
respondentType: mainStore.convertComplaintType(e.respondentType),
|
||||
offenseDetails: mainStore.convertOffenseDetailst(e.offenseDetails),
|
||||
investigationDetail: convertInvestigationDetail(
|
||||
e.investigationDetail
|
||||
),
|
||||
title: e.title ? e.title : '-',
|
||||
respondentType: e.respondentType ? mainStore.convertComplaintType(e.respondentType) : '-',
|
||||
offenseDetails: e.offenseDetails ? mainStore.convertOffenseDetailst(e.offenseDetails) : '-',
|
||||
investigationDetail: e.investigationDetail ? convertInvestigationDetail(e.investigationDetail) : '-',
|
||||
dateInvestigate:
|
||||
e.investigationDateStart && e.investigationDateEnd
|
||||
? `${date2Thai(e.investigationDateStart)} - ${date2Thai(
|
||||
e.investigationDateEnd
|
||||
)}`
|
||||
: "-",
|
||||
investigationStatusResult: mainStore.convertStatusResult(
|
||||
investigationStatusResult:e.investigationStatusResult ? mainStore.convertStatusResult(
|
||||
e.investigationStatusResult
|
||||
),
|
||||
createdAt: date2Thai(e.createdAt as Date),
|
||||
status: convertStatus(e.status),
|
||||
):'-',
|
||||
createdAt: e.createdAt ? date2Thai(e.createdAt as Date):'-',
|
||||
status: e.status ? convertStatus(e.status):'-',
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
@ -261,6 +269,7 @@ export const useInvestigateFactStore = defineStore(
|
|||
respondentTypeOps,
|
||||
organizationIdOp,
|
||||
ocListFn,
|
||||
statusOptions
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,17 @@ export const useDisciplineResultStore = defineStore(
|
|||
storeMain.complainantoptionsMain
|
||||
);
|
||||
|
||||
const statusOptions = ref<DataOption[]>([
|
||||
{ id: "ALL", name: "ทั้งหมด" },
|
||||
{ id: "NEW", name: "ใหม่" },
|
||||
{ id: "RECEIVE_DOC", name: "ได้รับเอกสารแล้ว" },
|
||||
{ id: "RECEIVE_APPEAL", name: "รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "NO_RECEIVE_APPEAL", name: "ไม่รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "DIAGNOSTIC", name: "ตั้งองค์คณะวินิจฉัย" },
|
||||
{ id: "SUMMARY", name: "สรุปผลการพิจารณา" },
|
||||
{ id: "DONE", name: "ปิดคำร้อง" },
|
||||
]);
|
||||
|
||||
const visibleColumns = ref<String[]>([
|
||||
"no",
|
||||
"title",
|
||||
|
|
@ -227,7 +238,7 @@ export const useDisciplineResultStore = defineStore(
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
|
||||
function filterSelector(val: string, update: Function, type: string) {
|
||||
update(() => {
|
||||
const needle = val.toLowerCase();
|
||||
|
|
@ -257,9 +268,9 @@ export const useDisciplineResultStore = defineStore(
|
|||
: "-",
|
||||
status: e.status && convertStatus(e.status),
|
||||
createdAt: e.createdAt && date2Thai(e.createdAt),
|
||||
disciplineType: e.disciplineType ? e.disciplineType:'-' ,
|
||||
titleType: e.titleType ? e.titleType:'-' ,
|
||||
oc: e.oc ? e.oc:'-'
|
||||
disciplineType: e.disciplineType ? e.disciplineType : '-',
|
||||
titleType: e.titleType ? e.titleType : '-',
|
||||
oc: e.oc ? e.oc : '-'
|
||||
}));
|
||||
rows.value = datalist;
|
||||
}
|
||||
|
|
@ -285,6 +296,7 @@ export const useDisciplineResultStore = defineStore(
|
|||
columnsDirector,
|
||||
complainantoptions,
|
||||
filterSelector,
|
||||
statusOptions
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue