Commit c0a874e8192b9e4dbcdea1987887d2e0d8bde29b
1 parent
63e8972b
1.完善各类翻译
Showing
5 changed files
with
45 additions
and
22 deletions
src/components/Common/CommonComponent/index.js
| ... | ... | @@ -749,10 +749,11 @@ export default class CommonComponent extends Component { |
| 749 | 749 | } |
| 750 | 750 | }; |
| 751 | 751 | getSelectTableOption = () => { |
| 752 | - const { selectTableData } = this.state; | |
| 752 | + const { selectTableData, selectTableIndex = 0 } = this.state; | |
| 753 | 753 | const { showConfig, app } = this.props; |
| 754 | 754 | const { userinfo } = app; |
| 755 | 755 | let { sTableTitleSql } = showConfig; |
| 756 | + console.log('222', sTableTitleSql); | |
| 756 | 757 | /* 根据用户配置语言 设置表格标题 */ |
| 757 | 758 | if (commonUtils.isJSON(sTableTitleSql) && sTableTitleSql.includes('Chinese')) { |
| 758 | 759 | sTableTitleSql = this.getLocalizedString(sTableTitleSql, userinfo.sLanguage); |
| ... | ... | @@ -771,7 +772,7 @@ export default class CommonComponent extends Component { |
| 771 | 772 | const totalStringLen = titleStr.length; |
| 772 | 773 | const otherStrLen = titleStr.replace(/[^\x00-\xff]/g, '').length; // eslint-disable-line |
| 773 | 774 | const chineseStrLen = totalStringLen - otherStrLen; |
| 774 | - const defaultWidth = (chineseStrLen * 20) + (otherStrLen * 12); | |
| 775 | + const defaultWidth = (chineseStrLen * 12) + (otherStrLen * 8); | |
| 775 | 776 | const maxStrLen = selectTableData.reduce((res, pre) => { |
| 776 | 777 | let tempValue = pre[value] !== undefined ? pre[value] : ''; |
| 777 | 778 | if (tempValue === '') { |
| ... | ... | @@ -781,7 +782,7 @@ export default class CommonComponent extends Component { |
| 781 | 782 | const totalStringLen = tempValue.length; |
| 782 | 783 | const otherStrLen = tempValue.replace(/[^\x00-\xff]/g, '').length; // eslint-disable-line |
| 783 | 784 | const chineseStrLen = totalStringLen - otherStrLen; |
| 784 | - const tempWidth = (chineseStrLen * 20) + (otherStrLen * 12); | |
| 785 | + const tempWidth = (chineseStrLen * 12) + (otherStrLen * 8); | |
| 785 | 786 | return Math.max(tempWidth, res); |
| 786 | 787 | }, defaultWidth); |
| 787 | 788 | width = Math.min(maxStrLen + 8, 300); |
| ... | ... | @@ -812,16 +813,25 @@ export default class CommonComponent extends Component { |
| 812 | 813 | |
| 813 | 814 | return ( |
| 814 | 815 | <Option key="" className="select-table-option"> |
| 815 | - <div style={{ width: scrollX + 8, maxWidth: 'calc(100vw - 16px)', minWidth: '100%' }}> | |
| 816 | + <div style={{ width: scrollX + 8, maxWidth: 'calc(100vw - 16px)', minWidth: '100%' }} ref={(ref) => { this.selectTableRef1 = ref; }}> | |
| 816 | 817 | <Table |
| 817 | 818 | size="small" |
| 818 | 819 | className="select-table" |
| 820 | + rowClassName={(_, index) => { | |
| 821 | + return selectTableIndex === index ? 'selected-record-row' : ''; | |
| 822 | + }} | |
| 819 | 823 | rowKey="sId" |
| 820 | - onRow={(record) => { | |
| 824 | + onRow={(record, index) => { | |
| 821 | 825 | return { |
| 826 | + index, | |
| 827 | + onMouseEnter: () => { | |
| 828 | + this.setState({ | |
| 829 | + selectTableIndex: index, | |
| 830 | + }); | |
| 831 | + }, | |
| 822 | 832 | onClick: () => { |
| 823 | - this.setState({ tempCurrentPage: null }); | |
| 824 | - this.handleSelectOptionEvent(record.sId); | |
| 833 | + this.setState({ tempCurrentPage: null, bDropDownOpen: false, bNotFirstEnter: true }); | |
| 834 | + this.handleSelectOptionEvent(record.sSlaveId || record.sId); | |
| 825 | 835 | }, |
| 826 | 836 | }; |
| 827 | 837 | }} | ... | ... |
src/components/Common/CommonTable/index.js
| ... | ... | @@ -9206,9 +9206,9 @@ class CommonTableRc extends React.Component { |
| 9206 | 9206 | ? sName === "sCombinedMemo" |
| 9207 | 9207 | ? "合版信息" |
| 9208 | 9208 | : "请选择" |
| 9209 | - : sValue; | |
| 9209 | + : 'Plese Select'; | |
| 9210 | 9210 | |
| 9211 | - if (sValue === "请选择") { | |
| 9211 | + if (sValue === "Plese Select") { | |
| 9212 | 9212 | linkStyle = ""; |
| 9213 | 9213 | clickEvent = ""; |
| 9214 | 9214 | } | ... | ... |
src/mes/common/commonModelComponent/index.js
| ... | ... | @@ -2406,7 +2406,8 @@ const CommonViewChooseComponent = props => { |
| 2406 | 2406 | // (定制功能)工单参数详情弹窗 |
| 2407 | 2407 | const CommonParamsModalComponent = props => { |
| 2408 | 2408 | const modalName = "sWorkParamsModalVisible"; // commonParamVisible |
| 2409 | - const sProcessParams = "工单参数"; | |
| 2409 | + const workParam = commonFunc.showLocalMessage(props, "workParam", "工单参数"); | |
| 2410 | + const sProcessParams = workParam; | |
| 2410 | 2411 | |
| 2411 | 2412 | const handleGetSelectedData = tableName => { |
| 2412 | 2413 | const selectedRowKeys = props[`${tableName}SelectedRowKeys`] || []; |
| ... | ... | @@ -2479,7 +2480,6 @@ const CommonParamsModalComponent = props => { |
| 2479 | 2480 | const BtnPrior = commonFunc.showLocalMessage(props, 'BtnPrior', '上一条'); |
| 2480 | 2481 | const BtnNext = commonFunc.showLocalMessage(props, 'BtnNext', '下一条'); |
| 2481 | 2482 | const BtnLast = commonFunc.showLocalMessage(props, 'BtnLast', '末条'); |
| 2482 | - const workParam = commonFunc.showLocalMessage(props, "workParam", "工单参数"); | |
| 2483 | 2483 | |
| 2484 | 2484 | return props[modalName] ? ( |
| 2485 | 2485 | <Modal | ... | ... |
src/mes/productionExec/productionExecMain/index.js
| ... | ... | @@ -2222,6 +2222,18 @@ const BllbModalComponent = props => { |
| 2222 | 2222 | [refreshTime] |
| 2223 | 2223 | ); |
| 2224 | 2224 | const defectcategory = commonFunc.showLocalMessage(props, 'defectcategory', '成品不良类别'); |
| 2225 | + | |
| 2226 | + const majorCategory = commonFunc.showLocalMessage(props, 'majorCategory', '不良大类'); | |
| 2227 | + const defectiveSubcategory = commonFunc.showLocalMessage(props, 'defectiveSubcategory', '不良小类'); | |
| 2228 | + | |
| 2229 | + const btnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 2230 | + const btnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定'); | |
| 2231 | + const qualified = commonFunc.showLocalMessage(props, 'qualified', '确定'); | |
| 2232 | + const OKQualified = commonFunc.showLocalMessage(props, 'OKQualified', '确定'); | |
| 2233 | + const piece = commonFunc.showLocalMessage(props, 'piece', 'Piece') || 'Piece'; | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2225 | 2237 | const onOk = () => { |
| 2226 | 2238 | props.onExecInstructSet({ |
| 2227 | 2239 | btnConfig: { |
| ... | ... | @@ -2237,7 +2249,7 @@ const BllbModalComponent = props => { |
| 2237 | 2249 | ] |
| 2238 | 2250 | } |
| 2239 | 2251 | ]), |
| 2240 | - showName: "确认˝" | |
| 2252 | + showName: btnSure | |
| 2241 | 2253 | }, |
| 2242 | 2254 | nextProps: { |
| 2243 | 2255 | bblbData: data.map(item => ({ ...item, dQty: Number(item.dQty) })), |
| ... | ... | @@ -2261,10 +2273,10 @@ const BllbModalComponent = props => { |
| 2261 | 2273 | footer={ |
| 2262 | 2274 | <Space> |
| 2263 | 2275 | <Button size="large" onClick={() => setBllbVisible(false)}> |
| 2264 | - 取消 | |
| 2276 | + {btnCancel} | |
| 2265 | 2277 | </Button> |
| 2266 | 2278 | <Button type="primary" size="large" onClick={onOk}> |
| 2267 | - 确定 | |
| 2279 | + {btnSure} | |
| 2268 | 2280 | </Button> |
| 2269 | 2281 | </Space> |
| 2270 | 2282 | } |
| ... | ... | @@ -2274,12 +2286,12 @@ const BllbModalComponent = props => { |
| 2274 | 2286 | <Col flex={"40px"}> |
| 2275 | 2287 | <div className="redDot" /> |
| 2276 | 2288 | </Col> |
| 2277 | - <Col flex={"160px"}>OK合格</Col> | |
| 2278 | - <Col flex={"160px"}>合格</Col> | |
| 2289 | + <Col flex={"160px"}>{OKQualified}</Col> | |
| 2290 | + <Col flex={"160px"}>{qualified}</Col> | |
| 2279 | 2291 | <Col flex={1}> |
| 2280 | 2292 | <Input size="large" value={restQty} disabled /> |
| 2281 | 2293 | </Col> |
| 2282 | - <Col flex={"50px"}>张</Col> | |
| 2294 | + <Col flex={"50px"}>Piece</Col> | |
| 2283 | 2295 | </Row> |
| 2284 | 2296 | {data.map((rowData, index) => { |
| 2285 | 2297 | const { sId: lineId } = rowData; |
| ... | ... | @@ -2325,7 +2337,7 @@ const BllbModalComponent = props => { |
| 2325 | 2337 | <Col flex={"160px"} style={{ maxWidth: "160px" }}> |
| 2326 | 2338 | <Select |
| 2327 | 2339 | showSearch |
| 2328 | - placeholder="不良大类" | |
| 2340 | + placeholder={majorCategory} | |
| 2329 | 2341 | border={false} |
| 2330 | 2342 | size="large" |
| 2331 | 2343 | style={{ width: "100%" }} |
| ... | ... | @@ -2376,7 +2388,7 @@ const BllbModalComponent = props => { |
| 2376 | 2388 | <Col flex={"160px"} style={{ maxWidth: "160px" }}> |
| 2377 | 2389 | <Select |
| 2378 | 2390 | showSearch |
| 2379 | - placeholder="不良小类" | |
| 2391 | + placeholder={defectiveSubcategory} | |
| 2380 | 2392 | border={false} |
| 2381 | 2393 | size="large" |
| 2382 | 2394 | style={{ width: "100%" }} |
| ... | ... | @@ -2456,7 +2468,7 @@ const BllbModalComponent = props => { |
| 2456 | 2468 | }} |
| 2457 | 2469 | /> |
| 2458 | 2470 | </Col> |
| 2459 | - <Col flex={"50px"}>张</Col> | |
| 2471 | + <Col flex={"50px"}>Piece</Col> | |
| 2460 | 2472 | </Row> |
| 2461 | 2473 | ); |
| 2462 | 2474 | })} | ... | ... |
src/mes/productionExec/productionExecMain/index.less
| ... | ... | @@ -335,13 +335,14 @@ |
| 335 | 335 | top: 0; |
| 336 | 336 | .size(120px, 100%); |
| 337 | 337 | .flex(center); |
| 338 | - font-size: 18px; | |
| 338 | + font-size: 14px; | |
| 339 | 339 | border-left: 1px solid #AAA; |
| 340 | 340 | padding: 0 0 0 5px; |
| 341 | 341 | cursor: default; |
| 342 | 342 | |
| 343 | 343 | span[role="img"] { |
| 344 | 344 | color: #1890FF; |
| 345 | + | |
| 345 | 346 | } |
| 346 | 347 | |
| 347 | 348 | .ant-btn-icon-only[disabled] { |
| ... | ... | @@ -592,4 +593,4 @@ |
| 592 | 593 | .flex(center, center); |
| 593 | 594 | } |
| 594 | 595 | } |
| 595 | -} | |
| 596 | 596 | \ No newline at end of file |
| 597 | +} | ... | ... |