แก้ไขการแสดง button
This commit is contained in:
parent
c21a95f486
commit
97bb5a279c
3 changed files with 75 additions and 27 deletions
|
|
@ -164,11 +164,11 @@ const action = ref<string>("");
|
|||
onMounted(() => {
|
||||
retireld.value = retireld_params.toString();
|
||||
console.log(retireld_params);
|
||||
|
||||
fecthlistprofile(retireld.value);
|
||||
});
|
||||
const round = ref<number>();
|
||||
const typeReport = ref<string>("");
|
||||
const statusReport = ref<boolean>();
|
||||
// fecthlist
|
||||
const fecthlistprofile = async (id: string) => {
|
||||
showLoader();
|
||||
|
|
@ -177,6 +177,7 @@ const fecthlistprofile = async (id: string) => {
|
|||
.then((res) => {
|
||||
console.log(res);
|
||||
round.value = res.data.result.round;
|
||||
statusReport.value = res.data.result.json;
|
||||
typeReport.value = res.data.result.typeReport;
|
||||
rows.value = res.data.result.profile.map((e: any) => ({
|
||||
id: e.id,
|
||||
|
|
@ -193,6 +194,7 @@ const fecthlistprofile = async (id: string) => {
|
|||
reason: e.reason,
|
||||
remove: e.remove,
|
||||
}));
|
||||
console.log(statusReport.value);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -320,11 +322,11 @@ const visibleNote = computed(() => {
|
|||
// .onCancel(() => {})
|
||||
// .onDismiss(() => {});
|
||||
// };
|
||||
// const classrow = (prop: any) => {
|
||||
// if (profileId.value!=='' && prop.profileId === profileId.value) {
|
||||
// return "color: #26a69a;";
|
||||
// } else return "";
|
||||
// };
|
||||
const classrow = (prop: any) => {
|
||||
if (profileId.value !== "" && prop.profileId === profileId.value) {
|
||||
return "color: #26a69a;";
|
||||
} else return "";
|
||||
};
|
||||
const paging = ref<boolean>(true);
|
||||
const pagination = ref({
|
||||
sortBy: "order",
|
||||
|
|
@ -360,9 +362,10 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
:profile-id="profileId"
|
||||
:UpdateListId="UpdateListId"
|
||||
v-if="
|
||||
typeReport == null || typeReport == 'ADD' || typeReport == 'ADD'
|
||||
statusReport !== true || typeReport == 'ADD' || typeReport == ''
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- <q-btn flat round style="color: #016987;" icon="save" @click="saveList">
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn> -->
|
||||
|
|
@ -454,8 +457,14 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
</div>
|
||||
</q-th>
|
||||
<q-th auto-width />
|
||||
<q-th auto-width v-if="typeReport === 'EDIT' || round === 1" />
|
||||
<q-th auto-width v-if="typeReport === 'REMOVE' || round === 1" />
|
||||
<q-th
|
||||
auto-width
|
||||
v-if="typeReport === 'EDIT' || statusReport !== true"
|
||||
/>
|
||||
<q-th
|
||||
auto-width
|
||||
v-if="typeReport === 'REMOVE' || statusReport !== true"
|
||||
/>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
|
|
@ -523,7 +532,11 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
<q-tooltip>ดูข้อมูลทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn> -->
|
||||
</q-td>
|
||||
<q-td auto-width v-if="typeReport === 'EDIT' || round === 1">
|
||||
|
||||
<q-td
|
||||
auto-width
|
||||
v-if="typeReport === 'EDIT' || statusReport !== true"
|
||||
>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
|
|
@ -540,7 +553,10 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
<q-tooltip>กรอกเหตุผล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td auto-width v-if="typeReport === 'REMOVE' || round === 1">
|
||||
<q-td
|
||||
auto-width
|
||||
v-if="typeReport === 'REMOVE' || statusReport !== true"
|
||||
>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
|
|
@ -550,7 +566,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
@click.stop="
|
||||
(modalNote = true),
|
||||
(action = 'delete'),
|
||||
(note = props.row.remove),
|
||||
(note = props.row.reason),
|
||||
(retireProfileId = props.row.id)
|
||||
"
|
||||
><q-tooltip>ลบข้อมูล</q-tooltip></q-btn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue