|
|
@ -181,13 +181,22 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
|
preprocessedData() {
|
|
|
|
preprocessedData() {
|
|
|
|
|
|
|
|
const rptOptionsParamIndices = new Set(
|
|
|
|
|
|
|
|
this.rptOptions.map((option) => option.paramindex)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
return this.bindInfoArray.map((item) => {
|
|
|
|
return this.bindInfoArray.map((item) => {
|
|
|
|
const matchedItem2 = this.previewData.find(
|
|
|
|
const matchedItem2 = this.previewData.find(
|
|
|
|
(item2) => item2.colname === item.name
|
|
|
|
(item2) =>
|
|
|
|
|
|
|
|
item2.colname === item.name &&
|
|
|
|
|
|
|
|
rptOptionsParamIndices.has(item2.paramindex)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 如果没有找到匹配项,或者匹配项的 paramindex 不在 rptOptions 中,则返回一个默认对象
|
|
|
|
|
|
|
|
// 但根据你的要求,这里我们只关心 colname 和 paramindex 的双重匹配
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
...item, // 保留原始item的所有属性
|
|
|
|
...item, // 保留原始item的所有属性
|
|
|
|
matchedItem2: matchedItem2 || { colname: "", paramindex: "" }, // 如果没有找到匹配项,则返回一个默认对象
|
|
|
|
matchedItem2: matchedItem2 || { colname: "", paramindex: "" }, // 如果没有找到双重匹配的项,则返回一个默认对象
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -244,7 +253,7 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.currentNodeKey = data.id;
|
|
|
|
this.currentNodeKey = data.id;
|
|
|
|
this.rptOptions = [];
|
|
|
|
this.rptOptions = [];
|
|
|
|
this.getRptInfo();
|
|
|
|
|
|
|
|
this.getiedList();
|
|
|
|
this.getiedList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -254,6 +263,7 @@ export default {
|
|
|
|
.then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|
console.log(res);
|
|
|
|
console.log(res);
|
|
|
|
this.iedOptions = res.data;
|
|
|
|
this.iedOptions = res.data;
|
|
|
|
|
|
|
|
this.getRptInfo();
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch((err) => {
|
|
|
|
.catch((err) => {
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
@ -277,11 +287,14 @@ export default {
|
|
|
|
.then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|
console.log(res);
|
|
|
|
console.log(res);
|
|
|
|
this.ljOptions = res.data;
|
|
|
|
this.ljOptions = res.data;
|
|
|
|
|
|
|
|
console.log("获取逻辑", this.icdid);
|
|
|
|
if (this.icdid !== null) {
|
|
|
|
if (this.icdid !== null) {
|
|
|
|
this.ljName = this.ljOptions.find(
|
|
|
|
this.ljName =
|
|
|
|
(item) => item.id === this.icdid
|
|
|
|
this.ljOptions.find((item) => item.id === this.icdid)
|
|
|
|
).paramIndex;
|
|
|
|
?.paramIndex || "";
|
|
|
|
|
|
|
|
if (this.ljName !== "") {
|
|
|
|
this.getlistRpt(this.ljName);
|
|
|
|
this.getlistRpt(this.ljName);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.ljName = "";
|
|
|
|
this.ljName = "";
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -296,7 +309,9 @@ export default {
|
|
|
|
console.log(this.ljOptions.find((item) => item.paramIndex === val));
|
|
|
|
console.log(this.ljOptions.find((item) => item.paramIndex === val));
|
|
|
|
this.icdid = this.ljOptions.find((item) => item.paramIndex === val).id;
|
|
|
|
this.icdid = this.ljOptions.find((item) => item.paramIndex === val).id;
|
|
|
|
this.warnMsg = "";
|
|
|
|
this.warnMsg = "";
|
|
|
|
|
|
|
|
console.log("我是监听", this.preprocessedData);
|
|
|
|
this.getlistRpt(this.ljName);
|
|
|
|
this.getlistRpt(this.ljName);
|
|
|
|
|
|
|
|
//
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//获取可用rpt
|
|
|
|
//获取可用rpt
|
|
|
|
getlistRpt(val) {
|
|
|
|
getlistRpt(val) {
|
|
|
@ -326,7 +341,6 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|
this.bindInfo = res.data;
|
|
|
|
this.bindInfo = res.data;
|
|
|
|
|
|
|
|
|
|
|
|
if (res.data.columnList != null) {
|
|
|
|
if (res.data.columnList != null) {
|
|
|
|
this.bindInfoArray = res.data.columnList;
|
|
|
|
this.bindInfoArray = res.data.columnList;
|
|
|
|
this.previewData = res.data.rptList;
|
|
|
|
this.previewData = res.data.rptList;
|
|
|
|