Browse Source

选择单位时同时充值责任人,去除现场查核等

code4eat 3 năm trước cách đây
mục cha
commit
60b8f9efe5

+ 1 - 7
config/routes.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-09-30 16:29:44
+ * @LastEditTime: 2021-10-20 14:47:18
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/config/routes.ts
@@ -138,12 +138,6 @@ export default [
       },
     ],
   },
-  // {
-  //   path: '/Account',
-  //   name: '设置',
-  //   icon: 'smile',
-  //   component: './Settings/index',
-  // },
   {
     path: '/',
     redirect: '/',

+ 1 - 1
src/app.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2021-10-18 11:43:58
+ * @LastEditTime: 2021-10-20 14:11:06
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/app.tsx

+ 20 - 0
src/components/MccsRecordList/index.less

@@ -30,6 +30,26 @@
           margin-right: 16px;
           border-radius: 100%;
           background: #FFF5EB;
+          &.A {
+            color: #6ad3ce;
+            background:#cfe7e6;
+          }
+          &.B {
+            color: #80ABFF;
+            background:#d3e0fa;
+          }
+          &.C {
+            color: #FFC080;
+            background:#f5e6d6;
+          }
+          &.D {
+            color: #3377FF;
+            background:#cfddf8;
+          }
+          &.E {
+            color: #690;
+            background:rgb(237, 248, 216);
+          }
         }
 
         .innerWrap {

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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-15 09:17:28
- * @LastEditTime: 2021-09-27 18:55:45
+ * @LastEditTime: 2021-10-22 10:53:06
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/components/MccsRecordList/index.tsx
@@ -111,7 +111,7 @@ const MccsRecordList: React.FC<MccsRecordList.propsType> = (props) => {
                                 return (
                                     <div className='list' key={index}>
                                         <div className='listInner'>
-                                            <div className='header'>{item.evaluation}</div>
+                                            <div className={`header ${item.evaluation}`}>{item.evaluation}</div>
                                             <div className='innerWrap'>
                                                 {
                                                     item.details.map((detailsList, detailListIndex) => {

+ 5 - 0
src/global.less

@@ -11,6 +11,11 @@ body,
 @primary-color: #00528E !important;
 
 @primary-color-rgba:rgba(0,82,142,0.3);
+@scoreA:#69D1CC;
+@scoreB:#80ABFF;
+@scoreC:#FFC080;
+@scoreD:#3377FF;
+@scoreE:#690;
 
 .ant-pro-sider-logo {
    h1 {

+ 6 - 2
src/pages/DataManagement/publicData/model.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-23 09:02:09
- * @LastEditTime: 2021-09-29 18:52:11
+ * @LastEditTime: 2021-10-21 10:19:55
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/DataManagement/publicData/model.ts
@@ -47,7 +47,7 @@ const publicData = () => {
         cateType: `${cateType}`,
         current,
         keyword,
-        pageSize,
+        pageSize:9,
         startDate: date[0],
         endDate: date[1],
       });
@@ -57,6 +57,10 @@ const publicData = () => {
         success: true,
       };
     }
+    return {
+      data: [],
+      success: true,
+    }
   };
 
   const addTreeHandle = async (formValue: API.AddTableListRequestType) => {

+ 45 - 26
src/pages/GradeHospitalAccreditation/articleManagement/index.tsx

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:09
- * @LastEditTime: 2021-10-18 10:36:18
+ * @LastEditTime: 2021-10-22 10:17:25
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/index.tsx
@@ -20,6 +20,7 @@ import MccsDrawerForm from '@/components/MccsDrawerForm/index';
 import MccsClickableTabs from '@/components/MccsClickableTabs/index';
 import MccsUpload from '@/components/MccsUpload/index';
 import { MccsModal } from '@/components/MccsModal';
+import type { ProFormInstance } from '@ant-design/pro-form';
 
 
 
@@ -78,7 +79,7 @@ const columns = [
         dataIndex: 'name',
         hideInSearch: true,
         width: '35%',
-        ellipsis:true
+        ellipsis: true
     },
     {
         title: '负责单位',
@@ -116,6 +117,7 @@ const columns = [
 const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
     const { columnsFromProps = [], headerConcig, isModeTwo } = props;
     const { articleManagement } = useModel('allModels');
+    const drawerFormRef = useRef<ProFormInstance>();
     const {
         isLeaf,
         treeData,
@@ -155,6 +157,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
 
     const onVisibleChangeHandle = (visible: boolean) => {
         //drawer展示控制
+        !visible && setArticleSettingFormInit({});//清空默认值
         restModelData.setDrawerVisible(visible);
     }
 
@@ -170,10 +173,10 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
         //因为modalForm开启了request+params获取表单默认值,
         //所以必须先设置默认值才能开启弹窗
         if (formInitData) {
-            const { fileUrl, recordTypeName,accountType, fileName } = formInitData;
+            const { fileUrl, recordTypeName, accountType, fileName } = formInitData;
             // console.log({formInitData});
             restModelData.setUploadFormInitValue({
-                tab:{label:accountType,value:{label:recordTypeName,value:recordTypeName}},
+                tab: { label: accountType, value: { label: recordTypeName, value: recordTypeName } },
                 files: [{
                     uid: new Date().getTime(),
                     name: fileName,
@@ -184,10 +187,10 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
         } else {
             restModelData.setUploadFormInitValue({})
         }
-        restModelData.getUploadLedgerType().then(data=>{
+        restModelData.getUploadLedgerType().then(data => {
             //设置上传台账类型
             restModelData.setUploadLedgerTypeList(data);
-          
+
         })
         restModelData.setModalVisible(true);
     }
@@ -211,9 +214,9 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
     }
 
 
-    const uploadLedgerChangeHandle = (tabData:any)=>{
-         //台账上传类型选择回调
-         console.log({tabData});
+    const uploadLedgerChangeHandle = (tabData: any) => {
+        //台账上传类型选择回调
+        console.log({ tabData });
     }
 
 
@@ -229,13 +232,13 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
 
     useEffect(() => {
         if (restModelData.leafData) {
-            const { responsibilityDepartmentId,responsibilityDepartmentName, responsibilityUserId, targetEvaluation,responsibilityUserName } = restModelData.leafData;
-            if(responsibilityDepartmentName&&responsibilityDepartmentId){
+            const { responsibilityDepartmentId, responsibilityDepartmentName, responsibilityUserId, targetEvaluation, responsibilityUserName, accountType } = restModelData.leafData;
+            if (responsibilityDepartmentName && responsibilityDepartmentId) {
                 setArticleSettingFormInit({
-                    responsibilityDepartment:{label:responsibilityDepartmentName,value:responsibilityDepartmentId},
-                    responsibilityUser: {label:responsibilityUserName,value:responsibilityUserId},
-                    targetScores: targetEvaluation,
-                    articleType: 'A'
+                    responsibilityDepartment: { label: responsibilityDepartmentName, value: responsibilityDepartmentId },
+                    responsibilityUser: { label: responsibilityUserName, value: responsibilityUserId },
+                    targetScores: { label: targetEvaluation, value: targetEvaluation },
+                    articleType: { label: accountType, value: accountType },
                 });
             }
         }
@@ -261,14 +264,14 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
     return (
         <MccsPageContainer
             config={headerConcig ? headerConcig : {
-                content:!isModeTwo&&<div style={{textAlign:'right',fontSize:12,color: '#525866'}}>{restModelData.currentHospSelfScoreAndOthers}</div>
+                content: !isModeTwo && <div style={{ textAlign: 'right', fontSize: 12, color: '#525866' }}>{restModelData.currentHospSelfScoreAndOthers}</div>
             }}
         >
             {
                 restModelData.modalVisible && (
                     <MccsModal title='台账上传' visible={restModelData.modalVisible}
                         onFinish={(values: any) => restModelData.uploadFile(values)}
-                        initialValues={!restModelData.uploadFormInitValue?{}:restModelData.uploadFormInitValue}
+                        initialValues={!restModelData.uploadFormInitValue ? {} : restModelData.uploadFormInitValue}
                         onVisibleChange={onModalVisibleChange}
                         params={restModelData.uploadFormInitValue}
                         request={(params: any) => {
@@ -283,7 +286,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                             },
                         ]}>
                             <MccsClickableTabs
-                                disabled={(restModelData.uploadFormInitValue&&JSON.stringify(restModelData.uploadFormInitValue) != '{}') ? true : false}
+                                disabled={(restModelData.uploadFormInitValue && JSON.stringify(restModelData.uploadFormInitValue) != '{}') ? true : false}
                                 type='multi'
                                 onChange={uploadLedgerChangeHandle}
                                 data={restModelData.uploadLedgerTypeList}
@@ -303,10 +306,11 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
 
             {
                 //条文设置/表格批量设置drawer弹窗
-                restModelData.drawerVisible  && (
+                restModelData.drawerVisible && (
                     <MccsDrawerForm
                         title={restModelData.drawerFormType == 'ARTICLE_SET' ? '条文设置' : '批量设置'}
                         width={500}
+                        formRef={drawerFormRef}
                         visible={restModelData.drawerVisible}
                         initialValues={restModelData.drawerFormType == 'ARTICLE_SET' ? { ...articleSettingFormInit } : {}}
                         onFinish={(values: any) => restModelData.drawerFormType == 'ARTICLE_SET' ? restModelData.setArticle(values) : restModelData.batchSetting(values)}
@@ -314,15 +318,20 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                     >
                         <div className='formItemTitle'>负责人及单位</div>
                         <Row gutter={16}>
-                            <Col className="gutter-row" span={8}>
+                            <Col className="gutter-row" span={10}>
                                 <ProFormSelect
                                     name="responsibilityDepartment"
                                     width='sm'
+                                    showSearch
                                     request={getDepartmentRequest}
                                     placeholder="选择单位"
                                     fieldProps={{
                                         labelInValue: true,
-                                        onChange: (value, option) => getDepartment(value, option)
+                                        onChange: (value, option) => {
+                                            //责任单位修改时清空责任人
+                                            drawerFormRef.current?.setFieldsValue({ ...articleSettingFormInit, responsibilityUser: { label: '', value: '' } });
+                                            getDepartment(value, option)
+                                        }
                                     }}
                                     rules={[{ required: true, message: '请选择单位!' }]}
                                 />
@@ -352,7 +361,12 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                         <div className='formItemTitle'>目标分数</div>
                         <Row >
                             <Col span={24}>
-                                <Form.Item name='targetScores'>
+                                <Form.Item name='targetScores' rules={[
+                                    {
+                                        required: true,
+                                        message: '请选择目标分数!',
+                                    },
+                                ]}>
                                     <MccsClickableTabs
                                         data={restModelData.targetScores}
                                     />
@@ -365,7 +379,12 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                                     <div className='formItemTitle'>条文组别</div>
                                     <Row>
                                         <Col span={24}>
-                                            <Form.Item name='articleType'>
+                                            <Form.Item name='articleType' rules={[
+                                                {
+                                                    required: true,
+                                                    message: '请选择条文组别!',
+                                                },
+                                            ]}>
                                                 <MccsClickableTabs
                                                     data={restModelData.ruleTypes}
                                                 />
@@ -445,7 +464,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                                                     <MccsRecordList
                                                         title='台账记录'
                                                         list={restModelData.records}
-                                                        actionFunc={(data)=>restModelData.delHistoryRecordHandle(data)}
+                                                        actionFunc={(data) => restModelData.delHistoryRecordHandle(data)}
                                                         actionNode={(data) => actionNodeFunc(data)}
                                                     />
                                                 </TabPane>
@@ -453,7 +472,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                                                     <div className='selfEvolutionArea'>
                                                         <div className='selfEvolutionTitle'>开始自评</div>
                                                         <MccsClickableTabs
-                                                            onChange={(value:{label:string,value:any}) => restModelData.onSelfEvolutionTabChange(value)}
+                                                            onChange={(value: { label: string, value: any }) => restModelData.onSelfEvolutionTabChange(value)}
                                                             data={restModelData.targetScores}
                                                             value={restModelData.selectedSelfEvolution}
                                                         />
@@ -475,7 +494,7 @@ const ArticleManagement: React.FC<ArticleManagementProps> = (props) => {
                                             <MccsRecordList
                                                 title='台账记录'
                                                 list={restModelData.records}
-                                                actionFunc={(data)=>{console.log({data})}}
+                                                actionFunc={(data) => { console.log({ data }) }}
                                                 //restModelData.delHistoryRecordHandle(data)
                                                 actionNode={(data) => actionNodeFunc(data)}
                                             />

+ 13 - 5
src/pages/GradeHospitalAccreditation/articleManagement/model.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:46:45
- * @LastEditTime: 2021-10-18 10:35:41
+ * @LastEditTime: 2021-10-22 11:12:18
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/model.ts
@@ -337,6 +337,13 @@ const articleManagement = () => {
       setCurrentHospSelfScoreAndOthers(resp);
   }
 
+  const getSelectableSelfScoreList = async ()=>{
+    //获取自评可选列表
+    const resp = await getScoreLevelData();
+    const list = resp.map((t:any)=>({label:t.levelNumber,value:t.levelNumber}));
+    setTargetScores(list);
+  }
+
 
   useEffect(() => {
     if (currentActivedTree) {
@@ -365,10 +372,10 @@ const articleManagement = () => {
           label: '自评',
           value: selfEvaluation?selfEvaluation:'-',
         },
-        {
-          label: '现场查核',
-          value: siteEvaluation?siteEvaluation:'-',
-        },
+        // {
+        //   label: '现场查核',
+        //   value: siteEvaluation?siteEvaluation:'-',
+        // },
         {
           label: '目标',
           value: targetEvaluation?targetEvaluation:'-',
@@ -446,6 +453,7 @@ const articleManagement = () => {
        if(tabKey==2){
              //切换为自评记录
              getSelfEvaluationRecordList(Number(currentActivedTree?.id));  //获取自评记录列表
+             getSelectableSelfScoreList();
 
        }
   },[tabKey]);

+ 15 - 19
src/pages/GradeHospitalAccreditation/ledgerUpload/model.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:46:45
- * @LastEditTime: 2021-09-29 17:13:09
+ * @LastEditTime: 2021-10-22 11:09:47
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/model.ts
@@ -14,6 +14,7 @@ import {
   selfEvolutionCommit
 } from '@/pages/GradeHospitalAccreditation/articleManagement/server';
 import { delDetailRule } from '@/pages/GradeHospitalAccreditation/accreditationDetail/service';
+import {getScoreLevelData} from '@/pages/PlatformMana/generalSetting/serve';
 
 //ledgerUpload
 const ledgerUpload = () => {
@@ -110,24 +111,19 @@ const ledgerUpload = () => {
     value&&setCurrentSelectedSelefEvolution(value);
     value&&setSelectedSelfEvolution(value);
   }
+  
+
+  const getSelectableSelfScoreList = async ()=>{
+      //获取自评可选列表
+      const resp = await getScoreLevelData();
+      const list = resp.map((t:any)=>({label:t.levelNumber,value:t.levelNumber}));
+      setTargetScores(list);
+  }
 
   useEffect(() => {
     //点击时获取对应详情
     getTableData();
-    setTargetScores([
-      {
-          label:'A',
-          value:'A'
-      },
-      {
-          label:'B',
-          value:'B'
-      },
-      {
-        label:'C',
-        value:'C'
-      }
-  ]);
+    getSelectableSelfScoreList();
   }, [currentRecord]);
 
   useEffect(() => {
@@ -144,10 +140,10 @@ const ledgerUpload = () => {
           label: '自评',
           value: selfEvaluation ? selfEvaluation : '-',
         },
-        {
-          label: '现场查核',
-          value: siteEvaluation ? siteEvaluation : '-',
-        },
+        // {
+        //   label: '现场查核',
+        //   value: siteEvaluation ? siteEvaluation : '-',
+        // },
         {
           label: '目标',
           value: targetEvaluation ? targetEvaluation : '-',

+ 2 - 1
src/pages/GradeHospitalAccreditation/ledgerUpload/server.ts

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-14 10:22:20
- * @LastEditTime: 2021-09-18 16:44:07
+ * @LastEditTime: 2021-10-22 11:04:17
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/server.ts
@@ -62,3 +62,4 @@ export const batchSettingArticle  = async (data:API.batchSettingArticleType)=>{
 
 
 
+

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

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-09-28 13:57:19
- * @LastEditTime: 2021-09-28 16:43:03
+ * @LastEditTime: 2021-10-20 14:48:41
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /MedicalWisdomCheckSys/src/pages/KeepImprove/questionGatherAndRevise/index.tsx

+ 2 - 1
src/pages/PlatformMana/roleManage/index.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-07-26 10:13:13
- * @LastEditTime: 2021-10-09 14:26:14
+ * @LastEditTime: 2021-10-22 10:39:58
  * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: /TracerMethodology_PC/src/pages/UserMana/index.js
@@ -23,6 +23,7 @@ import 'moment/locale/zh-cn';
 import locale from 'antd/es/date-picker/locale/zh_CN';
 
 import { getMenuList } from '@/pages/PlatformMana/menuManage/service';
+import './style.less';
 
 const UserMana = () => {
   const columns = [

+ 6 - 0
src/pages/PlatformMana/roleManage/style.less

@@ -0,0 +1,6 @@
+
+
+.ant-pro-table-search {
+    padding-top: 24px;
+    padding-right: 20px;
+}