Commit e5fd2b6f9ad242e020f14538958437865ad389ea

Authored by Min
1 parent d170b997

1.处理MES所有提示类的英文翻译

package.json
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 "version": "1.0.5", 3 "version": "1.0.5",
4 "private": true, 4 "private": true,
5 "scripts": { 5 "scripts": {
6 - "start": "set port=8543&roadhog server --progress --watch --colors --profile", 6 + "start": "set port=9543&roadhog server --progress --watch --colors --profile",
7 "build": "roadhog build", 7 "build": "roadhog build",
8 "lint": "eslint --ext .js src test", 8 "lint": "eslint --ext .js src test",
9 "precommit": "npm run lint" 9 "precommit": "npm run lint"
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 "babel-runtime": "6.26.0", 27 "babel-runtime": "6.26.0",
28 "classnames": "^2.2.6", 28 "classnames": "^2.2.6",
29 "copy-to-clipboard": "^3.3.1", 29 "copy-to-clipboard": "^3.3.1",
30 - "core-js": "2.5.7", 30 + "core-js": "^3.44.0",
31 "dhtmlx-gantt": "^7.1.6", 31 "dhtmlx-gantt": "^7.1.6",
32 "dva": "^2.4.1", 32 "dva": "^2.4.1",
33 "dva-router-config": "^1.1.0", 33 "dva-router-config": "^1.1.0",
src/components/Common/CommonHooks/useCommonBase.js
@@ -1952,7 +1952,7 @@ const useCommonBase = props => { @@ -1952,7 +1952,7 @@ const useCommonBase = props => {
1952 const currentState = nextProps || state; 1952 const currentState = nextProps || state;
1953 const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); 1953 const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
1954 const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); 1954 const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认');
1955 - const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '确认'); 1955 + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
1956 // 加入mes通用参数 1956 // 加入mes通用参数
1957 const { app } = props; 1957 const { app } = props;
1958 const { tableNameCompareJson = {} } = currentState; 1958 const { tableNameCompareJson = {} } = currentState;
@@ -2144,9 +2144,9 @@ const useCommonBase = props => { @@ -2144,9 +2144,9 @@ const useCommonBase = props => {
2144 }); 2144 });
2145 } else if (code === -8) { 2145 } else if (code === -8) {
2146 Modal.info({ 2146 Modal.info({
2147 - title: "温馨提示:", 2147 + title: FriendlyReminder,
2148 content: <div>{handleGetMsg(msg)}</div>, 2148 content: <div>{handleGetMsg(msg)}</div>,
2149 - okText: "确认", 2149 + okText: BtnSure,
2150 onOk() { 2150 onOk() {
2151 onConfirm && onConfirm(); 2151 onConfirm && onConfirm();
2152 }, 2152 },
src/components/Common/CommonInstructSet.js
@@ -251,7 +251,7 @@ const instructSetInit = async props =&gt; { @@ -251,7 +251,7 @@ const instructSetInit = async props =&gt; {
251 ...resultData 251 ...resultData
252 }; 252 };
253 } 253 }
254 - 254 +
255 } catch (error) { 255 } catch (error) {
256 props.btnConfig.error? props.btnConfig.error(error) : ''; 256 props.btnConfig.error? props.btnConfig.error(error) : '';
257 throw new Error(error); 257 throw new Error(error);
@@ -1099,6 +1099,10 @@ const handleMsg = async (props, instruct) =&gt; { @@ -1099,6 +1099,10 @@ const handleMsg = async (props, instruct) =&gt; {
1099 ...utils.getDatasetDataList(props, instruct).dataOneObj 1099 ...utils.getDatasetDataList(props, instruct).dataOneObj
1100 }); 1100 });
1101 } 1101 }
  1102 + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
  1103 + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认');
  1104 + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
  1105 + const errorPrompt = commonFunc.showLocalMessage(props, 'errorPrompt', '错误提示');
1102 1106
1103 message.destroy(); 1107 message.destroy();
1104 if (code === 1) { 1108 if (code === 1) {
@@ -1110,18 +1114,18 @@ const handleMsg = async (props, instruct) =&gt; { @@ -1110,18 +1114,18 @@ const handleMsg = async (props, instruct) =&gt; {
1110 throw new Error(msg); 1114 throw new Error(msg);
1111 } else if (code === 2) { 1115 } else if (code === 2) {
1112 Modal.info({ 1116 Modal.info({
1113 - title: "温馨提示:", 1117 + title: FriendlyReminder,
1114 content: <div>{msg}</div>, 1118 content: <div>{msg}</div>,
1115 - okText: "确认", 1119 + okText: BtnSure,
1116 onOk() {} 1120 onOk() {}
1117 }); 1121 });
1118 } else if (code === -7) { 1122 } else if (code === -7) {
1119 const result = await new Promise(resolve => { 1123 const result = await new Promise(resolve => {
1120 Modal.confirm({ 1124 Modal.confirm({
1121 - title: "温馨提示:", 1125 + title: FriendlyReminder,
1122 content: <div>{msg}</div>, 1126 content: <div>{msg}</div>,
1123 - okText: "确认",  
1124 - cancelText: "取消", 1127 + okText: BtnSure,
  1128 + cancelText: BtnCancel,
1125 onOk() { 1129 onOk() {
1126 resolve(true); 1130 resolve(true);
1127 }, 1131 },
@@ -1135,9 +1139,9 @@ const handleMsg = async (props, instruct) =&gt; { @@ -1135,9 +1139,9 @@ const handleMsg = async (props, instruct) =&gt; {
1135 } 1139 }
1136 } else if (code === -8) { 1140 } else if (code === -8) {
1137 Modal.error({ 1141 Modal.error({
1138 - title: "错误提示:", 1142 + title: errorPrompt,
1139 content: <div>{msg}</div>, 1143 content: <div>{msg}</div>,
1140 - okText: "确认", 1144 + okText: BtnSure,
1141 onOk() {} 1145 onOk() {}
1142 }); 1146 });
1143 throw new Error(msg); 1147 throw new Error(msg);
@@ -1280,6 +1284,19 @@ const handleFaceAuth = async (props, instruct) =&gt; { @@ -1280,6 +1284,19 @@ const handleFaceAuth = async (props, instruct) =&gt; {
1280 const mesSysbrands = commonUtils.convertStrToObj( 1284 const mesSysbrands = commonUtils.convertStrToObj(
1281 localStorage.getItem("mesSysbrands") 1285 localStorage.getItem("mesSysbrands")
1282 ); 1286 );
  1287 + const selectMethod = commonFunc.showLocalMessage(props, 'selectMethod', '请选择验证方式');
  1288 + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
  1289 + const accountPwd = commonFunc.showLocalMessage(props, 'account', '账号密码');
  1290 + const faceRecognition = commonFunc.showLocalMessage(props, 'faceRecognition', '人脸识别');
  1291 + const btnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
  1292 + const btnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定');
  1293 + const enterAccountPwd = commonFunc.showLocalMessage(props, 'enterAccountPwd', '请输入账号密码');
  1294 + const nameNotEmpty = commonFunc.showLocalMessage(props, 'NameNotEmpty', '账号/姓名不能为空!');
  1295 + const passwordNotEmpty = commonFunc.showLocalMessage(props, 'PasswordNotEmpty', '密码不能为空!');
  1296 + const account = commonFunc.showLocalMessage(props, 'account', '账号');
  1297 + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认');
  1298 + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
  1299 +
1283 const { tempMasterData = {} } = props; 1300 const { tempMasterData = {} } = props;
1284 1301
1285 // 遍历登录文本组件 1302 // 遍历登录文本组件
@@ -1325,13 +1342,13 @@ const handleFaceAuth = async (props, instruct) =&gt; { @@ -1325,13 +1342,13 @@ const handleFaceAuth = async (props, instruct) =&gt; {
1325 1342
1326 const loginType = await new Promise(resolve => { 1343 const loginType = await new Promise(resolve => {
1327 Modal.confirm({ 1344 Modal.confirm({
1328 - title: "温馨提示:",  
1329 - content: "请选择验证方式", 1345 + title: FriendlyReminder,
  1346 + content: selectMethod,
1330 closable: true, 1347 closable: true,
1331 maskClosable: true, 1348 maskClosable: true,
1332 wrapClassName: "mesCommonModal", 1349 wrapClassName: "mesCommonModal",
1333 - cancelText: "账号密码",  
1334 - okText: "人脸识别", 1350 + cancelText: accountPwd,
  1351 + okText: faceRecognition,
1335 onOk() { 1352 onOk() {
1336 resolve(1); 1353 resolve(1);
1337 }, 1354 },
@@ -1350,7 +1367,7 @@ const handleFaceAuth = async (props, instruct) =&gt; { @@ -1350,7 +1367,7 @@ const handleFaceAuth = async (props, instruct) =&gt; {
1350 // 人脸识别 1367 // 人脸识别
1351 result = await new Promise(resolve => { 1368 result = await new Promise(resolve => {
1352 const modal = Modal.info({ 1369 const modal = Modal.info({
1353 - title: "人脸识别", 1370 + title: faceRecognition,
1354 keyboard: false, 1371 keyboard: false,
1355 content: ( 1372 content: (
1356 <FaceDetect 1373 <FaceDetect
@@ -1373,7 +1390,7 @@ const handleFaceAuth = async (props, instruct) =&gt; { @@ -1373,7 +1390,7 @@ const handleFaceAuth = async (props, instruct) =&gt; {
1373 /> 1390 />
1374 ), 1391 ),
1375 wrapClassName: "xlyFaceAuthModal", 1392 wrapClassName: "xlyFaceAuthModal",
1376 - okText: "取消", 1393 + okText: btnCancel,
1377 onOk() { 1394 onOk() {
1378 resolve({ 1395 resolve({
1379 stop: true 1396 stop: true
@@ -1408,24 +1425,24 @@ const handleFaceAuth = async (props, instruct) =&gt; { @@ -1408,24 +1425,24 @@ const handleFaceAuth = async (props, instruct) =&gt; {
1408 result = await new Promise(resolve => { 1425 result = await new Promise(resolve => {
1409 loginInfo = {}; 1426 loginInfo = {};
1410 Modal.confirm({ 1427 Modal.confirm({
1411 - title: "请输入账号密码:", 1428 + title: enterAccountPwd,
1412 content: ( 1429 content: (
1413 <Form layout="vertical" size="large"> 1430 <Form layout="vertical" size="large">
1414 {loginConfig.map(item => handleGetFormItem(props, item))} 1431 {loginConfig.map(item => handleGetFormItem(props, item))}
1415 </Form> 1432 </Form>
1416 ), 1433 ),
1417 wrapClassName: "mesCommonModal mesLoginForm", 1434 wrapClassName: "mesCommonModal mesLoginForm",
1418 - cancelText: "取消",  
1419 - okText: "确定", 1435 + cancelText: BtnCancel,
  1436 + okText: BtnSure,
1420 onOk(e) { 1437 onOk(e) {
1421 if (e.name) { 1438 if (e.name) {
1422 if (!loginInfo.sUserNo && !loginInfo.sUserName) { 1439 if (!loginInfo.sUserNo && !loginInfo.sUserName) {
1423 - message.error("账号/姓名不能为空!"); 1440 + message.error(nameNotEmpty);
1424 return; 1441 return;
1425 } 1442 }
1426 1443
1427 if (!loginInfo.sPassWord) { 1444 if (!loginInfo.sPassWord) {
1428 - message.error("密码不能为空!"); 1445 + message.error(passwordNotEmpty);
1429 return; 1446 return;
1430 } 1447 }
1431 1448
@@ -2122,6 +2139,11 @@ const handleCalcprocedure = async (props, instruct) =&gt; { @@ -2122,6 +2139,11 @@ const handleCalcprocedure = async (props, instruct) =&gt; {
2122 const { dataset = "*", sButtonParam, sProName } = instruct; 2139 const { dataset = "*", sButtonParam, sProName } = instruct;
2123 const datasetList = dataset.split(","); 2140 const datasetList = dataset.split(",");
2124 2141
  2142 + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
  2143 + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认');
  2144 + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
  2145 + const errorPrompt = commonFunc.showLocalMessage(props, 'errorPrompt', '错误提示');
  2146 +
2125 // 获取页面所有tableName 2147 // 获取页面所有tableName
2126 const tableNameList = Object.keys(props) 2148 const tableNameList = Object.keys(props)
2127 .filter(key => { 2149 .filter(key => {
@@ -2177,18 +2199,18 @@ const handleCalcprocedure = async (props, instruct) =&gt; { @@ -2177,18 +2199,18 @@ const handleCalcprocedure = async (props, instruct) =&gt; {
2177 throw new Error(msg); 2199 throw new Error(msg);
2178 } else if (code === 2) { 2200 } else if (code === 2) {
2179 Modal.info({ 2201 Modal.info({
2180 - title: "温馨提示:", 2202 + title: FriendlyReminder,
2181 content: <div>{msg}</div>, 2203 content: <div>{msg}</div>,
2182 - okText: "确认", 2204 + okText: BtnSure,
2183 onOk() {} 2205 onOk() {}
2184 }); 2206 });
2185 } else if (code === -7) { 2207 } else if (code === -7) {
2186 const result = await new Promise(resolve => { 2208 const result = await new Promise(resolve => {
2187 Modal.confirm({ 2209 Modal.confirm({
2188 - title: "温馨提示:", 2210 + title: FriendlyReminder,
2189 content: <div>{msg}</div>, 2211 content: <div>{msg}</div>,
2190 - okText: "确认",  
2191 - cancelText: "取消", 2212 + okText: BtnSure,
  2213 + cancelText: BtnCancel,
2192 onOk() { 2214 onOk() {
2193 resolve(true); 2215 resolve(true);
2194 }, 2216 },
@@ -2202,9 +2224,9 @@ const handleCalcprocedure = async (props, instruct) =&gt; { @@ -2202,9 +2224,9 @@ const handleCalcprocedure = async (props, instruct) =&gt; {
2202 } 2224 }
2203 } else if (code === -8) { 2225 } else if (code === -8) {
2204 Modal.error({ 2226 Modal.error({
2205 - title: "错误提示:", 2227 + title: errorPrompt,
2206 content: <div>{msg}</div>, 2228 content: <div>{msg}</div>,
2207 - okText: "确认", 2229 + okText: BtnCancel,
2208 onOk() {} 2230 onOk() {}
2209 }); 2231 });
2210 throw new Error(msg); 2232 throw new Error(msg);
@@ -2502,7 +2524,7 @@ const utils = { @@ -2502,7 +2524,7 @@ const utils = {
2502 return tableData[0]; 2524 return tableData[0];
2503 } else if (filterType === "last") { 2525 } else if (filterType === "last") {
2504 return tableData[tableData.length - 1]; 2526 return tableData[tableData.length - 1];
2505 - } 2527 + }
2506 2528
2507 return tableData; 2529 return tableData;
2508 }, 2530 },
src/components/Common/commonBusiness.js
@@ -188,7 +188,7 @@ export async function saveData(param) { @@ -188,7 +188,7 @@ export async function saveData(param) {
188 return dataReturn; 188 return dataReturn;
189 } else if (dataReturn.code === 2) { 189 } else if (dataReturn.code === 2) {
190 Modal.info({ 190 Modal.info({
191 - title: '温馨提示', 191 + // title: '温馨提示',
192 content: ( 192 content: (
193 // eslint-disable-next-line react/react-in-jsx-scope 193 // eslint-disable-next-line react/react-in-jsx-scope
194 <div> 194 <div>
src/mes/common/buttonComponent/index.js
@@ -228,14 +228,14 @@ const ButtonComponent = props =&gt; { @@ -228,14 +228,14 @@ const ButtonComponent = props =&gt; {
228 228
229 const menuOrderList3 = [ 229 const menuOrderList3 = [
230 ["设备保养", 21], 230 ["设备保养", 21],
231 - ["设备点检", 22], 231 + // ["设备点检", 22],
232 ["设备维修", 23], 232 ["设备维修", 23],
233 ["设备资料", 24] 233 ["设备资料", 24]
234 ]; 234 ];
235 235
236 const menuOrderListEnglish3 = [ 236 const menuOrderListEnglish3 = [
237 ["Equipment Maintenance", 21], 237 ["Equipment Maintenance", 21],
238 - ["Equipment Check", 22], 238 + // ["Equipment Check", 22],
239 ["Equipment Repair", 23], 239 ["Equipment Repair", 23],
240 ["Equipment Documentation", 24] 240 ["Equipment Documentation", 24]
241 ]; 241 ];
src/mes/common/commonModelComponent/index.js
@@ -1289,8 +1289,9 @@ const CommonModelComponent = props =&gt; { @@ -1289,8 +1289,9 @@ const CommonModelComponent = props =&gt; {
1289 height = "100%" 1289 height = "100%"
1290 } = item; 1290 } = item;
1291 console.log('ssconfigLists', configList, sEntireTabName ); 1291 console.log('ssconfigLists', configList, sEntireTabName );
1292 - const sEntireTabNameNew = sLanguage === 'sEnglish' ? sEnglishEntireTabName + '1111' : 1292 + const sEntireTabNameNew = sLanguage === 'sEnglish' ? sEnglishEntireTabName :
1293 sLanguage === 'sBig5EntireTabName' ? sBig5EntireTabName : sEntireTabName; 1293 sLanguage === 'sBig5EntireTabName' ? sBig5EntireTabName : sEntireTabName;
  1294 + console.log('sEntireTabNameNew', sEntireTabNameNew);
1294 const advancedStyle = 1295 const advancedStyle =
1295 mode === "advanced" 1296 mode === "advanced"
1296 ? { 1297 ? {
src/mes/common/commonOperationBarComponent/index.js
@@ -74,17 +74,20 @@ const useCommonOperationBarComponentEvent = props =&gt; { @@ -74,17 +74,20 @@ const useCommonOperationBarComponentEvent = props =&gt; {
74 74
75 return returnData; 75 return returnData;
76 }; 76 };
77 - 77 + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
  78 + const confirmOperation = commonFunc.showLocalMessage(props, 'confirmOperation', '是否确认此操作');
  79 + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认');
  80 + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
78 // 按钮点击事件 81 // 按钮点击事件
79 const clickRef = useRef(null); 82 const clickRef = useRef(null);
80 const handleBtnClick = async (config, searchField) => { 83 const handleBtnClick = async (config, searchField) => {
81 if (config?.sMinValue === "99") { // 二次确认 84 if (config?.sMinValue === "99") { // 二次确认
82 const result = await new Promise(resolve => { 85 const result = await new Promise(resolve => {
83 Modal.confirm({ 86 Modal.confirm({
84 - title: "温馨提示:",  
85 - content: "是否确认此操作?",  
86 - okText: "确认",  
87 - cancelText: "取消", 87 + title: FriendlyReminder,
  88 + content: confirmOperation,
  89 + okText: BtnSure,
  90 + cancelText: BtnCancel,
88 onOk() { 91 onOk() {
89 setTimeout(() => { 92 setTimeout(() => {
90 resolve(true); 93 resolve(true);
src/mes/costomPageFun/index.js
@@ -4,6 +4,7 @@ import { message, Form, Modal } from &quot;antd&quot;; @@ -4,6 +4,7 @@ import { message, Form, Modal } from &quot;antd&quot;;
4 import * as commonUtils from "@/utils/utils"; 4 import * as commonUtils from "@/utils/utils";
5 import * as commonConfig from "@/utils/config"; 5 import * as commonConfig from "@/utils/config";
6 import * as commonServices from "@/services/services"; 6 import * as commonServices from "@/services/services";
  7 +import * as commonFunc from "@/components/Common/commonFunc";
7 import FaceDetect from "@/components/FaceDetect"; 8 import FaceDetect from "@/components/FaceDetect";
8 import ShowType from "@/components/Common/CommonComponent"; 9 import ShowType from "@/components/Common/CommonComponent";
9 const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { 10 const costomPageFun = ({ props, tableName, sFieldName, actionName }) => {
@@ -1317,7 +1318,7 @@ const handleZlxjCheck = async (props, btnName) =&gt; { @@ -1317,7 +1318,7 @@ const handleZlxjCheck = async (props, btnName) =&gt; {
1317 message.warning('人脸信息获取失败,请重新尝试!'); 1318 message.warning('人脸信息获取失败,请重新尝试!');
1318 return; 1319 return;
1319 } 1320 }
1320 - 1321 +
1321 const table0DataNew = cloneDeep(table0Data); 1322 const table0DataNew = cloneDeep(table0Data);
1322 const table1DataNew = cloneDeep(table1Data); 1323 const table1DataNew = cloneDeep(table1Data);
1323 table0DataNew[0].sCurRole = sCurRole; 1324 table0DataNew[0].sCurRole = sCurRole;
@@ -1388,15 +1389,27 @@ const handleGetFormItem = (props, item) =&gt; { @@ -1388,15 +1389,27 @@ const handleGetFormItem = (props, item) =&gt; {
1388 1389
1389 const getFaceResult = async (props) => { 1390 const getFaceResult = async (props) => {
1390 let faceResult = false; 1391 let faceResult = false;
  1392 +
  1393 +
  1394 + const selectMethod = commonFunc.showLocalMessage(props, 'selectMethod', '请选择验证方式');
  1395 + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
  1396 + const accountPwd = commonFunc.showLocalMessage(props, 'account', '账号密码');
  1397 + const faceRecognition = commonFunc.showLocalMessage(props, 'faceRecognition', '人脸识别');
  1398 + const btnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
  1399 + const btnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定');
  1400 + const enterAccountPwd = commonFunc.showLocalMessage(props, 'enterAccountPwd', '请输入账号密码');
  1401 + const nameNotEmpty = commonFunc.showLocalMessage(props, 'NameNotEmpty', '账号/姓名不能为空!');
  1402 + const passwordNotEmpty = commonFunc.showLocalMessage(props, 'PasswordNotEmpty', '密码不能为空!');
  1403 + const account = commonFunc.showLocalMessage(props, 'account', '账号');
1391 const loginType = await new Promise(resolve => { 1404 const loginType = await new Promise(resolve => {
1392 Modal.confirm({ 1405 Modal.confirm({
1393 - title: "温馨提示:",  
1394 - content: "请选择验证方式", 1406 + title: FriendlyReminder,
  1407 + content: selectMethod,
1395 closable: true, 1408 closable: true,
1396 maskClosable: true, 1409 maskClosable: true,
1397 wrapClassName: "mesCommonModal", 1410 wrapClassName: "mesCommonModal",
1398 - cancelText: "账号密码",  
1399 - okText: "人脸识别", 1411 + cancelText:accountPwd,
  1412 + okText: faceRecognition,
1400 onOk() { 1413 onOk() {
1401 resolve(1); 1414 resolve(1);
1402 }, 1415 },
@@ -1415,7 +1428,7 @@ const getFaceResult = async (props) =&gt; { @@ -1415,7 +1428,7 @@ const getFaceResult = async (props) =&gt; {
1415 // 人脸识别 1428 // 人脸识别
1416 faceResult = await new Promise(resolve => { 1429 faceResult = await new Promise(resolve => {
1417 const modal = Modal.info({ 1430 const modal = Modal.info({
1418 - title: "人脸识别", 1431 + title: faceRecognition,
1419 keyboard: false, 1432 keyboard: false,
1420 content: ( 1433 content: (
1421 <FaceDetect 1434 <FaceDetect
@@ -1429,7 +1442,7 @@ const getFaceResult = async (props) =&gt; { @@ -1429,7 +1442,7 @@ const getFaceResult = async (props) =&gt; {
1429 /> 1442 />
1430 ), 1443 ),
1431 wrapClassName: "xlyFaceAuthModal", 1444 wrapClassName: "xlyFaceAuthModal",
1432 - okText: "取消", 1445 + okText: btnCancel,
1433 onOk() { 1446 onOk() {
1434 resolve(false); 1447 resolve(false);
1435 } 1448 }
@@ -1463,24 +1476,24 @@ const getFaceResult = async (props) =&gt; { @@ -1463,24 +1476,24 @@ const getFaceResult = async (props) =&gt; {
1463 faceResult = await new Promise(resolve => { 1476 faceResult = await new Promise(resolve => {
1464 loginInfo = {}; 1477 loginInfo = {};
1465 Modal.confirm({ 1478 Modal.confirm({
1466 - title: "请输入账号密码:", 1479 + title: enterAccountPwd,
1467 content: ( 1480 content: (
1468 <Form layout="vertical" size="large"> 1481 <Form layout="vertical" size="large">
1469 {loginConfig.map(item => handleGetFormItem(props, item))} 1482 {loginConfig.map(item => handleGetFormItem(props, item))}
1470 </Form> 1483 </Form>
1471 ), 1484 ),
1472 wrapClassName: "mesCommonModal mesLoginForm", 1485 wrapClassName: "mesCommonModal mesLoginForm",
1473 - cancelText: "取消",  
1474 - okText: "确定", 1486 + cancelText: btnCancel,
  1487 + okText: btnSure,
1475 onOk(e) { 1488 onOk(e) {
1476 if (e.name) { 1489 if (e.name) {
1477 if (!loginInfo.sUserNo && !loginInfo.sUserName) { 1490 if (!loginInfo.sUserNo && !loginInfo.sUserName) {
1478 - message.error("账号/姓名不能为空!"); 1491 + message.error(nameNotEmpty);
1479 return; 1492 return;
1480 } 1493 }
1481 1494
1482 if (!loginInfo.sPassWord) { 1495 if (!loginInfo.sPassWord) {
1483 - message.error("密码不能为空!"); 1496 + message.error(passwordNotEmpty);
1484 return; 1497 return;
1485 } 1498 }
1486 1499
src/mes/indexMes/index.js
@@ -630,7 +630,7 @@ const HeaderConponent = () =&gt; { @@ -630,7 +630,7 @@ const HeaderConponent = () =&gt; {
630 destroyOnClose={true} 630 destroyOnClose={true}
631 maskClosable={false} 631 maskClosable={false}
632 wrapClassName={ styles.ztwwwww }> 632 wrapClassName={ styles.ztwwwww }>
633 - <MachineMessageComponent e={objRef.current} shutDown={handleCancel} /> 633 + <MachineMessageComponent e={objRef.current} shutDown={handleCancel} props ={props} />
634 </Modal> 634 </Modal>
635 635
636 </div> 636 </div>
@@ -639,7 +639,7 @@ const HeaderConponent = () =&gt; { @@ -639,7 +639,7 @@ const HeaderConponent = () =&gt; {
639 639
640 640
641 // 停机状态栏 641 // 停机状态栏
642 -const MachineMessageComponent = ({ e , shutDown }) => { 642 +const MachineMessageComponent = ({ e , shutDown, props }) => {
643 const value = e.item?.props?.value || {}; 643 const value = e.item?.props?.value || {};
644 const { current: startTime } = useRef(moment().format("YYYY-MM-DD HH:mm:ss")); 644 const { current: startTime } = useRef(moment().format("YYYY-MM-DD HH:mm:ss"));
645 const { backgroundColor, conent2, fontSize } = value; 645 const { backgroundColor, conent2, fontSize } = value;
@@ -675,12 +675,17 @@ const MachineMessageComponent = ({ e , shutDown }) =&gt; { @@ -675,12 +675,17 @@ const MachineMessageComponent = ({ e , shutDown }) =&gt; {
675 }; 675 };
676 }, []); 676 }, []);
677 677
  678 + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
  679 + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认');
  680 + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
  681 + const confirmState = commonFunc.showLocalMessage(props, 'confirmState', '确认退出该状态?');
  682 +
678 const handleMenuClose = () => { 683 const handleMenuClose = () => {
679 Modal.confirm({ 684 Modal.confirm({
680 - title: "温馨提示:",  
681 - content: <div>确认退出该状态?</div>,  
682 - okText: "确认",  
683 - cancelText: "取消", 685 + title: FriendlyReminder,
  686 + content: <div>{confirmState}</div>,
  687 + okText: BtnSure,
  688 + cancelText: BtnCancel,
684 zIndex: 2000, 689 zIndex: 2000,
685 onOk() { 690 onOk() {
686 shutDown() 691 shutDown()
src/mes/scheduledTasks/machineTasks/index.js
@@ -699,6 +699,8 @@ @@ -699,6 +699,8 @@
699 const btnsearch = commonFunc.showLocalMessage(props, 'BtnSearch', '查询'); 699 const btnsearch = commonFunc.showLocalMessage(props, 'BtnSearch', '查询');
700 const btnAll = commonFunc.showLocalMessage(props, 'btnAll', '全部'); 700 const btnAll = commonFunc.showLocalMessage(props, 'btnAll', '全部');
701 const sWorkOrderNo = commonFunc.showLocalMessage(props, 'sWorkOrderNo', '工单编号'); 701 const sWorkOrderNo = commonFunc.showLocalMessage(props, 'sWorkOrderNo', '工单编号');
  702 + const deviceInfo = commonFunc.showLocalMessage(props, 'deviceInfo', '设备信息');
  703 + const TasksQty = commonFunc.showLocalMessage(props, 'TasksQty', '今日完成任务批次/产量(个)');
702 return ( 704 return (
703 <div className={styles.tasksBox}> 705 <div className={styles.tasksBox}>
704 <Row className={`tasksBg tasksTable`}> 706 <Row className={`tasksBg tasksTable`}>
@@ -756,7 +758,7 @@ @@ -756,7 +758,7 @@
756 </Col> 758 </Col>
757 </Row> 759 </Row>
758 <Row gutter={[15, 0]} className={`tasksBg marginTop taskInfo`}> 760 <Row gutter={[15, 0]} className={`tasksBg marginTop taskInfo`}>
759 - <h2>设备信息</h2> 761 + <h2>{deviceInfo}</h2>
760 <Col span={4} className="taskInfoBox"> 762 <Col span={4} className="taskInfoBox">
761 <div className={"leftBox"}> 763 <div className={"leftBox"}>
762 <img src={taskInfoIcon} alt={taskInfoData.sMachineNameTitle} /> 764 <img src={taskInfoIcon} alt={taskInfoData.sMachineNameTitle} />
@@ -809,7 +811,7 @@ @@ -809,7 +811,7 @@
809 <div className={"leftBox"}> 811 <div className={"leftBox"}>
810 <img src={taskIcon} alt={taskInfoData.tStartingUpTimeTitle} /> 812 <img src={taskIcon} alt={taskInfoData.tStartingUpTimeTitle} />
811 <div> 813 <div>
812 - <h3>今日完成任务批次/产量(个):</h3> 814 + <h3>{TasksQty}:</h3>
813 <p> 815 <p>
814 {taskInfoData.iFinishTaskBatchConent} /{" "} 816 {taskInfoData.iFinishTaskBatchConent} /{" "}
815 {taskInfoData.iFinishProductionNumConent} 817 {taskInfoData.iFinishProductionNumConent}
src/pad/verifyScrapBill/index.js
@@ -287,7 +287,10 @@ const useVerifyScrapBillEvent = props =&gt; { @@ -287,7 +287,10 @@ const useVerifyScrapBillEvent = props =&gt; {
287 props.onBackList(); 287 props.onBackList();
288 } 288 }
289 }; 289 };
290 - 290 + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
  291 + const confirmDelete = commonFunc.showLocalMessage(props, 'confirmDelete', '确定删除');
  292 + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认');
  293 + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
291 // 删除 294 // 删除
292 const handleBtnDel = () => { 295 const handleBtnDel = () => {
293 const handleOkDel = async () => { 296 const handleOkDel = async () => {
@@ -299,24 +302,6 @@ const useVerifyScrapBillEvent = props =&gt; { @@ -299,24 +302,6 @@ const useVerifyScrapBillEvent = props =&gt; {
299 masterData, 302 masterData,
300 slaveConfig 303 slaveConfig
301 } = props; 304 } = props;
302 - // const { userinfo, systemData } = app;  
303 - // const { sMakePerson } = masterData; /* 本单据制单人 */  
304 - // const { sUserName, sType } = userinfo; /* 登录用户 */  
305 - // const iIndex = systemData.findIndex(  
306 - // item => item.sName === "CkxModifyBillNoMakePerson"  
307 - // );  
308 - // if (iIndex > -1) {  
309 - // const sValue = systemData[iIndex].sValue;  
310 - // if (sValue === "0") {  
311 - // /* 系统未启用非制单人修改单据,普通用户非制单人不可以修改制单人的单据 */  
312 - // if (sType !== "sysadmin" && sUserName !== sMakePerson) {  
313 - // message.error(  
314 - // commonFunc.showMessage(app.commonConst, "NoDelByNoMakePerson")  
315 - // );  
316 - // return;  
317 - // }  
318 - // }  
319 - // }  
320 305
321 const value = { 306 const value = {
322 sClientType: "1", 307 sClientType: "1",
@@ -349,10 +334,10 @@ const useVerifyScrapBillEvent = props =&gt; { @@ -349,10 +334,10 @@ const useVerifyScrapBillEvent = props =&gt; {
349 }; 334 };
350 335
351 Modal.confirm({ 336 Modal.confirm({
352 - title: "温馨提示:",  
353 - content: <div>确认删除?</div>,  
354 - okText: "确认",  
355 - cancelText: "取消", 337 + title: FriendlyReminder,
  338 + content: <div>{confirmDelete}</div>,
  339 + okText: BtnSure,
  340 + cancelText: BtnCancel,
356 onOk() { 341 onOk() {
357 handleOkDel(); 342 handleOkDel();
358 } 343 }
@@ -485,7 +470,9 @@ const VerifyScrapBill = baseProps =&gt; { @@ -485,7 +470,9 @@ const VerifyScrapBill = baseProps =&gt; {
485 sProcessParentId: currentProcessParentId 470 sProcessParentId: currentProcessParentId
486 } 471 }
487 }; 472 };
488 - 473 + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认');
  474 + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');4
  475 + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
489 return ( 476 return (
490 <div className={styles.verifyScrapBill}> 477 <div className={styles.verifyScrapBill}>
491 <div className={styles.toolBar}> 478 <div className={styles.toolBar}>
@@ -498,10 +485,10 @@ const VerifyScrapBill = baseProps =&gt; { @@ -498,10 +485,10 @@ const VerifyScrapBill = baseProps =&gt; {
498 onClick={() => { 485 onClick={() => {
499 if (enabled) { 486 if (enabled) {
500 Modal.confirm({ 487 Modal.confirm({
501 - title: "温馨提示:", 488 + title: FriendlyReminder,
502 content: "单据未保存,是否保存后返回?", 489 content: "单据未保存,是否保存后返回?",
503 - okText: "确认",  
504 - cancelText: "取消", 490 + okText: BtnSure,
  491 + cancelText: BtnCancel,
505 onOk() { 492 onOk() {
506 props.onBtnSave(() => { 493 props.onBtnSave(() => {
507 props.onBackList(); 494 props.onBackList();
@@ -640,8 +627,14 @@ const FormComponent = props =&gt; { @@ -640,8 +627,14 @@ const FormComponent = props =&gt; {
640 return <CommonViewTable {...viewProps} />; 627 return <CommonViewTable {...viewProps} />;
641 }; 628 };
642 629
  630 +
643 // 表格 631 // 表格
644 const TableComponent = props => { 632 const TableComponent = props => {
  633 + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
  634 + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认');
  635 + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
  636 + const confirmDelRow = commonFunc.showLocalMessage(props, 'confirmDelRow', '确认删除行?');
  637 +
645 const baseProps = commonBusiness.getTableTypes("slave", { 638 const baseProps = commonBusiness.getTableTypes("slave", {
646 ...props, 639 ...props,
647 noStorageColumn: true 640 noStorageColumn: true
@@ -655,10 +648,10 @@ const TableComponent = props =&gt; { @@ -655,10 +648,10 @@ const TableComponent = props =&gt; {
655 bAddFirst: true, 648 bAddFirst: true,
656 onMesTableLineDel: (...args) => { 649 onMesTableLineDel: (...args) => {
657 Modal.confirm({ 650 Modal.confirm({
658 - title: "温馨提示:",  
659 - content: <div>确认删除行?</div>,  
660 - okText: "确认",  
661 - cancelText: "取消", 651 + title: FriendlyReminder,
  652 + content: <div>{confirmDelRow}</div>,
  653 + okText: BtnSure,
  654 + cancelText: BtnCancel,
662 onOk() { 655 onOk() {
663 props.onMesTableLineDel(...args); 656 props.onMesTableLineDel(...args);
664 } 657 }