liulingling.177216
2024-08-26 349f1cfc5fa77fbc636d542df0d8050fddec48c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template>
  <div class="app-container" style="padding: 0">
    <el-container class="split-container">
      <el-aside class="left-content">
        <el-card class="box-card">
          <div slot="header" class="clearfix" style="height:32px">
            设备能耗参数监测
          </div>
          <ModelNode ref="modelNode" @changeNode="changeNode" :showOpt="false"></ModelNode>
        </el-card>
      </el-aside>
      <el-container>
        <el-main style="padding:0">
          <MonitorSetting ref="MonitorSetting"></MonitorSetting>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
 
<script>
import MonitorSetting from "./modelMonitorSetting";
import ModelNode from "../../basicsetting/modelNode/modelNode";
import {listModel} from "@/api/basicsetting/model";
 
export default {
  components: {MonitorSetting, ModelNode},
  created() {
    listModel({isShow: 1}).then(response => {
      this.modelInfoOptions = response.data;
      if (this.modelInfoOptions.length > 0) {
        this.modelData = this.modelInfoOptions[0].modelCode;
        this.$refs.modelNode.getList(this.modelData);
      }
    });
  },
  data() {
    return {
      modelData: '',
      modelInfoOptions: []
    }
  },
  methods: {
    changeNode: function (node) {
      this.$refs.MonitorSetting.modelNodeChange(node);
    },
    manageModel: function () {
      this.$router.push('/model');
    },
    changeModel: function (item) {
      this.$refs.modelNode.getList(item);
    }
  }
};
</script>