Commit 3233d9c3dc44029964808a8cc27f6dde92d58b35

Authored by chenxt
1 parent 45ebf8e3

角标数字根据id来

src/components/Common/CommonHooks/useCommonBase.js
@@ -4096,7 +4096,7 @@ const useLoadSubscriptNum = props => { @@ -4096,7 +4096,7 @@ const useLoadSubscriptNum = props => {
4096 const { table0 = 0, table1 = 0, table2 = 0, table3 = 0 } = counterRow; 4096 const { table0 = 0, table1 = 0, table2 = 0, table3 = 0 } = counterRow;
4097 props.dispatch({ 4097 props.dispatch({
4098 type: "app/setCounter", 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,7 +15,7 @@ const getNavIcon = (bActive, iconName = 2) => {
15 const ButtonComponent = props => { 15 const ButtonComponent = props => {
16 const { app, sModelsId, currentContent, menuMap } = props; 16 const { app, sModelsId, currentContent, menuMap } = props;
17 const { managementData, userinfo = {} } = app; 17 const { managementData, userinfo = {} } = app;
18 - const { iTeamType, bManual = false } = userinfo; 18 + const { iTeamType, bManual = false } = userinfo;
19 19
20 const [expand, setExpand] = useState(true); 20 const [expand, setExpand] = useState(true);
21 const [dataList, setDataList] = useState([]); 21 const [dataList, setDataList] = useState([]);
@@ -114,7 +114,7 @@ const ButtonComponent = props => { @@ -114,7 +114,7 @@ const ButtonComponent = props => {
114 }; 114 };
115 115
116 const counterInfo = props.app.counterInfo || {}; 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 // 每个item 118 // 每个item
119 const renderItem = (e, index) => { 119 const renderItem = (e, index) => {
120 // (取消)延迟加班按钮 120 // (取消)延迟加班按钮
@@ -158,7 +158,10 @@ const ButtonComponent = props => { @@ -158,7 +158,10 @@ const ButtonComponent = props => {
158 count = table2; 158 count = table2;
159 } else if (e.name === "其它机台日报") { 159 } else if (e.name === "其它机台日报") {
160 count = table3; 160 count = table3;
  161 + } else {
  162 + count = counterRow[e.id] ? Number(counterRow[e.id]): 0
161 } 163 }
  164 +
162 const workFirst = commonFunc.showLocalMessage(props, 'workFirst!', '请先上班后再操作'); 165 const workFirst = commonFunc.showLocalMessage(props, 'workFirst!', '请先上班后再操作');
163 166
164 return ( 167 return (