|
@@ -574,6 +574,7 @@ import {
|
|
|
getRedHeadFiles,
|
|
getRedHeadFiles,
|
|
|
getNews,
|
|
getNews,
|
|
|
srmLogin,
|
|
srmLogin,
|
|
|
|
|
+ ehrLogin,
|
|
|
} from "@/api/user";
|
|
} from "@/api/user";
|
|
|
import { useUserStore } from "@/stores/useUserStore";
|
|
import { useUserStore } from "@/stores/useUserStore";
|
|
|
import { useThemeStore } from "@/stores/useThemeStore";
|
|
import { useThemeStore } from "@/stores/useThemeStore";
|
|
@@ -729,6 +730,7 @@ let boldLabes = ref([
|
|
|
"鸿盘",
|
|
"鸿盘",
|
|
|
"智能钻井",
|
|
"智能钻井",
|
|
|
"供应商管理(SRM)",
|
|
"供应商管理(SRM)",
|
|
|
|
|
+ "人力资源(EHR)",
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
const searchKeyword = ref("");
|
|
const searchKeyword = ref("");
|
|
@@ -953,23 +955,7 @@ const protectedOpen = (url: string) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
let dialogVisible = ref(false);
|
|
let dialogVisible = ref(false);
|
|
|
-const confirmSrm = async () => {
|
|
|
|
|
- dialogVisible.value = false;
|
|
|
|
|
- if (userStore.getUser.username && getAccessToken()) {
|
|
|
|
|
- const res = await srmLogin({
|
|
|
|
|
- username: userStore.getUser.username,
|
|
|
|
|
- });
|
|
|
|
|
|
|
|
|
|
- if (res) {
|
|
|
|
|
- window.open(
|
|
|
|
|
- `https://srmqas.deepoil.cc/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`,
|
|
|
|
|
- "_blank",
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- router.push({ path: "/login" });
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
const handlePortalAppClick = async (app: PortalApp) => {
|
|
const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
if (!app.label) return;
|
|
if (!app.label) return;
|
|
|
|
|
|
|
@@ -1063,6 +1049,23 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (app.label === "人力资源(EHR)") {
|
|
|
|
|
+ if (userStore.getUser.username && getAccessToken()) {
|
|
|
|
|
+ const res = await ehrLogin({
|
|
|
|
|
+ username: userStore.getUser.username,
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ if (res) {
|
|
|
|
|
+ window.open(
|
|
|
|
|
+ `${res.ehrUrl}/gateway/login/free?loginfree_licence=${res.licence}&signature=${res.sign}&redirect_url=/proxy/hr/home`,
|
|
|
|
|
+ "_blank",
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ router.push({ path: "/login" });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (app.label === "供应商管理(SRM)") {
|
|
if (app.label === "供应商管理(SRM)") {
|
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
|
const res = await srmLogin({
|
|
const res = await srmLogin({
|