Explorar o código

更新持续改进相关页面地址配置/更新readme.md

code4eat %!s(int64=3) %!d(string=hai) anos
pai
achega
f222b62417

+ 12 - 3
README.md

@@ -1,6 +1,15 @@
-# Ant Design Pro
-
-This project is initialized with [Ant Design Pro](https://pro.ant.design). Follow is the quick guide for how to use.
+<!--
+ * @Author: your name
+ * @Date: 2021-09-03 14:28:27
+ * @LastEditTime: 2021-11-26 10:39:03
+ * @LastEditors: your name
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: /MedicalWisdomCheckSys/README.md
+-->
+<h1>MedicalWisdomCheckSys</h1>
+
+
+### MedicalWisdomCheckSys [医管智慧查检系统](http://118.31.245.65:8804/user/login?hospSign=d4miD82MvwFI6gY5) 是基于[Ant Design Pro](https://pro.ant.design). Follow is the quick guide for how to use.
 
 
 ## Environment Prepare
 ## Environment Prepare
 
 

+ 2 - 1
config/proxy.ts

@@ -1,7 +1,7 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-11-16 09:40:40
+ * @LastEditTime: 2021-11-25 09:52:25
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/config/proxy.ts
  * @FilePath: /MedicalWisdomCheckSys/config/proxy.ts
@@ -16,6 +16,7 @@
  */
  */
 
 
 //118.31.245.65
 //118.31.245.65
+//112.124.59.133
 export default {
 export default {
   dev: {
   dev: {
     '/api': {
     '/api': {

+ 2 - 2
config/routes.ts

@@ -1,7 +1,7 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-11-03 10:24:24
+ * @LastEditTime: 2021-11-18 11:31:38
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/config/routes.ts
  * @FilePath: /MedicalWisdomCheckSys/config/routes.ts
@@ -146,7 +146,7 @@ export default [
   },
   },
   {
   {
     path: '/',
     path: '/',
-    redirect: '/',
+    redirect: '/GradeHospitalAccreditation/accreditationDetail',
   },
   },
   {
   {
     component: './404',
     component: './404',

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "MedicalWisdomCheckSys",
   "name": "MedicalWisdomCheckSys",
-  "version": "0.0.1",
+  "version": "0.0.2",
   "private": true,
   "private": true,
   "author": {
   "author": {
     "name": "xieyunhui"
     "name": "xieyunhui"

BIN=BIN
public/preview.jpg


BIN=BIN
public/projectlogo.jpg


+ 9 - 11
src/app.tsx

@@ -1,17 +1,16 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-11-15 15:11:51
+ * @LastEditTime: 2021-11-25 11:06:53
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @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 { PageLoading } from '@ant-design/pro-layout';
-import { RunTimeLayoutConfig } from 'umi';
-import { history, Link } from 'umi';
+import { RunTimeLayoutConfig,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';
@@ -30,10 +29,7 @@ const loginPath = '/user/login';
 
 
 let hospSign:any='';
 let hospSign:any='';
 
 
-const controller = new AbortController(); // create a controller
-const { signal } = controller; // grab a reference to its associated AbortSignal object using the AbortController.signal property
-
-let ifStopNextRequet:boolean = false;
+let ifStopNextRequet:boolean = false;  //控制当出现token过期阻止后面弹窗提示
 
 
 if(history){
 if(history){
   hospSign = history.location.query?.hospSign;
   hospSign = history.location.query?.hospSign;
@@ -50,11 +46,12 @@ export const initialStateConfig = {
 };
 };
 
 
 
 
-type menuDataItemType = {
+export type menuDataItemType = {
   path:string,
   path:string,
   name:string,
   name:string,
   icon:any,
   icon:any,
   component:string,
   component:string,
+  softUrl?:string, //帆软url
   children?:menuDataItemType[]
   children?:menuDataItemType[]
 }
 }
 
 
@@ -254,7 +251,7 @@ const mappingIcon = (menuData:menuDataItemType[]) => {
 
 
 
 
 // ProLayout 支持的api https://procomponents.ant.design/components/layout
 // ProLayout 支持的api https://procomponents.ant.design/components/layout
-export const layout: RunTimeLayoutConfig = ({ initialState }) => {
+export const layout: RunTimeLayoutConfig = ({ initialState,setInitialState }) => {
  
  
   return {
   return {
     logo:initialState?.logo,
     logo:initialState?.logo,
@@ -280,7 +277,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => {
         // initialState.currentUser 中包含了所有用户信息
         // initialState.currentUser 中包含了所有用户信息
         if(initialState){
         if(initialState){
           const { currentUser,isDev} = initialState;
           const { currentUser,isDev} = initialState;
-          if(isDev){
+          if(false){
             //开发环境
             //开发环境
             return []
             return []
           }
           }
@@ -289,6 +286,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => {
             const data:menuDataItemType[] = await getMenus();
             const data:menuDataItemType[] = await getMenus();
             
             
             if(data){
             if(data){
+              await setInitialState(t=>({...t,menu:data}));
               return mappingIcon(data);
               return mappingIcon(data);
             }
             }
           } else {
           } else {

+ 4 - 2
src/components/Footer/index.tsx

@@ -1,7 +1,7 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-09-03 14:51:18
+ * @LastEditTime: 2021-11-24 15:33:11
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/Footer/index.tsx
  * @FilePath: /MedicalWisdomCheckSys/src/components/Footer/index.tsx
@@ -9,6 +9,8 @@
 
 
 import { DefaultFooter } from '@ant-design/pro-layout';
 import { DefaultFooter } from '@ant-design/pro-layout';
 
 
+const packageinfo = require('../../../package.json');
+
 export default () => {
 export default () => {
 
 
   const currentYear = new Date().getFullYear();
   const currentYear = new Date().getFullYear();
@@ -19,7 +21,7 @@ export default () => {
       links={[
       links={[
         {
         {
           key: '',
           key: '',
-          title: 'v0.0.1',
+          title:`v${packageinfo.version}`,
           href: '',
           href: '',
           blankTarget: true,
           blankTarget: true,
         }
         }

+ 8 - 2
src/components/MccsFileTree/components/DirectoryTree/index.less

@@ -21,12 +21,18 @@
         flex-direction: row;
         flex-direction: row;
         justify-content: flex-start;
         justify-content: flex-start;
         align-items: center;
         align-items: center;
-        width: 92%;
+        width: calc(100% - 20px);
         .node {
         .node {
-            width: 90%;
+            width: 100%;
             overflow:hidden; //超出的文本隐藏
             overflow:hidden; //超出的文本隐藏
             text-overflow:ellipsis; //溢出用省略号显示
             text-overflow:ellipsis; //溢出用省略号显示
             white-space:nowrap; //溢出不换行
             white-space:nowrap; //溢出不换行
+            span {
+              
+            }
+        }
+        &.showActionBtn {
+          width: calc(100% - 70px);
         }
         }
      }
      }
      &.actived {
      &.actived {

+ 2 - 2
src/components/MccsFileTree/components/DirectoryTree/index.tsx

@@ -1,7 +1,7 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-07 16:40:33
  * @Date: 2021-09-07 16:40:33
- * @LastEditTime: 2021-09-13 14:52:24
+ * @LastEditTime: 2021-11-24 15:06:44
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsFileTree/components/directoryTree.tsx
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsFileTree/components/directoryTree.tsx
@@ -96,7 +96,7 @@ const DirectoryTree: React.FC<DirectoryTreeProps> = (props) => {
                   isLeaf:false,
                   isLeaf:false,
                   code:props.code,
                   code:props.code,
             })}>
             })}>
-                <div className='inner'>
+                <div className={props.currentActivedIndex==props.id?'inner showActionBtn':'inner'}>
                     {arrow}
                     {arrow}
                     {nodeLabel}
                     {nodeLabel}
                 </div>
                 </div>

+ 48 - 0
src/components/MccsFileTree/components/NodeTextArea/index.tsx

@@ -0,0 +1,48 @@
+/*
+ * @Author: your name
+ * @Date: 2021-11-24 11:34:19
+ * @LastEditTime: 2021-11-24 14:16:40
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: /MedicalWisdomCheckSys/src/components/MccsFileTree/components/NodeTextArea/index.tsx
+ */
+
+
+import React,{useRef,useState} from 'react';
+import { Tooltip } from 'antd';
+
+
+const NodeTextArea = ({text,className}:{text:string,className?:string}) => {
+
+    const theTextRef = useRef<HTMLSpanElement>(null);
+    const textWrapRef = useRef<HTMLDivElement>(null);
+    const [visible,setVisible] = useState(false);
+    const onVisibleChangeHandle = (visible:boolean)=>{
+
+         if(visible){
+             if(textWrapRef.current&&theTextRef.current){
+                //文案长度大于容器长度时触发
+                if(textWrapRef.current.offsetWidth > theTextRef.current.offsetWidth ){
+                    setVisible(false);  
+                }else{
+                    setVisible(true);
+                }
+             }else{
+                setVisible(false);
+             }
+         }else {
+            setVisible(false);
+         }
+    }
+
+
+    return (
+        <Tooltip title={text} visible={visible} onVisibleChange = {onVisibleChangeHandle} >
+             <div className={className} ref={textWrapRef} >
+                 <span ref={theTextRef}>{text}</span>
+             </div>
+        </Tooltip>
+    )
+}
+
+export default NodeTextArea;

+ 1 - 0
src/components/MccsFileTree/index.less

@@ -40,6 +40,7 @@
 
 
 .action {
 .action {
     display: flex;
     display: flex;
+    width:60px;
     flex-direction: row;
     flex-direction: row;
     justify-content: center;
     justify-content: center;
     align-items: center;
     align-items: center;

+ 8 - 4
src/components/MccsFileTree/index.tsx

@@ -1,7 +1,7 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-06 10:28:12
  * @Date: 2021-09-06 10:28:12
- * @LastEditTime: 2021-10-18 10:41:23
+ * @LastEditTime: 2021-11-24 15:11:07
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsFileTree/index.tsx
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsFileTree/index.tsx
@@ -12,6 +12,7 @@ import React, { ReactNode, useEffect, useState, MouseEvent } from 'react'
 import { Input, Spin, Image, Popconfirm } from 'antd';
 import { Input, Spin, Image, Popconfirm } from 'antd';
 import { PlusOutlined } from '@ant-design/icons';
 import { PlusOutlined } from '@ant-design/icons';
 import DirectoryTree from './components/DirectoryTree';
 import DirectoryTree from './components/DirectoryTree';
+import NodeTextArea from './components/NodeTextArea';
 import './index.less'
 import './index.less'
 import DelActionIcon from './images/del14px.png';
 import DelActionIcon from './images/del14px.png';
 import EditActionIcon from './images/edit14px.png';
 import EditActionIcon from './images/edit14px.png';
@@ -85,7 +86,8 @@ const MccsFileTree: React.FC<MccsFileTreeProps> = (props) => {
         onSelectHandle(nodeProps)
         onSelectHandle(nodeProps)
       } : () => { setcurrentActivedIndex(id); }}>
       } : () => { setcurrentActivedIndex(id); }}>
         <div style={{ display: 'flex', marginRight: 5, justifyContent: 'center', alignItems: 'center' }} ><Image width={15} preview={false} src={FileIcon} /> </div>
         <div style={{ display: 'flex', marginRight: 5, justifyContent: 'center', alignItems: 'center' }} ><Image width={15} preview={false} src={FileIcon} /> </div>
-        <div className='treeNodeInner'>{`${code} ${title}`}</div>
+        {/* <div className='treeNodeInner'>{`${code} ${title}`}</div> */}
+        <NodeTextArea className="treeNodeInner" text={`${code} ${title}`}></NodeTextArea>
 
 
         {(currentActivedIndex == id && editable) && <Action {...nodeProps} />  /*点击展示操作项*/}
         {(currentActivedIndex == id && editable) && <Action {...nodeProps} />  /*点击展示操作项*/}
       </div>
       </div>
@@ -96,14 +98,16 @@ const MccsFileTree: React.FC<MccsFileTreeProps> = (props) => {
 
 
     const { title, children = [], ...restProps } = data;
     const { title, children = [], ...restProps } = data;
 
 
-    const label = <div className="node">{`${restProps.code} ${title}`}</div>;
+    // const node = <div className="node">{`${restProps.code} ${title}`}</div>;
+
+    const node = <NodeTextArea className="node" text={`${restProps.code} ${title}`}></NodeTextArea>
 
 
     if (data.isLeaf) {
     if (data.isLeaf) {
       return <TreeNode key={data.id} currentActivedIndex={currentActivedIndex} setcurrentActivedIndex={setcurrentActivedIndex} title={title} {...restProps} />
       return <TreeNode key={data.id} currentActivedIndex={currentActivedIndex} setcurrentActivedIndex={setcurrentActivedIndex} title={title} {...restProps} />
     }
     }
     return (
     return (
       <DirectoryTree key={data.id} currentActivedIndex={currentActivedIndex} setcurrentActivedIndex={setcurrentActivedIndex}
       <DirectoryTree key={data.id} currentActivedIndex={currentActivedIndex} setcurrentActivedIndex={setcurrentActivedIndex}
-        nodeLabel={label}  {...data} onClick={() => onSelectHandle ? onSelectHandle(data) : () => { }}
+        nodeLabel={node}  {...data} onClick={() => onSelectHandle ? onSelectHandle(data) : () => { }}
         action={editable && <Action  {...data} />} defaultCollapsed={true}
         action={editable && <Action  {...data} />} defaultCollapsed={true}
       >
       >
         {
         {

+ 4 - 0
src/components/MccsPageContainer/index.less

@@ -11,4 +11,8 @@
     .ant-pro-grid-content {
     .ant-pro-grid-content {
         padding:16px;
         padding:16px;
     }
     }
+}
+
+#reportFrame {
+    border: none;
 }
 }

+ 42 - 5
src/components/MccsPageContainer/index.tsx

@@ -1,6 +1,6 @@
 
 
 
 
-import React, { useEffect,useRef } from 'react'
+import React, { useEffect,useRef,useState } from 'react'
 import PropTypes from 'prop-types'
 import PropTypes from 'prop-types'
 
 
 import {Modal, Divider } from 'antd';
 import {Modal, Divider } from 'antd';
@@ -9,14 +9,35 @@ import type { ProFormInstance } from '@ant-design/pro-form';
 import ProForm, {
 import ProForm, {
     ProFormText,
     ProFormText,
 } from '@ant-design/pro-form';
 } from '@ant-design/pro-form';
-import { useModel } from 'umi';
+import { useModel,history } from 'umi';
 import './index.less';
 import './index.less';
 
 
+import {menuDataItemType} from '@/app';
+
+import IframePage from '@/components/iframePage/index';
+
 
 
 type MccsPageContainerType = {
 type MccsPageContainerType = {
     [key:string]:any
     [key:string]:any
 }
 }
 
 
+const getCurrentRoutesData = (data: menuDataItemType[], path: string) => {
+    let result;
+    function looper (arr:menuDataItemType[]){
+        for (const element of arr) {
+            if (element.path == path) {
+                result =  element
+            } else {
+                if (element.children && element.children.length > 0) {
+                    looper(element.children);
+                }
+            }
+        }
+    }
+    looper(data);
+    return result;
+}
+
 const MccsPageContainer:React.FC<MccsPageContainerType> = (props)=>{
 const MccsPageContainer:React.FC<MccsPageContainerType> = (props)=>{
     /**
     /**
      * @param {*} children 
      * @param {*} children 
@@ -25,12 +46,15 @@ const MccsPageContainer:React.FC<MccsPageContainerType> = (props)=>{
      */
      */
     const { children, config } = props;
     const { children, config } = props;
     const formRef = useRef<ProFormInstance>();
     const formRef = useRef<ProFormInstance>();
-    const { goSetting, update,currentUser,resetPasswordHandle} = useModel('@@initialState', (model) => ({ 
-        goSetting: model.initialState?.goSetting,
+    const { goSetting, update,currentUser,resetPasswordHandle,menu} = useModel('@@initialState', (model) => ({ 
+         goSetting: model.initialState?.goSetting,
          update: model.setInitialState,
          update: model.setInitialState,
          currentUser:model.initialState?.currentUser,
          currentUser:model.initialState?.currentUser,
+         menu:model.initialState?.menu,
          resetPasswordHandle:model.initialState?.resetPasswordHandle,
          resetPasswordHandle:model.initialState?.resetPasswordHandle,
     }));
     }));
+    const [ifIframePage,setIfIframePage] = useState(false);
+    const [iframeUrl,setIframeUrl] = useState<string>();
 
 
     useEffect(() => {
     useEffect(() => {
       
       
@@ -90,6 +114,19 @@ const MccsPageContainer:React.FC<MccsPageContainerType> = (props)=>{
         }
         }
     }, [goSetting]);
     }, [goSetting]);
 
 
+    useEffect(()=>{
+        const { location: { pathname } } = history;
+        if (menu) {
+            const currentRouteData:any = getCurrentRoutesData(menu, pathname);
+            if(currentRouteData){
+                console.log({currentRouteData});
+                setIframeUrl(currentRouteData.softUrl);
+            }else{
+                setIframeUrl('');
+            }
+        }
+    },[]);
+
     return (
     return (
         <PageContainer
         <PageContainer
             {
             {
@@ -98,7 +135,7 @@ const MccsPageContainer:React.FC<MccsPageContainerType> = (props)=>{
             style={{ padding: '16px' }}
             style={{ padding: '16px' }}
         >
         >
             {
             {
-                children
+                iframeUrl?<IframePage url={`${iframeUrl}`} />:children
             }
             }
         </PageContainer>
         </PageContainer>
     )
     )

+ 16 - 2
src/components/antdProOverwrite/MccsProFormText/index.tsx

@@ -1,7 +1,7 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-10 09:40:50
  * @Date: 2021-09-10 09:40:50
- * @LastEditTime: 2021-09-10 09:50:43
+ * @LastEditTime: 2021-11-24 14:29:13
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/antdProOverwrite/MccsProFormText/index.tsx
  * @FilePath: /MedicalWisdomCheckSys/src/components/antdProOverwrite/MccsProFormText/index.tsx
@@ -11,17 +11,31 @@
 import React from 'react'
 import React from 'react'
 import {
 import {
     ProFormText,
     ProFormText,
+    ProFormTextArea
   } from '@ant-design/pro-form';
   } from '@ant-design/pro-form';
 
 
 
 
 type MccsProFormTextProps = {
 type MccsProFormTextProps = {
+    type?:'text'|'textArea',
     [propsName:string]:any
     [propsName:string]:any
 }
 }
 //使用方式参考 antd pro
 //使用方式参考 antd pro
 const MccsProFormText:React.FC<MccsProFormTextProps> =(props)=>{
 const MccsProFormText:React.FC<MccsProFormTextProps> =(props)=>{
+    const {type = 'text'} = props;
 
 
     return (
     return (
-        <ProFormText {...props} />
+        <>
+           {
+               type =='text'&&(
+                <ProFormText {...props} />
+               )
+           }
+           {
+               type =='textArea'&&(
+                <ProFormTextArea {...props} />
+               )
+           }
+        </>
     )
     )
 }
 }
 
 

+ 25 - 0
src/components/iframePage/index.tsx

@@ -0,0 +1,25 @@
+/*
+ * @Author: your name
+ * @Date: 2021-11-25 10:07:57
+ * @LastEditTime: 2021-11-25 10:19:33
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: /MedicalWisdomCheckSys/src/components/iframePage/index.tsx
+ */
+
+
+const IframePage = ({url}:{url:string})=>{
+    
+    return (
+        <>
+            {
+                url&&(
+                    <iframe  id="reportFrame" src={`${url}`} width="100%" height="800px"></iframe>
+                )
+            }
+        </>
+    )
+
+}
+
+export default IframePage;

+ 9 - 8
src/pages/GradeHospitalAccreditation/accreditationDetail/index.tsx

@@ -1,7 +1,7 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-06 09:07:56
  * @Date: 2021-09-06 09:07:56
- * @LastEditTime: 2021-10-27 11:45:54
+ * @LastEditTime: 2021-11-24 15:28:32
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/accreditationDetail/index.tsx
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/accreditationDetail/index.tsx
@@ -65,6 +65,7 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
   const [currentActived, setCurrentActived] = useState<API.ResultTreeDataItem | treeItem>();
   const [currentActived, setCurrentActived] = useState<API.ResultTreeDataItem | treeItem>();
 
 
   const [childRuleList, setChildRuleList] = useState<ruleList>([]);
   const [childRuleList, setChildRuleList] = useState<ruleList>([]);
+
   const [modalVisible, setModalVisible] = useState(false);
   const [modalVisible, setModalVisible] = useState(false);
   const [actionType, setActionType] = useState('add');
   const [actionType, setActionType] = useState('add');
   const formListRef = useRef<FormList.FormListRefCurrent>(null);
   const formListRef = useRef<FormList.FormListRefCurrent>(null);
@@ -203,7 +204,6 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
 
 
     const formNodeVisibleHandle = (bool: boolean) => {
     const formNodeVisibleHandle = (bool: boolean) => {
 
 
-      !bool && setCurrentActived(undefined);  //关闭弹窗清除
       setModalVisible(bool);
       setModalVisible(bool);
     }
     }
 
 
@@ -240,12 +240,6 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
         initialValues={actionType == 'edit' ? { ...formDefaultData, name: formDefaultData.title, numStr: formDefaultData.code } : {}}
         initialValues={actionType == 'edit' ? { ...formDefaultData, name: formDefaultData.title, numStr: formDefaultData.code } : {}}
         onFinish={formNodeSubmitHandle}
         onFinish={formNodeSubmitHandle}
       >
       >
-        <MccsProFormText
-          width="md"
-          name="name"
-          label="内容"
-          placeholder="请输入名称"
-        />
         {
         {
           actionType == 'add' && (
           actionType == 'add' && (
             <MccsProFormText
             <MccsProFormText
@@ -256,6 +250,13 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
             />
             />
           )
           )
         }
         }
+        <MccsProFormText
+          width="lg"
+          name="name"
+          label="内容"
+          type='textArea'
+          placeholder="请输入名称"
+        />
         {
         {
           showMore && (
           showMore && (
             <ProForm.Item
             <ProForm.Item

+ 2 - 2
src/pages/GradeHospitalAccreditation/articleManagement/index.tsx

@@ -1,7 +1,7 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2021-11-12 17:47:28
+ * @LastEditTime: 2021-11-23 09:37:46
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
@@ -453,7 +453,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                                 search={{
                                 search={{
                                     span: 6
                                     span: 6
                                 }}
                                 }}
-                                rowSelection={{
+                                rowSelection={isModeTwo?false:{
                                     // 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom
                                     // 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom
                                     // 注释该行则默认不显示下拉选项
                                     // 注释该行则默认不显示下拉选项
                                     selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT],
                                     selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT],

+ 48 - 5
src/pages/KeepImprove/departmentIssueRank/index.tsx

@@ -1,26 +1,69 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-28 13:57:19
  * @Date: 2021-09-28 13:57:19
- * @LastEditTime: 2021-11-15 11:36:24
+ * @LastEditTime: 2021-11-24 10:54:36
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
  */
  */
 
 
 
 
-import React from 'react'
+import React, { useEffect,useState } from 'react'
 import MccsPageContainer from '@/components/MccsPageContainer/index';
 import MccsPageContainer from '@/components/MccsPageContainer/index';
+import { history, useModel } from 'umi'
 
 
 import './index.less';
 import './index.less';
 
 
+import { menuDataItemType } from '@/app';
+
 
 
 type QuestionGatherAndReviseProps = {}
 type QuestionGatherAndReviseProps = {}
 
 
-const QuestionGatherAndRevise:React.FC<QuestionGatherAndReviseProps> = ()=>{
+
+const getCurrentRoutesData = (data: menuDataItemType[], path: string) => {
+    let result;
+    function looper (arr:menuDataItemType[]){
+        for (const element of arr) {
+            if (element.path == path) {
+                result =  element
+            } else {
+                if (element.children && element.children.length > 0) {
+                    looper(element.children);
+                }
+            }
+        }
+    }
+    looper(data);
+    return result;
+}
+
+const QuestionGatherAndRevise: React.FC<QuestionGatherAndReviseProps> = () => {
+
+    const { initialState } = useModel('@@initialState');
+    const [iframeUrl,setIframeUrl] = useState<string>();
+
+    useEffect(() => {
+
+        const { location: { pathname } } = history;
+        if (initialState?.menu) {
+            // console.log(getCurrentRoutesData(initialState.menu, pathname));
+            const currentRouteData:any = getCurrentRoutesData(initialState.menu, pathname);
+            if(currentRouteData){
+                console.log({currentRouteData});
+                setIframeUrl(currentRouteData.softUrl);
+            }
+        }
+
+    }, []);
+
     return (
     return (
         <MccsPageContainer>
         <MccsPageContainer>
-            <iframe  id="reportFrame" src=" http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/taicang/单位问题排名.frm" width="100%" height="800px">
-            </iframe>
+            {
+                iframeUrl&&(
+                    <iframe id="reportFrame" src={`${iframeUrl}`} width="100%" height="800px">
+                    </iframe>
+                )
+            }
         </MccsPageContainer>
         </MccsPageContainer>
     )
     )
 }
 }

+ 10 - 5
src/pages/KeepImprove/departmentScoreRank/index.tsx

@@ -1,26 +1,31 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-28 13:57:19
  * @Date: 2021-09-28 13:57:19
- * @LastEditTime: 2021-11-15 11:36:51
+ * @LastEditTime: 2021-11-25 10:30:21
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
  */
  */
 
 
 
 
-import React from 'react'
+import React, { useEffect } from 'react'
 import MccsPageContainer from '@/components/MccsPageContainer/index';
 import MccsPageContainer from '@/components/MccsPageContainer/index';
-
 import './index.less';
 import './index.less';
 
 
 
 
 type QuestionGatherAndReviseProps = {}
 type QuestionGatherAndReviseProps = {}
 
 
+
 const QuestionGatherAndRevise:React.FC<QuestionGatherAndReviseProps> = ()=>{
 const QuestionGatherAndRevise:React.FC<QuestionGatherAndReviseProps> = ()=>{
+    useEffect(() => {
+
+    }, []);
+
     return (
     return (
         <MccsPageContainer>
         <MccsPageContainer>
-            <iframe  id="reportFrame" src="http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/taicang/单位得分情况.frm" width="100%" height="800px">
-            </iframe>
+            {
+                //children已被iframe代理,详细请查看MccsPageContainer组件
+            }
         </MccsPageContainer>
         </MccsPageContainer>
     )
     )
 }
 }

+ 10 - 5
src/pages/KeepImprove/indexNumGather/index.tsx

@@ -1,26 +1,31 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-28 13:57:19
  * @Date: 2021-09-28 13:57:19
- * @LastEditTime: 2021-11-15 11:37:13
+ * @LastEditTime: 2021-11-25 10:30:51
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
  */
  */
 
 
 
 
-import React from 'react'
+import React, { useEffect } from 'react'
 import MccsPageContainer from '@/components/MccsPageContainer/index';
 import MccsPageContainer from '@/components/MccsPageContainer/index';
 
 
 import './index.less';
 import './index.less';
 
 
-
 type QuestionGatherAndReviseProps = {}
 type QuestionGatherAndReviseProps = {}
 
 
 const QuestionGatherAndRevise:React.FC<QuestionGatherAndReviseProps> = ()=>{
 const QuestionGatherAndRevise:React.FC<QuestionGatherAndReviseProps> = ()=>{
+
+    useEffect(() => {
+
+    }, []);
+
     return (
     return (
         <MccsPageContainer>
         <MccsPageContainer>
-            <iframe  id="reportFrame" src="http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/taicang/指标汇总.frm" width="100%" height="800px">
-            </iframe>
+            {
+                //children已被iframe代理,详细请查看MccsPageContainer组件
+            }
         </MccsPageContainer>
         </MccsPageContainer>
     )
     )
 }
 }

+ 12 - 8
src/pages/KeepImprove/questionGather/index.tsx

@@ -1,29 +1,33 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-28 13:57:19
  * @Date: 2021-09-28 13:57:19
- * @LastEditTime: 2021-11-15 11:37:38
+ * @LastEditTime: 2021-11-25 10:31:26
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
  */
  */
 
 
-
-import React from 'react'
+import React, { useEffect } from 'react'
 import MccsPageContainer from '@/components/MccsPageContainer/index';
 import MccsPageContainer from '@/components/MccsPageContainer/index';
 
 
 import './index.less';
 import './index.less';
 
 
-
 type QuestionGatherAndReviseProps = {}
 type QuestionGatherAndReviseProps = {}
 
 
-const QuestionGatherAndRevise:React.FC<QuestionGatherAndReviseProps> = ()=>{
+const QuestionGather:React.FC<QuestionGatherAndReviseProps> = ()=>{
+
+    useEffect(() => {
+
+    }, []);
+
     return (
     return (
         <MccsPageContainer>
         <MccsPageContainer>
-            <iframe  id="reportFrame" src="http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/taicang/问题汇总.frm" width="100%" height="800px">
-            </iframe>
+            {
+                //children已被iframe代理,详细请查看MccsPageContainer组件
+            }
         </MccsPageContainer>
         </MccsPageContainer>
     )
     )
 }
 }
 
 
-export default QuestionGatherAndRevise
+export default QuestionGather
 
 

+ 12 - 5
src/pages/KeepImprove/questionGatherAndRevise/index.tsx

@@ -1,26 +1,33 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-09-28 13:57:19
  * @Date: 2021-09-28 13:57:19
- * @LastEditTime: 2021-09-28 16:29:05
+ * @LastEditTime: 2021-11-25 10:28:09
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
  */
  */
 
 
 
 
-import React from 'react'
+import React, { useEffect } from 'react'
 import MccsPageContainer from '@/components/MccsPageContainer/index';
 import MccsPageContainer from '@/components/MccsPageContainer/index';
 
 
 import './index.less';
 import './index.less';
 
 
-
 type QuestionGatherAndReviseProps = {}
 type QuestionGatherAndReviseProps = {}
 
 
+
 const QuestionGatherAndRevise:React.FC<QuestionGatherAndReviseProps> = ()=>{
 const QuestionGatherAndRevise:React.FC<QuestionGatherAndReviseProps> = ()=>{
+
+
+    useEffect(() => {
+
+    }, []);
+
     return (
     return (
         <MccsPageContainer>
         <MccsPageContainer>
-            <iframe  id="reportFrame" src="http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/test/问题汇总与整改.frm" width="100%" height="800px">
-            </iframe>
+            {
+                //children已被iframe代理,详细请查看MccsPageContainer组件
+            }
         </MccsPageContainer>
         </MccsPageContainer>
     )
     )
 }
 }

+ 32 - 4
src/pages/PlatformMana/menuManage/index.js

@@ -1,21 +1,22 @@
 /*
 /*
  * @Author: your name
  * @Author: your name
  * @Date: 2021-07-26 10:13:13
  * @Date: 2021-07-26 10:13:13
- * @LastEditTime: 2021-10-18 11:10:42
+ * @LastEditTime: 2021-11-25 10:49:44
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @Description: In User Settings Edit
  * @FilePath: /TracerMethodology_PC/src/pages/UserMana/index.js
  * @FilePath: /TracerMethodology_PC/src/pages/UserMana/index.js
  */
  */
 
 
 import { PlusOutlined } from '@ant-design/icons';
 import { PlusOutlined } from '@ant-design/icons';
-import { Button, Popconfirm } from 'antd';
+import { Button, Popconfirm,Tooltip} from 'antd';
 import React, { useState, useRef } from 'react';
 import React, { useState, useRef } from 'react';
 
 
 import { PageContainer } from '@ant-design/pro-layout';
 import { PageContainer } from '@ant-design/pro-layout';
 import ProTable from '@ant-design/pro-table';
 import ProTable from '@ant-design/pro-table';
-import { ModalForm, ProFormText, ProFormSelect, ProFormDigit } from '@ant-design/pro-form';
+import { ModalForm, ProFormText, ProFormSelect, ProFormDigit,ProFormDependency } from '@ant-design/pro-form';
 import UpdateForm from './updateForm';
 import UpdateForm from './updateForm';
 import { addList, editList, delList } from './service';
 import { addList, editList, delList } from './service';
+import { InfoCircleOutlined } from '@ant-design/icons';
 import { getMenuList } from '@/pages/PlatformMana/menuManage/service';
 import { getMenuList } from '@/pages/PlatformMana/menuManage/service';
 
 
 const UserMana = () => {
 const UserMana = () => {
@@ -24,6 +25,7 @@ const UserMana = () => {
       title: '菜单名称',
       title: '菜单名称',
       dataIndex: 'name',
       dataIndex: 'name',
       key: 'name',
       key: 'name',
+      width:'20%'
       // ellipsis: true,
       // ellipsis: true,
     },
     },
     {
     {
@@ -272,6 +274,31 @@ const UserMana = () => {
           name="orderNum"
           name="orderNum"
           placeholder="请选择菜单序号"
           placeholder="请选择菜单序号"
         />
         />
+        <ProFormDependency name={['type']}>
+            {
+               ({type})=>{
+                if(type == 1){
+                  return (
+                    <ProFormText
+                      label="帆软url"
+                      rules={[
+                        {
+                          required: false,
+                        },
+                      ]}
+                      fieldProps={{
+                        suffix:<Tooltip title="注意,填写该地址,页面内容将被代理!">
+                        <InfoCircleOutlined style={{ color: 'rgba(0,0,0,.45)' }} />
+                      </Tooltip>
+                      }}
+                      width="sm"
+                      name="softUrl"
+                    />
+                  )
+               }
+            }
+          }
+        </ProFormDependency>
       </ModalForm>
       </ModalForm>
 
 
       {/* 更新 */}
       {/* 更新 */}
@@ -280,7 +307,7 @@ const UserMana = () => {
           const { menuId, parentId = 0 } = currentRow;
           const { menuId, parentId = 0 } = currentRow;
           // console.log({currentRow});
           // console.log({currentRow});
           // console.log({'编辑':value});
           // console.log({'编辑':value});
-          const { name, path, url, perms, type, icon = 'ww', orderNum } = value;
+          const { name, path, url, perms, type, icon = 'ww', orderNum,softUrl } = value;
 
 
           const resp = await editList({
           const resp = await editList({
             parentId,
             parentId,
@@ -292,6 +319,7 @@ const UserMana = () => {
             icon,
             icon,
             orderNum,
             orderNum,
             id: menuId,
             id: menuId,
+            softUrl
           });
           });
           if (resp) {
           if (resp) {
             handleUpdateModalVisible(false);
             handleUpdateModalVisible(false);

+ 31 - 1
src/pages/PlatformMana/menuManage/updateForm.jsx

@@ -1,9 +1,14 @@
 import React from 'react';
 import React from 'react';
+import {Tooltip} from 'antd';
+
+import { InfoCircleOutlined } from '@ant-design/icons';
+
 import {
 import {
   ProFormText,
   ProFormText,
   ModalForm,
   ModalForm,
   ProFormSelect,
   ProFormSelect,
-  ProFormDigit
+  ProFormDigit,
+  ProFormDependency
 } from '@ant-design/pro-form';
 } from '@ant-design/pro-form';
 
 
 
 
@@ -93,6 +98,31 @@ const UpdateForm = (props) => {
             width="sm"
             width="sm"
             name="orderNum"
             name="orderNum"
           />
           />
+          <ProFormDependency name={['type']}>
+            {
+               ({type})=>{
+                if(type == 1){
+                  return (
+                    <ProFormText
+                      label="帆软url"
+                      rules={[
+                        {
+                          required: false,
+                        },
+                      ]}
+                      fieldProps={{
+                        suffix:<Tooltip title="注意,填写该地址,页面内容将被代理!">
+                        <InfoCircleOutlined style={{ color: 'rgba(0,0,0,.45)' }} />
+                      </Tooltip>
+                      }}
+                      width="sm"
+                      name="softUrl"
+                    />
+                  )
+               }
+            }
+          }
+        </ProFormDependency>
         </ModalForm>
         </ModalForm>
       }
       }
     </>
     </>