浏览代码

调整接口返回/修复部分bug

code4eat 3 年之前
父节点
当前提交
d7bf7021bb

+ 6 - 4
config/proxy.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-10-27 14:55:41
+ * @LastEditTime: 2021-11-16 09:40:40
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/config/proxy.ts
@@ -14,10 +14,12 @@
  * For details, please see
  * https://pro.ant.design/docs/deploy
  */
+
+//118.31.245.65
 export default {
   dev: {
     '/api': {
-      target: 'http://112.124.59.133:8083/',
+      target: 'http://118.31.245.65:8083/',
       changeOrigin: true,
       pathRewrite: { '^/api': '' },
     },
@@ -29,9 +31,9 @@ export default {
       pathRewrite: { '^': '' },
     },
   },
-  test: {
+  prod: {
     '/api/': {
-      target: 'https://preview.pro.ant.design',
+      target: 'https://118.31.245.65:8083/',
       changeOrigin: true,
       pathRewrite: { '^': '' },
     },

+ 2 - 1
package.json

@@ -69,7 +69,8 @@
     "react-dom": "^17.0.0",
     "react-helmet-async": "^1.0.4",
     "umi": "^3.5.0",
-    "umi-serve": "^1.9.10"
+    "umi-serve": "^1.9.10",
+    "yet-another-abortcontroller-polyfill": "^0.0.4"
   },
   "devDependencies": {
     "@ant-design/pro-cli": "^2.0.2",

+ 26 - 22
src/app.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-11-09 17:05:01
+ * @LastEditTime: 2021-11-15 15:11:51
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/app.tsx
@@ -11,10 +11,9 @@ import { PageLoading } from '@ant-design/pro-layout';
 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 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';
@@ -23,18 +22,21 @@ import logoIcon from '../public/logo.png';
 import { getMenus } from './services/user';
 import {updateUserInfo} from '@/pages/user/Login/service'; 
 
+import type { RequestOptionsInit,Context } from 'umi-request';
+
 const isDev = process.env.NODE_ENV === 'development';
 
 const loginPath = '/user/login';
 
-let ifStopNextRequest = false;
-
 let hospSign:any='';
 
+const controller = new AbortController(); // create a controller
+const { signal } = controller; // grab a reference to its associated AbortSignal object using the AbortController.signal property
+
+let ifStopNextRequet:boolean = false;
 
 if(history){
   hospSign = history.location.query?.hospSign;
-  console.log({hospSign});
   if(!hospSign){
     hospSign = localStorage.getItem('hospSign');
     console.log({'localStorage':hospSign});
@@ -131,9 +133,6 @@ export async function getInitialState(): Promise<{
 }
 
 
-type RequestOptionsInit = {
-     [propsName:string]:any
-}
 
 const authHeaderInterceptor = (url: string, options: RequestOptionsInit) => {
   
@@ -146,11 +145,6 @@ const authHeaderInterceptor = (url: string, options: RequestOptionsInit) => {
        authHeader.token = token;
   }
 
-  // if(ifStopNextRequest){
-  //       //token过期阻止下一步请求
-  //       throw new Error('token过期!');
-  // }
-
   return {
     url: `${url}`,
     options: { ...options, interceptors: true, headers: authHeader },
@@ -182,12 +176,16 @@ const responseInterceptors = async (response: Response, options: RequestOptionsI
              }
              return true;
         }else if(errorCode == 499){
-          Modal.confirm({
-            title: '抱歉,登录已过期请重新登录!',
-            onOk: () => {
-              loginOut();
-            }
-          });
+          if(!ifStopNextRequet){
+            Modal.confirm({
+              title: '抱歉,登录已过期请重新登录!',
+              onOk: () => {
+                ifStopNextRequet = false;
+                loginOut();
+              }
+            });
+          }
+          ifStopNextRequet = true;
         }else {
              //接口请求信息错误
              notification.error({
@@ -208,6 +206,11 @@ const responseInterceptors = async (response: Response, options: RequestOptionsI
 };
 
 
+const demo1Middleware = async (ctx: Context, next: () => void) => {
+  await next();
+};
+
+
 type RequestConfig = {
   [propsName:string]:any
 }
@@ -218,6 +221,7 @@ export const request: RequestConfig = {
     console.log({ error });
     throw error;
   },
+  middlewares: [demo1Middleware],
   requestInterceptors: [authHeaderInterceptor],
   responseInterceptors: [responseInterceptors],
 };
@@ -277,7 +281,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => {
         if(initialState){
           const { currentUser,isDev} = initialState;
           if(isDev){
-            //开发环境或超级账号
+            //开发环境
             return []
           }
       

+ 2 - 3
src/components/MccsClickableTabs/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-15 18:38:41
- * @LastEditTime: 2021-10-28 09:31:20
+ * @LastEditTime: 2021-11-12 16:43:14
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsClickableTabs/index.tsx
@@ -42,7 +42,6 @@ const MccsClickableTabs:React.FC<MccsClickableTabs.propsType> = (props)=>{
         // console.log('tabProps',props);
         const {data=[],value,clear,disabled} = props;
         setList(data);
-        // console.log({props});
         disabled&&setDisabled(true);
         
         if(value){
@@ -86,7 +85,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?(disabled?'tab on disabled':'tab on'):disabled?'disabled tab':'tab'} key={i} onClick={()=>clickHandle(item,val)}>{val.label}</div>
+                                                            <div className={activedTab?.label==item.label&&activedTab.value.label==val.label?(disabled?'tab on disabled':'tab on'):disabled?'disabled tab':'tab'} key={i} onClick={()=>clickHandle(item,val)}>{val.label}</div>
                                                         )
                                                  }) 
                                               }

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

@@ -7,6 +7,7 @@
 }
 .ant-pro-page-container {
     padding: 0 !important;
+    min-width: 1100px;
     .ant-pro-grid-content {
         padding:16px;
     }

+ 2 - 11
src/components/MccsPageContainer/index.tsx

@@ -3,20 +3,11 @@
 import React, { useEffect,useRef } from 'react'
 import PropTypes from 'prop-types'
 
-import { Button, Dropdown, Menu, Modal, Divider } from 'antd';
+import {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';
@@ -88,7 +79,7 @@ const MccsPageContainer:React.FC<MccsPageContainerType> = (props)=>{
                         }
                         resetPasswordHandle?.(params).then(bool=>{
                                 if(bool){
-                                      
+                                    update(t => ({ ...t, goSetting: false }))
                                 }
                         })
                     }

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

@@ -1,3 +1,6 @@
 
 
 
+.ant-pro-card-body {
+    overflow-y: scroll;
+}

+ 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-30 10:23:37
+ * @LastEditTime: 2021-11-12 18:03:21
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsRecordList/typings.d.ts
@@ -32,6 +32,7 @@ declare namespace MccsRecordList {
         createTime:string,
         recordTypeName?:string,
         accountType?:string,
+        cateId?:number,
         historyRecords:historyRecordsItem[]|[]
       }
 

+ 21 - 1
src/components/MccsUpload/typings.d.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-17 18:19:13
- * @LastEditTime: 2021-09-17 20:09:57
+ * @LastEditTime: 2021-11-12 15:14:27
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsUpload/typings.d.ts
@@ -12,6 +12,26 @@
 
 declare namespace MccsUpload {
 
+    type UploadFile =  {
+        uid: string;
+        size?: number;
+        name: string;
+        fileName?: string;
+        lastModified?: number;
+        lastModifiedDate?: Date;
+        url?: string;
+        status?: UploadFileStatus;
+        percent?: number;
+        thumbUrl?: string;
+        originFileObj?: RcFile;
+        response?: T;
+        error?: any;
+        linkProps?: any;
+        type?: string;
+        xhr?: T;
+        preview?: string;
+    }
+
      type propsType = {
        
          value?:any,

+ 23 - 9
src/pages/DataManagement/publicData/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-23 08:49:14
- * @LastEditTime: 2021-10-28 16:32:04
+ * @LastEditTime: 2021-11-16 10:47:33
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/DataManagement/publicData/index.tsx
@@ -76,7 +76,7 @@ const PublicData: React.FC<PublicDataType> = (props) => {
             key: 'id',
             dataIndex: 'id',
             hideInSearch: true,
-            width: '5%'
+            width: '10%'
         },
         {
             title: '文件名称',
@@ -98,7 +98,7 @@ const PublicData: React.FC<PublicDataType> = (props) => {
             key: 'articles',
             hideInSearch: true,
             ellipsis:true,
-            width:'30%',
+            width:'20%',
             dataIndex: 'articles',
             render: (_: any, record: any) => {
                 //    console.log({record});
@@ -108,7 +108,7 @@ const PublicData: React.FC<PublicDataType> = (props) => {
         },
         {
             title: '操作',
-            width: '20%',
+            width: '180px',
             valueType: 'option',
             render: (_: any, record: any) => {
                 // console.log({record});
@@ -193,6 +193,7 @@ const PublicData: React.FC<PublicDataType> = (props) => {
     const [uploadModalVisible, setUploadModalVisible] = useState(false);
 
     const [defaultOpened, setDefaultOpened] = useState<string>();
+    
 
 
     const { publicData } = useModel('allModels', model => {
@@ -230,7 +231,7 @@ const PublicData: React.FC<PublicDataType> = (props) => {
             defaultSelectedAccreditation = articlesList.map((t: any) => t.ruleId);
         }
 
-        setSelectedRowIds(Array.from(new Set(defaultSelectedAccreditation)));
+        setSelectedRowIds(Array.from(new Set(defaultSelectedAccreditation.concat(selectedRowIds))));
         setDrawerVisible(true);
     }
 
@@ -301,7 +302,6 @@ const PublicData: React.FC<PublicDataType> = (props) => {
     }
 
     const drawerFormOnFinnish = async () => {
-
         await publicData.batchConnectAccreditation({
             articlesList: selectedRowIds,
             ids: selectedFiles.map((t: any) => t.id)
@@ -365,7 +365,21 @@ const PublicData: React.FC<PublicDataType> = (props) => {
                             selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT],
                             selectedRowKeys: [...selectedRowIds],
                             onChange: (selectedRowKeys: number[]) => {
-                                setSelectedRowIds(selectedRowKeys);
+                                // console.log({selectedRowKeys,selectedRowIds});
+                                // const _prev = selectedRowIds;
+                                // const combinIds = selectedRowKeys.concat(_prev);
+                                // // setSelectedRowIds(Array.from(new Set(combinIds)));
+                            },
+                            onSelect:(record:any, selected: any, selectedRows: any, nativeEvent: any)=>{
+                                // console.log({record,selected,selectedRows,nativeEvent});
+                                const {id} = record;
+                                const _prev = selectedRowIds;
+                                if(selected){
+                                    setSelectedRowIds(_prev.concat([id]));
+                                }else{
+                                    _prev.splice(_prev.findIndex(item => item === id), 1);
+                                    setSelectedRowIds([..._prev]);
+                                }
                             }
                         }}
                         rowKey="id"
@@ -447,10 +461,10 @@ const PublicData: React.FC<PublicDataType> = (props) => {
                                     trigger={
                                         <Button onClick={() => setUploadModalVisible(true)}>上传文件</Button>
                                     }
-                                    onFinish={(values: { file: any }) => { uploadFileHandle(values.file.file) }}
+                                    onFinish={(values: { file: any }) => { uploadFileHandle(values.file.fileList) }}
                                 >
                                     <Form.Item name='file'>
-                                        <MccsUpload />
+                                        <MccsUpload maxCount={10} />
                                     </Form.Item>
                                 </MccsModal>,
                                 ...dom

+ 9 - 8
src/pages/DataManagement/publicData/model.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-23 09:02:09
- * @LastEditTime: 2021-10-28 15:08:00
+ * @LastEditTime: 2021-11-12 18:22:17
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/DataManagement/publicData/model.ts
@@ -39,7 +39,7 @@ const publicData = () => {
     pageSize: number;
   }) => {
     //   console.log({params});
-    const { current, pageSize, keyword, date = [] } = params;
+    const { current,pageSize, keyword, date = [] } = params;
     if (currentActivedTree) {
       const { id, cateType } = currentActivedTree;
       const resp = await getTreeTableList({
@@ -47,16 +47,17 @@ const publicData = () => {
         cateType: `${cateType}`,
         current,
         keyword,
-        pageSize:9,
+        pageSize,
         startDate: date[0],
         endDate: date[1],
       });
-      const { list = [] } = resp;
+      const { list = [],totalCount } = resp;
       //每次刷新完数据将是否刷新置为false
       setReloadTable(false);
       return {
         data: list,
         success: true,
+        total:totalCount
       };
     }
     return {
@@ -97,8 +98,9 @@ const publicData = () => {
     const resp = await getAllAccreditionLevelFourList({...params,id:ids});
     if (resp) {
       return {
-        data: resp,
+        data: resp.list,
         success: true,
+        total:resp.totalCount
       };
     }else{
       return {
@@ -116,11 +118,10 @@ const publicData = () => {
     }
   };
 
-  const uploadFilehandle = async (files: { originFileObj: any; [key: string]: any }) => {
+  const uploadFilehandle = async (files:any) => {
     if (currentActivedTree) {
       const { id } = currentActivedTree;
-      // console.log({files});
-      const resp = await publicResourceUpload({ id: Number(id), file: files.originFileObj });
+      const resp = await publicResourceUpload({ id: Number(id), files: files });
       if (resp) {
         setReloadTable(true);
       }

+ 5 - 3
src/pages/DataManagement/publicData/serve.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-23 09:04:27
- * @LastEditTime: 2021-10-28 15:07:46
+ * @LastEditTime: 2021-11-12 18:22:44
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/DataManagement/publicData/serve.ts
@@ -93,9 +93,11 @@ export const delTableFlieList  = (id:number)=>{
 
 
 //公共资料上传
-export const publicResourceUpload  = (data:{file:any,id:number})=>{
+export const publicResourceUpload  = (data:{files:any,id:number})=>{
     let formData = new FormData();
-    formData.set('file',data.file);
+    data.files.map((t:any)=>{
+        formData.append('file',t.originFileObj);
+    })
     formData.set('id',`${data.id}`);
     return request('/api/pfm/publicresource/uploadPublicFile', {
         method: 'POST',

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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2021-10-28 16:05:37
+ * @LastEditTime: 2021-11-12 17:47:28
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
@@ -177,10 +177,10 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
         //因为modalForm开启了request+params获取表单默认值,
         //所以必须先设置默认值才能开启弹窗
         if (formInitData) {
-            const { fileUrl, recordTypeName, accountType, fileName } = formInitData;
-            // console.log({formInitData});
+            const { fileUrl, recordTypeName, accountType, fileName,cateId } = formInitData;
+            console.log({formInitData});
             restModelData.setUploadFormInitValue({
-                tab: { label: accountType, value: { label: recordTypeName, value: recordTypeName } },
+                tab: { label: accountType, value: { label: recordTypeName, value: cateId } },
                 files: [{
                     uid: new Date().getTime(),
                     name: fileName,
@@ -201,7 +201,6 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
 
     const actionNodeFunc = (data: any) => {
         //渲染记录列表操作按钮
-        // console.log({ data });
         const { fileUrl } = data;
         const reupload = () => {
 
@@ -252,7 +251,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
 
     useEffect(() => {
         if (isModeTwo) {
-            //设置当前模块模式
+            //设置当前模块模式,台账上传共用时
             restModelData.setModuleMode(isModeTwo);
         } else {
             //设置当前模块模式
@@ -307,6 +306,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                         <ProFormDependency name={['tab']}>
                               {
                                   ({tab})=>{
+                                    console.log({tab});
                                     return tab&&tab.value.label == '制度'&&(
                                         <ProFormSelect
                                         name="publicCateId"
@@ -326,7 +326,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                                 message: '请上传文件!',
                             },
                         ]}>
-                            <MccsUpload maxCount={1} />
+                            <MccsUpload maxCount={10} />
                         </Form.Item>
                     </MccsModal>
                 )

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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:46:45
- * @LastEditTime: 2021-10-28 16:26:19
+ * @LastEditTime: 2021-11-12 18:05:38
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/model.ts
@@ -74,12 +74,10 @@ const articleManagement = () => {
       const resp = await getTreeFileTableData(specifyId?{
         //传入树结构id指定获取某一节点对应数据
         ...params,
-        pageSize:10,
         id:specifyId
       }:{
         //直接拿树结构id
         ...params,
-        pageSize:10,
         id: currentActivedTree ? currentActivedTree.id : 0,
       },moduleMode);
   
@@ -92,10 +90,11 @@ const articleManagement = () => {
 
         if (!isLeaf&&page) {
           //非叶子结点返回table数据
-          const { list = [] } = page;
+          const { list = [],totalCount } = page;
           return {
             data: list,
             success: true,
+            total:totalCount
           };
         }
 
@@ -218,16 +217,19 @@ 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;
             let formData = new FormData();
-            
-            formData.append('file',fileList[0]?.originFileObj);
+            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) != '{}'){
@@ -430,6 +432,7 @@ const articleManagement = () => {
             createTime:val.uploadTime,
             recordTypeName:val.accountName,
             accountType:val.accountType,
+            cateId:val.cateId,
             historyRecords:val.historyVersionVOList?val.historyVersionVOList.map(t=>({
               versionName:t.versionName,name:val.uploadUserName,time:t.uploadTime,id:t.id
             })):[]

+ 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-10-26 11:25:02
+ * @LastEditTime: 2021-11-12 18:05:10
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/typings.d.ts
@@ -28,6 +28,7 @@ declare namespace API {
           uploadTime: string;
           accountName: string;
           accountType:string,
+          cateId:number,
           historyVersionVOList: {
             versionName: string;
             accountName: string;

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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2021-10-28 15:41:40
+ * @LastEditTime: 2021-11-12 17:43:12
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
@@ -182,9 +182,9 @@ const LedgerUpload: React.FC<LedgerUploadPropsType> = (props) => {
         //因为modalForm开启了request+params获取表单默认值,
         //所以必须先设置默认值才能开启弹窗
         if(formInitData){
-            const { fileUrl, recordTypeName, fileName } = formInitData;
+            const { fileUrl, recordTypeName, fileName, accountType,cateId } = formInitData;
             restArticleManagementModelData.setUploadFormInitValue({
-                tab: recordTypeName,
+                tab: { label: accountType, value: { label: recordTypeName, value:cateId } },
                 files: [{
                     uid: new Date().getTime(),
                     name: fileName,
@@ -215,6 +215,14 @@ const LedgerUpload: React.FC<LedgerUploadPropsType> = (props) => {
         return <a onClick={reupload}>重新上传</a>
     }
 
+    useEffect(()=>{
+        //监听上传台账弹窗变化,更新本地drawer里台账记录
+        if(!restArticleManagementModelData.modalVisible&&restLedgerUploadModelData.currentRecord){
+            restArticleManagementModelData.getTableData({id:restLedgerUploadModelData.currentRecord.id});
+        }
+
+    },[restArticleManagementModelData.modalVisible]);
+
     
 
     useEffect(()=>{

+ 3 - 1
src/pages/GradeHospitalAccreditation/ledgerUpload/model.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:46:45
- * @LastEditTime: 2021-10-27 17:21:57
+ * @LastEditTime: 2021-11-12 17:31:31
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/model.ts
@@ -127,6 +127,7 @@ const ledgerUpload = () => {
     // getSelectableSelfScoreList();
   }, [currentRecord]);
 
+
   useEffect(() => {
     if (currentLeafData) {
       const {
@@ -195,6 +196,7 @@ const ledgerUpload = () => {
     commitSelfEvolution,
     selectedSelfEvolution,
     targetScores,
+    getTableData,
     getSelectableSelfScoreList
   };
 };

+ 2 - 2
src/pages/KeepImprove/departmentIssueRank/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-28 13:57:19
- * @LastEditTime: 2021-11-03 11:05:14
+ * @LastEditTime: 2021-11-15 11:36:24
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
@@ -19,7 +19,7 @@ type QuestionGatherAndReviseProps = {}
 const QuestionGatherAndRevise:React.FC<QuestionGatherAndReviseProps> = ()=>{
     return (
         <MccsPageContainer>
-            <iframe  id="reportFrame" src="http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/dongyang/单位问题排名.frm" width="100%" height="800px">
+            <iframe  id="reportFrame" src=" http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/taicang/单位问题排名.frm" width="100%" height="800px">
             </iframe>
         </MccsPageContainer>
     )

+ 2 - 2
src/pages/KeepImprove/departmentScoreRank/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-28 13:57:19
- * @LastEditTime: 2021-11-03 11:06:42
+ * @LastEditTime: 2021-11-15 11:36:51
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
@@ -19,7 +19,7 @@ type QuestionGatherAndReviseProps = {}
 const QuestionGatherAndRevise:React.FC<QuestionGatherAndReviseProps> = ()=>{
     return (
         <MccsPageContainer>
-            <iframe  id="reportFrame" src=" http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/dongyang/单位得分情况.frm" width="100%" height="800px">
+            <iframe  id="reportFrame" src="http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/taicang/单位得分情况.frm" width="100%" height="800px">
             </iframe>
         </MccsPageContainer>
     )

+ 2 - 2
src/pages/KeepImprove/indexNumGather/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-28 13:57:19
- * @LastEditTime: 2021-11-03 11:07:05
+ * @LastEditTime: 2021-11-15 11:37:13
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
@@ -19,7 +19,7 @@ type QuestionGatherAndReviseProps = {}
 const QuestionGatherAndRevise:React.FC<QuestionGatherAndReviseProps> = ()=>{
     return (
         <MccsPageContainer>
-            <iframe  id="reportFrame" src=" http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/dongyang/指标汇总.frm" width="100%" height="800px">
+            <iframe  id="reportFrame" src="http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/taicang/指标汇总.frm" width="100%" height="800px">
             </iframe>
         </MccsPageContainer>
     )

+ 2 - 2
src/pages/KeepImprove/questionGather/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-28 13:57:19
- * @LastEditTime: 2021-11-03 11:07:34
+ * @LastEditTime: 2021-11-15 11:37:38
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx
@@ -19,7 +19,7 @@ type QuestionGatherAndReviseProps = {}
 const QuestionGatherAndRevise:React.FC<QuestionGatherAndReviseProps> = ()=>{
     return (
         <MccsPageContainer>
-            <iframe  id="reportFrame" src=" http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/dongyang/问题汇总.frm" width="100%" height="800px">
+            <iframe  id="reportFrame" src="http://8.136.135.180:8081/webroot/ReportServer?formlet=PFM/taicang/问题汇总.frm" width="100%" height="800px">
             </iframe>
         </MccsPageContainer>
     )

+ 6 - 3
src/pages/user/Login/index.tsx

@@ -54,11 +54,14 @@ const Login: React.FC = () => {
       let loginResult = await login({ ...values,hospSign});
 
       if (loginResult) {
-        const defaultLoginSuccessMessage = '登录成功!';
-        message.success(defaultLoginSuccessMessage);
-        await setUserInfo({...loginResult});
         localStorage.setItem('hospSign',hospSign); //保存医院标识
+        message.success('登录成功!');
+        await setUserInfo({...loginResult});
         /** 此方法会跳转到 redirect 参数所在的位置 */
+        if (!history) {
+            console.log('history为false',history);
+            location.href = '/'
+        };
         const { query } = history.location;
         const { redirect } = query as { redirect: string };
         history.push(redirect || '/');

+ 3 - 2
src/utils.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-26 17:59:56
- * @LastEditTime: 2021-09-29 13:55:59
+ * @LastEditTime: 2021-11-12 10:55:08
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/utils.js
@@ -51,7 +51,8 @@ const getQueryString = (name)=>{
     const { query = {}, pathname } = history.location;
     const { redirect } = query;
     const hospSign = localStorage.getItem('hospSign');
-  
+    
+
     if (window.location.pathname !== '/user/login' && !redirect) {
       history.replace({
         pathname: '/user/login',