update
1.更新跳转外部链接
This commit is contained in:
@@ -30,3 +30,6 @@ VITE_EMERGENCY_SCREEN=http://emer.dev.yg.dt.io/
|
|||||||
#VITE_APP_SUB_jeecg-app-1 = '//localhost:8092'
|
#VITE_APP_SUB_jeecg-app-1 = '//localhost:8092'
|
||||||
|
|
||||||
VITE_PLATFORM = 'YT'
|
VITE_PLATFORM = 'YT'
|
||||||
|
|
||||||
|
# 跳转外部链接
|
||||||
|
VITE_OUT_URL=https://console-jkglpt.iosp.ydpt.tech/hb/healthadmin/index.html?param=
|
||||||
|
|||||||
@@ -39,3 +39,6 @@ VITE_LEGACY = false
|
|||||||
|
|
||||||
# 油田平台CODE
|
# 油田平台CODE
|
||||||
VITE_PLATFORM = 'YT'
|
VITE_PLATFORM = 'YT'
|
||||||
|
|
||||||
|
# 跳转外部链接
|
||||||
|
VITE_OUT_URL=https://console-jkglpt.iosp.ydpt.tech/hb/healthadmin/index.html?param=
|
||||||
|
|||||||
@@ -37,3 +37,6 @@ VITE_USE_PWA = false
|
|||||||
VITE_LEGACY = false
|
VITE_LEGACY = false
|
||||||
|
|
||||||
VITE_PLATFORM = 'YT'
|
VITE_PLATFORM = 'YT'
|
||||||
|
|
||||||
|
# 跳转外部链接
|
||||||
|
VITE_OUT_URL=https://gstest.superwx.cn/healthapiadmin/index.html?param=
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ ENV LANG en_US.UTF-8
|
|||||||
|
|
||||||
ENV VITE_GLOB_API_URL https://xj-api.mcrm.vip:8888
|
ENV VITE_GLOB_API_URL https://xj-api.mcrm.vip:8888
|
||||||
ENV VITE_GLOB_DOMAIN_URL https://xj-api.mcrm.vip:8888
|
ENV VITE_GLOB_DOMAIN_URL https://xj-api.mcrm.vip:8888
|
||||||
|
ENV VITE_OUT_URL https://gstest.superwx.cn/healthapiadmin/index.html?param=
|
||||||
|
|
||||||
RUN echo "server { \
|
RUN echo "server { \
|
||||||
#解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题 \
|
#解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题 \
|
||||||
|
|||||||
@@ -13,29 +13,39 @@
|
|||||||
:subMenuOpenDelay="0.2"
|
:subMenuOpenDelay="0.2"
|
||||||
v-bind="getInlineCollapseOptions"
|
v-bind="getInlineCollapseOptions"
|
||||||
>
|
>
|
||||||
<template v-for="item in items" :key="item.path">
|
<template
|
||||||
|
v-for="item in items.concat(
|
||||||
|
hasPermission('health:health-bank') ? [{ name: '健康银行', icon: 'ant-design:bank-outlined', title: '健康银行' }] : []
|
||||||
|
)"
|
||||||
|
:key="item.path"
|
||||||
|
>
|
||||||
<BasicSubMenuItem :item="item" :theme="theme" :isHorizontal="isHorizontal" />
|
<BasicSubMenuItem :item="item" :theme="theme" :isHorizontal="isHorizontal" />
|
||||||
</template>
|
</template>
|
||||||
</Menu>
|
</Menu>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { MenuState } from './types';
|
import type { MenuState } from './types';
|
||||||
import { computed, defineComponent, reactive, ref, toRefs, unref, watch } from 'vue';
|
import { computed, defineComponent, reactive, ref, toRefs, unref, watch } from 'vue';
|
||||||
import { Menu } from 'ant-design-vue';
|
import { Menu } from 'ant-design-vue';
|
||||||
import BasicSubMenuItem from './components/BasicSubMenuItem.vue';
|
import BasicSubMenuItem from './components/BasicSubMenuItem.vue';
|
||||||
import { MenuModeEnum, MenuTypeEnum } from '/@/enums/menuEnum';
|
import { MenuModeEnum, MenuTypeEnum } from '/@/enums/menuEnum';
|
||||||
import { useOpenKeys } from './useOpenKeys';
|
import { useOpenKeys } from './useOpenKeys';
|
||||||
import { RouteLocationNormalizedLoaded, useRouter } from 'vue-router';
|
import { RouteLocationNormalizedLoaded, useRouter } from 'vue-router';
|
||||||
import { isFunction } from '/@/utils/is';
|
import { isFunction } from '/@/utils/is';
|
||||||
import { basicProps } from './props';
|
import { basicProps } from './props';
|
||||||
import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
|
import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
|
||||||
import { REDIRECT_NAME } from '/@/router/constant';
|
import { REDIRECT_NAME } from '/@/router/constant';
|
||||||
import { useDesign } from '/@/hooks/web/useDesign';
|
import { useDesign } from '/@/hooks/web/useDesign';
|
||||||
import { getCurrentParentPath } from '/@/router/menus';
|
import { getCurrentParentPath } from '/@/router/menus';
|
||||||
import { listenerRouteChange } from '/@/logics/mitt/routeChange';
|
import { listenerRouteChange } from '/@/logics/mitt/routeChange';
|
||||||
import { getAllParentPath } from '/@/router/helper/menuHelper';
|
import { getAllParentPath } from '/@/router/helper/menuHelper';
|
||||||
|
import { usePermission } from '/@/hooks/web/usePermission';
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import { getEnvInfo } from '/@/utils/getEnv';
|
||||||
|
import { getToken } from '/@/utils/auth';
|
||||||
|
import { useLoading } from '/@/components/Loading';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'BasicMenu',
|
name: 'BasicMenu',
|
||||||
components: {
|
components: {
|
||||||
Menu,
|
Menu,
|
||||||
@@ -46,6 +56,10 @@ export default defineComponent({
|
|||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const isClickGo = ref(false);
|
const isClickGo = ref(false);
|
||||||
const currentActiveMenu = ref('');
|
const currentActiveMenu = ref('');
|
||||||
|
const { hasPermission } = usePermission();
|
||||||
|
const [open, close] = useLoading({
|
||||||
|
target: '', // 遮罩挂载的目标元素,默认body
|
||||||
|
});
|
||||||
|
|
||||||
const menuState = reactive<MenuState>({
|
const menuState = reactive<MenuState>({
|
||||||
defaultSelectedKeys: [],
|
defaultSelectedKeys: [],
|
||||||
@@ -112,6 +126,30 @@ export default defineComponent({
|
|||||||
|
|
||||||
//update-begin-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
|
//update-begin-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
|
||||||
async function handleMenuClick({ item, key }: { item: any; key: string; keyPath: string[] }) {
|
async function handleMenuClick({ item, key }: { item: any; key: string; keyPath: string[] }) {
|
||||||
|
if (item.title === '健康银行') {
|
||||||
|
open();
|
||||||
|
const url = getEnvInfo().VITE_GLOB_API_URL;
|
||||||
|
await defHttp
|
||||||
|
.get({
|
||||||
|
url: '/health-system/api/sys/encryptInfo',
|
||||||
|
params: {
|
||||||
|
str: {
|
||||||
|
scheme: url.split('://')[0],
|
||||||
|
host: url.split('://')[1],
|
||||||
|
tokenF: getToken(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
window.open(`${getEnvInfo().VITE_OUT_URL}${res.encryptData}`, '_blank');
|
||||||
|
close();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
close();
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
const { beforeClickFn } = props;
|
const { beforeClickFn } = props;
|
||||||
if (beforeClickFn && isFunction(beforeClickFn)) {
|
if (beforeClickFn && isFunction(beforeClickFn)) {
|
||||||
const flag = await beforeClickFn(key);
|
const flag = await beforeClickFn(key);
|
||||||
@@ -151,10 +189,11 @@ export default defineComponent({
|
|||||||
handleOpenChange,
|
handleOpenChange,
|
||||||
getOpenKeys,
|
getOpenKeys,
|
||||||
...toRefs(menuState),
|
...toRefs(menuState),
|
||||||
|
hasPermission,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
@import './index.less';
|
@import './index.less';
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user