Former-commit-id: f586efcb9129c27a0cb5eacd79092c8c97dbc0c2
TangShanKaiPing
wanggang 6 years ago
parent d1f515cc08
commit ace0c341b7

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Before

Width:  |  Height:  |  Size: 993 B

After

Width:  |  Height:  |  Size: 993 B

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 669 B

After

Width:  |  Height:  |  Size: 669 B

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 683 B

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 807 B

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before

Width:  |  Height:  |  Size: 571 B

After

Width:  |  Height:  |  Size: 571 B

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 839 B

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 882 B

After

Width:  |  Height:  |  Size: 882 B

Before

Width:  |  Height:  |  Size: 1016 B

After

Width:  |  Height:  |  Size: 1016 B

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -718,4 +718,9 @@ ul {
left: 0;
right: 0;
border-radius: unset;
}
}
/*bootstrap4+mintuui*/
label,h1{
margin-top:auto;
margin-bottom:auto;
}

@ -3,10 +3,11 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
<link rel="stylesheet" href="lib/ionicons/css/ionicons.min.css">
<link rel="stylesheet" href="lib/fontawesome-free/css/all.min.css">
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="lib/mint-ui/style.css">
<link rel="stylesheet" href="lib/weui/weui.min.css">
<link rel="stylesheet" href="lib/ionicons/css/ionicons.min.css">
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap-grid.min.css">
<link rel="stylesheet" href="css/app.css">
<title>首屏</title>
</head>

@ -1,13 +1,66 @@
<div class="page js_show">
<mt-header v-if="node" :title="node.name">
<div class="page js_show" v-if="node">
<mt-header :title="node.name">
<router-link to="/pages/iot/nodes" slot="left">
<mt-button icon="back">back</mt-button>
</router-link>
</mt-header>
<div class="col-md-12">
<!--场景-->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">场景</div>
<div class="card-body">
<button class="btn btn-success mr-1" v-for="scene in scenes" v-on:click="CallScene(scene.Id)">{{scene.name}}</button>
</div>
</div>
</div>
</div>
<div class="col-md-12 py-2">环境</div>
<!--环境-->
<div class="row">
<div class="col-lg-3 col-md-4 col-sm-6" v-for="device in getDevices('温湿度传感器')">
<div class="card">
<div class="card-header">
{{device.displayName}}
<span class="float-right text-success" v-if="device.isOnline"><i class="ion ion-ios-wifi"></i></span>
<span class="float-right text-danger" v-else><i class="ion ion-ios-wifi"></i></span>
</div>
<div class="card-body">
<div class="row" style="height:100px;">
<div class="col-md-4 text-center">
<img class="mh-100" src="/IoTCenter/images/humiture.png" />
</div>
<div class="col-md-8">
<div class="row" style="height:50px;line-height:28px;">
<span>温度:</span>
<span class="text-success mx-2" style="font-size:28px;" v-if="getDeviceDataAttr(device.number,'温度','description')==='适中'">
{{getDeviceDataAttr(device.number,'温度','description')}}
</span>
<span v-else class="text-danger" style="font-size:28px;">
{{getDeviceDataAttr(device.number,'温度','description')}}
</span>
<span>{{getDeviceDataAttr(device.number,'温度','value')}}{{ getDeviceDataAttr(device.number,'温度','unit')}}</span>
</div>
<div class="row" style="height:50px;line-height:28px;">
<span>湿度:</span>
<span class="text-success" style="font-size:28px;" v-if="getDeviceDataAttr(device.number,'湿度','description')==='适中'">
{{getDeviceDataAttr(device.number,'湿度','description')}}
</span>
<span v-else class="text-danger mx-2" style="font-size:28px;">
{{getDeviceDataAttr(device.number,'湿度','description')}}
</span>
<span>{{getDeviceDataAttr(device.number,'湿度','value')}}{{ getDeviceDataAttr(device.number,'湿度','unit')}}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-12" v-if="node">
<div class="row">
<template v-if="node">
<div v-for="device in node.devices" class="col-lg-3 col-md-4 col-sm-6" style="padding:15px;">
<div v-for="device in node.devices" class="col-lg-3 col-md-4 col-sm-6 p-1">
<div class="weui-grid__icon">
<img :src="'/IoTCenter'+device.product.image" />
</div>

@ -23,10 +23,24 @@
store.commit('setNode', null);
},
methods: {
getDevices: function (name) {
return Enumerable.from(this.node.devices).where(function (o) { return o.name === name; }).toArray();
},
getDeviceDataAttr: function (number, name, attr) {
var device = Enumerable.from(this.node.devices).where(function (o) { return o.number === number; }).firstOrDefault();
var data = Enumerable.from(device.data).where(o => o.name === name).firstOrDefault();
if (data != null) {
return data[attr];
}
return null;
},
},
computed: {
node: function () {
return store.state.node;
},
scenes: function () {
return Enumerable.from(this.node.scenes).orderBy('o=>o.displayOrder');
}
},

Loading…
Cancel
Save