Browse Source

之江项目隐藏一些 不需要显示的

zhaojijng 2 years ago
parent
commit
4fce65a85c

+ 2 - 2
src/pages/Equipment/components/deviceModal/index.jsx

@@ -231,7 +231,7 @@ export default ({ onClose, showSpace }) => {
               <div className={styles.tileline}>
                 <img src={officeImg} className={styles.titleIcon}></img>
                 <span>{showSpace.localName}</span>
-                {showSpace.isPassengerPass == true && (
+                {showSpace.isPassengerPass == true && false && (
                   <span className={styles.hasPerson}>
                     <Icon
                       className=""
@@ -241,7 +241,7 @@ export default ({ onClose, showSpace }) => {
                     有人
                   </span>
                 )}
-                {showSpace.isPassengerPass == false && (
+                {showSpace.isPassengerPass == false && false && (
                   <span className={styles.hasPerson}>
                     <Icon
                       className=""

+ 5 - 3
src/pages/Equipment/index.tsx

@@ -463,7 +463,7 @@ const Environment: React.FC = () => {
         selParamObj={selNav}
       ></TopNavigator>
       <div className={styles.maptop}>
-        {selNav.id !== 'all' && selNav.id !== 'curtain' && (
+        {selNav.id !== 'all' && selNav.id !== 'curtain' && false && (
           <div className={styles.left}>
             <span>
               <Icon
@@ -617,6 +617,7 @@ const Environment: React.FC = () => {
                     )}
                     {(selNav.id == 'airConditioner' || selNav.id == 'light') &&
                       item.isPassengerPass &&
+                      false &&
                       item.canClick && (
                         <div
                           className={mapstyles.hasPerson}
@@ -632,11 +633,12 @@ const Environment: React.FC = () => {
                           <Icon
                             className=""
                             type="youren"
-                            style={{ color: '#CE9F27', fontWeight: 'bold' ,fontSize: '9px'}}
+                            style={{ color: '#CE9F27', fontWeight: 'bold', fontSize: '9px' }}
                           ></Icon>
                         </div>
                       )}
                     {(selNav.id == 'airConditioner' || selNav.id == 'light') &&
+                      false &&
                       item.isPassengerPass == false &&
                       item.canClick && (
                         <div
@@ -653,7 +655,7 @@ const Environment: React.FC = () => {
                           <Icon
                             className=""
                             type="wuren"
-                            style={{ color: '#8B949E', fontWeight: 'bold',fontSize: '9px' }}
+                            style={{ color: '#8B949E', fontWeight: 'bold', fontSize: '9px' }}
                           ></Icon>
                         </div>
                       )}

+ 39 - 24
src/pages/Runtime/index.tsx

@@ -145,38 +145,49 @@ const Runtime: React.FC = () => {
         });
         var resList = res.content || [];
         resList.forEach((ritem) => {
-          ritem.runTimeStatus = 'normalRun'; //正常工作
+          ritem.runTimeStatus = ''; //正常工作
+          ritem.hasWorkTime = false;
           var timeList = [];
+          var allTimeArr = [];
 
           if (ritem.hasOwnProperty('workTimeStartTime')) {
-            var timeStrArr = [ritem.workTimeStartTime, ritem.workTimeEndTime];
-            timeList.push(timeStrArr);
+            // var timeStrArr = [ritem.workTimeStartTime, ritem.workTimeEndTime];
+            //timeList.push(timeStrArr);
+            ritem.hasWorkTime = true;
+            allTimeArr.push(ritem.workTimeStartTime, ritem.workTimeEndTime);
           }
           if (ritem.hasOwnProperty('meetTime')) {
             ritem.runTimeStatus = 'meetingBook'; //会议预约
             ritem.meetTime.forEach((meetitem) => {
               var timeStrArr = [meetitem.meetTimeStartTime, meetitem.meetTimeEndTime];
               timeList.push(timeStrArr);
+              allTimeArr.push(meetitem.meetTimeStartTime, meetitem.meetTimeEndTime);
             });
           }
           if (ritem.hasOwnProperty('overTime')) {
             ritem.runTimeStatus = 'overtimeWork'; //加班
-
             ritem.overTime.forEach((overitem) => {
               var timeStrArr = [overitem.overTimeStartTime, overitem.overTimeEndTime];
               timeList.push(timeStrArr);
+              allTimeArr.push(overitem.overTimeStartTime, overitem.overTimeEndTime);
             });
           }
           ritem.showTimeList = timeList;
           //console.log('timeList', timeList);
+          //   ritem.showTimeStr =
+          //     timeList.length > 0
+          //       ? timeList[0][0] +
+          //         '-' +
+          //         (timeList[timeList.length - 1][1] > timeList[0][1]
+          //           ? timeList[timeList.length - 1][1]
+          //           : timeList[0][1])
+          //       : '';
+          allTimeArr.sort((a, b) => {
+            return a - b;
+          });
+          console.log('allTimeArrallTimeArrallTimeArr', allTimeArr);
           ritem.showTimeStr =
-            timeList.length > 0
-              ? timeList[0][0] +
-                '-' +
-                (timeList[timeList.length - 1][1] > timeList[0][1]
-                  ? timeList[timeList.length - 1][1]
-                  : timeList[0][1])
-              : '';
+            allTimeArr.length > 1 ? allTimeArr[0] + '-' + allTimeArr[allTimeArr.length - 1] : '';
         });
 
         setSpaceTimeList(resList);
@@ -309,25 +320,29 @@ const Runtime: React.FC = () => {
                     {/* {(item.timeList || []).map(function (titem: string, tindex: number) {
                   return <span key={tindex + 'time'}>{titem},</span>;
                 })} */}
-                    {item.showTimeList && item.showTimeList.length > 1 && (
+                    {item.showTimeList && item.showTimeList.length > 0 && (
                       <Popover
                         content={
                           <div>
-                            <div className={styles.popTitle}>工作时间:</div>
-                            <div>
-                              {item.showTimeList[0][0]}-{item.showTimeList[0][1]}
-                            </div>
+                            {item.hasWorkTime && (
+                              <>
+                                <div className={styles.popTitle}>工作时间:</div>
+                                <div>
+                                  {item.workTimeStartTime}-{item.workTimeEndTime}
+                                </div>
+                              </>
+                            )}
                             <div className={styles.popTitle}>
                               {item.runTimeStatus == 'overtimeWork' ? '加班时间' : '会议时间'}:
                             </div>
                             {(item.showTimeList || []).map((timeItem, index) => {
-                              if (index > 0) {
-                                return (
-                                  <div key={'time' + index}>
-                                    {timeItem[0]}-{timeItem[1]}
-                                  </div>
-                                );
-                              }
+                              // if (index > 0) {
+                              return (
+                                <div key={'time' + index}>
+                                  {timeItem[0]}-{timeItem[1]}
+                                </div>
+                              );
+                              // }
                             })}
                           </div>
                         }
@@ -344,7 +359,7 @@ const Runtime: React.FC = () => {
                         </span>
                       </Popover>
                     )}
-                    {item.showTimeList && item.showTimeList.length == 1 && (
+                    {item.showTimeList && item.showTimeList.length == 0 && (
                       <span title={item.showTimeStr}>{item.showTimeStr}</span>
                     )}
                   </div>

+ 1 - 1
src/sagacare_components/map/index.tsx

@@ -372,7 +372,7 @@ const Map: React.FC<MapProps> = ({
         })}
       </div>
       <div className={mapstyles.mapControl}>
-        <div className={cx(mapstyles.controlBar)}>
+        <div className={cx(mapstyles.controlBar)} style={{ display: 'none' }}>
           <div>缩放比例:</div>
           <div>{showscale}/100</div>
         </div>