add iostatus name show

This commit is contained in:
Jay 2017-03-27 13:18:31 +08:00
parent c434a59910
commit 40fa771e43
3 changed files with 7 additions and 2 deletions

View File

@ -84721,6 +84721,7 @@ var IOPanel = function (_React$Component) {
return _react2.default.createElement(
'div',
{ key: idx },
_react2.default.createElement(_semanticUiReact.Label, { basic: true, color: 'olive', content: 'SetName:' + t.name }),
_react2.default.createElement(_semanticUiReact.Label, { basic: true, color: 'blue', content: 'PortNum:' + t.port }),
_react2.default.createElement(_semanticUiReact.Label, { basic: true, color: 'blue', content: '\u539F\u59CB\u6578\u503C:' + t.value }),
_react2.default.createElement(_semanticUiReact.Label, { basic: true, color: 'blue', content: '\u8F49\u63DB\u6578\u503C:' + t.value2 }),

View File

@ -243,16 +243,19 @@ router
res.db.database = config.db.db5;
res.db.connect();
let query = "select rt.* from ??.?? rt \
let query = "select rt.*, a.`name` as name from ??.?? rt \
left join ??.?? d \
on d.`node` = rt.`node` \
left join ??.?? i \
on i.`devuid` = d.`uid` and i.`type` = ? \
left join ??.?? a \
on a.`iouid` = i.`uid` \
and a.`portnum` = rt.`port`\
where \
d.`uid` = ? \
and rt.`type` = ? \
and i.`uid` is not null ";
let param = [config.db.db6, 'jcmbrt', config.db.db5, 'device', config.db.db5, 'iolist', arr.data.type, arr.data.id, arr.data.type];
let param = [config.db.db6, 'jcmbrt', config.db.db5, 'device', config.db.db5, 'iolist', arr.data.type, config.db.db5, 'aioset', arr.data.id, arr.data.type];
res.db.query(query, param, (err, row) => {
if (err) return n('ERR8000');

View File

@ -72,6 +72,7 @@ class IOPanel extends React.Component {
{
ss.map((t,idx) => (
<div key={idx}>
<Label basic color="olive" content={`SetName:${t.name}`} />
<Label basic color="blue" content={`PortNum:${t.port}`}/>
<Label basic color="blue" content={`原始數值:${t.value}`}/>
<Label basic color="blue" content={`轉換數值:${t.value2}`}/>