Commit e58711ae6f070270cc5d732dc9ba67d1e7f99412
1 parent
106adc73
手工机台不展示生产执行 所有都可以完工
Showing
2 changed files
with
11 additions
and
0 deletions
src/mes/indexMes/index.js
| @@ -700,6 +700,11 @@ const SiderComponent = () => { | @@ -700,6 +700,11 @@ const SiderComponent = () => { | ||
| 700 | c_icon: c_guideIcon | 700 | c_icon: c_guideIcon |
| 701 | } | 701 | } |
| 702 | ]; | 702 | ]; |
| 703 | + const {bManual = false} = props?.app?.userinfo || {} | ||
| 704 | + if (bManual) { | ||
| 705 | + const index = filteredMenuList.findIndex(item => item.id === 'productionExec'); | ||
| 706 | + filteredMenuList.splice(index, 1); | ||
| 707 | + } | ||
| 703 | 708 | ||
| 704 | let [hoverState, setHoverState] = useState(null); | 709 | let [hoverState, setHoverState] = useState(null); |
| 705 | return ( | 710 | return ( |
src/mes/scheduledTasks/machineTasks/index.js
| @@ -562,6 +562,7 @@ const MachineTasks = baseProps => { | @@ -562,6 +562,7 @@ const MachineTasks = baseProps => { | ||
| 562 | tableBtnsConfig: params => { | 562 | tableBtnsConfig: params => { |
| 563 | const { record, index } = params; | 563 | const { record, index } = params; |
| 564 | const { iStar, bManual } = record; | 564 | const { iStar, bManual } = record; |
| 565 | + | ||
| 565 | let showName, btnBgColor, sDefault, finishBtnBgColor, finishSdefault; | 566 | let showName, btnBgColor, sDefault, finishBtnBgColor, finishSdefault; |
| 566 | if (iStar === 1) { | 567 | if (iStar === 1) { |
| 567 | showName = "暂停"; | 568 | showName = "暂停"; |
| @@ -574,6 +575,7 @@ const MachineTasks = baseProps => { | @@ -574,6 +575,7 @@ const MachineTasks = baseProps => { | ||
| 574 | btnBgColor = "#AAA"; | 575 | btnBgColor = "#AAA"; |
| 575 | sDefault = "${false}"; | 576 | sDefault = "${false}"; |
| 576 | } | 577 | } |
| 578 | + | ||
| 577 | if (iStar === 2) { | 579 | if (iStar === 2) { |
| 578 | finishBtnBgColor = "#AAA" | 580 | finishBtnBgColor = "#AAA" |
| 579 | finishSdefault = "${false}"; | 581 | finishSdefault = "${false}"; |
| @@ -585,6 +587,10 @@ const MachineTasks = baseProps => { | @@ -585,6 +587,10 @@ const MachineTasks = baseProps => { | ||
| 585 | if (!bStartWork) { | 587 | if (!bStartWork) { |
| 586 | sDefault = "${false}"; | 588 | sDefault = "${false}"; |
| 587 | } | 589 | } |
| 590 | + if (bManual) { | ||
| 591 | + finishBtnBgColor = "#1890FF" | ||
| 592 | + finishSdefault = "${true}"; | ||
| 593 | + } | ||
| 588 | 594 | ||
| 589 | const outPut = bManual ? [actProduceReportConfig, | 595 | const outPut = bManual ? [actProduceReportConfig, |
| 590 | { showName: "完工", btnBgColor: finishBtnBgColor, sDefault: finishSdefault }] : [{ showName, btnBgColor, sDefault, startWorkConfig, pauseWorkConfig }, | 596 | { showName: "完工", btnBgColor: finishBtnBgColor, sDefault: finishSdefault }] : [{ showName, btnBgColor, sDefault, startWorkConfig, pauseWorkConfig }, |