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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<template>
  <div class="app-container" style="padding:0">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>{{currentNode?currentNode.label+'--节点配置':'节点配置'}}</span>
      </div>
 
      <el-tabs>
        <el-tab-pane :disabled="disabledSetting">
          <span slot="label"><i class="el-icon-setting"></i> 状态管理</span>
          <devicestartstop ref="devicestartstop"></devicestartstop>
        </el-tab-pane>
<!--        <el-tab-pane :disabled="disabledSetting">-->
<!--          <span slot="label"><i class="el-icon-setting"></i> 统计指标管理</span>-->
<!--          <zbIndex ref="zbIndex"></zbIndex>-->
<!--        </el-tab-pane>-->
      </el-tabs>
    </el-card>
  </div>
</template>
 
<script>
  import {
    getModelNode,
  } from '@/api/basicsetting/modelNode'
  import devicestartstop from "./devicestartstop";
  export default {
    name: "modelTabSetting",
    components:{devicestartstop},
    data() {
      return {
        currentNode: '',
        deviceDialog: false,
        energyDialog: false,
        productDialog: false,
        collectIndexDialog: false,
        indexLoading: false,
        deviceLoading: false,
        energyLoading: false,
        productLoading: false,
        settingEnergyList: [],
        settingDeviceList: [],
        settingProductList: [],
        settingIndexList: [],
        disabledSetting: true
      }
    },
    methods: {
      modelNodeChange(modelNode) {
        this.settingDeviceList = [];
        this.settingIndexList = [];
        this.disabledSetting = modelNode === undefined || modelNode === '' || modelNode === null;
        if (modelNode) {
          this.currentNode = modelNode;
          getModelNode(modelNode.id).then((response) => {
            if (response.code === 200) {
              this.$refs.devicestartstop.setModelNode(response.data);
            } else {
              this.$message.error(response.msg);
            }
          });
        }
      }
    }
  }
</script>
 
<style scoped>
 
</style>