|
@@ -1062,18 +1062,6 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (app.label === "OA办公") {
|
|
if (app.label === "OA办公") {
|
|
|
- // if (userStore.getUser.username && getAccessToken()) {
|
|
|
|
|
- // const res = await ssoLogin({ username: userStore.getUser.username });
|
|
|
|
|
- // if (res) {
|
|
|
|
|
- // window.open(
|
|
|
|
|
- // `https://yfoa.keruioil.com/wui/index.html?ssoToken=${res}#/main`,
|
|
|
|
|
- // "_blank",
|
|
|
|
|
- // );
|
|
|
|
|
- // }
|
|
|
|
|
- // } else {
|
|
|
|
|
- // router.push({ path: "/login" });
|
|
|
|
|
- // }
|
|
|
|
|
-
|
|
|
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
|
const ua = window.navigator.userAgent; // const ua = navigator.userAgent;
|
|
const ua = window.navigator.userAgent; // const ua = navigator.userAgent;
|
|
|
const isDesktop =
|
|
const isDesktop =
|
|
@@ -1429,138 +1417,47 @@ onMounted(async () => {
|
|
|
|
|
|
|
|
const handleNoticeItemClick = async (notice: any) => {
|
|
const handleNoticeItemClick = async (notice: any) => {
|
|
|
const res = await ssoLogin({
|
|
const res = await ssoLogin({
|
|
|
- username: userStore.getUser.username,
|
|
|
|
|
|
|
+ workcode: userStore.getUser.username,
|
|
|
|
|
+ uri: `https://yfoa.keruioil.com/spa/document/index.jsp?openAttachment=0&id=${notice.id}`,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- if (res) {
|
|
|
|
|
- const ua = window.navigator.userAgent.toLowerCase();
|
|
|
|
|
- if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
|
|
- dd.biz.util.openLink({
|
|
|
|
|
- url:
|
|
|
|
|
- "https://yfoa.keruioil.com/wui/index.html" +
|
|
|
|
|
- "?ssoToken=" +
|
|
|
|
|
- res +
|
|
|
|
|
- "#/main", // 先跳你的 SSO 链接
|
|
|
|
|
- onSuccess: () => {
|
|
|
|
|
- // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- dd.biz.util.openLink({
|
|
|
|
|
- url: `https://yfoa.keruioil.com/spa/document/index.jsp?openAttachment=0&id=${notice.id}`,
|
|
|
|
|
- });
|
|
|
|
|
- }, 100);
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- const loading = ElLoading.service({
|
|
|
|
|
- lock: true,
|
|
|
|
|
- text: "正在跳转,请稍候...",
|
|
|
|
|
- background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
- });
|
|
|
|
|
- const newTab = window.open("", "_blank");
|
|
|
|
|
- newTab.location.href =
|
|
|
|
|
- "https://yfoa.keruioil.com/wui/index.html" +
|
|
|
|
|
- "?ssoToken=" +
|
|
|
|
|
- res +
|
|
|
|
|
- "#/main";
|
|
|
|
|
-
|
|
|
|
|
- setTimeout(function () {
|
|
|
|
|
- newTab.location.href = `https://yfoa.keruioil.com/spa/document/index.jsp?openAttachment=0&id=${notice.id}`;
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- }, 500);
|
|
|
|
|
- }, 100);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ window.open(JSON.parse(res).ssoUrl, "_blank");
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const handleTask = async (row: any) => {
|
|
const handleTask = async (row: any) => {
|
|
|
const res = await ssoLogin({
|
|
const res = await ssoLogin({
|
|
|
- username: userStore.getUser.username,
|
|
|
|
|
|
|
+ workcode: userStore.getUser.username,
|
|
|
|
|
+ uri: `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1776063595284#/main/workflow/req?requestid=${row.requestId}`,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- if (res) {
|
|
|
|
|
|
|
+ if (JSON.parse(res).ssoUrl) {
|
|
|
const ua = window.navigator.userAgent.toLowerCase();
|
|
const ua = window.navigator.userAgent.toLowerCase();
|
|
|
if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
dd.biz.util.openLink({
|
|
dd.biz.util.openLink({
|
|
|
- url:
|
|
|
|
|
- "https://yfoa.keruioil.com/wui/index.html" +
|
|
|
|
|
- "?ssoToken=" +
|
|
|
|
|
- res +
|
|
|
|
|
- "#/main", // 先跳你的 SSO 链接
|
|
|
|
|
- onSuccess: () => {
|
|
|
|
|
- // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- dd.biz.util.openLink({
|
|
|
|
|
- url: `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1776063595284#/main/workflow/req?requestid=${row.requestId}`,
|
|
|
|
|
- });
|
|
|
|
|
- }, 100);
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ url: JSON.parse(res).ssoUrl, // 先跳你的 SSO 链接
|
|
|
|
|
+ onSuccess: () => {},
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- const loading = ElLoading.service({
|
|
|
|
|
- lock: true,
|
|
|
|
|
- text: "正在跳转,请稍候...",
|
|
|
|
|
- background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
- });
|
|
|
|
|
- const newTab = window.open("", "_blank");
|
|
|
|
|
- newTab.location.href =
|
|
|
|
|
- "https://yfoa.keruioil.com/wui/index.html" +
|
|
|
|
|
- "?ssoToken=" +
|
|
|
|
|
- res +
|
|
|
|
|
- "#/main";
|
|
|
|
|
-
|
|
|
|
|
- setTimeout(function () {
|
|
|
|
|
- newTab.location.href = `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1776063595284#/main/workflow/req?requestid=${row.requestId}`;
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- }, 500);
|
|
|
|
|
- }, 100);
|
|
|
|
|
|
|
+ window.open(JSON.parse(res).ssoUrl, "_blank");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const openConsult = async () => {
|
|
const openConsult = async () => {
|
|
|
const res = await ssoLogin({
|
|
const res = await ssoLogin({
|
|
|
- username: userStore.getUser.username,
|
|
|
|
|
|
|
+ workcode: userStore.getUser.username,
|
|
|
|
|
+ uri: `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1778289187850#/main/workflow/req?iscreate=1&workflowid=488`,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- if (res) {
|
|
|
|
|
|
|
+ if (JSON.parse(res).ssoUrl) {
|
|
|
const ua = window.navigator.userAgent.toLowerCase();
|
|
const ua = window.navigator.userAgent.toLowerCase();
|
|
|
if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
|
|
|
dd.biz.util.openLink({
|
|
dd.biz.util.openLink({
|
|
|
- url:
|
|
|
|
|
- "https://yfoa.keruioil.com/wui/index.html" +
|
|
|
|
|
- "?ssoToken=" +
|
|
|
|
|
- res +
|
|
|
|
|
- "#/main", // 先跳你的 SSO 链接
|
|
|
|
|
- onSuccess: () => {
|
|
|
|
|
- // 延迟跳目标业务地址(和你原来 setTimeout 逻辑一致)
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- dd.biz.util.openLink({
|
|
|
|
|
- url: `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1778289187850#/main/workflow/req?iscreate=1&workflowid=488`,
|
|
|
|
|
- });
|
|
|
|
|
- }, 100);
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ url: JSON.parse(res).ssoUrl, // 先跳你的 SSO 链接
|
|
|
|
|
+ onSuccess: () => {},
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- const loading = ElLoading.service({
|
|
|
|
|
- lock: true,
|
|
|
|
|
- text: "正在跳转,请稍候...",
|
|
|
|
|
- background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
- });
|
|
|
|
|
- const newTab = window.open("", "_blank");
|
|
|
|
|
- newTab.location.href =
|
|
|
|
|
- "https://yfoa.keruioil.com/wui/index.html" +
|
|
|
|
|
- "?ssoToken=" +
|
|
|
|
|
- res +
|
|
|
|
|
- "#/main";
|
|
|
|
|
-
|
|
|
|
|
- setTimeout(function () {
|
|
|
|
|
- newTab.location.href = `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1778289187850#/main/workflow/req?iscreate=1&workflowid=488`;
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- }, 500);
|
|
|
|
|
- }, 100);
|
|
|
|
|
|
|
+ window.open(JSON.parse(res).ssoUrl, "_blank");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|