浏览代码

更新md文件

code4eat 3 年之前
父节点
当前提交
1ae682c04a

+ 32 - 0
src/components/CAUpload/readme.md

@@ -0,0 +1,32 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-11-26 15:00:07
+ * @LastEditTime: 2021-11-26 15:05:27
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: /MedicalWisdomCheckSys/src/components/CAUpload/readme.md
+-->
+
+
+
+##### Demo
+
+```javascript
+   
+   ...
+   import CAUpload from '@/components/CAUpload';
+
+   //render
+
+   <CAUpload  
+                templateHrefs={'/pfm/excel/getcurrentTemplate'}  //模板下载地址
+                url='/pfm/excel/importUser'  //导入地址
+                importSuccessCallback={() =>{}}  //导入成功回调
+                token={token}   //token
+                type='normal'   //type可选值  'normal','dialog'
+                customRequestCallback={customRequestCallback}   //自定义请求函数
+   />
+
+   ...
+```
+

+ 35 - 1
src/components/MccsClickableTabs/README.md

@@ -1,8 +1,42 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-16 14:31:38
- * @LastEditTime: 2021-09-16 14:31:39
+ * @LastEditTime: 2021-11-26 15:14:48
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsClickableTabs/README.md
 -->
+
+
+
+##### Demo
+
+```javascript
+
+import MccsClickableTabs from '@/components/MccsClickableTabs'
+
+
+//注意type值的使用,详细参考台账上传界面
+
+/**
+ * 
+ * type = 'single' value值:
+ * 
+ * { label: string, value: any }
+ * 
+ * type = 'multi' value值:
+ * 
+ * {label:'',value:{label:'',value:''}
+ * 
+ * */
+
+
+<MccsClickableTabs
+    classNames='tabWrap'
+    type='single'
+    onChange={(value: { label: string, value: any }) => {}}
+    data={rtargetScores}
+    value={selectedSelfEvolution}
+/>
+
+```

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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-15 16:25:53
- * @LastEditTime: 2021-09-29 11:08:51
+ * @LastEditTime: 2021-11-29 14:53:21
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsDrawerForm/index.tsx
@@ -10,7 +10,7 @@
 
 
 import React,{} from 'react'
-import { Drawer, Button } from 'antd';
+import { Drawer } from 'antd';
 import {
     DrawerForm,
   } from '@ant-design/pro-form';

+ 3 - 1
src/components/MccsEditableTable/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-27 10:45:50
- * @LastEditTime: 2021-09-28 17:03:49
+ * @LastEditTime: 2021-11-26 15:15:57
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsEditableTable/index.tsx
@@ -13,6 +13,8 @@ import { EditableProTable } from '@ant-design/pro-table';
 
 
 
+//仅仅对pro-table简单的包装,详细使用参考antd pro
+
 const MccsEditableTable: React.FC<MccsEditableTableType.MccsEditableTableProps> = (props) => {
 
     const {columns=[],request,addHandle,editHandle,reload,...rest} = props;

+ 37 - 0
src/components/MccsEditableTable/readme.md

@@ -0,0 +1,37 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-11-29 14:28:04
+ * @LastEditTime: 2021-11-29 14:36:54
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: /MedicalWisdomCheckSys/src/components/MccsEditableTable/readme.md
+-->
+
+
+#### demo
+
+```js
+    ...
+    import MccsEditableTable from '@/component/MccsEditableTable';
+
+    //render
+    <MccsEditableTable
+         //config 具体使用参考https://procomponents.ant.design/components/editable-table
+         {...config}
+         reload
+
+    />
+    ...
+```
+
+#### 额外新增 Api
+
+```js
+    
+    reload:boolen //控制组件数据刷新
+    addHandle:(data:any)=>void //对于新增数据时的handle
+    editHandle:(data:any)=>void //对于编辑数据时的handle
+
+    
+```
+

+ 39 - 2
src/components/MccsFileTree/README.md

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-14 11:03:43
- * @LastEditTime: 2021-09-14 11:03:43
+ * @LastEditTime: 2021-11-29 14:52:57
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsFileTree/README.md
@@ -9,4 +9,41 @@
 
 
 
-####更新中。。。。
+
+
+#### Demo
+
+
+```js
+  
+   <MccsFileTree
+        treeData={treeData}
+        defaultSelected={defaultOpened}
+        onSelectHandle={onSelectHandle}
+        actionHandle={actionHandle}
+        searchHandle={searchHandle}
+        editable={true}
+    />
+
+```
+
+
+#### Api 
+
+```js
+  
+  onSelectHandle?: (data: MccsFileTree.childTree) => void, //选中回调
+  actionHandle?: ({ type, data }: { type: string, data: MccsFileTree.childTree }) => void, //操作回调,包括编辑/删除/新增/搜索
+  searchHandle?: (val: any) => void,
+
+  switcherIcon?: ReactNode,   //废弃
+
+  treeData: MccsFileTree.childTree[] | [],  //树形结构数据
+
+  defaultSelected?: string,  //默认展开/选中 传id
+
+  formContent?: ReactNode,  //新增/编辑表单
+
+  editable?: boolean   
+
+```

二进制
src/components/MccsFileTree/images/preview.jpg


+ 4 - 13
src/components/MccsModal/index.tsx

@@ -1,25 +1,16 @@
 /*
  * @Author: your name
  * @Date: 2021-09-08 17:09:34
- * @LastEditTime: 2021-09-27 18:37:12
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
+ * @LastEditTime: 2021-11-29 14:57:59
+ * @LastEditors: your name
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsModal/index.tsx
  */
 
 
-/*
- * @Author: your name
- * @Date: 2021-09-06 11:32:58
- * @LastEditTime: 2021-09-06 16:04:15
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: /MedicalWisdomCheckSys/src/components/MccsProCard/index.tsx
- */
-
 
 
-import React,{useRef,createContext,useEffect,useState} from 'react'
+import React,{useRef,createContext} from 'react'
 import {
     ModalForm,
   } from '@ant-design/pro-form';

+ 25 - 0
src/components/MccsModal/readme.md

@@ -0,0 +1,25 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-11-29 14:54:20
+ * @LastEditTime: 2021-11-29 15:01:12
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: /MedicalWisdomCheckSys/src/components/MccsModal/readme.md
+-->
+
+
+#### Demo
+
+```js
+    
+    <MccsModal
+        //config的值参考 https://procomponents.ant.design/components/modal-form
+        {...config}
+    />
+
+```
+
+
+#### 额外添加
+
+##### Modal下的所有Children都可以通过context获取到Form表单的实例,已在最顶层通过Provider提供

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

@@ -53,7 +53,6 @@ const MccsPageContainer:React.FC<MccsPageContainerType> = (props)=>{
          menu:model.initialState?.menu,
          resetPasswordHandle:model.initialState?.resetPasswordHandle,
     }));
-    const [ifIframePage,setIfIframePage] = useState(false);
     const [iframeUrl,setIframeUrl] = useState<string>();
 
     useEffect(() => {
@@ -119,7 +118,6 @@ const MccsPageContainer:React.FC<MccsPageContainerType> = (props)=>{
         if (menu) {
             const currentRouteData:any = getCurrentRoutesData(menu, pathname);
             if(currentRouteData){
-                console.log({currentRouteData});
                 setIframeUrl(currentRouteData.softUrl);
             }else{
                 setIframeUrl('');

+ 27 - 0
src/components/MccsPageContainer/readme.md

@@ -0,0 +1,27 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-11-29 15:01:39
+ * @LastEditTime: 2021-11-29 15:08:53
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: /MedicalWisdomCheckSys/src/components/MccsPageContainer/readme.md
+-->
+
+
+
+#### Demo
+
+```js
+
+    <MccsPageContainer
+         //config的值参考 https://procomponents.ant.design/components/page-container
+         config={...config}
+    />
+
+```
+
+
+#### 注意点
+
+- 组件包含一个全局触发的重置密码表单
+- 当菜单项数据包含一个iframeurl时,该页面的内容将被替换

+ 68 - 0
src/components/MccsRecordList/readme.md

@@ -0,0 +1,68 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-11-29 15:10:32
+ * @LastEditTime: 2021-11-29 15:14:21
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: /MedicalWisdomCheckSys/src/components/MccsRecordList/readme.md
+-->
+
+
+
+#### Demo 
+
+```js
+
+   <MccsRecordList
+       {...Apis}   
+   />
+
+```
+
+
+#### Api
+
+```js
+   
+    title:string,
+    list?:MccsRecordListType|[],  //list数据结构查看typings.d.ts
+    actionFunc?:(data:historyRecordsItem)=>void,  //删除历史版本回调
+    actionText?:string,
+    actionNode?:(item?:MccsRecordListItemInnerDetail)=>ReactNode,  //记录操作按钮
+   
+
+```
+
+#### list mock数据结构
+
+```json
+
+   {
+                evaluation: 'C',
+                details: [
+                    {
+                        name: '张三',
+                        fileName: '文件名',
+                        fileUrl: '',
+                        createTime: '2021-05-02 18:27',
+                        recordTypeName: '自查',
+                        historyRecords: [
+                            {
+                                versionName: '当前版本',
+                                name: '麻子',
+                                time: '2021-05-02 18:27',
+                            }
+                        ]
+                    },
+                    {
+                        name: '张三',
+                        fileName: '文件名',
+                        fileUrl: '',
+                        createTime: '2021-05-02 18:27',
+                        recordTypeName: '自查',
+                        historyRecords: []
+                    }
+                ]
+    },
+
+```

+ 37 - 1
src/components/MccsTable/README.md

@@ -1,8 +1,44 @@
 <!--
  * @Author: your name
  * @Date: 2021-09-14 17:55:18
- * @LastEditTime: 2021-09-14 17:55:19
+ * @LastEditTime: 2021-11-29 15:23:41
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsTable/README.md
 -->
+
+
+
+#### Demo
+
+```js
+  
+  <MccsTable
+      //config 参考地址 https://procomponents.ant.design/components/table?current=1&pageSize=5
+      {...config}
+  />
+
+```
+
+
+#### 相较于原本组件不同的地方
+
+- 或取ref属性,ref属性返回的值通过`.current()`可以分别获取到表单和表单搜索的ref
+
+##### 例子
+```js
+   
+   const ref = useRef(null);
+
+
+   //获取
+
+   console.log(ref.current().getFormRef());
+
+   console.log(ref.current().getTableRef());
+
+   //render
+
+   <MccsTable ref={ref} />
+
+```