|
|
@@ -100,28 +100,28 @@
|
|
|
<el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
|
|
|
<el-form-item label="层级全览:">
|
|
|
<div class="ele-text-secondary">
|
|
|
- {{ current.module }}
|
|
|
+ {{ fullName }}
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
|
|
|
<el-form-item label="节点编码:">
|
|
|
<div class="ele-text-secondary">
|
|
|
- {{ current.createTime }}
|
|
|
+ {{ current.code }}
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
|
|
|
<el-form-item label="节点名称:">
|
|
|
<div class="ele-text-secondary">
|
|
|
- {{ current.requestMethod }}
|
|
|
+ {{ current.name }}
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
|
|
|
<el-form-item label="与下层分隔:">
|
|
|
<div class="ele-text-secondary">
|
|
|
- {{ current.requestMethod }}
|
|
|
+ {{ current.separate }}
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -176,14 +176,31 @@
|
|
|
},
|
|
|
rootId () {
|
|
|
return this.$route.query.id;
|
|
|
+ },
|
|
|
+ fullName () {
|
|
|
+ let str = '';
|
|
|
+ let codeStr = '';
|
|
|
+ let node = this.curNode;
|
|
|
+ while (node?.data?.name) {
|
|
|
+ str = node.data.name + node.data.separate + str;
|
|
|
+ codeStr = node.data.code + node.data.separate + codeStr;
|
|
|
+ node = node?.parent;
|
|
|
+ }
|
|
|
+
|
|
|
+ return (
|
|
|
+ str.substring(0, str.length - 1) +
|
|
|
+ `(${codeStr.substring(0, codeStr.length - 1)})`
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
this.getTree().then(() => {
|
|
|
this.$nextTick(() => {
|
|
|
console.log(this.treeData[0]?.id);
|
|
|
- this.$refs.treeRef.setCurrentKey(this.treeData[0]?.id);
|
|
|
- this.current = this.treeData[0];
|
|
|
+ this.getDetail(this.treeData[0]?.id);
|
|
|
+ // this.$refs.treeRef.setCurrentKey(this.treeData[0]?.id);
|
|
|
+ // this.current = this.treeData[0];
|
|
|
+ // this.curNode = { data: this.current };
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
@@ -207,9 +224,11 @@
|
|
|
if (res?.code == '0') {
|
|
|
this.getTree().then(() => {
|
|
|
this.$nextTick(() => {
|
|
|
- console.log(this.treeData[0]?.id);
|
|
|
- this.$refs.treeRef.setCurrentKey(this.treeData[0]?.id);
|
|
|
- this.current = this.treeData[0];
|
|
|
+ this.getDetail(this.treeData[0]?.id);
|
|
|
+ // console.log(this.treeData[0]?.id);
|
|
|
+ // this.$refs.treeRef.setCurrentKey(this.treeData[0]?.id);
|
|
|
+ // this.current = this.treeData[0];
|
|
|
+ // this.curNode = { data: this.current };
|
|
|
});
|
|
|
});
|
|
|
this.$message.success('删除成功!');
|
|
|
@@ -230,16 +249,16 @@
|
|
|
this.loading = true;
|
|
|
const res = await getInfoById(id);
|
|
|
this.loading = false;
|
|
|
- if (res?.success) {
|
|
|
- console.log(res);
|
|
|
+ if (res.code == '0') {
|
|
|
+ this.current = res.data;
|
|
|
}
|
|
|
},
|
|
|
openEdit (isAdd = true) {
|
|
|
this.$refs.editRef.open(isAdd ? null : this.current, this.current);
|
|
|
},
|
|
|
handleNodeClick (data, node) {
|
|
|
- this.current = data;
|
|
|
this.curNode = node;
|
|
|
+ this.getDetail(data.id);
|
|
|
console.log(node);
|
|
|
}
|
|
|
}
|