diff --git a/route/api/wristband.js b/route/api/wristband.js
index 41acfa6..61d1f46 100644
--- a/route/api/wristband.js
+++ b/route/api/wristband.js
@@ -355,6 +355,50 @@ router
.catch(err => rt.err(res, err, n, 'ERR8000'));
})
+ .post('/getwristbandhealthinfo', (req, res, n) => {
+ if (!config.permission.wristband) return n('ERR9000');
+ let arr = req.body;
+ if (!arr.data) return n('ERR0000');
+ if (!arr.data.mac) return n('ERR0060');
+ if (!arr.data.stime || !arr.data.etime) return n('ERR0015');
+
+ let pros = [];
+ let query = "select log.* \
+ from ??.?? log \
+ where \
+ log.`wphylogmac` = ? \
+ and log.`wphylogtst` >= ? \
+ and log.`wphylogtst` <= ? \
+ order by log.`wphylogtst` desc";
+ let param = [config.db.db9, 'wphylog', arr.data.mac, arr.data.stime, arr.data.etime];
+ pros.push(tool.promiseQuery(res, query, param, 'record'));
+
+ let rtq = "select * from ??.?? where `mac` = ?";
+ let rtp = [config.db.db9, 'wristband', arr.data.mac];
+ pros.push(tool.promiseQuery(res, rtq, rtp, 'rt'));
+
+ res.api_res = {
+ record: [],
+ rt: {
+ wristband: []
+ }
+ }
+
+ Promise.all(pros)
+ .then(d => {
+ for (let i in d) {
+ let tmp = d[i];
+ if (tmp.key == 'rt') {
+ res.api_res.rt.wristband = tool.checkArray(tmp.data);
+ }
+ if (tmp.key == 'record') {
+ res.api_res.record = tool.checkArray(tmp.data);
+ }
+ }
+ return n();
+ })
+ .catch(err => rt.err(res, err, n, 'ERR8000'));
+ })
.post('/getlocationlist', (req, res, n) => {
if (!config.permission.wristband) return n('ERR9000');
diff --git a/src/components/AdminPage/Wristband/WristbandInfo/ListItem.js b/src/components/AdminPage/Wristband/WristbandInfo/ListItem.js
index 5c87e61..ea1d04d 100644
--- a/src/components/AdminPage/Wristband/WristbandInfo/ListItem.js
+++ b/src/components/AdminPage/Wristband/WristbandInfo/ListItem.js
@@ -1,7 +1,7 @@
import React from 'react';
import { Table, Button } from 'semantic-ui-react';
-const ListItem = ({ i18n, data, delWristband, editWristband, showPathInfo }) => {
+const ListItem = ({ i18n, data, delWristband, editWristband, showPathInfo, showHealthInfo }) => {
return (
@@ -9,6 +9,7 @@ const ListItem = ({ i18n, data, delWristband, editWristband, showPathInfo }) =>