Commit da40b6816fc489e739ca67298c7679950cc2586e
1 parent
fa98d491
1.MES系统功能 修复样式问题
Showing
5 changed files
with
67 additions
and
73 deletions
src/mes/common/RunningStatus/index.js
| ... | ... | @@ -489,6 +489,9 @@ const RunningStatus = props => { |
| 489 | 489 | }, |
| 490 | 490 | [sAbClassifycode, sAbsStatusName, tableData.length] |
| 491 | 491 | ); |
| 492 | + const selectDrivingFirst = commonFunc.showLocalMessage(props, 'selectDrivingFirst', '请先选择一条行车记录'); | |
| 493 | + | |
| 494 | + const fillRecordTime = commonFunc.showLocalMessage(props, 'fillRecordTime', '请先填写新增行车记录的结束时间!'); | |
| 492 | 495 | |
| 493 | 496 | const contentProps = { |
| 494 | 497 | ...props, |
| ... | ... | @@ -498,14 +501,14 @@ const RunningStatus = props => { |
| 498 | 501 | if (!data) return; |
| 499 | 502 | const { sPlcMachineStatusName, bUnChanged } = viewRow; |
| 500 | 503 | if (commonUtils.isEmptyObject(viewRow)) { |
| 501 | - message.info("请先选择一条行车记录!", 3); | |
| 504 | + message.info(selectDrivingFirst, 3); | |
| 502 | 505 | return; |
| 503 | 506 | } |
| 504 | 507 | if (viewRow.bSaveAbnormal) { |
| 505 | 508 | return; |
| 506 | 509 | } |
| 507 | 510 | if (bUnChanged) { |
| 508 | - message.info("请先填写新增行车记录的结束时间!", 3); | |
| 511 | + message.info(fillRecordTime, 3); | |
| 509 | 512 | return; |
| 510 | 513 | } |
| 511 | 514 | // if (sPlcMachineStatusName === "运行" && data.sClassifyName !== "sType1") { |
| ... | ... | @@ -540,8 +543,10 @@ const RunningContent = props => { |
| 540 | 543 | if (!dataList.length) return; |
| 541 | 544 | |
| 542 | 545 | const tempData = []; |
| 546 | + console.log('dataList123', dataList); | |
| 543 | 547 | dataList.filter(item => item.sClassifyName).forEach(item => { |
| 544 | 548 | const { sClassifyName, group } = item; |
| 549 | + console.log('sss', group); | |
| 545 | 550 | const rowspan = Math.ceil(group.length / 6); |
| 546 | 551 | for (let i = 0; i < rowspan; i++) { |
| 547 | 552 | const [title, className, classNameTd] = sTypeJson[sClassifyName]; |
| ... | ... | @@ -553,11 +558,14 @@ const RunningContent = props => { |
| 553 | 558 | status: [ |
| 554 | 559 | ...group.filter((_, index) => index >= i * 6 && index < i * 6 + 6) |
| 555 | 560 | ].map(rowData => { |
| 556 | - const { sStatusName, sId } = rowData; | |
| 561 | + console.log('2122', rowData); | |
| 562 | + const { sStatusName, sId, sName } = rowData; | |
| 557 | 563 | const [name, status] = sStatusName.split(" "); |
| 564 | + console.log('aaaa', name , status); | |
| 565 | + const statusValue = sStatusName?.replace(sName , ''); | |
| 558 | 566 | return { |
| 559 | - name, | |
| 560 | - status, | |
| 567 | + name:sName, | |
| 568 | + status:statusValue, | |
| 561 | 569 | className: selectedRowKeys.includes(sId) ? classNameTd : "", |
| 562 | 570 | rowData: { ...rowData, sClassifyName1: title } |
| 563 | 571 | }; |
| ... | ... | @@ -594,6 +602,9 @@ const RunningContent = props => { |
| 594 | 602 | } |
| 595 | 603 | }; |
| 596 | 604 | |
| 605 | + | |
| 606 | + console.log('ddata', data); | |
| 607 | + | |
| 597 | 608 | return ( |
| 598 | 609 | <div |
| 599 | 610 | className={props.bModal ? styles.runStatusTable1 : styles.runStatusTable} |
| ... | ... | @@ -616,7 +627,7 @@ const RunningContent = props => { |
| 616 | 627 | > |
| 617 | 628 | <div> |
| 618 | 629 | <p>{tdData.name}</p> |
| 619 | - <p>{tdData.status}</p> | |
| 630 | + <p style={{fontSize:'10px'}}>{tdData.status}</p> | |
| 620 | 631 | </div> |
| 621 | 632 | </td> |
| 622 | 633 | ))} | ... | ... |
src/mes/indexMes/assets/logout.svg
| ... | ... | @@ -3,4 +3,4 @@ |
| 3 | 3 | <g transform="matrix(1 0 0 1 -1851 -14 )"> |
| 4 | 4 | <path d="M 26.532552083333336 9.969951923076922 C 27.51085069444444 11.905048076923077 28 13.966346153846152 28 16.153846153846153 C 28 18.028846153846153 27.629340277777775 19.819711538461537 26.888020833333336 21.526442307692307 C 26.14670138888889 23.23317307692308 25.150173611111114 24.705528846153847 23.8984375 25.943509615384617 C 22.64670138888889 27.181490384615387 21.157986111111114 28.167067307692307 19.432291666666664 28.900240384615383 C 17.706597222222225 29.633413461538463 15.895833333333334 30 14 30 C 12.104166666666668 30 10.29340277777778 29.633413461538463 8.567708333333332 28.900240384615383 C 6.84201388888889 28.167067307692307 5.353298611111112 27.181490384615387 4.1015625 25.943509615384617 C 2.8498263888888893 24.705528846153847 1.8532986111111114 23.23317307692308 1.1119791666666667 21.526442307692307 C 0.3706597222222223 19.819711538461537 0 18.028846153846153 0 16.153846153846153 C 0 13.966346153846152 0.4891493055555557 11.905048076923077 1.4674479166666665 9.969951923076922 C 2.445746527777778 8.034855769230766 3.8220486111111116 6.412259615384613 5.596354166666666 5.102163461538463 C 6.118923611111112 4.717548076923073 6.69921875 4.56730769230769 7.337239583333333 4.651442307692307 C 7.975260416666667 4.73557692307692 8.48263888888889 5.03605769230769 8.859375 5.552884615384616 C 9.24826388888889 6.057692307692307 9.397135416666668 6.625600961538463 9.305989583333332 7.256610576923078 C 9.21484375 7.887620192307693 8.9140625 8.395432692307688 8.403645833333332 8.780048076923078 C 7.212673611111111 9.669471153846152 6.292100694444445 10.757211538461535 5.641927083333334 12.043269230769232 C 4.991753472222222 13.32932692307692 4.666666666666666 14.69951923076923 4.666666666666666 16.153846153846153 C 4.666666666666666 17.403846153846153 4.912760416666666 18.596754807692307 5.404947916666666 19.732572115384617 C 5.897135416666666 20.868389423076927 6.5625 21.850961538461537 7.401041666666667 22.680288461538463 C 8.239583333333332 23.509615384615383 9.233072916666668 24.16766826923077 10.381510416666668 24.654447115384617 C 11.529947916666668 25.141225961538463 12.736111111111112 25.384615384615383 14 25.384615384615383 C 15.263888888888891 25.384615384615383 16.470052083333336 25.141225961538463 17.618489583333336 24.654447115384617 C 18.766927083333336 24.16766826923077 19.760416666666664 23.509615384615383 20.598958333333336 22.680288461538463 C 21.4375 21.850961538461537 22.102864583333336 20.868389423076927 22.595052083333336 19.732572115384617 C 23.087239583333336 18.596754807692307 23.333333333333336 17.403846153846153 23.333333333333336 16.153846153846153 C 23.333333333333336 14.69951923076923 23.00824652777778 13.32932692307692 22.358072916666664 12.043269230769232 C 21.70789930555556 10.757211538461535 20.78732638888889 9.669471153846152 19.596354166666664 8.780048076923078 C 19.0859375 8.395432692307688 18.78515625 7.887620192307693 18.694010416666664 7.256610576923078 C 18.602864583333336 6.625600961538463 18.751736111111114 6.057692307692307 19.140625 5.552884615384616 C 19.517361111111114 5.03605769230769 20.02777777777778 4.73557692307692 20.671875 4.651442307692307 C 21.315972222222225 4.56730769230769 21.893229166666664 4.717548076923073 22.403645833333336 5.102163461538463 C 24.17795138888889 6.412259615384613 25.554253472222225 8.034855769230766 26.532552083333336 9.969951923076922 Z M 15.640625 0.6850961538461531 C 16.102430555555557 1.1418269230769207 16.333333333333336 1.682692307692305 16 2.307692307692306 L 16 13.846153846153847 C 16.333333333333336 14.471153846153845 16.102430555555557 15.01201923076923 15.640625 15.46875 C 15.178819444444446 15.925480769230768 14.631944444444446 16.153846153846153 14 16.153846153846153 C 13.368055555555557 16.153846153846153 12.821180555555557 15.925480769230768 12.359375 15.46875 C 11.897569444444445 15.01201923076923 11.666666666666668 14.471153846153845 12 13.846153846153847 L 12 2.307692307692306 C 11.666666666666668 1.682692307692305 11.897569444444445 1.1418269230769207 12.359375 0.6850961538461531 C 12.821180555555557 0.22836538461538547 13.368055555555557 0 14 0 C 14.631944444444446 0 15.178819444444446 0.22836538461538547 15.640625 0.6850961538461531 Z " fill-rule="nonzero" fill="#ffffff" stroke="none" transform="matrix(1 0 0 1 1851 14 )" /> |
| 5 | 5 | </g> |
| 6 | -</svg> | |
| 7 | 6 | \ No newline at end of file |
| 7 | +</svg> | ... | ... |
src/mes/indexMes/assets/shutdown.svg
| 1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | -<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="17px" height="15px" xmlns="http://www.w3.org/2000/svg"> | |
| 2 | +<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="55px" height="15px" xmlns="http://www.w3.org/2000/svg"> | |
| 3 | 3 | <g transform="matrix(1 0 0 1 -146 -1034 )"> |
| 4 | 4 | <path d="M 10.928571428571429 11.748046875 C 11.010788690476192 11.748046875 11.083519345238097 11.715494791666668 11.146763392857142 11.650390625 L 12.531808035714286 10.224609375 C 12.595052083333334 10.159505208333332 12.626674107142858 10.084635416666664 12.626674107142858 10.000000000000002 C 12.626674107142858 9.915364583333334 12.595052083333334 9.840494791666664 12.531808035714286 9.775390624999998 L 10.321428571428571 7.5 L 12.531808035714286 5.224609374999999 C 12.595052083333334 5.159505208333332 12.626674107142858 5.084635416666666 12.626674107142858 5.000000000000001 C 12.626674107142858 4.915364583333333 12.595052083333334 4.840494791666665 12.531808035714286 4.775390625 L 11.146763392857142 3.3496093749999996 C 11.083519345238097 3.2845052083333326 11.010788690476192 3.251953125 10.928571428571429 3.251953125 C 10.846354166666668 3.251953125 10.773623511904763 3.2845052083333326 10.710379464285714 3.3496093749999996 L 8.5 5.625 L 6.289620535714286 3.3496093749999996 C 6.226376488095239 3.2845052083333326 6.153645833333334 3.251953125 6.071428571428571 3.251953125 C 5.989211309523809 3.251953125 5.916480654761905 3.2845052083333326 5.853236607142857 3.3496093749999996 L 4.468191964285714 4.775390625 C 4.404947916666667 4.840494791666665 4.373325892857143 4.915364583333333 4.373325892857143 5.000000000000001 C 4.373325892857143 5.084635416666666 4.404947916666667 5.159505208333332 4.468191964285714 5.224609374999999 L 6.678571428571429 7.5 L 4.468191964285714 9.775390624999998 C 4.404947916666667 9.840494791666664 4.373325892857143 9.915364583333334 4.373325892857143 10.000000000000002 C 4.373325892857143 10.084635416666664 4.404947916666667 10.159505208333332 4.468191964285714 10.224609375 L 5.853236607142857 11.650390625 C 5.916480654761905 11.715494791666668 5.989211309523809 11.748046875 6.071428571428571 11.748046875 C 6.153645833333334 11.748046875 6.226376488095239 11.715494791666668 6.289620535714286 11.650390625 L 8.5 9.375 L 10.710379464285714 11.650390625 C 10.773623511904763 11.715494791666668 10.846354166666668 11.748046875 10.928571428571429 11.748046875 Z M 16.554129464285715 0.45898437500000056 C 16.85137648809524 0.7649739583333326 17 1.1328125000000004 17 1.5624999999999996 L 17 13.4375 C 17 13.8671875 16.85137648809524 14.235026041666668 16.554129464285715 14.541015625 C 16.256882440476193 14.847005208333334 15.899553571428575 15 15.482142857142858 15 L 1.5178571428571428 15 C 1.1004464285714286 15 0.7431175595238096 14.847005208333334 0.4458705357142857 14.541015625 C 0.14862351190476192 14.235026041666668 0 13.8671875 0 13.4375 L 0 1.5624999999999996 C 0 1.1328125000000004 0.14862351190476192 0.7649739583333326 0.4458705357142857 0.45898437500000056 C 0.7431175595238096 0.1529947916666652 1.1004464285714286 0 1.5178571428571428 0 L 15.482142857142858 0 C 15.899553571428575 0 16.256882440476193 0.1529947916666652 16.554129464285715 0.45898437500000056 Z " fill-rule="nonzero" fill="#ffffff" stroke="none" transform="matrix(1 0 0 1 146 1034 )" /> |
| 5 | 5 | </g> |
| 6 | -</svg> | |
| 7 | 6 | \ No newline at end of file |
| 7 | +</svg> | ... | ... |
src/mes/indexMes/index.js
| ... | ... | @@ -35,6 +35,10 @@ import zhCN from "antd/lib/locale-provider/zh_CN"; |
| 35 | 35 | import enUS from 'antd/lib/locale-provider/en_US'; // 导入英文语言包 |
| 36 | 36 | import zhTW from 'antd/lib/locale-provider/zh_TW'; // 导入繁体中文语言包 |
| 37 | 37 | import Draggable from 'react-draggable'; |
| 38 | +import changePwdIcon from './assets/changePwd.svg'; | |
| 39 | +import logoutIcon from './assets/logout.svg'; | |
| 40 | +import shutdownIcon from './assets/shutdown.svg'; | |
| 41 | + | |
| 38 | 42 | |
| 39 | 43 | |
| 40 | 44 | // 内容展示组件 |
| ... | ... | @@ -1164,6 +1168,7 @@ const SystemFunComponent = () => { |
| 1164 | 1168 | handleSystemFunClick("changePwd"); |
| 1165 | 1169 | }} |
| 1166 | 1170 | > |
| 1171 | + <span> <img alt='' src={changePwdIcon}/> </span> | |
| 1167 | 1172 | <span>{ModifyPassword}</span> |
| 1168 | 1173 | </div> |
| 1169 | 1174 | <div |
| ... | ... | @@ -1172,6 +1177,7 @@ const SystemFunComponent = () => { |
| 1172 | 1177 | handleSystemFunClick("logout"); |
| 1173 | 1178 | }} |
| 1174 | 1179 | > |
| 1180 | + <span> <img style={{ width:'20px'}} alt='' src={logoutIcon} /> </span> | |
| 1175 | 1181 | <span>{Logout}</span> |
| 1176 | 1182 | </div> |
| 1177 | 1183 | <div |
| ... | ... | @@ -1180,6 +1186,7 @@ const SystemFunComponent = () => { |
| 1180 | 1186 | handleSystemFunClick("shutdown"); |
| 1181 | 1187 | }} |
| 1182 | 1188 | > |
| 1189 | + <span> <img alt='' src={shutdownIcon}/> </span> | |
| 1183 | 1190 | <span>{shutDown}</span> |
| 1184 | 1191 | </div> |
| 1185 | 1192 | <Popover | ... | ... |
src/mes/indexMes/index.less
| ... | ... | @@ -196,71 +196,47 @@ |
| 196 | 196 | padding: 0; |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | - .systemFunContent { | |
| 200 | - &>div { | |
| 201 | - .size(209px, 48px); | |
| 202 | - .flex(center, center); | |
| 203 | - | |
| 204 | - &:hover { | |
| 205 | - background-color: #555555; | |
| 206 | - } | |
| 207 | - | |
| 208 | - span { | |
| 209 | - font-size: 18px; | |
| 210 | - color: @base-color; | |
| 211 | - cursor: default; | |
| 212 | - } | |
| 213 | - } | |
| 214 | - | |
| 215 | - .restDailyReport { | |
| 216 | - span[role="img"] { | |
| 217 | - margin-right: 9px; | |
| 218 | - font-size: 25px; | |
| 219 | - } | |
| 220 | - } | |
| 221 | - | |
| 222 | - .changePwd { | |
| 223 | - background: url(./assets/changePwd.svg) no-repeat; | |
| 224 | - } | |
| 225 | - | |
| 226 | - .logout { | |
| 227 | - background: url(./assets/shutdownIcon.png) no-repeat; | |
| 228 | - } | |
| 229 | - | |
| 230 | - .shutdown { | |
| 231 | - background: url(./assets/shutdown.svg) no-repeat; | |
| 232 | - } | |
| 233 | - | |
| 234 | - .restDailyReport { | |
| 235 | - &:hover { | |
| 236 | - background-size: 24px 24px; | |
| 199 | + .systemFunContent { | |
| 200 | + &>div { | |
| 201 | + display: flex; | |
| 202 | + align-items: center; | |
| 203 | + margin: 8px 0; | |
| 204 | + .size(209px, 48px); | |
| 205 | + //.flex(center, center); | |
| 206 | + | |
| 207 | + &:hover { | |
| 208 | + background-color: #555555; | |
| 209 | + } | |
| 210 | + span:first-child{ | |
| 211 | + width: 40px; | |
| 212 | + margin-left: 20px; | |
| 213 | + } | |
| 214 | + | |
| 215 | + span { | |
| 216 | + font-size: 18px; | |
| 217 | + color: @base-color; | |
| 218 | + cursor: default; | |
| 219 | + } | |
| 220 | + } | |
| 221 | + .restDailyReport { | |
| 222 | + span[role="img"] { | |
| 223 | + //margin-right: 9px; | |
| 224 | + font-size: 25px; | |
| 225 | + } | |
| 226 | + } | |
| 227 | + | |
| 228 | + .restDailyReport { | |
| 229 | + &:hover { | |
| 230 | + background-size: 24px 24px; | |
| 231 | + | |
| 232 | + span:nth-child(1) { | |
| 233 | + font-size: 28px; | |
| 234 | + } | |
| 235 | + | |
| 236 | + | |
| 237 | + } | |
| 238 | + } | |
| 237 | 239 | |
| 238 | - span:nth-child(1) { | |
| 239 | - font-size: 28px; | |
| 240 | - } | |
| 241 | - | |
| 242 | - span:nth-child(2) { | |
| 243 | - font-size: 20px; | |
| 244 | - } | |
| 245 | - } | |
| 246 | - } | |
| 247 | - | |
| 248 | - .changePwd, | |
| 249 | - .logout, | |
| 250 | - .shutdown { | |
| 251 | - background-size: 20px 20px; | |
| 252 | - padding-left: 30px; | |
| 253 | - background-position-x: 28%; | |
| 254 | - background-position-y: center; | |
| 255 | - | |
| 256 | - &:hover { | |
| 257 | - background-size: 24px 24px; | |
| 258 | - | |
| 259 | - span { | |
| 260 | - font-size: 20px; | |
| 261 | - } | |
| 262 | - } | |
| 263 | - } | |
| 264 | 240 | |
| 265 | 241 | } |
| 266 | 242 | ... | ... |