浏览代码

设备管理 mixin

DESKTOP-O04BTUJ\muzen 3 年之前
父节点
当前提交
6586d111dd
共有 1 个文件被更改,包括 21 次插入1 次删除
  1. 21 1
      src/views/device/mixin/index.js

+ 21 - 1
src/views/device/mixin/index.js

@@ -4,6 +4,9 @@ import {
 import {
   categoryList
 } from "@/api/device/category";
+import {
+  functionList
+} from "@/api/device/function";
 
 const clientType = {
   data() {
@@ -46,7 +49,24 @@ const category = {
   }
 }
 
+const functions = {
+  data() {
+    return {
+      functionOptions: []
+    }
+  },
+  created() {
+    // 权限列表
+    functionList().then((res) => {
+      if (res.code === 0) {
+        this.functionOptions = res.data;
+      }
+    });
+  }
+}
+
 export {
   clientType,
-  category
+  category,
+  functions
 }