import {
  categoryList
} from "@/api/device/category";
import {
  functionList
} from "@/api/device/function";

const category = {
  data() {
    return {
      categoryOptions: []
    }
  },
  created() {
    // 设备类型
    categoryList({
      status: 1,
    }).then((res) => {
      if (res.code === 0) {
        this.categoryOptions = res.data;
      }
    });
  }
}

const functions = {
  data() {
    return {
      functionOptions: []
    }
  },
  created() {
    // 权限列表
    functionList({
      isDelete: 0
    }).then((res) => {
      if (res.code === 0) {
        this.functionOptions = res.data;
      }
    });
  }
}

export {
  category,
  functions
}
