|
@@ -74,11 +74,12 @@
|
|
import buildInput from "@/components/common/search_input";
|
|
import buildInput from "@/components/common/search_input";
|
|
import configDialog from "@/components/dialogs/config/infoPoint"
|
|
import configDialog from "@/components/dialogs/config/infoPoint"
|
|
import {
|
|
import {
|
|
- getAllFamily, //获取所有设备族
|
|
|
|
- queryPhysicsAllType, //获取部件
|
|
|
|
|
|
+ // getAllFamily, //获取所有设备族
|
|
|
|
+ queryPhysicsAllType, //查询设备、部件、系统
|
|
|
|
+ queryFamilyAll, //查询所有设备族
|
|
getDataDictionary, //点击时后去右侧的数据
|
|
getDataDictionary, //点击时后去右侧的数据
|
|
setDataDictionary, //修改右侧数据
|
|
setDataDictionary, //修改右侧数据
|
|
- getEqCode,
|
|
|
|
|
|
+ // getEqCode,
|
|
getBussTypes
|
|
getBussTypes
|
|
} from "@/api/scan/request";
|
|
} from "@/api/scan/request";
|
|
import { mapGetters, mapActions } from "vuex";
|
|
import { mapGetters, mapActions } from "vuex";
|
|
@@ -96,13 +97,13 @@
|
|
value: "property"
|
|
value: "property"
|
|
}, {
|
|
}, {
|
|
label: "系统",
|
|
label: "系统",
|
|
- value: "system"
|
|
|
|
|
|
+ value: "System"
|
|
}, {
|
|
}, {
|
|
label: "设备",
|
|
label: "设备",
|
|
- value: "equip"
|
|
|
|
|
|
+ value: "Equipment"
|
|
}, {
|
|
}, {
|
|
label: "部件",
|
|
label: "部件",
|
|
- value: "parts"
|
|
|
|
|
|
+ value: "Component"
|
|
}, {
|
|
}, {
|
|
label: "空间",
|
|
label: "空间",
|
|
value: "space"
|
|
value: "space"
|
|
@@ -534,16 +535,16 @@
|
|
this.active = ""
|
|
this.active = ""
|
|
this.searchVal = ""
|
|
this.searchVal = ""
|
|
if (this.value == "property") {
|
|
if (this.value == "property") {
|
|
- getAllFamily().then(result => {
|
|
|
|
|
|
+ queryFamilyAll(res => {
|
|
|
|
+ this.allFamily = res.Content.map((item) => {
|
|
|
|
+ return {
|
|
|
|
+ code: item.Code,
|
|
|
|
+ name: item.Name
|
|
|
|
+ }
|
|
|
|
+ })
|
|
this.isLoading = false
|
|
this.isLoading = false
|
|
- if (result.data.Result == "success") {
|
|
|
|
- this.allFamily = result.data.Content;
|
|
|
|
- this.familySort();
|
|
|
|
- } else {
|
|
|
|
- this.dialogVisible = true;
|
|
|
|
- this.ajaxMsg = "请求出错";
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ this.familySort()
|
|
|
|
+ })
|
|
} else if (this.value == "space") {
|
|
} else if (this.value == "space") {
|
|
getBussTypes(res => {
|
|
getBussTypes(res => {
|
|
this.isLoading = false
|
|
this.isLoading = false
|
|
@@ -590,8 +591,8 @@
|
|
}
|
|
}
|
|
]
|
|
]
|
|
this.familySort()
|
|
this.familySort()
|
|
- } else if (this.value == "parts") {
|
|
|
|
- queryPhysicsAllType('Component', res => {
|
|
|
|
|
|
+ }else {
|
|
|
|
+ queryPhysicsAllType(this.value, res => {
|
|
this.allFamily = res.Content.map((item) => {
|
|
this.allFamily = res.Content.map((item) => {
|
|
return {
|
|
return {
|
|
code: item.Code,
|
|
code: item.Code,
|
|
@@ -600,17 +601,6 @@
|
|
})
|
|
})
|
|
this.familySort()
|
|
this.familySort()
|
|
})
|
|
})
|
|
- } else {
|
|
|
|
- getEqCode().then(res => {
|
|
|
|
- if (res.data.Result == "success") {
|
|
|
|
- this.allFamily = this.changeValue(res.data.Content, this.value)
|
|
|
|
- this.familySort();
|
|
|
|
- } else {
|
|
|
|
- this.$message.error("请求错误:" + res.data.ResultMsg)
|
|
|
|
- }
|
|
|
|
- }).catch(_ => {
|
|
|
|
- this.$message.error("请求错误")
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
changeSpace(arr) {
|
|
changeSpace(arr) {
|
|
@@ -621,35 +611,6 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- changeValue(list, val) {
|
|
|
|
- let data = []
|
|
|
|
- list.map(item => {
|
|
|
|
- if (!!item.content && item.content.length) {
|
|
|
|
- item.content.map(child => {
|
|
|
|
- //val为系统放入
|
|
|
|
- if (val == "system") {
|
|
|
|
- data.push({
|
|
|
|
- name: child.system,
|
|
|
|
- code: child.code
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- //否则为设备
|
|
|
|
- if (!!child.content && !!child.content.length) {
|
|
|
|
- child.content.map(facility => {
|
|
|
|
- if (val == "equip") {
|
|
|
|
- data.push({
|
|
|
|
- name: facility.facility,
|
|
|
|
- code: facility.code
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- return data
|
|
|
|
- },
|
|
|
|
//点击checkBox的事件
|
|
//点击checkBox的事件
|
|
boxChange(detail) {
|
|
boxChange(detail) {
|
|
let param = [{
|
|
let param = [{
|