+ {/* 第一列:停机原因列 */}
+ {responsibilityRowspans[trIndex] > 0 && (
+
+
+ {trData.status[0]?.responsibilityType || ""}
+
+ |
+ )}
{trData.type === 1 && (
{
delete tabConfigFilter[0].configList[1].children[2].configList[7];
} catch (error) {}
}
+
+ tabConfigFilter[0].configList[0].children[1].configList = tabConfigFilter[0].configList[0].children[1].configList.filter(item => !!item);
+
+ [
+ tabConfigFilter[0].configList[0].children[1].configList[0],
+ tabConfigFilter[0].configList[0].children[1].configList[1]
+ ] =
+ [
+ tabConfigFilter[0].configList[0].children[1].configList[1],
+ tabConfigFilter[0].configList[0].children[1].configList[0]
+ ];
+
return [tableListFilter, tabConfigFilter];
};
@@ -574,10 +586,12 @@ const useCommonModelEvent = props => {
runningTime = isBefore8AM
? now.subtract(1, "days").format("YYYY-MM-DD")
: now.format("YYYY-MM-DD"),
- runningShift = props.app?.userinfo?.sShift.toString()
+ runningShift = props.app?.userinfo?.sShift.toString(),
+ iShowType = 1
} = props;
conditonValues.tCreateTime = runningTime;
conditonValues.sShiftNew = runningShift;
+ conditonValues.iShowType = iShowType;
}
//【班组报工特殊处理】历史日报查看详情如果班组报工没查到数据,用sSReserve1当历史日报的sId
@@ -698,9 +712,9 @@ const useCommonModelEvent = props => {
//【班组报工特殊处理】历史日报查看详情如果班组报工没查到数据,用sSReserve1当历史日报的sId
if (
- refreshTableList.length === 1 &&
+ refreshTableList?.length === 1 &&
refreshTableList[0] === "table0" &&
- !addState.table0Data.length &&
+ !addState.table0Data?.length &&
props.sSReserve1
) {
addState.refreshTableList = ["tableS0"];
@@ -1106,7 +1120,7 @@ const useComputedCommonDivHeight = props => {
) {
returnHeight = `calc(${returnHeight} - 40px)`;
}
-
+
// 下料界面板材信息
if(sTabName=='版材信息'){
returnHeight = `calc(100% - 10px)`;
@@ -1253,7 +1267,11 @@ const CommonModelComponent = props => {
bFirstComponent: level === 0 && index === -1
};
- const commonDivHeight = useComputedCommonDivHeight(componentProps);
+ let commonDivHeight = useComputedCommonDivHeight(componentProps);
+
+ if(sName === 'table1'){
+ commonDivHeight = "calc(calc(100% - 50px))";
+ }
return (
{
const config = props.onMergeTableConfig(configOld);
const { gdsconfigformslave: gdsconfigformslaveOld = [] } = config;
- const gdsconfigformslave = cloneDeep(gdsconfigformslaveOld);
+ let gdsconfigformslave = cloneDeep(gdsconfigformslaveOld);
// 展示的数据
let viewRow = {};
@@ -1538,6 +1556,8 @@ const CommonViewTableComponent = props => {
});
}
});
+
+ gdsconfigformslave = props.onMergeTableConfig({ ...configOld, gdsconfigformslave }).gdsconfigformslave;
}
}
@@ -1601,7 +1621,7 @@ const CommonViewTableComponent = props => {
if(viewProps.tableS0Data && viewProps.tableS0Data.length!==0){
viewProps.reportPeopleSelectedRowKeys = viewProps.tableS0Data[0].sMainAssistantTransId?.split(",")
-
+
}
if (commonUtils.isEmptyObject(viewRow)) {
@@ -1619,8 +1639,8 @@ const CommonViewTableComponent = props => {
reportRef={reportRef.current || {}}
hasShowInfo={viewProps.viewRow}
/>
-
-
+
+
>
);
})}
@@ -1926,7 +1946,15 @@ const CommonRepairComponent = props => {
const viewProps = {
...props,
enabled,
- viewConfigs: filterConfig.map(item => ({ ...item, iColValue: 24 })),
+ viewConfigs: filterConfig.map(item => {
+ if (item.sName === 'dAdvanceReportQty') {
+ return {
+ ...item,
+ iTag: viewRow.bAutoReport ? 1 : 3
+ }
+ }
+ return item;
+ }).map(item => ({ ...item, iColValue: 24 })),
tableConfig: config,
iColValueView: 24,
viewRow,
@@ -2098,6 +2126,8 @@ const RunningStatusConditionComponent = props => {
: now
);
+ const [iShowType, setShowType] = useState(1);
+
const flag = useRef(false);
useEffect(
() => {
@@ -2106,12 +2136,13 @@ const RunningStatusConditionComponent = props => {
props.onSaveState({
runningTime: dateValue.format("YYYY-MM-DD"),
runningShift: value,
+ iShowType,
refreshTableList: ["table0"],
runningStatusConditionFlag: true // 行车记录修改时间标记
});
}
},
- [value, dateValue]
+ [value, dateValue, iShowType]
);
const [visible, setVisible] = useState(false);
@@ -2193,9 +2224,19 @@ const RunningStatusConditionComponent = props => {
}
};
+ const handleSwitchShowType = (e) => {
+ const { value } = e.target;
+ flag.current = true;
+ setShowType(value);
+ }
+
return (
+
+ 未上报
+ 全部
+
{
const [disabled, setDisabled] = useState(true);
const [bounds, setBounds] = useState({ left: 0, top: 0, bottom: 0, right: 0 });
const draggleRef = useRef(null);
+ const [freshCount, setFreshCount] = useState(0);
const [data, setData] = useState([]);
useEffect(
() => {
if (ModalVisible) {
+ const changeExecInfoNew = commonUtils.getAppData("changeExecInfo");
const deviceTargetInfoDataPart = [
- { ...(props.deviceTargetInfoData?.[0] || {}) },
+ { ...(props.deviceTargetInfoData?.[0] || {}), ...changeExecInfoNew },
...(data || [])
].slice(0, 30); // 弹框展示内容
setData(deviceTargetInfoDataPart);
}
},
- [props.deviceTargetInfoData, ModalVisible]
+ [props.deviceTargetInfoData, freshCount, ModalVisible]
);
const timer = useRef(null);
@@ -33,6 +36,7 @@ const ClockComponent = ({ num: numNew = 0, ...props }) => {
if (numNew === 0) return;
if (num === numNew) return;
+ setFreshCount(pre => pre + 1);
if (num === 0 && numNew > 0) {
setNum(numNew);
return;
diff --git a/src/mes/indexMes/index.js b/src/mes/indexMes/index.js
index d25fe80..cf113c9 100644
--- a/src/mes/indexMes/index.js
+++ b/src/mes/indexMes/index.js
@@ -22,10 +22,13 @@ import {
Input,
Divider,
message,
- Button
+ Button,
+ Form,
+ DatePicker,
+ Select,
} from "antd";
import {
- UndoOutlined,
+ CloseOutlined,
UserAddOutlined,
SwapOutlined,
AppstoreOutlined
@@ -102,9 +105,8 @@ const OpenModalEditPwd = props => {
});
// 确认修改密码
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: {
@@ -330,26 +332,54 @@ const useIndexMesEvent = props => {
[currentContent, sModelsId, sModelType]
);
+ const { webSocket: ws } = props.app;
+ const { url } = ws || {};
+ const wsRef = useRef(ws);
+ useEffect(() => {
+ if (url) {
+ wsRef.current = ws;
+ }
+ }, [url]);
+
useEffect(() => {
const connectWs = () => {
- if (
- props.app.webSocket === null ||
- props.app.webSocket?.readyState !== WebSocket.OPEN
- ) {
- console.log("================webSocket连接======================");
+ if (!wsRef.current) {
+ console.log("================webSocket不存在,创建webSocket连接======================");
props.dispatch({
type: "app/createWebSocket",
payload: { reStart: true, dispatch: props.dispatch }
});
+ return;
}
+ if (wsRef.current.readyState !== WebSocket.OPEN) return;
+ const message = {
+ connectTest: 'test',
+ key: 'test',
+ flag: 'test',
+ msg: 'test',
+ sId: 'test',
+ showType: 'test',
+ sendFrom: props.app.userinfo.sId,
+ };
+ wsRef.current.send(JSON.stringify(message));
+ window.wsTimer = setTimeout(() => {
+ console.log("================未收到Test返回消息,webSocket重新连接======================");
+ props.dispatch({
+ type: "app/createWebSocket",
+ payload: { reStart: true, dispatch: props.dispatch }
+ });
+ }, 3000);
};
connectWs();
const timer = setInterval(() => {
connectWs();
- }, 50000);
+ }, 20000);
- return () => clearInterval(timer);
+ return () => {
+ clearInterval(timer);
+ clearTimeout(window.wsTimer);
+ }
}, []);
useEffect(() => {
@@ -414,9 +444,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,
@@ -501,16 +530,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);
+ }
@@ -550,20 +579,20 @@ const HeaderConponent = () => {
-
-
-
+
+
+
);
@@ -571,125 +600,125 @@ const HeaderConponent = () => {
// 停机状态栏
-const MachineMessageComponent = ({ e , shutDown }) => {
- 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();
- }, 1000);
-
- return () => {
- clearInterval(timer);
- };
- }, []);
-
- const handleMenuClose = () => {
- Modal.confirm({
- title: "温馨提示:",
- content: 确认退出该状态? ,
- okText: "确认",
- cancelText: "取消",
- zIndex: 2000,
- onOk() {
- shutDown()
- },
- onCancel() {}
- });
+const MachineMessageComponent = ({ e, shutDown }) => {
+ 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 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),
- });
+ getTime();
+ const timer = setInterval(() => {
+ console.log('定时器状态')
+ getTime();
+ }, 1000);
+
+ return () => {
+ clearInterval(timer);
};
+ }, []);
-
- return (
-
-
- {
- isMinMax.current == 'min'?
- onStart(event, uiData)}>
-
- isMinMax.current = 'max'}>
- {conent2}
- 开始时间 {startTime}
- 停机耗时:{diffHours}时 {diffMins}分 {diffSecs}秒
-
-
-
-
-
-
-
- :
-
- 设备停机状态告知
-
- {conent2}
-
-
- 停机开始时间:
- {startTime}
-
-
- 系统当前时间:
- {currentTime}
-
-
- 此次停机耗时:
-
- 约:
- {diffHours}时 {diffMins}分 {diffSecs}秒
-
-
-
-
-
-
+ const handleMenuClose = () => {
+ Modal.confirm({
+ title: "温馨提示:",
+ content: 确认退出该状态? ,
+ okText: "确认",
+ cancelText: "取消",
+ 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),
+ });
+ };
+
+
+ return (
+
+
+ {
+ isMinMax.current == 'min' ?
+ onStart(event, uiData)}>
+
+ isMinMax.current = 'max'}>
+ {conent2}
+ 开始时间 {startTime}
+ 停机耗时:{diffHours}时 {diffMins}分 {diffSecs}秒
+
+
+
- }
+
+
+
+ :
+
+ 设备停机状态告知
+
+ {conent2}
+
+
+ 停机开始时间:
+ {startTime}
+
+
+ 系统当前时间:
+ {currentTime}
+
+
+ 此次停机耗时:
+
+ 约:
+ {diffHours}时 {diffMins}分 {diffSecs}秒
+
+
+
+
+
+
+
+ }
-
- );
+
+ );
};
-
+
@@ -838,28 +867,75 @@ const SystemFunComponent = () => {
};
// 调用通用过程
+ const [form] = Form.useForm();
const handleProcedureCall = async (params, iFlag) => {
+
+ const extraValues = await new Promise(resolve => {
+ form.setFieldsValue({
+ tReportDate: moment(),
+ sTeamType: props.app.sShift
+ });
+ Modal.confirm({
+ title: "切换手动",
+ content: (
+
+
+
+
+
+
+
+
+
+ ),
+ wrapClassName: "mesCommonModal mesLoginForm",
+ cancelText: "取消",
+ okText: "确定",
+ onOk() {
+ const values = form.getFieldsValue();
+ const tReportDate = values?.tReportDate.format("YYYY-MM-DD") || "";
+ const sTeamType = values.sTeamType;
+ resolve({ tReportDate, sTeamType });
+ },
+ onCancel() {
+ resolve(false);
+ }
+ });
+ });
+
+ if (!extraValues) return;
+
const { onSuccess } = params;
const { app } = props;
const { sMachineNameSId, sTeamNameSId, sShift, token, sModelsId } = app;
const value = {
- sBtnName: "restDailyReport",
+ sBtnName: "BtnEventAuto",
sProName: "sp_ResetDailyReport",
sProInParam: JSON.stringify({
changeValue: {},
sButtonParam: {
sproName: "sp_ResetDailyReport",
- inMap: "userinfo.sMachineGuid,userinfo.sTeamId"
+ inMap: "userinfo.sMachineGuid,userinfo.sTeamId,userinfo.tReportDate,userinfo.sTeamType"
},
params: [
{
key: "userinfo",
value: [
{
+ ...extraValues,
sMachineGuid: sMachineNameSId,
sTeamGuid: sTeamNameSId,
+ tOperationDate: moment().format("YYYY-MM-DD HH:mm:ss"),
sShift,
sTeamId: sTeamNameSId,
iFlag: iFlag
@@ -874,9 +950,8 @@ const SystemFunComponent = () => {
value.iFlag = iFlag;
}
- const url = `${
- commonConfig.server_host
- }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`;
+ const url = `${commonConfig.server_host
+ }procedureCall/doGenericProcedureCall?sModelsId=12710101117241578202960`;
const returnData = (await commonServices.postValueService(
token,
value,
@@ -895,7 +970,7 @@ const SystemFunComponent = () => {
onOk() {
handleProcedureCall(params, 1);
},
- onCancel() {}
+ onCancel() { }
});
} else if (code === -8) {
Modal.info({
@@ -914,11 +989,53 @@ const SystemFunComponent = () => {
// 切换手动/切换自动
const handleProcedureCall1 = async (params = {}, iFlag) => {
+ const extraValues = await new Promise(resolve => {
+ form.setFieldsValue({
+ tReportDate: moment(),
+ sTeamType: props.app.sShift
+ });
+ Modal.confirm({
+ title: "取消手动",
+ content: (
+
+
+
+
+
+
+
+
+
+ ),
+ wrapClassName: "mesCommonModal mesLoginForm",
+ cancelText: "取消",
+ okText: "确定",
+ onOk() {
+ const values = form.getFieldsValue();
+ const tReportDate = values?.tReportDate.format("YYYY-MM-DD") || "";
+ const sTeamType = values.sTeamType;
+ resolve({ tReportDate, sTeamType });
+ },
+ onCancel() {
+ resolve(false);
+ }
+ });
+ });
+
+ if (!extraValues) return;
+
const { onSuccess } = params;
const { app } = props;
const { sMachineNameSId, sTeamNameSId, sShift, token, sModelsId } = app;
- const userinfo = commonUtils.getAppData("userinfo");
const value = {
sBtnName: "switchReportType",
@@ -927,18 +1044,19 @@ const SystemFunComponent = () => {
changeValue: {},
sButtonParam: {
sproName: "sp_SwitchReportType",
- inMap: "userinfo.sMachineGuid,userinfo.sTeamId,userinfo.bPlcSd"
+ inMap: "userinfo.sMachineGuid,userinfo.sTeamId,userinfo.tReportDate,userinfo.sTeamType"
},
params: [
{
key: "userinfo",
value: [
{
+ ...extraValues,
sMachineGuid: sMachineNameSId,
sTeamGuid: sTeamNameSId,
+ tOperationDate: moment().format("YYYY-MM-DD HH:mm:ss"),
sShift,
sTeamId: sTeamNameSId,
- bPlcSd: userinfo.bPlcSd,
iFlag: iFlag
}
]
@@ -951,9 +1069,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,
@@ -970,9 +1087,9 @@ const SystemFunComponent = () => {
okText: "确认",
cancelText: "取消",
onOk() {
- handleProcedureCall1(params, 1);
+ handleProcedureCall(params, 1);
},
- onCancel() {}
+ onCancel() { }
});
} else if (code === -8) {
Modal.info({
@@ -1005,10 +1122,12 @@ const SystemFunComponent = () => {
case "restDailyReport":
handleProcedureCall({
onSuccess: () => {
- location.reload();
+ message.success("操作成功, 请等待页面刷新", 2);
+ setTimeout(() => {
+ location.reload();
+ }, 1500);
}
});
-
break;
case "faceCollection":
dispatch(["saveState", { faceCollectionModalVisible: true }]);
@@ -1016,10 +1135,10 @@ const SystemFunComponent = () => {
case "switchStatus":
handleProcedureCall1({
onSuccess: () => {
- const userInfoNew = commonUtils.getAppData("userinfo");
- userInfoNew.bPlcSd = !userInfoNew.bPlcSd;
- commonUtils.setAppData("userinfo", userInfoNew);
- location.reload();
+ message.success("操作成功, 请等待页面刷新", 2);
+ setTimeout(() => {
+ location.reload();
+ }, 1500);
}
});
break;
@@ -1078,8 +1197,8 @@ const SystemFunComponent = () => {
handleSystemFunClick("restDailyReport");
}}
>
-
- 重置日报
+
+ 切换手动
{
handleSystemFunClick("switchStatus");
}}
>
-
- {bPlcSd ? "切换自动" : "切换手动"}
+
+ 取消手动
}
diff --git a/src/mes/productionExec/productionExecMain/index.js b/src/mes/productionExec/productionExecMain/index.js
index 614bcec..a57b4ea 100644
--- a/src/mes/productionExec/productionExecMain/index.js
+++ b/src/mes/productionExec/productionExecMain/index.js
@@ -1,8 +1,10 @@
-import React, { useEffect, useState, useRef, useMemo } from "react";
-import { Button, Spin, Row, Col } from "antd";
-import { operationFetch } from "./operationFetch";
+import React, {useEffect, useMemo, useRef, useState} from "react";
+import {Button, Col, Input, message, Modal, Row, Select, Space, Spin} from "antd";
+import {operationFetch} from "./operationFetch";
import * as commonUtils from "@/utils/utils";
+import * as commonConfig from "@/utils/config";
+import * as commonServices from "@/services/services";
import useCommonBase from "@/components/Common/CommonHooks/useCommonBase";
import SiderInfoComponent from "@/mes/common/siderInfoComponent";
import * as commonBusiness from "@/components/Common/commonBusiness";
@@ -12,20 +14,9 @@ import CommonViewTable from "@/components/Common/CommonViewTable";
import CommonOperationBarComponent from "@/mes/common/commonOperationBarComponent";
import styles from "./index.less";
-import {
- DoubleLeftOutlined,
- LeftOutlined,
- MinusOutlined,
- PlusOutlined,
- RightOutlined
-} from "@ant-design/icons";
-import { Space } from "antd";
+import {DoubleLeftOutlined, LeftOutlined, MinusOutlined, PlusOutlined, RightOutlined} from "@ant-design/icons";
import CommonModelComponent from "../../common/commonModelComponent";
-import { message } from "antd";
-import { Modal } from "antd";
-import { Select } from "antd";
-import { Input } from "antd";
-import { cloneDeep } from "lodash";
+import {cloneDeep} from "lodash";
const list = [
{ sName: "qztable0", sGrd: "qztable0" }, // 切纸生产执行
@@ -408,8 +399,20 @@ const ProductionExecMain = baseProps => {
const getValue = () => {
const changeExecInfo = commonUtils.getAppData("changeExecInfo");
if (changeExecInfo.dReplyPalletERp === 1) {
- props.onRefresh();
- setRefreshCount(pre => pre + 1);
+ try {
+ const { sId } = changeExecInfo;
+ const url = `${commonConfig.server_host}mqtt/updateFlushmes/${sId}`;
+ commonServices.postValueService(null, {}, url).then(() => {
+ props.onRefresh();
+ setRefreshCount(pre => pre + 1);
+ })
+ } catch (error) {
+ console.log("=====updateFlushmes报错", {
+ error, changeExecInfo,
+ });
+ props.onRefresh();
+ setRefreshCount(pre => pre + 1);
+ }
}
};
@@ -905,19 +908,43 @@ const ProductionExecContent0 = props => {
tableProps: {}
};
- const viewConfigs = config.gdsconfigformslave
- .filter(item => item.bControl && item.sControlName.indexOf("Btn") === -1)
- // .filter((_, index) => index < 8)
- .map(item => ({
- ...item,
- iColValue: 24
- }));
-
const viewRow =
(selectedRowKeys[0]
? data.find(item => item.sId === selectedRowKeys[0])
: data[0]) || {};
+ const viewConfigs = config.gdsconfigformslave
+ .filter(item => item.bControl && item.sControlName.indexOf("Btn") === -1)
+ // .filter((_, index) => index < 8)
+ .map(item => {
+ let iTag = item.iTag;
+ if (item.sName === 'dReportQty' && (viewRow.bAutoReport || viewRow.bReport)) {
+ iTag = 1;
+ }
+ if (['dLockUpFei', 'dMadeUpFei', 'iLaminatingPaper'].includes(item.sName) && (viewRow.bReport|| viewRow.iJobStatus != 3)) {
+ iTag = 1;
+ }
+ if (["dAdvanceMadeUpFei", "dAdvanceLockUpFei", "iAdvanceLaminatingPaper"].includes(item.sName)) {
+ if (!viewRow.bAdvanceReport && viewRow.iJobStatus && viewRow.bAdvance) {
+ iTag = 3;
+ } else {
+ iTag = 1;
+ }
+ }
+ if (item.sName === "dAdvanceReportQty") {
+ if (!viewRow.bAdvanceReport && !viewRow.bAutoReport && viewRow.iJobStatus && viewRow.bAdvance) {
+ iTag = 3;
+ } else {
+ iTag = 1;
+ }
+ }
+ return {
+ ...item,
+ iColValue: 24,
+ iTag
+ }
+ });
+
const viewProps = {
...props,
viewConfigs,
@@ -939,9 +966,11 @@ const ProductionExecContent0 = props => {
config.gdsconfigformslave.find(
item => item.sControlName === sControlName
) || {};
+ const { showName = '' } = btnConfig;
return {
...btnConfig,
disabled: props.onGetBtnStatus(tableName, btnConfig),
+ style: { width: showName.length <= 4 ? 80 : showName.length * 20 },
onClick: async () => {
if (!props.onGetBtnContinue()) return;
await props.awaitPromiseReturn();
@@ -1029,7 +1058,13 @@ const ProductionExecContent0 = props => {
{...btnProps}
{...getBtnConfigByControlName("BtnEventBlanking")}
>
- 下料
+ { getBtnConfigByControlName("BtnEventBlanking").showName }
+
+
@@ -1056,7 +1091,13 @@ const ProductionExecContent0 = props => {
{...btnProps}
{...getBtnConfigByControlName("BtnCancel")}
>
- 撤销
+ { getBtnConfigByControlName("BtnCancel").showName }
+
+
@@ -1166,19 +1207,44 @@ const ProductionExecContent1 = props => {
tableProps: {}
};
- const viewConfigs = config.gdsconfigformslave
- .filter(item => item.bControl && item.sControlName.indexOf("Btn") === -1)
- // .filter((_, index) => index < 8)
- .map(item => ({
- ...item,
- iColValue: 24
- }));
-
const viewRow =
(selectedRowKeys[0]
? data.find(item => item.sId === selectedRowKeys[0])
: data[0]) || {};
+ const viewConfigs = config.gdsconfigformslave
+ .filter(item => item.bControl && item.sControlName.indexOf("Btn") === -1)
+ // .filter((_, index) => index < 8)
+ .map(item => {
+ let iTag = item.iTag;
+ if (item.sName === 'dReportQty' && (viewRow.bAutoReport || viewRow.bReport)) {
+ iTag = 1;
+ }
+ if (['dLockUpFei', 'dMadeUpFei', 'iLaminatingPaper'].includes(item.sName) && (viewRow.bReport || viewRow.iJobStatus != 3)) {
+ iTag = 1;
+ }
+ if (["dAdvanceMadeUpFei", "dAdvanceLockUpFei", "iAdvanceLaminatingPaper"].includes(item.sName)) {
+ if (!viewRow.bAdvanceReport && viewRow.iJobStatus && viewRow.bAdvance) {
+ iTag = 3;
+ } else {
+ iTag = 1;
+ }
+ }
+ if (item.sName === "dAdvanceReportQty") {
+ if (!viewRow.bAdvanceReport && !viewRow.bAutoReport && viewRow.iJobStatus && viewRow.bAdvance) {
+ iTag = 3;
+ } else {
+ iTag = 1;
+ }
+ }
+ return {
+ ...item,
+ iColValue: 24,
+ iTag
+ }
+ });
+
+
const viewProps = {
...props,
viewConfigs,
@@ -1226,7 +1292,7 @@ const ProductionExecContent1 = props => {
};
const getBtnProps = btnConfig => {
- const { sFontColor } = btnConfig;
+ const { sFontColor, showName = '' } = btnConfig;
const style = sFontColor
? { backgroundColor: sFontColor, borderColor: sFontColor }
@@ -1234,7 +1300,7 @@ const ProductionExecContent1 = props => {
return {
type: "primary",
size: "large",
- style: { width: 80, ...style },
+ style: { width: showName.length <= 4 ? 80 : showName.length * 20, ...style },
disabled: props.onGetBtnStatus(tableName, btnConfig),
onClick: async () => {
if (!props.onGetBtnContinue()) return;
diff --git a/src/mes/scheduledTasks/machineTasks/index.js b/src/mes/scheduledTasks/machineTasks/index.js
index d2b67bd..20e706c 100644
--- a/src/mes/scheduledTasks/machineTasks/index.js
+++ b/src/mes/scheduledTasks/machineTasks/index.js
@@ -733,7 +733,14 @@
{carouselData.map(item => (
{item.title}
- {item.content}
+ {
+ if (item.id === 999) return;
+ Modal.info({
+ width: "40vw",
+ title: item.title,
+ content: item.content
+ });
+ }}>{item.content}
))}
diff --git a/src/mes/scheduledTasks/machineTasks/index.less b/src/mes/scheduledTasks/machineTasks/index.less
index 61dd262..e3fc2c8 100644
--- a/src/mes/scheduledTasks/machineTasks/index.less
+++ b/src/mes/scheduledTasks/machineTasks/index.less
@@ -172,7 +172,9 @@
}
.tasksCarousel {
- height: calc(100% - 8px);
+ height: 100%;
+ display: flex !important;
+ flex-direction: column;
h2 {
padding-left: 30px;
@@ -184,9 +186,13 @@
}
p {
- margin-top: @margin-top;
+ flex: 1;
+ overflow: auto;
+ margin: @margin-top 0 0 0;
line-height: 28px;
font-size: 18px;
+ cursor: default;
+ user-select: none;
}
}
}
diff --git a/src/mes/teamInfo/index.js b/src/mes/teamInfo/index.js
index f16275e..5399109 100644
--- a/src/mes/teamInfo/index.js
+++ b/src/mes/teamInfo/index.js
@@ -332,6 +332,8 @@ const useTeamInfoEvent = props => {
const { config, record, name } = params;
props.onProcedureCall({
+ bForemanCheck: true,
+ getFaceResult,
btnConfig: config,
tableData: [record],
faceData: { sEmployeeNo: faceResult.sEmployeeNo },
diff --git a/src/models/app.js b/src/models/app.js
index edea1df..fabd7f5 100644
--- a/src/models/app.js
+++ b/src/models/app.js
@@ -584,7 +584,7 @@ export default {
// }
url = `${config.ws_host}websocket/${userinfo.sId}?reStart=true`;
if (userinfo.sUserLoginType) {
- url = `${config.ws_host}websocket/${userinfo.sId}?reStart=true&sLoginType=${userinfo.sUserLoginType}`;
+ url = `${config.ws_host}websocket/${userinfo.sId}?reStart=true&createTime=${new Date().getTime()}&sLoginType=${userinfo.sUserLoginType}`;
}
}
const reset = (ws, config1) => {
@@ -598,13 +598,23 @@ export default {
ws.send(JSON.stringify(message));
}, config1.timeoutServer);
};
+ const oldWebSocket = yield select(state => state.app.webSocket);
const ws = new WebSocket(url);
ws.onopen = function (e) {
console.log('连接上 webscoket 服务端了', e);
start(ws, config);
+ if (oldWebSocket && oldWebSocket !== ws) {
+ try {
+ oldWebSocket.close();
+ console.log('================已关闭旧的WebSocket连接======================');
+ } catch (error) {
+ console.log('================关闭旧WebSocket连接时出错======================', error);
+ }
+ }
};
// 全局通用的自定义onmessage的方法
ws.homeAction = (msg) => {
+ clearTimeout(window.wsTimer);
const rtmsg = JSON.parse(msg.data);
if (false && rtmsg.action === 'showImg' && location.pathname.indexOf('/indexOee') < 0) {
const msgData = JSON.parse(msg.data);
diff --git a/src/utils/config.js b/src/utils/config.js
index b84b48d..0c04605 100644
--- a/src/utils/config.js
+++ b/src/utils/config.js
@@ -1,13 +1,13 @@
/* eslint-disable */
const isDev = process.env.NODE_ENV === 'development';
-const bHttps = location.protocol === 'https:' ;
+const bHttps = location.protocol === 'https:';
export const webSite = {
// ipAddress: '//t0.xlyprint.com:8000/xlyEntry/', /* 服务器地址 */
// faceAddress: isDev ? '//192.168.11.22:8080/xlyFace' : '//' + location.host + '/xlyFace',
fileAddress: isDev ? '//127.0.0.1:8080/xlyEntry/' : '//' + location.host + '/xlyReport/', // 接口地址
- faceAddress: isDev ? '//172.19.18.26:8080/xlyFace' : '//' + location.host + '/xlyFace',
- ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//127.0.0.1:8080/xlyEntry/' : '//' + location.host + '/xlyMes/',
- interfaceAddress: isDev ? '//127.0.0.1:8088/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址
+ faceAddress: isDev ? '//172.19.18.50:8543/xlyFace' : '//' + location.host + '/xlyFace',
+ ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//127.0.0.1:8080/xlyEntry/' : '//' + location.host + '/xlyEntry/',
+ interfaceAddress: isDev ? '//172.19.18.50:8543/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址
// ipAddress: isDev ? '//ebc.jinjia.com:8091/xlyEntry/' : '//' + location.host + '/xlyEntry/',
// interfaceAddress: isDev ? '//ebc.jinjia.com:8091/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址
// ipAddress: isDev ? '//192.168.11.26:8080/xlyEntry/' : '//' + location.host + '/xlyEntry/',
@@ -24,7 +24,7 @@ module.exports = {
hasSum: false,
isWeiXin: false,
server_host: bHttps && !localStorage.ipAddress ? `https:${webSite.ipAddress}` : `http:${webSite.ipAddress}`, /* 外网连内网服务器地址 */
-// server_host: bHttps && !localStorage.ipAddress ? `http://172.19.18.21:8543/xlyMes/` : `http://172.19.18.21:8543/xlyMes/`, /* 外网连内网服务器地址 */
+// server_host: bHttps && !localStorage.ipAddress ? `http://172.19.18.50:8543:8543/xlyMes/` : `http://172.19.18.50:8543:8543/xlyMes/`, /* 外网连内网服务器地址 */
ws_host: bHttps && !localStorage.ipAddress ? `wss:${webSite.ipAddress}` : `ws:${webSite.ipAddress}`,
file_host: bHttps ? `https:${webSite.fileAddress}` : `http:${webSite.fileAddress}`, /* 外网连内网服务器地址 */
face_host: bHttps ? `https:${webSite.faceAddress}` : `http:${webSite.faceAddress}`, /* 外网连内网服务器地址 */
--
libgit2 0.22.2
|