Commit edd93ea6c019a8ae12390374599133e3a4d337c1

Authored by Min
1 parent 217350be

1.完善MES翻译,处理上班,下班不调用指令集bug

src/mes/common/commonModelComponent/index.js
@@ -1219,6 +1219,7 @@ const CommonModelComponent = props => { @@ -1219,6 +1219,7 @@ const CommonModelComponent = props => {
1219 const { 1219 const {
1220 sName, 1220 sName,
1221 sTabName, 1221 sTabName,
  1222 + sEnglishTabName,
1222 showType, 1223 showType,
1223 defaultEnabled, 1224 defaultEnabled,
1224 bHideTitle, 1225 bHideTitle,
@@ -1252,6 +1253,7 @@ const CommonModelComponent = props => { @@ -1252,6 +1253,7 @@ const CommonModelComponent = props => {
1252 sName, // 配置对应的sGrd 1253 sName, // 配置对应的sGrd
1253 bHideTitle, //隐藏标题 1254 bHideTitle, //隐藏标题
1254 tableBtnsConfig, // 表格按钮配置 1255 tableBtnsConfig, // 表格按钮配置
  1256 + sEnglishTabName,
1255 bFirstComponent: level === 0 && index === -1 1257 bFirstComponent: level === 0 && index === -1
1256 }; 1258 };
1257 1259
@@ -1651,6 +1653,7 @@ const CommonTableComponent = props => { @@ -1651,6 +1653,7 @@ const CommonTableComponent = props => {
1651 sTabName, 1653 sTabName,
1652 showType, 1654 showType,
1653 sName, 1655 sName,
  1656 + sEnglishTabName,
1654 tableBtnsConfig: tableBtnsConfigOld = [] 1657 tableBtnsConfig: tableBtnsConfigOld = []
1655 } = props; 1658 } = props;
1656 if (showType !== "table") return ""; 1659 if (showType !== "table") return "";
@@ -1864,10 +1867,12 @@ const CommonTableComponent = props => { @@ -1864,10 +1867,12 @@ const CommonTableComponent = props => {
1864 ...props, 1867 ...props,
1865 sName 1868 sName
1866 }; 1869 };
  1870 + const sLanguage = props.app.userinfo?.sLanguage;
1867 1871
  1872 + const sTabLocalName = sLanguage === 'sEnglish' ? sEnglishTabName : sTabName;
1868 return ( 1873 return (
1869 <> 1874 <>
1870 - <TabTitleComponent {...props} sTabName={sTabName} /> 1875 + <TabTitleComponent {...props} sTabName={sTabLocalName } />
1871 <StaticEditTable {...tableProps} /> 1876 <StaticEditTable {...tableProps} />
1872 <CommonOperationBarComponent {...operationBarProps} /> 1877 <CommonOperationBarComponent {...operationBarProps} />
1873 <SwasterTypeTable 1878 <SwasterTypeTable
src/mes/serviceUpkeep/equipmentRepair/index.js
@@ -54,8 +54,8 @@ const equipmentTranslations = { @@ -54,8 +54,8 @@ const equipmentTranslations = {
54 "设备点检记录": "Equipment Inspection Records", 54 "设备点检记录": "Equipment Inspection Records",
55 "设备资料": "Equipment Information", 55 "设备资料": "Equipment Information",
56 "设备信息": "Equipment Info", 56 "设备信息": "Equipment Info",
57 - "设备编号": "Equipment No.",  
58 - "设备名称": "Equipment Name" 57 + "设备编号": "Number",
  58 + "设备名称": "Name"
59 }, 59 },
60 sBig5: { 60 sBig5: {
61 "维修申请记录": "維修申請記錄", 61 "维修申请记录": "維修申請記錄",
src/mes/teamInfo/index.js
@@ -173,24 +173,36 @@ const useTeamInfoEvent = props =&gt; { @@ -173,24 +173,36 @@ const useTeamInfoEvent = props =&gt; {
173 }; 173 };
174 return ( 174 return (
175 <Form.Item 175 <Form.Item
176 - label={item.sName === "sUserName" ? "账号" : item.showName} 176 + label={item.sName === "sUserName" ? account : item.showName}
177 key={item.sName} 177 key={item.sName}
178 > 178 >
179 <ShowType {...showTypeProps} /> 179 <ShowType {...showTypeProps} />
180 </Form.Item> 180 </Form.Item>
181 ); 181 );
182 }; 182 };
  183 + const selectMethod = commonFunc.showLocalMessage(props, 'selectMethod', '请选择验证方式');
  184 + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
  185 + const accountPwd = commonFunc.showLocalMessage(props, 'account', '账号密码');
  186 + const faceRecognition = commonFunc.showLocalMessage(props, 'faceRecognition', '人脸识别');
  187 + const btnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
  188 + const btnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定');
  189 + const enterAccountPwd = commonFunc.showLocalMessage(props, 'enterAccountPwd', '请输入账号密码');
  190 + const nameNotEmpty = commonFunc.showLocalMessage(props, 'NameNotEmpty', '账号/姓名不能为空!');
  191 + const passwordNotEmpty = commonFunc.showLocalMessage(props, 'PasswordNotEmpty', '密码不能为空!');
  192 + const account = commonFunc.showLocalMessage(props, 'account', '账号');
  193 +
  194 + // const 请选择验证方式
183 const getFaceResult = async () => { 195 const getFaceResult = async () => {
184 let faceResult = false; 196 let faceResult = false;
185 const loginType = await new Promise(resolve => { 197 const loginType = await new Promise(resolve => {
186 Modal.confirm({ 198 Modal.confirm({
187 - title: "温馨提示:",  
188 - content: "请选择验证方式", 199 + title: FriendlyReminder,
  200 + content: selectMethod,
189 closable: true, 201 closable: true,
190 maskClosable: true, 202 maskClosable: true,
191 wrapClassName: "mesCommonModal", 203 wrapClassName: "mesCommonModal",
192 - cancelText: "账号密码",  
193 - okText: "人脸识别", 204 + cancelText: accountPwd,
  205 + okText: faceRecognition,
194 onOk() { 206 onOk() {
195 resolve(1); 207 resolve(1);
196 }, 208 },
@@ -209,7 +221,7 @@ const useTeamInfoEvent = props =&gt; { @@ -209,7 +221,7 @@ const useTeamInfoEvent = props =&gt; {
209 // 人脸识别 221 // 人脸识别
210 faceResult = await new Promise(resolve => { 222 faceResult = await new Promise(resolve => {
211 const modal = Modal.info({ 223 const modal = Modal.info({
212 - title: "人脸识别", 224 + title: faceRecognition,
213 keyboard: false, 225 keyboard: false,
214 content: ( 226 content: (
215 <FaceDetect 227 <FaceDetect
@@ -223,7 +235,7 @@ const useTeamInfoEvent = props =&gt; { @@ -223,7 +235,7 @@ const useTeamInfoEvent = props =&gt; {
223 /> 235 />
224 ), 236 ),
225 wrapClassName: "xlyFaceAuthModal", 237 wrapClassName: "xlyFaceAuthModal",
226 - okText: "取消", 238 + okText: btnCancel,
227 onOk() { 239 onOk() {
228 resolve(false); 240 resolve(false);
229 } 241 }
@@ -257,24 +269,24 @@ const useTeamInfoEvent = props =&gt; { @@ -257,24 +269,24 @@ const useTeamInfoEvent = props =&gt; {
257 faceResult = await new Promise(resolve => { 269 faceResult = await new Promise(resolve => {
258 loginInfo = {}; 270 loginInfo = {};
259 Modal.confirm({ 271 Modal.confirm({
260 - title: "请输入账号密码:", 272 + title: enterAccountPwd,
261 content: ( 273 content: (
262 <Form layout="vertical" size="large"> 274 <Form layout="vertical" size="large">
263 {loginConfig.map(item => handleGetFormItem(props, item))} 275 {loginConfig.map(item => handleGetFormItem(props, item))}
264 </Form> 276 </Form>
265 ), 277 ),
266 wrapClassName: "mesCommonModal mesLoginForm", 278 wrapClassName: "mesCommonModal mesLoginForm",
267 - cancelText: "取消",  
268 - okText: "确定", 279 + cancelText: btnCancel,
  280 + okText: btnSure,
269 onOk(e) { 281 onOk(e) {
270 if (e.name) { 282 if (e.name) {
271 if (!loginInfo.sUserNo && !loginInfo.sUserName) { 283 if (!loginInfo.sUserNo && !loginInfo.sUserName) {
272 - message.error("账号/姓名不能为空!"); 284 + message.error(nameNotEmpty);
273 return; 285 return;
274 } 286 }
275 287
276 if (!loginInfo.sPassWord) { 288 if (!loginInfo.sPassWord) {
277 - message.error("密码不能为空!"); 289 + message.error(passwordNotEmpty);
278 return; 290 return;
279 } 291 }
280 292
@@ -411,7 +423,8 @@ const TeamInfo = baseProps =&gt; { @@ -411,7 +423,8 @@ const TeamInfo = baseProps =&gt; {
411 ); 423 );
412 const { formData = [] } = props; 424 const { formData = [] } = props;
413 if (!formData.length) return ""; 425 if (!formData.length) return "";
414 - 426 + const inWorking = commonFunc.showLocalMessage(props, 'inWorking', '当前正在上班中..."!');
  427 + const workFirst = commonFunc.showLocalMessage(props, 'workFirst', '当前正在上班中..."!');
415 const tableBaseProps = commonBusiness.getTableTypes("slave0", props); 428 const tableBaseProps = commonBusiness.getTableTypes("slave0", props);
416 const { config: slave0Config } = tableBaseProps; 429 const { config: slave0Config } = tableBaseProps;
417 430
@@ -460,15 +473,15 @@ const TeamInfo = baseProps =&gt; { @@ -460,15 +473,15 @@ const TeamInfo = baseProps =&gt; {
460 // ], 473 // ],
461 onTableBtnClick: item => { 474 onTableBtnClick: item => {
462 const { record, config } = item; 475 const { record, config } = item;
463 - if (config.showName === "上班") { 476 + if (config.sChinese === "上班" || config.sControlName === 'BtnEnventStartWork') {
464 if (record.sActualEmployeeName) { 477 if (record.sActualEmployeeName) {
465 - message.info("当前正在上班中...", 3); 478 + message.info(inWorking, 3);
466 return; 479 return;
467 } 480 }
468 props.onChangeWorkState(item, "on"); 481 props.onChangeWorkState(item, "on");
469 - } else if (config.showName === "下班") { 482 + } else if (config.sChinese === "下班" || config.sControlName === 'BtnEnventOfftWork') {
470 if (!record.sActualEmployeeName) { 483 if (!record.sActualEmployeeName) {
471 - message.info("请先上班", 3); 484 + message.info(workFirst, 3);
472 return; 485 return;
473 } 486 }
474 props.onChangeWorkState(item, "off"); 487 props.onChangeWorkState(item, "off");
src/utils/utils.js
@@ -587,4 +587,4 @@ export function getAppData(name, key) { @@ -587,4 +587,4 @@ export function getAppData(name, key) {
587 587
588 export function setAppData(name, value) { 588 export function setAppData(name, value) {
589 localStorage.setItem(`${config.prefix}${name}`, typeof value === "string" ? value : JSON.stringify(value)); 589 localStorage.setItem(`${config.prefix}${name}`, typeof value === "string" ? value : JSON.stringify(value));
590 -}  
591 \ No newline at end of file 590 \ No newline at end of file
  591 +}