瀏覽代碼

修复发布前bug/调整卡片滚动条

code4eat 3 年之前
父節點
當前提交
52e7991f28
共有 38 個文件被更改,包括 620 次插入146 次删除
  1. 11 1
      config/routes.ts
  2. 33 3
      src/access.ts
  3. 100 4
      src/app.tsx
  4. 7 2
      src/components/MccsClickableTabs/index.less
  5. 8 6
      src/components/MccsClickableTabs/index.tsx
  6. 11 0
      src/components/MccsFileTree/index.less
  7. 14 13
      src/components/MccsFileTree/index.tsx
  8. 0 40
      src/components/MccsPageContainer/index.jsx
  9. 6 0
      src/components/MccsPageContainer/index.less
  10. 122 0
      src/components/MccsPageContainer/index.tsx
  11. 2 2
      src/components/MccsProCard/index.tsx
  12. 3 0
      src/components/MccsProCard/style.less
  13. 2 1
      src/components/MccsRecordList/typings.d.ts
  14. 1 0
      src/components/MccsTable/index.less
  15. 7 2
      src/components/RightContent/AvatarDropdown.tsx
  16. 2 2
      src/components/RightContent/index.tsx
  17. 1 1
      src/global.less
  18. 62 0
      src/menuIcons.ts
  19. 6 6
      src/pages/GradeHospitalAccreditation/accreditationDetail/components/FormList/index.tsx
  20. 8 2
      src/pages/GradeHospitalAccreditation/accreditationDetail/index.less
  21. 3 3
      src/pages/GradeHospitalAccreditation/accreditationDetail/index.tsx
  22. 20 18
      src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
  23. 43 9
      src/pages/GradeHospitalAccreditation/articleManagement/model.ts
  24. 8 1
      src/pages/GradeHospitalAccreditation/articleManagement/server.ts
  25. 2 1
      src/pages/GradeHospitalAccreditation/articleManagement/typings.d.ts
  26. 7 1
      src/pages/GradeHospitalAccreditation/ledgerUpload/index.tsx
  27. 3 3
      src/pages/KeepImprove/qualityRating/index.less
  28. 4 4
      src/pages/KeepImprove/qualityRating/index.tsx
  29. 33 4
      src/pages/PlatformMana/generalSetting/index.tsx
  30. 10 1
      src/pages/PlatformMana/generalSetting/serve.ts
  31. 2 1
      src/pages/PlatformMana/menuManage/index.js
  32. 2 12
      src/pages/PlatformMana/roleManage/index.js
  33. 27 0
      src/pages/Settings/index.tsx
  34. 8 0
      src/pages/Settings/type.d.ts
  35. 4 1
      src/pages/user/Login/index.tsx
  36. 10 1
      src/pages/user/Login/service.ts
  37. 10 1
      src/pages/user/Login/typings.d.ts
  38. 18 0
      src/services/user.ts

+ 11 - 1
config/routes.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-09-29 18:34:00
+ * @LastEditTime: 2021-09-30 16:29:44
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/config/routes.ts
@@ -30,6 +30,7 @@ export default [
     path: '/PlatformMana',
     name: '平台系统管理',
     icon: 'smile',
+    access:'normalRouteFilter',
     routes: [
       {
         path: '/PlatformMana/generalSetting',
@@ -63,6 +64,7 @@ export default [
     path: '/GradeHospitalAccreditation',
     name: '等级医院评审',
     icon: 'smile',
+    access:'normalRouteFilter',
     routes: [
       {
         path: '/GradeHospitalAccreditation/accreditationDetail',
@@ -88,6 +90,7 @@ export default [
     path: '/DataManagement',
     name: '资料管理',
     icon: 'smile',
+    access:'normalRouteFilter',
     routes: [
       {
         path: '/DataManagement/publicData',
@@ -101,6 +104,7 @@ export default [
     path: '/KeepImprove',
     name: '持续改进',
     icon: 'smile',
+    access:'normalRouteFilter',
     routes: [
       {
         path: '/KeepImprove/qualityRating',
@@ -134,6 +138,12 @@ export default [
       },
     ],
   },
+  // {
+  //   path: '/Account',
+  //   name: '设置',
+  //   icon: 'smile',
+  //   component: './Settings/index',
+  // },
   {
     path: '/',
     redirect: '/',

+ 33 - 3
src/access.ts

@@ -1,9 +1,39 @@
+/*
+ * @Author: your name
+ * @Date: 2021-09-03 14:28:27
+ * @LastEditTime: 2021-10-09 09:40:42
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: /MedicalWisdomCheckSys/src/access.ts
+ */
 /**
  * @see https://umijs.org/zh-CN/plugins/plugin-access
  * */
-export default function access(initialState: { currentUser?: API.CurrentUser | undefined }) {
-  const { currentUser } = initialState || {};
+
+
+type menuDataItemType = {
+  path:string,
+  name:string,
+  icon:any,
+  component:string,
+  children?:menuDataItemType[]
+}
+
+export default  function access(initialState: { currentUser?: API.CurrentUser | undefined,menu:menuDataItemType[],isDev:boolean}) {
+  // const { currentUser,menu,isDev } = initialState || {};
   return {
-    canAdmin: currentUser && currentUser.access === 'admin',
+    // canAdmin: currentUser && currentUser.access === 'admin',
+    // normalRouteFilter:(route: any)=>{
+    //     const routePathArr = menu.map(t=>(t.path));
+    //     // console.log({routePathArr,route});
+    //     // console.log(routePathArr.includes(route.path));
+    //     //开发环境无视菜单权限
+    //     return isDev?true:routePathArr.includes(route.path)
+    // }
+    canAdmin: true,
+    normalRouteFilter:(route: any)=>{
+      return true;
+    }
   };
+  
 }

+ 100 - 4
src/app.tsx

@@ -1,25 +1,28 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-09-29 13:51:55
+ * @LastEditTime: 2021-10-09 09:15:47
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/app.tsx
  */
 import type { Settings as LayoutSettings } from '@ant-design/pro-layout';
 import { PageLoading } from '@ant-design/pro-layout';
-import type { RunTimeLayoutConfig } from 'umi';
+import { RunTimeLayoutConfig } from 'umi';
 import { history, Link } from 'umi';
-import { notification, Modal, message } from 'antd';
+import { notification, Modal } from 'antd';
 
 import RightContent from '@/components/RightContent';
 // import Footer from '@/components/Footer';
 // import { currentUser as queryCurrentUser } from './services/ant-design-pro/api';
 import { BookOutlined, LinkOutlined } from '@ant-design/icons';
-
+import iconEnum from './menuIcons';
 import {loginOut} from '@/utils';
 import logoIcon from '../public/logo.png';
 
+import { getMenus } from './services/user';
+import {updateUserInfo} from '@/pages/user/Login/service'; 
+
 const isDev = process.env.NODE_ENV === 'development';
 
 const loginPath = '/user/login';
@@ -39,6 +42,15 @@ export const initialStateConfig = {
   loading: <PageLoading />,
 };
 
+
+type menuDataItemType = {
+  path:string,
+  name:string,
+  icon:any,
+  component:string,
+  children?:menuDataItemType[]
+}
+
 /**
  * @see  https://umijs.org/zh-CN/plugins/plugin-initial-state
  * */
@@ -46,9 +58,15 @@ export async function getInitialState(): Promise<{
   settings?: Partial<LayoutSettings>;
   currentUser?: API.CurrentUserData;
   logo?:String;
+  isDev?:boolean,
+  goSetting?:boolean,//设置栏触发
+  resetPasswordHandle?:(formData:any)=>Promise<boolean>,
+  fetchUserMenu?:()=>Promise<menuDataItemType[]>,
+  menu?:menuDataItemType[],
   clearUserData?:() => Promise<boolean>;  //清空用户数据
   fetchUserInfo?: () => Promise<API.CurrentUser | undefined>;
 }> {
+
   const fetchUserInfo = async () => {
     try {
       const userData = localStorage.getItem('userData');
@@ -63,6 +81,21 @@ export async function getInitialState(): Promise<{
     return undefined;
   };
 
+  const fetchUserMenu = async ()=>{
+      const menu =  await getMenus();
+      if(menu){
+           return menu;
+      }
+  }
+
+  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');
       return Promise.resolve(true);
@@ -75,6 +108,10 @@ export async function getInitialState(): Promise<{
       currentUser,
       logo:logoIcon,
       clearUserData,
+      menu:[],
+      fetchUserMenu,
+      resetPasswordHandle,
+      isDev:process.env.NODE_ENV == 'development',
       settings: {
          navTheme:'dark',
          layout:'side'
@@ -176,8 +213,35 @@ export const request: RequestConfig = {
 };
 
 
+
+//将服务端获取的菜单 icon 字符串映射为对应的 icon Dom
+const mappingIcon = (menuData:menuDataItemType[]) => {
+  if(menuData.length==0){
+      console.log('空菜单');
+      return [
+        {
+          path:'',
+          name: '',
+          icon: '',
+          component: './404',
+        }
+      ]
+  }else {
+    const mappingMenu:menuDataItemType[] = menuData.map(item => ({
+      ...item,
+      icon: item.icon&&iconEnum[item.icon],
+      children: item.children ? mappingIcon(item.children) : [],
+    }));
+    return mappingMenu;
+  }
+  
+};
+
+
+
 // ProLayout 支持的api https://procomponents.ant.design/components/layout
 export const layout: RunTimeLayoutConfig = ({ initialState }) => {
+ 
   return {
     logo:initialState?.logo,
     rightContentRender: () => <RightContent />,
@@ -193,6 +257,38 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => {
         history.push(`${loginPath}?hospSign=${hospSign}`);
       }
     },
+    menu: {
+
+      params:{
+        currentUser:initialState?.currentUser
+      },
+      request: async () => {
+        // initialState.currentUser 中包含了所有用户信息
+        if(initialState){
+          const { currentUser,isDev} = initialState;
+          if(isDev){
+            //开发环境或超级账号
+            return []
+          }
+      
+          if (currentUser) {
+            const data:menuDataItemType[] = await getMenus();
+            
+            if(data){
+              // setInitialState((s) => ({ ...s, menu:data }));  
+              return mappingIcon(data);
+            }
+          } else {
+            return [
+              {
+                component: './404',
+              }
+            ]
+          }
+        }
+        return []
+      },
+    },
     links: isDev
       ? [
           <Link to="/umi/plugin/openapi" target="_blank">

+ 7 - 2
src/components/MccsClickableTabs/index.less

@@ -28,7 +28,7 @@
 
     &.disabled {
         cursor: text;
-        background: #d9d9d9;
+        background: #F7F8FA;
     }
 
 
@@ -45,7 +45,7 @@
         margin-bottom: 16px;
         .label {
           text-align: center;
-          width: 10%;
+          min-width:2%;
           font-size: 14px;
           font-family: SourceHanSansCN-Normal, SourceHanSansCN;
           font-weight: 400;
@@ -77,6 +77,11 @@
                   color: #3377FF;
                   background: #EBF1FF;
                 }
+
+                &.disabled {
+                  cursor: text;
+                  background: #F7F8FA;
+              }
               }
         }
         

+ 8 - 6
src/components/MccsClickableTabs/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-15 18:38:41
- * @LastEditTime: 2021-09-29 17:28:49
+ * @LastEditTime: 2021-09-30 11:08:21
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsClickableTabs/index.tsx
@@ -9,7 +9,7 @@
 
 
 
-import { Button } from 'antd';
+// import { Button } from 'antd';
 import React,{useState,useEffect} from 'react'
 
 import './index.less';
@@ -17,9 +17,9 @@ import './index.less';
 const MccsClickableTabs:React.FC<MccsClickableTabs.propsType> = (props)=>{
 
     const [list,setList] = useState<MccsClickableTabs.TabType[]>([]);
-    const {tabClickHandle,clear,onChange,type='single',disabled=false} = props;
+    const {tabClickHandle,clear,onChange,type='single'} = props;
     const [activedTab,setActivedTab] = useState<{label:string,value:any}>();
-
+    const [disabled,setDisabled] = useState(false);
 
     const clickHandle = (item:MccsClickableTabs.TabType,supItem:{label:string,value:string|number})=>{
 
@@ -40,9 +40,11 @@ const MccsClickableTabs:React.FC<MccsClickableTabs.propsType> = (props)=>{
 
     useEffect(()=>{
         // console.log('tabProps',props);
-        const {data=[],value,clear} = props;
+        const {data=[],value,clear,disabled} = props;
         setList(data);
         // console.log({props});
+        disabled&&setDisabled(true);
+        
         if(value){
             setActivedTab(value);
         }else{
@@ -84,7 +86,7 @@ const MccsClickableTabs:React.FC<MccsClickableTabs.propsType> = (props)=>{
                                               {
                                                  item.list&&item.list.map((val,i)=>{
                                                         return (
-                                                            <div className={activedTab?.label==item.label&&activedTab.value.value==val.value?'tab on':'tab'} key={i} onClick={()=>clickHandle(item,val)}>{val.label}</div>
+                                                            <div className={activedTab?.label==item.label&&activedTab.value.value==val.value?(disabled?'tab on disabled':'tab on'):disabled?'disabled tab':'tab'} key={i} onClick={()=>clickHandle(item,val)}>{val.label}</div>
                                                         )
                                                  }) 
                                               }

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

@@ -1,3 +1,14 @@
+
+
+.fileTree {
+  height: 100%;
+  overflow: hidden;
+}
+.treeContainer {
+  height:calc(100% - 50px);
+  overflow-y: scroll;
+}
+
 .searchBar {
   display: flex;
   flex-direction: row;

+ 14 - 13
src/components/MccsFileTree/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-06 10:28:12
- * @LastEditTime: 2021-09-26 16:13:56
+ * @LastEditTime: 2021-10-11 10:39:49
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsFileTree/index.tsx
@@ -125,7 +125,7 @@ const MccsFileTree: React.FC<MccsFileTreeProps> = (props) => {
   }, [treeData]);
 
   return (
-    <React.Fragment>
+    <div className='fileTree'>
       <div className="searchBar">
         {
           editable && (
@@ -140,17 +140,18 @@ const MccsFileTree: React.FC<MccsFileTreeProps> = (props) => {
         }
         <Search placeholder='请输入' className="inputArea" allowClear onSearch={(val, e) => searchHandle && searchHandle(val)} />
       </div>
-
-      {
-        isLoading ? <div className='spinWrap'><Spin delay={500} /></div> : (
-          <>
-            {treeData.map((node, i) => {
-              return loop(node, i);
-            })}
-          </>
-        )
-      }
-    </React.Fragment>
+      <div className='treeContainer'>
+          {
+            isLoading ? <div className='spinWrap'><Spin delay={500} /></div> : (
+              <>
+                {treeData.map((node, i) => {
+                  return loop(node, i);
+                })}
+              </>
+            )
+          }
+      </div>
+    </div>
   );
 };
 

+ 0 - 40
src/components/MccsPageContainer/index.jsx

@@ -1,40 +0,0 @@
-
-
-import React from 'react'
-import PropTypes from 'prop-types'
-
-import { Button, Dropdown, Menu } from 'antd';
-import { PageContainer } from '@ant-design/pro-layout';
-
-import './index.less';
-
-
-
-function MccsPageContainer(props) {
-    /**
-     * @param {*} children 
-     * @param {Object} config  //组件配置信息,参考ProComponent ProContainer
-     * @returns 
-     */
-    const {children,config} = props;
-    return (
-        <PageContainer
-           {
-               ...config
-           } 
-           style={{padding:'16px'}} 
-        >
-             {
-                children
-             }
-        </PageContainer>
-    )
-}
-
-MccsPageContainer.propTypes = {
-    config:PropTypes.object,
-    children:PropTypes.node
-}
-
-export default MccsPageContainer
-

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

@@ -4,4 +4,10 @@
     padding: 0 !important;
     margin:0;
     margin-top: 16px;
+}
+.ant-pro-page-container {
+    padding: 0 !important;
+    .ant-pro-grid-content {
+        padding:16px;
+    }
 }

+ 122 - 0
src/components/MccsPageContainer/index.tsx

@@ -0,0 +1,122 @@
+
+
+import React, { useEffect,useRef } from 'react'
+import PropTypes from 'prop-types'
+
+import { Button, Dropdown, Menu, Modal, Divider } from 'antd';
+import { PageContainer } from '@ant-design/pro-layout';
+import type { ProFormInstance } from '@ant-design/pro-form';
+import ProForm, {
+    // ModalForm,
+    // DrawerForm,
+    // QueryFilter,
+    // LightFilter,
+    // StepsForm,
+    ProFormText,
+    // ProFormDateRangePicker,
+    // ProFormSelect,
+    // ProFormRadio,
+    // LoginForm,
+} from '@ant-design/pro-form';
+import { useModel } from 'umi';
+import './index.less';
+
+
+type MccsPageContainerType = {
+    [key:string]:any
+}
+
+const MccsPageContainer:React.FC<MccsPageContainerType> = (props)=>{
+    /**
+     * @param {*} children 
+     * @param {Object} config  //组件配置信息,参考ProComponent ProContainer
+     * @returns 
+     */
+    const { children, config } = props;
+    const formRef = useRef<ProFormInstance>();
+    const { goSetting, update,currentUser,resetPasswordHandle} = useModel('@@initialState', (model) => ({ 
+        goSetting: model.initialState?.goSetting,
+         update: model.setInitialState,
+         currentUser:model.initialState?.currentUser,
+         resetPasswordHandle:model.initialState?.resetPasswordHandle,
+    }));
+
+    useEffect(() => {
+      
+        if (goSetting) {
+            //设置触发
+            Modal.confirm({
+                title: '密码设置',
+                icon: null,
+                width: 600,
+                content: (
+                    <ProForm initialValues={{...currentUser}} submitter={false} formRef={formRef}>
+                        <Divider />
+                        <ProFormText
+                            width="md"
+                            name="name"
+                            label="姓名"
+                            disabled
+                        />
+                        <ProFormText
+                            width="md"
+                            name="userId"
+                            label="userId"
+                            disabled
+                        />
+                        <ProFormText
+                            width="md"
+                            name="rePassword"
+                            label="密码"
+                            placeholder='密码不修改时留空'
+                        />
+                        <ProFormText
+                            width="md"
+                            name="password"
+                            label="再输入一次密码"
+                            placeholder='密码不修改时留空'
+                        />
+                    </ProForm>
+                ),
+                onOk: () => {
+                    if(formRef.current){
+                        const {password,userId,rePassword} = formRef.current.getFieldsValue();
+                        const params = {
+                            userId,
+                            password,
+                            rePassword
+                        }
+                        resetPasswordHandle?.(params).then(bool=>{
+                                if(bool){
+                                      
+                                }
+                        })
+                    }
+                },
+                closable: false,
+                onCancel: () => update(t => ({ ...t, goSetting: false }))
+            })
+        }
+    }, [goSetting]);
+
+    return (
+        <PageContainer
+            {
+            ...config
+            }
+            style={{ padding: '16px' }}
+        >
+            {
+                children
+            }
+        </PageContainer>
+    )
+}
+
+MccsPageContainer.propTypes = {
+    config: PropTypes.object,
+    children: PropTypes.node
+}
+
+export default MccsPageContainer
+

+ 2 - 2
src/components/MccsProCard/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-06 11:32:58
- * @LastEditTime: 2021-09-06 16:04:15
+ * @LastEditTime: 2021-10-09 09:01:30
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsProCard/index.tsx
@@ -11,7 +11,7 @@
 
 import React from 'react'
 import ProCard from '@ant-design/pro-card';
-
+import './style.less';
 
 //卡片组件,参考antD ProCard
 

+ 3 - 0
src/components/MccsProCard/style.less

@@ -0,0 +1,3 @@
+
+
+

+ 2 - 1
src/components/MccsRecordList/typings.d.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-15 09:17:43
- * @LastEditTime: 2021-09-26 15:28:18
+ * @LastEditTime: 2021-09-30 10:23:37
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsRecordList/typings.d.ts
@@ -31,6 +31,7 @@ declare namespace MccsRecordList {
         fileUrl:string,
         createTime:string,
         recordTypeName?:string,
+        accountType?:string,
         historyRecords:historyRecordsItem[]|[]
       }
 

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

@@ -7,6 +7,7 @@
 
 .ant-pro-table-search {
     padding: 0;
+    padding-bottom: 24px;
     .ant-form-item {
         margin-bottom: 0;
     }

+ 7 - 2
src/components/RightContent/AvatarDropdown.tsx

@@ -1,13 +1,13 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-09-29 18:32:49
+ * @LastEditTime: 2021-09-30 16:32:41
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/RightContent/AvatarDropdown.tsx
  */
 import React, { useCallback } from 'react';
-import { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons';
+import { LogoutOutlined, SettingOutlined } from '@ant-design/icons';
 import { Avatar, Menu, Spin } from 'antd';
 import { history, useModel } from 'umi';
 
@@ -35,6 +35,11 @@ const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ menu }) => {
         loginOut();
         return;
       }
+      if (key === 'settings') {
+        setInitialState((s) => ({ ...s,goSetting:true}));
+        
+        return null;
+      }
       history.push(`/account/${key}`);
     },
     [setInitialState],

+ 2 - 2
src/components/RightContent/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-09-03 15:43:20
+ * @LastEditTime: 2021-10-09 10:42:35
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/RightContent/index.tsx
@@ -95,7 +95,7 @@ const GlobalHeaderRight: React.FC = () => {
   }
   return (
     <Space className={className}>
-      <Notice />
+      {/* <Notice /> */}
       <Avatar menu={true} />
     </Space>
   );

+ 1 - 1
src/global.less

@@ -14,7 +14,7 @@ body,
 
 .ant-pro-sider-logo {
    h1 {
-    font-size:1rem;
+    font-size:16px !important;
    }
 }
 .ant-menu-submenu-selected {

+ 62 - 0
src/menuIcons.ts

@@ -0,0 +1,62 @@
+/*
+ * @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;

+ 6 - 6
src/pages/GradeHospitalAccreditation/accreditationDetail/components/FormList/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-10 11:44:42
- * @LastEditTime: 2021-09-28 10:17:31
+ * @LastEditTime: 2021-10-09 15:09:56
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/accreditationDetail/components/FormList/index.tsx
@@ -75,12 +75,12 @@ let FormList = forwardRef<FormList.FormListRefCurrent,FormList.FormListProps>((p
     }
 
     
-    const setInputVal = (val:ChangeEvent<HTMLTextAreaElement>|string,supKey:string|number,subKey?:string|number)=>{
+    const setInputVal = (val:any,supKey:string|number,subKey?:string|number)=>{
         //  console.log(val.target.value,supKey,subKey);
          let copiedData = data;
          let currentGroup = (copiedData.filter(item=>item.key==supKey))[0]; //选出父级
 
-         if(subKey){
+         if(subKey||subKey==0){
              //单个修改
             let currentChildInputTextArea = (currentGroup.list.filter(val=>val.key ==subKey ))[0]; //选出子集
 
@@ -110,11 +110,11 @@ let FormList = forwardRef<FormList.FormListRefCurrent,FormList.FormListProps>((p
 
     useEffect(() => {
         const { data = [] } = props;
-        const _data = data.map(item=>{
+        const _data = data.map((item,index)=>{
               const {detail:list,evaluation} = item;
-              const tempList = list.map((val:{title:string})=>({key:new Date().getTime(),detail:val.title}));
+              const tempList = list.map((val:any,i:number)=>({key:i,detail:val.title}));
               return {
-                   key:new Date().getTime(),
+                   key:index,
                    evaluation:evaluation,
                    list:tempList
               }

+ 8 - 2
src/pages/GradeHospitalAccreditation/accreditationDetail/index.less

@@ -1,3 +1,9 @@
+
+
+.cardInnerContainer {
+    height: calc(100%);
+    overflow-y: scroll;
+}
 .rightCard {
   position: relative;
 
@@ -15,8 +21,8 @@
 
   .ruleDetailContainer {
     flex: 1;
-    height: calc(100% - 120px);
-    overflow: scroll;
+    height: calc(100% - 84px);
+    overflow-y: scroll;
 
     .ruleList {
       display: flex;

+ 3 - 3
src/pages/GradeHospitalAccreditation/accreditationDetail/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-06 09:07:56
- * @LastEditTime: 2021-09-29 18:11:36
+ * @LastEditTime: 2021-10-11 10:36:20
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/accreditationDetail/index.tsx
@@ -219,7 +219,8 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
         if(isLeaf||(levelNum == 3 && actionType == 'add')){
                 //展示子集时才请求
           restAccreditationModel.getScoreSelectableList().then(data=>{
-            const tempArr = data.map((t:any)=>({label:t.levelNumber,value:t.levelNumber}));
+            const tempArrFilted = data.filter((t:any)=>t.configStatus != 0);
+            const tempArr = tempArrFilted.map((t:any)=>({label:t.levelNumber,value:t.levelNumber}));
             setSelecterList(tempArr);
           })
         }
@@ -304,7 +305,6 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
               />
             )
           }
-
         </MccsProCard>
         <MccsProCard colSpan={10} className='rightCard' style={{ height: '78vh', overflow: 'hidden' }} >
           <div className="detailRuleTitle">{currentActived?.title}</div>

+ 20 - 18
src/pages/GradeHospitalAccreditation/articleManagement/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2021-09-29 16:45:01
+ * @LastEditTime: 2021-10-11 11:14:42
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
@@ -132,9 +132,6 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
 
     const [articleSettingFormInit, setArticleSettingFormInit] = useState<{}>({});  //条文设置表单回显默认值
 
-    const [uploadLedgerTypeList,setUploadLedgerTypeList] = useState<MccsClickableTabs.TabType[]>([]);
-
-
     const onSelectHandle = (data: MccsFileTree.childTree) => {
         setCurrentActivedTree(data);
         //重新获取数据
@@ -173,9 +170,10 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
         //因为modalForm开启了request+params获取表单默认值,
         //所以必须先设置默认值才能开启弹窗
         if (formInitData) {
-            const { fileUrl, recordTypeName, fileName } = formInitData;
+            const { fileUrl, recordTypeName,accountType, fileName } = formInitData;
+            // console.log({formInitData});
             restModelData.setUploadFormInitValue({
-                tab:recordTypeName,
+                tab:{label:accountType,value:{label:recordTypeName,value:recordTypeName}},
                 files: [{
                     uid: new Date().getTime(),
                     name: fileName,
@@ -188,7 +186,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
         }
         restModelData.getUploadLedgerType().then(data=>{
             //设置上传台账类型
-            setUploadLedgerTypeList(data);
+            restModelData.setUploadLedgerTypeList(data);
           
         })
         restModelData.setModalVisible(true);
@@ -232,12 +230,14 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
     useEffect(() => {
         if (restModelData.leafData) {
             const { responsibilityDepartmentId,responsibilityDepartmentName, responsibilityUserId, targetEvaluation,responsibilityUserName } = restModelData.leafData;
-            setArticleSettingFormInit({
-                responsibilityDepartment:{label:responsibilityDepartmentName,value:responsibilityDepartmentId},
-                responsibilityUser: {label:responsibilityUserName,value:responsibilityUserId},
-                targetScores: targetEvaluation,
-                articleType: 'A'
-            });
+            if(responsibilityDepartmentName&&responsibilityDepartmentId){
+                setArticleSettingFormInit({
+                    responsibilityDepartment:{label:responsibilityDepartmentName,value:responsibilityDepartmentId},
+                    responsibilityUser: {label:responsibilityUserName,value:responsibilityUserId},
+                    targetScores: targetEvaluation,
+                    articleType: 'A'
+                });
+            }
         }
 
     }, [restModelData.leafData]);
@@ -259,13 +259,15 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
 
     return (
         <MccsPageContainer
-            config={headerConcig ? headerConcig : {}}
+            config={headerConcig ? headerConcig : {
+                content:!isModeTwo&&<div style={{textAlign:'right',fontSize:12,color: '#525866'}}>{restModelData.currentHospSelfScoreAndOthers}</div>
+            }}
         >
             {
                 restModelData.modalVisible && (
                     <MccsModal title='台账上传' visible={restModelData.modalVisible}
                         onFinish={(values: any) => restModelData.uploadFile(values)}
-                        initialValues={restModelData.uploadFormInitValue}
+                        initialValues={!restModelData.uploadFormInitValue?{}:restModelData.uploadFormInitValue}
                         onVisibleChange={onModalVisibleChange}
                         params={restModelData.uploadFormInitValue}
                         request={(params: any) => {
@@ -280,10 +282,10 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                             },
                         ]}>
                             <MccsClickableTabs
-                                disabled={(restModelData.uploadFormInitValue && JSON.stringify(restModelData.uploadFormInitValue) != '{}') ? true : false}
+                                disabled={(restModelData.uploadFormInitValue&&JSON.stringify(restModelData.uploadFormInitValue) != '{}') ? true : false}
                                 type='multi'
                                 onChange={uploadLedgerChangeHandle}
-                                data={uploadLedgerTypeList}
+                                data={restModelData.uploadLedgerTypeList}
                             />
                         </Form.Item>
                         <Form.Item name='files' rules={[
@@ -450,7 +452,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                                                     <div className='selfEvolutionArea'>
                                                         <div className='selfEvolutionTitle'>开始自评</div>
                                                         <MccsClickableTabs
-                                                            onChange={(value: string| number| null) => restModelData.onSelfEvolutionTabChange(value)}
+                                                            onChange={(value:{label:string,value:any}) => restModelData.onSelfEvolutionTabChange(value)}
                                                             data={restModelData.targetScores}
                                                             value={restModelData.selectedSelfEvolution}
                                                         />

+ 43 - 9
src/pages/GradeHospitalAccreditation/articleManagement/model.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:46:45
- * @LastEditTime: 2021-09-29 17:39:50
+ * @LastEditTime: 2021-10-11 11:18:22
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/model.ts
@@ -9,7 +9,7 @@
 
 import { useState, useEffect } from 'react';
 import { getTreeFileTableData,getDepartmentList,settingArticle,batchSettingArticle,getSelfEvaluation,
-  uploadFilePost,selfEvolutionCommit,delHistoryRecods,getUploadLedgerSelectableType,
+  uploadFilePost,selfEvolutionCommit,delHistoryRecods,getUploadLedgerSelectableType,getCurrentHospSelfScore,
 } from './server';
 import {getTreeList} from '@/pages/GradeHospitalAccreditation/accreditationDetail/service';
 import {getScoreLevelData,getAccreditationTypeData} from '@/pages/PlatformMana/generalSetting/serve';
@@ -48,6 +48,10 @@ const articleManagement = () => {
 
   const [currentSelectedSelefEvolution,setCurrentSelectedSelefEvolution] = useState<{label:string,value:any}>(); //MccsClickableTabs 点击对象
 
+  const [uploadLedgerTypeList,setUploadLedgerTypeList] = useState<MccsClickableTabs.TabType[]>([]); //上传台账可选类型
+
+  const [currentHospSelfScoreAndOthers,setCurrentHospSelfScoreAndOthers] = useState<string>();  //当前医院评分及自评结果
+
   const getArticleTreeData = async (keyword?:string|number) => {
         //获取树数据
         const { list = [] } = await getTreeList(keyword);
@@ -212,18 +216,18 @@ const articleManagement = () => {
   
   const uploadFile = async (values:any)=>{
         console.log({'表单':values});
-      
         if(leafData){
           // console.log({'上传表单':values});
           try{
             const {files:{fileList=[]},tab} = values;
-            const {id} = leafData;
+            const {id,accountType} = leafData;
             let formData = new FormData();
             
             formData.append('file',fileList[0]?.originFileObj);
             formData.append('id',id.toString());
+            formData.append('categoryType',accountType);
         
-            if(JSON.stringify(uploadFormInitValue) != '{}'&&uploadFormInitValue){
+            if(uploadFormInitValue&&JSON.stringify(uploadFormInitValue) != '{}'){
                  //重新上传不允许修改类型
                  const {tab} = uploadFormInitValue;
                  formData.append('accountType',tab.label);
@@ -299,7 +303,7 @@ const articleManagement = () => {
   const getScoreList = async ()=>{
         //条文评级
         const data =  await getScoreLevelData();
-        const tempArr = data.map((t:any)=>({label:t.levelNumber,value:t.levelNumber}));
+        const tempArr = data.map((t:any)=>({label:t.levelNumber,value:t.levelNumber,configStatus:t.configStatus}));
         return Promise.resolve(tempArr);
   }
 
@@ -327,6 +331,12 @@ const articleManagement = () => {
         }
   }
 
+  const getCurrentHospScore = async ()=>{
+      //获取医院评分及自评信息
+      const resp = await getCurrentHospSelfScore();
+      setCurrentHospSelfScoreAndOthers(resp);
+  }
+
 
   useEffect(() => {
     if (currentActivedTree) {
@@ -335,7 +345,9 @@ const articleManagement = () => {
       getTableData();
       if(isLeaf){
         getScoreList().then(data=>{
-          setTargetScores(data);
+          const dataFilted = data.filter((t:any)=>t.configStatus != 0);  //去掉不启动
+          // console.log({data,dataFilted});
+          setTargetScores(dataFilted);
         });
         accreditationGroupType().then(data=>{
           setRuleTypes(data);
@@ -399,8 +411,9 @@ const articleManagement = () => {
             fileUrl:val.fileUrl,
             createTime:val.uploadTime,
             recordTypeName:val.accountName,
+            accountType:val.accountType,
             historyRecords:val.historyVersionVOList?val.historyVersionVOList.map(t=>({
-              versionName:t.versionName,name:val.uploadUserName,time:val.uploadTime,id:t.id
+              versionName:t.versionName,name:val.uploadUserName,time:t.uploadTime,id:t.id
             })):[]
             
            }))
@@ -436,6 +449,24 @@ const articleManagement = () => {
        }
   },[tabKey]);
 
+  useEffect(()=>{
+       //当抽屉类型改变时
+       if(drawerFormType == 'BATCHSETTING'){
+        getScoreList().then(data=>{
+          const dataFilted = data.filter((t:any)=>t.configStatus != 0);  //去掉不启动
+          setTargetScores(dataFilted);
+        });
+        accreditationGroupType().then(data=>{
+          setRuleTypes(data);
+        });
+
+       }
+  },[drawerFormType]);
+
+  useEffect(()=>{
+    getCurrentHospScore();
+  },[]);
+
   
 
   return {
@@ -477,7 +508,10 @@ const articleManagement = () => {
     selectedSelfEvolution,
     getSelfEvaluationRecordList,
     delHistoryRecordHandle,
-    getUploadLedgerType
+    getUploadLedgerType,
+    uploadLedgerTypeList,
+    setUploadLedgerTypeList,
+    currentHospSelfScoreAndOthers
   };
 };
 

+ 8 - 1
src/pages/GradeHospitalAccreditation/articleManagement/server.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:20
- * @LastEditTime: 2021-09-29 16:28:52
+ * @LastEditTime: 2021-10-11 11:05:39
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/server.ts
@@ -118,6 +118,13 @@ export const getUploadLedgerSelectableType = async ()=>{
 }
 
 
+//获取当前医院目标和自评结果
+export const getCurrentHospSelfScore = async ()=>{
+    return request('/api/pfm/reviewArticle/getTargetAndSelf', {
+        method: 'GET',
+    });
+}
+
 
 
 

+ 2 - 1
src/pages/GradeHospitalAccreditation/articleManagement/typings.d.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:42
- * @LastEditTime: 2021-09-28 11:45:02
+ * @LastEditTime: 2021-09-30 10:26:03
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/typings.d.ts
@@ -27,6 +27,7 @@ declare namespace API {
           fileUrl: string;
           uploadTime: string;
           accountName: string;
+          accountType:string,
           historyVersionVOList: {
             versionName: string;
             accountName: string;

+ 7 - 1
src/pages/GradeHospitalAccreditation/ledgerUpload/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2021-09-29 17:12:13
+ * @LastEditTime: 2021-10-09 11:38:52
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
@@ -194,6 +194,12 @@ const LedgerUpload: React.FC<LedgerUploadPropsType> = (props) => {
         }else {
             restArticleManagementModelData.setUploadFormInitValue({})
         }
+
+        restArticleManagementModelData.getUploadLedgerType().then(data=>{
+            //设置上传台账可选类型
+            restArticleManagementModelData.setUploadLedgerTypeList(data);
+          
+        })
         restArticleManagementModelData.setModalVisible(true);
     }
 

+ 3 - 3
src/pages/KeepImprove/qualityRating/index.less

@@ -1,4 +1,4 @@
-.content {
+.QualityRatingContent {
   padding: 0 16px;
   padding-top: 32px;
   padding-bottom: 30px;
@@ -23,7 +23,7 @@
       align-items: center;
       border-bottom: 2px solid white;
       .list {
-        width: calc(100%/6);
+        width: calc(100%/5);
         height: 48px;
         line-height: 48px;
         text-align: center;
@@ -50,7 +50,7 @@
             border-bottom: 2px solid white;
 
             .list {
-                width: calc(100%/6);
+                width: calc(100%/5);
                 height: 48px;
                 line-height: 48px;
                 text-align: center;

+ 4 - 4
src/pages/KeepImprove/qualityRating/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-26 16:56:46
- * @LastEditTime: 2021-09-29 16:15:46
+ * @LastEditTime: 2021-10-09 15:55:56
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/ qualityRating/index.tsx
@@ -116,13 +116,13 @@ const QualityRating: React.FC<QualityRatingType> = (props) => {
 
     return (
         <MccsPageContainer>
-            <div className='content'>
+            <div className='QualityRatingContent'>
                 <div className='blockTitle'>质量评级统计表单</div>
                 <div className='tableWrap'>
                     <div className='columnsWrap'>
                         <div className='list'>类型</div>
                         <div className='list'>要求</div>
-                        <div className='list'>现场查核</div>
+                        {/* <div className='list'>现场查核</div> */}
                         <div className='list'>目标</div>
                         <div className='list'>自评</div>
                         <div className='list'>系统评分</div>
@@ -134,7 +134,7 @@ const QualityRating: React.FC<QualityRatingType> = (props) => {
                                     <div className='rowList' key={index}>
                                         <div className='list'>{item.typeLevel}</div>
                                         <div className='list'>{item.requirements}</div>
-                                        <div className='list'>{item.site}</div>
+                                        {/* <div className='list'>{item.site}</div> */}
                                         <div className='list'>{item.target}</div>
                                         <div className='list'>{item.self}</div>
                                         <div className='list'>{item.system}</div>

+ 33 - 4
src/pages/PlatformMana/generalSetting/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-27 10:41:52
- * @LastEditTime: 2021-09-29 18:07:34
+ * @LastEditTime: 2021-10-09 17:25:20
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/PlatformMana/generalSetting/index.tsx
@@ -11,10 +11,13 @@
 import React, { useState } from 'react'
 import MccsPageContainer from '@/components/MccsPageContainer/index';
 import MccsEditableTable from '@/components/MccsEditableTable/index';
-import { Checkbox } from 'antd';
+import MccsUpload from '@/components/MccsUpload';
+import {Button,Modal,Form} from 'antd';
 import { getAccreditationTypeData, addTableData, editTableData, getScoreLevelData,getLedgerType,delTableData } from './serve';
-
+import ProForm from '@ant-design/pro-form';
 import './index.less';
+import {importFile} from './serve';
+
 
 
 type GeneralSettingType = {
@@ -239,6 +242,7 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
                 success: true
             }
         }
+        return null
     }
 
 
@@ -355,10 +359,35 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
         }
     }
 
+    const importFileHandle = ()=>{
+        Modal.confirm({
+             title:'导入',
+             content:(
+                 <ProForm 
+                    onFinish={async (values)=>{
+                            console.log({values});
+                            let formData = new FormData();
+                            formData.set('file',values.file.file.originFileObj);
+                            console.log(formData.get('file'));
+                            const resp = await importFile(formData);
+                    }}
+                 >
+                     <Form.Item name='file'>
+                       <MccsUpload />
+                     </Form.Item>
+                 </ProForm>
+             ),
+        });
+    }
+
     return (
         <MccsPageContainer>
+            
             <div className='block'>
-                <div className='blockTitle'>评审细则类型设置</div>
+                <div className='blockTitle'>
+                    评审细则类型设置
+                <Button onClick={importFileHandle}>导入</Button>
+                </div>
                 <MccsEditableTable
                     columns={accreditationColumns}
                     request={getTableDataRequest}

+ 10 - 1
src/pages/PlatformMana/generalSetting/serve.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-27 11:06:43
- * @LastEditTime: 2021-09-29 17:51:55
+ * @LastEditTime: 2021-10-09 09:46:56
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/PlatformMana/generalSetting/serve.ts
@@ -64,3 +64,12 @@ export const delTableData  = async (id:number)=>{
         params:{id}
     });
 }
+
+//导入
+export const importFile  = async (formData:FormData)=>{
+
+    return request('/api/pfm/excel/importReviewRule', {
+        method: 'POST',
+        data:formData
+    });
+}

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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-07-26 10:13:13
- * @LastEditTime: 2021-09-28 10:10:29
+ * @LastEditTime: 2021-10-09 11:07:36
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /TracerMethodology_PC/src/pages/UserMana/index.js
@@ -46,6 +46,7 @@ const UserMana = () => {
       key: 'path',
       ellipsis: true,
       hideInSearch: true,
+      width:'20%'
     },
     {
       title: '变更人',

+ 2 - 12
src/pages/PlatformMana/roleManage/index.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-07-26 10:13:13
- * @LastEditTime: 2021-09-29 18:31:40
+ * @LastEditTime: 2021-10-09 14:26:14
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /TracerMethodology_PC/src/pages/UserMana/index.js
@@ -48,7 +48,7 @@ const UserMana = () => {
           return null;
         }
         return (
-          <Form.Item >
+          <Form.Item noStyle>
             <ProFormDateRangePicker  fieldProps={{locale: locale,onChange:(moment)=>{console.log(moment)} }} name="modifyTime" />
           </Form.Item>
         )
@@ -103,27 +103,23 @@ const UserMana = () => {
       dataIndex: 'id',
       key: 'id',
       hideInSearch: true,
-      ellipsis: true,
     },
     {
       title: '姓名',
       dataIndex: 'name',
       key: 'name',
-      ellipsis: true,
     },
     {
       title: '用户名',
       dataIndex: 'account',
       key: 'account',
       hideInSearch: true,
-      ellipsis: true,
     },
     {
       title: '在职状态',
       dataIndex: 'hospitalStatus',
       key: 'hospitalStatus',
       hideInSearch: true,
-      ellipsis: true,
       render:num=><>{num==0?'离职':'在职'}</>
     },
   ];
@@ -134,13 +130,11 @@ const UserMana = () => {
       dataIndex: 'menuId',
       key: 'menuId',
       hideInSearch: true,
-      ellipsis: true,
     },
     {
       title: '菜单名称',
       dataIndex: 'name',
       key: 'name',
-      ellipsis: true,
     }
   ];
 
@@ -271,10 +265,6 @@ const UserMana = () => {
         pagination={{
           pageSize: 10,
         }}
-        search={{
-          defaultCollapsed: false,
-          labelWidth: 'auto',
-        }}
       />
 
       <ModalForm

+ 27 - 0
src/pages/Settings/index.tsx

@@ -0,0 +1,27 @@
+/*
+ * @Author: your name
+ * @Date: 2021-09-30 16:20:12
+ * @LastEditTime: 2021-09-30 16:24:21
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: /MedicalWisdomCheckSys/src/pages/Settings/index.tsx
+ */
+
+
+import React from 'react'
+import MccsProCard from '@/components/MccsProCard/index';
+
+
+type SettingsType = {
+
+}
+
+const Settings:React.FC<SettingsType> = ()=>{
+    return (
+        <div className='pageContainer'>
+                <MccsProCard></MccsProCard>
+        </div>
+    )
+}
+
+export default Settings

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

@@ -0,0 +1,8 @@
+/*
+ * @Author: your name
+ * @Date: 2021-09-30 16:21:13
+ * @LastEditTime: 2021-09-30 16:21:13
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: /MedicalWisdomCheckSys/src/pages/Settings/type.d.ts
+ */

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

@@ -8,6 +8,8 @@ import ProForm, { ProFormText } from '@ant-design/pro-form';
 import { Link, history, useModel } from 'umi';
 import Footer from '@/components/Footer';
 import { login } from './service';
+import { getMenus } from '@/services/user';
+
 
 
 import styles from './index.less';
@@ -33,10 +35,11 @@ const Login: React.FC = () => {
   const setUserInfo = async (data:API.CurrentUserData) => {
    
       localStorage.setItem('userData',JSON.stringify(data));
-
+      const menuData = await getMenus();
       await setInitialState((s) => ({
         ...s,
         currentUser: data,
+        menu:menuData,
       }));
     
   };

+ 10 - 1
src/pages/user/Login/service.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-09 11:31:23
- * @LastEditTime: 2021-09-13 14:03:24
+ * @LastEditTime: 2021-09-30 17:55:33
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/user/Login/service.ts
@@ -20,4 +20,13 @@ export const login  = (data:API.LoginParams)=>{
         data:data
     });
 
+}
+//修改密码
+export const updateUserInfo  = (data:API.EditUserInfoType)=>{
+    
+    return request('/api/pfm/user/modifyPwd', {
+        method: 'POST',
+        data:data
+    });
+
 }

+ 10 - 1
src/pages/user/Login/typings.d.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-09 14:09:21
- * @LastEditTime: 2021-09-14 17:50:51
+ * @LastEditTime: 2021-09-30 17:24:22
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/types/API.d.ts
@@ -30,5 +30,14 @@ declare namespace API {
     token:string,
     [propsName:string]:any
   }
+
+  type EditUserInfoType = {
+    account?:string,
+    hospId?:number,
+    hospitalStatus?:number,
+    id?:number,
+    name?:string,
+    password?:string
+  }
   
 }

+ 18 - 0
src/services/user.ts

@@ -0,0 +1,18 @@
+/*
+ * @Author: your name
+ * @Date: 2021-09-30 09:13:57
+ * @LastEditTime: 2021-09-30 09:15:17
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: /MedicalWisdomCheckSys/src/services/user.ts
+ */
+
+
+import { request } from 'umi';
+
+//获取当前登录用户菜单数据
+export async function getMenus() {
+    return request(`/api/pfm/menu/nav`, {
+      method: 'GET',
+    });
+}