From a60acf8bae5a1f49e1554e0ff63ff79e0aacf611 Mon Sep 17 00:00:00 2001
From: yichenxi <yichenxi0601@163.com>
Date: Sat, 17 Dec 2022 12:59:41 +0800
Subject: [PATCH] 1、监测因子趋势数字显示问题修复
---
src/views/Equipment/index.vue | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 52 insertions(+), 5 deletions(-)
diff --git a/src/views/Equipment/index.vue b/src/views/Equipment/index.vue
index 8a431d3..913b6ae 100644
--- a/src/views/Equipment/index.vue
+++ b/src/views/Equipment/index.vue
@@ -5,25 +5,30 @@
<div class="timee">
{{ time }}
</div>
- <div style="margin-left: 20px; margin-top: -12px">
+ <div style="margin-left: 1.5rem; margin-top:-1.1rem">
<span>���������������:</span>
<el-cascader
+ v-model="newMac"
:options="options"
:props="props"
collapse-tags
clearable
+ @change="changeYz"
+ placeholder="������������"
+ style="width: 25rem"
></el-cascader>
</div>
- <div style="margin-left: 20px; margin-top: -12px">
+ <div style="margin-left: 1.5rem; margin-top: -12px">
<span>������������:</span>
<el-cascader
- :options="options"
+ :options="newSensor"
:props="props"
collapse-tags
clearable
+ @change="res"
></el-cascader>
</div>
- <div style="margin-left: 20px; margin-top: -12px">
+ <div style="margin-left: 1.5rem; margin-top: -12px">
<el-button type="primary">������</el-button>
</div>
</div>
@@ -46,14 +51,31 @@
props: { multiple: true },
defaultData: [],
options: [],
+ newSensor:[],
+ newMac:'',
+ newMac1:[]
}
},
// ������������ ���������data������
computed: {},
// ������data������������������
- watch: {},
+ watch: {
+ newMac(newVal, oldval) {
+ this.newMac1 = []
+ for (let i = 0; i < newVal.length; i++) {
+ // console.log(newVal[i], 111)
+ this.newMac1.push(newVal[i][1][1])
+ }
+ // ������������������������������������������
+ this.getSensor()
+ console.log(this.newMac1)
+ },
+ },
//������������
methods: {
+ res(res){
+ console.log(res.toString());
+ },
getData() {
this.$request({
url: '/monitorPoint/queryMonitorPoints',
@@ -85,6 +107,30 @@
console.log(error)
})
},
+ changeYz(){
+ console.log(11111);
+ this.getSensor();
+ },
+ getSensor() {
+ this.$request({
+ url: '/deviceInfo/getMacSensors',
+ method: 'post',
+ data: {
+ macs: this.newMac1,
+ },
+ })
+ .then((result) => {
+ console.log(result);
+ var sensor = result.data
+ for (var i in sensor) {
+ this.newSensor.push({ value: i, label: sensor[i] })
+
+ }
+ })
+ .catch((err) => {
+ console.log(err)
+ })
+ },
},
//������������ - ��������������������������������� this ���������
created() {
@@ -104,4 +150,5 @@
}
</script>
<style scoped>
+
</style>
\ No newline at end of file
--
Gitblit v1.8.0