+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
正道能源监控系统
@@ -24,6 +49,14 @@ export default {
},
data() {
return {
+ isShow: true,
+ typeData: '2',
+ fieldUnits: {
+ vA: 'V', vB: 'V', vC: 'V',
+ iA: 'A', iB: 'A', iC: 'A',
+ zxyg: '', fxyg: '',
+ },
+ fieldFilter: ['vA', 'vB', 'vC', 'iA', 'iB', 'iC', 'zxyg', 'fxyg'],
list1: [
{
"name": "root",
@@ -157,22 +190,7 @@ export default {
}
},
async mounted() {
- const fieldUnits = {
- vA: 'V', vB: 'V', vC: 'V',
- iA: 'A', iB: 'A', iC: 'A',
- zxyg: '', fxyg: '',
- };
-
- const fieldFilter = ['vA', 'vB', 'vC', 'iA', 'iB', 'iC', 'zxyg', 'fxyg'];
-
- realTimeData({
- monitorType: 2
- }).then(res => {
- console.log(res)
- const tree = this.buildTree(res.data, fieldUnits, fieldFilter);
- this.list = tree
- console.log(tree)
- })
+ this.getData()
},
methods: {
buildTree(data, fieldUnits, fieldFilter) {
@@ -211,6 +229,16 @@ export default {
});
return tree;
+ },
+ getData() {
+ this.isShow = false
+ realTimeData({
+ monitorType: this.typeData
+ }).then(res => {
+ const tree = this.buildTree(res.data, this.fieldUnits, this.fieldFilter);
+ this.list = tree
+ this.isShow = true
+ })
}
}
}
@@ -255,4 +283,15 @@ export default {
.list {
}
}
+
+.typeSelect {
+ position: absolute;
+ top: 6%;
+ left: 2%;
+
+ /deep/ .el-input__inner {
+ background-color: #0000;
+ color: #fff;
+ }
+}
\ No newline at end of file