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