Commit 6eb9cca89aedae484108987adc39b921e2a4268c

Authored by chenxt
1 parent 7209c814

设备及目标信息根据bPushDiff展示字段

src/components/Common/CommonHooks/useCommonBase.js
@@ -2975,7 +2975,6 @@ const useCommonBase = props => { @@ -2975,7 +2975,6 @@ const useCommonBase = props => {
2975 } 2975 }
2976 2976
2977 const newData = bAddFirst ? [addRowData, ...data] : [...data, addRowData]; 2977 const newData = bAddFirst ? [addRowData, ...data] : [...data, addRowData];
2978 - console.log("🚀 ~ handleMesTableLineAdd ~ newData:", newData,masterData,state,props)  
2979 const selectedRowKeys = [newSid]; 2978 const selectedRowKeys = [newSid];
2980 const addState = {}; 2979 const addState = {};
2981 if (location.pathname.includes("indexPad")) { 2980 if (location.pathname.includes("indexPad")) {
src/mes/common/siderInfoComponent/index.js
@@ -352,8 +352,8 @@ const WorkOrderTypeComponent = () => { @@ -352,8 +352,8 @@ const WorkOrderTypeComponent = () => {
352 const [productionDivId] = useState( 352 const [productionDivId] = useState(
353 `productionDivId_${commonUtils.createSid()}` 353 `productionDivId_${commonUtils.createSid()}`
354 ); 354 );
355 - const task= commonFunc.showLocalMessage(props, 'task', '任务:工单信息');  
356 - const specialFocus= commonFunc.showLocalMessage(props, 'specialFocus', '任务:工单信息'); 355 + const task = commonFunc.showLocalMessage(props, 'task', '任务:工单信息');
  356 + const specialFocus = commonFunc.showLocalMessage(props, 'specialFocus', '任务:工单信息');
357 357
358 return ( 358 return (
359 <div className={styles.workOrdertype} ref={ref}> 359 <div className={styles.workOrdertype} ref={ref}>
@@ -404,7 +404,7 @@ const WorkOrderTypeComponent = () =&gt; { @@ -404,7 +404,7 @@ const WorkOrderTypeComponent = () =&gt; {
404 const { sProcessName, sState } = item; 404 const { sProcessName, sState } = item;
405 let colorValue; 405 let colorValue;
406 switch ( 406 switch (
407 - Number(sState) // 根据状态显示颜色 407 + Number(sState) // 根据状态显示颜色
408 ) { 408 ) {
409 case 2: 409 case 2:
410 colorValue = "#FF7E37"; /* 2:等待:黄色 */ 410 colorValue = "#FF7E37"; /* 2:等待:黄色 */
@@ -501,12 +501,12 @@ const WorkOrderTypeComponent = () =&gt; { @@ -501,12 +501,12 @@ const WorkOrderTypeComponent = () =&gt; {
501 > 501 >
502 {viewRow.specialMemo 502 {viewRow.specialMemo
503 ? viewRow.specialMemo 503 ? viewRow.specialMemo
504 - .split(",")  
505 - .map(item => (  
506 - <div className={styles.mesSpecial}>  
507 - {item}  
508 - </div>  
509 - )) 504 + .split(",")
  505 + .map(item => (
  506 + <div className={styles.mesSpecial}>
  507 + {item}
  508 + </div>
  509 + ))
510 : ""} 510 : ""}
511 </Col> 511 </Col>
512 </Row> 512 </Row>
@@ -533,11 +533,10 @@ const WorkOrderTypeComponent = () =&gt; { @@ -533,11 +533,10 @@ const WorkOrderTypeComponent = () =&gt; {
533 style={{ cursor: "not-allowed", gap: 5 }} 533 style={{ cursor: "not-allowed", gap: 5 }}
534 > 534 >
535 <span 535 <span
536 - className={`noInput ${  
537 - viewRow.sLabelColor  
538 - ? styles[`mesColor${colorIndex}`]  
539 - : ""  
540 - }`} 536 + className={`noInput ${viewRow.sLabelColor
  537 + ? styles[`mesColor${colorIndex}`]
  538 + : ""
  539 + }`}
541 > 540 >
542 <span>{viewRow.sLabelColor}</span> 541 <span>{viewRow.sLabelColor}</span>
543 </span> 542 </span>
@@ -634,7 +633,6 @@ const DeviceTargetInfoComponent = () =&gt; { @@ -634,7 +633,6 @@ const DeviceTargetInfoComponent = () =&gt; {
634 }; 633 };
635 }; 634 };
636 const equipmentTargetInformation = commonFunc.showLocalMessage(props, 'equipmentTargetInformation', '设备及目标信息'); 635 const equipmentTargetInformation = commonFunc.showLocalMessage(props, 'equipmentTargetInformation', '设备及目标信息');
637 -  
638 return ( 636 return (
639 <div className={styles.deviceTargetInfo}> 637 <div className={styles.deviceTargetInfo}>
640 <div className="mesTitle" style={{ padding: "10px 10px 5px" }}> 638 <div className="mesTitle" style={{ padding: "10px 10px 5px" }}>
@@ -642,13 +640,20 @@ const DeviceTargetInfoComponent = () =&gt; { @@ -642,13 +640,20 @@ const DeviceTargetInfoComponent = () =&gt; {
642 {equipmentTargetInformation} 640 {equipmentTargetInformation}
643 </div> 641 </div>
644 {showConfig.map((config, index) => { 642 {showConfig.map((config, index) => {
645 - if (index > 4) return ""; 643 + // if (index > 4) return "";
  644 + // bPushDiff
  645 + const { bPushDiff = false } = props?.app?.userinfo
646 const className = cx({ 646 const className = cx({
647 mesShowType: true, 647 mesShowType: true,
648 odd: index % 2 === 0 648 odd: index % 2 === 0
649 }); 649 });
650 const showTypeProps = handleGetShowTypeProps(config); 650 const showTypeProps = handleGetShowTypeProps(config);
651 - 651 + if (index > 4 && !bPushDiff) {
  652 + return ''
  653 + }
  654 + if (index > 4 && bPushDiff && !['dPieceDefectBQty', 'dPieceDefectAQty'].includes(config?.sName)) {
  655 + return ''
  656 + }
652 if (config?.sName?.endsWith("Qty")) { 657 if (config?.sName?.endsWith("Qty")) {
653 return ( 658 return (
654 <div className={`${className} dynamicClock`}> 659 <div className={`${className} dynamicClock`}>
@@ -754,7 +759,7 @@ const TeamInfoComponent = () =&gt; { @@ -754,7 +759,7 @@ const TeamInfoComponent = () =&gt; {
754 const teamShiftInfo = props.teamShiftInfoData?.[0] || {}; 759 const teamShiftInfo = props.teamShiftInfoData?.[0] || {};
755 const { sEmployeeName = "", sEmployeeNo = "" } = teamShiftInfo; 760 const { sEmployeeName = "", sEmployeeNo = "" } = teamShiftInfo;
756 761
757 - const teamInformation= commonFunc.showLocalMessage(props, 'teamInformation', '班组信息'); 762 + const teamInformation = commonFunc.showLocalMessage(props, 'teamInformation', '班组信息');
758 763
759 const captain = commonFunc.showLocalMessage(props, 'captain', '机长'); 764 const captain = commonFunc.showLocalMessage(props, 'captain', '机长');
760 765
src/mes/common/siderInfoComponent/index.less
@@ -218,7 +218,8 @@ @@ -218,7 +218,8 @@
218 // 设备及目标信息 218 // 设备及目标信息
219 .deviceTargetInfo { 219 .deviceTargetInfo {
220 // .size(100%, 25%); 220 // .size(100%, 25%);
221 - .size(100%, 230px); 221 + .size(100%);
  222 + max-height: 330px;
222 // margin-bottom: 15px; 223 // margin-bottom: 15px;
223 background-color: #FFF6DE; 224 background-color: #FFF6DE;
224 225
src/utils/config.js
@@ -6,7 +6,7 @@ export const webSite = { @@ -6,7 +6,7 @@ export const webSite = {
6 // faceAddress: isDev ? '//192.168.11.22:8080/xlyFace' : '//' + location.host + '/xlyFace', 6 // faceAddress: isDev ? '//192.168.11.22:8080/xlyFace' : '//' + location.host + '/xlyFace',
7 fileAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyReport/' : '//' + location.host + '/xlyReport/', // 接口地址 7 fileAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyReport/' : '//' + location.host + '/xlyReport/', // 接口地址
8 faceAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyFace' : '//' + location.host + '/xlyFace', 8 faceAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyFace' : '//' + location.host + '/xlyFace',
9 - ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:47400/xlyEntry/' : '//' + location.host + '/xlyEntry/', 9 + ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:43920/xlyEntry/' : '//' + location.host + '/xlyEntry/',
10 interfaceAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址 10 interfaceAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址
11 // ipAddress: isDev ? '//ebc.jinjia.com:8091/xlyEntry/' : '//' + location.host + '/xlyEntry/', 11 // ipAddress: isDev ? '//ebc.jinjia.com:8091/xlyEntry/' : '//' + location.host + '/xlyEntry/',
12 // interfaceAddress: isDev ? '//ebc.jinjia.com:8091/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址 12 // interfaceAddress: isDev ? '//ebc.jinjia.com:8091/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址