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";
|
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 store = useDataStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
|
||||||
const link = ref<string>("");
|
const link = ref<string>("");
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const storeMenu = useMenuDataStore();
|
const storeMenu = useMenuDataStore();
|
||||||
|
|
@ -40,7 +43,6 @@ const {
|
||||||
const DataStore = useroleUserDataStore();
|
const DataStore = useroleUserDataStore();
|
||||||
const { fetchroleUser } = DataStore;
|
const { fetchroleUser } = DataStore;
|
||||||
|
|
||||||
const id = ref<string>("");
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { tabData, loader } = storeToRefs(store);
|
const { tabData, loader } = storeToRefs(store);
|
||||||
const { changeTab } = store;
|
const { changeTab } = store;
|
||||||
|
|
@ -78,6 +80,17 @@ const options = ref<optionType[]>([
|
||||||
]);
|
]);
|
||||||
const modalLoginLinkage = ref<boolean>(false); //เข้าสู่ระบบ Linkage Center
|
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() {
|
async function fetchmsgNoread() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.msgNoread())
|
.get(config.API.msgNoread())
|
||||||
|
|
@ -726,74 +739,63 @@ async function fetchPermissionsSys() {
|
||||||
<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 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>
|
||||||
|
|
||||||
<!-- <div class="column col-12">
|
<!-- landing page ui -->
|
||||||
|
<div class="column col-12">
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<div class="column q-pb-md justify-center">
|
<div class="column q-py-sm 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-list dense v-for="op in options" :key="op.label">
|
<q-list dense>
|
||||||
<q-item clickable>
|
<q-item clickable :href="landingPageUrl">
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-avatar
|
<q-avatar
|
||||||
:color="op.color"
|
color="blue"
|
||||||
text-color="white"
|
text-color="white"
|
||||||
:icon="op.icon"
|
icon="home"
|
||||||
size="20px"
|
size="24px"
|
||||||
font-size="12px"
|
font-size="14px"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section class="q-py-sm">{{
|
<q-item-section class="q-py-sm">
|
||||||
op.label
|
Landing Page
|
||||||
}}</q-item-section>
|
</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-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-btn-dropdown>
|
</q-btn-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue