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>
|
||||
|
|
|
|||
|
|
@ -859,6 +859,40 @@ watch(
|
|||
</q-menu>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-else-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
color="secondary"
|
||||
icon="mdi-dots-horizontal-circle-outline"
|
||||
round
|
||||
class="q-pa-none q-ml-xs"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list dense style="min-width: 150px">
|
||||
<q-item
|
||||
v-for="(item, index) in listMenu.filter(
|
||||
(e) => e.type === 'HISTORY' || e.type === 'OWNER_HISTORY'
|
||||
)"
|
||||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="onClickAction(item.type, props.row)"
|
||||
>
|
||||
<q-item-section>
|
||||
<div class="row items-center">
|
||||
<q-icon
|
||||
:color="item.color"
|
||||
size="xs"
|
||||
:name="item.icon"
|
||||
/>
|
||||
<div class="q-pl-md">{{ item.label }}</div>
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-else-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue