优化配置

jc1.0
fanluyan 11 months ago
parent 63784c0757
commit 22f9415a40

@ -181,13 +181,22 @@ export default {
},
computed: {
preprocessedData() {
const rptOptionsParamIndices = new Set(
this.rptOptions.map((option) => option.paramindex)
);
return this.bindInfoArray.map((item) => {
const matchedItem2 = this.previewData.find(
(item2) => item2.colname === item.name
(item2) =>
item2.colname === item.name &&
rptOptionsParamIndices.has(item2.paramindex)
);
// paramindex rptOptions
// colname paramindex
return {
...item, // item
matchedItem2: matchedItem2 || { colname: "", paramindex: "" }, //
matchedItem2: matchedItem2 || { colname: "", paramindex: "" }, //
};
});
},
@ -244,7 +253,7 @@ export default {
}
this.currentNodeKey = data.id;
this.rptOptions = [];
this.getRptInfo();
this.getiedList();
},
@ -254,6 +263,7 @@ export default {
.then((res) => {
console.log(res);
this.iedOptions = res.data;
this.getRptInfo();
})
.catch((err) => {
console.log(err); //
@ -277,11 +287,14 @@ export default {
.then((res) => {
console.log(res);
this.ljOptions = res.data;
console.log("获取逻辑", this.icdid);
if (this.icdid !== null) {
this.ljName = this.ljOptions.find(
(item) => item.id === this.icdid
).paramIndex;
this.ljName =
this.ljOptions.find((item) => item.id === this.icdid)
?.paramIndex || "";
if (this.ljName !== "") {
this.getlistRpt(this.ljName);
}
} else {
this.ljName = "";
}
@ -296,7 +309,9 @@ export default {
console.log(this.ljOptions.find((item) => item.paramIndex === val));
this.icdid = this.ljOptions.find((item) => item.paramIndex === val).id;
this.warnMsg = "";
console.log("我是监听", this.preprocessedData);
this.getlistRpt(this.ljName);
//
},
//rpt
getlistRpt(val) {
@ -326,7 +341,6 @@ export default {
})
.then((res) => {
this.bindInfo = res.data;
if (res.data.columnList != null) {
this.bindInfoArray = res.data.columnList;
this.previewData = res.data.rptList;

Loading…
Cancel
Save