Commit 7fb3580dd43431633384b2aa4da0368ae4d3122d
1 parent
d1d2f468
优化英文版样式、文字;
Showing
8 changed files
with
428 additions
and
268 deletions
src/components/Common/CommonInstructSet.js
| ... | ... | @@ -11,6 +11,7 @@ import * as commonBusiness from "@/components/Common/commonBusiness"; |
| 11 | 11 | import FaceDetect from "@/components/FaceDetect"; |
| 12 | 12 | import ShowType from "@/components/Common/CommonComponent"; |
| 13 | 13 | |
| 14 | +let globalProps = {}; | |
| 14 | 15 | let step = 1; // 步骤计数 |
| 15 | 16 | let exesqlTodo = []; // 最后需要一起执行的sql |
| 16 | 17 | let saveDataTodo = []; // 最后需要一起保存的数据 |
| ... | ... | @@ -80,14 +81,17 @@ const showMsg = value => { |
| 80 | 81 | params.content = value; |
| 81 | 82 | } |
| 82 | 83 | |
| 84 | + const InstructionSetErrMsg = commonFunc.showLocalMessage(globalProps, 'InstructionSetErrMsg', '指令集错误信息'); | |
| 85 | + const InstructionSetInfoMsg = commonFunc.showLocalMessage(globalProps, 'InstructionSetInfoMsg', '指令集提示信息'); | |
| 86 | + const knew = commonFunc.showLocalMessage(globalProps, 'knew', '知道了'); | |
| 83 | 87 | const { type, content } = params; |
| 84 | - const title = type === "error" ? "指令集错误信息" : "指令集提示信息"; | |
| 88 | + const title = type === "error" ? InstructionSetErrMsg : InstructionSetInfoMsg; | |
| 85 | 89 | |
| 86 | 90 | Modal[type]({ |
| 87 | 91 | width: 1000, |
| 88 | 92 | title: title, |
| 89 | 93 | content: <div>{content}</div>, |
| 90 | - okText: "知道了" | |
| 94 | + okText: knew | |
| 91 | 95 | }); |
| 92 | 96 | }; |
| 93 | 97 | |
| ... | ... | @@ -103,13 +107,13 @@ const instructCheck = props => { |
| 103 | 107 | } |
| 104 | 108 | |
| 105 | 109 | if (!btnConfig) { |
| 106 | - showMsg("没有找到按钮配置!"); | |
| 110 | + showMsg("Button configuration not found!"); | |
| 107 | 111 | return false; |
| 108 | 112 | } |
| 109 | 113 | |
| 110 | 114 | const { sInstruct: sInstructStr } = btnConfig; |
| 111 | 115 | if (!sInstructStr) { |
| 112 | - showMsg("指令集未配置!"); | |
| 116 | + showMsg("Instruction set not configured!"); | |
| 113 | 117 | return false; |
| 114 | 118 | } |
| 115 | 119 | |
| ... | ... | @@ -120,8 +124,8 @@ const instructCheck = props => { |
| 120 | 124 | type: "error", |
| 121 | 125 | content: ( |
| 122 | 126 | <div> |
| 123 | - <div>指令集格式错误!</div> | |
| 124 | - <div>错误指令集内容:</div> | |
| 127 | + <div>Instruction set format error!</div> | |
| 128 | + <div>Error instruction set content:</div> | |
| 125 | 129 | <div>{sInstructStr}</div> |
| 126 | 130 | </div> |
| 127 | 131 | ) |
| ... | ... | @@ -229,6 +233,8 @@ const instructSetInit = async props => { |
| 229 | 233 | |
| 230 | 234 | if (!sInstruct) return; |
| 231 | 235 | |
| 236 | + globalProps = props; | |
| 237 | + | |
| 232 | 238 | // 添加额外数据 |
| 233 | 239 | addExtraData(props); |
| 234 | 240 | |
| ... | ... | @@ -477,13 +483,13 @@ const handleCopy = (props, instruct) => { |
| 477 | 483 | // content: "error", |
| 478 | 484 | content: ( |
| 479 | 485 | <div> |
| 480 | - <div>{`【${srcDataset}】数据源为空`}</div> | |
| 486 | + <div>{`[${srcDataset}] data source is empty`}</div> | |
| 481 | 487 | <div>请检查该复制指令集:</div> |
| 482 | 488 | <div>{JSON.stringify(instruct)}</div> |
| 483 | 489 | </div> |
| 484 | 490 | ) |
| 485 | 491 | }); |
| 486 | - throw new Error(`【${srcDataset}】数据源为空`); | |
| 492 | + throw new Error(`[${srcDataset}] data source is empty`); | |
| 487 | 493 | } |
| 488 | 494 | |
| 489 | 495 | // 获取赋值后的数据 |
| ... | ... | @@ -549,25 +555,25 @@ const handleAddNew = (props, instruct) => { |
| 549 | 555 | type: "error", |
| 550 | 556 | content: ( |
| 551 | 557 | <div> |
| 552 | - <div>被新增的数据集desDataset不能为空!</div> | |
| 553 | - <div>请检查该新增指令集:</div> | |
| 558 | + <div>The newly added dataset desDataset cannot be empty!</div> | |
| 559 | + <div>Please check the newly added instruction set:</div> | |
| 554 | 560 | <div>{JSON.stringify(instruct)}</div> |
| 555 | 561 | </div> |
| 556 | 562 | ) |
| 557 | 563 | }); |
| 558 | - throw new Error("被新增的数据集desDataset不能为空!"); | |
| 564 | + throw new Error("The newly added dataset desDataset cannot be empty!"); | |
| 559 | 565 | } else if (desDataset.includes("@") || desDataset.includes(",")) { |
| 560 | 566 | showMsg({ |
| 561 | 567 | type: "error", |
| 562 | 568 | content: ( |
| 563 | 569 | <div> |
| 564 | - <div>被新增的数据集desDataset不支持@或,写法!</div> | |
| 565 | - <div>请检查该新增指令集:</div> | |
| 570 | + <div>The newly added dataset desDataset does not support @ or ,!</div> | |
| 571 | + <div>Please check the newly added instruction set:</div> | |
| 566 | 572 | <div>{JSON.stringify(instruct)}</div> |
| 567 | 573 | </div> |
| 568 | 574 | ) |
| 569 | 575 | }); |
| 570 | - throw new Error("被新增的数据集desDataset不支持@或,写法!"); | |
| 576 | + throw new Error("The newly added dataset desDataset does not support @ or ,!"); | |
| 571 | 577 | } |
| 572 | 578 | |
| 573 | 579 | const { |
| ... | ... | @@ -908,14 +914,14 @@ const handleMesSave = (props, instruct) => { |
| 908 | 914 | content: ( |
| 909 | 915 | <div> |
| 910 | 916 | <div> |
| 911 | - 保存指令集data中的tablename和srcDataset为必填项,请检查该指令集配置! | |
| 917 | + The tablename and srcDataset fields in the save instruction set data are required. Please check the instruction set configuration! | |
| 912 | 918 | </div> |
| 913 | 919 | <div>{JSON.stringify(instruct)}</div> |
| 914 | 920 | </div> |
| 915 | 921 | ) |
| 916 | 922 | }); |
| 917 | 923 | throw new Error( |
| 918 | - "保存指令集data中的tablename和srcDataset为必填项,请检查该指令集配置!" | |
| 924 | + "The tablename and srcDataset fields in the save instruction set data are required. Please check the instruction set configuration!" | |
| 919 | 925 | ); |
| 920 | 926 | } |
| 921 | 927 | const { |
| ... | ... | @@ -1004,12 +1010,12 @@ const handleMesSaveAll = async (props, onSucess) => { |
| 1004 | 1010 | type: "error", |
| 1005 | 1011 | content: ( |
| 1006 | 1012 | <div> |
| 1007 | - <div>save接口报错!</div> | |
| 1008 | - <div>请求地址:</div> | |
| 1013 | + <div>Save interface error!</div> | |
| 1014 | + <div>Request address:</div> | |
| 1009 | 1015 | <div>{dataUrl}</div> |
| 1010 | - <div>传入参数:</div> | |
| 1016 | + <div>Pass in parameters:</div> | |
| 1011 | 1017 | <div>{JSON.stringify(values)}</div> |
| 1012 | - <div>报错信息</div> | |
| 1018 | + <div>Error message</div> | |
| 1013 | 1019 | <div>{JSON.stringify(dataReturn)}</div> |
| 1014 | 1020 | </div> |
| 1015 | 1021 | ) |
| ... | ... | @@ -1190,12 +1196,12 @@ const handleSendMsgAll = async props => { |
| 1190 | 1196 | type: "error", |
| 1191 | 1197 | content: ( |
| 1192 | 1198 | <div> |
| 1193 | - <div>sendmsg接口报错!</div> | |
| 1194 | - <div>请求地址:</div> | |
| 1199 | + <div>The sendmsg interface reports an error!</div> | |
| 1200 | + <div>Request address:</div> | |
| 1195 | 1201 | <div>{dataUrl}</div> |
| 1196 | - <div>传入参数:</div> | |
| 1202 | + <div>Pass in parameters:</div> | |
| 1197 | 1203 | <div>{JSON.stringify(values)}</div> |
| 1198 | - <div>报错信息</div> | |
| 1204 | + <div>Error message</div> | |
| 1199 | 1205 | <div>{JSON.stringify(dataReturn)}</div> |
| 1200 | 1206 | </div> |
| 1201 | 1207 | ) |
| ... | ... | @@ -1231,13 +1237,13 @@ const handlePrint = (props, instruct) => { |
| 1231 | 1237 | type: "error", |
| 1232 | 1238 | content: ( |
| 1233 | 1239 | <div> |
| 1234 | - <div>报表名称不能为空!</div> | |
| 1235 | - <div>请检查打印报表指令集:</div> | |
| 1240 | + <div>Report name cannot be empty!</div> | |
| 1241 | + <div>Please check the print report instruction set:</div> | |
| 1236 | 1242 | <div>{JSON.stringify(instruct)}</div> |
| 1237 | 1243 | </div> |
| 1238 | 1244 | ) |
| 1239 | 1245 | }); |
| 1240 | - throw new Error("打印报表名称不能为空!"); | |
| 1246 | + throw new Error("The print report name cannot be empty!"); | |
| 1241 | 1247 | } |
| 1242 | 1248 | |
| 1243 | 1249 | const dataUrl = `${ |
| ... | ... | @@ -1557,13 +1563,13 @@ const handleOpenSql = async (props, instruct) => { |
| 1557 | 1563 | type: "error", |
| 1558 | 1564 | content: ( |
| 1559 | 1565 | <div> |
| 1560 | - <div>{`获取${dataNameList[index]}数据集数据为空!`}</div> | |
| 1561 | - <div>错误指令集内容:</div> | |
| 1566 | + <div>{`The data of ${dataNameList[index]} dataset is empty!`}</div> | |
| 1567 | + <div>Error instruction set content:</div> | |
| 1562 | 1568 | <div>{JSON.stringify(instruct)}</div> |
| 1563 | 1569 | </div> |
| 1564 | 1570 | ) |
| 1565 | 1571 | }); |
| 1566 | - throw new Error(`获取${dataNameList[index]}数据集数据为空!`); | |
| 1572 | + throw new Error(`The data of ${dataNameList[index]} dataset is empty!`); | |
| 1567 | 1573 | } |
| 1568 | 1574 | srcDatasetRow = { |
| 1569 | 1575 | ...srcDatasetRow, |
| ... | ... | @@ -1647,12 +1653,12 @@ const handleGetSqlValue = async (props, data, srcDatasetRow = {}) => { |
| 1647 | 1653 | type: "error", |
| 1648 | 1654 | content: ( |
| 1649 | 1655 | <div> |
| 1650 | - <div>opensql查询接口报错!</div> | |
| 1651 | - <div>请求地址:</div> | |
| 1656 | + <div>opensql Query interface error!</div> | |
| 1657 | + <div>Request address:</div> | |
| 1652 | 1658 | <div>{dataUrl}</div> |
| 1653 | - <div>传入参数:</div> | |
| 1659 | + <div>Pass in parameters:</div> | |
| 1654 | 1660 | <div>{JSON.stringify(values)}</div> |
| 1655 | - <div>报错信息</div> | |
| 1661 | + <div>Error message:</div> | |
| 1656 | 1662 | <div>{JSON.stringify(dataReturn)}</div> |
| 1657 | 1663 | </div> |
| 1658 | 1664 | ) |
| ... | ... | @@ -1682,13 +1688,13 @@ const handleExeSql = (props, instruct) => { |
| 1682 | 1688 | type: "error", |
| 1683 | 1689 | content: ( |
| 1684 | 1690 | <div> |
| 1685 | - <div>{`获取${srcDataset}数据集数据为空!`}</div> | |
| 1686 | - <div>错误指令集内容:</div> | |
| 1691 | + <div>{`The ${srcDataset} dataset data is empty!`}</div> | |
| 1692 | + <div>Error instruction set content:</div> | |
| 1687 | 1693 | <div>{JSON.stringify(instruct)}</div> |
| 1688 | 1694 | </div> |
| 1689 | 1695 | ) |
| 1690 | 1696 | }); |
| 1691 | - throw new Error(`获取${srcDataset}数据集数据为空!`); | |
| 1697 | + throw new Error(`The ${srcDataset} dataset data is empty!!`); | |
| 1692 | 1698 | } |
| 1693 | 1699 | |
| 1694 | 1700 | result.push({ |
| ... | ... | @@ -1716,13 +1722,13 @@ const handleProcedure = async (props, instruct) => { |
| 1716 | 1722 | type: "error", |
| 1717 | 1723 | content: ( |
| 1718 | 1724 | <div> |
| 1719 | - <div>存储过程配置为空!</div> | |
| 1720 | - <div>请检查该指令集:</div> | |
| 1725 | + <div>The stored procedure configuration is empty!</div> | |
| 1726 | + <div>Please check this instruction set:</div> | |
| 1721 | 1727 | <div>{JSON.stringify(instruct)}</div> |
| 1722 | 1728 | </div> |
| 1723 | 1729 | ) |
| 1724 | 1730 | }); |
| 1725 | - throw new Error("存储过程配置为空!"); | |
| 1731 | + throw new Error("The stored procedure configuration is empty!"); | |
| 1726 | 1732 | } |
| 1727 | 1733 | |
| 1728 | 1734 | if (bValidateList.length) { |
| ... | ... | @@ -1821,13 +1827,13 @@ const handleChangeTab = (props, instruct) => { |
| 1821 | 1827 | type: "error", |
| 1822 | 1828 | content: ( |
| 1823 | 1829 | <div> |
| 1824 | - <div>跳转tab页指令未配置tabName!</div> | |
| 1825 | - <div>请检查该指令集:</div> | |
| 1830 | + <div>The jump tab page instruction is not configured with tabName!</div> | |
| 1831 | + <div>Please check this instruction set:</div> | |
| 1826 | 1832 | <div>{JSON.stringify(instruct)}</div> |
| 1827 | 1833 | </div> |
| 1828 | 1834 | ) |
| 1829 | 1835 | }); |
| 1830 | - throw new Error("跳转tab页指令未配置tabName!"); | |
| 1836 | + throw new Error("The jump tab page instruction is not configured with tabName!"); | |
| 1831 | 1837 | } |
| 1832 | 1838 | changeTabName = tabName; |
| 1833 | 1839 | return {}; |
| ... | ... | @@ -1841,13 +1847,13 @@ const handleChangePage = (props, instruct) => { |
| 1841 | 1847 | type: "error", |
| 1842 | 1848 | content: ( |
| 1843 | 1849 | <div> |
| 1844 | - <div>跳转跳转页面指令未配置pagePath!</div> | |
| 1845 | - <div>请检查该指令集:</div> | |
| 1850 | + <div>The jump page instruction is not configured with pagePath!</div> | |
| 1851 | + <div>Please check this instruction set:</div> | |
| 1846 | 1852 | <div>{JSON.stringify(instruct)}</div> |
| 1847 | 1853 | </div> |
| 1848 | 1854 | ) |
| 1849 | 1855 | }); |
| 1850 | - throw new Error("跳转跳转页面指令未配置pagePath!"); | |
| 1856 | + throw new Error("The jump page instruction is not configured with pagePath!"); | |
| 1851 | 1857 | } |
| 1852 | 1858 | changePagePath = pagePath; |
| 1853 | 1859 | return {}; |
| ... | ... | @@ -1862,13 +1868,13 @@ const handlePoprepair = async (props, instruct) => { |
| 1862 | 1868 | type: "error", |
| 1863 | 1869 | content: ( |
| 1864 | 1870 | <div> |
| 1865 | - <div>跳转弹窗修改字段指令未配置title/fieldNames!</div> | |
| 1866 | - <div>请检查该指令集:</div> | |
| 1871 | + <div>The jump pop-up window to modify the field instruction is not configured with title/fieldNames!</div> | |
| 1872 | + <div>Please check this instruction set:</div> | |
| 1867 | 1873 | <div>{JSON.stringify(instruct)}</div> |
| 1868 | 1874 | </div> |
| 1869 | 1875 | ) |
| 1870 | 1876 | }); |
| 1871 | - throw new Error("跳转弹窗修改字段指令未配置title/fieldNames!"); | |
| 1877 | + throw new Error("The jump pop-up window to modify the field instruction is not configured with title/fieldNames!"); | |
| 1872 | 1878 | } |
| 1873 | 1879 | |
| 1874 | 1880 | const { tableLineParams = {} } = props; |
| ... | ... | @@ -1906,14 +1912,14 @@ const handlePoprepair = async (props, instruct) => { |
| 1906 | 1912 | content: ( |
| 1907 | 1913 | <div> |
| 1908 | 1914 | <div |
| 1909 | - >{`未找到字段集合【${fieldNames}】对应的配置,请确认配置是否正确!`}</div> | |
| 1910 | - <div>请检查该指令集:</div> | |
| 1915 | + >{`The configuration corresponding to the field set [${fieldNames}] was not found. Please confirm whether the configuration is correct!`}</div> | |
| 1916 | + <div>Please check this instruction set:</div> | |
| 1911 | 1917 | <div>{JSON.stringify(instruct)}</div> |
| 1912 | 1918 | </div> |
| 1913 | 1919 | ) |
| 1914 | 1920 | }); |
| 1915 | 1921 | throw new Error( |
| 1916 | - `未找到字段集合【${fieldNames}】对应的配置,请确认配置是否正确!` | |
| 1922 | + `The configuration corresponding to the field set [${fieldNames}] was not found. Please confirm whether the configuration is correct!` | |
| 1917 | 1923 | ); |
| 1918 | 1924 | } |
| 1919 | 1925 | |
| ... | ... | @@ -2057,12 +2063,12 @@ const handleExeSqlAll = async (props, onSucess) => { |
| 2057 | 2063 | type: "error", |
| 2058 | 2064 | content: ( |
| 2059 | 2065 | <div> |
| 2060 | - <div>exesql接口报错!</div> | |
| 2061 | - <div>请求地址:</div> | |
| 2066 | + <div>exesql interface reports an error!</div> | |
| 2067 | + <div>Request address:</div> | |
| 2062 | 2068 | <div>{dataUrl}</div> |
| 2063 | - <div>传入参数:</div> | |
| 2069 | + <div>Pass in parameters:</div> | |
| 2064 | 2070 | <div>{JSON.stringify(values)}</div> |
| 2065 | - <div>报错信息</div> | |
| 2071 | + <div>Error message:</div> | |
| 2066 | 2072 | <div>{JSON.stringify(dataReturn)}</div> |
| 2067 | 2073 | </div> |
| 2068 | 2074 | ) |
| ... | ... | @@ -2078,13 +2084,13 @@ const handleRefreshConfig = (props, instruct) => { |
| 2078 | 2084 | type: "error", |
| 2079 | 2085 | content: ( |
| 2080 | 2086 | <div> |
| 2081 | - <div>未配置srcDataset或srcDataset!</div> | |
| 2082 | - <div>请检查该指令集:</div> | |
| 2087 | + <div>srcDataset or srcDataset not configured!</div> | |
| 2088 | + <div>Please check this instruction set:</div> | |
| 2083 | 2089 | <div>{JSON.stringify(instruct)}</div> |
| 2084 | 2090 | </div> |
| 2085 | 2091 | ) |
| 2086 | 2092 | }); |
| 2087 | - throw new Error("未配置srcDataset或srcDataset!"); | |
| 2093 | + throw new Error("srcDataset or srcDataset not configured!"); | |
| 2088 | 2094 | } |
| 2089 | 2095 | |
| 2090 | 2096 | const { |
| ... | ... | @@ -2361,19 +2367,19 @@ const handleComputeData = (props, str, datasetList) => { |
| 2361 | 2367 | type: "error", |
| 2362 | 2368 | content: ( |
| 2363 | 2369 | <div> |
| 2364 | - <div>赋值运算错误!</div> | |
| 2365 | - <div>请检查赋值运算语法!</div> | |
| 2366 | - <div>赋值运算内容:</div> | |
| 2370 | + <div>Assignment operation error!</div> | |
| 2371 | + <div>Please check the assignment syntax!</div> | |
| 2372 | + <div>Assignment operation content:</div> | |
| 2367 | 2373 | <div>{str}</div> |
| 2368 | - <div>赋值运算被替代后的结果:</div> | |
| 2374 | + <div>The result after the assignment operation is replaced:</div> | |
| 2369 | 2375 | <div>{JSON.stringify(strNew)}</div> |
| 2370 | - <div>赋值运算可能用到的数据集:</div> | |
| 2376 | + <div>The data sets that may be used for the assignment operation are:</div> | |
| 2371 | 2377 | <div>{JSON.stringify(tempData)}</div> |
| 2372 | 2378 | </div> |
| 2373 | 2379 | ) |
| 2374 | 2380 | }); |
| 2375 | 2381 | window.debugger && console.log("=====err", { str, strNew, error }); |
| 2376 | - throw new Error("js运算错误"); | |
| 2382 | + throw new Error("js operation error"); | |
| 2377 | 2383 | } |
| 2378 | 2384 | return result; |
| 2379 | 2385 | }; |
| ... | ... | @@ -2687,13 +2693,13 @@ const utils = { |
| 2687 | 2693 | type: "error", |
| 2688 | 2694 | content: ( |
| 2689 | 2695 | <div> |
| 2690 | - <div>数据集的赋值字段sValue不能为空!</div> | |
| 2691 | - <div>请检查该指令集:</div> | |
| 2696 | + <div>The assigned field sValue of the dataset cannot be empty!</div> | |
| 2697 | + <div>Please check this instruction set:</div> | |
| 2692 | 2698 | <div>{JSON.stringify(instruct)}</div> |
| 2693 | 2699 | </div> |
| 2694 | 2700 | ) |
| 2695 | 2701 | }); |
| 2696 | - throw new Error("数据集的赋值字段sValue不能为空!"); | |
| 2702 | + throw new Error("The assigned field sValue of the dataset cannot be empty!"); | |
| 2697 | 2703 | } |
| 2698 | 2704 | |
| 2699 | 2705 | const { |
| ... | ... | @@ -2710,15 +2716,15 @@ const utils = { |
| 2710 | 2716 | type: "error", |
| 2711 | 2717 | content: ( |
| 2712 | 2718 | <div> |
| 2713 | - <div>{`${targetDataset}】数据源为空`}</div> | |
| 2714 | - <div>过滤出的数据集为:</div> | |
| 2719 | + <div>{`${targetDataset}] data source is empty`}</div> | |
| 2720 | + <div>The filtered data sets are:</div> | |
| 2715 | 2721 | <div>{JSON.stringify(dataObj)}</div> |
| 2716 | - <div>请检查该指令集:</div> | |
| 2722 | + <div>Please check this instruction set:</div> | |
| 2717 | 2723 | <div>{JSON.stringify(instruct)}</div> |
| 2718 | 2724 | </div> |
| 2719 | 2725 | ) |
| 2720 | 2726 | }); |
| 2721 | - throw new Error(`${targetDataset}】数据源为空`); | |
| 2727 | + throw new Error(`${targetDataset}] data source is empty`); | |
| 2722 | 2728 | } |
| 2723 | 2729 | |
| 2724 | 2730 | // const tableDataOld = props[`${targetDataset}Data`] || []; |
| ... | ... | @@ -2897,23 +2903,23 @@ const utils = { |
| 2897 | 2903 | type: "error", |
| 2898 | 2904 | content: ( |
| 2899 | 2905 | <div> |
| 2900 | - <div>conditon条件运算错误!</div> | |
| 2901 | - <div>1、请检查condition语法!</div> | |
| 2902 | - <div>2、请检查ccondition用到的数据集是否在dataset中正确配置!</div> | |
| 2903 | - <div>conditon所在指令集:</div> | |
| 2906 | + <div>Condition operation error!</div> | |
| 2907 | + <div>1. Please check the condition syntax!</div> | |
| 2908 | + <div>2. Please check whether the dataset used by ccondition is correctly configured in dataset!</div> | |
| 2909 | + <div>Instruction set where condition is located:</div> | |
| 2904 | 2910 | <div>{JSON.stringify(instruct)}</div> |
| 2905 | - <div>conditon内容:</div> | |
| 2911 | + <div>condition content:</div> | |
| 2906 | 2912 | <div>{condition}</div> |
| 2907 | - <div>condition被替代后的结果:</div> | |
| 2913 | + <div>The result after condition is replaced:</div> | |
| 2908 | 2914 | <div>{JSON.stringify(conditionNew)}</div> |
| 2909 | - <div>condition可能用到的数据集:</div> | |
| 2915 | + <div>The data set that condition may use is:</div> | |
| 2910 | 2916 | <div>{JSON.stringify(tempData)}</div> |
| 2911 | 2917 | </div> |
| 2912 | 2918 | ) |
| 2913 | 2919 | }); |
| 2914 | 2920 | window.debugger && |
| 2915 | 2921 | console.log("=====err", { tempData, condition, conditionNew, error }); |
| 2916 | - throw new Error("js运算错误"); | |
| 2922 | + throw new Error("js operation error"); | |
| 2917 | 2923 | } |
| 2918 | 2924 | |
| 2919 | 2925 | return bMatch; |
| ... | ... | @@ -3017,9 +3023,9 @@ const utils = { |
| 3017 | 3023 | if (oTabs.length === 0) { |
| 3018 | 3024 | showMsg({ |
| 3019 | 3025 | type: "error", |
| 3020 | - content: <div>{`未找到tab页面【${changeTabName}】`}</div> | |
| 3026 | + content: <div>{`Tab page [${changeTabName}] not found`}</div> | |
| 3021 | 3027 | }); |
| 3022 | - throw new error(`未找到tab页面【${changeTabName}】`); | |
| 3028 | + throw new error(`Tab page [${changeTabName}] not found`); | |
| 3023 | 3029 | } else if (oTabs.length === 1) { |
| 3024 | 3030 | oTab = oTabs[0]; |
| 3025 | 3031 | } else if (oTabs.length > 1) { |
| ... | ... | @@ -3034,9 +3040,9 @@ const utils = { |
| 3034 | 3040 | if (!oTab) { |
| 3035 | 3041 | showMsg({ |
| 3036 | 3042 | type: "error", |
| 3037 | - content: <div>{`未找到tab页面【${changeTabName}】`}</div> | |
| 3043 | + content: <div>{`Tab page [${changeTabName}] not found`}</div> | |
| 3038 | 3044 | }); |
| 3039 | - throw new error(`未找到tab页面【${changeTabName}】`); | |
| 3045 | + throw new error(`Tab page [${changeTabName}] not found`); | |
| 3040 | 3046 | } |
| 3041 | 3047 | |
| 3042 | 3048 | oTab.click(); |
| ... | ... | @@ -3192,13 +3198,13 @@ const utils = { |
| 3192 | 3198 | type: "error", |
| 3193 | 3199 | content: ( |
| 3194 | 3200 | <div> |
| 3195 | - <div>js运算错误!</div> | |
| 3196 | - <div>请检查js运算语法!</div> | |
| 3197 | - <div>js运算内容:</div> | |
| 3201 | + <div>js operation error!</div> | |
| 3202 | + <div>Please check the js operation syntax!</div> | |
| 3203 | + <div>js operation content:</div> | |
| 3198 | 3204 | <div>{stringValue}</div> |
| 3199 | - <div>赋值运算被替代后的结果:</div> | |
| 3205 | + <div>The result after the assignment operation is replaced:</div> | |
| 3200 | 3206 | <div>{JSON.stringify(strNew)}</div> |
| 3201 | - <div>请联系开发人员或用window.debuggerValue功能调试!</div> | |
| 3207 | + <div>Please contact the developer or use the window.debuggerValue function to debug!</div> | |
| 3202 | 3208 | </div> |
| 3203 | 3209 | ) |
| 3204 | 3210 | }); | ... | ... |
src/components/Common/CommonTable/index.js
| ... | ... | @@ -11456,7 +11456,7 @@ class CommonTableRc extends React.Component { |
| 11456 | 11456 | {officePreviewVisible && <OfficePreview {...officePreviewProps} />} |
| 11457 | 11457 | {labelColorModalVisible && ( |
| 11458 | 11458 | <Modal |
| 11459 | - title="标牌颜色" | |
| 11459 | + title={commonFunc.showLocalMessage(this.props, 'signColor', '标牌颜色')} | |
| 11460 | 11460 | open={labelColorModalVisible} |
| 11461 | 11461 | width={600} |
| 11462 | 11462 | height={320} |
| ... | ... | @@ -11468,7 +11468,7 @@ class CommonTableRc extends React.Component { |
| 11468 | 11468 | )} |
| 11469 | 11469 | > |
| 11470 | 11470 | <div className={styles.labelColorModal}> |
| 11471 | - {"白粉青蓝橙绿黄红".split("").map((item, index) => { | |
| 11471 | + {commonFunc.showLocalMessage(this.props, 'eightColors', '白,粉,青,蓝,橙,绿,黄,红').split(",").map((item, index) => { | |
| 11472 | 11472 | return ( |
| 11473 | 11473 | <div> |
| 11474 | 11474 | <div | ... | ... |
src/lang/en-lang.less
| 1 | 1 | :global { |
| 2 | 2 | html[lang="sEnglish"] { |
| 3 | + | |
| 4 | + #global-mouse-tooltip { | |
| 5 | + position: fixed; | |
| 6 | + background: rgba(0, 0, 0, 0.75); | |
| 7 | + color: #fff; | |
| 8 | + padding: 4px 8px; | |
| 9 | + border-radius: 2px; | |
| 10 | + font-size: 14px; | |
| 11 | + // pointer-events: none; | |
| 12 | + z-index: 9999; | |
| 13 | + white-space: nowrap; | |
| 14 | + left: '0'; | |
| 15 | + top: '0'; | |
| 16 | + opacity: '0'; | |
| 17 | + transition: opacity 0.2s; | |
| 18 | + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); | |
| 19 | + } | |
| 20 | + | |
| 21 | + .ant-tabs-tab { | |
| 22 | + flex-shrink: 0; | |
| 23 | + } | |
| 24 | + | |
| 25 | + .ant-tabs-tab-btn { | |
| 26 | + font-size: 12px; | |
| 27 | + display: -webkit-box; | |
| 28 | + /*! autoprefixer: ignore next */ | |
| 29 | + -webkit-box-orient: vertical; | |
| 30 | + -webkit-line-clamp: 2; | |
| 31 | + /* 只保留 2 行 */ | |
| 32 | + overflow: hidden; | |
| 33 | + text-overflow: ellipsis; | |
| 34 | + /* 兜底 */ | |
| 35 | + white-space: normal; | |
| 36 | + /* 覆盖 antd 默认 nowrap */ | |
| 37 | + width: 120px; | |
| 38 | + /* 按需调整,决定何时断行 */ | |
| 39 | + line-height: 1; | |
| 40 | + } | |
| 41 | + | |
| 42 | + | |
| 43 | + .ant-table-header table { | |
| 44 | + | |
| 45 | + .th-div, | |
| 46 | + th div:not([class]) { | |
| 47 | + display: -webkit-box; | |
| 48 | + /*! autoprefixer: ignore next */ | |
| 49 | + -webkit-box-orient: vertical; | |
| 50 | + -webkit-line-clamp: 1; | |
| 51 | + /* 只保留 2 行 */ | |
| 52 | + overflow: hidden; | |
| 53 | + text-overflow: ellipsis; | |
| 54 | + /* 兜底 */ | |
| 55 | + white-space: normal; | |
| 56 | + word-break: break-all; | |
| 57 | + /* 覆盖 antd 默认 nowrap */ | |
| 58 | + // width: 120px; | |
| 59 | + /* 按需调整,决定何时断行 */ | |
| 60 | + line-height: 1.2; | |
| 61 | + } | |
| 62 | + } | |
| 63 | + | |
| 64 | + .ant-form-item-label { | |
| 65 | + display: flex; | |
| 66 | + align-items: center; | |
| 67 | + padding: 0 6px 0 16px; | |
| 68 | + | |
| 69 | + label { | |
| 70 | + // padding: 3px; | |
| 71 | + height: auto; | |
| 72 | + font-size: 14px !important; | |
| 73 | + display: -webkit-box; | |
| 74 | + /*! autoprefixer: ignore next */ | |
| 75 | + -webkit-box-orient: vertical; | |
| 76 | + -webkit-line-clamp: 2; | |
| 77 | + /* 只保留 2 行 */ | |
| 78 | + overflow: hidden; | |
| 79 | + text-overflow: ellipsis; | |
| 80 | + /* 兜底 */ | |
| 81 | + white-space: normal; | |
| 82 | + /* 覆盖 antd 默认 nowrap */ | |
| 83 | + // width: 120px; | |
| 84 | + /* 按需调整,决定何时断行 */ | |
| 85 | + line-height: 1.2; | |
| 86 | + } | |
| 87 | + } | |
| 88 | + | |
| 89 | + .mesShowType .ant-form-item-label { | |
| 90 | + padding: 0 0 0 10px; | |
| 91 | + label { | |
| 92 | + font-size: 18px !important; | |
| 93 | + } | |
| 94 | + } | |
| 95 | + | |
| 96 | + | |
| 97 | + .ant-table-column-title { | |
| 98 | + overflow: initial; | |
| 99 | + } | |
| 100 | + | |
| 101 | + .react-grid-item .ant-form-item-label>label { | |
| 102 | + &::before { | |
| 103 | + display: none; | |
| 104 | + } | |
| 105 | + | |
| 106 | + &::after { | |
| 107 | + display: none; | |
| 108 | + } | |
| 109 | + | |
| 110 | + display: flex; | |
| 111 | + justify-content: center; | |
| 112 | + | |
| 113 | + .xly-grid-label { | |
| 114 | + height: auto !important; | |
| 115 | + font-size: 10px !important; | |
| 116 | + display: -webkit-box; | |
| 117 | + /*! autoprefixer: ignore next */ | |
| 118 | + -webkit-box-orient: vertical; | |
| 119 | + -webkit-line-clamp: 2; | |
| 120 | + overflow: hidden; | |
| 121 | + text-overflow: ellipsis; | |
| 122 | + white-space: normal !important; | |
| 123 | + line-height: 1.2; | |
| 124 | + | |
| 125 | + &::after { | |
| 126 | + content: ':'; | |
| 127 | + position: relative; | |
| 128 | + top: -0.5px; | |
| 129 | + margin: 0 8px 0 2px; | |
| 130 | + } | |
| 131 | + } | |
| 132 | + } | |
| 133 | + | |
| 134 | + .react-grid-item .ant-form-item-label>label.ant-form-item-required:not(.ant-form-item-required-mark-optional) { | |
| 135 | + .xly-grid-label { | |
| 136 | + &::before { | |
| 137 | + display: inline-block; | |
| 138 | + margin-right: 4px; | |
| 139 | + color: #ff4d4f; | |
| 140 | + font-size: 12px; | |
| 141 | + font-family: SimSun, sans-serif; | |
| 142 | + line-height: 1; | |
| 143 | + content: '*'; | |
| 144 | + } | |
| 145 | + } | |
| 146 | + } | |
| 147 | + | |
| 3 | 148 | th[width="40"] { |
| 4 | 149 | .th-div { |
| 5 | 150 | width: 32px; | ... | ... |
src/mes/common/commonModelComponent/index.js
| ... | ... | @@ -2460,6 +2460,13 @@ const CommonParamsModalComponent = props => { |
| 2460 | 2460 | } |
| 2461 | 2461 | }; |
| 2462 | 2462 | |
| 2463 | + const confirm = commonFunc.showLocalMessage(props, 'confirm', '确认'); | |
| 2464 | + const BtnFirst = commonFunc.showLocalMessage(props, 'BtnFirst', '首条'); | |
| 2465 | + const BtnPrior = commonFunc.showLocalMessage(props, 'BtnPrior', '上一条'); | |
| 2466 | + const BtnNext = commonFunc.showLocalMessage(props, 'BtnNext', '下一条'); | |
| 2467 | + const BtnLast = commonFunc.showLocalMessage(props, 'BtnLast', '末条'); | |
| 2468 | + const workParam = commonFunc.showLocalMessage(props, "workParam", "工单参数"); | |
| 2469 | + | |
| 2463 | 2470 | return props[modalName] ? ( |
| 2464 | 2471 | <Modal |
| 2465 | 2472 | width="80%" |
| ... | ... | @@ -2477,7 +2484,7 @@ const CommonParamsModalComponent = props => { |
| 2477 | 2484 | props.onSaveState({ [modalName]: false }); |
| 2478 | 2485 | }} |
| 2479 | 2486 | > |
| 2480 | - 确定 | |
| 2487 | + {confirm} | |
| 2481 | 2488 | </Button> |
| 2482 | 2489 | } |
| 2483 | 2490 | > |
| ... | ... | @@ -2490,7 +2497,7 @@ const CommonParamsModalComponent = props => { |
| 2490 | 2497 | handleBtnParamPage("first"); |
| 2491 | 2498 | }} |
| 2492 | 2499 | > |
| 2493 | - 首条 | |
| 2500 | + {BtnFirst} | |
| 2494 | 2501 | </Button> |
| 2495 | 2502 | <Button |
| 2496 | 2503 | type="primary" |
| ... | ... | @@ -2499,7 +2506,7 @@ const CommonParamsModalComponent = props => { |
| 2499 | 2506 | handleBtnParamPage("before"); |
| 2500 | 2507 | }} |
| 2501 | 2508 | > |
| 2502 | - 上一条 | |
| 2509 | + {BtnPrior} | |
| 2503 | 2510 | </Button> |
| 2504 | 2511 | <Button |
| 2505 | 2512 | type="primary" |
| ... | ... | @@ -2508,7 +2515,7 @@ const CommonParamsModalComponent = props => { |
| 2508 | 2515 | handleBtnParamPage("next"); |
| 2509 | 2516 | }} |
| 2510 | 2517 | > |
| 2511 | - 下一条 | |
| 2518 | + {BtnNext} | |
| 2512 | 2519 | </Button> |
| 2513 | 2520 | <Button |
| 2514 | 2521 | type="primary" |
| ... | ... | @@ -2517,7 +2524,7 @@ const CommonParamsModalComponent = props => { |
| 2517 | 2524 | handleBtnParamPage("last"); |
| 2518 | 2525 | }} |
| 2519 | 2526 | > |
| 2520 | - 末条 | |
| 2527 | + {BtnLast} | |
| 2521 | 2528 | </Button> |
| 2522 | 2529 | </Space> |
| 2523 | 2530 | {[""].map(() => { |
| ... | ... | @@ -2528,7 +2535,7 @@ const CommonParamsModalComponent = props => { |
| 2528 | 2535 | sParamData: [ |
| 2529 | 2536 | { |
| 2530 | 2537 | sParamType: "sWorkOrder", |
| 2531 | - sParamName: "工单参数" | |
| 2538 | + sParamName: workParam | |
| 2532 | 2539 | } |
| 2533 | 2540 | ], |
| 2534 | 2541 | tableName: "process", | ... | ... |
src/mes/common/inputMultiModalComponent/index.js
| ... | ... | @@ -70,6 +70,9 @@ const InputMultiModalComponent = props => { |
| 70 | 70 | props.onCancel(); |
| 71 | 71 | }; |
| 72 | 72 | |
| 73 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 74 | + const confirm = commonFunc.showLocalMessage(props, 'confirm', '确认'); | |
| 75 | + | |
| 73 | 76 | return ( |
| 74 | 77 | <Modal |
| 75 | 78 | width={600} |
| ... | ... | @@ -81,10 +84,10 @@ const InputMultiModalComponent = props => { |
| 81 | 84 | footer={ |
| 82 | 85 | <Space> |
| 83 | 86 | <Button size="large" onClick={() => props.onCancel()}> |
| 84 | - 取消 | |
| 87 | + {BtnCancel} | |
| 85 | 88 | </Button> |
| 86 | 89 | <Button type="primary" size="large" onClick={onOk}> |
| 87 | - 确定 | |
| 90 | + {confirm} | |
| 88 | 91 | </Button> |
| 89 | 92 | </Space> |
| 90 | 93 | } | ... | ... |
src/mes/common/siderInfoComponent/index.js
| ... | ... | @@ -446,7 +446,7 @@ const WorkOrderTypeComponent = () => { |
| 446 | 446 | flex={"160px"} |
| 447 | 447 | className={styles.productionTitle} |
| 448 | 448 | > |
| 449 | - {productionSchedule} | |
| 449 | + <span title={productionSchedule}>{productionSchedule}</span> | |
| 450 | 450 | {/* <Button |
| 451 | 451 | type="link" |
| 452 | 452 | icon={<LeftOutlined />} |
| ... | ... | @@ -492,7 +492,7 @@ const WorkOrderTypeComponent = () => { |
| 492 | 492 | flex={"160px"} |
| 493 | 493 | className={styles.productionTitle} |
| 494 | 494 | > |
| 495 | - {specialFocus} | |
| 495 | + <span title={specialFocus}>{specialFocus}</span> | |
| 496 | 496 | </Col> |
| 497 | 497 | <Col |
| 498 | 498 | flex={1} |
| ... | ... | @@ -525,7 +525,7 @@ const WorkOrderTypeComponent = () => { |
| 525 | 525 | flex={"160px"} |
| 526 | 526 | className={styles.productionTitle} |
| 527 | 527 | > |
| 528 | - {config.showName}: | |
| 528 | + <span title={config.showName}>{config.showName}:</span> | |
| 529 | 529 | </Col> |
| 530 | 530 | <Col |
| 531 | 531 | flex={1} | ... | ... |
src/mes/indexMes/index.js
| ... | ... | @@ -106,12 +106,11 @@ const OpenModalEditPwd = props => { |
| 106 | 106 | const oldPassword = commonFunc.showLocalMessage(props, 'oldPassword', '请输入原密码'); |
| 107 | 107 | const newPassword = commonFunc.showLocalMessage(props, 'newPassword', '请输入新密码'); |
| 108 | 108 | const passswordAgain = commonFunc.showLocalMessage(props, 'passswordAgain', '请再次输入密码'); |
| 109 | - const ModifyPassword = commonFunc.showLocalMessage(props, 'ModifyPassword','修改密码');/* 修改 */ | |
| 109 | + const ModifyPassword = commonFunc.showLocalMessage(props, 'ModifyPassword', '修改密码');/* 修改 */ | |
| 110 | 110 | // 确认修改密码 |
| 111 | 111 | const handleOk = () => { |
| 112 | - const url = `${ | |
| 113 | - commonConfig.server_host | |
| 114 | - }sftlogininfo/updatePasswordUserName/update?sModelsId=${100}`; | |
| 112 | + const url = `${commonConfig.server_host | |
| 113 | + }sftlogininfo/updatePasswordUserName/update?sModelsId=${100}`; | |
| 115 | 114 | props.dispatch({ |
| 116 | 115 | type: "app/editPwd", |
| 117 | 116 | payload: { |
| ... | ... | @@ -369,6 +368,9 @@ const useIndexMesEvent = props => { |
| 369 | 368 | const { userinfo } = props.app; |
| 370 | 369 | const { sLanguage } = userinfo; |
| 371 | 370 | document.querySelector('html').setAttribute('lang', sLanguage); |
| 371 | + return () => { | |
| 372 | + document.querySelector('html').setAttribute('lang', 'en'); | |
| 373 | + } | |
| 372 | 374 | }, []); |
| 373 | 375 | |
| 374 | 376 | return { |
| ... | ... | @@ -427,9 +429,8 @@ const IndexMes = baseProps => { |
| 427 | 429 | token, |
| 428 | 430 | sModelsId |
| 429 | 431 | ) => { |
| 430 | - const url = `${ | |
| 431 | - commonConfig.server_host | |
| 432 | - }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`; | |
| 432 | + const url = `${commonConfig.server_host | |
| 433 | + }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`; | |
| 433 | 434 | const returnData = (await commonServices.postValueService( |
| 434 | 435 | token, |
| 435 | 436 | value, |
| ... | ... | @@ -446,16 +447,16 @@ const IndexMes = baseProps => { |
| 446 | 447 | }; |
| 447 | 448 | const currentLanguage = props?.app?.userinfo?.sLanguage || 'zhCN'; // 默认为中文 |
| 448 | 449 | const getLocale = () => { |
| 449 | - switch(currentLanguage) { | |
| 450 | + switch (currentLanguage) { | |
| 450 | 451 | case 'sEnglish': |
| 451 | 452 | return enUS; |
| 452 | 453 | case 'sBig5': |
| 453 | 454 | return zhTW; |
| 454 | 455 | default: |
| 455 | - { | |
| 456 | - moment.locale('zh-cn'); | |
| 457 | - return zhCN; | |
| 458 | - } | |
| 456 | + { | |
| 457 | + moment.locale('zh-cn'); | |
| 458 | + return zhCN; | |
| 459 | + } | |
| 459 | 460 | } |
| 460 | 461 | }; |
| 461 | 462 | const bExsitLogin = commonFunc.showLocalMessage(props, 'bExsitLogin', '是否退出登录'); |
| ... | ... | @@ -482,7 +483,7 @@ const IndexMes = baseProps => { |
| 482 | 483 | {logoutShow && ( |
| 483 | 484 | <DraggableConfirmModal |
| 484 | 485 | btnShow={false} |
| 485 | - title ={FriendlyReminder} | |
| 486 | + title={FriendlyReminder} | |
| 486 | 487 | content={bExsitLogin} |
| 487 | 488 | props={props} |
| 488 | 489 | onOk={() => { |
| ... | ... | @@ -510,7 +511,7 @@ const HeaderConponent = () => { |
| 510 | 511 | |
| 511 | 512 | const sLanguage = userinfo.sLanguage; |
| 512 | 513 | let weekday = ["日", "一", "二", "三", "四", "五", "六"]; |
| 513 | - const sunTitle = sLanguage ==='sChinese' ? '星期' : ''; | |
| 514 | + const sunTitle = sLanguage === 'sChinese' ? '星期' : ''; | |
| 514 | 515 | const [time, setTime] = useState("0000-00-00 00:00:00"); |
| 515 | 516 | const { logout } = useContext(myContext); |
| 516 | 517 | useEffect(() => { |
| ... | ... | @@ -532,8 +533,8 @@ const HeaderConponent = () => { |
| 532 | 533 | |
| 533 | 534 | |
| 534 | 535 | const logoTitle = commonFunc.showLocalMessage(props, 'EBC-MES', '小羚羊生产执行系统'); |
| 535 | - const account= commonFunc.showLocalMessage(props, 'account', '账号'); | |
| 536 | - const machine= commonFunc.showLocalMessage(props, 'machine', '机台'); | |
| 536 | + const account = commonFunc.showLocalMessage(props, 'account', '账号'); | |
| 537 | + const machine = commonFunc.showLocalMessage(props, 'machine', '机台'); | |
| 537 | 538 | const classGroup = commonFunc.showLocalMessage(props, 'classGroup', '班组'); |
| 538 | 539 | const dayShift = commonFunc.showLocalMessage(props, 'dayShift', '白班'); |
| 539 | 540 | const nightShift = commonFunc.showLocalMessage(props, 'nightShift', '夜班'); |
| ... | ... | @@ -577,16 +578,16 @@ const HeaderConponent = () => { |
| 577 | 578 | |
| 578 | 579 | |
| 579 | 580 | |
| 580 | - const [ isModalOpen, setIsModalOpen ] = useState(false); | |
| 581 | - const objRef = useRef({}); | |
| 582 | - const handleCancel = () => setIsModalOpen(false); | |
| 583 | - window.$wkcFullStatus = (item , is) =>{ | |
| 584 | - objRef.current = { | |
| 585 | - ...objRef.current, | |
| 586 | - ...item | |
| 587 | - } | |
| 588 | - setIsModalOpen(is); | |
| 581 | + const [isModalOpen, setIsModalOpen] = useState(false); | |
| 582 | + const objRef = useRef({}); | |
| 583 | + const handleCancel = () => setIsModalOpen(false); | |
| 584 | + window.$wkcFullStatus = (item, is) => { | |
| 585 | + objRef.current = { | |
| 586 | + ...objRef.current, | |
| 587 | + ...item | |
| 589 | 588 | } |
| 589 | + setIsModalOpen(is); | |
| 590 | + } | |
| 590 | 591 | |
| 591 | 592 | |
| 592 | 593 | |
| ... | ... | @@ -626,20 +627,20 @@ const HeaderConponent = () => { |
| 626 | 627 | <div className="logout" onClick={logout} /> |
| 627 | 628 | </div> |
| 628 | 629 | |
| 629 | - <Modal | |
| 630 | - title="Basic Modal" | |
| 631 | - open={isModalOpen} | |
| 632 | - width={'100vw'} | |
| 633 | - height={'100vh'} | |
| 634 | - onCancel={handleCancel} | |
| 635 | - footer={null} | |
| 636 | - mask={false} | |
| 637 | - closable={false} | |
| 638 | - destroyOnClose={true} | |
| 639 | - maskClosable={false} | |
| 640 | - wrapClassName={ styles.ztwwwww }> | |
| 641 | - <MachineMessageComponent e={objRef.current} shutDown={handleCancel} props ={props} /> | |
| 642 | - </Modal> | |
| 630 | + <Modal | |
| 631 | + title="Basic Modal" | |
| 632 | + open={isModalOpen} | |
| 633 | + width={'100vw'} | |
| 634 | + height={'100vh'} | |
| 635 | + onCancel={handleCancel} | |
| 636 | + footer={null} | |
| 637 | + mask={false} | |
| 638 | + closable={false} | |
| 639 | + destroyOnClose={true} | |
| 640 | + maskClosable={false} | |
| 641 | + wrapClassName={styles.ztwwwww}> | |
| 642 | + <MachineMessageComponent e={objRef.current} shutDown={handleCancel} props={props} /> | |
| 643 | + </Modal> | |
| 643 | 644 | |
| 644 | 645 | </div> |
| 645 | 646 | ); |
| ... | ... | @@ -647,41 +648,41 @@ const HeaderConponent = () => { |
| 647 | 648 | |
| 648 | 649 | |
| 649 | 650 | // 停机状态栏 |
| 650 | -const MachineMessageComponent = ({ e , shutDown, props }) => { | |
| 651 | - const value = e.item?.props?.value || {}; | |
| 652 | - const { current: startTime } = useRef(moment().format("YYYY-MM-DD HH:mm:ss")); | |
| 653 | - const { backgroundColor, conent2, fontSize } = value; | |
| 654 | - const [currentTime, setCurrentTime] = useState(""); | |
| 655 | - const [diffHours, setDiffHours] = useState(0); | |
| 656 | - const [diffMins, setDiffMins] = useState(0); | |
| 657 | - const [diffSecs, setDiffSecs] = useState(0); | |
| 658 | - useEffect(() => { | |
| 659 | - const getTime = () => { | |
| 660 | - const currentTimeNew = moment().format("YYYY-MM-DD HH:mm:ss"); | |
| 661 | - setCurrentTime(currentTimeNew); | |
| 662 | - | |
| 663 | - const duration = moment.duration( | |
| 664 | - moment(currentTimeNew).diff(moment(startTime)) | |
| 665 | - ); | |
| 666 | - const hours = duration.asHours().toString().split(".")[0]; | |
| 667 | - const minutes = (duration.asMinutes() % 60).toString().split(".")[0]; | |
| 668 | - const seconds = duration.asSeconds() % 60; | |
| 669 | - | |
| 670 | - setDiffHours(hours<=9? `0${hours}`: hours); | |
| 671 | - setDiffMins(minutes<=9? `0${minutes}`: minutes ); | |
| 672 | - setDiffSecs(seconds<=9? `0${seconds}`: seconds); | |
| 673 | - }; | |
| 651 | +const MachineMessageComponent = ({ e, shutDown, props }) => { | |
| 652 | + const value = e.item?.props?.value || {}; | |
| 653 | + const { current: startTime } = useRef(moment().format("YYYY-MM-DD HH:mm:ss")); | |
| 654 | + const { backgroundColor, conent2, fontSize } = value; | |
| 655 | + const [currentTime, setCurrentTime] = useState(""); | |
| 656 | + const [diffHours, setDiffHours] = useState(0); | |
| 657 | + const [diffMins, setDiffMins] = useState(0); | |
| 658 | + const [diffSecs, setDiffSecs] = useState(0); | |
| 659 | + useEffect(() => { | |
| 660 | + const getTime = () => { | |
| 661 | + const currentTimeNew = moment().format("YYYY-MM-DD HH:mm:ss"); | |
| 662 | + setCurrentTime(currentTimeNew); | |
| 663 | + | |
| 664 | + const duration = moment.duration( | |
| 665 | + moment(currentTimeNew).diff(moment(startTime)) | |
| 666 | + ); | |
| 667 | + const hours = duration.asHours().toString().split(".")[0]; | |
| 668 | + const minutes = (duration.asMinutes() % 60).toString().split(".")[0]; | |
| 669 | + const seconds = duration.asSeconds() % 60; | |
| 670 | + | |
| 671 | + setDiffHours(hours <= 9 ? `0${hours}` : hours); | |
| 672 | + setDiffMins(minutes <= 9 ? `0${minutes}` : minutes); | |
| 673 | + setDiffSecs(seconds <= 9 ? `0${seconds}` : seconds); | |
| 674 | + }; | |
| 674 | 675 | |
| 676 | + getTime(); | |
| 677 | + const timer = setInterval(() => { | |
| 678 | + console.log('定时器状态') | |
| 675 | 679 | getTime(); |
| 676 | - const timer = setInterval(() => { | |
| 677 | - console.log('定时器状态') | |
| 678 | - getTime(); | |
| 679 | - }, 1000); | |
| 680 | + }, 1000); | |
| 680 | 681 | |
| 681 | - return () => { | |
| 682 | - clearInterval(timer); | |
| 683 | - }; | |
| 684 | - }, []); | |
| 682 | + return () => { | |
| 683 | + clearInterval(timer); | |
| 684 | + }; | |
| 685 | + }, []); | |
| 685 | 686 | |
| 686 | 687 | const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); |
| 687 | 688 | const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); |
| ... | ... | @@ -703,108 +704,108 @@ const MachineMessageComponent = ({ e , shutDown, props }) => { |
| 703 | 704 | const about = commonFunc.showLocalMessage(props, 'about', '约:'); |
| 704 | 705 | |
| 705 | 706 | const handleMenuClose = () => { |
| 706 | - Modal.confirm({ | |
| 707 | - title: FriendlyReminder, | |
| 708 | - content: <div>{confirmState}</div>, | |
| 709 | - okText: BtnSure, | |
| 710 | - cancelText: BtnCancel, | |
| 711 | - zIndex: 2000, | |
| 712 | - onOk() { | |
| 713 | - shutDown() | |
| 714 | - }, | |
| 715 | - onCancel() {} | |
| 716 | - }); | |
| 717 | - }; | |
| 707 | + Modal.confirm({ | |
| 708 | + title: FriendlyReminder, | |
| 709 | + content: <div>{confirmState}</div>, | |
| 710 | + okText: BtnSure, | |
| 711 | + cancelText: BtnCancel, | |
| 712 | + zIndex: 2000, | |
| 713 | + onOk() { | |
| 714 | + shutDown() | |
| 715 | + }, | |
| 716 | + onCancel() { } | |
| 717 | + }); | |
| 718 | + }; | |
| 718 | 719 | |
| 719 | 720 | |
| 720 | - const isMinMax = useRef('max'); | |
| 721 | - const draggleRef = useRef(null); | |
| 722 | - const [bounds, setBounds] = useState({ left: 0, top: 0, bottom: 0, right: 0 }); | |
| 723 | - const onStart = (_event, uiData) => { | |
| 724 | - const { clientWidth, clientHeight } = window.document.documentElement; | |
| 725 | - const targetRect = draggleRef.current?.getBoundingClientRect(); | |
| 726 | - if (!targetRect) { | |
| 727 | - return; | |
| 728 | - } | |
| 729 | - setBounds({ | |
| 730 | - left: -targetRect.left + uiData.x, | |
| 731 | - right: clientWidth - (targetRect.right - uiData.x), | |
| 732 | - top: -targetRect.top + uiData.y, | |
| 733 | - bottom: clientHeight - (targetRect.bottom - uiData.y), | |
| 734 | - }); | |
| 735 | - }; | |
| 721 | + const isMinMax = useRef('max'); | |
| 722 | + const draggleRef = useRef(null); | |
| 723 | + const [bounds, setBounds] = useState({ left: 0, top: 0, bottom: 0, right: 0 }); | |
| 724 | + const onStart = (_event, uiData) => { | |
| 725 | + const { clientWidth, clientHeight } = window.document.documentElement; | |
| 726 | + const targetRect = draggleRef.current?.getBoundingClientRect(); | |
| 727 | + if (!targetRect) { | |
| 728 | + return; | |
| 729 | + } | |
| 730 | + setBounds({ | |
| 731 | + left: -targetRect.left + uiData.x, | |
| 732 | + right: clientWidth - (targetRect.right - uiData.x), | |
| 733 | + top: -targetRect.top + uiData.y, | |
| 734 | + bottom: clientHeight - (targetRect.bottom - uiData.y), | |
| 735 | + }); | |
| 736 | + }; | |
| 736 | 737 | |
| 737 | 738 | |
| 738 | - return ( | |
| 739 | - <div className={`${styles.modalBoxStyle} ${isMinMax.current}`}> | |
| 740 | - | |
| 741 | - { | |
| 742 | - isMinMax.current == 'min'? | |
| 743 | - <Draggable defaultPosition={{ x: document.body.clientWidth-400-30, y: 70 }} bounds={bounds} onStart={(event, uiData) => onStart(event, uiData)}> | |
| 744 | - <div ref={draggleRef} className={styles.maxBoxViews} style={{ '--bgColor' : backgroundColor }}> | |
| 745 | - <div className="mixbox" onDoubleClick={()=>isMinMax.current = 'max'}> | |
| 746 | - <h2>{conent2}</h2> | |
| 747 | - <div className="p">{beginTime} {startTime}</div> | |
| 748 | - <div className="p">{downtimeDuration}{diffHours}{second} {diffMins}{min} {diffSecs}{second}</div> | |
| 749 | - <div className="btn"> | |
| 750 | - <Button size="large" type="primary" className={styles.btnWg} onClick={()=>isMinMax.current = 'max'} > 最大化 </Button> | |
| 751 | - <Button size="large" type="primary" className={styles.btnWg} onClick={handleMenuClose} > 退出 </Button> | |
| 752 | - </div> | |
| 753 | - </div> | |
| 754 | - </div> | |
| 755 | - </Draggable> | |
| 756 | - : | |
| 757 | - <div className={styles.machineStatusContent} style={{ backgroundColor }}> | |
| 758 | - <div className="conent1">{equipmentShutdown}</div> | |
| 759 | - <div className="conent2" style={fontSize ? { fontSize } : {}}> | |
| 760 | - {conent2} | |
| 761 | - </div> | |
| 762 | - <div className="conent3"> | |
| 763 | - {DowntimeStartTime} | |
| 764 | - {startTime} | |
| 765 | - </div> | |
| 766 | - <div className="conent4"> | |
| 767 | - {sct} | |
| 768 | - {currentTime} | |
| 769 | - </div> | |
| 770 | - <div className="conent5"> | |
| 771 | - {cdd} | |
| 772 | - <span className="conent6"> | |
| 773 | - {about} | |
| 774 | - {diffHours}{hour} {diffMins}{min} {diffSecs}{second} | |
| 775 | - </span> | |
| 776 | - </div> | |
| 777 | - <div className="conent7"> | |
| 778 | - <Button size="large" type="primary" className={styles.btnWg} onClick={()=>isMinMax.current = 'min'} > {minimize} </Button> | |
| 779 | - <Button size="large" type="primary" className={styles.btnWg} onClick={handleMenuClose} > {ExitLogin} </Button> | |
| 780 | - </div> | |
| 739 | + return ( | |
| 740 | + <div className={`${styles.modalBoxStyle} ${isMinMax.current}`}> | |
| 741 | + | |
| 742 | + { | |
| 743 | + isMinMax.current == 'min' ? | |
| 744 | + <Draggable defaultPosition={{ x: document.body.clientWidth - 400 - 30, y: 70 }} bounds={bounds} onStart={(event, uiData) => onStart(event, uiData)}> | |
| 745 | + <div ref={draggleRef} className={styles.maxBoxViews} style={{ '--bgColor': backgroundColor }}> | |
| 746 | + <div className="mixbox" onDoubleClick={() => isMinMax.current = 'max'}> | |
| 747 | + <h2>{conent2}</h2> | |
| 748 | + <div className="p">{beginTime} {startTime}</div> | |
| 749 | + <div className="p">{downtimeDuration}{diffHours}{second} {diffMins}{min} {diffSecs}{second}</div> | |
| 750 | + <div className="btn"> | |
| 751 | + <Button size="large" type="primary" className={styles.btnWg} onClick={() => isMinMax.current = 'max'} > 最大化 </Button> | |
| 752 | + <Button size="large" type="primary" className={styles.btnWg} onClick={handleMenuClose} > 退出 </Button> | |
| 781 | 753 | </div> |
| 782 | - } | |
| 754 | + </div> | |
| 755 | + </div> | |
| 756 | + </Draggable> | |
| 757 | + : | |
| 758 | + <div className={styles.machineStatusContent} style={{ backgroundColor }}> | |
| 759 | + <div className="conent1">{equipmentShutdown}</div> | |
| 760 | + <div className="conent2" style={fontSize ? { fontSize } : {}}> | |
| 761 | + {conent2} | |
| 762 | + </div> | |
| 763 | + <div className="conent3"> | |
| 764 | + {DowntimeStartTime} | |
| 765 | + {startTime} | |
| 766 | + </div> | |
| 767 | + <div className="conent4"> | |
| 768 | + {sct} | |
| 769 | + {currentTime} | |
| 770 | + </div> | |
| 771 | + <div className="conent5"> | |
| 772 | + {cdd} | |
| 773 | + <span className="conent6"> | |
| 774 | + {about} | |
| 775 | + {diffHours}{hour} {diffMins}{min} {diffSecs}{second} | |
| 776 | + </span> | |
| 777 | + </div> | |
| 778 | + <div className="conent7"> | |
| 779 | + <Button size="large" type="primary" className={styles.btnWg} onClick={() => isMinMax.current = 'min'} > {minimize} </Button> | |
| 780 | + <Button size="large" type="primary" className={styles.btnWg} onClick={handleMenuClose} > {ExitLogin} </Button> | |
| 781 | + </div> | |
| 782 | + </div> | |
| 783 | + } | |
| 783 | 784 | |
| 784 | - </div> | |
| 785 | - ); | |
| 785 | + </div> | |
| 786 | + ); | |
| 786 | 787 | }; |
| 787 | 788 | |
| 788 | 789 | |
| 789 | 790 | |
| 790 | 791 | |
| 791 | - // 左侧侧边栏 | |
| 792 | +// 左侧侧边栏 | |
| 792 | 793 | const SiderComponent = () => { |
| 793 | 794 | const { dispatch, hooksProps, props, ...rest } = useContext(myContext); |
| 794 | 795 | const { currentContent, menuMap } = hooksProps; |
| 795 | 796 | |
| 796 | - const teamInformation= commonFunc.showLocalMessage(props, 'teamInformation', '班组信息'); | |
| 797 | + const teamInformation = commonFunc.showLocalMessage(props, 'teamInformation', '班组信息'); | |
| 797 | 798 | |
| 798 | 799 | |
| 799 | - const scheduledTask= commonFunc.showLocalMessage(props, 'scheduledTask', '计划任务'); | |
| 800 | + const scheduledTask = commonFunc.showLocalMessage(props, 'scheduledTask', '计划任务'); | |
| 800 | 801 | |
| 801 | - const productionExecution= commonFunc.showLocalMessage(props, 'productionExecution', '生产执行'); | |
| 802 | + const productionExecution = commonFunc.showLocalMessage(props, 'productionExecution', '生产执行'); | |
| 802 | 803 | |
| 803 | - const maintenanceRepair= commonFunc.showLocalMessage(props, 'maintenanceRepair', '维修保养'); | |
| 804 | + const maintenanceRepair = commonFunc.showLocalMessage(props, 'maintenanceRepair', '维修保养'); | |
| 804 | 805 | |
| 805 | - const queryTracing= commonFunc.showLocalMessage(props, 'queryTracing', '查询追踪'); | |
| 806 | + const queryTracing = commonFunc.showLocalMessage(props, 'queryTracing', '查询追踪'); | |
| 806 | 807 | |
| 807 | - const operationGuide= commonFunc.showLocalMessage(props, 'teamInformation', '操作指南'); | |
| 808 | + const operationGuide = commonFunc.showLocalMessage(props, 'teamInformation', '操作指南'); | |
| 808 | 809 | |
| 809 | 810 | const menuList = [ |
| 810 | 811 | { |
| ... | ... | @@ -984,9 +985,8 @@ const SystemFunComponent = () => { |
| 984 | 985 | value.iFlag = iFlag; |
| 985 | 986 | } |
| 986 | 987 | |
| 987 | - const url = `${ | |
| 988 | - commonConfig.server_host | |
| 989 | - }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`; | |
| 988 | + const url = `${commonConfig.server_host | |
| 989 | + }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`; | |
| 990 | 990 | const returnData = (await commonServices.postValueService( |
| 991 | 991 | token, |
| 992 | 992 | value, |
| ... | ... | @@ -1003,7 +1003,7 @@ const SystemFunComponent = () => { |
| 1003 | 1003 | onOk() { |
| 1004 | 1004 | handleProcedureCall(params, 1); |
| 1005 | 1005 | }, |
| 1006 | - onCancel() {} | |
| 1006 | + onCancel() { } | |
| 1007 | 1007 | }); |
| 1008 | 1008 | } else if (code === -8) { |
| 1009 | 1009 | Modal.info({ |
| ... | ... | @@ -1060,9 +1060,8 @@ const SystemFunComponent = () => { |
| 1060 | 1060 | value.iFlag = iFlag; |
| 1061 | 1061 | } |
| 1062 | 1062 | |
| 1063 | - const url = `${ | |
| 1064 | - commonConfig.server_host | |
| 1065 | - }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`; | |
| 1063 | + const url = `${commonConfig.server_host | |
| 1064 | + }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`; | |
| 1066 | 1065 | const returnData = (await commonServices.postValueService( |
| 1067 | 1066 | token, |
| 1068 | 1067 | value, |
| ... | ... | @@ -1079,7 +1078,7 @@ const SystemFunComponent = () => { |
| 1079 | 1078 | onOk() { |
| 1080 | 1079 | handleProcedureCall1(params, 1); |
| 1081 | 1080 | }, |
| 1082 | - onCancel() {} | |
| 1081 | + onCancel() { } | |
| 1083 | 1082 | }); |
| 1084 | 1083 | } else if (code === -8) { |
| 1085 | 1084 | Modal.info({ |
| ... | ... | @@ -1137,14 +1136,14 @@ const SystemFunComponent = () => { |
| 1137 | 1136 | |
| 1138 | 1137 | const getSystemFunContent = () => { |
| 1139 | 1138 | const userinfo = commonUtils.getAppData("userinfo"); |
| 1140 | - const ModifyPassword = commonFunc.showLocalMessage(props, 'ModifyPassword','修改密码');/* 修改密码 */ | |
| 1139 | + const ModifyPassword = commonFunc.showLocalMessage(props, 'ModifyPassword', '修改密码');/* 修改密码 */ | |
| 1141 | 1140 | const faceCollection = commonFunc.showLocalMessage(props, 'faceCollection', '人脸采集'); |
| 1142 | 1141 | const moreFunctions = commonFunc.showLocalMessage(props, 'moreFunctions', '更多功能'); |
| 1143 | 1142 | const Logout = commonFunc.showLocalMessage(props, 'Logout', '退出登录'); |
| 1144 | - const shutDown= commonFunc.showLocalMessage(props, 'shutDown', '关机'); | |
| 1145 | - const resetDailyReport= commonFunc.showLocalMessage(props, 'resetDailyReport', '关机'); | |
| 1146 | - const switchToManual= commonFunc.showLocalMessage(props, 'switchToManual', '切换手动'); | |
| 1147 | - const SwitchAuto= commonFunc.showLocalMessage(props, 'SwitchAuto', '切换自动'); | |
| 1143 | + const shutDown = commonFunc.showLocalMessage(props, 'shutDown', '关机'); | |
| 1144 | + const resetDailyReport = commonFunc.showLocalMessage(props, 'resetDailyReport', '关机'); | |
| 1145 | + const switchToManual = commonFunc.showLocalMessage(props, 'switchToManual', '切换手动'); | |
| 1146 | + const SwitchAuto = commonFunc.showLocalMessage(props, 'SwitchAuto', '切换自动'); | |
| 1148 | 1147 | |
| 1149 | 1148 | |
| 1150 | 1149 | const { bPlcSd } = userinfo; | ... | ... |
src/mes/scheduledTasks/machineTasks/index.js
| ... | ... | @@ -374,7 +374,7 @@ |
| 374 | 374 | const result = await new Promise(resolve => { |
| 375 | 375 | Modal.confirm({ |
| 376 | 376 | title: FriendlyReminder, |
| 377 | - content: <div>请选择要变更的状态</div>, | |
| 377 | + content: <div>{sLanguage === "sEnglish" ? "Please select the status you want to change" : "请选择要变更的状态"}</div>, | |
| 378 | 378 | okText: finishConstruction, |
| 379 | 379 | cancelText: pause, |
| 380 | 380 | onOk() { | ... | ... |