|
@@ -286,7 +286,26 @@ export default {
|
|
|
this.paramList = []
|
|
|
this.treeId = ''
|
|
|
}
|
|
|
+
|
|
|
+ this.getLinkSetData(this.deatailId);
|
|
|
},
|
|
|
+ async getLinkSetData(id, leftId) {
|
|
|
+ try {
|
|
|
+ const res = await getElementJoin({ id, leftId });
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ console.log(res.data.data, '获取的关系数据');
|
|
|
+ this.linkListData = res.data.data; // 直接返回数据
|
|
|
+
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.data.msg);
|
|
|
+ throw new Error(res.data.msg); // 抛出错误,以便在调用处处理
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ // 这里可以添加额外的错误处理逻辑,例如记录日志
|
|
|
+ throw error; // 重新抛出错误,以便在调用处捕获
|
|
|
+ }
|
|
|
+ },
|
|
|
async handleSelect(index) {
|
|
|
this.activeIndex = index
|
|
|
let leftId = this.paramList[index].id
|