|
@@ -6,34 +6,33 @@
|
|
* @FilePath: /MedicalWisdomCheckSys/src/app.tsx
|
|
* @FilePath: /MedicalWisdomCheckSys/src/app.tsx
|
|
*/
|
|
*/
|
|
import type { Settings as LayoutSettings } from '@ant-design/pro-layout';
|
|
import type { Settings as LayoutSettings } from '@ant-design/pro-layout';
|
|
-import { PageLoading } from '@ant-design/pro-layout';
|
|
|
|
-import type { RunTimeLayoutConfig} from 'umi';
|
|
|
|
-import {history, Link } from 'umi';
|
|
|
|
|
|
+import { RunTimeLayoutConfig } from 'umi';
|
|
|
|
+import { history, Link } from 'umi';
|
|
import { notification, Modal } from 'antd';
|
|
import { notification, Modal } from 'antd';
|
|
// import 'yet-another-abortcontroller-polyfill'
|
|
// import 'yet-another-abortcontroller-polyfill'
|
|
import RightContent from '@/components/RightContent';
|
|
import RightContent from '@/components/RightContent';
|
|
|
|
|
|
import { BookOutlined, LinkOutlined } from '@ant-design/icons';
|
|
import { BookOutlined, LinkOutlined } from '@ant-design/icons';
|
|
import iconEnum from './menuIcons';
|
|
import iconEnum from './menuIcons';
|
|
-import {loginOut} from '@/utils';
|
|
|
|
|
|
+import { loginOut } from '@/utils';
|
|
import logoIcon from '../public/logo.png';
|
|
import logoIcon from '../public/logo.png';
|
|
|
|
|
|
import { getMenus } from './services/user';
|
|
import { getMenus } from './services/user';
|
|
-import {updateUserInfo} from '@/pages/user/Login/service';
|
|
|
|
|
|
+import { updateUserInfo } from '@/pages/user/Login/service';
|
|
|
|
|
|
-import type { RequestOptionsInit,Context } from 'umi-request';
|
|
|
|
|
|
+import type { RequestOptionsInit, Context } from 'umi-request';
|
|
|
|
|
|
const isDev = process.env.NODE_ENV === 'development';
|
|
const isDev = process.env.NODE_ENV === 'development';
|
|
|
|
|
|
const loginPath = '/user/login';
|
|
const loginPath = '/user/login';
|
|
|
|
|
|
-let hospSign: any='';
|
|
|
|
|
|
+let hospSign: any = '';
|
|
|
|
|
|
let ifStopNextRequet: boolean = false; // 控制当出现token过期阻止后面弹窗提示
|
|
let ifStopNextRequet: boolean = false; // 控制当出现token过期阻止后面弹窗提示
|
|
|
|
|
|
-if(history){
|
|
|
|
|
|
+if (history) {
|
|
hospSign = history.location.query?.hospSign;
|
|
hospSign = history.location.query?.hospSign;
|
|
- if(!hospSign){
|
|
|
|
|
|
+ if (!hospSign) {
|
|
hospSign = localStorage.getItem('hospSign');
|
|
hospSign = localStorage.getItem('hospSign');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -62,7 +61,7 @@ export async function getInitialState(): Promise<{
|
|
currentUser?: API.CurrentUserData;
|
|
currentUser?: API.CurrentUserData;
|
|
logo?: string;
|
|
logo?: string;
|
|
isDev?: boolean,
|
|
isDev?: boolean,
|
|
- spacicalPageParamsType?:any[];
|
|
|
|
|
|
+ spacicalPageParamsType?: any[];
|
|
goSetting?: boolean,// 设置栏触发
|
|
goSetting?: boolean,// 设置栏触发
|
|
resetPasswordHandle?: (formData: any) => Promise<boolean>,
|
|
resetPasswordHandle?: (formData: any) => Promise<boolean>,
|
|
fetchUserMenu?: () => Promise<menuDataItemType[]>,
|
|
fetchUserMenu?: () => Promise<menuDataItemType[]>,
|
|
@@ -75,37 +74,44 @@ export async function getInitialState(): Promise<{
|
|
const fetchUserInfo = async () => {
|
|
const fetchUserInfo = async () => {
|
|
try {
|
|
try {
|
|
const userData = localStorage.getItem('userData');
|
|
const userData = localStorage.getItem('userData');
|
|
- console.log({userData});
|
|
|
|
- if(userData){
|
|
|
|
|
|
+
|
|
|
|
+ if (userData) {
|
|
return JSON.parse(userData);
|
|
return JSON.parse(userData);
|
|
}
|
|
}
|
|
throw Error;
|
|
throw Error;
|
|
} catch (error) {
|
|
} catch (error) {
|
|
- // history.push(`${loginPath}?hospSign=${hospSign}`);
|
|
|
|
|
|
+ // history.push(`${loginPath}?hospSign=${hospSign}`);
|
|
}
|
|
}
|
|
return undefined;
|
|
return undefined;
|
|
};
|
|
};
|
|
|
|
|
|
- const fetchUserMenu = async ()=>{
|
|
|
|
- const menu = await getMenus();
|
|
|
|
- if(menu){
|
|
|
|
- return menu;
|
|
|
|
|
|
+ const fetchUserMenu = async () => {
|
|
|
|
+ const localMasterData = localStorage.getItem('initialState');
|
|
|
|
+ if (localMasterData) {
|
|
|
|
+ const { openedSysLists } = JSON.parse(localMasterData);
|
|
|
|
+ const currentSys = openedSysLists.filter((t:any) => t.name == '智慧查检');
|
|
|
|
+ const systemId = currentSys.length > 0 ? currentSys[0].id : 0;
|
|
|
|
+ const menu = await getMenus(systemId);
|
|
|
|
+ if (menu) {
|
|
|
|
+ return menu;
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+ return [];
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
- const resetPasswordHandle = async (data: API.EditUserInfoType)=>{
|
|
|
|
- const resp = await updateUserInfo(data);
|
|
|
|
- if(resp){
|
|
|
|
- return Promise.resolve(true);
|
|
|
|
- }
|
|
|
|
- return Promise.resolve(false);
|
|
|
|
- }
|
|
|
|
|
|
|
|
- const clearUserData = ()=>{
|
|
|
|
- localStorage.removeItem('userData');
|
|
|
|
|
|
+ const resetPasswordHandle = async (data: API.EditUserInfoType) => {
|
|
|
|
+ const resp = await updateUserInfo(data);
|
|
|
|
+ if (resp) {
|
|
return Promise.resolve(true);
|
|
return Promise.resolve(true);
|
|
|
|
+ }
|
|
|
|
+ return Promise.resolve(false);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const clearUserData = () => {
|
|
|
|
+ localStorage.removeItem('userData');
|
|
|
|
+ return Promise.resolve(true);
|
|
};
|
|
};
|
|
// 如果是登录页面,不执行
|
|
// 如果是登录页面,不执行
|
|
if (history.location.pathname !== loginPath) {
|
|
if (history.location.pathname !== loginPath) {
|
|
@@ -113,15 +119,15 @@ export async function getInitialState(): Promise<{
|
|
return {
|
|
return {
|
|
fetchUserInfo,
|
|
fetchUserInfo,
|
|
currentUser,
|
|
currentUser,
|
|
- logo:logoIcon,
|
|
|
|
|
|
+ logo: logoIcon,
|
|
clearUserData,
|
|
clearUserData,
|
|
- menu:[],
|
|
|
|
|
|
+ menu: [],
|
|
fetchUserMenu,
|
|
fetchUserMenu,
|
|
resetPasswordHandle,
|
|
resetPasswordHandle,
|
|
- isDev:process.env.NODE_ENV == 'development',
|
|
|
|
|
|
+ isDev: process.env.NODE_ENV == 'development',
|
|
settings: {
|
|
settings: {
|
|
- navTheme:'dark',
|
|
|
|
- layout:'side'
|
|
|
|
|
|
+ navTheme: 'light',
|
|
|
|
+ layout: 'side'
|
|
},
|
|
},
|
|
};
|
|
};
|
|
}
|
|
}
|
|
@@ -135,14 +141,14 @@ export async function getInitialState(): Promise<{
|
|
|
|
|
|
|
|
|
|
const authHeaderInterceptor = (url: string, options: RequestOptionsInit) => {
|
|
const authHeaderInterceptor = (url: string, options: RequestOptionsInit) => {
|
|
-
|
|
|
|
|
|
+
|
|
const userData = localStorage.getItem('userData');
|
|
const userData = localStorage.getItem('userData');
|
|
- const authHeader = {token:''};
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- if(userData){
|
|
|
|
- const {token}: API.CurrentUserData = JSON.parse(userData);
|
|
|
|
- authHeader.token = token;
|
|
|
|
|
|
+ const authHeader = { token: '' };
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (userData) {
|
|
|
|
+ const { token }: API.CurrentUserData = JSON.parse(userData);
|
|
|
|
+ authHeader.token = token;
|
|
}
|
|
}
|
|
|
|
|
|
return {
|
|
return {
|
|
@@ -156,9 +162,9 @@ const authHeaderInterceptor = (url: string, options: RequestOptionsInit) => {
|
|
interface responseInterceptorsOptions extends RequestOptionsInit {
|
|
interface responseInterceptorsOptions extends RequestOptionsInit {
|
|
isCloseNotify?: boolean, // 是否关闭POST请求后反馈
|
|
isCloseNotify?: boolean, // 是否关闭POST请求后反馈
|
|
responseSpecifyFeedback?: {
|
|
responseSpecifyFeedback?: {
|
|
- successMessage: string,
|
|
|
|
- errorMessage: string,
|
|
|
|
- isShow: boolean, // 是否启用
|
|
|
|
|
|
+ successMessage: string,
|
|
|
|
+ errorMessage: string,
|
|
|
|
+ isShow: boolean, // 是否启用
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -166,65 +172,65 @@ const responseInterceptors = async (response: Response, options: responseInterce
|
|
// console.log({response,options});
|
|
// console.log({response,options});
|
|
const requestMethod = options.method;
|
|
const requestMethod = options.method;
|
|
|
|
|
|
- const {url,responseSpecifyFeedback,isCloseNotify=false} = options;
|
|
|
|
-
|
|
|
|
|
|
+ const { url, responseSpecifyFeedback, isCloseNotify = false } = options;
|
|
|
|
+
|
|
try {
|
|
try {
|
|
- const {status} = response;
|
|
|
|
- if(status == 200){
|
|
|
|
- // 网络请求成功
|
|
|
|
- const _response = await response.clone().json();
|
|
|
|
- const { status: dataStatus,errorCode,errorMessage,data} = _response;
|
|
|
|
- if(dataStatus == 200){
|
|
|
|
-
|
|
|
|
- // 接口请求成功
|
|
|
|
- if(requestMethod=='POST'&&url != "/api/pfm/login"&&!isCloseNotify){
|
|
|
|
- if(responseSpecifyFeedback&&responseSpecifyFeedback.isShow){
|
|
|
|
- // 当指定了请求成功反馈时
|
|
|
|
- console.log({responseSpecifyFeedback});
|
|
|
|
- console.log(responseSpecifyFeedback.successMessage);
|
|
|
|
- notification.success({
|
|
|
|
- message:responseSpecifyFeedback.successMessage
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- }else{
|
|
|
|
- // 否则用默认提示
|
|
|
|
- notification.success({
|
|
|
|
- message:'操作成功!'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if(data){
|
|
|
|
- return data;
|
|
|
|
- }
|
|
|
|
- return true;
|
|
|
|
- }if(errorCode == 499){
|
|
|
|
- if(!ifStopNextRequet){
|
|
|
|
- Modal.confirm({
|
|
|
|
- title: '抱歉,登录已过期请重新登录!',
|
|
|
|
- onOk: () => {
|
|
|
|
- ifStopNextRequet = false;
|
|
|
|
- loginOut();
|
|
|
|
- }
|
|
|
|
|
|
+ const { status } = response;
|
|
|
|
+ if (status == 200) {
|
|
|
|
+ // 网络请求成功
|
|
|
|
+ const _response = await response.clone().json();
|
|
|
|
+ const { status: dataStatus, errorCode, errorMessage, data } = _response;
|
|
|
|
+ if (dataStatus == 200) {
|
|
|
|
+
|
|
|
|
+ // 接口请求成功
|
|
|
|
+ if (requestMethod == 'POST' && url != "/api/pfm/login" && !isCloseNotify) {
|
|
|
|
+ if (responseSpecifyFeedback && responseSpecifyFeedback.isShow) {
|
|
|
|
+ // 当指定了请求成功反馈时
|
|
|
|
+ console.log({ responseSpecifyFeedback });
|
|
|
|
+ console.log(responseSpecifyFeedback.successMessage);
|
|
|
|
+ notification.success({
|
|
|
|
+ message: responseSpecifyFeedback.successMessage
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ // 否则用默认提示
|
|
|
|
+ notification.success({
|
|
|
|
+ message: '操作成功!'
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- ifStopNextRequet = true;
|
|
|
|
- }else {
|
|
|
|
- // 接口请求信息错误
|
|
|
|
- notification.error({
|
|
|
|
- message:errorMessage
|
|
|
|
- });
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
- }else {
|
|
|
|
|
|
+
|
|
|
|
+ if (data) {
|
|
|
|
+ return data;
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
|
|
+ } if (errorCode == 499) {
|
|
|
|
+ if (!ifStopNextRequet) {
|
|
|
|
+ Modal.confirm({
|
|
|
|
+ title: '抱歉,登录已过期请重新登录!',
|
|
|
|
+ onOk: () => {
|
|
|
|
+ ifStopNextRequet = false;
|
|
|
|
+ loginOut();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ ifStopNextRequet = true;
|
|
|
|
+ } else {
|
|
|
|
+ // 接口请求信息错误
|
|
|
|
+ notification.error({
|
|
|
|
+ message: errorMessage
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else {
|
|
// 网络请求失败
|
|
// 网络请求失败
|
|
- notification.error({
|
|
|
|
- message:'服务器错误!'
|
|
|
|
- });
|
|
|
|
- throw Error;
|
|
|
|
|
|
+ notification.error({
|
|
|
|
+ message: '服务器错误!'
|
|
|
|
+ });
|
|
|
|
+ throw Error;
|
|
}
|
|
}
|
|
- }catch(error){
|
|
|
|
- console.log({error});
|
|
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log({ error });
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
@@ -251,115 +257,107 @@ export const request: RequestConfig = {
|
|
|
|
|
|
// 将服务端获取的菜单 icon 字符串映射为对应的 icon Dom
|
|
// 将服务端获取的菜单 icon 字符串映射为对应的 icon Dom
|
|
const mappingIcon = (menuData: menuDataItemType[]) => {
|
|
const mappingIcon = (menuData: menuDataItemType[]) => {
|
|
- if(menuData.length==0){
|
|
|
|
- return [
|
|
|
|
- {
|
|
|
|
- path:'',
|
|
|
|
- name: '',
|
|
|
|
- icon: '',
|
|
|
|
- component: './404',
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
|
|
+ if (menuData.length == 0) {
|
|
|
|
+ return [
|
|
|
|
+ {
|
|
|
|
+ path: '',
|
|
|
|
+ name: '',
|
|
|
|
+ icon: '',
|
|
|
|
+ component: './404',
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
- const mappingMenu: menuDataItemType[] = menuData.map(item => ({
|
|
|
|
- ...item,
|
|
|
|
- icon: item.icon&&iconEnum[item.icon],
|
|
|
|
- children: item.children ? mappingIcon(item.children) : [],
|
|
|
|
- }));
|
|
|
|
- return mappingMenu;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-};
|
|
|
|
|
|
+ const mappingMenu: menuDataItemType[] = menuData.map(item => ({
|
|
|
|
+ ...item,
|
|
|
|
+ icon: item.icon && iconEnum[item.icon],
|
|
|
|
+ children: item.children ? mappingIcon(item.children) : [],
|
|
|
|
+ }));
|
|
|
|
+ return mappingMenu;
|
|
|
|
|
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
-// export const qiankun = {
|
|
|
|
-// // 应用加载之前
|
|
|
|
-// async bootstrap(props:any) {
|
|
|
|
-// console.log('MedicalWisdomCheckSys bootstrap', props);
|
|
|
|
-// },
|
|
|
|
-// // 应用 render 之前触发
|
|
|
|
-// async mount(props:any) {
|
|
|
|
-// console.log('MedicalWisdomCheckSys mount', props);
|
|
|
|
-// },
|
|
|
|
-// // 应用卸载之后触发
|
|
|
|
-// async unmount(props:any) {
|
|
|
|
-// console.log('MedicalWisdomCheckSys unmount', props);
|
|
|
|
-// },
|
|
|
|
-// };
|
|
|
|
|
|
|
|
|
|
+// ProLayout 支持的api https://procomponents.ant.design/components/layout
|
|
|
|
+export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) => {
|
|
|
|
|
|
|
|
|
|
-// ProLayout 支持的api https://procomponents.ant.design/components/layout
|
|
|
|
-export const layout: RunTimeLayoutConfig = ({ initialState,setInitialState }) => {
|
|
|
|
-
|
|
|
|
return {
|
|
return {
|
|
- logo:initialState?.logo,
|
|
|
|
|
|
+ logo: initialState?.logo,
|
|
rightContentRender: () => <RightContent />,
|
|
rightContentRender: () => <RightContent />,
|
|
disableContentMargin: false,
|
|
disableContentMargin: false,
|
|
- // footerRender: () => <Footer />,
|
|
|
|
- onPageChange:() => {
|
|
|
|
- // const { location } = history;
|
|
|
|
- // // 如果没有登录,重定向到 login
|
|
|
|
- // // if (!initialState?.currentUser && location.pathname !== loginPath) {
|
|
|
|
- // // history.push(`${loginPath}?hospSign=${hospSign}`);
|
|
|
|
- // // }
|
|
|
|
|
|
+ // onPageChange: (location:any) => {console.log({location}) },
|
|
|
|
+ menuProps:{
|
|
|
|
+ // onClick:({ key, keyPath, domEvent })=>{
|
|
|
|
+ // console.log({ key, keyPath, domEvent});
|
|
|
|
+ // history.push('/reports/a?w=1')
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
menu: {
|
|
menu: {
|
|
-
|
|
|
|
- params:{
|
|
|
|
- currentUser:initialState?.currentUser
|
|
|
|
|
|
+ params: {
|
|
|
|
+ currentUser: initialState?.currentUser
|
|
},
|
|
},
|
|
request: async () => {
|
|
request: async () => {
|
|
// initialState.currentUser 中包含了所有用户信息
|
|
// initialState.currentUser 中包含了所有用户信息
|
|
- if(initialState){
|
|
|
|
- const { currentUser,isDev} = initialState;
|
|
|
|
- if(false){
|
|
|
|
|
|
+ if (initialState) {
|
|
|
|
+ const { currentUser, isDev } = initialState;
|
|
|
|
+
|
|
|
|
+ if (false) {
|
|
// 开发环境
|
|
// 开发环境
|
|
return []
|
|
return []
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if (currentUser) {
|
|
if (currentUser) {
|
|
- const data: any[] = await getMenus();
|
|
|
|
-
|
|
|
|
- if(data){
|
|
|
|
- await setInitialState(t=>({...t,menu:data}));
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- *
|
|
|
|
- * 菜单跳转报表临时处理,后期统一换成中台调用
|
|
|
|
- */
|
|
|
|
- const getVFromTree = (data:any[], key: string) => {
|
|
|
|
- let result: any[] = [];
|
|
|
|
- function looper(data: any[], key: string) {
|
|
|
|
- data.forEach((t) => {
|
|
|
|
- if (t[key] && t[key] != 0) {
|
|
|
|
- //非一般页面
|
|
|
|
- result.push({
|
|
|
|
- contentType: t[key],
|
|
|
|
- path: t['path'],
|
|
|
|
- reportId: t['reportId'],
|
|
|
|
- url: t['youshuUrl'],
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- if (t.children && t.children.length > 0) {
|
|
|
|
- looper(t.children, key);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- looper(data, key);
|
|
|
|
- return result;
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- const _menu = getVFromTree(data, 'contentType');
|
|
|
|
-
|
|
|
|
- setInitialState((t) => ({ ...t, spacicalPageParamsType: _menu }));
|
|
|
|
-
|
|
|
|
- /////////////////////////////--------临时处理----------///////////////////////////////////////////////
|
|
|
|
-
|
|
|
|
- return mappingIcon(data);
|
|
|
|
|
|
+
|
|
|
|
+ const localMasterData = localStorage.getItem('initialState');
|
|
|
|
+
|
|
|
|
+ if (localMasterData) {
|
|
|
|
+
|
|
|
|
+ const { openedSysLists } = JSON.parse(localMasterData);
|
|
|
|
+ const currentSys = openedSysLists.filter((t:any) => t.name == '智慧查检');
|
|
|
|
+ const systemId = currentSys.length > 0 ? currentSys[0].id : 0;
|
|
|
|
+ const data: any[] = await getMenus(systemId);
|
|
|
|
+
|
|
|
|
+ if (data) {
|
|
|
|
+ await setInitialState(t => ({ ...t, menu: data }));
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ *
|
|
|
|
+ * 菜单跳转报表临时处理,后期统一换成中台调用
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ const getVFromTree = (data: any[], key: string) => {
|
|
|
|
+ let result: any[] = [];
|
|
|
|
+ function looper(data: any[], key: string) {
|
|
|
|
+ data.forEach((t) => {
|
|
|
|
+ if (t[key] && t[key] != 0) {
|
|
|
|
+ //非一般页面
|
|
|
|
+ result.push({
|
|
|
|
+ contentType: t[key],
|
|
|
|
+ path: t['path'],
|
|
|
|
+ reportId: t['reportId'],
|
|
|
|
+ url: t['youshuUrl'],
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ if (t.children && t.children.length > 0) {
|
|
|
|
+ looper(t.children, key);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ looper(data, key);
|
|
|
|
+ return result;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ const _menu = getVFromTree(data, 'contentType');
|
|
|
|
+
|
|
|
|
+ setInitialState((t) => ({ ...t, spacicalPageParamsType: _menu }));
|
|
|
|
+
|
|
|
|
+ /////////////////////////////--------临时处理----------///////////////////////////////////////////////
|
|
|
|
+
|
|
|
|
+ return mappingIcon(data);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
return [
|
|
return [
|
|
{
|
|
{
|
|
@@ -373,15 +371,15 @@ export const layout: RunTimeLayoutConfig = ({ initialState,setInitialState }) =>
|
|
},
|
|
},
|
|
links: isDev
|
|
links: isDev
|
|
? [
|
|
? [
|
|
- <Link to="/umi/plugin/openapi" target="_blank">
|
|
|
|
- <LinkOutlined />
|
|
|
|
- <span>OpenAPI 文档</span>
|
|
|
|
- </Link>,
|
|
|
|
- <Link to="/~docs">
|
|
|
|
- <BookOutlined />
|
|
|
|
- <span>业务组件文档</span>
|
|
|
|
- </Link>,
|
|
|
|
- ]
|
|
|
|
|
|
+ <Link to="/umi/plugin/openapi" target="_blank">
|
|
|
|
+ <LinkOutlined />
|
|
|
|
+ <span>OpenAPI 文档</span>
|
|
|
|
+ </Link>,
|
|
|
|
+ <Link to="/~docs">
|
|
|
|
+ <BookOutlined />
|
|
|
|
+ <span>业务组件文档</span>
|
|
|
|
+ </Link>,
|
|
|
|
+ ]
|
|
: [],
|
|
: [],
|
|
menuHeaderRender: undefined,
|
|
menuHeaderRender: undefined,
|
|
// 自定义 403 页面
|
|
// 自定义 403 页面
|