<template>
  <div>
    <el-tree
      :data="eqList"
      show-checkbox
      node-key="id"
      :default-expanded-keys="[2, 3]"
      :default-checked-keys="[5]"
      :props="defaultProps"
    >
    </el-tree>
  </div>
</template>
<script>
import { sys_eq } from "@/api/workScope.js";

export default {
  data() {
    return {
      eqList: [],
      defaultProps: {
        children: "children",
        label: "aliasName",
      },
    };
  },
  methods: {
    // 专业系统设备树
    getSys_eq_tree() {
      sys_eq({ scopeFilter: true, target: "rtn" }).then((res) => {
        console.log("res", res);
        this.eqList = res.rtn;
      });
    },
  },
  created() {
    this.getSys_eq_tree();
  },
};
</script>