เพิ่มเมนูไปหน้า Landing Page
This commit is contained in:
parent
79f829fa3d
commit
ec0dd6c3ad
1 changed files with 54 additions and 6 deletions
|
|
@ -18,6 +18,11 @@ import type {
|
||||||
} from "../interface/request/main/main";
|
} from "../interface/request/main/main";
|
||||||
import { menuList } from "../interface/request/main/main";
|
import { menuList } from "../interface/request/main/main";
|
||||||
|
|
||||||
|
// landing page config url
|
||||||
|
const configParam = {
|
||||||
|
landingPageUrl: import.meta.env.VITE_URL_SSO,
|
||||||
|
};
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useDataStore();
|
const store = useDataStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
@ -304,7 +309,7 @@ function handleButtonClick() {
|
||||||
const currentPath = route.name;
|
const currentPath = route.name;
|
||||||
const queryParams = { role: "admin" }; // Replace with your query parameters
|
const queryParams = { role: "admin" }; // Replace with your query parameters
|
||||||
const queryString = new URLSearchParams(queryParams).toString();
|
const queryString = new URLSearchParams(queryParams).toString();
|
||||||
const findRole = role.value.includes('SUPER_ADMIN')
|
const findRole = role.value.includes("SUPER_ADMIN");
|
||||||
// Assuming config.generatePopupPath() returns a base URL
|
// Assuming config.generatePopupPath() returns a base URL
|
||||||
const popupBasePath = config.generatePopupPath(findRole);
|
const popupBasePath = config.generatePopupPath(findRole);
|
||||||
|
|
||||||
|
|
@ -316,6 +321,17 @@ function handleButtonClick() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// landing page redirect
|
||||||
|
const landingPageUrl = () => {
|
||||||
|
if (window.location.hostname === "bmasso.bma.go.th") {
|
||||||
|
return `${configParam.landingPageUrl}/landing?mode=dev`;
|
||||||
|
} else if (window.location.hostname === "bma-ehr.frappet.com") {
|
||||||
|
return `${configParam.landingPageUrl}/landing?mode=prod`;
|
||||||
|
} else {
|
||||||
|
return `${configParam.landingPageUrl}/landing?mode=dev`;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชัน watch การเปลี่ยนแปลงของค่า notiTrigger
|
* ฟังก์ชัน watch การเปลี่ยนแปลงของค่า notiTrigger
|
||||||
* เมื่อค่า notiTrigger เปลี่ยนเป็น false,
|
* เมื่อค่า notiTrigger เปลี่ยนเป็น false,
|
||||||
|
|
@ -561,7 +577,7 @@ onUnmounted(() => {
|
||||||
<div class="text-subtitle2 q-mt-md q-mb-xs text-center">
|
<div class="text-subtitle2 q-mt-md q-mb-xs text-center">
|
||||||
{{ fullname }}
|
{{ fullname }}
|
||||||
</div>
|
</div>
|
||||||
<div id="#logout">
|
<!-- <div id="#logout">
|
||||||
<q-btn
|
<q-btn
|
||||||
color="primary"
|
color="primary"
|
||||||
label="ออกจากระบบ"
|
label="ออกจากระบบ"
|
||||||
|
|
@ -569,17 +585,33 @@ onUnmounted(() => {
|
||||||
size="sm"
|
size="sm"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="doLogout"
|
@click="doLogout"
|
||||||
/><!-- -->
|
/>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="column col-12">
|
<div class="column col-12">
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<div class="column q-pb-md justify-center">
|
<div class="column q-pb-md justify-center">
|
||||||
<div class="text-overline text-grey q-px-md q-pt-sm">
|
<!-- <div class="text-overline text-grey q-px-md q-pt-sm">
|
||||||
เลือกโหมด
|
เลือกโหมด
|
||||||
</div>
|
</div> -->
|
||||||
<!-- <q-option-group v-model="group" :options="options" color="primary"/> -->
|
<!-- <q-option-group v-model="group" :options="options" color="primary"/> -->
|
||||||
|
<q-list dense>
|
||||||
|
<q-item clickable :href="landingPageUrl">
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-avatar
|
||||||
|
color="blue"
|
||||||
|
text-color="white"
|
||||||
|
icon="home"
|
||||||
|
size="20px"
|
||||||
|
font-size="12px"
|
||||||
|
/>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section class="q-py-sm">
|
||||||
|
Landing Page
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
<q-list dense v-for="op in options" :key="op.label">
|
<q-list dense v-for="op in options" :key="op.label">
|
||||||
<q-item clickable>
|
<q-item clickable>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
|
|
@ -596,6 +628,22 @@ onUnmounted(() => {
|
||||||
}}</q-item-section>
|
}}</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
<q-list dense>
|
||||||
|
<q-item clickable @click="doLogout">
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-avatar
|
||||||
|
color="red"
|
||||||
|
text-color="white"
|
||||||
|
icon="logout"
|
||||||
|
size="20px"
|
||||||
|
font-size="12px"
|
||||||
|
/>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section class="q-py-sm">
|
||||||
|
ออกจากระบบ
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue