Parcourir la source

fix login & add menu icon

code4eat il y a 3 ans
Parent
commit
3d8ff8bc17

+ 1 - 1
config/defaultSettings.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-09-26 18:11:53
+ * @LastEditTime: 2021-10-12 17:31:43
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/config/defaultSettings.ts

+ 3 - 3
src/app.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-10-09 09:15:47
+ * @LastEditTime: 2021-10-18 11:43:58
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/app.tsx
@@ -151,6 +151,7 @@ const authHeaderInterceptor = (url: string, options: RequestOptionsInit) => {
 const responseInterceptors = async (response: Response, options: RequestOptionsInit) => {
   // console.log({response,options});
   const requestMethod = options.method;
+  const url = options.url;
   try {
     const {status} = response;
     if(status == 200){
@@ -159,7 +160,7 @@ const responseInterceptors = async (response: Response, options: RequestOptionsI
         const { status: dataStatus,errorCode,errorMessage,data} = _response;
         if(dataStatus == 200){
              //接口请求成功
-             if(requestMethod=='POST'){
+             if(requestMethod=='POST'&&url != "/api/pfm/login"){
                notification.success({
                 message:'操作成功!'
                });
@@ -275,7 +276,6 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => {
             const data:menuDataItemType[] = await getMenus();
             
             if(data){
-              // setInitialState((s) => ({ ...s, menu:data }));  
               return mappingIcon(data);
             }
           } else {

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

@@ -1,5 +1,7 @@
 
 /* the tree node's style */
+
+
 .treeView {
     overflow-y: hidden;
   }
@@ -57,7 +59,7 @@
   .treeViewArrow:after {
     content: '';
     display: inline-block;
-    background: url('https://i.postimg.cc/DfLBgJng/image.png') no-repeat;/*兼容没测*/
+    background: url('../../images/folderOpen.png') no-repeat;/*兼容没测*/
     background-size: 100% 100%;
     width: 18px;
     height:18px;
@@ -70,7 +72,7 @@
   .treeViewArrowCollapsed:after {
     content: '';
     display: inline-block;
-    background: url('https://i.postimg.cc/gkp4Bz0P/image.png') no-repeat;/*兼容没测*/
+    background: url('../../images/folderClose.png') no-repeat;/*兼容没测*/
     background-size: 100% 100%;
     width: 18px;
     height:18px;

BIN
src/components/MccsFileTree/images/add.png


BIN
src/components/MccsFileTree/images/del14px.png


BIN
src/components/MccsFileTree/images/edit14px.png


BIN
src/components/MccsFileTree/images/file.jpg


BIN
src/components/MccsFileTree/images/file.png


BIN
src/components/MccsFileTree/images/folder.jpg


BIN
src/components/MccsFileTree/images/folderClose.png


BIN
src/components/MccsFileTree/images/folderOpen.png


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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-06 10:28:12
- * @LastEditTime: 2021-10-11 10:39:49
+ * @LastEditTime: 2021-10-18 10:41:23
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsFileTree/index.tsx
@@ -13,15 +13,16 @@ import { Input, Spin, Image, Popconfirm } from 'antd';
 import { PlusOutlined } from '@ant-design/icons';
 import DirectoryTree from './components/DirectoryTree';
 import './index.less'
-
+import DelActionIcon from './images/del14px.png';
+import EditActionIcon from './images/edit14px.png';
+import AddActionIcon from './images/add.png';
+import FileIcon from './images/file.png';
 
 // const { DirectoryTree } = Tree;
 const { Search } = Input;
 
 //树形文件组件
 
-
-
 enum Types { 'add', 'del', 'edit', 'search' };
 
 type TypeVals = keyof typeof Types;
@@ -56,12 +57,12 @@ const MccsFileTree: React.FC<MccsFileTreeProps> = (props) => {
         {
           !isLeaf && (  //非叶子结点才可以新增
             <>
-              <Image width={15} preview={false} onClick={(e) => actionFunc(e, 'add', props)} src={'https://i.postimg.cc/fb3Fq26H/add.png'} />
+              <Image width={15} preview={false} onClick={(e) => actionFunc(e, 'add', props)} src={AddActionIcon} />
               <div style={{ width: 5 }}></div>
             </>
           )
         }
-        <Image width={15} preview={false} onClick={(e) => actionFunc(e, 'edit', props)} src={'https://i.postimg.cc/13HdKg0T/image.png'} />
+        <Image width={15} preview={false} onClick={(e) => actionFunc(e, 'edit', props)} src={EditActionIcon} />
         <div style={{ width: 5 }}></div>
         <Popconfirm
           title="是否确定删除?"
@@ -69,7 +70,7 @@ const MccsFileTree: React.FC<MccsFileTreeProps> = (props) => {
           okText="确定"
           cancelText="取消"
         >
-          <Image width={15} preview={false} onClick={e=>e.stopPropagation()}  src={'https://i.postimg.cc/HLkhvpBL/image.png'} />
+          <Image width={15} preview={false} onClick={e=>e.stopPropagation()}  src={DelActionIcon} />
         </Popconfirm>
       </div>
     )
@@ -83,7 +84,7 @@ const MccsFileTree: React.FC<MccsFileTreeProps> = (props) => {
         setcurrentActivedIndex(id);
         onSelectHandle(nodeProps)
       } : () => { setcurrentActivedIndex(id); }}>
-        <div style={{ display: 'flex', marginRight: 5, justifyContent: 'center', alignItems: 'center' }} ><Image width={15} preview={false} src={'https://i.postimg.cc/vHvhJJ1x/image.png'} /> </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>
 
         {(currentActivedIndex == id && editable) && <Action {...nodeProps} />  /*点击展示操作项*/}

+ 62 - 0
src/menuIcons.js

@@ -0,0 +1,62 @@
+/*
+ * @Author: your name
+ * @Date: 2021-08-05 15:54:27
+ * @LastEditTime: 2021-10-18 11:43:09
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: /CostAccountManaSys/src/menuIcons.js
+ */
+
+
+import React from 'react';
+import { SmileOutlined,
+     HomeOutlined, 
+     PicLeftOutlined, 
+     SettingOutlined,
+     NodeExpandOutlined,
+     BorderOuterOutlined,
+     CopyrightOutlined,
+     ProfileOutlined,
+     AccountBookOutlined,
+     ControlOutlined,
+     CrownOutlined,
+     ToolOutlined,
+     TableOutlined,
+     FileDoneOutlined
+} from '@ant-design/icons';
+
+const iconEnum = {
+  smile: <SmileOutlined></SmileOutlined>,
+  home: <HomeOutlined />,
+  picLeft: <PicLeftOutlined />,
+  setting: <SettingOutlined />,
+  crown:<CrownOutlined />,
+  tool:<ToolOutlined />,
+  TableOutlined:<TableOutlined />,
+  NodeExpandOutlined:<NodeExpandOutlined />,
+  BorderOuterOutlined:<BorderOuterOutlined />,
+  CopyrightOutlined:<CopyrightOutlined />,
+  ProfileOutlined:<ProfileOutlined />,
+  AccountBookOutlined:<AccountBookOutlined />,
+  ControlOutlined:<ControlOutlined />,
+  FileDoneOutlined:<FileDoneOutlined />
+};
+
+// const iconEnum = {
+//   smile:SmileOutlined,
+//   home: HomeOutlined,
+//   picLeft: PicLeftOutlined,
+//   setting: SettingOutlined,
+//   crown:CrownOutlined,
+//   tool:ToolOutlined,
+//   TableOutlined:TableOutlined,
+//   NodeExpandOutlined:NodeExpandOutlined,
+//   BorderOuterOutlined:BorderOuterOutlined,
+//   CopyrightOutlined:CopyrightOutlined,
+//   ProfileOutlined:ProfileOutlined,
+//   AccountBookOutlined:AccountBookOutlined,
+//   ControlOutlined:ControlOutlined,
+//   FileDoneOutlined:FileDoneOutlined
+// };
+
+export default iconEnum;

+ 0 - 62
src/menuIcons.ts

@@ -1,62 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-08-05 15:54:27
- * @LastEditTime: 2021-09-30 09:02:26
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: /CostAccountManaSys/src/menuIcons.js
- */
-
-
-import React from 'react';
-import { SmileOutlined,
-     HomeOutlined, 
-     PicLeftOutlined, 
-     SettingOutlined,
-     NodeExpandOutlined,
-     BorderOuterOutlined,
-     CopyrightOutlined,
-     ProfileOutlined,
-     AccountBookOutlined,
-     ControlOutlined,
-     CrownOutlined,
-     ToolOutlined,
-     TableOutlined,
-     FileDoneOutlined
-} from '@ant-design/icons';
-
-// const iconEnum = {
-//   smile: <SmileOutlined></SmileOutlined>,
-//   home: <HomeOutlined />,
-//   picLeft: <PicLeftOutlined />,
-//   setting: <SettingOutlined />,
-//   crown:<CrownOutlined />,
-//   tool:<ToolOutlined />,
-//   TableOutlined:<TableOutlined />,
-//   NodeExpandOutlined:<NodeExpandOutlined />,
-//   BorderOuterOutlined:<BorderOuterOutlined />,
-//   CopyrightOutlined:<CopyrightOutlined />,
-//   ProfileOutlined:<ProfileOutlined />,
-//   AccountBookOutlined:<AccountBookOutlined />,
-//   ControlOutlined:<ControlOutlined />,
-//   FileDoneOutlined:<FileDoneOutlined />
-// };
-
-const iconEnum = {
-  smile:SmileOutlined,
-  home: HomeOutlined,
-  picLeft: PicLeftOutlined,
-  setting: SettingOutlined,
-  crown:CrownOutlined,
-  tool:ToolOutlined,
-  TableOutlined:TableOutlined,
-  NodeExpandOutlined:NodeExpandOutlined,
-  BorderOuterOutlined:BorderOuterOutlined,
-  CopyrightOutlined:CopyrightOutlined,
-  ProfileOutlined:ProfileOutlined,
-  AccountBookOutlined:AccountBookOutlined,
-  ControlOutlined:ControlOutlined,
-  FileDoneOutlined:FileDoneOutlined
-};
-
-export default iconEnum;

+ 10 - 8
src/pages/404.tsx

@@ -1,17 +1,19 @@
-import { Button, Result } from 'antd';
+/*
+ * @Author: your name
+ * @Date: 2021-09-03 14:28:27
+ * @LastEditTime: 2021-10-18 10:57:43
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: /MedicalWisdomCheckSys/src/pages/404.tsx
+ */
+import { Result } from 'antd';
 import React from 'react';
-import { history } from 'umi';
 
 const NoFoundPage: React.FC = () => (
   <Result
     status="404"
     title="404"
-    subTitle="Sorry, the page you visited does not exist."
-    extra={
-      <Button type="primary" onClick={() => history.push('/')}>
-        Back Home
-      </Button>
-    }
+    subTitle="抱歉,你权限访问该页面或该页面不存在!"
   />
 );
 

+ 7 - 6
src/pages/GradeHospitalAccreditation/articleManagement/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2021-10-11 11:14:42
+ * @LastEditTime: 2021-10-18 10:36:18
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
@@ -95,11 +95,11 @@ const columns = [
         hideInSearch: true,
         dataIndex: 'selfEvaluation',
     },
-    {
-        title: '现场查核',
-        hideInSearch: true,
-        dataIndex: 'siteEvaluation',
-    },
+    // {
+    //     title: '现场查核',
+    //     hideInSearch: true,
+    //     dataIndex: 'siteEvaluation',
+    // },
     {
         title: '目标',
         dataIndex: 'targetEvaluation',
@@ -255,6 +255,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
 
     useEffect(() => {
         restModelData.getArticleTreeData();
+        restModelData.getCurrentHospScore();
     }, [])
 
     return (

+ 5 - 7
src/pages/GradeHospitalAccreditation/articleManagement/model.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:46:45
- * @LastEditTime: 2021-10-11 11:18:22
+ * @LastEditTime: 2021-10-18 10:35:41
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/model.ts
@@ -387,7 +387,7 @@ const articleManagement = () => {
       const tempRecords = recordsArray.map((item)=>{
 
          if(item.details){
-           
+          //条文下
           const tempArr:MccsRecordList.MccsRecordListItemInnerDetail[]  = item.details.map(val=>({
             name:val.userName,
             fileName:val.fileName,
@@ -404,6 +404,7 @@ const articleManagement = () => {
          }
 
          if(item.records){
+           //台账下
           const tempArr:MccsRecordList.MccsRecordListItemInnerDetail[] = item.records.map(val=>({
 
             name:val.uploadUserName,
@@ -463,10 +464,6 @@ const articleManagement = () => {
        }
   },[drawerFormType]);
 
-  useEffect(()=>{
-    getCurrentHospScore();
-  },[]);
-
   
 
   return {
@@ -511,7 +508,8 @@ const articleManagement = () => {
     getUploadLedgerType,
     uploadLedgerTypeList,
     setUploadLedgerTypeList,
-    currentHospSelfScoreAndOthers
+    currentHospSelfScoreAndOthers,
+    getCurrentHospScore
   };
 };
 

+ 27 - 27
src/pages/GradeHospitalAccreditation/ledgerUpload/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2021-10-09 11:38:52
+ * @LastEditTime: 2021-10-11 18:02:19
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
@@ -36,30 +36,30 @@ const { TabPane } = Tabs;
 const LedgerUpload: React.FC<LedgerUploadPropsType> = (props) => {
 
     const columns = [
-        {
-            key: 'articleType',
-            hideInTable: true,
-            renderFormItem: (item: any, { type }: any, form: any) => {
+        // {
+        //     key: 'articleType',
+        //     hideInTable: true,
+        //     renderFormItem: (item: any, { type }: any, form: any) => {
     
-                if (type === 'form') {
-                    return null;
-                }
-                return (
+        //         if (type === 'form') {
+        //             return null;
+        //         }
+        //         return (
                     
-                        <ProFormSelect
-                            width='sm'
-                            options={[
-                                { label: '全部', value: 'all' },
-                                { label: '未解决', value: 'open' },
-                                { label: '已解决', value: 'closed' },
-                                { label: '解决中', value: 'processing' },
-                            ]}
-                            placeholder="台账状态"
-                        />
+        //                 <ProFormSelect
+        //                     width='sm'
+        //                     options={[
+        //                         { label: '全部', value: 'all' },
+        //                         { label: '未解决', value: 'open' },
+        //                         { label: '已解决', value: 'closed' },
+        //                         { label: '解决中', value: 'processing' },
+        //                     ]}
+        //                     placeholder="台账状态"
+        //                 />
                    
-                )
-            },
-        },
+        //         )
+        //     },
+        // },
         {
             hideInTable: true,
             renderFormItem: (item: any, { type }: any, form: any) => {
@@ -117,11 +117,11 @@ const LedgerUpload: React.FC<LedgerUploadPropsType> = (props) => {
             hideInSearch: true,
             dataIndex: 'selfEvaluation',
         },
-        {
-            title: '现场查核',
-            hideInSearch: true,
-            dataIndex: 'siteEvaluation',
-        },
+        // {
+        //     title: '现场查核',
+        //     hideInSearch: true,
+        //     dataIndex: 'siteEvaluation',
+        // },
         {
             title: '目标',
             dataIndex: 'targetEvaluation',

+ 3 - 3
src/pages/PlatformMana/generalSetting/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-27 10:41:52
- * @LastEditTime: 2021-10-09 17:25:20
+ * @LastEditTime: 2021-10-12 17:04:27
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/PlatformMana/generalSetting/index.tsx
@@ -368,7 +368,7 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
                             console.log({values});
                             let formData = new FormData();
                             formData.set('file',values.file.file.originFileObj);
-                            console.log(formData.get('file'));
+                            // console.log(formData.get('file'));
                             const resp = await importFile(formData);
                     }}
                  >
@@ -386,7 +386,7 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
             <div className='block'>
                 <div className='blockTitle'>
                     评审细则类型设置
-                <Button onClick={importFileHandle}>导入</Button>
+                {/* <Button onClick={importFileHandle}>导入</Button> */}
                 </div>
                 <MccsEditableTable
                     columns={accreditationColumns}

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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-07-26 10:13:13
- * @LastEditTime: 2021-10-09 11:07:36
+ * @LastEditTime: 2021-10-18 11:10:42
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /TracerMethodology_PC/src/pages/UserMana/index.js
@@ -31,7 +31,6 @@ const UserMana = () => {
       dataIndex: 'menuId',
       key: 'menuId',
       hideInSearch: true,
-      ellipsis: true,
     },
     {
       title: 'URL',
@@ -53,14 +52,13 @@ const UserMana = () => {
       dataIndex: 'modifyUserName',
       key: 'modifyUserName',
       hideInSearch: true,
-      ellipsis: true,
+
     },
     {
       title: '变更日期',
       dataIndex: 'modifyTime',
       key: 'modifyTime',
       valueType: 'date',
-      ellipsis: true,
       hideInSearch: true,
     },
     {

+ 2 - 0
src/pages/Settings/type.d.ts

@@ -6,3 +6,5 @@
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/Settings/type.d.ts
  */
+
+

+ 1 - 5
src/pages/user/Login/index.tsx

@@ -50,10 +50,7 @@ const Login: React.FC = () => {
       // 登录
       //医院标识
       let hospSign:any='';
-      if(history){
-        hospSign = history.location.query?.hospSign;
-      }
-   
+      hospSign = history.location.query?.hospSign;
       let loginResult = await login({ ...values,hospSign});
 
       if (loginResult) {
@@ -62,7 +59,6 @@ const Login: React.FC = () => {
         await setUserInfo({...loginResult});
         localStorage.setItem('hospSign',hospSign); //保存医院标识
         /** 此方法会跳转到 redirect 参数所在的位置 */
-        if (!history) return;
         const { query } = history.location;
         const { redirect } = query as { redirect: string };
         history.push(redirect || '/');