no message

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-08 18:12:08 +07:00
parent b873698b92
commit b3cfb06dc1
4 changed files with 416 additions and 214 deletions

View file

@ -86,6 +86,23 @@ const tabScroll = () => {
return route.name == "registryDetail";
};
const tabScroll2 = () => {
// let pathName = "";
// let childernName: any = [];
// tabList.forEach((e: any) => {
// childernName = e.childern;
// });
// console.log(childernName);
// pathName = childernName.find((e: any) => console.log(e));
// console.log(pathName);
// if (pathName) {
// return true;
// }
return route.name == "manual";
};
/**
* toggleBtnRight มย ขยาย drawer ขวา
*/
@ -182,6 +199,8 @@ const activeBtn = () => {
* งจ boolean งตอง set
*/
onMounted(async () => {
console.log(tabList);
myEventHandler(null, false);
window.addEventListener("resize", (e: any) => {
myEventHandler(e, true);
@ -236,9 +255,11 @@ const myEventHandler = (e: any, setSCroll: boolean) => {
*/
const activeMenu = (path: string) => {
if (path == "dashboard" && route.fullPath == "/") return true;
if (path == "registry" && route.fullPath == "/registry-employee") return false;
if (path == "registry" && route.fullPath.includes(`/registry-employee/edit`)) return false;
if (path == "registry" && route.fullPath == "/registry-employee")
return false;
if (path == "registry" && route.fullPath.includes(`/registry-employee/edit`))
return false;
if (path == "registry" && route.fullPath == "/") return false;
// if (path != "registry" && path == "registryEmployee" && route.fullPath == "/registryEmployee") return true;
const bool = route.fullPath.includes(`/${path}`);
@ -252,6 +273,9 @@ const activeMenu = (path: string) => {
const activeTab = (tag: string) => {
return tabData.value == tag;
};
const activeTab2 = (tag: string) => {
return tabData.value == tag;
};
/**
* คลกเพอให router หร scroll ไปยงตำแหนงนนๆ
@ -367,6 +391,10 @@ if (keycloak.tokenParsed != null) {
fullname.value = keycloak.tokenParsed.name;
role.value = keycloak.tokenParsed.role;
}
const clickTag = (val: string) => {
console.log(val);
router.push(val);
};
</script>
<!-- โครงเว -->
@ -829,6 +857,41 @@ if (keycloak.tokenParsed != null) {
</q-scroll-area>
</q-drawer>
<!-- drawer page manual -->
<q-drawer
side="right"
class="bg-grey-2"
show-if-above
v-if="tabScroll2()"
v-model="drawerR"
:width="250"
:breakpoint="1023"
>
<q-scroll-area class="fit">
<q-list padding>
<q-item
v-for="(tabItem, index) in tabList"
:key="index"
:id="'tab--' + tabItem.no"
class="tabNative"
active-class="text-blue-7 active-item text-weight-medium tabActive"
:active="activeTab2(tabItem.no)"
clickable
v-ripple
dense
exact
@click="clickTag(tabItem.path)"
>
<q-item-section>
<q-item-label
><q-icon size="11px" name="mdi-circle-medium" />
<span class="q-pl-xs">{{ tabItem.label }}</span>
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-scroll-area>
</q-drawer>
<!-- drawer page placement2/detail/:id -->
<!-- <q-drawer
side="right"