20260110:

1、logo更换
2、用0A作为换行符,解决ASCII+注册包的问题
This commit is contained in:
George 2026-01-10 11:33:54 +08:00
parent 52925ad284
commit 753d859665
14 changed files with 180 additions and 41 deletions

View File

@ -1,3 +0,0 @@
{
"java.compile.nullAnalysis.mode": "automatic"
}

View File

@ -356,7 +356,7 @@ public class PowerOnTriggerTaskExecutor {
}
return messageManager.requestR(serialNumber, msg, Message.class)
.timeout(Duration.ofMillis(20000))
.timeout(Duration.ofMillis(200))
.map(result -> {
Integer code = result == null ? null : (Integer) result.get(AjaxResult.CODE_TAG);
Object data = result == null ? null : result.get(AjaxResult.DATA_TAG);

View File

@ -50,7 +50,9 @@ public class TCPBootStrap {
.setPort(port)
//设置报文最大长度 modbus-rtu
.setMaxFrameLength(2048)
.setDelimiters(new Delimiter(new byte[]{0x7e}, true))
// 注意:0x7E 是注册/心跳帧(7E...7E)的帧头/帧尾,不能作为“分隔符”strip 掉,否则会导致吞掉帧头形成 0x80...7E 的残帧。
// 分隔符仅作为兜底(当既不是7E帧也不是Modbus RTU帧时),这里使用 '\n' 方便切分设备可能上报的ASCII日志行。
.setDelimiters(new Delimiter(new byte[]{0x0A}, true))
.setDecoder(messageAdapter)
.setEncoder(messageAdapter)
.setHandlerMapping(handlerMapping)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 512 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 KiB

View File

@ -32,7 +32,6 @@
"login.989807-30": "Get in seconds",
"login.989807-31": "Are you sure to log out and exit the system?",
"login.989807-32": "prompt",
"login.989807-33": "Demo Account:fastbee Password:123456",
"login.989807-34": "WeChat login",
"login.989807-35": "Register an account",
"login.989807-36": "Register and bind account",

View File

@ -32,7 +32,6 @@
"login.989807-30": "秒后获取",
"login.989807-31": "确定注销并退出系统吗?",
"login.989807-32": "提示",
"login.989807-33": "演示账号:fastbee 密码:123456",
"login.989807-34": "微信登录",
"login.989807-35": "注册账号",
"login.989807-36": "注册绑定账号",

View File

@ -14,7 +14,7 @@
</template>
<script>
import logoImg from '@/assets/logo/logo.gif';
import logoImg from '@/assets/logo/yack.png';
import variables from '@/assets/styles/variables.scss';
export default {

View File

@ -1,5 +1,5 @@
<template>
<div style="padding-left: 20px">
<div class="running-status">
<el-row :gutter="120">
<el-col :xs="24" :sm="24" :md="24" :lg="14" :xl="10" style="margin-bottom: 50px">
<el-descriptions :column="1" border style="margin-bottom: 50px">
@ -471,19 +471,17 @@
</el-descriptions-item>
</el-descriptions>
</el-col>
<el-col :xs="24" :sm="24" :md="24" :lg="10" :xl="14">
<!-- 设备监测图表-->
<el-row :gutter="20" style="background-color: #f5f7fa; padding: 20px 10px 20px 10px; border-radius: 15px; margin-right: 5px" v-if="deviceInfo.chartList.length > 0">
<el-col :xs="24" :sm="12" :md="12" :lg="24" :xl="8" v-for="(item, index) in deviceInfo.chartList" :key="index">
<el-card shadow="hover" style="border-radius: 30px; margin-bottom: 20px">
<div ref="map" style="height: 230px; width: 185px; margin: 0 auto"></div>
</el-card>
</el-col>
</el-row>
</el-col>
</el-row>
<!-- 设备监测图表(全宽响应式矩阵布局,尽量一屏看完,减少长滚动)-->
<div class="monitor-grid-wrap" v-if="deviceInfo.chartList.length > 0">
<div class="monitor-grid">
<el-card v-for="(item, index) in deviceInfo.chartList" :key="index" shadow="hover" class="monitor-card">
<div ref="map" class="monitor-chart"></div>
</el-card>
</div>
</div>
<!-- 添加或修改产品固件对话框 -->
<el-dialog :title="$t('device.running-status.866086-10')" :visible.sync="openFirmware" width="600px" append-to-body>
<div v-if="firmware == null" style="text-align: center; font-size: 16px">
@ -581,6 +579,7 @@ export default {
},
},
],
resizeObserver: null,
remoteCommand: {},
};
},
@ -590,9 +589,46 @@ export default {
this.initDataStatus();
this.initData();
}
window.addEventListener('resize', this.handleResize);
},
beforeDestroy() {
window.removeEventListener('resize', this.handleResize);
if (this.resizeObserver) {
this.resizeObserver.disconnect();
this.resizeObserver = null;
}
},
methods: {
initResizeObserver() {
if (this.resizeObserver) return;
if (typeof window.ResizeObserver !== 'function') return;
const el = this.$el && this.$el.querySelector ? this.$el.querySelector('.monitor-grid-wrap') : null;
if (!el) return;
this.resizeObserver = new ResizeObserver(() => {
this.handleResize();
});
this.resizeObserver.observe(el);
},
handleResize() {
this.$nextTick(() => {
if (!this.monitorChart || !this.monitorChart.length) return;
this.monitorChart.forEach((item) => {
if (item && item.chart && typeof item.chart.resize === 'function') {
item.chart.resize();
}
});
});
},
scheduleChartResize() {
// grid / card 可能会在首次渲染后继续“撑开”,多次兜底 resize,确保不缩在左上角
this.handleResize();
setTimeout(() => this.handleResize(), 50);
setTimeout(() => this.handleResize(), 200);
setTimeout(() => this.handleResize(), 500);
},
initData() {
// 监听值的实时更新
this.$busEvent.$on('updateData', (params) => {
@ -943,6 +979,14 @@ export default {
},
/**图表展示*/
MonitorChart() {
// 释放旧图表实例,避免重复 init 导致内存泄漏
if (this.monitorChart && this.monitorChart.length) {
this.monitorChart.forEach((item) => {
if (item && item.chart && typeof item.chart.dispose === 'function') {
item.chart.dispose();
}
});
}
for (let i = 0; i < this.deviceInfo.chartList.length; i++) {
this.monitorChart[i] = {
chart: this.$echarts.init(this.$refs.map[i]),
@ -965,7 +1009,9 @@ export default {
max: this.deviceInfo.chartList[i].datatype.max,
colorBy: 'data',
splitNumber: 10,
radius: '100%',
// 留一点空间给数值和标题,视觉上更“占满”
radius: '95%',
center: ['50%', '55%'],
// 分割线
splitLine: {
distance: 4,
@ -1002,8 +1048,8 @@ export default {
detail: {
valueAnimation: true,
formatter: '{value}' + ' ' + this.deviceInfo.chartList[i].datatype.unit,
offsetCenter: [0, '80%'],
fontSize: 20,
offsetCenter: [0, '68%'],
fontSize: 22,
},
data: [
{
@ -1012,20 +1058,83 @@ export default {
},
],
title: {
offsetCenter: [0, '115%'],
offsetCenter: [0, '88%'],
fontSize: 16,
},
},
],
};
option && this.monitorChart[i].chart.setOption(option);
// grid/card 尺寸变化时,强制适配容器尺寸,避免表盘“缩在左上角”
this.monitorChart[i].chart.resize();
}
// 监听容器尺寸变化 + 多次兜底 resize:确保布局稳定后都 resize 到位
this.$nextTick(() => {
this.initResizeObserver();
this.scheduleChartResize();
});
},
},
};
</script>
<style>
.running-status {
padding-left: 20px;
}
.monitor-grid-wrap {
background-color: #f5f7fa;
padding: 20px 10px;
border-radius: 15px;
margin-right: 5px;
}
.monitor-grid {
display: grid;
/* 默认:中等屏幕 3 列(避免媒体查询未命中时“没效果”) */
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px;
}
/* 让宽屏更“和谐”:优先 4 列(内容区一般达不到 1600px,这里下调阈值) */
@media (min-width: 1400px) {
.monitor-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
@media (min-width: 1100px) and (max-width: 1399px) {
.monitor-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (min-width: 800px) and (max-width: 1099px) {
.monitor-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 799px) {
.monitor-grid {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
}
.monitor-card {
border-radius: 18px;
}
.monitor-card .el-card__body {
padding: 8px;
}
.monitor-chart {
height: 320px;
width: 100%;
}
/* 重写滑动块样式 */
.el-slider__bar {
height: 18px;

View File

@ -4,7 +4,6 @@
<div v-if="acountLogin" class="container a-container" :class="{ 'is-txl': isATxl }">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="form" id="a-form">
<h2 class="form_title title">{{ $t('login.989807-1') }}</h2>
<span class="form__span">{{ $t('login.989807-33') }}</span>
<el-form-item v-if="loginForm.bindId != null">
<div class="alert-box-wrap">
@ -143,18 +142,18 @@
<div class="switch" id="switch-cnt" :class="{ 'is-gx': isGx, 'is-txr': isTxr }">
<div :class="{ switch__circle: true, 'is-txr': isTxr }"></div>
<div class="switch__container" id="switch-c1" :class="{ 'is-hidden': isC1Hidden }">
<div style="display: flex; align-items: center">
<img src="../assets/logo/fastbee.png" alt="logo" style="width: 60px" />
<h2 class="switch__title title" style="margin-left: 10px">{{ $t('login.989807-37') }}</h2>
<div class="brand-header">
<img class="brand-logo" src="../assets/logo/yack.png" alt="logo" />
<h2 class="switch__title">{{ $t('login.989807-37') }}</h2>
</div>
<p class="switch__description description">{{ $t('login.989807-38') }}</p>
<img src="../assets/images/login3.jpeg" alt="logo" style="width: 220px; height: 220px" />
<button class="switch__button button switch-btn" @click="changeForm">{{ $t('login.989807-2') }}</button>
</div>
<div class="switch__container" id="switch-c2" :class="{ 'is-hidden': isC2Hidden }">
<div style="display: flex; align-items: center">
<img src="../assets/logo/fastbee.png" alt="logo" style="width: 60px" />
<h2 class="switch__title title" style="margin-left: 10px">岩安测控</h2>
<div class="brand-header">
<img class="brand-logo" src="../assets/logo/yack.png" alt="logo" />
<h2 class="switch__title">岩安测控</h2>
</div>
<p class="switch__description description">{{ $t('login.989807-39') }}</p>
<img src="../assets/images/login7.jpeg" alt="logo" style="width: 220px; height: 220px" />
@ -176,7 +175,7 @@
<script>
import 'element-ui/lib/theme-chalk/display.css';
import logo from '@/assets/logo/logo.gif';
import logo from '@/assets/logo/yack.png';
import { getCodeImg, checkBindId, getErrorMsg, socialLogin, bindLogin, getSmsLoginCaptcha, smsLogin } from '@/api/login';
import Cookies from 'js-cookie';
import { encrypt, decrypt } from '@/utils/jsencrypt';
@ -862,7 +861,7 @@ export default {
.title {
font-size: 34px;
font-weight: 700;
line-height: 3;
line-height: 1.2;
color: #181818;
}
@ -908,7 +907,7 @@ export default {
left: 0;
height: 100%;
width: 500px;
padding: 50px;
padding: 32px;
z-index: 200;
transition: 1.25s;
background-color: #fff;
@ -940,11 +939,45 @@ export default {
align-items: center;
flex-direction: column;
position: absolute;
width: 400px;
padding: 50px 55px;
width: 100%;
padding: 0;
transition: 1.25s;
}
.brand-header {
width: 100%;
max-width: 420px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
margin-bottom: 10px;
text-align: center;
}
.brand-logo {
width: 72px;
height: 72px;
object-fit: contain;
flex: 0 0 auto;
}
.switch__title {
margin: 0;
font-size: 36px;
line-height: 1.2;
color: #181818;
letter-spacing: 0.5px;
}
.switch__description {
width: 100%;
max-width: 420px;
text-align: center;
margin: 0 0 14px 0;
}
.switch__button {
cursor: pointer;
}

View File

@ -53,7 +53,7 @@
<script>
import 'element-ui/lib/theme-chalk/display.css';
import logo from '@/assets/logo/logo.gif';
import logo from '@/assets/logo/yack.png';
import { oauthLogin } from '@/api/login';
import { setToken } from '@/utils/auth';

View File

@ -61,7 +61,7 @@
<script>
import { authorize, getAuthorize } from "@/api/login";
import logo from '@/assets/logo/logo.gif';
import logo from '@/assets/logo/yack.png';
export default {
name: "Login",

View File

@ -68,7 +68,7 @@
<div :class="{ switch__circle: true }"></div>
<div class="switch__container" id="switch-c1">
<div style="display: flex; align-items: center">
<img src="../assets/logo/fastbee.png" alt="logo" style="width: 60px" />
<img src="../assets/logo/yack.png" alt="logo" style="width: 60px" />
<h2 class="switch__title title" style="margin-left: 10px">{{ $t('register.974236-1') }}</h2>
</div>
<p class="switch__description description">{{ $t('register.974236-11') }}</p>
@ -89,7 +89,7 @@
<script>
import 'element-ui/lib/theme-chalk/display.css';
import logo from '@/assets/logo/logo.gif';
import logo from '@/assets/logo/yack.png';
import { getCodeImg, checkBindId, bindRegister } from '@/api/login';
import { register } from '@/api/iot/tool';

View File

@ -129,7 +129,7 @@ import { makeUpHtml, vueTemplate, vueScript, cssStyle } from '@/utils/generator/
import { makeUpJs } from '@/utils/generator/js';
import { makeUpCss } from '@/utils/generator/css';
import drawingDefault from '@/utils/generator/drawingDefault';
import logo from '@/assets/logo/fastbee.png';
import logo from '@/assets/logo/yack.png';
import CodeTypeDialog from './CodeTypeDialog';
import DraggableItem from './DraggableItem';