From 779666f80dbf61f742b56b0f74ad7963b84937b3 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Fri, 19 Dec 2025 14:40:28 +0800 Subject: [PATCH] 1.当设备是手工的时候,班组信息的界面布局调整为左右列呈现 --- src/mes/teamInfo/index.js | 264 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------- src/mes/teamInfo/index.less | 191 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 355 insertions(+), 100 deletions(-) diff --git a/src/mes/teamInfo/index.js b/src/mes/teamInfo/index.js index ccfc274..87fed43 100644 --- a/src/mes/teamInfo/index.js +++ b/src/mes/teamInfo/index.js @@ -482,7 +482,7 @@ const TeamInfo = baseProps => { } }; - const { sForemanName = "", sIpqcName = "", sEmployeeName = "" } = + const { bManual, sForemanName = "", sIpqcName = "", sEmployeeName = "" } = props.slaveData && props.slaveData.length !== 0 ? props.slaveData[0] : {}; const { sTeamEmployeeNo = "" } = props.slave0Data?.[0] || {}; @@ -500,75 +500,148 @@ const TeamInfo = baseProps => { ...props, sName: "slave0" }; - + const tableHeight = bManual ? "calc(88vh - 80px)" : "calc(25vh - 80px)"; return (
-
-
-

- - 班组信息 -

-
-
- {props.app.userinfo.sJzPicturePath ? ( - { - event.target.src = userImgs; - }} - /> - ) : ( - - )} -
    -
  • - - {sEmployeeName} -
  • -
  • - - {props.app.userinfo?.sTeamNo} -
  • -
  • - - - {props.app.userinfo?.sShift == "1" - ? "白班" - : props.app.userinfo?.sShift == "2" - ? "夜班" - : ""} - -
  • -
+ {bManual ? ( + // bManual = true 时的布局:左右结构 +
+
+
+

+ + 班组信息 +

+
+
+ {props.app.userinfo.sJzPicturePath ? ( + { + event.target.src = userImgs; + }} + /> + ) : ( + + )} +
    +
  • + + {sEmployeeName} +
  • +
  • + + {props.app.userinfo?.sTeamNo} +
  • +
  • + + + {props.app.userinfo?.sShift == "1" + ? "白班" + : props.app.userinfo?.sShift == "2" + ? "夜班" + : ""} + +
  • +
+
+
    +
  • + + {sForemanName} +
  • +
  • + + {sIpqcName} +
  • +
+
+
+
+ +
+
+
+
+ + + +
-
    -
  • - - {sForemanName} -
  • -
  • - - {sIpqcName} -
  • -
-
- - - {/**/} - - -
-
- + ) : ( + // bManual = false 时的布局:维持原样 + <> +
+
+

+ + 班组信息 +

+
+
+ {props.app.userinfo.sJzPicturePath ? ( + { + event.target.src = userImgs; + }} + /> + ) : ( + + )} +
    +
  • + + {sEmployeeName} +
  • +
  • + + {props.app.userinfo?.sTeamNo} +
  • +
  • + + + {props.app.userinfo?.sShift == "1" + ? "白班" + : props.app.userinfo?.sShift == "2" + ? "夜班" + : ""} + +
  • +
+
+
    +
  • + + {sForemanName} +
  • +
  • + + {sIpqcName} +
  • +
+
+
+
+ + + + +
+
+ + + )} {/* 刷脸 */} @@ -616,7 +689,7 @@ const FaceLoginModal = props => { }; const TeamJoinInfo = props => { - const { slave1Config, slave1Data } = props; + const { slave1Config, slave1Data, bManual } = props; const joinInfoData = commonUtils.filteredArr( slave1Config?.gdsconfigformslave.map(e => { @@ -674,28 +747,45 @@ const TeamJoinInfo = props => { - - {joinInfoData?.map((item, i) => ( -
-

{item.showName}

-
- {slave1Data.length > 0 ? slave1Data[0][item.sName] : ""} -
-
- ))} - - - {joinInfoTableData?.map((item, i) => ( -
-

{item.showName}

-
- - - + {bManual ? ( + // bManual = true 时的布局:teamInfoLeft占据整个宽度 + + {joinInfoData?.map((item, i) => ( +
+

{item.showName}

+
+ {slave1Data.length > 0 ? slave1Data[0][item.sName] : ""} +
-
- ))} - + ))} + + ) : ( + // bManual = false 时的布局:维持原有左右布局 + <> + + {joinInfoData?.map((item, i) => ( +
+

{item.showName}

+
+ {slave1Data.length > 0 ? slave1Data[0][item.sName] : ""} +
+
+ ))} + + + {joinInfoTableData?.map((item, i) => ( +
+

{item.showName}

+
+ + + +
+
+ ))} + + + )} {/* diff --git a/src/mes/teamInfo/index.less b/src/mes/teamInfo/index.less index 49d665a..92e5839 100644 --- a/src/mes/teamInfo/index.less +++ b/src/mes/teamInfo/index.less @@ -2,7 +2,7 @@ * @Author: Sakura * @LastEditors: Sakura * @Date: 2023-12-06 08:38:22 - * @Description: + * @Description: */ @import "~@/mixins.less"; @@ -34,21 +34,188 @@ .teamInfo { .size(); - // background: url(./assets/temp.jpg) no-repeat; - // background-size: 100% 100%; - // background-color: #fff; + // bManual = true 时的布局样式 :global { + .teamInfoManual { + display: flex; + gap: 15px; + height: 100%; + + .teamInfoLeft { + width: 40%; + display: flex; + flex-direction: column; + gap: 10px; + + .teamInfoTop { + background-color: #fff; + padding: 10px; + border-radius: 5px; + box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05); + height: 30%; + + h2 { + font-weight: 600; + font-size: 18px; + color: #1890ff; + .flex(center); + gap: 8px; + + img { + width: 24px; + } + } + + .userWorkBox { + height: calc(100% - 37px); + display: flex; + gap: 10px; + flex-direction: column; + text-wrap: nowrap; + + .workTop { + display: flex; + background: #f2f2f2; + gap: 20px; + height: 70%; + + ul { + width: calc(65% - 10px); + display: flex; + flex-direction: column; + justify-content: space-evenly; + font-size: 1.3em; + padding: 15px 0; + list-style: none; + } + } + img { + width: 35%; + background: #cccccc; + } + + & > ul { + height: 30%; + background: #f2f2f2; + padding: 10px 20px; + font-size: 1.3em; + + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + + li { + width: 100%; + display: flex; + align-items: center; + } + + label { + width: 115px; + display: block; + text-align: end; + } + } + label { + font-weight: 600; + + &::after { + content: ":"; + margin: 0 4px; + margin-right: 6px; + } + } + } + } + + + .teamInfoLeftdiv { + flex: 1; + background-color: #fff; + border-radius: 5px; + box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05); + overflow: hidden; + + .joinInfo{ + height: 90%; + } + + // 添加infoBox样式 + .infoBox { + padding: 10px; + height: calc(100% / 3); // 三个infoBox均等高度 + background-color: #fff; + border-bottom: 1px solid #f0f0f0; + + &:last-child { + border-bottom: none; + } + + h2 { + font-weight: 600; + font-size: 16px; + color: #333; + margin-bottom: 8px; + .flex(center); + gap: 8px; + + img { + width: 18px; + } + } + + .infoBorBox { + height: calc(100% - 32px); + background-color: #f2f2f2; + padding: 8px; + border-radius: 4px; + overflow: auto; + } + } + } + } + + + .teamInfoRight { + width: 60%; + + .postList { + height: 100%; + background-color: #fff; + padding: 10px; + border-radius: 5px; + box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05); + + .ant-table.ant-table-bordered > .ant-table-container { + border-left: 1px solid #aaa; + border-bottom: 1px solid #aaa; + border-right: 1px solid #aaa; + } + + .ant-btn { + width: 90px; + height: 36px; + border-radius: 5px; + } + } + } + } + } + + // bManual = false 时的布局样式(维持原样) + :global { .teamPost { background-color: #fff; padding: 10px; border-radius: 5px; box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05); - .ant-table.ant-table-bordered>.ant-table-container { - border-left: 1px solid #AAA; - border-bottom: 1px solid #AAA; + .ant-table.ant-table-bordered > .ant-table-container { + border-left: 1px solid #aaa; + border-bottom: 1px solid #aaa; border-right: 1px solid #aaa; } } @@ -120,7 +287,7 @@ background: #cccccc; } - &>ul { + & > ul { height: 30%; background: #f2f2f2; padding: 10px 20px; @@ -182,7 +349,7 @@ height: 45px; padding: 10px; background: #fff; - border-bottom: 1px solid #AAAAAA; + border-bottom: 1px solid #aaaaaa; position: relative; .ant-btn { @@ -220,18 +387,16 @@ // margin-top: 15px; .infoBox { - // margin-top: 15px; &:first-child { margin-top: 0; } } - } } .teamFoot { - border-top: 1px solid #AAAAAA; + border-top: 1px solid #aaaaaa; height: 60px; padding: 10px; @@ -241,4 +406,4 @@ } } } -} \ No newline at end of file +} -- libgit2 0.22.2