add go to landing page
This commit is contained in:
parent
01430c06a1
commit
573b54e511
1 changed files with 61 additions and 59 deletions
|
|
@ -21,10 +21,13 @@ import { useroleUserDataStore } from "@/stores/roleUser";
|
|||
|
||||
import LoginLinkage from "@/components/LoginLinkage.vue";
|
||||
|
||||
const { setVerticalScrollPosition, getVerticalScrollPosition } = scroll;
|
||||
// landing page config url
|
||||
const configParam = {
|
||||
landingPageUrl: import.meta.env.VITE_URL_SSO,
|
||||
};
|
||||
const { setVerticalScrollPosition } = scroll;
|
||||
const store = useDataStore();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const link = ref<string>("");
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const storeMenu = useMenuDataStore();
|
||||
|
|
@ -40,7 +43,6 @@ const {
|
|||
const DataStore = useroleUserDataStore();
|
||||
const { fetchroleUser } = DataStore;
|
||||
|
||||
const id = ref<string>("");
|
||||
const $q = useQuasar();
|
||||
const { tabData, loader } = storeToRefs(store);
|
||||
const { changeTab } = store;
|
||||
|
|
@ -78,6 +80,17 @@ const options = ref<optionType[]>([
|
|||
]);
|
||||
const modalLoginLinkage = ref<boolean>(false); //เข้าสู่ระบบ Linkage Center
|
||||
|
||||
// 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`;
|
||||
}
|
||||
};
|
||||
|
||||
async function fetchmsgNoread() {
|
||||
await http
|
||||
.get(config.API.msgNoread())
|
||||
|
|
@ -726,74 +739,63 @@ async function fetchPermissionsSys() {
|
|||
<div class="text-subtitle2 q-mt-md q-mb-xs text-center">
|
||||
{{ fullname }}
|
||||
</div>
|
||||
<div class="row q-col-gutter-sm q-pa-sm text-center">
|
||||
<div class="col-12">
|
||||
<q-btn
|
||||
flat
|
||||
color="blue-6"
|
||||
label="เข้าสู่ระบบ Linkage Center"
|
||||
v-close-popup
|
||||
@click="modalLoginLinkage = true"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12" id="#logout">
|
||||
<q-btn
|
||||
push
|
||||
size="sm"
|
||||
color="primary"
|
||||
label="ออกจากระบบ"
|
||||
v-close-popup
|
||||
@click="doLogout"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div id="#logout">
|
||||
<q-btn
|
||||
color="blue"
|
||||
label="เข้าสู่ระบบ Linkage Center"
|
||||
push
|
||||
size="sm"
|
||||
v-close-popup
|
||||
@click="modalLoginLinkage = true"
|
||||
/>
|
||||
</div>
|
||||
<div id="#logout" class="q-mt-sm">
|
||||
<q-btn
|
||||
color="primary"
|
||||
label="ออกจากระบบ"
|
||||
push
|
||||
size="sm"
|
||||
v-close-popup
|
||||
@click="doLogout"
|
||||
/>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- <div class="column col-12">
|
||||
<!-- landing page ui -->
|
||||
<div class="column col-12">
|
||||
<q-separator />
|
||||
<div class="column q-pb-md justify-center">
|
||||
<div class="text-overline text-grey q-px-md q-pt-sm">
|
||||
<div class="column q-py-sm justify-center">
|
||||
<!-- <div class="text-overline text-grey q-px-md q-pt-sm">
|
||||
เลือกโหมด
|
||||
</div>
|
||||
<q-list dense v-for="op in options" :key="op.label">
|
||||
<q-item clickable>
|
||||
</div> -->
|
||||
<q-list dense>
|
||||
<q-item clickable :href="landingPageUrl">
|
||||
<q-item-section avatar>
|
||||
<q-avatar
|
||||
:color="op.color"
|
||||
color="blue"
|
||||
text-color="white"
|
||||
:icon="op.icon"
|
||||
size="20px"
|
||||
font-size="12px"
|
||||
icon="home"
|
||||
size="24px"
|
||||
font-size="14px"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section class="q-py-sm">{{
|
||||
op.label
|
||||
}}</q-item-section>
|
||||
<q-item-section class="q-py-sm">
|
||||
Landing Page
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item clickable @click="modalLoginLinkage = true">
|
||||
<q-item-section avatar>
|
||||
<q-avatar
|
||||
color="primary"
|
||||
text-color="white"
|
||||
icon="login"
|
||||
size="24px"
|
||||
font-size="14px"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section class="q-py-sm">
|
||||
เข้าสู่ระบบ Linkage Center
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item clickable @click="doLogout">
|
||||
<q-item-section avatar>
|
||||
<q-avatar
|
||||
color="red"
|
||||
text-color="white"
|
||||
icon="logout"
|
||||
size="24px"
|
||||
font-size="14px"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section class="q-py-sm">
|
||||
ออกจากระบบ
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</q-btn-dropdown>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue