Ver código fonte

修复部分操作未刷新页面

code4eat 3 anos atrás
pai
commit
b49f5b2271

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

@@ -2,7 +2,6 @@
   display: flex;
   width: 100%;
   flex-direction: row;
-  justify-content:flex-start;
   flex-wrap: wrap;
   align-items: center;
 

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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-15 18:38:41
- * @LastEditTime: 2021-09-30 11:08:21
+ * @LastEditTime: 2021-10-28 09:31:20
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsClickableTabs/index.tsx
@@ -17,7 +17,7 @@ import './index.less';
 const MccsClickableTabs:React.FC<MccsClickableTabs.propsType> = (props)=>{
 
     const [list,setList] = useState<MccsClickableTabs.TabType[]>([]);
-    const {tabClickHandle,clear,onChange,type='single'} = props;
+    const {tabClickHandle,onChange,type='single',classNames} = props;
     const [activedTab,setActivedTab] = useState<{label:string,value:any}>();
     const [disabled,setDisabled] = useState(false);
 
@@ -60,7 +60,7 @@ const MccsClickableTabs:React.FC<MccsClickableTabs.propsType> = (props)=>{
 
 
     return (
-        <div className={type=='multi'?'mutiwrap wrap':'wrap'}>
+        <div className={type==`multi`?`mutiwrap wrap ${classNames}`:`wrap ${classNames}`}>
             {
                 type=='single'&&(
                     <>

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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-15 18:39:49
- * @LastEditTime: 2021-09-29 17:23:14
+ * @LastEditTime: 2021-10-28 09:29:32
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsClickableTabs/typings.d.ts
@@ -18,6 +18,7 @@ declare namespace MccsClickableTabs {
         value?:{label:string,value:any},
         disabled?:boolean,//是否禁用
         clear?:boolean, //清空选中数据
+        classNames?:string, //class名
       }
 
       type TabType = {

+ 13 - 5
src/pages/DataManagement/publicData/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-23 08:49:14
- * @LastEditTime: 2021-09-29 18:50:05
+ * @LastEditTime: 2021-10-28 09:52:27
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/DataManagement/publicData/index.tsx
@@ -77,22 +77,29 @@ const PublicData: React.FC<PublicDataType> = (props) => {
             key: 'id',
             dataIndex: 'id',
             hideInSearch: true,
-
+            width: '5%'
         },
         {
             title: '文件名称',
+            key: 'fileName',
             dataIndex: 'fileName',
             hideInSearch: true,
-            width: '35%'
+            width: '30%',
+            ellipsis:true,
         },
         {
             title: '添加时间',
+            key: 'createDateTime',
             dataIndex: 'createDateTime',
             hideInSearch: true,
+            width: '20%'
         },
         {
             title: '关联条款',
+            key: 'articles',
             hideInSearch: true,
+            ellipsis:true,
+            width:'30%',
             dataIndex: 'articles',
             render: (_: any, record: any) => {
                 //    console.log({record});
@@ -114,9 +121,10 @@ const PublicData: React.FC<PublicDataType> = (props) => {
                         onConfirm={()=>delFileHandle(record)}
                         onCancel={()=>{}}
                         okText="确定"
+                        key="2"
                         cancelText="取消"
                     >
-                        <a key="2" >删除</a>
+                        <a  >删除</a>
                     </Popconfirm>
                 ]
                 // 1 展示 0掩藏
@@ -427,7 +435,7 @@ const PublicData: React.FC<PublicDataType> = (props) => {
                             optionRender: (searchConfig: any, formProps: any, dom: any) => [
                                 // <Button key='upload' onClick={uploadFileHandle}>上传文件</Button>,
                                 <MccsModal
-                                    title='标题'
+                                    title='上传文件'
                                     key='upload'
                                     visible={uploadModalVisible}
                                     onVisibleChange={(bool: boolean) => setUploadModalVisible(bool)}

+ 3 - 1
src/pages/DataManagement/publicData/model.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-23 09:02:09
- * @LastEditTime: 2021-10-21 10:19:55
+ * @LastEditTime: 2021-10-28 09:20:56
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/DataManagement/publicData/model.ts
@@ -52,6 +52,8 @@ const publicData = () => {
         endDate: date[1],
       });
       const { list = [] } = resp;
+      //每次刷新完数据将是否刷新置为false
+      setReloadTable(false);
       return {
         data: list,
         success: true,

+ 14 - 10
src/pages/GradeHospitalAccreditation/articleManagement/index.less

@@ -50,24 +50,28 @@
     }
   }
 }
+.selfEvolutionTitle {
+  text-align: left;
+  font-size: 16px;
+   font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+   font-weight: 400;
+   color: #7A8599;
+   margin-top: 20px;
 
+}
 .selfEvolutionArea {
   text-align: center;
   line-height: 50px;
   background: #FFFFFF;
-  border-radius: 25px;
+  border-radius: 10px;
   border: 1px dashed #DADEE6;
-  margin-top: 40px;
+  margin-top: 20px;
   margin-bottom: 40px;
   padding: 10px;
-  .selfEvolutionTitle {
-       text-align: left;
-       font-size: 16px;
-        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-        font-weight: 400;
-        color: #7A8599;
-
-  }
+  padding-top: 40px;
+}
+.tabWrap {
+    justify-content: space-around;
 }
 
 .formItemTitle {

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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2021-10-27 15:08:06
+ * @LastEditTime: 2021-10-28 09:34:57
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
@@ -137,6 +137,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
     const onSelectHandle = (data: MccsFileTree.childTree) => {
         //左侧树节点点击回调
         setCurrentActivedTree(data);
+        setArticleSettingFormInit({});//清空默认值
         //重新获取数据
         tableRef?.current?.getTableRef().current?.reload();
         restModelData.setTabKey('1');
@@ -487,9 +488,11 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                                                     />
                                                 </TabPane>
                                                 <TabPane tab="自评结果" key="2">
+                                                <div className='selfEvolutionTitle'>开始自评</div>
                                                     <div className='selfEvolutionArea'>
-                                                        <div className='selfEvolutionTitle'>开始自评</div>
+                                                       
                                                         <MccsClickableTabs
+                                                            classNames='tabWrap'
                                                             onChange={(value: { label: string, value: any }) => restModelData.onSelfEvolutionTabChange(value)}
                                                             data={restModelData.targetScores}
                                                             value={restModelData.selectedSelfEvolution}