|
@@ -74,10 +74,12 @@
|
|
|
import buildInput from "@/components/common/search_input";
|
|
|
import configDialog from "@/components/dialogs/config/infoPoint"
|
|
|
import {
|
|
|
- getAllFamily, //获取所有设备族
|
|
|
+ // getAllFamily, //获取所有设备族
|
|
|
+ queryPhysicsAllType, //查询设备、部件、系统
|
|
|
+ queryFamilyAll, //查询所有设备族
|
|
|
getDataDictionary, //点击时后去右侧的数据
|
|
|
setDataDictionary, //修改右侧数据
|
|
|
- getEqCode,
|
|
|
+ // getEqCode,
|
|
|
getBussTypes
|
|
|
} from "@/api/scan/request";
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
@@ -95,10 +97,13 @@
|
|
|
value: "property"
|
|
|
}, {
|
|
|
label: "系统",
|
|
|
- value: "system"
|
|
|
+ value: "System"
|
|
|
}, {
|
|
|
label: "设备",
|
|
|
- value: "equip"
|
|
|
+ value: "Equipment"
|
|
|
+ }, {
|
|
|
+ label: "部件",
|
|
|
+ value: "Component"
|
|
|
}, {
|
|
|
label: "空间",
|
|
|
value: "space"
|
|
@@ -530,16 +535,16 @@
|
|
|
this.active = ""
|
|
|
this.searchVal = ""
|
|
|
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
|
|
|
- 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") {
|
|
|
getBussTypes(res => {
|
|
|
this.isLoading = false
|
|
@@ -586,16 +591,15 @@
|
|
|
}
|
|
|
]
|
|
|
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("请求错误")
|
|
|
+ }else {
|
|
|
+ queryPhysicsAllType(this.value, res => {
|
|
|
+ this.allFamily = res.Content.map((item) => {
|
|
|
+ return {
|
|
|
+ code: item.Code,
|
|
|
+ name: item.Name
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.familySort()
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -607,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的事件
|
|
|
boxChange(detail) {
|
|
|
let param = [{
|
|
@@ -679,28 +654,30 @@
|
|
|
},
|
|
|
//高亮行
|
|
|
familyActive(name, code) {
|
|
|
- this.rightLoading = true
|
|
|
this.active = name
|
|
|
this.code = code
|
|
|
- let param = {
|
|
|
- data: {
|
|
|
- Orders: "sort asc,InfoPointCode asc",
|
|
|
- PageNumber: 1,
|
|
|
- PageSize: 500
|
|
|
- },
|
|
|
- type: code
|
|
|
- };
|
|
|
- this.tabsFalg = false
|
|
|
- getDataDictionary(param, result => {
|
|
|
- this.rightLoading = false
|
|
|
- if (result.Result == "success") {
|
|
|
- this.tabsFalg = true
|
|
|
- this.labelKey = this.arrayCnt(result.Content)
|
|
|
- } else {
|
|
|
- this.dialogVisible = true;
|
|
|
- this.ajaxMsg = "请求出错";
|
|
|
- }
|
|
|
- });
|
|
|
+ if(code) {
|
|
|
+ let param = {
|
|
|
+ data: {
|
|
|
+ Orders: "sort asc,InfoPointCode asc",
|
|
|
+ PageNumber: 1,
|
|
|
+ PageSize: 500
|
|
|
+ },
|
|
|
+ type: code
|
|
|
+ };
|
|
|
+ this.rightLoading = true
|
|
|
+ this.tabsFalg = false
|
|
|
+ getDataDictionary(param, result => {
|
|
|
+ this.rightLoading = false
|
|
|
+ if (result.Result == "success") {
|
|
|
+ this.tabsFalg = true
|
|
|
+ this.labelKey = this.arrayCnt(result.Content)
|
|
|
+ } else {
|
|
|
+ this.dialogVisible = true;
|
|
|
+ this.ajaxMsg = "请求出错";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
//处理头部函数
|
|
|
arrayCnt(arr) {
|