Commit 4dd549ba653670b60a1d21770cfc37ded2a70fdb
1 parent
397c2fde
工单信息展示
Showing
2 changed files
with
106 additions
and
101 deletions
src/components/Common/CommonTable/index.js
| ... | ... | @@ -12460,7 +12460,7 @@ const useGetTableBtnOprSetting = props => { |
| 12460 | 12460 | // props.onMesTableLineDel && props.onMesTableLineDel(params); |
| 12461 | 12461 | const btnsConfig = |
| 12462 | 12462 | gdsconfigformslave.find( |
| 12463 | - item => item.sControlName?.toLowerCase().includes("enventofftwork") | |
| 12463 | + item => item.sControlName?.toLowerCase().includes("enventmanualofftwork") | |
| 12464 | 12464 | ) || {}; |
| 12465 | 12465 | props.parentProps.onExecInstructSet({ |
| 12466 | 12466 | btnConfig: { | ... | ... |
src/mes/common/siderInfoComponent/index.js
| ... | ... | @@ -633,110 +633,115 @@ const DeviceTargetInfoComponent = () => { |
| 633 | 633 | }; |
| 634 | 634 | }; |
| 635 | 635 | const equipmentTargetInformation = commonFunc.showLocalMessage(props, 'equipmentTargetInformation', '设备及目标信息'); |
| 636 | + const { workOrderInfoData = [] } = props; | |
| 637 | + const sColumnConfig = JSON.parse(workOrderInfoData[0]?.sColumnConfig || '[]'); | |
| 638 | + const [first] = sColumnConfig | |
| 639 | + const otherList = sColumnConfig.slice(1).filter(item => item.bVisible === 1); | |
| 640 | + const sNamesInArr2 = new Set(otherList.map(item => item.sName)); // 或 item.sname | |
| 641 | + const result = showConfig.filter(item => sNamesInArr2.has(item.sName)); // 或 item.sname | |
| 636 | 642 | return ( |
| 643 | + | |
| 637 | 644 | <div className={styles.deviceTargetInfo}> |
| 638 | - <div className="mesTitle" style={{ padding: "10px 10px 5px" }}> | |
| 639 | - <img src={iocnObj.facilityIcon} /> | |
| 640 | - {equipmentTargetInformation} | |
| 641 | - </div> | |
| 642 | - {showConfig.map((config, index) => { | |
| 643 | - | |
| 644 | - | |
| 645 | - // if (index > 4) return ""; | |
| 646 | - // bPushDiff | |
| 647 | - const { bPushDiff = false } = props?.app?.userinfo | |
| 648 | - const className = cx({ | |
| 649 | - mesShowType: true, | |
| 650 | - odd: index % 2 === 0 | |
| 651 | - }); | |
| 652 | - const showTypeProps = handleGetShowTypeProps(config); | |
| 653 | - if ( | |
| 654 | - ['dPieceDefectAQty', 'dPieceDefectBQty'].includes(config?.sName) && | |
| 655 | - !bPushDiff | |
| 656 | - ) { | |
| 657 | - return null; // 不满足条件,不渲染 | |
| 658 | - } | |
| 659 | - // 'dTotalAdjust', 'dSpeed' | |
| 660 | - if (config?.sName?.endsWith("Qty")) { | |
| 661 | - return ( | |
| 662 | - <div className={`${className} dynamicClock`}> | |
| 663 | - <div className={styles.clock}> | |
| 664 | - <ClockComponent | |
| 665 | - num={viewRow[config.sName]} | |
| 666 | - sName={config.sName} | |
| 667 | - {...props} | |
| 668 | - /> | |
| 645 | + <div className="mesTitle" style={{ padding: "10px 10px 5px" }}> | |
| 646 | + <img src={iocnObj.facilityIcon} /> | |
| 647 | + {first.showName} | |
| 648 | + </div> | |
| 649 | + {result.map((config, index) => { | |
| 650 | + // if (index > 4) return ""; | |
| 651 | + // bPushDiff | |
| 652 | + const { bPushDiff = false } = props?.app?.userinfo | |
| 653 | + const className = cx({ | |
| 654 | + mesShowType: true, | |
| 655 | + odd: index % 2 === 0 | |
| 656 | + }); | |
| 657 | + const showTypeProps = handleGetShowTypeProps(config); | |
| 658 | + // if ( | |
| 659 | + // ['dPieceDefectAQty', 'dPieceDefectBQty'].includes(config?.sName) && | |
| 660 | + // !bPushDiff | |
| 661 | + // ) { | |
| 662 | + // return null; // 不满足条件,不渲染 | |
| 663 | + // } | |
| 664 | + // 'dTotalAdjust', 'dSpeed' | |
| 665 | + if (config?.sName?.endsWith("Qty")) { | |
| 666 | + return ( | |
| 667 | + <div className={`${className} dynamicClock`}> | |
| 668 | + <div className={styles.clock}> | |
| 669 | + <ClockComponent | |
| 670 | + num={viewRow[config.sName]} | |
| 671 | + sName={config.sName} | |
| 672 | + {...props} | |
| 673 | + /> | |
| 674 | + </div> | |
| 675 | + <Row style={{ flexWrap: "nowrap" }}> | |
| 676 | + <Col flex={"160px"} className={styles.dynamicNumTitle}> | |
| 677 | + {config.showName}: | |
| 678 | + </Col> | |
| 679 | + <Col | |
| 680 | + flex={1} | |
| 681 | + className={styles.dynamicNumContent} | |
| 682 | + style={{ cursor: "not-allowed" }} | |
| 683 | + > | |
| 684 | + <div className={styles.mesDynamicNum}> | |
| 685 | + <MesDynamicNum | |
| 686 | + num={viewRow[config.sName]} | |
| 687 | + sName={config.sName} | |
| 688 | + /> | |
| 689 | + </div> | |
| 690 | + </Col> | |
| 691 | + </Row> | |
| 669 | 692 | </div> |
| 670 | - <Row style={{ flexWrap: "nowrap" }}> | |
| 671 | - <Col flex={"160px"} className={styles.dynamicNumTitle}> | |
| 672 | - {config.showName}: | |
| 673 | - </Col> | |
| 674 | - <Col | |
| 675 | - flex={1} | |
| 676 | - className={styles.dynamicNumContent} | |
| 677 | - style={{ cursor: "not-allowed" }} | |
| 678 | - > | |
| 679 | - <div className={styles.mesDynamicNum}> | |
| 680 | - <MesDynamicNum | |
| 681 | - num={viewRow[config.sName]} | |
| 682 | - sName={config.sName} | |
| 683 | - /> | |
| 684 | - </div> | |
| 685 | - </Col> | |
| 686 | - </Row> | |
| 687 | - </div> | |
| 688 | - ); | |
| 689 | - } else if (false && config.showName === "更新时间") { | |
| 690 | - return ( | |
| 691 | - <div className={`${className}`}> | |
| 692 | - <Row style={{ flexWrap: "nowrap" }}> | |
| 693 | - <Col flex={"160px"} className={styles.dynamicNumTitle}> | |
| 694 | - {config.showName}: | |
| 695 | - </Col> | |
| 696 | - <Col | |
| 697 | - flex={1} | |
| 698 | - className={styles.dynamicNumContent} | |
| 699 | - style={{ cursor: "not-allowed" }} | |
| 700 | - > | |
| 701 | - <div className={styles.mesDynamicNum}> | |
| 702 | - <CurrentTimeComponent /> | |
| 703 | - </div> | |
| 704 | - </Col> | |
| 705 | - </Row> | |
| 706 | - </div> | |
| 707 | - ); | |
| 708 | - } else if (config.showName === "设备状态") { | |
| 709 | - return ( | |
| 710 | - <div className={className}> | |
| 711 | - <ShowType {...showTypeProps} /> | |
| 712 | - <div className={styles.statusSetting}> | |
| 713 | - <Button | |
| 714 | - type="link" | |
| 715 | - size="large" | |
| 716 | - id={settingId.current} | |
| 717 | - onClick={() => { | |
| 718 | - window.deviceTargetInfoModal = true; | |
| 719 | - props.onTableBtnClick({ | |
| 720 | - name: "deviceTargetInfo", | |
| 721 | - record: viewRow, | |
| 722 | - config | |
| 723 | - }); | |
| 724 | - }} | |
| 725 | - > | |
| 726 | - 设置 | |
| 727 | - </Button> | |
| 693 | + ); | |
| 694 | + } else if (false && config.showName === "更新时间") { | |
| 695 | + return ( | |
| 696 | + <div className={`${className}`}> | |
| 697 | + <Row style={{ flexWrap: "nowrap" }}> | |
| 698 | + <Col flex={"160px"} className={styles.dynamicNumTitle}> | |
| 699 | + {config.showName}: | |
| 700 | + </Col> | |
| 701 | + <Col | |
| 702 | + flex={1} | |
| 703 | + className={styles.dynamicNumContent} | |
| 704 | + style={{ cursor: "not-allowed" }} | |
| 705 | + > | |
| 706 | + <div className={styles.mesDynamicNum}> | |
| 707 | + <CurrentTimeComponent /> | |
| 708 | + </div> | |
| 709 | + </Col> | |
| 710 | + </Row> | |
| 728 | 711 | </div> |
| 729 | - </div> | |
| 730 | - ); | |
| 731 | - } else { | |
| 732 | - return ( | |
| 733 | - <div className={className}> | |
| 734 | - <ShowType {...showTypeProps} /> | |
| 735 | - </div> | |
| 736 | - ); | |
| 737 | - } | |
| 738 | - })} | |
| 739 | - </div> | |
| 712 | + ); | |
| 713 | + } else if (config.showName === "设备状态") { | |
| 714 | + return ( | |
| 715 | + <div className={className}> | |
| 716 | + <ShowType {...showTypeProps} /> | |
| 717 | + <div className={styles.statusSetting}> | |
| 718 | + <Button | |
| 719 | + type="link" | |
| 720 | + size="large" | |
| 721 | + id={settingId.current} | |
| 722 | + onClick={() => { | |
| 723 | + window.deviceTargetInfoModal = true; | |
| 724 | + props.onTableBtnClick({ | |
| 725 | + name: "deviceTargetInfo", | |
| 726 | + record: viewRow, | |
| 727 | + config | |
| 728 | + }); | |
| 729 | + }} | |
| 730 | + > | |
| 731 | + 设置 | |
| 732 | + </Button> | |
| 733 | + </div> | |
| 734 | + </div> | |
| 735 | + ); | |
| 736 | + } else { | |
| 737 | + return ( | |
| 738 | + <div className={className}> | |
| 739 | + <ShowType {...showTypeProps} /> | |
| 740 | + </div> | |
| 741 | + ); | |
| 742 | + } | |
| 743 | + })} | |
| 744 | + </div> | |
| 740 | 745 | ); |
| 741 | 746 | }; |
| 742 | 747 | ... | ... |