fix ==> โครงสร้างอัตรากำลัง ประวัติคนครอง
This commit is contained in:
parent
3bc0c2557a
commit
ecc9ab9a4c
2 changed files with 49 additions and 1 deletions
|
|
@ -191,7 +191,17 @@ async function fetchHistoryPos(id: string) {
|
|||
.get(pathAPI)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
rows.value = data;
|
||||
rows.value =
|
||||
props.historyType === "HISTORY"
|
||||
? data
|
||||
: data.map((e: any) => ({
|
||||
...e,
|
||||
fullname:
|
||||
e.prefix && e.firstName && e.lastName
|
||||
? `${e.prefix ?? ""} ${e.firstName ?? ""} ${e.lastName ?? ""}`
|
||||
: "-",
|
||||
shortName: e.orgShortName,
|
||||
}));
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -206,6 +216,10 @@ watch(
|
|||
() => modal.value,
|
||||
() => {
|
||||
modal.value && props.rowId && fetchHistoryPos(props.rowId);
|
||||
|
||||
if (!modal.value) {
|
||||
rows.value = [];
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue