|
@@ -180,10 +180,6 @@ const goDetail = () => {
|
|
|
|
|
|
|
|
// 处理查看按钮点击事件
|
|
// 处理查看按钮点击事件
|
|
|
const handleView = async (item: Item) => {
|
|
const handleView = async (item: Item) => {
|
|
|
- console.log("查看", item);
|
|
|
|
|
-
|
|
|
|
|
- console.log("*************************", userStore.getUser.username);
|
|
|
|
|
-
|
|
|
|
|
if (item.label === "OA办公系统") {
|
|
if (item.label === "OA办公系统") {
|
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
|
const res = await ssoLogin({
|
|
const res = await ssoLogin({
|
|
@@ -197,18 +193,12 @@ const handleView = async (item: Item) => {
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- console.log("未登录》》》》》》》》》》》");
|
|
|
|
|
- window.open("https://yfoa.keruioil.com", "_blank");
|
|
|
|
|
|
|
+ router.push({ path: "/login" });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (item.label === "设备管理系统 (PMS)") {
|
|
if (item.label === "设备管理系统 (PMS)") {
|
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
|
- // window.open(
|
|
|
|
|
- // "https://iot.deepoil.cc/portalLogin?username=" +
|
|
|
|
|
- // userStore.getUser.username,
|
|
|
|
|
- // "_blank"
|
|
|
|
|
- // );
|
|
|
|
|
window.open(
|
|
window.open(
|
|
|
import.meta.env.VITE_PMS_URL +
|
|
import.meta.env.VITE_PMS_URL +
|
|
|
"/portalLogin?username=" +
|
|
"/portalLogin?username=" +
|
|
@@ -216,29 +206,31 @@ const handleView = async (item: Item) => {
|
|
|
"_blank",
|
|
"_blank",
|
|
|
);
|
|
);
|
|
|
} else {
|
|
} else {
|
|
|
- console.log("未登录");
|
|
|
|
|
- window.open(import.meta.env.VITE_PMS_URL, "_blank");
|
|
|
|
|
|
|
+ router.push({ path: "/login" });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (item.label === "中航北斗智慧管理系统") {
|
|
if (item.label === "中航北斗智慧管理系统") {
|
|
|
- window.open("https://zhbdgps.cn", "_blank");
|
|
|
|
|
|
|
+ // window.open("https://zhbdgps.cn", "_blank");
|
|
|
|
|
+ if (userStore.getUser.username && getAccessToken()) {
|
|
|
|
|
+ window.open("https://zhbdgps.cn", "_blank");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ router.push({ path: "/login" });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (item.label === "客户管理(CRM)") {
|
|
if (item.label === "客户管理(CRM)") {
|
|
|
- window.open("https://www.xiaoshouyi.com/sfa", "_blank");
|
|
|
|
|
|
|
+ // window.open("https://www.xiaoshouyi.com/sfa", "_blank");
|
|
|
|
|
+ if (userStore.getUser.username && getAccessToken()) {
|
|
|
|
|
+ window.open("https://www.xiaoshouyi.com/sfa", "_blank");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ router.push({ path: "/login" });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (item.label === "智能连油系统") {
|
|
if (item.label === "智能连油系统") {
|
|
|
const extraParam = "source=zhly";
|
|
const extraParam = "source=zhly";
|
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
|
- // window.open(
|
|
|
|
|
- // "https://iot.deepoil.cc/portalLogin?username=" +
|
|
|
|
|
- // userStore.getUser.username +
|
|
|
|
|
- // "&" +
|
|
|
|
|
- // extraParam,
|
|
|
|
|
- // "_blank",
|
|
|
|
|
- // );
|
|
|
|
|
window.open(
|
|
window.open(
|
|
|
import.meta.env.VITE_PMS_URL +
|
|
import.meta.env.VITE_PMS_URL +
|
|
|
"/portalLogin?username=" +
|
|
"/portalLogin?username=" +
|
|
@@ -248,7 +240,7 @@ const handleView = async (item: Item) => {
|
|
|
"_blank",
|
|
"_blank",
|
|
|
);
|
|
);
|
|
|
} else {
|
|
} else {
|
|
|
- window.open(import.meta.env.VITE_PMS_URL + "?" + extraParam, "_blank");
|
|
|
|
|
|
|
+ router.push({ path: "/login" });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|