- {"白粉青蓝橙绿黄红".split("").map((item, index) => {
+ {commonFunc.showLocalMessage(this.props, 'eightColors', '白,粉,青,蓝,橙,绿,黄,红').split(",").map((item, index) => {
return (
label {
+ &::before {
+ display: none;
+ }
+
+ &::after {
+ display: none;
+ }
+
+ display: flex;
+ justify-content: center;
+
+ .xly-grid-label {
+ height: auto !important;
+ font-size: 10px !important;
+ display: -webkit-box;
+ /*! autoprefixer: ignore next */
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: normal !important;
+ line-height: 1.2;
+
+ &::after {
+ content: ':';
+ position: relative;
+ top: -0.5px;
+ margin: 0 8px 0 2px;
+ }
+ }
+ }
+
+ .react-grid-item .ant-form-item-label>label.ant-form-item-required:not(.ant-form-item-required-mark-optional) {
+ .xly-grid-label {
+ &::before {
+ display: inline-block;
+ margin-right: 4px;
+ color: #ff4d4f;
+ font-size: 12px;
+ font-family: SimSun, sans-serif;
+ line-height: 1;
+ content: '*';
+ }
+ }
+ }
+
th[width="40"] {
.th-div {
width: 32px;
diff --git a/src/mes/common/commonModelComponent/index.js b/src/mes/common/commonModelComponent/index.js
index fe68d00..116d2fe 100644
--- a/src/mes/common/commonModelComponent/index.js
+++ b/src/mes/common/commonModelComponent/index.js
@@ -2460,6 +2460,13 @@ const CommonParamsModalComponent = props => {
}
};
+ const confirm = commonFunc.showLocalMessage(props, 'confirm', '确认');
+ const BtnFirst = commonFunc.showLocalMessage(props, 'BtnFirst', '首条');
+ const BtnPrior = commonFunc.showLocalMessage(props, 'BtnPrior', '上一条');
+ const BtnNext = commonFunc.showLocalMessage(props, 'BtnNext', '下一条');
+ const BtnLast = commonFunc.showLocalMessage(props, 'BtnLast', '末条');
+ const workParam = commonFunc.showLocalMessage(props, "workParam", "工单参数");
+
return props[modalName] ? (
{
props.onSaveState({ [modalName]: false });
}}
>
- 确定
+ {confirm}
}
>
@@ -2490,7 +2497,7 @@ const CommonParamsModalComponent = props => {
handleBtnParamPage("first");
}}
>
- 首条
+ {BtnFirst}
{
handleBtnParamPage("before");
}}
>
- 上一条
+ {BtnPrior}
{
handleBtnParamPage("next");
}}
>
- 下一条
+ {BtnNext}
{
handleBtnParamPage("last");
}}
>
- 末条
+ {BtnLast}
{[""].map(() => {
@@ -2528,7 +2535,7 @@ const CommonParamsModalComponent = props => {
sParamData: [
{
sParamType: "sWorkOrder",
- sParamName: "工单参数"
+ sParamName: workParam
}
],
tableName: "process",
diff --git a/src/mes/common/inputMultiModalComponent/index.js b/src/mes/common/inputMultiModalComponent/index.js
index 0f5fff9..c7e2e87 100644
--- a/src/mes/common/inputMultiModalComponent/index.js
+++ b/src/mes/common/inputMultiModalComponent/index.js
@@ -70,6 +70,9 @@ const InputMultiModalComponent = props => {
props.onCancel();
};
+ const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
+ const confirm = commonFunc.showLocalMessage(props, 'confirm', '确认');
+
return (
{
footer={
props.onCancel()}>
- 取消
+ {BtnCancel}
- 确定
+ {confirm}
}
diff --git a/src/mes/common/siderInfoComponent/index.js b/src/mes/common/siderInfoComponent/index.js
index 0141c89..9bfb8a7 100644
--- a/src/mes/common/siderInfoComponent/index.js
+++ b/src/mes/common/siderInfoComponent/index.js
@@ -446,7 +446,7 @@ const WorkOrderTypeComponent = () => {
flex={"160px"}
className={styles.productionTitle}
>
- {productionSchedule}
+ {productionSchedule}
{/* }
@@ -492,7 +492,7 @@ const WorkOrderTypeComponent = () => {
flex={"160px"}
className={styles.productionTitle}
>
- {specialFocus}
+ {specialFocus}
{
flex={"160px"}
className={styles.productionTitle}
>
- {config.showName}:
+ {config.showName}:
{
const oldPassword = commonFunc.showLocalMessage(props, 'oldPassword', '请输入原密码');
const newPassword = commonFunc.showLocalMessage(props, 'newPassword', '请输入新密码');
const passswordAgain = commonFunc.showLocalMessage(props, 'passswordAgain', '请再次输入密码');
- const ModifyPassword = commonFunc.showLocalMessage(props, 'ModifyPassword','修改密码');/* 修改 */
+ const ModifyPassword = commonFunc.showLocalMessage(props, 'ModifyPassword', '修改密码');/* 修改 */
// 确认修改密码
const handleOk = () => {
- const url = `${
- commonConfig.server_host
- }sftlogininfo/updatePasswordUserName/update?sModelsId=${100}`;
+ const url = `${commonConfig.server_host
+ }sftlogininfo/updatePasswordUserName/update?sModelsId=${100}`;
props.dispatch({
type: "app/editPwd",
payload: {
@@ -369,6 +368,9 @@ const useIndexMesEvent = props => {
const { userinfo } = props.app;
const { sLanguage } = userinfo;
document.querySelector('html').setAttribute('lang', sLanguage);
+ return () => {
+ document.querySelector('html').setAttribute('lang', 'en');
+ }
}, []);
return {
@@ -427,9 +429,8 @@ const IndexMes = baseProps => {
token,
sModelsId
) => {
- const url = `${
- commonConfig.server_host
- }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`;
+ const url = `${commonConfig.server_host
+ }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`;
const returnData = (await commonServices.postValueService(
token,
value,
@@ -446,16 +447,16 @@ const IndexMes = baseProps => {
};
const currentLanguage = props?.app?.userinfo?.sLanguage || 'zhCN'; // 默认为中文
const getLocale = () => {
- switch(currentLanguage) {
+ switch (currentLanguage) {
case 'sEnglish':
return enUS;
case 'sBig5':
return zhTW;
default:
- {
- moment.locale('zh-cn');
- return zhCN;
- }
+ {
+ moment.locale('zh-cn');
+ return zhCN;
+ }
}
};
const bExsitLogin = commonFunc.showLocalMessage(props, 'bExsitLogin', '是否退出登录');
@@ -482,7 +483,7 @@ const IndexMes = baseProps => {
{logoutShow && (
{
@@ -510,7 +511,7 @@ const HeaderConponent = () => {
const sLanguage = userinfo.sLanguage;
let weekday = ["日", "一", "二", "三", "四", "五", "六"];
- const sunTitle = sLanguage ==='sChinese' ? '星期' : '';
+ const sunTitle = sLanguage === 'sChinese' ? '星期' : '';
const [time, setTime] = useState("0000-00-00 00:00:00");
const { logout } = useContext(myContext);
useEffect(() => {
@@ -532,8 +533,8 @@ const HeaderConponent = () => {
const logoTitle = commonFunc.showLocalMessage(props, 'EBC-MES', '小羚羊生产执行系统');
- const account= commonFunc.showLocalMessage(props, 'account', '账号');
- const machine= commonFunc.showLocalMessage(props, 'machine', '机台');
+ const account = commonFunc.showLocalMessage(props, 'account', '账号');
+ const machine = commonFunc.showLocalMessage(props, 'machine', '机台');
const classGroup = commonFunc.showLocalMessage(props, 'classGroup', '班组');
const dayShift = commonFunc.showLocalMessage(props, 'dayShift', '白班');
const nightShift = commonFunc.showLocalMessage(props, 'nightShift', '夜班');
@@ -577,16 +578,16 @@ const HeaderConponent = () => {
- const [ isModalOpen, setIsModalOpen ] = useState(false);
- const objRef = useRef({});
- const handleCancel = () => setIsModalOpen(false);
- window.$wkcFullStatus = (item , is) =>{
- objRef.current = {
- ...objRef.current,
- ...item
- }
- setIsModalOpen(is);
+ const [isModalOpen, setIsModalOpen] = useState(false);
+ const objRef = useRef({});
+ const handleCancel = () => setIsModalOpen(false);
+ window.$wkcFullStatus = (item, is) => {
+ objRef.current = {
+ ...objRef.current,
+ ...item
}
+ setIsModalOpen(is);
+ }
@@ -626,20 +627,20 @@ const HeaderConponent = () => {
-
-
-
+
+
+
);
@@ -647,41 +648,41 @@ const HeaderConponent = () => {
// 停机状态栏
-const MachineMessageComponent = ({ e , shutDown, props }) => {
- const value = e.item?.props?.value || {};
- const { current: startTime } = useRef(moment().format("YYYY-MM-DD HH:mm:ss"));
- const { backgroundColor, conent2, fontSize } = value;
- const [currentTime, setCurrentTime] = useState("");
- const [diffHours, setDiffHours] = useState(0);
- const [diffMins, setDiffMins] = useState(0);
- const [diffSecs, setDiffSecs] = useState(0);
- useEffect(() => {
- const getTime = () => {
- const currentTimeNew = moment().format("YYYY-MM-DD HH:mm:ss");
- setCurrentTime(currentTimeNew);
-
- const duration = moment.duration(
- moment(currentTimeNew).diff(moment(startTime))
- );
- const hours = duration.asHours().toString().split(".")[0];
- const minutes = (duration.asMinutes() % 60).toString().split(".")[0];
- const seconds = duration.asSeconds() % 60;
-
- setDiffHours(hours<=9? `0${hours}`: hours);
- setDiffMins(minutes<=9? `0${minutes}`: minutes );
- setDiffSecs(seconds<=9? `0${seconds}`: seconds);
- };
+const MachineMessageComponent = ({ e, shutDown, props }) => {
+ const value = e.item?.props?.value || {};
+ const { current: startTime } = useRef(moment().format("YYYY-MM-DD HH:mm:ss"));
+ const { backgroundColor, conent2, fontSize } = value;
+ const [currentTime, setCurrentTime] = useState("");
+ const [diffHours, setDiffHours] = useState(0);
+ const [diffMins, setDiffMins] = useState(0);
+ const [diffSecs, setDiffSecs] = useState(0);
+ useEffect(() => {
+ const getTime = () => {
+ const currentTimeNew = moment().format("YYYY-MM-DD HH:mm:ss");
+ setCurrentTime(currentTimeNew);
+
+ const duration = moment.duration(
+ moment(currentTimeNew).diff(moment(startTime))
+ );
+ const hours = duration.asHours().toString().split(".")[0];
+ const minutes = (duration.asMinutes() % 60).toString().split(".")[0];
+ const seconds = duration.asSeconds() % 60;
+
+ setDiffHours(hours <= 9 ? `0${hours}` : hours);
+ setDiffMins(minutes <= 9 ? `0${minutes}` : minutes);
+ setDiffSecs(seconds <= 9 ? `0${seconds}` : seconds);
+ };
+ getTime();
+ const timer = setInterval(() => {
+ console.log('定时器状态')
getTime();
- const timer = setInterval(() => {
- console.log('定时器状态')
- getTime();
- }, 1000);
+ }, 1000);
- return () => {
- clearInterval(timer);
- };
- }, []);
+ return () => {
+ clearInterval(timer);
+ };
+ }, []);
const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示');
const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认');
@@ -703,108 +704,108 @@ const MachineMessageComponent = ({ e , shutDown, props }) => {
const about = commonFunc.showLocalMessage(props, 'about', '约:');
const handleMenuClose = () => {
- Modal.confirm({
- title: FriendlyReminder,
- content:
{confirmState}
,
- okText: BtnSure,
- cancelText: BtnCancel,
- zIndex: 2000,
- onOk() {
- shutDown()
- },
- onCancel() {}
- });
- };
+ Modal.confirm({
+ title: FriendlyReminder,
+ content:
{confirmState}
,
+ okText: BtnSure,
+ cancelText: BtnCancel,
+ zIndex: 2000,
+ onOk() {
+ shutDown()
+ },
+ onCancel() { }
+ });
+ };
- const isMinMax = useRef('max');
- const draggleRef = useRef(null);
- const [bounds, setBounds] = useState({ left: 0, top: 0, bottom: 0, right: 0 });
- const onStart = (_event, uiData) => {
- const { clientWidth, clientHeight } = window.document.documentElement;
- const targetRect = draggleRef.current?.getBoundingClientRect();
- if (!targetRect) {
- return;
- }
- setBounds({
- left: -targetRect.left + uiData.x,
- right: clientWidth - (targetRect.right - uiData.x),
- top: -targetRect.top + uiData.y,
- bottom: clientHeight - (targetRect.bottom - uiData.y),
- });
- };
+ const isMinMax = useRef('max');
+ const draggleRef = useRef(null);
+ const [bounds, setBounds] = useState({ left: 0, top: 0, bottom: 0, right: 0 });
+ const onStart = (_event, uiData) => {
+ const { clientWidth, clientHeight } = window.document.documentElement;
+ const targetRect = draggleRef.current?.getBoundingClientRect();
+ if (!targetRect) {
+ return;
+ }
+ setBounds({
+ left: -targetRect.left + uiData.x,
+ right: clientWidth - (targetRect.right - uiData.x),
+ top: -targetRect.top + uiData.y,
+ bottom: clientHeight - (targetRect.bottom - uiData.y),
+ });
+ };
- return (
-
-
- {
- isMinMax.current == 'min'?
-
onStart(event, uiData)}>
-
-
isMinMax.current = 'max'}>
-
{conent2}
-
{beginTime} {startTime}
-
{downtimeDuration}{diffHours}{second} {diffMins}{min} {diffSecs}{second}
-
- isMinMax.current = 'max'} > 最大化
- 退出
-
-
-
-
- :
-
-
{equipmentShutdown}
-
- {conent2}
-
-
- {DowntimeStartTime}
- {startTime}
-
-
- {sct}
- {currentTime}
-
-
- {cdd}
-
- {about}
- {diffHours}{hour} {diffMins}{min} {diffSecs}{second}
-
-
-
- isMinMax.current = 'min'} > {minimize}
- {ExitLogin}
-
+ return (
+
+
+ {
+ isMinMax.current == 'min' ?
+
onStart(event, uiData)}>
+
+
isMinMax.current = 'max'}>
+
{conent2}
+
{beginTime} {startTime}
+
{downtimeDuration}{diffHours}{second} {diffMins}{min} {diffSecs}{second}
+
+ isMinMax.current = 'max'} > 最大化
+ 退出
- }
+
+
+
+ :
+
+
{equipmentShutdown}
+
+ {conent2}
+
+
+ {DowntimeStartTime}
+ {startTime}
+
+
+ {sct}
+ {currentTime}
+
+
+ {cdd}
+
+ {about}
+ {diffHours}{hour} {diffMins}{min} {diffSecs}{second}
+
+
+
+ isMinMax.current = 'min'} > {minimize}
+ {ExitLogin}
+
+
+ }
-
- );
+
+ );
};
- // 左侧侧边栏
+// 左侧侧边栏
const SiderComponent = () => {
const { dispatch, hooksProps, props, ...rest } = useContext(myContext);
const { currentContent, menuMap } = hooksProps;
- const teamInformation= commonFunc.showLocalMessage(props, 'teamInformation', '班组信息');
+ const teamInformation = commonFunc.showLocalMessage(props, 'teamInformation', '班组信息');
- const scheduledTask= commonFunc.showLocalMessage(props, 'scheduledTask', '计划任务');
+ const scheduledTask = commonFunc.showLocalMessage(props, 'scheduledTask', '计划任务');
- const productionExecution= commonFunc.showLocalMessage(props, 'productionExecution', '生产执行');
+ const productionExecution = commonFunc.showLocalMessage(props, 'productionExecution', '生产执行');
- const maintenanceRepair= commonFunc.showLocalMessage(props, 'maintenanceRepair', '维修保养');
+ const maintenanceRepair = commonFunc.showLocalMessage(props, 'maintenanceRepair', '维修保养');
- const queryTracing= commonFunc.showLocalMessage(props, 'queryTracing', '查询追踪');
+ const queryTracing = commonFunc.showLocalMessage(props, 'queryTracing', '查询追踪');
- const operationGuide= commonFunc.showLocalMessage(props, 'teamInformation', '操作指南');
+ const operationGuide = commonFunc.showLocalMessage(props, 'teamInformation', '操作指南');
const menuList = [
{
@@ -984,9 +985,8 @@ const SystemFunComponent = () => {
value.iFlag = iFlag;
}
- const url = `${
- commonConfig.server_host
- }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`;
+ const url = `${commonConfig.server_host
+ }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`;
const returnData = (await commonServices.postValueService(
token,
value,
@@ -1003,7 +1003,7 @@ const SystemFunComponent = () => {
onOk() {
handleProcedureCall(params, 1);
},
- onCancel() {}
+ onCancel() { }
});
} else if (code === -8) {
Modal.info({
@@ -1060,9 +1060,8 @@ const SystemFunComponent = () => {
value.iFlag = iFlag;
}
- const url = `${
- commonConfig.server_host
- }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`;
+ const url = `${commonConfig.server_host
+ }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`;
const returnData = (await commonServices.postValueService(
token,
value,
@@ -1079,7 +1078,7 @@ const SystemFunComponent = () => {
onOk() {
handleProcedureCall1(params, 1);
},
- onCancel() {}
+ onCancel() { }
});
} else if (code === -8) {
Modal.info({
@@ -1137,14 +1136,14 @@ const SystemFunComponent = () => {
const getSystemFunContent = () => {
const userinfo = commonUtils.getAppData("userinfo");
- const ModifyPassword = commonFunc.showLocalMessage(props, 'ModifyPassword','修改密码');/* 修改密码 */
+ const ModifyPassword = commonFunc.showLocalMessage(props, 'ModifyPassword', '修改密码');/* 修改密码 */
const faceCollection = commonFunc.showLocalMessage(props, 'faceCollection', '人脸采集');
const moreFunctions = commonFunc.showLocalMessage(props, 'moreFunctions', '更多功能');
const Logout = commonFunc.showLocalMessage(props, 'Logout', '退出登录');
- const shutDown= commonFunc.showLocalMessage(props, 'shutDown', '关机');
- const resetDailyReport= commonFunc.showLocalMessage(props, 'resetDailyReport', '关机');
- const switchToManual= commonFunc.showLocalMessage(props, 'switchToManual', '切换手动');
- const SwitchAuto= commonFunc.showLocalMessage(props, 'SwitchAuto', '切换自动');
+ const shutDown = commonFunc.showLocalMessage(props, 'shutDown', '关机');
+ const resetDailyReport = commonFunc.showLocalMessage(props, 'resetDailyReport', '关机');
+ const switchToManual = commonFunc.showLocalMessage(props, 'switchToManual', '切换手动');
+ const SwitchAuto = commonFunc.showLocalMessage(props, 'SwitchAuto', '切换自动');
const { bPlcSd } = userinfo;
diff --git a/src/mes/scheduledTasks/machineTasks/index.js b/src/mes/scheduledTasks/machineTasks/index.js
index 1f99005..37d361b 100644
--- a/src/mes/scheduledTasks/machineTasks/index.js
+++ b/src/mes/scheduledTasks/machineTasks/index.js
@@ -374,7 +374,7 @@
const result = await new Promise(resolve => {
Modal.confirm({
title: FriendlyReminder,
- content:
请选择要变更的状态
,
+ content:
{sLanguage === "sEnglish" ? "Please select the status you want to change" : "请选择要变更的状态"}
,
okText: finishConstruction,
cancelText: pause,
onOk() {