code4eat 3 жил өмнө
parent
commit
5d261c8cec

+ 1 - 1
README.md

@@ -4,7 +4,7 @@
 
 
 
-## 医院智慧查检系统
+## 医院评审管理系统
 
 ##### 背景:
 

+ 3 - 3
config/defaultSettings.ts

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2022-01-14 10:41:15
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-21 17:43:33
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/config/defaultSettings.ts
  */
@@ -23,7 +23,7 @@ const Settings: LayoutSettings & {
   fixedHeader: false,
   fixSiderbar: false,
   colorWeak: false,
-  title: '医院智慧查检系统',
+  title: '医院评审管理系统',
   pwa: false,
   logo:'',
   iconfontUrl: '',

+ 2 - 2
src/app.tsx

@@ -89,7 +89,7 @@ export async function getInitialState(): Promise<{
     const localMasterData = localStorage.getItem('initialState');
     if (localMasterData) {
       const { openedSysLists } = JSON.parse(localMasterData);
-      const currentSys = openedSysLists.filter((t:any) => t.name == '智慧查检');
+      const currentSys = openedSysLists.filter((t:any) => t.name == '评审管理');
       const systemId = currentSys.length > 0 ? currentSys[0].id : 0;
       const menu = await getMenus(systemId);
       if (menu) {
@@ -311,7 +311,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) =
 
             if (localMasterData) {
               const { openedSysLists } = JSON.parse(localMasterData);
-              const currentSys = openedSysLists.filter((t:any) => t.name == '智慧查检');
+              const currentSys = openedSysLists.filter((t:any) => t.name == '评审管理');
               const systemId = currentSys.length > 0 ? currentSys[0].id : 0;
               const data: any[] = await getMenus(systemId);
 

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

@@ -1,19 +1,18 @@
 /*
  * @Author: your name
  * @Date: 2021-09-15 18:38:41
- * @LastEditTime: 2022-03-29 17:42:30
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-16 17:02:10
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsClickableTabs/index.tsx
  */
 
 
-
-// import { Button } from 'antd';
 import React,{useState,useEffect} from 'react'
 
 import styles from './index.less';
 
+
 const MccsClickableTabs: React.FC<MccsClickableTabs.propsType> = (props)=>{
 
     const [list,setList] = useState<MccsClickableTabs.TabType[]>([]);
@@ -21,6 +20,8 @@ const MccsClickableTabs: React.FC<MccsClickableTabs.propsType> = (props)=>{
     const [activedTab,setActivedTab] = useState<{label: string,value: any}>();
     const [disabled,setDisabled] = useState(false);
 
+
+
     const clickHandle = (item: MccsClickableTabs.TabType,supItem: {label: string,value: string|number})=>{
        
         if(!disabled){
@@ -40,7 +41,7 @@ const MccsClickableTabs: React.FC<MccsClickableTabs.propsType> = (props)=>{
 
     useEffect(()=>{
    
-        const {data=[],value,clear,disabled} = props;
+        const {data=[],value,clear,disabled = false} = props;
         setList(data);
         disabled&&setDisabled(true);
         

+ 15 - 9
src/components/MccsLightTable/index.tsx

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2021-12-24 09:43:04
- * @LastEditTime: 2022-04-29 16:48:03
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-21 15:01:04
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsLightTable/index.tsx
  */
@@ -37,14 +37,18 @@ const MccsLightTable: React.FC<{
     const [renderColumns, seRenderColumns] = useState<MccsLightTableTypes.MccsLightTableColumn[]>([]);
     const [pageData, setPageData] = useState<{ pageSize: number, current: number }>({ pageSize: 10, current: 1 });
     const [total, setTotal] = useState(0);  // 数据总数
-
+    
     const getData = async (current: number, size: number) => {
+        
         if (!request) return [];
         const data = await request(current, size);
+
         if (data) {
+            
             const { list = [], totalCount } = data;
             setTotal(totalCount);
             setDataList(list);
+
         } else {
             return []
         }
@@ -59,17 +63,17 @@ const MccsLightTable: React.FC<{
 
     const pageChangeHandle = (page: number, pageSize: number | undefined) => {
         // 分页页码变化时
-        // console.log({page,pageSize});
         getData(page, pageSize || 10);
     }
 
     useEffect(() => {
-        const hasSetWidColumns = columns.filter(item => item.width);
-        const needCountWidCloumnsNum = columns.length - hasSetWidColumns.length;
+        const _columns = columns.filter(item => !item.hideInTable);
+        const hasSetWidColumns = _columns.filter(item => item.width);
+        const needCountWidCloumnsNum = _columns.length - hasSetWidColumns.length;
         const widArray = hasSetWidColumns.map(item => item.width)
         const CountableWid = widArray.reduce((prev, curr) => (prev || 0) + (curr || 0), 0);
         // 初始化cell长度
-        const a = columns.map((item, index) => {
+        const a = _columns.map((item, index) => {
 
             if (index == 0) {
                 // console.log({...item,width:(100-(CountableWid?CountableWid:0))/needCountWidCloumnsNum});
@@ -82,7 +86,7 @@ const MccsLightTable: React.FC<{
 
             return item.width ? item : { ...item, width: (beichushu / chushu) }
         });
-
+        
         seRenderColumns(a);
 
     }, [columns]);
@@ -126,10 +130,11 @@ const MccsLightTable: React.FC<{
 
     // 自定义渲染表格内容
     const renderTableRow = (data: any) => {
+    
         const { pfmDataDirectoryList: list, gradeLevel: grade } = data;
         const _cpcolumns = Object.assign([], renderColumns);
         _cpcolumns.splice(0, 1);  // 剔除第一个
-
+        
         const headWid = renderColumns[0] && renderColumns[0].width ? renderColumns[0].width : 0;
 
         return (
@@ -192,6 +197,7 @@ const MccsLightTable: React.FC<{
                             <div className='listRow'>
                                 {
                                     dataList.map((item, index) => {
+                                    
                                         return <React.Fragment key={index}>{renderTableRow(item)}</React.Fragment>
                                     })
                                 }

+ 3 - 2
src/components/MccsLightTable/typings.d.ts

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2021-12-24 10:03:33
- * @LastEditTime: 2021-12-27 11:02:25
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-20 17:09:46
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsLightTable/typings.d.ts
  */
@@ -15,6 +15,7 @@ declare namespace MccsLightTableTypes {
             key: any,
             title: string,
             width?: number,
+            hideInTable?:boolean,
             render?: (data: any) => ReatNode
        }
 }

+ 1 - 1
src/components/MccsProCard/style.less

@@ -1,7 +1,7 @@
 
 
 
-.ant-pro-card-body {
+.mccs-pro-card-body {
     // overflow-y: scroll;
     padding:16px;
 }

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

@@ -2,7 +2,7 @@
 
 .MccsTable {
     .mwc-ant-card-body {
-        padding: 0;
+        // padding: 0;
     }
     
     

+ 5 - 12
src/components/MccsTable/index.tsx

@@ -1,17 +1,10 @@
 /*
- * @Author: your name
-<<<<<<< HEAD
- * @Date: 2022-03-09 10:08:00
- * @LastEditTime: 2022-03-15 15:41:42
- * @LastEditors: Please set LastEditors
- * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-=======
- * @Date: 2021-09-14 11:14:06
- * @LastEditTime: 2022-03-07 11:00:11
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
->>>>>>> master
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2022-03-29 15:51:56
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2022-06-17 11:40:01
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsTable/index.tsx
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
 
 import React,{useImperativeHandle,useRef} from 'react'

+ 2 - 2
src/components/MccsTable/typings.d.ts

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 11:16:08
- * @LastEditTime: 2021-09-14 17:43:42
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-20 17:09:56
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsTable/typings.d.ts
  */

+ 1 - 1
src/global.less

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

+ 2 - 2
src/manifest.json

@@ -1,6 +1,6 @@
 {
-  "name": "医院智慧查检系统",
-  "short_name": "医院智慧查检系统",
+  "name": "医院评审管理系统",
+  "short_name": "医院评审管理系统",
   "display": "standalone",
   "start_url": "./?utm_source=homescreen",
   "theme_color": "#002140",

+ 91 - 68
src/pages/GradeHospitalAccreditation/accreditationDetail/index.tsx

@@ -2,7 +2,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-06 09:07:56
- * @LastEditTime: 2022-06-06 10:37:56
+ * @LastEditTime: 2022-06-17 18:27:40
  * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/accreditationDetail/index.tsx
@@ -22,12 +22,13 @@ import { useModel } from 'umi';
 import ProForm, { ProFormText, ProFormTextArea } from '@ant-design/pro-form';
 
 import FormList from './components/FormList/index';
-import MaterialTable from './components/materialTable/index';
+
 import MccsSelect from '@/components/MccsProFormSelect/index';
 
-import { getMaterialListGrades, getMaterialList, getMaterialDirList, addMaterialDirList, delMaterialDirList,editMaterialDirList } from './service';
+import { getMaterialListGrades, getMaterialDirList, addMaterialDirList, editMaterialDirList } from './service';
 
 import './index.less';
+import { getRuleSetType } from '@/pages/PlatformMana/generalSetting/serve';
 
 
 
@@ -59,6 +60,8 @@ type ruleList = {
 
 const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = props => {
 
+  const { initialState } = useModel('@@initialState');
+
   const { accreditationDetail } = useModel('allModels');
   const { getTreeData, treeData, delDetailRuleHandle, addDetailRuleHandle, editDetailRulehandle, detailRuleList, getDetailRuleListHandle, setDetailRuleList, ...restAccreditationModel } = accreditationDetail;
 
@@ -81,9 +84,12 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
   const [showCardThree, setShowCardThree] = useState(false);  // 是否展示资料目录栏
   const [materialDirModalVisible, setMaterialDirModalVisible] = useState(false); // 资料目录弹窗展示/掩藏
   const [allMaterialDirList, setAllMaterialDirList] = useState<{ label: string, value: string }[]>([]); // 所有可选的资料目录
-  const [editMaterialDir,setEditMaterialDir] = useState(false); // 是否编辑资料目录数据
-  const [currentEditMaterialDir,setCurrentEditMaterialDir] = useState<API.MaterialDirListItem>(); // 当前编辑的资料目录项数据
-  const [reloadMaterialDirData,setReloadMaterialDirData] = useState(false);  // 是否刷新资料目录数据
+  const [editMaterialDir, setEditMaterialDir] = useState(false); // 是否编辑资料目录数据
+  const [currentEditMaterialDir, setCurrentEditMaterialDir] = useState<API.MaterialDirListItem>(); // 当前编辑的资料目录项数据
+  const [reloadMaterialDirData, setReloadMaterialDirData] = useState(false);  // 是否刷新资料目录数据
+
+  const [formFiledShowTags, set_formFiledShowTags] = useState<{ [key: string]: boolean }>({});   //标单项展示控制
+
 
   const onSelectHandle = (data: treeItem) => {
 
@@ -153,49 +159,20 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
     }
   }
 
-  // 获取叶子节点下资料目录表格数据
-  const getMaterialListFunc = async (params: MaterialTable.GeDataParams) => {
-    const { selectorFilter, keyword,pageSize=10,current } = params;
-    if (currentActived) {
-      const { code, version } = currentActived;
-      const resp = await getMaterialList({
-        grade: selectorFilter,
-        keyword,
-        numStr: code,
-        version,
-        pageSize,
-        current
-      });
-      if (resp) {
-        return {
-            total:resp.totalCount,
-            pageSize:resp.pageSize,
-            list:resp.list,
-            current:resp.current
-        };
-      } 
-    } 
-  }
-
   const getMaterialDirListFunc = async () => {
     // 获取所有资料目录集合用于弹窗表单
     if (currentActived) {
       const { code, version } = currentActived;
       const resp = await getMaterialDirList({ numStr: code, version });
       if (resp) {
-        setAllMaterialDirList(resp.map(t=>({label:t,value:t})));
+        setAllMaterialDirList(resp.map(t => ({ label: t, value: t })));
       }
     }
   }
 
-  const addMaterialDirHandle = () => {
-    // 新增资料目录数据
-    setEditMaterialDir(false);
-    setMaterialDirModalVisible(true);
-  }
 
   const onMaterialDirModalVisibleChange = (bool: boolean) => {
-    bool&&getMaterialDirListFunc();
+    bool && getMaterialDirListFunc();
     setMaterialDirModalVisible(bool);
   }
 
@@ -210,20 +187,20 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
   const mateialDirModalFinishHandle = async (values: mateialDirModalValues) => {
     console.log('commit', values);
     const { grade, ...restVals } = values;
-    if(editMaterialDir&&currentEditMaterialDir){
+    if (editMaterialDir && currentEditMaterialDir) {
       // 编辑
       const resp = await editMaterialDirList({
         grade: grade.join(','),
-        id:currentEditMaterialDir.id,
-        directory:restVals.directory,
-        note:restVals.note,
-        profileName:restVals.profileName
+        id: currentEditMaterialDir.id,
+        directory: restVals.directory,
+        note: restVals.note,
+        profileName: restVals.profileName
       });
       if (resp) {
         setReloadMaterialDirData(true);
         return true;
       }
-    }else{
+    } else {
       // 新增
       if (currentActived) {
         const { code, version, id } = currentActived;
@@ -240,28 +217,11 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
         }
       }
     }
-    
-  }
-
-  // 资料目录表格删除/编辑回调
-  const tableItemActionHandle = async (type: 'DEL' | "EDIT", data: API.MaterialDirListItem[]) => {
-    if (type == 'DEL') {
-      if (await delMaterialDirList(data.map(t=>t.id))) {
-        return true
-      } 
-        return false
-      
-    }
 
-    if (type == 'EDIT') {
-      setCurrentEditMaterialDir(data[0]);
-      setEditMaterialDir(true);
-      setMaterialDirModalVisible(true);
-    }
-    return null;
   }
 
 
+
   const FormNode = ({ visible }: { visible: boolean }) => {
 
 
@@ -272,7 +232,7 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
 
     const formNodeSubmitHandle = (values: any) => {
 
-      const { name, numStr } = values;
+      const { name, numStr,ruleType,ruleDetail='' } = values;
       let parentId = 0;
       if (currentActived) {
         const { id } = currentActived;
@@ -301,6 +261,8 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
           parentId,
           name,
           numStr,
+          ruleType,
+          ruleDetail,
           detail: details
         }
         addDetailRuleHandle(paramData);
@@ -328,6 +290,8 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
           const paramData = {
             id: Number(id),
             name,
+            ruleType,
+            ruleDetail,
             detail: isLeaf ? details : [],
           }
           editDetailRulehandle(paramData);
@@ -342,14 +306,25 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
       setModalVisible(bool);
     }
 
+    const getRuleTypeList =async () => {
+           const resp = await getRuleSetType();
+           if(resp){
+                 return resp.map(item=>({
+                      label:item.generalName,
+                      value:item.generalName
+                 }))
+           }
+           return []
+    }
+
 
     useEffect(() => {
-  
+
       if (currentActived) {
 
         const { isLeaf, levelNum } = currentActived;
-  
-        isLeaf&&setReloadMaterialDirData(true); // 点击叶子结点,刷新资料目录数据
+
+        isLeaf && setReloadMaterialDirData(true); // 点击叶子结点,刷新资料目录数据
         isLeaf && setShowMore(true);// 当新增或编辑第4层时也就是叶子节点,增加表单数据
         (levelNum == 3 && actionType == 'add') && setShowMore(true);  // 当新增或编辑第4层时也就是叶子节点,增加表单数据
 
@@ -394,8 +369,34 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
           type='textArea'
           placeholder="请输入名称"
         />
+
+        {
+          //湖北兼容 
+        }
+
+        {formFiledShowTags['ruleType'] && <MccsSelect 
+            label="条文类型" name="ruleType" 
+            width="sm" 
+            request={getRuleTypeList}
+        />}
+
+        {
+          formFiledShowTags['ruleDetail'] && (
+            <MccsProFormText
+              name="ruleDetail"
+              label="条文说明"
+              type='textArea'
+              fieldProps={{
+                width: '100%',
+                rows: 8
+              }}
+              placeholder="请输入"
+            />
+          )
+        }
+
         {
-          showMore && (
+          showMore && formFiledShowTags['dataSource'] && (
             <ProForm.Item
               label="等级明细"
               name="dataSource"
@@ -425,6 +426,28 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
 
   useEffect(() => {
     getTreeData();
+    
+    if (initialState?.currentUser?.ruleVersion == 'HB202001') {
+      //湖北版
+      set_formFiledShowTags({
+        'numStr': true,
+        'name': true,
+        'ruleType': true,
+        'ruleDetail': true,
+        'dataSource': false
+      });
+
+
+    } else {
+      set_formFiledShowTags({
+        'numStr': true,
+        'name': true,
+        'ruleType': false,
+        'ruleDetail': false,
+        'dataSource': true
+      })
+    }
+
   }, []);
 
 
@@ -439,10 +462,10 @@ const AccreditationDetail: React.FunctionComponent<AccreditationDetailProps> = p
          */
       }
       <MccsModal
-        title={editMaterialDir?`编辑资料目录`:'新增资料目录'} visible={materialDirModalVisible}
+        title={editMaterialDir ? `编辑资料目录` : '新增资料目录'} visible={materialDirModalVisible}
         onVisibleChange={onMaterialDirModalVisibleChange}
         width={600} layout={'horizontal'} labelCol={{ span: 4 }}
-        initialValues={editMaterialDir?{...currentEditMaterialDir,grade:currentEditMaterialDir?.grade.split(',')}:{}}
+        initialValues={editMaterialDir ? { ...currentEditMaterialDir, grade: currentEditMaterialDir?.grade.split(',') } : {}}
         onFinish={mateialDirModalFinishHandle}
       >
         <MccsSelect

+ 29 - 27
src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/drawer/fragment/setArticle.tsx

@@ -1,21 +1,23 @@
 /*
  * @Author: your name
  * @Date: 2022-04-28 16:12:05
- * @LastEditTime: 2022-04-28 16:13:10
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-16 17:12:56
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @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 { 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 { Form, Row, Col, Tabs } from 'antd'
 import { useModel } from 'umi';
 import MultiResponsibilitySelecter from './multi';
 
+const { TabPane } = Tabs;
+
 //条文设置/表格批量设置drawer弹窗
 
 const SetArticle = () => {
@@ -37,8 +39,8 @@ const SetArticle = () => {
     const drawerFormRef = useRef<ProFormInstance>();
 
     const [ifsetTargetScore, setifsetTargetScore] = useState(true); //设置目标分数是否必填
-    const [rows,setrows] = useState(0);
-    const [respDepartmentList,setrespDepartmentList] = useState<{label:string;value:any}[]|[]>([]);  //可选单位
+    const [rows, setrows] = useState(0);
+    const [respDepartmentList, setrespDepartmentList] = useState<{ label: string; value: any }[] | []>([]);  //可选单位
 
 
     const onVisibleChangeHandle = (visible: boolean) => {
@@ -73,9 +75,9 @@ const SetArticle = () => {
         }
     }
 
-    const setRespDepartment =async () => {
-          const data = await getDepartmentRequest();
-          setrespDepartmentList(data);
+    const setRespDepartment = async () => {
+        const data = await getDepartmentRequest();
+        setrespDepartmentList(data);
     }
 
 
@@ -89,9 +91,9 @@ const SetArticle = () => {
 
 
 
-    useEffect(()=>{
+    useEffect(() => {
         setRespDepartment();
-    },[])
+    }, [])
 
 
 
@@ -101,33 +103,33 @@ const SetArticle = () => {
             width={500}
             formRef={drawerFormRef}
             visible={restModelData.drawerVisible}
-            initialValues={restModelData.drawerFormType == 'ARTICLE_SET' ? { 
+            initialValues={restModelData.drawerFormType == 'ARTICLE_SET' ? {
                 ...articleManagement.articleSettingFormInit,
-                main_DepartmentAndManager:[{
-                    responsibilityDepartment:articleManagement.articleSettingFormInit?.responsibilityDepartment,
-                    responsibilityUser:articleManagement.articleSettingFormInit?.responsibilityUser
+                main_DepartmentAndManager: [{
+                    responsibilityDepartment: articleManagement.articleSettingFormInit?.responsibilityDepartment,
+                    responsibilityUser: articleManagement.articleSettingFormInit?.responsibilityUser
                 }]
             } : undefined}
-            onFinish={(values: any) => onFinishHandle({...values,targetScores:ifsetTargetScore?values.targetScores:{label:'',value:''}})}
+            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>
+                        <Form.Item name='main_DepartmentAndManager'>
+                            <MultiResponsibilitySelecter options={respDepartmentList} rows={1} />
+                        </Form.Item>
                     </Col>
                 </Row>
-                
 
-                <div className='formItemTitle'>合作负责人及单位<span onClick={() => setrows(rows+1)}>添加</span></div>
+
+                <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>
+                        <Form.Item name='Co_DepartmentAndManager'>
+                            <MultiResponsibilitySelecter options={respDepartmentList} editable={true} rows={rows} />
+                        </Form.Item>
                     </Col>
                 </Row>
 
@@ -141,9 +143,9 @@ const SetArticle = () => {
                             },
                         ]}>
                             <MccsClickableTabs
-                                clear={!ifsetTargetScore}
-                                data={restModelData.targetScores}
-                                tabClickHandle={(val)=>{setifsetTargetScore(true)}}
+                                        clear={!ifsetTargetScore}
+                                        data={restModelData.targetScores}
+                                        tabClickHandle={(val) => { setifsetTargetScore(true) }}
                             />
                         </Form.Item>
                     </Col>

+ 53 - 21
src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2022-03-08 10:41:15
- * @LastEditTime: 2022-06-06 16:16:14
+ * @LastEditTime: 2022-06-21 11:05:56
  * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/components/articleDetailModule/index.tsx
@@ -31,6 +31,7 @@ const myEvent = new Event('resize');
 const ArticleDetail = ({ isModeTwo = false }) => {
 
     const { articleManagement,ledgerUpload } = useModel('allModels');
+    const { initialState } = useModel('@@initialState');
 
     const {
         isLeaf,
@@ -51,7 +52,8 @@ const ArticleDetail = ({ isModeTwo = false }) => {
         {
             key: 'gradeLevel',
             title: '档次',
-            width: 10
+            width: 10,
+            hideInTable:initialState?.currentUser?.ruleVersion == 'HB202001',
         },
         {
             key: 'directory',
@@ -101,6 +103,7 @@ const ArticleDetail = ({ isModeTwo = false }) => {
                     rules: [{ required: true, message: '此项为必填项' }],
                 };
             },
+            hideInTable:initialState?.currentUser?.ruleVersion == 'HB202001',
             renderFormItem: (_: any, config: any, form: any) => {
 
                 const { isEditable } = config;
@@ -180,6 +183,8 @@ const ArticleDetail = ({ isModeTwo = false }) => {
     }
 
     const taizhangDataDerectoryEditHandle = (data: any, actType: ActType) => {
+
+        console.log({data,actType});
         //台账资料目录编辑回调
         const version = restModelData.leafData?.reviewArticle.version;
         let prevData = restModelData.taizhangDataDirectoryCommitList;
@@ -210,12 +215,25 @@ const ArticleDetail = ({ isModeTwo = false }) => {
             return;
         }
 
-        restModelData.setTaizhangDataDirectoryCommitList(
-            [...prevData, {
-                ...data, dataStatus: actType, version: version ? version : '',
-                grade: data.grade.join(','), numStr: numStr, accountStatus: data.accountStatus ? '1' : '0'
-            }]
-        )
+        if(initialState?.currentUser?.ruleVersion == 'HB202001'){
+            restModelData.setTaizhangDataDirectoryCommitList(
+                [...prevData, {
+                    ...data, dataStatus: actType, version: version ? version : '',
+                    grade:'',
+                    numStr: numStr, accountStatus: data.accountStatus ? '1' : '0'
+                }]
+            )
+        }else{
+            restModelData.setTaizhangDataDirectoryCommitList(
+                [...prevData, {
+                    ...data, dataStatus: actType, version: version ? version : '',
+                    grade: data.grade.join(','), 
+                    numStr: numStr, accountStatus: data.accountStatus ? '1' : '0'
+                }]
+            )
+        }
+
+        
     }
 
 
@@ -244,8 +262,6 @@ const ArticleDetail = ({ isModeTwo = false }) => {
             followWindowResize(0);
         }
 
-        // window.dispatchEvent(myEvent);
-
         if (scrollContentRef.current) {
             scrollContentRef.current.scrollTop = 0
         }
@@ -298,7 +314,6 @@ const ArticleDetail = ({ isModeTwo = false }) => {
     }
 
     const viewLedgerFileHandle = (item:API.TaizhangDirectoryTableItem)=>{
-        console.log('ee');
         restModelData.set_currentActDataDireactory(item);
         restModelData.setDrawerFormType('VIEWLEDGER');
         restModelData.setDrawerVisible(true);
@@ -331,6 +346,7 @@ const ArticleDetail = ({ isModeTwo = false }) => {
 
 
     useEffect(() => {
+     
         window.addEventListener("resize", () => followWindowResize());
         return () => {
             window.removeEventListener("resize", () => followWindowResize());
@@ -351,6 +367,14 @@ const ArticleDetail = ({ isModeTwo = false }) => {
                         <div className='peopleGroup'>
                             <span>条文组别:</span>
                             <span>{restModelData.leafData?.reviewArticle?.accountType}</span>
+                            {
+                                initialState?.currentUser?.ruleVersion == 'HB202001'&&(
+                                    <>
+                                        <span>条文类型:</span>
+                                        <span>{restModelData.leafData?.reviewArticle?.ruleType?restModelData.leafData?.reviewArticle?.ruleType:'-'}</span>
+                                    </>
+                                )
+                            }
                             <span>负责单位:</span>
                             <span>{restModelData.leafData?.reviewArticle?.responsibilityDepartmentName}</span>
                             <span>负责人:</span>
@@ -375,8 +399,9 @@ const ArticleDetail = ({ isModeTwo = false }) => {
                         }
                         </div>
                         
-                        <div className='scoreRow'>
-                            <div className='scoreInfo'>
+                        
+                        <div className='scoreRow' >
+                            <div className='scoreInfo' >
                                 {
                                     scoreList.map((item, index) => {
                                         return (
@@ -397,8 +422,8 @@ const ArticleDetail = ({ isModeTwo = false }) => {
                                 (restModelData.moduleMode && !restModelData.editMode && restModelData.hasEditAuthority) && <div className='editPageBtn' onClick={() => setEditPageStatus()}>{restModelData.editMode ? '取消编辑' : '开启编辑'}</div>
                             }
                         </div>
-                        <div className='scoreGradeDetail'>
 
+                        <div className='scoreGradeDetail' style={{display:initialState?.currentUser?.ruleVersion == 'HB202001'?'none':'block'}}>
                             {
                                 restModelData.leafData?.pfmViewRuleDetailDataVoList.map((item, index) => (
                                     <div className='scoreGradeDetailList' key={index}>
@@ -434,9 +459,15 @@ const ArticleDetail = ({ isModeTwo = false }) => {
                                 restModelData.editMode && (
                                     <div className='wrap' style={{ width: '60%', display: 'flex', flexDirection: 'row', justifyContent: 'flex-end' }}>
                                         {
-                                            (restModelData.targetScores).map((item, index) => (
-                                                <div className={restModelData.selectedSelfEvolution?.label == item.label ? 'tab on' : 'tab'} key={index} onClick={() => restModelData.onSelfEvolutionTabChange(item)}>{item.label}</div>
-                                            ))
+                                            (restModelData.targetScores).map((item, index) => {
+                                                if(initialState?.currentUser?.ruleVersion == 'HB202001'){
+                                                      return (
+                                                        <div className={restModelData.activedSelfEvolutionTab?.label == item.label ? 'tab on' : 'tab'} key={index} onClick={() => restModelData.onSelfEvolutionTabChange(item)}>{item.label}</div>
+                                                      )
+                                                }else{
+                                                    return <div className={restModelData.selectedSelfEvolution?.label == item.label ? 'tab on' : 'tab'} key={index} onClick={() => restModelData.onSelfEvolutionTabChange(item)}>{item.label}</div>
+                                                }
+                                            })
                                         }
                                     </div>
                                 )
@@ -449,7 +480,7 @@ const ArticleDetail = ({ isModeTwo = false }) => {
             {
                 isLeaf && restModelData.leafData && (
                     //台账上传页面时,背景色统一白色,cardWrap提供容器实现上下滑动
-                    <div className={isModeTwo ? 'cardWrap isModeTwo' : 'cardWrap'} style={{ marginTop: '16px', height: `${scrollAreaH - 16}px` }} ref={scrollContentRef}>
+                    <div className={isModeTwo ? 'cardWrap isModeTwo' : 'cardWrap'} style={{ marginTop: '16px', height: `${scrollAreaH - 16}px`,paddingTop:24 }} ref={scrollContentRef}>
                         <div>
                             {
                                 //渲染执行情况说明
@@ -463,8 +494,8 @@ const ArticleDetail = ({ isModeTwo = false }) => {
 
                                     return (
                                         <div className='card' key={index} style={{ marginBottom: isModeTwo ? 0 : '16px', paddingBottom: isModeTwo ? 0 : '16px' }}>
-                                            <div className='cardTitle' style={{ marginBottom: isModeTwo ? '8px' : '16px' }}>{`执行情况说明(等级${item.level})`}</div>
-
+                                            {initialState?.currentUser?.ruleVersion != 'HB202001' && (<div className='cardTitle' style={{ marginBottom: isModeTwo ? '8px' : '16px' }}>{`执行情况说明(等级${item.level})`}</div>)}
+                                            {initialState?.currentUser?.ruleVersion == 'HB202001' && (<div className='cardTitle' style={{ marginBottom: isModeTwo ? '8px' : '16px' }}>{`执行情况说明`}</div>)}
                                             <TextArea showCount maxLength={2000}
                                                 autoSize={{
                                                     minRows: 5,
@@ -472,7 +503,8 @@ const ArticleDetail = ({ isModeTwo = false }) => {
                                                 }}
                                                 disabled={!restModelData.editMode} value={item.note}
                                                 onChange={e => onTextAreaChange(e, item.level)}
-                                                style={{ marginBottom: 20 }} />
+                                                style={{ marginBottom: 20 }} 
+                                            />
 
                                             {
                                                 !isModeTwo && (

+ 13 - 11
src/pages/GradeHospitalAccreditation/articleManagement/index.tsx

@@ -2,8 +2,8 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2022-04-29 14:23:05
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-17 16:16:01
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
  */
@@ -17,11 +17,6 @@ import { useModel } from 'umi';
 import MccsFileTree from '@/components/MccsFileTree/index';
 import MccsTable from '@/components/MccsTable/index';
 
-import MccsClickableTabs from '@/components/MccsClickableTabs/index';
-import MccsUpload from '@/components/MccsUpload/index';
-import { MccsModal } from '@/components/MccsModal';
-
-
 import { getDepartmentList } from './server';
 
 
@@ -32,7 +27,6 @@ import { Form, Table, Space, Button, Switch, Select } from 'antd'
 import {
     ProFormText,
     ProFormSelect,
-    ProFormDependency,
 } from '@ant-design/pro-form';
 
 import './index.less';
@@ -63,7 +57,7 @@ export enum ActType {
 
 //条文管理
 const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
-    const { columnsFromProps = [], headerConcig, isModeTwo } = props;
+    const { columnsFromProps = [], headerConcig, isModeTwo = false } = props;
     const { articleManagement } = useModel('allModels');
 
     const {
@@ -206,6 +200,12 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
             width: '35%',
             ellipsis: true
         },
+        {
+            title: '条文类型',
+            dataIndex: 'ruleType',
+            hideInSearch:true,
+            ellipsis: true
+        },
         {
             title: '负责单位',
             dataIndex: 'responsibilityDepartmentName',
@@ -272,6 +272,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
     const openDetailInDrawer = (record: any) => {
         // restModelData.setRecords(record)
         setdetailDrawerVisible(true);
+        console.log({record});
         restModelData.setCurrentSelectedActObj(record);
         getTableData({ id: record.id});
     }
@@ -386,15 +387,16 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                             )
                         }
                     </div>
-                    <div style={{ padding: 0, width: restModelData.editMode ? '100%' : '75%', transition: 'width 0.2s ease-in' }}>
+                    <div style={{ padding:0, width: restModelData.editMode ? '100%' : '75%', transition: 'width 0.2s ease-in' }}>
                         <div className='card' style={{ display: currentActivedTree?.isLeaf ? 'none' : 'block',height:'calc(100vh - 88px)'}}>
                             <MccsTable
                                 ref={tableRef}
                                 columns={columnsFromProps.length > 0 ? columnsFromProps : columns}
                                 request={getTableData}
                                 search={{
-                                    span: 6
+                                    span: 6,
                                 }}
+                                
                                 rowSelection={isModeTwo ? false : {
                                     // 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom
                                     // 注释该行则默认不显示下拉选项

+ 81 - 19
src/pages/GradeHospitalAccreditation/articleManagement/model.ts

@@ -2,8 +2,8 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:46:45
- * @LastEditTime: 2022-04-29 16:55:25
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-20 17:34:01
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/model.ts
  */
@@ -34,6 +34,7 @@ import {
 
 import { notification } from 'antd';
 import { DataItemType, MultiResponsibilitySelecterValueType } from './components/articleDetailModule/drawer/fragment/multi';
+import { useModel } from 'umi';
 
 export interface ImplementationDataItem {
   level: string;
@@ -59,6 +60,8 @@ const articleManagement = () => {
 
   const [drawerVisible, setDrawerVisible] = useState(false);
 
+  const { initialState } = useModel('@@initialState');
+
   /**
    * ARTICLE_SET 条文设置
    * BATCHSETTING 批量设置
@@ -113,6 +116,8 @@ const articleManagement = () => {
   //设置当前操作表格里的资料目录项
   const [currentActDataDireactory,set_currentActDataDireactory] = useState<API.TaizhangDirectoryTableItem|undefined>(undefined);
 
+  const [activedSelfEvolutionTab,setActivedSelfEvolutionTab] = useState<{ label: string; value: any }|undefined>(undefined);  //当前选中的自评等级,湖北版
+
 
 
 
@@ -335,7 +340,7 @@ const articleManagement = () => {
     const difference = hasDataKeys
       .concat(base)
       .filter((v) => !hasDataKeys.includes(v) || !base.includes(v)); // 找出缺失的项
-    // console.log({difference});
+
     const needAddImplementationData = difference.map((item) => ({ level: item, note: '' }));
     const lastimplementationData = [...data, ...needAddImplementationData]; // 将需要新增的项添加
     lastimplementationData.forEach((item) => {
@@ -393,7 +398,8 @@ const articleManagement = () => {
     level: string;
   }) => {
     // 或区指定等级的执行情况说明数据,同时根据返回的数据自行添加需要补充的项
-    if (implementationData[level]) return; // implementationData集合里已经有了该等级对应的数据时,不请求,为了保证编辑的数据缓存
+
+    if (implementationData[level]&&implementationData[level].length>0) return; // implementationData集合里已经有了该等级对应的数据时,不请求,为了保证编辑的数据缓存
 
     const data = await getTaizhangImplementation({ numStr, version, level });
 
@@ -401,20 +407,41 @@ const articleManagement = () => {
       level: item.level,
       note: item.note,
     }));
-    const resultData = implementationDataFilter(implementData); // 得到改造过的数据
-    /**
+    
+    let  resultData = undefined;
+  
+    if(initialState?.currentUser?.ruleVersion == 'HB202001'){
+      resultData = [
+          {
+            level:level,
+            note: '',
+          }
+      ]
+    }else{
+      resultData = implementationDataFilter(implementData); // 得到改造过的数据
+      
+    }
+   
+    /**f
      * 
      * 应业务要求,自评等级切换时保留之前填写数据
      * 所以额外建立一个键值对象进行缓存
      */
 
     setImplementationData({ ...implementationData, [level]: resultData });
+
   };
 
   const onSelfEvolutionTabChange = (value: { label: string; value: any }) => {
-    // 自评tab切换回调
-    value && setCurrentSelectedSelefEvolution(value);
-    value && setSelectedSelfEvolution(value);
+    // // 自评tab切换回调
+    if(initialState?.currentUser?.ruleVersion == 'HB202001'){
+         //湖北版
+         value && setActivedSelfEvolutionTab(value);
+    }else{
+      value && setCurrentSelectedSelefEvolution(value);
+      value && setSelectedSelfEvolution(value);
+    }
+    
   };
 
   const commitSelfEvolution = async () => {
@@ -455,6 +482,7 @@ const articleManagement = () => {
     const tempArr = data.map((t: any) => ({
       label: t.levelNumber,
       value: t.levelNumber,
+      categoryType:t.categoryType,
       configStatus: t.configStatus,
     }));
     return Promise.resolve(tempArr);
@@ -493,8 +521,18 @@ const articleManagement = () => {
   const getSelectableSelfScoreList = async () => {
     // 获取自评可选列表
     const resp = await getScoreLevelData();
-    const listFilted = resp.filter((t: any) => t.configStatus != 0);
+
+    const listFilted = resp.filter((t: any) => {
+         if(t.categoryType&&t.categoryType.length>0&& initialState?.currentUser?.ruleVersion == 'HB202001'){
+               //湖北版本要求筛选AB类型
+               return t.configStatus != 0&&t.categoryType == leafData?.reviewArticle.ruleType;
+         }
+
+         return t.configStatus != 0
+    });
+
     const list = listFilted.map((t: any) => ({ label: t.levelNumber, value: t.levelNumber }));
+  
     setTargetScores(list.reverse());
   };
 
@@ -506,12 +544,27 @@ const articleManagement = () => {
 
   const commitTaizhangImplementationHandle = async () => {
     // console.log({taizhangDataDirectoryCommitList});
+    console.log({implementationData});
+    let selfEvo:string = '';
+
+    let list: { selfEvaluation: string; node: string; }[] = [];
+
     if (leafData) {
-      const selfEvo = selectedSelfEvolution ? selectedSelfEvolution.label : '';
-      const list = implementationData[selfEvo].map((item) => ({
-        selfEvaluation: item.level,
-        node: item.note,
-      }));
+
+      if(initialState?.currentUser?.ruleVersion == 'HB202001'){
+        selfEvo = activedSelfEvolutionTab?activedSelfEvolutionTab.label:'';
+        list = implementationData[`${leafData.reviewArticle.selfEvaluation}`].map(item=>({
+          selfEvaluation:selfEvo,
+          node: item.note,
+        }))
+      }else{
+        selfEvo = selectedSelfEvolution ? selectedSelfEvolution.label : '';
+        list = implementationData[selfEvo].map((item) => ({
+          selfEvaluation: item.level,
+          node: item.note,
+        }));
+      }
+    
       // 提交台账执行情况说明
       const respImplementation = await commitTaizhangImplementation({
         hospId: `${leafData.reviewArticle.hospId}`,
@@ -578,7 +631,7 @@ const articleManagement = () => {
   useEffect(() => {
     // 叶子结点数据变化后相关回调
     if (leafData) {
-      const { systemEvaluation, targetEvaluation, selfEvaluation, userId,userIds} =
+      const { systemEvaluation, targetEvaluation, selfEvaluation,userIds} =
         leafData.reviewArticle;
 
       const tempScoreList = [
@@ -616,7 +669,16 @@ const articleManagement = () => {
     // 当抽屉类型改变时
     if (drawerFormType == 'BATCHSETTING' || drawerFormType == 'ARTICLE_SET') {
       getScoreList().then((data) => {
-        const dataFilted = data.filter((t: any) => t.configStatus != 0); // 去掉不启动
+        const dataFilted = data.filter((t: any) => {
+
+          if(t.categoryType&&t.categoryType.length>0&&initialState?.currentUser?.ruleVersion == 'HB202001'){ 
+            //湖北版本要求筛选AB类型,
+            return t.configStatus != 0&&t.categoryType == leafData?.reviewArticle.ruleType;
+          }
+          return t.configStatus != 0
+
+        }); 
+   
         setTargetScores(dataFilted);
       });
 
@@ -634,7 +696,7 @@ const articleManagement = () => {
   }, [isShowMineOnly]);
 
   useEffect(() => {
-    // console.log({ leafData, selectedSelfEvolution });
+
     if (leafData && selectedSelfEvolution) {
       // 更新台账页面编辑下的执行情况说明
       getImplementationForEdit({
@@ -703,7 +765,7 @@ const articleManagement = () => {
     commitSelfEvolution,
     selectedSelfEvolution,
     getSelfEvaluationRecordList,
-
+    activedSelfEvolutionTab,
     getUploadLedgerType,
     uploadLedgerTypeList,
     setUploadLedgerTypeList,

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

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:42
- * @LastEditTime: 2022-03-31 17:24:05
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-16 11:33:09
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/typings.d.ts
  */
@@ -71,6 +71,7 @@ declare namespace API {
     ruleId: number;
     numStr: string;
     version: string;
+    ruleType?:string;
     selfEvaluation: string;
     targetEvaluation: string;
     systemEvaluation: string;

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

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2022-04-29 14:21:38
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-17 16:18:06
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
  */
@@ -76,6 +76,12 @@ const LedgerUpload: React.FC<LedgerUploadPropsType> = (props) => {
             ellipsis: true,
             width: '35%'
         },
+        {
+            title: '条文类型',
+            dataIndex: 'ruleType',
+            hideInSearch: true,
+            ellipsis: true,
+        },
         {
             title: '负责单位',
             dataIndex: 'responsibilityDepartmentName',
@@ -136,6 +142,7 @@ const LedgerUpload: React.FC<LedgerUploadPropsType> = (props) => {
         restLedgerUploadModelData.setCurrentRecord(record)
         restLedgerUploadModelData.setDrawerVisible(true);
         restArticleManagementModelData.getTableData({ id: record.id });
+        restArticleManagementModelData.setCurrentSelectedActObj(record);
     }
 
     const del = (record: any) => {
@@ -143,7 +150,7 @@ const LedgerUpload: React.FC<LedgerUploadPropsType> = (props) => {
         const { id } = record;
         restLedgerUploadModelData.delRuleHandle(id);
         restArticleManagementModelData.getArticleTreeData();  // 刷新树结构
-        restArticleManagementModelData.setReloadRightContent(true);  // 刷新表格数据
+        restArticleManagementModelData.setCurrentSelectedActObj(record);  //设置当前打开的对象
 
     }
 

+ 124 - 8
src/pages/PlatformMana/generalSetting/index.tsx

@@ -1,22 +1,23 @@
 /*
  * @Author: your name
  * @Date: 2021-09-27 10:41:52
- * @LastEditTime: 2021-12-30 11:47:30
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-15 18:08:17
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/PlatformMana/generalSetting/index.tsx
  */
 
 
-import React, { useState } from 'react'
+import React, { useEffect, useState } from 'react'
 import MccsPageContainer from '@/components/MccsPageContainer/index';
 import MccsEditableTable from '@/components/MccsEditableTable/index';
 import MccsUpload from '@/components/MccsUpload';
 import {Button,Modal,Form} from 'antd';
-import { getAccreditationTypeData, addTableData, editTableData, getScoreLevelData,getLedgerType,delTableData } from './serve';
+import { getAccreditationTypeData, addTableData, editTableData, getScoreLevelData,getLedgerType,delTableData,getRuleSetType } from './serve';
 import ProForm from '@ant-design/pro-form';
 import './index.less';
 import {importFile} from './serve';
+import { useModel } from 'umi';
 
 
 
@@ -26,10 +27,15 @@ type GeneralSettingType = {
 
 const GeneralSetting: React.FC<GeneralSettingType> = () => {
 
-    const [currentType, setCurrentType] = useState<number>();
+
     const [reloadTableOne, setReloadTableOne] = useState(false);
     const [reloadTableTwo, setReloadTableTwo] = useState(false);
     const [reloadTableThree, setReloadTableThree] = useState(false);
+    const [reloadTableFour,setReloadTableFour] = useState(false);
+
+    const [ifShowRuleSet,set_ifShowRuleSet] = useState(false);
+
+    const { initialState } = useModel('@@initialState');
 
     const accreditationColumns = [
         {
@@ -150,6 +156,7 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
             title: '等级分数',
             key: 'levelNumber',
             dataIndex: 'levelNumber',
+            hideInTable:initialState?.currentUser?.ruleVersion == 'HB202001'?true:false
         },
         {
             title: '类型名称',
@@ -205,6 +212,44 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
             ],
         },
     ];
+    const ruleSettingColumns = [
+        {
+            title: '序号',
+            key: 'id',
+            dataIndex: 'id',
+            editable: false
+        },
+        {
+            title: '类型名称',
+            key: 'generalName',
+            dataIndex: 'generalName',
+        },
+        {
+            title: '备注',
+            key: 'configNote',
+            dataIndex: 'configNote',
+            width:'40%',
+            ellipsis:true
+        },
+        {
+            title: '是否启用',
+            key: 'configStatus',
+            dataIndex: 'configStatus',
+            valueType: 'select',
+            width:'15%',
+            valueEnum: {
+                1: {
+                    text: '是',
+                    value:1
+                },
+                0: {
+                    text: '否',
+                    value:0
+                },
+            },
+        }
+    ]
+
 
     const getTableDataRequest = async () => {
 
@@ -253,6 +298,24 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
         }
     }
 
+    const getRuleSetTableDataRequest = async ()=>{
+        //获取条文设置类型数据
+        
+        const respData = await getRuleSetType();
+        if (respData) {
+            const _respData = respData.map((t: any)=>({...t,configStatus:`${t.configStatus}`}));// Columns的key只可以是string
+            setReloadTableFour(false);
+            return {
+                data: _respData,
+                success: true
+            }
+        }
+        
+        return {
+            data:[]
+        }
+    }
+
 
 
     type dataType = {
@@ -307,6 +370,19 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
                 setReloadTableThree(true);
             }
         }
+        if(typeNum == 4){
+              // 条文设置类型新增
+            const postData: API.AddtableDataPostType = {
+                configType: typeNum,
+                configStatus:Number(configStatus),
+                generalName,
+                configNote,
+            }
+            const resp = await addTableData(postData);
+            if (resp) {
+                setReloadTableThree(true);
+            }
+        }
 
     }
 
@@ -316,13 +392,14 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
             typeNum==1&&setReloadTableOne(true);
             typeNum==2&&setReloadTableTwo(true);
             typeNum==3&&setReloadTableThree(true);
+            typeNum==4&&setReloadTableFour(true);
           }
     }
 
     const editDataHandle = async (data: dataType, typeNum: number) => {
         const { categoryType,configStatus,requirements,levelNumber,configNote, generalName, id } = data;
         if (typeNum == 1) {
-            // 条文组别类型新增
+            // 条文组别类型编辑
             const postData: API.EdittableDataPostType = {
                 configType: typeNum,
                 categoryType,
@@ -336,7 +413,7 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
             }
         }
         if (typeNum == 2) {
-            // 条文组别类型新增
+            // 条文组别类型编辑
             const postData: API.EdittableDataPostType = {
                 configType: typeNum,
                 configStatus:Number(configStatus),
@@ -351,7 +428,7 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
             }
         }
         if (typeNum == 3) {
-            // 条文组别类型新增
+            // 条文组别类型编辑
             const postData: API.EdittableDataPostType = {
                 configType: typeNum,
                 configStatus:Number(configStatus),
@@ -365,6 +442,21 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
                 setReloadTableThree(true);
             }
         }
+
+        if (typeNum == 4) {
+            // 条文设置类型编辑
+            const postData: API.EdittableDataPostType = {
+                configType: typeNum,
+                configStatus:Number(configStatus),
+                generalName,
+                configNote,
+                id: Number(id)
+            }
+            const resp = await editTableData(postData);
+            if (resp) {
+                setReloadTableFour(true);
+            }
+        }
     }
 
     const importFileHandle = ()=>{
@@ -388,6 +480,16 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
         });
     }
 
+
+
+    useEffect(()=>{
+        //兼容湖北版本
+       if(initialState?.currentUser?.ruleVersion == 'HB202001'){
+         set_ifShowRuleSet(true);
+       }
+           
+    },[])
+
     return (
         <MccsPageContainer>
             
@@ -395,6 +497,9 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
                 <div className='blockTitle'>
                     评审细则类型设置
                 {/* <Button onClick={importFileHandle}>导入</Button> */}
+                </div>
+                <div>
+                    
                 </div>
                 <MccsEditableTable
                     columns={accreditationColumns}
@@ -424,6 +529,17 @@ const GeneralSetting: React.FC<GeneralSettingType> = () => {
                     reload={reloadTableThree}
                 />
             </div>
+
+            <div className='block' style={{display:ifShowRuleSet?'block':'none'}}>
+                <div className='blockTitle'>条文类型设置</div>
+                <MccsEditableTable
+                    columns={ruleSettingColumns}
+                    request={getRuleSetTableDataRequest}
+                    addHandle={(data) => addData(data, 4)}
+                    editHandle={data => editDataHandle(data, 4)}
+                    reload={reloadTableFour}
+                />
+            </div>
         </MccsPageContainer>
     )
 }

+ 16 - 2
src/pages/PlatformMana/generalSetting/serve.ts

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2021-09-27 11:06:43
- * @LastEditTime: 2021-12-29 14:43:29
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-15 17:29:30
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/PlatformMana/generalSetting/serve.ts
  */
@@ -62,6 +62,20 @@ export const getLedgerType  = async ()=>{
     });
 }
 
+// 获取条文设置类型数据
+export const getRuleSetType  = async ()=>{
+    
+    return request<{
+        configNote: string,
+        configStatus: number,
+        generalName: string,
+        id: number,
+        // levelNumber: string
+    }[]>('/api/pfm/sysgeneralconfig/getRuleTypeConfig', {
+        method: 'GET',
+    });
+}
+
 // 删除数据
 export const delTableData  = async (id: number)=>{
     

+ 2 - 2
src/pages/document.ejs

@@ -15,7 +15,7 @@
       name="viewport"
       content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
     />
-    <title>医院智慧查检系统</title>
+    <title>医院评审管理系统</title>
     <link rel="icon" href="<%= context.config.publicPath +'favicon.ico'%>" type="image/x-icon" />
   </head>
   <body >
@@ -220,7 +220,7 @@
             width="32"
             style="margin-right: 8px"
           /> -->
-          <h2>医院智慧查检系统</h2>
+          <h2>医院评审管理系统</h2>
         </div>
       </div>
     </div>

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

@@ -86,7 +86,7 @@ const Login: React.FC = () => {
           <div className={styles.header}>
             <Link to="/">
               <img alt="logo" className={styles.logo} src="/logo.png" />
-              <span className={styles.title}>医院智慧查检系统</span>
+              <span className={styles.title}>医院评审管理系统</span>
             </Link>
           </div>
          

+ 3 - 2
src/pages/user/Login/typings.d.ts

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2021-09-09 14:09:21
- * @LastEditTime: 2021-09-30 17:24:22
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-06-13 14:59:52
+ * @LastEditors: code4eat awesomedema@gmail.com
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/types/API.d.ts
  */
@@ -22,6 +22,7 @@ declare namespace API {
       name: string|number;
       avatar?: string;
       userid?: string|number;
+      ruleVersion?:string;  
       [propsName:string]:any
   };
 

BIN
智慧查检旧版_master.zip