Commit 37b067c40bdffba70d5a22aae2a7f046fcc534c3

Authored by chenxt
2 parents 6101d36b b19ac532

Merge branch 'release/customer/2025/五彩' of http://git.xlyprint.cn/qiangmj/ebc-Me…

…s into release/customer/2025/五彩
src/mes/teamInfo/index.js
@@ -482,7 +482,7 @@ const TeamInfo = baseProps => { @@ -482,7 +482,7 @@ const TeamInfo = baseProps => {
482 } 482 }
483 }; 483 };
484 484
485 - const { sForemanName = "", sIpqcName = "", sEmployeeName = "" } = 485 + const { bManual, sForemanName = "", sIpqcName = "", sEmployeeName = "" } =
486 props.slaveData && props.slaveData.length !== 0 ? props.slaveData[0] : {}; 486 props.slaveData && props.slaveData.length !== 0 ? props.slaveData[0] : {};
487 const { sTeamEmployeeNo = "" } = props.slave0Data?.[0] || {}; 487 const { sTeamEmployeeNo = "" } = props.slave0Data?.[0] || {};
488 488
@@ -499,75 +499,148 @@ const TeamInfo = baseProps => { @@ -499,75 +499,148 @@ const TeamInfo = baseProps => {
499 ...props, 499 ...props,
500 sName: "slave0" 500 sName: "slave0"
501 }; 501 };
502 - 502 + const tableHeight = bManual ? "calc(88vh - 80px)" : "calc(25vh - 80px)";
503 return ( 503 return (
504 <div className={styles.teamInfo}> 504 <div className={styles.teamInfo}>
505 - <div className="teamPost">  
506 - <div className="teamInfo">  
507 - <h2>  
508 - <img src={teaIcon} />  
509 - 班组信息  
510 - </h2>  
511 - <div className="userWorkBox">  
512 - <div className="workTop">  
513 - {props.app.userinfo.sJzPicturePath ? (  
514 - <img  
515 - src={`${commonConfig.file_host}file/download?savePathStr=${props.app.userinfo.sJzPicturePath}&sModelsId=100&token=${props.token}`}  
516 - onError={event => {  
517 - event.target.src = userImgs;  
518 - }}  
519 - />  
520 - ) : (  
521 - <img src={userImgs} />  
522 - )}  
523 - <ul>  
524 - <li>  
525 - <label>机长</label>  
526 - <span>{sEmployeeName}</span>  
527 - </li>  
528 - <li>  
529 - <label>班组</label>  
530 - <span>{props.app.userinfo?.sTeamNo}</span>  
531 - </li>  
532 - <li>  
533 - <label>班次</label>  
534 - <span>  
535 - {props.app.userinfo?.sShift == "1"  
536 - ? "白班"  
537 - : props.app.userinfo?.sShift == "2"  
538 - ? "夜班"  
539 - : ""}  
540 - </span>  
541 - </li>  
542 - </ul> 505 + {bManual ? (
  506 + // bManual = true 时的布局:左右结构
  507 + <div className="teamInfoManual">
  508 + <div className="teamInfoLeft">
  509 + <div className="teamInfoTop">
  510 + <h2>
  511 + <img src={teaIcon} />
  512 + 班组信息
  513 + </h2>
  514 + <div className="userWorkBox">
  515 + <div className="workTop">
  516 + {props.app.userinfo.sJzPicturePath ? (
  517 + <img
  518 + src={`${commonConfig.file_host}file/download?savePathStr=${props.app.userinfo.sJzPicturePath}&sModelsId=100&token=${props.token}`}
  519 + onError={event => {
  520 + event.target.src = userImgs;
  521 + }}
  522 + />
  523 + ) : (
  524 + <img src={userImgs} />
  525 + )}
  526 + <ul>
  527 + <li>
  528 + <label>机长</label>
  529 + <span>{sEmployeeName}</span>
  530 + </li>
  531 + <li>
  532 + <label>班组</label>
  533 + <span>{props.app.userinfo?.sTeamNo}</span>
  534 + </li>
  535 + <li>
  536 + <label>班次</label>
  537 + <span>
  538 + {props.app.userinfo?.sShift == "1"
  539 + ? "白班"
  540 + : props.app.userinfo?.sShift == "2"
  541 + ? "夜班"
  542 + : ""}
  543 + </span>
  544 + </li>
  545 + </ul>
  546 + </div>
  547 + <ul>
  548 + <li>
  549 + <label>{foremanConfig.showName}</label>
  550 + <span>{sForemanName}</span>
  551 + </li>
  552 + <li>
  553 + <label>
  554 + {props.app.userinfo?.iInterface == 10
  555 + ? "OQC/姓名"
  556 + : ipqcConfig.showName}
  557 + </label>
  558 + <span>{sIpqcName}</span>
  559 + </li>
  560 + </ul>
  561 + </div>
  562 + </div>
  563 + <div className="teamInfoLeftdiv">
  564 + <TeamJoinInfo {...props} />
  565 + </div>
  566 + </div>
  567 + <div className="teamInfoRight">
  568 + <div className="postList">
  569 + <Spin spinning={props.loadings} delay={500}>
  570 + <StaticEditTable {...tableProps } fixedHeight={tableHeight} />
  571 + <CommonOperationBarComponent {...operationBarProps} />
  572 + </Spin>
543 </div> 573 </div>
544 - <ul>  
545 - <li>  
546 - <label>{foremanConfig.showName}</label>  
547 - <span>{sForemanName}</span>  
548 - </li>  
549 - <li>  
550 - <label>  
551 - {props.app.userinfo?.iInterface == 10  
552 - ? "OQC/姓名"  
553 - : ipqcConfig.showName}  
554 - </label>  
555 - <span>{sIpqcName}</span>  
556 - </li>  
557 - </ul>  
558 </div> 574 </div>
559 </div> 575 </div>
560 - <div className="postList">  
561 - <Spin spinning={props.loadings} delay={500}>  
562 - <StaticEditTable {...tableProps} />  
563 - {/*<Button type="primary" size="large" onClick={handleModalConfirm}>*/}  
564 - {/* {bDelayedOvertime ? "取消延迟加班" : "延迟加班"}*/}  
565 - {/*</Button>*/}  
566 - <CommonOperationBarComponent {...operationBarProps} />  
567 - </Spin>  
568 - </div>  
569 - </div>  
570 - <TeamJoinInfo {...props} /> 576 + ) : (
  577 + // bManual = false 时的布局:维持原样
  578 + <>
  579 + <div className="teamPost">
  580 + <div className="teamInfo">
  581 + <h2>
  582 + <img src={teaIcon} />
  583 + 班组信息
  584 + </h2>
  585 + <div className="userWorkBox">
  586 + <div className="workTop">
  587 + {props.app.userinfo.sJzPicturePath ? (
  588 + <img
  589 + src={`${commonConfig.file_host}file/download?savePathStr=${props.app.userinfo.sJzPicturePath}&sModelsId=100&token=${props.token}`}
  590 + onError={event => {
  591 + event.target.src = userImgs;
  592 + }}
  593 + />
  594 + ) : (
  595 + <img src={userImgs} />
  596 + )}
  597 + <ul>
  598 + <li>
  599 + <label>机长</label>
  600 + <span>{sEmployeeName}</span>
  601 + </li>
  602 + <li>
  603 + <label>班组</label>
  604 + <span>{props.app.userinfo?.sTeamNo}</span>
  605 + </li>
  606 + <li>
  607 + <label>班次</label>
  608 + <span>
  609 + {props.app.userinfo?.sShift == "1"
  610 + ? "白班"
  611 + : props.app.userinfo?.sShift == "2"
  612 + ? "夜班"
  613 + : ""}
  614 + </span>
  615 + </li>
  616 + </ul>
  617 + </div>
  618 + <ul>
  619 + <li>
  620 + <label>{foremanConfig.showName}</label>
  621 + <span>{sForemanName}</span>
  622 + </li>
  623 + <li>
  624 + <label>
  625 + {props.app.userinfo?.iInterface == 10
  626 + ? "OQC/姓名"
  627 + : ipqcConfig.showName}
  628 + </label>
  629 + <span>{sIpqcName}</span>
  630 + </li>
  631 + </ul>
  632 + </div>
  633 + </div>
  634 + <div className="postList">
  635 + <Spin spinning={props.loadings} delay={500}>
  636 + <StaticEditTable {...tableProps} />
  637 + <CommonOperationBarComponent {...operationBarProps} />
  638 + </Spin>
  639 + </div>
  640 + </div>
  641 + <TeamJoinInfo {...props} />
  642 + </>
  643 + )}
571 644
572 {/* 刷脸 */} 645 {/* 刷脸 */}
573 <FaceLoginModal {...faceProps} /> 646 <FaceLoginModal {...faceProps} />
@@ -615,7 +688,7 @@ const FaceLoginModal = props =&gt; { @@ -615,7 +688,7 @@ const FaceLoginModal = props =&gt; {
615 }; 688 };
616 689
617 const TeamJoinInfo = props => { 690 const TeamJoinInfo = props => {
618 - const { slave1Config, slave1Data } = props; 691 + const { slave1Config, slave1Data, bManual } = props;
619 692
620 const joinInfoData = commonUtils.filteredArr( 693 const joinInfoData = commonUtils.filteredArr(
621 slave1Config?.gdsconfigformslave.map(e => { 694 slave1Config?.gdsconfigformslave.map(e => {
@@ -673,28 +746,45 @@ const TeamJoinInfo = props =&gt; { @@ -673,28 +746,45 @@ const TeamJoinInfo = props =&gt; {
673 </h2> 746 </h2>
674 </Row> 747 </Row>
675 <Row className="teamInfoBox"> 748 <Row className="teamInfoBox">
676 - <Col span={6} className="teamInfoLeft">  
677 - {joinInfoData?.map((item, i) => (  
678 - <div key={i} className="infoBox">  
679 - <h2>{item.showName}</h2>  
680 - <div className="infoBorBox">  
681 - {slave1Data.length > 0 ? slave1Data[0][item.sName] : ""}  
682 - </div>  
683 - </div>  
684 - ))}  
685 - </Col>  
686 - <Col span={18} className="teamInfoRight">  
687 - {joinInfoTableData?.map((item, i) => (  
688 - <div key={i} className="infoBox">  
689 - <h2>{item.showName}</h2>  
690 - <div className="infoBorBox">  
691 - <Spin spinning={props.loadings} delay={500}>  
692 - <StaticEditTable {...tableProps(item.tableName)} />  
693 - </Spin> 749 + {bManual ? (
  750 + // bManual = true 时的布局:teamInfoLeft占据整个宽度
  751 + <Col span={24} className="teamInfoLeft">
  752 + {joinInfoData?.map((item, i) => (
  753 + <div key={i} className="infoBox">
  754 + <h2>{item.showName}</h2>
  755 + <div className="infoBorBox">
  756 + {slave1Data.length > 0 ? slave1Data[0][item.sName] : ""}
  757 + </div>
694 </div> 758 </div>
695 - </div>  
696 - ))}  
697 - </Col> 759 + ))}
  760 + </Col>
  761 + ) : (
  762 + // bManual = false 时的布局:维持原有左右布局
  763 + <>
  764 + <Col span={6} className="teamInfoLeft">
  765 + {joinInfoData?.map((item, i) => (
  766 + <div key={i} className="infoBox">
  767 + <h2>{item.showName}</h2>
  768 + <div className="infoBorBox">
  769 + {slave1Data.length > 0 ? slave1Data[0][item.sName] : ""}
  770 + </div>
  771 + </div>
  772 + ))}
  773 + </Col>
  774 + <Col span={18} className="teamInfoRight">
  775 + {joinInfoTableData?.map((item, i) => (
  776 + <div key={i} className="infoBox">
  777 + <h2>{item.showName}</h2>
  778 + <div className="infoBorBox">
  779 + <Spin spinning={props.loadings} delay={500}>
  780 + <StaticEditTable {...tableProps(item.tableName)} />
  781 + </Spin>
  782 + </div>
  783 + </div>
  784 + ))}
  785 + </Col>
  786 + </>
  787 + )}
698 </Row> 788 </Row>
699 {/* <Row className="teamFoot"> 789 {/* <Row className="teamFoot">
700 <Col span={24} className='teamBtn'> 790 <Col span={24} className='teamBtn'>
src/mes/teamInfo/index.less
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 * @Author: Sakura 2 * @Author: Sakura
3 * @LastEditors: Sakura 3 * @LastEditors: Sakura
4 * @Date: 2023-12-06 08:38:22 4 * @Date: 2023-12-06 08:38:22
5 - * @Description: 5 + * @Description:
6 */ 6 */
7 @import "~@/mixins.less"; 7 @import "~@/mixins.less";
8 8
@@ -34,21 +34,188 @@ @@ -34,21 +34,188 @@
34 .teamInfo { 34 .teamInfo {
35 .size(); 35 .size();
36 36
37 - // background: url(./assets/temp.jpg) no-repeat;  
38 - // background-size: 100% 100%;  
39 - // background-color: #fff; 37 + // bManual = true 时的布局样式
40 :global { 38 :global {
  39 + .teamInfoManual {
  40 + display: flex;
  41 + gap: 15px;
  42 + height: 100%;
  43 +
  44 + .teamInfoLeft {
  45 + width: 40%;
  46 + display: flex;
  47 + flex-direction: column;
  48 + gap: 10px;
  49 +
  50 + .teamInfoTop {
  51 + background-color: #fff;
  52 + padding: 10px;
  53 + border-radius: 5px;
  54 + box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05);
  55 + height: 30%;
  56 +
  57 + h2 {
  58 + font-weight: 600;
  59 + font-size: 18px;
  60 + color: #1890ff;
  61 + .flex(center);
  62 + gap: 8px;
  63 +
  64 + img {
  65 + width: 24px;
  66 + }
  67 + }
  68 +
  69 + .userWorkBox {
  70 + height: calc(100% - 37px);
  71 + display: flex;
  72 + gap: 10px;
  73 + flex-direction: column;
  74 + text-wrap: nowrap;
  75 +
  76 + .workTop {
  77 + display: flex;
  78 + background: #f2f2f2;
  79 + gap: 20px;
  80 + height: 70%;
  81 +
  82 + ul {
  83 + width: calc(65% - 10px);
  84 + display: flex;
  85 + flex-direction: column;
  86 + justify-content: space-evenly;
  87 + font-size: 1.3em;
  88 + padding: 15px 0;
  89 + list-style: none;
  90 + }
  91 + }
41 92
  93 + img {
  94 + width: 35%;
  95 + background: #cccccc;
  96 + }
  97 +
  98 + & > ul {
  99 + height: 30%;
  100 + background: #f2f2f2;
  101 + padding: 10px 20px;
  102 + font-size: 1.3em;
  103 +
  104 + display: flex;
  105 + flex-direction: column;
  106 + justify-content: center;
  107 + align-items: flex-start;
  108 +
  109 + li {
  110 + width: 100%;
  111 + display: flex;
  112 + align-items: center;
  113 + }
  114 +
  115 + label {
  116 + width: 115px;
  117 + display: block;
  118 + text-align: end;
  119 + }
  120 + }
42 121
  122 + label {
  123 + font-weight: 600;
  124 +
  125 + &::after {
  126 + content: ":";
  127 + margin: 0 4px;
  128 + margin-right: 6px;
  129 + }
  130 + }
  131 + }
  132 + }
  133 +
  134 +
  135 + .teamInfoLeftdiv {
  136 + flex: 1;
  137 + background-color: #fff;
  138 + border-radius: 5px;
  139 + box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05);
  140 + overflow: hidden;
  141 +
  142 + .joinInfo{
  143 + height: 90%;
  144 + }
  145 +
  146 + // 添加infoBox样式
  147 + .infoBox {
  148 + padding: 10px;
  149 + height: calc(100% / 3); // 三个infoBox均等高度
  150 + background-color: #fff;
  151 + border-bottom: 1px solid #f0f0f0;
  152 +
  153 + &:last-child {
  154 + border-bottom: none;
  155 + }
  156 +
  157 + h2 {
  158 + font-weight: 600;
  159 + font-size: 16px;
  160 + color: #333;
  161 + margin-bottom: 8px;
  162 + .flex(center);
  163 + gap: 8px;
  164 +
  165 + img {
  166 + width: 18px;
  167 + }
  168 + }
  169 +
  170 + .infoBorBox {
  171 + height: calc(100% - 32px);
  172 + background-color: #f2f2f2;
  173 + padding: 8px;
  174 + border-radius: 4px;
  175 + overflow: auto;
  176 + }
  177 + }
  178 + }
  179 + }
  180 +
  181 +
  182 + .teamInfoRight {
  183 + width: 60%;
  184 +
  185 + .postList {
  186 + height: 100%;
  187 + background-color: #fff;
  188 + padding: 10px;
  189 + border-radius: 5px;
  190 + box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05);
  191 +
  192 + .ant-table.ant-table-bordered > .ant-table-container {
  193 + border-left: 1px solid #aaa;
  194 + border-bottom: 1px solid #aaa;
  195 + border-right: 1px solid #aaa;
  196 + }
  197 +
  198 + .ant-btn {
  199 + width: 90px;
  200 + height: 36px;
  201 + border-radius: 5px;
  202 + }
  203 + }
  204 + }
  205 + }
  206 + }
  207 +
  208 + // bManual = false 时的布局样式(维持原样)
  209 + :global {
43 .teamPost { 210 .teamPost {
44 background-color: #fff; 211 background-color: #fff;
45 padding: 10px; 212 padding: 10px;
46 border-radius: 5px; 213 border-radius: 5px;
47 box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05); 214 box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05);
48 215
49 - .ant-table.ant-table-bordered>.ant-table-container {  
50 - border-left: 1px solid #AAA;  
51 - border-bottom: 1px solid #AAA; 216 + .ant-table.ant-table-bordered > .ant-table-container {
  217 + border-left: 1px solid #aaa;
  218 + border-bottom: 1px solid #aaa;
52 border-right: 1px solid #aaa; 219 border-right: 1px solid #aaa;
53 } 220 }
54 } 221 }
@@ -120,7 +287,7 @@ @@ -120,7 +287,7 @@
120 background: #cccccc; 287 background: #cccccc;
121 } 288 }
122 289
123 - &>ul { 290 + & > ul {
124 height: 30%; 291 height: 30%;
125 background: #f2f2f2; 292 background: #f2f2f2;
126 padding: 10px 20px; 293 padding: 10px 20px;
@@ -182,7 +349,7 @@ @@ -182,7 +349,7 @@
182 height: 45px; 349 height: 45px;
183 padding: 10px; 350 padding: 10px;
184 background: #fff; 351 background: #fff;
185 - border-bottom: 1px solid #AAAAAA; 352 + border-bottom: 1px solid #aaaaaa;
186 position: relative; 353 position: relative;
187 354
188 .ant-btn { 355 .ant-btn {
@@ -220,18 +387,16 @@ @@ -220,18 +387,16 @@
220 387
221 // margin-top: 15px; 388 // margin-top: 15px;
222 .infoBox { 389 .infoBox {
223 -  
224 // margin-top: 15px; 390 // margin-top: 15px;
225 &:first-child { 391 &:first-child {
226 margin-top: 0; 392 margin-top: 0;
227 } 393 }
228 } 394 }
229 -  
230 } 395 }
231 } 396 }
232 397
233 .teamFoot { 398 .teamFoot {
234 - border-top: 1px solid #AAAAAA; 399 + border-top: 1px solid #aaaaaa;
235 height: 60px; 400 height: 60px;
236 padding: 10px; 401 padding: 10px;
237 402
@@ -241,4 +406,4 @@ @@ -241,4 +406,4 @@
241 } 406 }
242 } 407 }
243 } 408 }
244 -}  
245 \ No newline at end of file 409 \ No newline at end of file
  410 +}