fix: Disable

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-11-03 16:21:37 +07:00
parent c33b218455
commit a3ddff981a
2 changed files with 24 additions and 1 deletions

View file

@ -1,6 +1,7 @@
<script setup lang="ts">
import { ref, onMounted, watch } from "vue";
import { useQuasar } from "quasar";
import { storeToRefs } from "pinia";
import http from "@/plugins/http";
import config from "@/app.config";
@ -8,6 +9,7 @@ import { useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { updateCurrentPage } from "@/utils/functions";
import { tokenParsed } from "@/plugins/auth";
import { usekeycloakPosition } from "@/stores/keycloakPosition";
/** importType*/
import type { QTableProps } from "quasar";
@ -25,6 +27,7 @@ import DialogAddUser from "@/modules/02_users/components/Users/DialogFormUser.vu
/** use*/
const $q = useQuasar();
const router = useRouter();
const { dataPosition } = storeToRefs(usekeycloakPosition());
const {
dialogRemove,
messageError,
@ -71,6 +74,11 @@ const nodeTree = ref<Array<NodeTree>>([
totalRootPositionNextVacant: 0,
children: [] as NodeTree[],
isOfficer: false,
orgRootDnaId: "",
orgChild1DnaId: "",
orgChild2DnaId: "",
orgChild3DnaId: "",
orgChild4DnaId: "",
},
]);
const lazy = ref(nodeTree);
@ -428,6 +436,19 @@ watch(
}
);
/**
* ตรวจสอบการแสดงป action
* @param keycloakID keycloakID รหสผใชงาน
* @returns true หากผใชงานมทธในการดำเนนการ
*/
function checkhideBtnAction(keycloakID: string) {
if (dataPosition.value?.keycloak === keycloakID) {
return false;
} else {
return true;
}
}
/**
* hook ทำงานเมอมการเรยกใชงาน Components
* งขอมลรายชอผใชงาน
@ -667,8 +688,9 @@ onMounted(async () => {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-td auto-width>
<q-btn
v-if="checkhideBtnAction(props.row.id)"
flat
dense
icon="mdi-dots-vertical"

View file

@ -273,6 +273,7 @@ watch(modal, async (val) => {
clickable
active-class="my-list-link text-primary text-weight-medium"
class="row col-12 items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
:disable="isAPIKey"
>
<div>
<div