|
@@ -233,7 +233,10 @@
|
|
|
v-if="section.apps?.length"
|
|
v-if="section.apps?.length"
|
|
|
class="grid grid-cols-[repeat(2,minmax(0,1fr))] gap-2 p-6 px-3 md:px-4 md:grid-cols-[repeat(3,minmax(0,1fr))] xl:grid-cols-[repeat(3,minmax(0,1fr))]"
|
|
class="grid grid-cols-[repeat(2,minmax(0,1fr))] gap-2 p-6 px-3 md:px-4 md:grid-cols-[repeat(3,minmax(0,1fr))] xl:grid-cols-[repeat(3,minmax(0,1fr))]"
|
|
|
>
|
|
>
|
|
|
- <template v-for="(app, appIndex) in section.apps" :key="`${section.code}-${appIndex}-${app.label}`">
|
|
|
|
|
|
|
+ <template
|
|
|
|
|
+ v-for="(app, appIndex) in section.apps"
|
|
|
|
|
+ :key="`${section.code}-${appIndex}-${app.label}`"
|
|
|
|
|
+ >
|
|
|
<button
|
|
<button
|
|
|
v-if="app.key === 'fm'"
|
|
v-if="app.key === 'fm'"
|
|
|
v-hasPermi="['portal:financial:view']"
|
|
v-hasPermi="['portal:financial:view']"
|
|
@@ -1423,6 +1426,36 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
router.push({ path: "/login" });
|
|
router.push({ path: "/login" });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (app.key === "fm") {
|
|
|
|
|
+ const ua = window.navigator.userAgent;
|
|
|
|
|
+ const isDesktop =
|
|
|
|
|
+ ua.includes("DingTalk") &&
|
|
|
|
|
+ (ua.includes("Windows") || ua.includes("Macintosh"));
|
|
|
|
|
+
|
|
|
|
|
+ let ua2 = navigator.userAgent.toLowerCase();
|
|
|
|
|
+ let isMobile = ua2.indexOf("dingtalk") > -1;
|
|
|
|
|
+ const res = await getMCSsoToken();
|
|
|
|
|
+ if (ua2.includes("dingtalk") || ua2.includes("dingtalkwork")) {
|
|
|
|
|
+ if (isMobile && !isDesktop) {
|
|
|
|
|
+ dd.biz.util.openLink({
|
|
|
|
|
+ url: `${"https://report.deepoil.cc/webroot/decision/v10/entry/access/e836fb5b-092c-4d64-a324-3beeb4fac0cc?preview=true&page_number=1"}&ssoToken=${res}`,
|
|
|
|
|
+ onSuccess: () => {},
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (isDesktop) {
|
|
|
|
|
+ window.open(
|
|
|
|
|
+ `${"https://report.deepoil.cc/webroot/decision/v10/entry/access/e836fb5b-092c-4d64-a324-3beeb4fac0cc?preview=true&page_number=1"}&ssoToken=${res}`,
|
|
|
|
|
+ "_blank",
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 浏览器环境
|
|
|
|
|
+ window.open(
|
|
|
|
|
+ `${"https://report.deepoil.cc/webroot/decision/v10/entry/access/e836fb5b-092c-4d64-a324-3beeb4fac0cc?preview=true&page_number=1"}&ssoToken=${res}`,
|
|
|
|
|
+ "_blank",
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
async function loginWithDingTalk() {
|
|
async function loginWithDingTalk() {
|