Bladeren bron

添加台账上传

code4eat 3 jaren geleden
bovenliggende
commit
29b6c8bffb
22 gewijzigde bestanden met toevoegingen van 824 en 617 verwijderingen
  1. 7 7
      config/proxy.ts
  2. 56 4
      config/routes.ts
  3. BIN
      public/blueFileIcon.png
  4. 191 193
      src/app.tsx
  5. 1 1
      src/components/MccsClickableTabs/index.tsx
  6. 27 22
      src/components/MccsLightTable/index.tsx
  7. 1 1
      src/global.less
  8. 1 4
      src/global.tsx
  9. 204 0
      src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/fragment/ledger.tsx
  10. 2 2
      src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/fragment/multi.tsx
  11. 177 0
      src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/fragment/setArticle.tsx
  12. 18 151
      src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/index.tsx
  13. 72 48
      src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/index.tsx
  14. 1 0
      src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/style.less
  15. 1 68
      src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
  16. 22 58
      src/pages/GradeHospitalAccreditation/articleManagement/model.ts
  17. 33 22
      src/pages/GradeHospitalAccreditation/articleManagement/server.ts
  18. 2 1
      src/pages/GradeHospitalAccreditation/articleManagement/typings.d.ts
  19. 3 31
      src/pages/GradeHospitalAccreditation/ledgerUpload/index.tsx
  20. 2 2
      src/pages/reports/index.tsx
  21. 3 2
      src/services/user.ts
  22. BIN
      智慧查检旧版_master.zip

+ 7 - 7
config/proxy.ts

@@ -24,13 +24,13 @@ export default {
       pathRewrite: { '^/api': '' },
     },
   },
-  mock: {
-    '/api/': {
-      target: 'http://localhost:8000',
-      changeOrigin: true,
-      pathRewrite: { '^': '' },
-    },
-  },
+  // mock: {
+  //   '/api/': {
+  //     target: 'http://localhost:8000',
+  //     changeOrigin: true,
+  //     pathRewrite: { '^': '' },
+  //   },
+  // },
   prod: {
     '/api/': {
       target: 'https://118.31.245.65:8083/',

+ 56 - 4
config/routes.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2022-03-11 18:57:13
+ * @LastEditTime: 2022-03-29 17:25:05
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/config/routes.ts
@@ -149,15 +149,67 @@ export default [
     redirect: '/GradeHospitalAccreditation/accreditationDetail',
   },
   {
-    path: '/reports/a',
+    path: '/reports/0',
     component: './reports',
   },
   {
-    path: '/reports/b',
+    path: '/reports/1',
     component: './reports',
   },
   {
-    path: '/reports/c',
+    path: '/reports/2',
+    component: './reports',
+  },
+  {
+    path: '/reports/3',
+    component: './reports',
+  },
+  {
+    path: '/reports/4',
+    component: './reports',
+  },
+  {
+    path: '/reports/5',
+    component: './reports',
+  },
+  {
+    path: '/reports/6',
+    component: './reports',
+  },
+  {
+    path: '/reports/7',
+    component: './reports',
+  },
+  {
+    path: '/reports/8',
+    component: './reports',
+  },
+  {
+    path: '/reports/9',
+    component: './reports',
+  },
+  {
+    path: '/reports/10',
+    component: './reports',
+  },
+  {
+    path: '/reports/11',
+    component: './reports',
+  },
+  {
+    path: '/reports/12',
+    component: './reports',
+  },
+  {
+    path: '/reports/13',
+    component: './reports',
+  },
+  {
+    path: '/reports/14',
+    component: './reports',
+  },
+  {
+    path: '/reports/15',
     component: './reports',
   },
   {

BIN
public/blueFileIcon.png


+ 191 - 193
src/app.tsx

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

+ 1 - 1
src/components/MccsClickableTabs/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-15 18:38:41
- * @LastEditTime: 2022-03-16 16:13:26
+ * @LastEditTime: 2022-03-29 17:42:30
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsClickableTabs/index.tsx

+ 27 - 22
src/components/MccsLightTable/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-12-24 09:43:04
- * @LastEditTime: 2022-01-04 09:26:49
+ * @LastEditTime: 2022-04-29 16:48:03
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsLightTable/index.tsx
@@ -18,7 +18,7 @@ import './style.less';
 const MccsLightTable: React.FC<{
     columns: MccsLightTableTypes.MccsLightTableColumn[],
     data?: [],
-    request?: (current: number,pageSize: number) => Promise<{
+    request?: (current: number, pageSize: number) => Promise<{
         current: number,
         list: any[],
         pageSize: number,
@@ -35,32 +35,32 @@ const MccsLightTable: React.FC<{
 
     const [dataList, setDataList] = useState<any[]>([]);
     const [renderColumns, seRenderColumns] = useState<MccsLightTableTypes.MccsLightTableColumn[]>([]);
-    const [pageData, setPageData] = useState<{ pageSize: number, current: number }>({pageSize:10,current:1});
-    const [total,setTotal] = useState(0);  // 数据总数
+    const [pageData, setPageData] = useState<{ pageSize: number, current: number }>({ pageSize: 10, current: 1 });
+    const [total, setTotal] = useState(0);  // 数据总数
 
-    const getData = async (current: number,size: number) => {
+    const getData = async (current: number, size: number) => {
         if (!request) return [];
-        const data = await request(current,size);
+        const data = await request(current, size);
         if (data) {
-            const { list = [],totalCount } = data;
+            const { list = [], totalCount } = data;
             setTotal(totalCount);
             setDataList(list);
-        }else {
+        } else {
             return []
         }
 
     }
 
-    const onShowSizeChangeHandle = (current: number,size: number)=>{
+    const onShowSizeChangeHandle = (current: number, size: number) => {
 
-        setPageData({...pageData,current:current+1,pageSize:size});
-        getData(current+1,size); // current 默认从0开始
+        setPageData({ ...pageData, current: current + 1, pageSize: size });
+        getData(current + 1, size); // current 默认从0开始
     }
 
-    const pageChangeHandle = (page: number,pageSize: number|undefined)=>{
+    const pageChangeHandle = (page: number, pageSize: number | undefined) => {
         // 分页页码变化时
         // console.log({page,pageSize});
-        getData(page,pageSize || 10);
+        getData(page, pageSize || 10);
     }
 
     useEffect(() => {
@@ -88,7 +88,7 @@ const MccsLightTable: React.FC<{
     }, [columns]);
 
     useEffect(() => {
-        getData(pageData.current,pageData.pageSize);
+        getData(pageData.current, pageData.pageSize);
         // setDataList([
         //     {
         //         gradeLevel:'A',
@@ -149,9 +149,14 @@ const MccsLightTable: React.FC<{
                                             }
                                             return (
                                                 <div className='cell' key={k} style={{ width: `${v.width}%` }}>
-                                                    <Tooltip title={cellValue}>
-                                                        {cellValue}
-                                                    </Tooltip>
+                                                    {
+                                                        item.valueType != 'option' ? (
+                                                            <Tooltip title={cellValue}>
+                                                                {cellValue}
+                                                            </Tooltip>
+                                                        ) : cellValue
+                                                    }
+
                                                 </div>
                                             )
                                         })
@@ -198,12 +203,12 @@ const MccsLightTable: React.FC<{
             {
                 request && (
                     <div className='pagination'>
-                        <Pagination size="small" 
-                            total={total} 
+                        <Pagination size="small"
+                            total={total}
                             pageSize={pageData?.pageSize}
-                            showSizeChanger 
-                            showQuickJumper 
-                            onChange={(page,pageSize)=>pageChangeHandle(page,pageSize)}
+                            showSizeChanger
+                            showQuickJumper
+                            onChange={(page, pageSize) => pageChangeHandle(page, pageSize)}
                             onShowSizeChange={onShowSizeChangeHandle}
                         />
                     </div>

+ 1 - 1
src/global.less

@@ -31,7 +31,7 @@ body,
 }
 
 .mwc-ant-card-body {
-  padding:16px !important;
+  padding:0px !important;
 }
 
 .mwc-ant-tree-checkbox-checked .ant-tree-checkbox-inner {

+ 1 - 4
src/global.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2022-03-09 17:32:29
+ * @LastEditTime: 2022-03-29 15:53:52
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/global.tsx
@@ -14,9 +14,6 @@ const { pwa } = defaultSettings;
 const isHttps = document.location.protocol === 'https:';
 
 
-
-
-    
   // if pwa is true
 if (pwa) {
   // Pop up a prompt on the page asking the user if they want to use the latest version

+ 204 - 0
src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/fragment/ledger.tsx

@@ -0,0 +1,204 @@
+/*
+ * @Author: your name
+ * @Date: 2022-04-28 16:02:55
+ * @LastEditTime: 2022-05-06 10:45:40
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/fragment/ledger.tsx
+ */
+
+
+import { Upload, message, Empty, Table } from 'antd';
+
+import MccsDrawerForm from '@/components/MccsDrawerForm/index';
+import { useModel } from 'umi';
+
+import blueFieIcon from '../../../../../../../../public/blueFileIcon.png';
+import { useEffect, useState } from 'react';
+import { delLedgerRecords, getLedgerRecords, ledgerRecordList, uploadFilePost } from '@/pages/GradeHospitalAccreditation/articleManagement/server';
+import MccsTable from '@/components/MccsTable/index';
+
+
+const { Dragger } = Upload;
+
+const Ledger = () => {
+
+    const columns = [
+        {
+          title: '时间',
+          dataIndex: 'createTime',
+          render:(text:any, record:any)=>{
+              return `${new Date(record.createTime).getFullYear()}-${new Date(record.createTime).getMonth() + 1}-${new Date(record.createTime).getDate()} ${new Date(record.createTime).getHours()}:${new Date(record.createTime).getMinutes()}:${new Date(record.createTime).getSeconds()}`
+          }
+        },
+        {
+          title: '名称',
+          dataIndex: 'fileName',
+        },
+        {
+            title: '上传人',
+            dataIndex: 'createUserName',
+        },
+        {
+          title: '操作',
+          render: (text:any, record:any) => (
+            <a href={record.fileUrl} target='_blank'>预览</a>
+          ),
+        },
+      ];
+
+    const props = {
+        name: 'file',
+        multiple: true,
+        customRequest:(option:any)=>{
+            option.onSuccess('')
+        },
+        onChange(info: any) {
+            const { status } = info.file
+            if (status === 'done') {
+                set_uploadList([...info.fileList]);
+            } else if (status === 'error') {
+                message.error(`${info.file.name} file upload failed.`);
+            }
+        },
+        onDrop(e: any) {
+            console.log('Dropped files', e.dataTransfer.files);
+        },
+    };
+
+
+    const { articleManagement } = useModel('allModels');
+
+    const {
+        isLeaf,
+        treeData,
+        getTableData,
+        currentActivedTree,
+        setCurrentActivedTree,
+        scoreList,
+        getDepartmentRequest,
+        currentActDataDireactory,
+        ...restModelData
+    } = articleManagement;
+
+    const [ledgerRecordList, set_ledgerRecordList] = useState<ledgerRecordList[]>([]);  //台账记录
+    const [uploadList, set_uploadList] = useState<any>([]);
+
+    const onVisibleChangeHandle = (visible: boolean) => {
+        //drawer展示控制
+        restModelData.setDrawerVisible(visible);
+    }
+
+    const uploadLedgerHandle = async () => {
+
+        const uploadFormData = new FormData();
+
+        for (const item of uploadList) {
+            uploadFormData.append('file', item.originFileObj as Blob)
+        }
+
+        uploadFormData.append('id', `${currentActDataDireactory?.id}`);
+
+        const resp = await uploadFilePost(uploadFormData);
+
+        if (resp) {
+            getRecordList();
+        }
+    }
+
+    const getRecordList = async () => {
+        if (currentActDataDireactory) {
+            const resp = await getLedgerRecords({ id: currentActDataDireactory.id });
+            if (resp) {
+                const { list } = resp;
+                set_ledgerRecordList(list);
+
+                return {
+                    data: list,
+                    success: true,
+                  };
+            }
+            return []
+        }
+    }
+
+    const delLedgerRecord = async (data: ledgerRecordList) => {
+        const resp = await delLedgerRecords(data.id);
+        if (resp) {
+            getRecordList();
+        }
+    }
+
+    useEffect(() => {
+        getRecordList();
+    }, []);
+
+    return (
+        <MccsDrawerForm
+            title={restModelData.drawerFormType == 'VIEWLEDGER'?currentActDataDireactory?.directory:'台账上传'}
+            width={restModelData.drawerFormType == 'VIEWLEDGER'?800:500}
+            visible={restModelData.drawerVisible}
+            onVisibleChange={onVisibleChangeHandle}
+            submitter={false}
+        >
+            {restModelData.drawerFormType == 'VIEWLEDGER' && (
+                  <MccsTable 
+                     search={false}
+                     columns={columns}  
+                     request={getRecordList} 
+                     tableStyle={{padding:0}}
+                  />
+            )}
+            {
+                restModelData.drawerFormType == 'Ledger' && (
+                    <>
+                        <div className='uploadArea'>
+                            <Dragger {...props}>
+                                <p className="ant-upload-drag-icon">
+                                    <img src={blueFieIcon} width={40} />
+                                </p>
+                                <p className="ant-upload-text" style={{ marginTop: 8, marginBottom: 8 }}>点击或将文件拖拽到这里上传</p>
+                                <p className="ant-upload-hint" style={{ fontSize: 12, color: '#666F80' }}>
+                                    支持拓展名:.doc .pdf .jpg .docx
+                                </p>
+                            </Dragger>
+                        </div>
+
+                        {uploadList.length > 0 && <button onClick={uploadLedgerHandle} style={{ marginTop: 30 }}>提交上传文件</button>}
+
+                        <div style={{ fontSize: 16, height: 16, color: '#7A8599', marginTop: 50, marginBottom: 24 }}>台账记录</div>
+                        <div>
+                            {
+                                ledgerRecordList.map((item, index) => {
+                                    return (
+                                        <div className='ledgerRecord' key={index} style={{ display: 'flex', flexDirection: 'column', marginBottom: 16 }}>
+                                            <div style={{ color: '#292C33', fontWeight: 'bold', fontSize: 14 }}>{item.fileName}</div>
+                                            <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
+                                                <span style={{ color: '#525866', fontSize: 12 }}>
+                                                    {`${new Date(item.createTime).getFullYear()}-${new Date(item.createTime).getMonth() + 1}-${new Date(item.createTime).getDate()} ${new Date(item.createTime).getHours()}:${new Date(item.createTime).getMinutes()}:${new Date(item.createTime).getSeconds()}`}
+                                                </span>
+                                                <div>
+                                                    <a style={{ fontSize: 12, color: '#3377FF' }} onClick={() => delLedgerRecord(item)}>删除</a>
+                                                    {/* <Divider type='vertical' /> */}
+                                                    {/* <a style={{fontSize:12,color:'#3377FF'}} >重新上传</a> */}
+                                                </div>
+                                            </div>
+                                        </div>
+                                    )
+                                })
+                            }
+                        </div>
+                        {
+                            ledgerRecordList.length == 0 && (<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />)
+                        }
+                    </>
+                )
+            }
+
+        </MccsDrawerForm>
+
+    )
+
+}
+
+export default Ledger;

+ 2 - 2
src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/multi.tsx → src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/fragment/multi.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2022-03-14 11:17:12
- * @LastEditTime: 2022-03-16 15:50:24
+ * @LastEditTime: 2022-04-28 15:36:45
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/multi.tsx
@@ -10,7 +10,7 @@
 import { ProFormSelect } from "@ant-design/pro-form";
 import { Button, Col, Empty } from "antd";
 import { useEffect, useState } from "react";
-import { getDepartmentList } from "../../../server";
+import { getDepartmentList } from "../../../../server";
 
 
 export type DataItemType = {

+ 177 - 0
src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/fragment/setArticle.tsx

@@ -0,0 +1,177 @@
+/*
+ * @Author: your name
+ * @Date: 2022-04-28 16:12:05
+ * @LastEditTime: 2022-04-28 16:13:10
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/fragment/setArticle.tsx
+ */
+
+import MccsDrawerForm from '@/components/MccsDrawerForm/index';
+import {ProFormInstance } from '@ant-design/pro-form';
+import MccsClickableTabs from '@/components/MccsClickableTabs/index';
+import { useEffect, useRef, useState } from 'react'
+
+import { Form, Row, Col } from 'antd'
+import { useModel } from 'umi';
+import MultiResponsibilitySelecter from './multi';
+
+//条文设置/表格批量设置drawer弹窗
+
+const SetArticle = () => {
+
+    const { articleManagement } = useModel('allModels');
+
+    const {
+        isLeaf,
+        treeData,
+        getTableData,
+        currentActivedTree,
+        setCurrentActivedTree,
+        scoreList,
+        getDepartmentRequest,
+
+        ...restModelData
+    } = articleManagement;
+
+    const drawerFormRef = useRef<ProFormInstance>();
+
+    const [ifsetTargetScore, setifsetTargetScore] = useState(true); //设置目标分数是否必填
+    const [rows,setrows] = useState(0);
+    const [respDepartmentList,setrespDepartmentList] = useState<{label:string;value:any}[]|[]>([]);  //可选单位
+
+
+    const onVisibleChangeHandle = (visible: boolean) => {
+        //drawer展示控制
+        if (visible) {
+            if (restModelData.leafData) {
+                // getDepartmentUsers(restModelData.leafData?.reviewArticle.responsibilityDepartmentId);
+            }
+        }
+        !visible && restModelData.setArticleSettingFormInit(undefined);//清空默认值
+        restModelData.setDrawerVisible(visible);
+    }
+
+    const setTitle = () => {
+
+        if (restModelData.drawerFormType == 'ARTICLE_SET') {
+            return '条文设置'
+        }
+        if (restModelData.drawerFormType == 'BATCHSETTING') {
+            return '批量设置'
+        }
+        return ''
+    }
+
+    const onFinishHandle = (values: any) => {
+
+        if (restModelData.drawerFormType == 'ARTICLE_SET') {
+            restModelData.setArticle(values)
+        }
+        if (restModelData.drawerFormType == 'BATCHSETTING') {
+            restModelData.batchSetting(values)
+        }
+    }
+
+    const setRespDepartment =async () => {
+          const data = await getDepartmentRequest();
+          setrespDepartmentList(data);
+    }
+
+
+    useEffect(() => {
+        if (articleManagement.articleSettingFormInit && articleManagement.articleSettingFormInit.targetScores) {
+            setifsetTargetScore(true);
+        } else {
+            setifsetTargetScore(false);
+        }
+    }, [articleManagement.articleSettingFormInit?.targetScores]);
+
+
+
+    useEffect(()=>{
+        setRespDepartment();
+    },[])
+
+
+
+    return (
+        <MccsDrawerForm
+            title={setTitle()}
+            width={500}
+            formRef={drawerFormRef}
+            visible={restModelData.drawerVisible}
+            initialValues={restModelData.drawerFormType == 'ARTICLE_SET' ? { 
+                ...articleManagement.articleSettingFormInit,
+                main_DepartmentAndManager:[{
+                    responsibilityDepartment:articleManagement.articleSettingFormInit?.responsibilityDepartment,
+                    responsibilityUser:articleManagement.articleSettingFormInit?.responsibilityUser
+                }]
+            } : undefined}
+            onFinish={(values: any) => onFinishHandle({...values,targetScores:ifsetTargetScore?values.targetScores:{label:'',value:''}})}
+            onVisibleChange={onVisibleChangeHandle}
+        >
+            <div>
+                <div className='formItemTitle require'>负责人及单位</div>
+                <Row >
+                    <Col span={24}>
+                           <Form.Item name='main_DepartmentAndManager'>
+                               <MultiResponsibilitySelecter options={respDepartmentList}  rows={1}  />
+                           </Form.Item>
+                    </Col>
+                </Row>
+                
+
+                <div className='formItemTitle'>合作负责人及单位<span onClick={() => setrows(rows+1)}>添加</span></div>
+                <Row >
+                    <Col span={24}>
+                           <Form.Item name='Co_DepartmentAndManager'>
+                               <MultiResponsibilitySelecter options={respDepartmentList} editable={true}  rows={rows}  />
+                           </Form.Item>
+                    </Col>
+                </Row>
+
+                <div className={ifsetTargetScore ? 'formItemTitle require' : 'formItemTitle'}>目标分数{ifsetTargetScore && <span onClick={() => setifsetTargetScore(false)}>暂不设置</span>}</div>
+                <Row >
+                    <Col span={24}>
+                        <Form.Item name='targetScores' rules={[
+                            {
+                                required: true,
+                                message: '请选择目标分数!',
+                            },
+                        ]}>
+                            <MccsClickableTabs
+                                clear={!ifsetTargetScore}
+                                data={restModelData.targetScores}
+                                tabClickHandle={(val)=>{setifsetTargetScore(true)}}
+                            />
+                        </Form.Item>
+                    </Col>
+                </Row>
+                {
+                    true && (
+                        <>
+                            <div className='formItemTitle require'>条文组别</div>
+                            <Row>
+                                <Col span={24}>
+                                    <Form.Item name='articleType' rules={[
+                                        {
+                                            required: true,
+                                            message: '请选择条文组别!',
+                                        },
+                                    ]}>
+                                        <MccsClickableTabs
+                                            data={restModelData.ruleTypes}
+                                        />
+                                    </Form.Item>
+                                </Col>
+                            </Row>
+                        </>
+                    )
+                }
+            </div>
+        </MccsDrawerForm>
+    )
+}
+
+export default SetArticle;

+ 18 - 151
src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2022-03-07 11:05:19
- * @LastEditTime: 2022-03-16 16:12:03
+ * @LastEditTime: 2022-04-29 17:15:37
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/drawer/set.tsx
@@ -9,172 +9,39 @@
 
 
 
-import MccsDrawerForm from '@/components/MccsDrawerForm/index';
-import {ProFormInstance } from '@ant-design/pro-form';
-import MccsClickableTabs from '@/components/MccsClickableTabs/index';
-import { useEffect, useRef, useState } from 'react'
 
-import { Form, Row, Col } from 'antd'
 import { useModel } from 'umi';
-import MultiResponsibilitySelecter from './multi';
-
 
+import Ledger from './fragment/ledger';
+import SetArticle from './fragment/setArticle';
 
 //条文设置/表格批量设置drawer弹窗
 
-const SetDrawer = () => {
-
-    const { articleManagement } = useModel('allModels');
-
-    const {
-        isLeaf,
-        treeData,
-        getTableData,
-        currentActivedTree,
-        setCurrentActivedTree,
-        scoreList,
-        getDepartmentRequest,
-
-        ...restModelData
-    } = articleManagement;
-
-    const drawerFormRef = useRef<ProFormInstance>();
-
-    const [ifsetTargetScore, setifsetTargetScore] = useState(true); //设置目标分数是否必填
-    const [rows,setrows] = useState(0);
-    const [respDepartmentList,setrespDepartmentList] = useState<{label:string;value:any}[]|[]>([]);  //可选单位
-
 
-    const onVisibleChangeHandle = (visible: boolean) => {
-        //drawer展示控制
-        if (visible) {
-            if (restModelData.leafData) {
-                // getDepartmentUsers(restModelData.leafData?.reviewArticle.responsibilityDepartmentId);
-            }
-        }
-        !visible && restModelData.setArticleSettingFormInit(undefined);//清空默认值
-        restModelData.setDrawerVisible(visible);
-    }
+const SwitchDrawer = ({drawerFormType}:{drawerFormType:any})=>{
 
-    const setTitle = () => {
+   if(drawerFormType == 'ARTICLE_SET'||drawerFormType == 'BATCHSETTING'){
+        return <SetArticle />
+   }
 
-        if (restModelData.drawerFormType == 'ARTICLE_SET') {
-            return '条文设置'
-        }
-        if (restModelData.drawerFormType == 'BATCHSETTING') {
-            return '批量设置'
-        }
-        return ''
-    }
-
-    const onFinishHandle = (values: any) => {
-
-        if (restModelData.drawerFormType == 'ARTICLE_SET') {
-            restModelData.setArticle(values)
-        }
-        if (restModelData.drawerFormType == 'BATCHSETTING') {
-            restModelData.batchSetting(values)
-        }
-    }
-
-    const setRespDepartment =async () => {
-          const data = await getDepartmentRequest();
-          setrespDepartmentList(data);
-    }
-
-
-    useEffect(() => {
-        if (articleManagement.articleSettingFormInit && articleManagement.articleSettingFormInit.targetScores) {
-            setifsetTargetScore(true);
-        } else {
-            setifsetTargetScore(false);
-        }
-    }, [articleManagement.articleSettingFormInit?.targetScores]);
+   if(drawerFormType == 'Ledger'||drawerFormType == 'VIEWLEDGER'){
+     return <Ledger />
+   }
 
+   return <></>
+}
 
+const SetDrawer = () => {
 
-    useEffect(()=>{
-        setRespDepartment();
-    },[])
+    const { articleManagement } = useModel('allModels');
 
+    const {
+        drawerFormType,
+    } = articleManagement;
 
 
     return (
-        <MccsDrawerForm
-            title={setTitle()}
-            width={500}
-            formRef={drawerFormRef}
-            visible={restModelData.drawerVisible}
-            initialValues={restModelData.drawerFormType == 'ARTICLE_SET' ? { 
-                ...articleManagement.articleSettingFormInit,
-                main_DepartmentAndManager:[{
-                    responsibilityDepartment:articleManagement.articleSettingFormInit?.responsibilityDepartment,
-                    responsibilityUser:articleManagement.articleSettingFormInit?.responsibilityUser
-                }]
-            } : undefined}
-            onFinish={(values: any) => onFinishHandle(values)}
-            onVisibleChange={onVisibleChangeHandle}
-        >
-            <div>
-                <div className='formItemTitle require'>负责人及单位</div>
-                <Row >
-                    <Col span={24}>
-                           <Form.Item name='main_DepartmentAndManager'>
-                               <MultiResponsibilitySelecter options={respDepartmentList}  rows={1}  />
-                           </Form.Item>
-                    </Col>
-                </Row>
-                
-
-                <div className='formItemTitle'>合作负责人及单位<span onClick={() => setrows(rows+1)}>添加</span></div>
-                <Row >
-                    <Col span={24}>
-                           <Form.Item name='Co_DepartmentAndManager'>
-                               <MultiResponsibilitySelecter options={respDepartmentList} editable={true}  rows={rows}  />
-                           </Form.Item>
-                    </Col>
-                </Row>
-
-                <div className={ifsetTargetScore ? 'formItemTitle require' : 'formItemTitle'}>目标分数{ifsetTargetScore && <span onClick={() => setifsetTargetScore(false)}>暂不设置</span>}</div>
-                <Row >
-                    <Col span={24}>
-                        <Form.Item name='targetScores' rules={[
-                            {
-                                required: true,
-                                message: '请选择目标分数!',
-                            },
-                        ]}>
-                            <MccsClickableTabs
-                                clear={!ifsetTargetScore}
-                                data={restModelData.targetScores}
-                                tabClickHandle={(val)=>{setifsetTargetScore(true)}}
-                            />
-                        </Form.Item>
-                    </Col>
-                </Row>
-                {
-                    true && (
-                        <>
-                            <div className='formItemTitle require'>条文组别</div>
-                            <Row>
-                                <Col span={24}>
-                                    <Form.Item name='articleType' rules={[
-                                        {
-                                            required: true,
-                                            message: '请选择条文组别!',
-                                        },
-                                    ]}>
-                                        <MccsClickableTabs
-                                            data={restModelData.ruleTypes}
-                                        />
-                                    </Form.Item>
-                                </Col>
-                            </Row>
-                        </>
-                    )
-                }
-            </div>
-        </MccsDrawerForm>
+        <SwitchDrawer drawerFormType={drawerFormType} />
     )
 }
 

+ 72 - 48
src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2022-03-08 10:41:15
- * @LastEditTime: 2022-03-22 15:45:27
+ * @LastEditTime: 2022-04-29 17:13:08
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/index.tsx
@@ -26,33 +26,11 @@ const { Option } = Select;
 
 const myEvent = new Event('resize');
 
-const MccsLightTableColumns = [
-    {
-        key: 'gradeLevel',
-        title: '档次',
-        width: 10
-    },
-    {
-        key: 'directory',
-        title: '名称',
-        width: 60
-    },
-    {
-        key: 'accountType',
-        title: '类型',
-    },
-    {
-        key: 'accountStatus',
-        title: '需要台账',
-        render: (record: any) => {
-            return record.accountStatus == 0 ? '否' : '是'
-        }
-    },
-]
+
 
 const ArticleDetail = ({ isModeTwo = false }) => {
 
-    const { articleManagement } = useModel('allModels');
+    const { articleManagement,ledgerUpload } = useModel('allModels');
 
     const {
         isLeaf,
@@ -62,13 +40,45 @@ const ArticleDetail = ({ isModeTwo = false }) => {
         ...restModelData
     } = articleManagement;
 
-    // console.log({isModeTwo});
+    const {} = ledgerUpload
 
     const [scrollAreaH, setScrollAreaH] = useState(100);
     const leafContentRef = useRef<HTMLDivElement>(null);
     const scrollContentRef = useRef<HTMLDivElement>(null);
     const [ifCollapse, setifCollapse] = useState(false);
 
+    const MccsLightTableColumns = [
+        {
+            key: 'gradeLevel',
+            title: '档次',
+            width: 10
+        },
+        {
+            key: 'directory',
+            title: '名称',
+            width: 60
+        },
+        {
+            key: 'accountType',
+            title: '类型',
+        },
+        {
+            key: 'accountStatus',
+            title: '需要台账',
+            render: (record: any) => {
+                return record.accountStatus == 0 ? '否' : '是'
+            }
+        },
+        {
+            key: 'accountStatus',
+            title: '操作',
+            valueType:'option',
+            render: (record: any) => {
+                return record.accountStatus == 1 &&(<a onClick={()=>viewLedgerFileHandle(record)}>查看</a>)
+            }
+        },
+    ]
+
     const mccsEditableTableColumns = [
         {
             title: '名称',
@@ -140,19 +150,6 @@ const ArticleDetail = ({ isModeTwo = false }) => {
 
 
         },
-        {
-            title: '台账上传',
-            align: 'center',
-            dataIndex: 'accountStatus',
-            width: '10%',
-            valueType: 'switch',
-            render: (_: any, row: any) => {
-                return (
-                    <Switch size='small' disabled checked={row.accountStatus} />
-                )
-            },
-        },
-
     ]
 
 
@@ -231,7 +228,7 @@ const ArticleDetail = ({ isModeTwo = false }) => {
             const headerH = 48 + 16;
             const scoreH = isModeTwo ? (60) : 0;
             const h = window.innerHeight - (leafContentH + headerH + scoreH);
-            console.log({leafContentH,headerH,scoreH,h});
+        
             setScrollAreaH(h - _num - 24);
         }
     }
@@ -293,6 +290,20 @@ const ArticleDetail = ({ isModeTwo = false }) => {
         restModelData.setEditMode(!restModelData.editMode);
     }
 
+    const uploadLedgerHandle = (item:API.TaizhangDirectoryTableItem)=>{
+        //台账上传点击触发台账管理界面上传抽屉
+        restModelData.set_currentActDataDireactory(item);
+        restModelData.setDrawerFormType('Ledger');
+        restModelData.setDrawerVisible(true);
+    }
+
+    const viewLedgerFileHandle = (item:API.TaizhangDirectoryTableItem)=>{
+        console.log('ee');
+        restModelData.set_currentActDataDireactory(item);
+        restModelData.setDrawerFormType('VIEWLEDGER');
+        restModelData.setDrawerVisible(true);
+    }
+
 
     useEffect(() => {
         if (restModelData.editMode) {
@@ -330,18 +341,12 @@ const ArticleDetail = ({ isModeTwo = false }) => {
     return (
         <div className='articleDetailContainer' >
 
-            {
-                //抽屉
-            }
-
-            {/* {restModelData.drawerVisible && <SetDrawer />} */}
-
             <SetDrawer />
 
             {
                 isLeaf && (
                     <div className={ifCollapse ? 'leafContent collapse' : 'leafContent'} ref={leafContentRef}>
-                        <div className='leafContentTitle'>{currentActivedTree ? currentActivedTree.title : ''}</div>
+                        <div className='leafContentTitle'>{currentSelectedActObj.name||currentSelectedActObj.title}</div>
                         <div style={{marginBottom:'24px'}}>
                         <div className='peopleGroup'>
                             <span>条文组别:</span>
@@ -528,7 +533,26 @@ const ArticleDetail = ({ isModeTwo = false }) => {
                                                 success: false
                                             }
                                         }}
-                                        columns={mccsEditableTableColumns}
+                                        columns={restModelData.editMode?[...mccsEditableTableColumns,{
+                                            title: '台账上传',
+                                            align: 'center',
+                                            dataIndex: 'accountStatus',
+                                            width: '10%',
+                                            valueType: 'switch',
+                                            render: (_: any, row: any) => {
+                                                return (
+                                                    <Switch size='small' disabled checked={row.accountStatus} />
+                                                )
+                                            },
+                                        },]:[
+                                            ...mccsEditableTableColumns,
+                                            {
+                                                title: '操作',
+                                                width: '10%',
+                                                align: 'center',
+                                                render: (text: string, record: any, _: any, action: any) => (record.accountStatus?<a onClick={()=>uploadLedgerHandle(record)}>上传</a>:'')
+                                            }
+                                        ]}
                                     />
                                 )
                             }

+ 1 - 0
src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/style.less

@@ -1,5 +1,6 @@
 .articleDetailContainer {
 
+
   .leafContent {
 
     position: relative;

+ 1 - 68
src/pages/GradeHospitalAccreditation/articleManagement/index.tsx

@@ -2,7 +2,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2022-03-22 15:31:09
+ * @LastEditTime: 2022-04-29 14:23:05
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
@@ -268,18 +268,6 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
         restModelData.setDrawerVisible(true);
     }
 
-    const onModalVisibleChange = (visible: boolean) => {
-        //表单弹窗
-
-        !visible && restModelData.setUploadFormInitValue(undefined);
-        restModelData.setModalVisible(visible);
-
-    }
-
-    const uploadLedgerChangeHandle = (tabData: any) => {
-        //台账上传类型选择回调
-
-    }
 
     const openDetailInDrawer = (record: any) => {
         // restModelData.setRecords(record)
@@ -374,61 +362,6 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                     ] : null
                 }}
             >
-                {
-                    restModelData.modalVisible && (
-                        //台账上传弹窗
-                        <MccsModal title='台账上传' visible={restModelData.modalVisible}
-                            onFinish={(values: any) => restModelData.uploadFile(values)}
-                            initialValues={!restModelData.uploadFormInitValue ? {} : restModelData.uploadFormInitValue}
-                            onVisibleChange={onModalVisibleChange}
-                            params={restModelData.uploadFormInitValue}
-                            request={(params: any) => {
-                                return Promise.resolve(params)
-                            }}
-                        >
-                            <div className='formItemTitle'>选择类型</div>
-                            <Form.Item name='tab' rules={[
-                                {
-                                    required: true,
-                                    message: '请选择类型!',
-                                },
-                            ]}>
-                                <MccsClickableTabs
-                                    //重新上传不允许更改类型
-                                    disabled={(restModelData.uploadFormInitValue && JSON.stringify(restModelData.uploadFormInitValue) != '{}') ? true : false}
-                                    type='multi'
-                                    onChange={uploadLedgerChangeHandle}
-                                    data={restModelData.uploadLedgerTypeList}
-                                />
-                            </Form.Item>
-                            <ProFormDependency name={['tab']}>
-                                {
-                                    ({ tab }) => {
-                                        //制度特殊处理
-                                        return tab && tab.value.label == '制度' && (
-                                            <ProFormSelect
-                                                name="publicCateId"
-                                                label="制度下类型"
-                                                width='md'
-                                                request={async () => await restModelData.getSelectableRuleChilds(tab.value.value)}
-                                                placeholder="请选择"
-                                                rules={[{ required: true, message: '请选择!' }]}
-                                            />
-                                        )
-                                    }
-                                }
-                            </ProFormDependency>
-                            <Form.Item name='files' rules={[
-                                {
-                                    required: true,
-                                    message: '请上传文件!',
-                                },
-                            ]}>
-                                <MccsUpload maxCount={10} />
-                            </Form.Item>
-                        </MccsModal>
-                    )
-                }
 
                 <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '100%' }}>
                     <div style={{ height: 'calc(100vh - 88px)', width: restModelData.editMode ? 0 : '25%', transition: 'width 0.2s ease-in', padding: '16px', backgroundColor: '#fff', marginRight: '16px', boxSizing: 'border-box' }} >

+ 22 - 58
src/pages/GradeHospitalAccreditation/articleManagement/model.ts

@@ -2,7 +2,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:46:45
- * @LastEditTime: 2022-03-17 16:47:39
+ * @LastEditTime: 2022-04-29 16:55:25
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/model.ts
@@ -16,7 +16,6 @@ import {
   settingArticle,
   batchSettingArticle,
   getSelfEvaluation,
-  uploadFilePost,
   selfEvolutionCommit,
   getUploadLedgerSelectableType,
   getCurrentHospSelfScore,
@@ -24,7 +23,6 @@ import {
   getTaizhangImplementation,
   commitTaizhangImplementation,
   commitTaizhangDataDirectoryTableList,
-
 } from './server';
 import { getTreeList, getMaterialListGrades } from '@/pages/GradeHospitalAccreditation/accreditationDetail/service';
 import {
@@ -33,8 +31,9 @@ import {
   getLedgerType
 } from '@/pages/PlatformMana/generalSetting/serve';
 
+
 import { notification } from 'antd';
-import { DataItemType, MultiResponsibilitySelecterValueType } from './components/articleDetailModule/drawer/multi';
+import { DataItemType, MultiResponsibilitySelecterValueType } from './components/articleDetailModule/drawer/fragment/multi';
 
 export interface ImplementationDataItem {
   level: string;
@@ -65,7 +64,7 @@ const articleManagement = () => {
    * BATCHSETTING 批量设置
    */
 
-  const [drawerFormType, setDrawerFormType] = useState<'ARTICLE_SET' | 'BATCHSETTING'|undefined>(undefined);
+  const [drawerFormType, setDrawerFormType] = useState<'ARTICLE_SET' | 'BATCHSETTING'|'Ledger'|'VIEWLEDGER'|undefined>(undefined);
 
   const [reloadRightContent, setReloadRightContent] = useState(false);
 
@@ -73,8 +72,6 @@ const articleManagement = () => {
 
   const [modalVisible, setModalVisible] = useState(false);
 
-  const [uploadFormInitValue, setUploadFormInitValue] = useState<any>();
-
   const [selectedSelfEvolution, setSelectedSelfEvolution] =
     useState<{ label: string; value: any }>(); // MccsClickableTabs value值
 
@@ -112,6 +109,9 @@ const articleManagement = () => {
   const [detailDrawerVisible, setdetailDrawerVisible] = useState(false);   //条文详情抽屉
 
   const [ifHasEdit,setifHasEdit] = useState(false);   //是否操作了条文设置或者编辑操作
+  
+  //设置当前操作表格里的资料目录项
+  const [currentActDataDireactory,set_currentActDataDireactory] = useState<API.TaizhangDirectoryTableItem|undefined>(undefined);
 
 
 
@@ -182,6 +182,7 @@ const articleManagement = () => {
               accountType: '-',
               hospId: -1,
               userId: -1,
+              userIds:[],
               pfmReviewArticleDepartList:[]
             },
             pfmViewRuleDetailDataVoList: [],
@@ -249,7 +250,7 @@ const articleManagement = () => {
 
   const setArticle = async (values: FormValueType) => {
     // 条文设置
-    
+
     setifHasEdit(true);
 
     if (currentActivedTree && leafData) {
@@ -324,50 +325,7 @@ const articleManagement = () => {
     }
   };
 
-  const uploadFile = async (values: any) => {
-    console.log({ 表单: values });
-
-    if (leafData) {
-      // console.log({'上传表单':values});
-      try {
-        const {
-          files: { fileList = [] },
-          tab,
-          publicCateId,
-        } = values;
-        const { id, accountType } = leafData.reviewArticle;
-        const formData = new FormData();
-        fileList.map((t: MccsUpload.UploadFile) => {
-          formData.append('file', t.originFileObj);
-        });
-        formData.append('id', id.toString());
-        formData.append('categoryType', accountType);
-        // 应产品要求‘制度’是不可变,根据制度获取对应关系
-        tab.value.label == '制度' && formData.append('publicCateId', publicCateId);
-
-        if (uploadFormInitValue && JSON.stringify(uploadFormInitValue) != '{}') {
-          // 重新上传不允许修改类型
-          const { tab } = uploadFormInitValue;
-          formData.append('accountType', tab.label);
-          formData.append('accountName', tab.value.label);
-        } else {
-          formData.append('accountType', tab.label);
-          formData.append('accountName', tab.value.label);
-        }
-
-        const resp = await uploadFilePost(formData);
-        if (resp) {
-          // 上传成功,获取最新台账记录
-          getTableData();
-        }
-        setModalVisible(false);
-        // 每次提交完清空表单默认值
-        setUploadFormInitValue(undefined);
-      } catch (err) {
-        console.log({ err });
-      }
-    }
-  };
+ 
 
   const compalier = (data: ImplementationDataItem[], base: any[]) => {
     const result: ImplementationDataItem[] = [];
@@ -620,7 +578,7 @@ const articleManagement = () => {
   useEffect(() => {
     // 叶子结点数据变化后相关回调
     if (leafData) {
-      const { systemEvaluation, targetEvaluation, selfEvaluation, userId } =
+      const { systemEvaluation, targetEvaluation, selfEvaluation, userId,userIds} =
         leafData.reviewArticle;
 
       const tempScoreList = [
@@ -642,8 +600,8 @@ const articleManagement = () => {
        */
       const t = localStorage.getItem('userData') ? localStorage.getItem('userData') : '';
       const userData = JSON.parse(t as string);
-
-      setHasEditAuthority(userId == userData.userId);
+      const valIndex = userIds.findIndex(t=>t == userData.userId)
+      setHasEditAuthority(valIndex != -1);  //设置编辑权限
       // setHasEditAuthority(true);
       setImplementationData({ [selfEvaluation]: leafData.pfmImplementations });
 
@@ -697,6 +655,12 @@ const articleManagement = () => {
       const selfEvolution = leafData.reviewArticle.selfEvaluation;
       setSelectedSelfEvolution({ label: selfEvolution, value: selfEvolution });
     }
+
+     //获取可选的等级
+     getGradeOptions();
+     //获取可选类型
+     getAccoutTypeOptions();
+     
   }, [editMode]);
 
   useEffect(() => {
@@ -734,9 +698,7 @@ const articleManagement = () => {
     selfEvaluationRecords,
     modalVisible,
     setModalVisible,
-    uploadFile,
-    uploadFormInitValue,
-    setUploadFormInitValue,
+
     onSelfEvolutionTabChange,
     commitSelfEvolution,
     selectedSelfEvolution,
@@ -769,6 +731,8 @@ const articleManagement = () => {
     currentSelectedActObj,
     detailDrawerVisible,
     setdetailDrawerVisible,
+    currentActDataDireactory,
+    set_currentActDataDireactory
   };
 };
 

+ 33 - 22
src/pages/GradeHospitalAccreditation/articleManagement/server.ts

@@ -1,15 +1,4 @@
-/*
- * @Author: your name
- * @Date: 2021-09-14 10:22:20
-<<<<<<< HEAD
- * @LastEditTime: 2022-03-04 17:49:35
-=======
- * @LastEditTime: 2022-03-08 18:29:06
->>>>>>> master
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/server.ts
- */
+
 
 import { request } from 'umi';
 
@@ -103,31 +92,53 @@ export const getRuleChildrens = async (id: number) => {
 
 // 上传台账
 
-export const uploadFilePost = async (uploadData: any) => {
-  return request('/api/pfm/recordUpload/setRecordFile', {
+export const uploadFilePost = async (uploadData:FormData) => {
+  return request('/api/pfmdatadirectoryfile/addDataDirectoryFile', {
     method: 'POST',
     data: uploadData,
   });
 };
 
-// 自评
+//根据资料目录Id获取对应的台账记录
+export type ledgerRecordList = {
+  id:number;
+  fileName:string;
+  fileUrl:string;
+  createTime:string;
+  directoryId:number;
+}
+export const getLedgerRecords = async (params:{
+  id:number;
+}) => {
+  return request<{list:ledgerRecordList[]}>('/api/pfmdatadirectoryfile/getDataDirectoryFile', {
+    method: 'GET',
+    params:{...params,current:1,
+      pageSize:50}
+  });
+};
 
-export const selfEvolutionCommit = async (data: API.SelfEvolutionCommitType) => {
-  return request('/api/pfm/recordUpload/setSelfEvaluationResult', {
+
+//删除资料目录对应的台账
+
+export const delLedgerRecords = async (id:number) => {
+  return request('/api/pfmdatadirectoryfile/deleteDataDirectoryFile', {
     method: 'POST',
-    data,
+    params:{fileId:id},
   });
 };
 
-// 删除台账历史记录
 
-export const delHistoryRecods = async (id: number) => {
-  return request('/api/pfm/recordUpload/deleteHistory', {
+
+// 自评
+
+export const selfEvolutionCommit = async (data: API.SelfEvolutionCommitType) => {
+  return request('/api/pfm/recordUpload/setSelfEvaluationResult', {
     method: 'POST',
-    params: { id },
+    data,
   });
 };
 
+
 // 获取可选台账类型
 export const getUploadLedgerSelectableType = async () => {
   return request('/api/pfm/sysgeneralconfig/getAccountConfigByType', {

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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:42
- * @LastEditTime: 2022-03-15 16:50:59
+ * @LastEditTime: 2022-03-31 17:24:05
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/typings.d.ts
@@ -82,6 +82,7 @@ declare namespace API {
     accountType: string; // 条文组别
     hospId: number;
     userId: number,
+    userIds:number[];
     pfmReviewArticleDepartList:{
       responsibilityDepartmentId:number;
       responsibilityDepartmentName:string;

+ 3 - 31
src/pages/GradeHospitalAccreditation/ledgerUpload/index.tsx

@@ -1,16 +1,16 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2022-03-22 14:19:38
+ * @LastEditTime: 2022-04-29 14:21:38
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
  */
 
 
-import React, { useEffect, useState } from 'react'
+import React, { useEffect } from 'react'
 import { useModel } from 'umi';
-import { Form, Tabs, Button } from 'antd'
+import { Form, Button } from 'antd'
 import {
     ProFormText,
     ProFormDateRangePicker,
@@ -20,7 +20,6 @@ import ArticleManagementCopy from '@/pages/GradeHospitalAccreditation/articleMan
 import MccsDrawerForm from '@/components/MccsDrawerForm/index';
 import './index.less';
 
-// import DetailModule from './componets/deitailModule/detail';
 
 import 'moment/locale/zh-cn';
 import locale from 'antd/es/date-picker/locale/zh_CN';
@@ -152,33 +151,6 @@ const LedgerUpload: React.FC<LedgerUploadPropsType> = (props) => {
         restLedgerUploadModelData.setDrawerVisible(visible);
     }
 
-    const upLoadFileHandle = (formInitData?: any) => {
-        // 因为modalForm开启了request+params获取表单默认值,
-        // 所以必须先设置默认值才能开启弹窗
-
-        if (formInitData) {
-            const { fileUrl, recordTypeName, fileName, accountType, cateId } = formInitData;
-            restArticleManagementModelData.setUploadFormInitValue({
-                tab: { label: accountType, value: { label: recordTypeName, value: cateId } },
-                files: [{
-                    uid: new Date().getTime(),
-                    name: fileName,
-                    status: 'done',
-                    url: fileUrl
-                }]
-            });
-        } else {
-            restArticleManagementModelData.setUploadFormInitValue({})
-        }
-
-        restArticleManagementModelData.getUploadLedgerType().then((data: any) => {
-            // 设置上传台账可选类型
-            restArticleManagementModelData.setUploadLedgerTypeList(data);
-
-        })
-        restArticleManagementModelData.setModalVisible(true);
-    }
-
     useEffect(()=>{
         
         const {drawerVisible} = restLedgerUploadModelData;

+ 2 - 2
src/pages/reports/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2022-03-03 18:04:40
- * @LastEditTime: 2022-03-15 16:55:26
+ * @LastEditTime: 2022-04-01 14:29:24
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/reports/index.tsx
@@ -45,7 +45,7 @@ export default () => {
       <Skeleton loading={loading} paragraph={{ rows: 50 }} active />
       <iframe
         onLoad={() => onLoadhandle()}
-        style={{ width: '100%', height: '100%', border: 'none' }}
+        style={{ width: '100%', height:'calc(100vh - 96px)', border: 'none' }}
         src={specialPageUrl}
       ></iframe>
     </>

+ 3 - 2
src/services/user.ts

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

BIN
智慧查检旧版_master.zip