liudan 2 tygodni temu
rodzic
commit
08408e0411

BIN
dist.zip


+ 13 - 8
src/assets/scss/style.scss

@@ -119,7 +119,7 @@ html{
     }
   }
   .user-header {
-    width: 4.4rem;
+    // width: 4.4rem;
     height: 4.4rem;
     border-radius: 50%;
     overflow: hidden;
@@ -143,6 +143,9 @@ html{
   .table {
     flex: 1;
     overflow: hidden;
+    .mt{
+      margin-top: 0.5rem;
+    }
     .table-content,
     .table-header {
       box-sizing: border-box;
@@ -154,8 +157,8 @@ html{
       white-space: nowrap;
       overflow: hidden;
       text-overflow: ellipsis;
-      height: 3.4rem;
-      line-height: 3.12rem;
+      height: 2.55rem;
+      line-height: 2.2rem;
       text-align: center;
       color: #fff;
       div{
@@ -166,6 +169,7 @@ html{
     .table-content {
       background-color: #f0f0f0;
       border-color: #f0f0f0;
+      text-align: left;
       color: #333;
       &.wait-list{
         text-align: left;
@@ -243,7 +247,7 @@ html{
       white-space: nowrap;
       overflow: hidden;
       text-overflow: ellipsis;
-      font-size: 1.6rem;
+      font-size: 1.3rem;
       box-sizing: border-box;
       padding: 0 4px;
       &.green{
@@ -255,12 +259,12 @@ html{
         color: #E0A11B;
       }
       &.icon{
-       flex: 0 0 1.8rem;
+       flex: 0 0 1.2rem;
        text-align: center;
       }
       &.state{
-        font-size: 1.3rem;
-        flex: 0 0 3.3rem;
+        // font-size: 1.3rem;
+        flex: 0 0 3rem;
       }
     }
   }
@@ -271,6 +275,7 @@ html{
     color: #fff;
     &.big{
       font-size: 1.5rem;
+      font-weight: 700;
       display: flex;
       padding: 0.6rem  3.5rem 0.4rem 0;
       .scroll-big{
@@ -382,7 +387,7 @@ html{
   overflow: visible;
 }
 .marqueeTop {
-  animation: marqueeTop 20s linear infinite;
+  animation: marqueeTop 40s linear infinite;
   width: 100%;
   display: inline-block;
   position: absolute;

+ 231 - 221
src/pages/bigScreen/Index.jsx

@@ -80,223 +80,230 @@ class BigScreen extends React.Component {
         locID: cache.room[0],
      }],
     }, true).then((data) => {
-      // data = {
-      //   'errorCode': 0,
-      //   'errorMessage': '成功',
-      //   'result': [
-      //     {
-      //       'locID': '2068',
-      //       'locDesc': '眼科门诊护士站',
-      //       'locENDesc': '',
-      //       'roomID': '1054',
-      //       'roomDesc': '专家诊室1',
-      //       'smallRoomDesc': '专家诊室1',
-      //       'roomENDesc': '',
-      //       'callMsg': {
-      //         'callPat': [
-      //           {
-      //             'patName': '',
-      //             'patCallNo': '',
-      //             'patCallStatus': '',
-      //             'patCallStatusDesc': ''
-      //           }
-      //         ],
-      //         'waitPat': [],
-      //         'reWaitPat': [],
-      //         'delayPat': ''
-      //       },
-      //       'delayPat': '',
-      //       'readMsg': '',
-      //       'areaID': '2068',
-      //       'docName': '王化峰',
-      //       'deviceList': [
-      //         {
-      //           'deviceID': 'BE998867F1FE62AB90EF5D698A1B7AFA3F7B6BF3'
-      //         },
-      //         {
-      //           'deviceID': '0.0.0.0'
-      //         },
-      //         {
-      //           'deviceID': '5e1af217e8d46320AA7DE4007D0836C2F370B1427C0A6D1DBBDA88B1'
-      //         }
-      //       ],
-      //       'path': '/images/wav/',
-      //       'holdNumber': '0',
-      //       'userData': {
-      //         'userID': '5802',
-      //         'userCode': '390007',
-      //         'userDesc': '王化峰',
-      //         'userENDesc': '',
-      //         'userTitleID': '6',
-      //         'userTitleDesc': '副主任医师',
-      //         'userTitleENDesc': '232',
-      //         'titleDisplay': '',
-      //         'userSexID': '1',
-      //         'userSexDesc': '男',
-      //         'userPositionID': '',
-      //         'userPositionDesc': '',
-      //         'userLanguageID': '1',
-      //         'userLanguageDesc': '简体中文',
-      //         'userEmailName': '90',
-      //         'userMobile': '13669859107',
-      //         'userDOB': '1973-05-29',
-      //         'userPswActiveDate': 9999,
-      //         'userDocFlag': 'Y',
-      //         'userNurFlag': 'N',
-      //         'userCertNo': '110441900006510',
-      //         'userSpecID': '',
-      //         'userSpecDesc': '',
-      //         'userSubSpecID': '',
-      //         'userSubSpecDesc': '',
-      //         'userSurgeon': 'N',
-      //         'userAnaesthetist': 'Y',
-      //         'userComments': '',
-      //         'userDateTo': '',
-      //         'userDateFrom': '2024-06-28',
-      //         'userActive': '有效',
-      //         'userEffective': 'Y',
-      //         'userAllowLayout': 'N',
-      //         'userAllowColumn': 'N',
-      //         'userName': '王化峰',
-      //         'userCredTypeID': '1',
-      //         'userCredTypeDesc': '居民身份证',
-      //         'userCredNo': '340202197305290058',
-      //         'userPostID': '',
-      //         'userPostDesc': '',
-      //         'userImage': '/images/photo/ff6beb5f6dbb23eeca997eca0a44df56.jpg',
-      //         'personImage': '',
-      //         'signUrl': '/images/photo/3b09d32a5eb6ba49047666063693b4bc.jpg',
-      //         'userIntroduce': '副主任医师,医学硕士\n东莞光明眼科医院门诊部主任,常平健明眼科医院业务院长,对眼科常见病和疑难病症有丰富的治疗经验,擅长眼表疾病,白内障,青光眼,眼底病,眼外伤等疾病的诊治,擅长白内障超声乳化摘除加人工晶体植入术,玻璃体视网膜手术,尤其对视网膜脱离和糖尿病视网膜病变的手术治疗有非常丰富的经验。\n中山大学中山眼科中心硕士研究生毕业,从事眼科临床工作二十余年,担任广东省医院协会眼健康管理专业委员会常委,广东省医师协会眼科分会眼底外科学组委员,广东省视光学学会眼底影像专委会委员,广东省医师协会眼科分会眼外伤学组委员。',
-      //         'insuUserCode': 'D441901014389',
-      //         'superDocFlag': 'N',
-      //         'attendDocFlag': 'N',
-      //         'optometryFlag': 'N',
-      //         'financialAuthority': 'N',
-      //         'hospDesc': '东莞常平健明眼科医院',
-      //         'organizationCode': 'H44190100519',
-      //         'businesslicense': '91441900MA4UNP4N95',
-      //         'certNo': '110441900006510',
-      //         'userLocked': 0,
-      //         'userTypeDesc': '医师/麻醉医生/',
-      //         'locCode': '',
-      //         'locDesc': '眼科门诊护士站',
-      //         'roomID': '1054',
-      //         'roomCode': '',
-      //         'roomDesc': '专家诊室1',
-      //         'userQrCode': 'https://np.h03.p0551.com/doctorpage/caf1ecdde8c9e81d321e0099ac4dde1f6ed689480130321e43ec40ad6dc82c1b60e259f5500a4deae7d3c1bd110fed012d3b72b372a69fb41b344f1762d946d8'
-      //       },
-      //       'voicenameArr': [
-      //         'zh-CN',
-      //         'zh-HK'
-      //       ],
-      //       'rate': 0
-      //     },
-      //     {
-      //       'locID': '2068',
-      //       'locDesc': '眼科门诊护士站',
-      //       'locENDesc': '',
-      //       'roomID': '1057',
-      //       'roomDesc': '专家诊室4',
-      //       'smallRoomDesc': '专家诊室4',
-      //       'roomENDesc': '',
-      //       'callMsg': {
-      //         'callPat': [
-      //           {
-      //             'patName': '',
-      //             'patCallNo': '',
-      //             'patCallStatus': '',
-      //             'patCallStatusDesc': ''
-      //           }
-      //         ],
-      //         'waitPat': [],
-      //         'reWaitPat': [],
-      //         'delayPat': ''
-      //       },
-      //       'delayPat': '',
-      //       'readMsg': '',
-      //       'areaID': '2068',
-      //       'docName': '张雪玲',
-      //       'deviceList': [
-      //         {
-      //           'deviceID': 'BE998867F1FE62AB90EF5D698A1B7AFA3F7B6BF3'
-      //         },
-      //         {
-      //           'deviceID': '5e1af217e8d46320AA7DE4007D0836C2F370B1427C0A6D1DBBDA88B1'
-      //         }
-      //       ],
-      //       'path': '/images/wav/',
-      //       'holdNumber': 1,
-      //       'userData': {
-      //         'userID': '6539',
-      //         'userCode': '340141',
-      //         'userDesc': '张雪玲',
-      //         'userENDesc': '',
-      //         'userTitleID': '5',
-      //         'userTitleDesc': '主任医师',
-      //         'userTitleENDesc': '231',
-      //         'titleDisplay': '',
-      //         'userSexID': '2',
-      //         'userSexDesc': '女',
-      //         'userPositionID': '',
-      //         'userPositionDesc': '',
-      //         'userLanguageID': '1',
-      //         'userLanguageDesc': '简体中文',
-      //         'userEmailName': '89',
-      //         'userMobile': '13669898332',
-      //         'userDOB': '1959-11-17',
-      //         'userPswActiveDate': 9999,
-      //         'userDocFlag': 'N',
-      //         'userNurFlag': 'N',
-      //         'userCertNo': '199844110420620591117004',
-      //         'userSpecID': '',
-      //         'userSpecDesc': '',
-      //         'userSubSpecID': '',
-      //         'userSubSpecDesc': '',
-      //         'userSurgeon': 'N',
-      //         'userAnaesthetist': 'N',
-      //         'userComments': '',
-      //         'userDateTo': '',
-      //         'userDateFrom': '2024-11-25',
-      //         'userActive': '有效',
-      //         'userEffective': 'Y',
-      //         'userAllowLayout': '',
-      //         'userAllowColumn': '',
-      //         'userName': '张雪玲',
-      //         'userCredTypeID': '1',
-      //         'userCredTypeDesc': '居民身份证',
-      //         'userCredNo': '420620591117004',
-      //         'userPostID': '',
-      //         'userPostDesc': '',
-      //         'userImage': '/images/photo/f46bea3ff2065c581a6c0fb22cb1ea6a.png',
-      //         'personImage': '',
-      //         'signUrl': '',
-      //         'userIntroduce': '主任医师 东莞光明眼科医院特聘专家\n擅 长:中西医结合治疗眼科常见病、多发病,尤其是对眼表疾病、白内障、青光眼、眼外伤、眼底病的诊断和治疗\n经历:曾任东莞市中医院眼耳鼻喉科主任、中心门诊部主任、东莞市医学会眼科分会委员。从事眼科临床工作四十余年,积累了丰富的临床诊疗经验。',
-      //         'insuUserCode': 'D441901008067',
-      //         'superDocFlag': 'N',
-      //         'attendDocFlag': 'N',
-      //         'optometryFlag': 'N',
-      //         'financialAuthority': 'N',
-      //         'hospDesc': '东莞光明眼科医院',
-      //         'organizationCode': '74366622544190031A5122',
-      //         'businesslicense': '74366622544190031A5122',
-      //         'certNo': '199844110420620591117004',
-      //         'userLocked': 0,
-      //         'userTypeDesc': '',
-      //         'locCode': '',
-      //         'locDesc': '眼科门诊护士站',
-      //         'roomID': '1057',
-      //         'roomCode': '',
-      //         'roomDesc': '专家诊室4',
-      //         'userQrCode': 'https://np.h03.p0551.com/doctorpage/48ec77d28e35953d627330a854ef2d62e95595f37f10fd78d1b733eb5b0add7ac637d5a4258f18be32ee1b1cca7761d85b217ccf8c120c293710c957d81da28a'
-      //       },
-      //       'voicenameArr': [
-      //         'zh-CN',
-      //         'zh-HK'
-      //       ],
-      //       'rate': 0
-      //     }
-      //   ]
-      // };
+      if (data && data.result) {
+        this.setState({
+          patList: data.result,
+          dateStr: {
+            dateNow: data.curDate, //当前日期,
+            weekNow: data.curWeekDate, // 当前日期,
+          },
+        });
+        this.initArray(data.result);
+      }
+    }).catch(() => {
+      const data = {
+        'errorCode': 0,
+        'errorMessage': '成功',
+        'result': [
+          {
+            'locID': '2068',
+            'locDesc': '眼科门诊护士站',
+            'locENDesc': '',
+            'roomID': '1054',
+            'roomDesc': '专家诊室1',
+            'smallRoomDesc': '专家诊室1',
+            'roomENDesc': '',
+            'callMsg': {
+              'callPat': [{ 'patCallNo': '1号', 'patName': '患*者' }],
+              'waitPat': [
+                { 'patCallNo': '0800 01', 'patName': '患*者', patCallType: 'V', patCallStatusDesc: '未签' },
+              ],
+              'reWaitPat': [
+                { 'patCallNo': '12', 'patName': '患*者' },
+              ],
+            },
+            'delayPat': '',
+            'readMsg': '',
+            'areaID': '2068',
+            'docName': '王化峰',
+            'deviceList': [
+              {
+                'deviceID': 'BE998867F1FE62AB90EF5D698A1B7AFA3F7B6BF3'
+              },
+              {
+                'deviceID': '0.0.0.0'
+              },
+              {
+                'deviceID': '5e1af217e8d46320AA7DE4007D0836C2F370B1427C0A6D1DBBDA88B1'
+              }
+            ],
+            'path': '/images/wav/',
+            'holdNumber': '0',
+            'userData': {
+              'userID': '5802',
+              'userCode': '390007',
+              'userDesc': '王化峰',
+              'userENDesc': '',
+              'userTitleID': '6',
+              'userTitleDesc': '副主任医师',
+              'userTitleENDesc': '232',
+              'titleDisplay': '',
+              'userSexID': '1',
+              'userSexDesc': '男',
+              'userPositionID': '',
+              'userPositionDesc': '',
+              'userLanguageID': '1',
+              'userLanguageDesc': '简体中文',
+              'userEmailName': '90',
+              'userMobile': '13669859107',
+              'userDOB': '1973-05-29',
+              'userPswActiveDate': 9999,
+              'userDocFlag': 'Y',
+              'userNurFlag': 'N',
+              'userCertNo': '110441900006510',
+              'userSpecID': '',
+              'userSpecDesc': '',
+              'userSubSpecID': '',
+              'userSubSpecDesc': '',
+              'userSurgeon': 'N',
+              'userAnaesthetist': 'Y',
+              'userComments': '',
+              'userDateTo': '',
+              'userDateFrom': '2024-06-28',
+              'userActive': '有效',
+              'userEffective': 'Y',
+              'userAllowLayout': 'N',
+              'userAllowColumn': 'N',
+              'userName': '王化峰',
+              'userCredTypeID': '1',
+              'userCredTypeDesc': '居民身份证',
+              'userCredNo': '340202197305290058',
+              'userPostID': '',
+              'userPostDesc': '',
+              'userImage': '/images/photo/ff6beb5f6dbb23eeca997eca0a44df56.jpg',
+              'personImage': '',
+              'signUrl': '/images/photo/3b09d32a5eb6ba49047666063693b4bc.jpg',
+              'userIntroduce': '副主任医师,医学硕士\n东莞光明眼科医院门诊部主任,常平健明眼科医院业务院长,对眼科常见病和疑难病症有丰富的治疗经验,擅长眼表疾病,白内障,青光眼,眼底病,眼外伤等疾病的诊治,擅长白内障超声乳化摘除加人工晶体植入术,玻璃体视网膜手术,尤其对视网膜脱离和糖尿病视网膜病变的手术治疗有非常丰富的经验。\n中山大学中山眼科中心硕士研究生毕业,从事眼科临床工作二十余年,担任广东省医院协会眼健康管理专业委员会常委,广东省医师协会眼科分会眼底外科学组委员,广东省视光学学会眼底影像专委会委员,广东省医师协会眼科分会眼外伤学组委员。',
+              'insuUserCode': 'D441901014389',
+              'superDocFlag': 'N',
+              'attendDocFlag': 'N',
+              'optometryFlag': 'N',
+              'financialAuthority': 'N',
+              'hospDesc': '东莞常平健明眼科医院',
+              'organizationCode': 'H44190100519',
+              'businesslicense': '91441900MA4UNP4N95',
+              'certNo': '110441900006510',
+              'userLocked': 0,
+              'userTypeDesc': '医师/麻醉医生/',
+              'locCode': '',
+              'locDesc': '眼科门诊护士站',
+              'roomID': '1054',
+              'roomCode': '',
+              'roomDesc': '专家诊室1',
+              'userQrCode': 'https://np.h03.p0551.com/doctorpage/caf1ecdde8c9e81d321e0099ac4dde1f6ed689480130321e43ec40ad6dc82c1b60e259f5500a4deae7d3c1bd110fed012d3b72b372a69fb41b344f1762d946d8'
+            },
+            'voicenameArr': [
+              'zh-CN',
+              'zh-HK'
+            ],
+            'rate': 0
+          },
+          {
+            'locID': '2068',
+            'locDesc': '眼科门诊护士站',
+            'locENDesc': '',
+            'roomID': '1057',
+            'roomDesc': '专家诊室4',
+            'smallRoomDesc': '专家诊室4',
+            'roomENDesc': '',
+            'callMsg': {
+              'callPat': [
+                {
+                  'patName': '',
+                  'patCallNo': '',
+                  'patCallStatus': '',
+                  'patCallStatusDesc': ''
+                }
+              ],
+              'waitPat': [],
+              'reWaitPat': [],
+              'delayPat': ''
+            },
+            'delayPat': '',
+            'readMsg': '',
+            'areaID': '2068',
+            'docName': '张雪玲',
+            'deviceList': [
+              {
+                'deviceID': 'BE998867F1FE62AB90EF5D698A1B7AFA3F7B6BF3'
+              },
+              {
+                'deviceID': '5e1af217e8d46320AA7DE4007D0836C2F370B1427C0A6D1DBBDA88B1'
+              }
+            ],
+            'path': '/images/wav/',
+            'holdNumber': 1,
+            'userData': {
+              'userID': '6539',
+              'userCode': '340141',
+              'userDesc': '张雪玲',
+              'userENDesc': '',
+              'userTitleID': '5',
+              'userTitleDesc': '主任医师',
+              'userTitleENDesc': '231',
+              'titleDisplay': '',
+              'userSexID': '2',
+              'userSexDesc': '女',
+              'userPositionID': '',
+              'userPositionDesc': '',
+              'userLanguageID': '1',
+              'userLanguageDesc': '简体中文',
+              'userEmailName': '89',
+              'userMobile': '13669898332',
+              'userDOB': '1959-11-17',
+              'userPswActiveDate': 9999,
+              'userDocFlag': 'N',
+              'userNurFlag': 'N',
+              'userCertNo': '199844110420620591117004',
+              'userSpecID': '',
+              'userSpecDesc': '',
+              'userSubSpecID': '',
+              'userSubSpecDesc': '',
+              'userSurgeon': 'N',
+              'userAnaesthetist': 'N',
+              'userComments': '',
+              'userDateTo': '',
+              'userDateFrom': '2024-11-25',
+              'userActive': '有效',
+              'userEffective': 'Y',
+              'userAllowLayout': '',
+              'userAllowColumn': '',
+              'userName': '张雪玲',
+              'userCredTypeID': '1',
+              'userCredTypeDesc': '居民身份证',
+              'userCredNo': '420620591117004',
+              'userPostID': '',
+              'userPostDesc': '',
+              'userImage': '/images/photo/f46bea3ff2065c581a6c0fb22cb1ea6a.png',
+              'personImage': '',
+              'signUrl': '',
+              'userIntroduce': '主任医师 东莞光明眼科医院特聘专家\n擅 长:中西医结合治疗眼科常见病、多发病,尤其是对眼表疾病、白内障、青光眼、眼外伤、眼底病的诊断和治疗\n经历:曾任东莞市中医院眼耳鼻喉科主任、中心门诊部主任、东莞市医学会眼科分会委员。从事眼科临床工作四十余年,积累了丰富的临床诊疗经验。',
+              'insuUserCode': 'D441901008067',
+              'superDocFlag': 'N',
+              'attendDocFlag': 'N',
+              'optometryFlag': 'N',
+              'financialAuthority': 'N',
+              'hospDesc': '东莞光明眼科医院',
+              'organizationCode': '74366622544190031A5122',
+              'businesslicense': '74366622544190031A5122',
+              'certNo': '199844110420620591117004',
+              'userLocked': 0,
+              'userTypeDesc': '',
+              'locCode': '',
+              'locDesc': '眼科门诊护士站',
+              'roomID': '1057',
+              'roomCode': '',
+              'roomDesc': '专家诊室4',
+              'userQrCode': 'https://np.h03.p0551.com/doctorpage/48ec77d28e35953d627330a854ef2d62e95595f37f10fd78d1b733eb5b0add7ac637d5a4258f18be32ee1b1cca7761d85b217ccf8c120c293710c957d81da28a'
+            },
+            'voicenameArr': [
+              'zh-CN',
+              'zh-HK'
+            ],
+            'rate': 0
+          }
+        ]
+      };
       if (data && data.result) {
         this.setState({
           patList: data.result,
@@ -357,14 +364,17 @@ class BigScreen extends React.Component {
                   <div className='swaper-header bg'>{item.roomDesc}-{item.docName || '-'} </div>
                   <div className='swaper-header red'> {item?.callMsg?.callPat?.map(v => v.patCallNo + '' + v.patName).join(('、'))}正在就诊</div>
                   <Grid columns={24} className='scroll-content' gap={-1}>
-                    <Grid.Item span={15} className='scroll-wrap'>
+                    <Grid.Item span={17} className='scroll-wrap'>
                       <div className='swaper-header bg'>候诊</div>
                       <div className='scroll-content'>
                         <ScrollTop isFast={true} text={ item?.callMsg?.waitPat }>
                           {item?.callMsg?.waitPat?.map((v, wi) => {
                             return <div className='swaper-text-wrap' key={wi}>
                               <div className='swaper-text icon'>{v.patCallType}</div>
-                              <div className='swaper-text'>{v.patCallNo}{v.patName}</div>
+                              <div className='swaper-text' >
+                                {v.patCallNo}
+                                <span style={{ fontSize: '1.62rem' }}>{v.patName}</span>
+                              </div>
                               <div className={
                                 v.patCallStatusDesc == '待诊'
                                   ? 'swaper-text state green'
@@ -376,12 +386,12 @@ class BigScreen extends React.Component {
                         </ScrollTop>
                       </div>
                     </Grid.Item >
-                    <Grid.Item span={9} className='scroll-wrap'>
+                    <Grid.Item span={7} className='scroll-wrap'>
                       <div className='swaper-header bg'>看报告</div>
                       <div className='scroll-content border'>
                         <ScrollTop text={ item?.callMsg?.reWaitPat }>
                           {item?.callMsg?.reWaitPat?.map((v, ri) => {
-                            return <div className='swaper-text' key={ri}>{v.patCallNo}{v.patName}</div>;
+                            return <div className='swaper-text' style={{fontSize: '1.4rem'}} key={ri}>{v.patCallNo}{v.patName}</div>;
                           })}
                         </ScrollTop>
                       </div>

+ 94 - 45
src/pages/doctorScreen/Index.jsx

@@ -4,7 +4,7 @@ import userImage from '@assets/images/userImage.png';
 import { Grid } from 'antd-mobile';
 import QRCode from 'qrcode';
 import ScrollTop from '@components/ScrollTop.jsx';
-
+import { Swiper } from 'antd-mobile';
 /**
  * @刘丹: 医生诊室叫号
  */
@@ -13,6 +13,8 @@ class DoctorScreen extends React.Component {
     super();
     this.state = {
       patList: [],
+      waitPat: [],
+      callPat: [],
       reWaitPat: [],
     };
   }
@@ -24,10 +26,15 @@ class DoctorScreen extends React.Component {
       this.getQrcSrc(this.props.userData?.userQrCode);
     }
     if (prev.patList != this.props.patList) {
+      this.initArray(this.props.waitPat, 'waitPat', 7);
+      this.initArray(this.props.reWaitPat, 'reWaitPat', 8);
       this.setState({
-        patList: this.props.patList,
-        reWaitPat: this.props.reWaitPat,
+        callPat: this.props.callPat,
       });
+      // this.setState({
+      //   patList: this.props.patList,
+      //   reWaitPat: this.props.reWaitPat,
+      // });
     }
   }
   // 链接转二维码链接
@@ -39,6 +46,28 @@ class DoctorScreen extends React.Component {
       document.querySelector('#qrccodeimg').src = url;
     });
   };
+  initArray = (data, key, num = 7) => {
+    const newArray = [];
+    const len = data.length;
+    if (len <= num) {
+      newArray.push(data);
+    } else {
+      for (let i = 0, j = 0; i < data.length; i++) {
+        if (i != 0 && i % num == 0) {
+          ++j;
+        }
+        if (!newArray[j]) {
+          newArray[j] = [];
+        }
+        newArray[j].push(data[i]);
+      }
+    }
+    this.setState({
+      [key]: newArray,
+    }, () => {
+      console.log(this.state[key]);
+    });
+  };
   render() {
     const { userData = {} } = this.props;
     return (
@@ -94,7 +123,7 @@ class DoctorScreen extends React.Component {
           <Grid  columns={4} gap={16}>
             <Grid.Item span={3}>
               <div className='doctor-profile'>
-                <ScrollTop text={userData.userIntroduce}  isFast={true}>
+                <ScrollTop text={userData.userIntroduce}>
                   {userData.userIntroduce  || '医生简介:暂无'}
                 </ScrollTop>
               </div>
@@ -106,73 +135,93 @@ class DoctorScreen extends React.Component {
                   id="qrccodeimg"
                 />
               </div>
-              <div className='qrccode-text'>扫码关注医师</div>
+              <div className='qrccode-text'>关注医师</div>
             </Grid.Item>
           </Grid>
         </div>
         <div style={{ flex: 1, overflow: 'hidden' }} className='mt'>
           <div style={{display: 'flex', height: '100%'}}>
-            <div style={{flex: '3', height: '100%', marginRight: '0.8rem'}}>
+            <div style={{flex: '7', height: '100%', marginRight: '0.8rem'}}>
               <div className='table section scroll-wrap'>
                 <Grid  columns={1} gap={8}>
                   <Grid.Item span={1}>
                     <div className='table-header'>候诊</div>
                   </Grid.Item>
                 </Grid>
-                {this.state.patList?.map((item, index) => {
-                  if (item.status == 'waiting') {
-                    return null;
-                  }
-                  return (<Grid  columns={3} gap={8} key={index} className='mt'>
-                    <Grid.Item span={2}>
-                      <div className='table-content'>{item.patName || '***'} { item.patCallNo }</div>
+                {this.state.callPat?.map((item, index) => {
+                  return (<Grid  columns={14} gap={8} key={index} className='mt'>
+                    <Grid.Item span={10}>
+                      <div className='table-content'> { item.patCallNo } {item.patName || '***'}</div>
                     </Grid.Item>
-                    <Grid.Item span={1}>
-                      <div className={'table-content sussess'}>诊</div>
+                    <Grid.Item span={4}>
+                      <div className={'table-content sussess'}>就诊</div>
                     </Grid.Item>
                   </Grid>);
                 })}
                 <div className="scroll-content">
-                  <ScrollTop text={this.state.patList}  isFast={true}>
-                    {this.state.patList?.map((item, index) => {
-                      if (item.status != 'waiting') {
-                        return null;
-                      }
-                      return (<Grid  columns={3} gap={8} key={index} className='mt'>
-                        <Grid.Item span={2}>
-                          <div className='table-content'>{item.patName || '***'} { item.patCallNo }</div>
-                        </Grid.Item>
-                        <Grid.Item span={1}>
-                          <div className={item.status == 'waiting' ? 'table-content waiting'      :'table-content sussess'}>
-                            {item.status == 'waiting'
-                              ? '候诊'
-                              : '正在就诊'
-                            }
-                          </div>
-                        </Grid.Item>
-                      </Grid>);
+                  <Swiper
+                    autoplay={true}
+                    direction='vertical'
+                    autoplayInterval={5000}
+                    loop={true}
+                    style={{height: '100%'}}
+                    total={this.state.waitPat.length}
+                    indicator={false}
+                    defaultIndex={1}
+                  >
+                    {this.state.waitPat.map((patlist, index) => {
+                      return <Swiper.Item key={index} style={{ height: '100%'}}>
+                        {patlist?.map((item, index) => {
+                          return (<Grid  columns={14} gap={8} key={index} className='mt'>
+                            <Grid.Item span={10}>
+                              <div className='table-content'>{ item.patCallNo } {item.patName || '***'} </div>
+                            </Grid.Item>
+                            <Grid.Item span={4}>
+                              <div className='table-content waiting'>
+                                候诊
+                              </div>
+                            </Grid.Item>
+                          </Grid>);
+                        })}
+                      </Swiper.Item>;
                     })}
-                  </ScrollTop>
+                  </Swiper>
                 </div>
               </div>
             </div>
-            <div style={{flex: '2', height: '100%'}}>
+            <div style={{flex: '3', height: '100%'}}>
             <div className='table section scroll-wrap'>
               <Grid columns={1} gap={8}>
                 <Grid.Item span={1}>
                   <div className='table-header'>看报告</div>
                 </Grid.Item>
               </Grid>
-              <div className="scroll-content">
-                <ScrollTop text={this.state.reWaitPat}  isFast={true}>
-                  {this.state.reWaitPat.map((item, index) => {
-                  return (<Grid columns={1} gap={8} key={index} className='mt'>
-                    <Grid.Item span={1}>
-                      <div className='table-content'>{item.patName || '***'} {item.patCallNo}</div>
-                    </Grid.Item>
-                  </Grid>);
-                  })}
-                </ScrollTop>
+                <div className="scroll-content">
+                <Swiper
+                    autoplay={true}
+                    autoplayInterval={5000}
+                    loop={true}
+                    direction='vertical'
+                    style={{height: '100%'}}
+                    total={this.state.reWaitPat.length}
+                    indicator={false}
+                    defaultIndex={1}
+                  >
+                    {this.state.reWaitPat.map((patlist, index) => {
+                      return <Swiper.Item key={index} style={{ height: '100%' }}>
+                         {patlist.map((item, index) => {
+                          return (<Grid columns={1} gap={8} key={index} className='mt'>
+                            <Grid.Item span={1}>
+                              <div className='table-content'> {item.patCallNo}{item.patName || '***'}</div>
+                            </Grid.Item>
+                          </Grid>);
+                          })}
+                      </Swiper.Item>;
+                    })}
+                  </Swiper>
+                <div>
+                 
+                </div>
               </div>
               </div>
             </div>

+ 38 - 18
src/pages/home/Index.jsx

@@ -40,26 +40,42 @@ class Home extends React.Component {
           {
             'callPat': [{ 'patCallNo': '11号', 'patName': '患*者' }],
             'waitPat': [
-              { 'patCallNo': '1', 'patName': '患*者1' },
-              { 'patCallNo': '2', 'patName': '患*者2' },
-              { 'patCallNo': '3', 'patName': '患*者3' },
-              { 'patCallNo': '4', 'patName': '患*者4' },
-              { 'patCallNo': '5', 'patName': '患*者5' },
-              { 'patCallNo': '6', 'patName': '患*者6' },
-              { 'patCallNo': '7', 'patName': '患*者7' },
-              { 'patCallNo': '8', 'patName': '患*者8' },
-              { 'patCallNo': '9', 'patName': '患*者9' },
-              { 'patCallNo': '10', 'patName': '患*者10' },
-              { 'patCallNo': '11', 'patName': '患*者11' },
-              { 'patCallNo': '12', 'patName': '患*者12' }],
-            'reWaitPat': [
-              { 'patCallNo': '复01', 'patName': '患*者1', patCallStatusDesc: '未签' },
-              { 'patCallNo': '复02', 'patName': '患*者2',  patCallStatusDesc: '待诊'  },
+              { 'patCallNo': '08:00 1', 'patName': '患*者1' },
+              { 'patCallNo': '08:00 2', 'patName': '患*者2' },
+              { 'patCallNo': '08:00 3', 'patName': '患*者3' },
+              { 'patCallNo': '08:00 4', 'patName': '患*者4' },
+              { 'patCallNo': '08:00 5', 'patName': '患*者5' },
+              { 'patCallNo': '08:00 6', 'patName': '患*者1' },
+              { 'patCallNo': '08:00 7', 'patName': '患*者2' },
+              { 'patCallNo': '08:00 1', 'patName': '患*者1' },
+              { 'patCallNo': '08:00 2', 'patName': '患*者2' },
+              { 'patCallNo': '08:00 3', 'patName': '患*者3' },
+              { 'patCallNo': '08:00 4', 'patName': '患*者4' },
+              { 'patCallNo': '08:00 5', 'patName': '患*者5' },
+              { 'patCallNo': '08:00 6', 'patName': '患*者1' },
+              { 'patCallNo': '08:00 7', 'patName': '患*者2' },
               { 'patCallNo': '复03', 'patName': '患者3a' },
               { 'patCallNo': '复01', 'patName': '患*者1' },
               { 'patCallNo': '复02', 'patName': '患*者2' },
               { 'patCallNo': '复03', 'patName': '患者3a' },
-              { 'patCallNo': '复04', 'patName': '患者4a' }],
+              { 'patCallNo': '复04', 'patName': '患者4a' },
+              { 'patCallNo': '10', 'patName': '患*者10' },
+              { 'patCallNo': '11', 'patName': '患*者11' },
+              { 'patCallNo': '12', 'patName': '患*者12' }
+            ],
+            'reWaitPat': [
+              { 'patCallNo': '01', 'patName': '患*者', patCallStatusDesc: '未签' },
+              { 'patCallNo': '02', 'patName': '患*者', patCallStatusDesc: '待诊' },
+              { 'patCallNo': '03', 'patName': '患者3' },
+              { 'patCallNo': '01', 'patName': '患*者' },
+              { 'patCallNo': '02', 'patName': '患*者' },
+              { 'patCallNo': '03', 'patName': '患者3' },
+              { 'patCallNo': '04', 'patName': '患者4' },
+              { 'patCallNo': '03', 'patName': '患者3' },
+              { 'patCallNo': '01', 'patName': '患*者' },
+              { 'patCallNo': '02', 'patName': '患*者' },
+              { 'patCallNo': '03', 'patName': '患者3' },
+              { 'patCallNo': '04', 'patName': '患者4' }],
           },
           delayPat: '患*者1,患*者2,患者3a,患*者1,患*者2,患者3a,患者4a,患*者1,患*者2,患者3a,患*者1,患*者2,患者3a,患者4a患*者1,患*者2,患者3a,患*者1,患*者2,患者3a,患者4a',
         },
@@ -255,7 +271,7 @@ class Home extends React.Component {
     this.initAndroidVoice();
     const test = () => {
       var start = 0;
-      setInterval(() => {
+      setTimeout(() => {
         if (start > 12) {
           return;
         }
@@ -275,6 +291,7 @@ class Home extends React.Component {
             roomDesc: data.roomDesc, // 诊室
           },
           patList,
+          callPat: data.callMsg.callPat,
           waitPat: data.callMsg.waitPat,
           reWaitPat: data.callMsg.reWaitPat,
           roomObj: data,
@@ -283,7 +300,7 @@ class Home extends React.Component {
           patListArea: newArray,
         });
         ++start;
-      }, 5000);
+      }, 1000);
     };
     //test();
   }
@@ -417,6 +434,7 @@ class Home extends React.Component {
             roomDesc: data.roomDesc, // 诊室
           },
           patList,
+          callPat: data.callMsg.callPat,
           waitPat: data.callMsg.waitPat,
           reWaitPat: data.callMsg.reWaitPat,
           roomObj: data,
@@ -496,6 +514,8 @@ class Home extends React.Component {
           ? <DoctorScreen
               userData={this.state.userData}
               patList={this.state.patList}
+              callPat={this.state.callPat}
+              waitPat={this.state.waitPat}
               reWaitPat={this.state.reWaitPat}
               hosLogo={this.state.hosLogo}
             />