Commit 3233d9c3dc44029964808a8cc27f6dde92d58b35
1 parent
45ebf8e3
角标数字根据id来
Showing
2 changed files
with
6 additions
and
3 deletions
src/components/Common/CommonHooks/useCommonBase.js
| ... | ... | @@ -4096,7 +4096,7 @@ const useLoadSubscriptNum = props => { |
| 4096 | 4096 | const { table0 = 0, table1 = 0, table2 = 0, table3 = 0 } = counterRow; |
| 4097 | 4097 | props.dispatch({ |
| 4098 | 4098 | type: "app/setCounter", |
| 4099 | - payload: { table0, table1, table2, table3 } | |
| 4099 | + payload: { table0, table1, table2, table3 , counterRow} | |
| 4100 | 4100 | }); |
| 4101 | 4101 | } |
| 4102 | 4102 | }); | ... | ... |
src/mes/common/buttonComponent/index.js
| ... | ... | @@ -15,7 +15,7 @@ const getNavIcon = (bActive, iconName = 2) => { |
| 15 | 15 | const ButtonComponent = props => { |
| 16 | 16 | const { app, sModelsId, currentContent, menuMap } = props; |
| 17 | 17 | const { managementData, userinfo = {} } = app; |
| 18 | - const { iTeamType, bManual = false } = userinfo; | |
| 18 | + const { iTeamType, bManual = false } = userinfo; | |
| 19 | 19 | |
| 20 | 20 | const [expand, setExpand] = useState(true); |
| 21 | 21 | const [dataList, setDataList] = useState([]); |
| ... | ... | @@ -114,7 +114,7 @@ const ButtonComponent = props => { |
| 114 | 114 | }; |
| 115 | 115 | |
| 116 | 116 | const counterInfo = props.app.counterInfo || {}; |
| 117 | - const { table0 = 0, table1 = 0, table2 = 0, table3 = 0 } = counterInfo; | |
| 117 | + const { table0 = 0, table1 = 0, table2 = 0, table3 = 0, counterRow = {} } = counterInfo; | |
| 118 | 118 | // 每个item |
| 119 | 119 | const renderItem = (e, index) => { |
| 120 | 120 | // (取消)延迟加班按钮 |
| ... | ... | @@ -158,7 +158,10 @@ const ButtonComponent = props => { |
| 158 | 158 | count = table2; |
| 159 | 159 | } else if (e.name === "其它机台日报") { |
| 160 | 160 | count = table3; |
| 161 | + } else { | |
| 162 | + count = counterRow[e.id] ? Number(counterRow[e.id]): 0 | |
| 161 | 163 | } |
| 164 | + | |
| 162 | 165 | const workFirst = commonFunc.showLocalMessage(props, 'workFirst!', '请先上班后再操作'); |
| 163 | 166 | |
| 164 | 167 | return ( | ... | ... |