Merge branch 'master' into release
This commit is contained in:
commit
847bd06ac6
@ -543,6 +543,7 @@ router
|
|||||||
if (!('func' in arr.data) || arr.data.func.length == 0) return n('ERR0055');
|
if (!('func' in arr.data) || arr.data.func.length == 0) return n('ERR0055');
|
||||||
if (!('addr' in arr.data) || arr.data.addr.length == 0) return n('ERR0048');
|
if (!('addr' in arr.data) || arr.data.addr.length == 0) return n('ERR0048');
|
||||||
if (!('value' in arr.data) || arr.data.value.length == 0) return n('ERR0049');
|
if (!('value' in arr.data) || arr.data.value.length == 0) return n('ERR0049');
|
||||||
|
if (arr.data.value > 65535) return n('ERR0049');
|
||||||
|
|
||||||
let cmd = `mbtcpm ${arr.data.ip} ${arr.data.node} ${arr.data.func} ${arr.data.addr} ${arr.data.value}`;
|
let cmd = `mbtcpm ${arr.data.ip} ${arr.data.node} ${arr.data.func} ${arr.data.addr} ${arr.data.value}`;
|
||||||
res.api_res = {
|
res.api_res = {
|
||||||
|
@ -131,6 +131,7 @@ router
|
|||||||
let query = "select w.`name`, w.`mac` as wristband, \
|
let query = "select w.`name`, w.`mac` as wristband, \
|
||||||
coalesce(l.`name`, l2.`name`) as locname, \
|
coalesce(l.`name`, l2.`name`) as locname, \
|
||||||
coalesce(case when tmp2.`wlocrtloc` = 'NG' then null else tmp2.`wlocrtloc` end, ll.`devid`) as locid, \
|
coalesce(case when tmp2.`wlocrtloc` = 'NG' then null else tmp2.`wlocrtloc` end, ll.`devid`) as locid, \
|
||||||
|
case when tmp2.`wlocrtloc` = 'NG' then 1 else 0 end as loss, \
|
||||||
ll.* \
|
ll.* \
|
||||||
from ??.?? w \
|
from ??.?? w \
|
||||||
left join ??.?? tmp2 \
|
left join ??.?? tmp2 \
|
||||||
|
@ -5,7 +5,7 @@ import {convertTime, padding} from '../../../../tools';
|
|||||||
const ListItem = ({i18n, data}) => {
|
const ListItem = ({i18n, data}) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table.Row style={{color: padding(data.timestamp, 13, 1, '0') < (Date.now() - 60000) ? '#f00' : 'inherit'}}>
|
<Table.Row style={{color: data.loss != 0 ? '#f00' : 'inherit'}}>
|
||||||
<Table.Cell>{data.wristband}</Table.Cell>
|
<Table.Cell>{data.wristband}</Table.Cell>
|
||||||
<Table.Cell>{data.name}</Table.Cell>
|
<Table.Cell>{data.name}</Table.Cell>
|
||||||
<Table.Cell>{data.locname}</Table.Cell>
|
<Table.Cell>{data.locname}</Table.Cell>
|
||||||
|
@ -94,7 +94,7 @@ class LocStatusWloc extends React.Component {
|
|||||||
{
|
{
|
||||||
t.list ?
|
t.list ?
|
||||||
t.list.map((tt, idx) => {
|
t.list.map((tt, idx) => {
|
||||||
let isExpire = padding(tt.timestamp, 13, 1, '0') < (Date.now() - 60000) ? true : false;
|
let isExpire = tt.loss == 1 ? true : false;
|
||||||
return (<List.Item key={idx}>
|
return (<List.Item key={idx}>
|
||||||
{
|
{
|
||||||
tt.name ? (
|
tt.name ? (
|
||||||
|
Loading…
Reference in New Issue
Block a user