From 49f1db40efa2a03c0eada89abdfb9e9bd779f64c Mon Sep 17 00:00:00 2001 From: yupan <yupanx@163.com> Date: Mon, 07 Nov 2022 16:05:09 +0800 Subject: [PATCH] 易晨曦提交1、监测因子趋势页面修改时间控件 2、监测因子对比修改echarts显示 --- 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