Browse Source

需采集信息点添加部件

zhangyu 5 years ago
parent
commit
867d13d096
1 changed files with 14 additions and 0 deletions
  1. 14 0
      src/views/ready/collectsetting/index.vue

+ 14 - 0
src/views/ready/collectsetting/index.vue

@@ -75,6 +75,7 @@
     import configDialog from "@/components/dialogs/config/infoPoint"
     import {
         getAllFamily, //获取所有设备族
+        queryPhysicsAllType, //获取部件
         getDataDictionary, //点击时后去右侧的数据
         setDataDictionary, //修改右侧数据
         getEqCode,
@@ -100,6 +101,9 @@
                     label: "设备",
                     value: "equip"
                 }, {
+                    label: "部件",
+                    value: "parts"
+                }, {
                     label: "空间",
                     value: "space"
                 }, {
@@ -586,6 +590,16 @@
                         }
                     ]
                     this.familySort()
+                } else if (this.value == "parts") {
+                    queryPhysicsAllType('Component', res => {
+                        this.allFamily = res.Content.map((item) => {
+                            return [{
+                                code: item.Code,
+                                name: item.Name
+                            }]
+                        })
+                    })
+                    this.familySort()
                 } else {
                     getEqCode().then(res => {
                         if (res.data.Result == "success") {