|
@@ -46,11 +46,11 @@
|
|
<div class="right_main" v-loading="rightLoading">
|
|
<div class="right_main" v-loading="rightLoading">
|
|
<el-tabs v-if="labelKey.length && tabsFalg" tab-position="left" style="height: 100%;">
|
|
<el-tabs v-if="labelKey.length && tabsFalg" tab-position="left" style="height: 100%;">
|
|
<el-tab-pane v-for="(item,index) in labelKey" :key="index">
|
|
<el-tab-pane v-for="(item,index) in labelKey" :key="index">
|
|
- <span slot="label">{{item.FirstTag || '信息'}}</span>
|
|
|
|
|
|
+ <span slot="label">{{item.FirstName || '信息'}}</span>
|
|
<div class="label_main" v-for="(tag,tagIndex) in item.details" :key="tagIndex">
|
|
<div class="label_main" v-for="(tag,tagIndex) in item.details" :key="tagIndex">
|
|
- <p>{{tag.SecondTag}}</p>
|
|
|
|
|
|
+ <p>{{tag.SecondName}}</p>
|
|
<ul v-for="(detail,detailInd) in tag.details" :key="detailInd">
|
|
<ul v-for="(detail,detailInd) in tag.details" :key="detailInd">
|
|
- <el-checkbox v-model="detail.Visible" @change="boxChange(detail)">{{detail.InfoPointName}}</el-checkbox>
|
|
|
|
|
|
+ <el-checkbox :title="detail.InfoPointName" v-model="detail.Visible" @change="boxChange(detail)">{{detail.InfoPointName}}</el-checkbox>
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
@@ -75,8 +75,8 @@
|
|
import buildInput from "@/components/common/search_input";
|
|
import buildInput from "@/components/common/search_input";
|
|
import {
|
|
import {
|
|
getAllFamily, //获取所有设备族
|
|
getAllFamily, //获取所有设备族
|
|
- getTableHeader, //点击时后去右侧的数据
|
|
|
|
- setHeader, //修改右侧数据
|
|
|
|
|
|
+ getDataDictionary, //点击时后去右侧的数据
|
|
|
|
+ setDataDictionary, //修改右侧数据
|
|
getEqCode,
|
|
getEqCode,
|
|
getBussTypes
|
|
getBussTypes
|
|
} from "@/api/scan/request";
|
|
} from "@/api/scan/request";
|
|
@@ -114,7 +114,6 @@
|
|
code: '',
|
|
code: '',
|
|
letterArr: [], //出现的a-z字符
|
|
letterArr: [], //出现的a-z字符
|
|
UserId: "18612660722", //用户id
|
|
UserId: "18612660722", //用户id
|
|
- ProjId: "", //项目id
|
|
|
|
labelKey: [], // 右侧主体数据承接数组
|
|
labelKey: [], // 右侧主体数据承接数组
|
|
searchArr: [], // 搜索后的数据
|
|
searchArr: [], // 搜索后的数据
|
|
searchVal: "", //搜索内容
|
|
searchVal: "", //搜索内容
|
|
@@ -516,7 +515,6 @@
|
|
},
|
|
},
|
|
//获取所有设备族
|
|
//获取所有设备族
|
|
getAllFamily() {
|
|
getAllFamily() {
|
|
- this.ProjId = this.projectId
|
|
|
|
if (this.value == "property") {
|
|
if (this.value == "property") {
|
|
getAllFamily().then(result => {
|
|
getAllFamily().then(result => {
|
|
this.isLoading = false
|
|
this.isLoading = false
|
|
@@ -612,20 +610,13 @@
|
|
},
|
|
},
|
|
//点击checkBox的事件
|
|
//点击checkBox的事件
|
|
boxChange(detail) {
|
|
boxChange(detail) {
|
|
- console.log(detail)
|
|
|
|
- let param = {
|
|
|
|
- FamilyId: this.code,
|
|
|
|
- code: detail.InfoPointCode,
|
|
|
|
- perjectId: this.ProjId,
|
|
|
|
- UserId: this.UserId,
|
|
|
|
|
|
+ let param = [{
|
|
|
|
+ Type: this.code,
|
|
|
|
+ InfoPointCode: detail.InfoPointCode,
|
|
Visible: detail.Visible
|
|
Visible: detail.Visible
|
|
- };
|
|
|
|
- setHeader(param).then(res => {
|
|
|
|
- if (res.data.Result == "success") {
|
|
|
|
- return;
|
|
|
|
- } else {
|
|
|
|
- this.$message.error("保存失败");
|
|
|
|
- }
|
|
|
|
|
|
+ }]
|
|
|
|
+ setDataDictionary(param, res => {
|
|
|
|
+ return
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//修改search
|
|
//修改search
|
|
@@ -661,19 +652,21 @@
|
|
//高亮行
|
|
//高亮行
|
|
familyActive(name, code) {
|
|
familyActive(name, code) {
|
|
this.rightLoading = true
|
|
this.rightLoading = true
|
|
- this.active = name;
|
|
|
|
- this.code = code;
|
|
|
|
|
|
+ this.active = name
|
|
|
|
+ this.code = code
|
|
let param = {
|
|
let param = {
|
|
- UserId: this.UserId,
|
|
|
|
- code: code,
|
|
|
|
- ProjId: this.ProjId
|
|
|
|
|
|
+ data: {
|
|
|
|
+ PageNumber: 1,
|
|
|
|
+ PageSize: 500
|
|
|
|
+ },
|
|
|
|
+ type: code
|
|
};
|
|
};
|
|
this.tabsFalg = false
|
|
this.tabsFalg = false
|
|
- getTableHeader(param).then(result => {
|
|
|
|
|
|
+ getDataDictionary(param, result => {
|
|
this.rightLoading = false
|
|
this.rightLoading = false
|
|
- if (result.data.Result == "success") {
|
|
|
|
|
|
+ if (result.Result == "success") {
|
|
this.tabsFalg = true
|
|
this.tabsFalg = true
|
|
- this.labelKey = this.arrayCnt(result.data.Content);
|
|
|
|
|
|
+ this.labelKey = this.arrayCnt(result.Content)
|
|
} else {
|
|
} else {
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
this.ajaxMsg = "请求出错";
|
|
this.ajaxMsg = "请求出错";
|
|
@@ -685,29 +678,29 @@
|
|
let first = {}
|
|
let first = {}
|
|
//一级循环出来一级标签
|
|
//一级循环出来一级标签
|
|
arr.map(item => {
|
|
arr.map(item => {
|
|
- if (!!first[item.FirstTag] && first[item.FirstTag].length) {} else {
|
|
|
|
- first[item.FirstTag] = []
|
|
|
|
|
|
+ if (first[item.FirstName] && first[item.FirstName].length) {} else {
|
|
|
|
+ first[item.FirstName] = []
|
|
}
|
|
}
|
|
- first[item.FirstTag].push({
|
|
|
|
|
|
+ first[item.FirstName].push({
|
|
InfoPointName: item.InfoPointName,
|
|
InfoPointName: item.InfoPointName,
|
|
InfoPointCode: item.InfoPointCode,
|
|
InfoPointCode: item.InfoPointCode,
|
|
Visible: item.Visible,
|
|
Visible: item.Visible,
|
|
- SecondTag: item.SecondTag
|
|
|
|
|
|
+ SecondName: item.SecondName? item.SecondName: ""
|
|
})
|
|
})
|
|
})
|
|
})
|
|
//循环出第二级标签
|
|
//循环出第二级标签
|
|
let sound = []
|
|
let sound = []
|
|
for (let key in first) {
|
|
for (let key in first) {
|
|
let obj = {
|
|
let obj = {
|
|
- FirstTag: key,
|
|
|
|
|
|
+ FirstName: key,
|
|
details: {}
|
|
details: {}
|
|
}
|
|
}
|
|
first[key].map(item => {
|
|
first[key].map(item => {
|
|
- if (!!obj.details[item.SecondTag] && obj.details[item.SecondTag].length) {
|
|
|
|
|
|
+ if (!!obj.details[item.SecondName] && obj.details[item.SecondName].length) {
|
|
} else {
|
|
} else {
|
|
- obj.details[item.SecondTag] = []
|
|
|
|
|
|
+ obj.details[item.SecondName] = []
|
|
}
|
|
}
|
|
- obj.details[item.SecondTag].push({
|
|
|
|
|
|
+ obj.details[item.SecondName].push({
|
|
InfoPointName: item.InfoPointName,
|
|
InfoPointName: item.InfoPointName,
|
|
InfoPointCode: item.InfoPointCode,
|
|
InfoPointCode: item.InfoPointCode,
|
|
Visible: item.Visible,
|
|
Visible: item.Visible,
|
|
@@ -723,7 +716,7 @@
|
|
item.details = []
|
|
item.details = []
|
|
}
|
|
}
|
|
item.details.push({
|
|
item.details.push({
|
|
- SecondTag: k,
|
|
|
|
|
|
+ SecondName: k,
|
|
details: copyarr[k]
|
|
details: copyarr[k]
|
|
})
|
|
})
|
|
}
|
|
}
|