Browse Source

清除输出

master
巴林闲侠 2 years ago
parent
commit
6fc22a22b2
  1. 10
      console/client/src/sections/console/containers/index.js
  2. 4
      console/client/src/sections/console/containers/setUp.js

10
console/client/src/sections/console/containers/index.js

@ -63,7 +63,6 @@ function Index (props) {
const mainColor = "rgb(249,179,45)" const mainColor = "rgb(249,179,45)"
if (type == 'xy') { if (type == 'xy') {
// xy 视图 // xy 视图
console.log(xyCvs, xyCvs.current, canvasHeight);
const xyCtx = xyCvs.current.getContext("2d"); const xyCtx = xyCvs.current.getContext("2d");
xyCvs.current.height = canvasHeight xyCvs.current.height = canvasHeight
xyCvs.current.width = canvasWidth xyCvs.current.width = canvasWidth
@ -434,13 +433,12 @@ function Index (props) {
dispatch(getCrane()) dispatch(getCrane())
// //
const root = window.FS_API_ROOT
ws = new WebSocket(`ws://10.8.30.183:4100/${ApiTable.dataLive}`); //建立websocket连接 ws = new WebSocket(`${root.replace('http', 'ws')}/${ApiTable.dataLive}`); //建立websocket连接
ws.onopen = function (e) { ws.onopen = function (e) {
console.log("websocket 连接成功");
interval = setInterval(() => { interval = setInterval(() => {
// console.log("发送心跳保持长连接不超时断开"); // console.log("发送心跳保持长连接不超时断开");
this.send(JSON.stringify({ "act": "ma_get_active_devices" })); this.send(JSON.stringify({ "act": "long_live" }));
}, 20000);//20秒一次 }, 20000);//20秒一次
} }
ws.onerror = e => { ws.onerror = e => {
@ -448,7 +446,6 @@ function Index (props) {
} }
ws.onmessage = evt => { ws.onmessage = evt => {
let msg = JSON.parse(evt.data); let msg = JSON.parse(evt.data);
console.log(msg);
if (msg) { if (msg) {
setCraneParams(msg) setCraneParams(msg)
@ -464,7 +461,6 @@ function Index (props) {
} }
} }
}, []) }, [])
console.log(darkColor, darkModde ? darkColor.textColor : 'auto');
const cardStyle = { const cardStyle = {
boxShadow: `0 0 10px ${darkModde ? darkColor.shadow : 'rgba(0, 0, 0, 0.2)'}`, boxShadow: `0 0 10px ${darkModde ? darkColor.shadow : 'rgba(0, 0, 0, 0.2)'}`,

4
console/client/src/sections/console/containers/setUp.js

@ -211,10 +211,7 @@ function SetUp ({ dispatch }) {
click: () => { click: () => {
if (formIndex == 1) { if (formIndex == 1) {
const values = form.getFieldsValue() const values = form.getFieldsValue()
console.log(values);
dispatch(editCrane(values)).then(res => { dispatch(editCrane(values)).then(res => {
console.log(res
);
if (res.success) { if (res.success) {
message.success('修改配置信息成功') message.success('修改配置信息成功')
} else { } else {
@ -247,7 +244,6 @@ function SetUp ({ dispatch }) {
} }
function mapStateToProps (state) { function mapStateToProps (state) {
console.log(state);
const { auth } = state; const { auth } = state;
return { return {

Loading…
Cancel
Save