bug修改

This commit is contained in:
@fawn-nine
2023-11-03 17:43:35 +08:00
parent fe88999e72
commit 6981d11e1a

View File

@@ -39,7 +39,7 @@
<i class="el-icon-edit"></i> 编辑
</el-button>
<el-button
v-if="node.childNodes.length == 0"
v-if="node.childNodes.length == 0 && node.level != 1"
type="text"
size="mini"
@click="() => deleteCate(data)"
@@ -308,52 +308,48 @@ export default {
},
getCatTreeList() {
this.loading = true;
this.$http({
// url: this.$http.adornUrl('/book/sysdictdata/selectByType/express_name'),
this.$http({
url: this.$http.adornUrl("/book/point/getPointCategoryList"),
method: "post"
// data: this.$http.adornData({
// })
method: "post"
})
.then(({ data }) => {
console.log(data, "树形结构");
if (data.code == 0 && data.categorys.length > 0) {
this.treeList[0].children = data.categorys;
this.cateList = data.categorys;
this.cateList.forEach(element => {
if (element.children && element.children.length > 0) {
element.children.forEach(element1 => {
let content = {};
// content = this.getContentList(element1.id)
this.$http({
url: this.$http.adornUrl("/book/point/getPointList"),
method: "post",
data: this.$http.adornData({
limit: 10,
page: 1,
pointCategoryId: element1.id //此项为非必选
})
})
.then(({ data }) => {
if (data.code == 0) {
// console.log("date二级内容", data.page);
element1.content = data.page;
} else {
element1.content = {};
}
})
.catch(({ e }) => {
console.log(e, "e");
});
// element1.content = content;
});
}
});
console.log("执行后的结果", this.cateList);
// this.cateList.forEach(element => {
// if (element.children && element.children.length > 0) {
// element.children.forEach(element1 => {
// let content = {};
// // content = this.getContentList(element1.id)
// this.$http({
// url: this.$http.adornUrl("/book/point/getPointList"),
// method: "post",
// data: this.$http.adornData({
// limit: 10,
// page: 1,
// pointCategoryId: element1.id //此项为非必选
// })
// })
// .then(({ data }) => {
// if (data.code == 0) {
// // console.log("date二级内容", data.page);
// element1.content = data.page;
// } else {
// element1.content = {};
// }
// })
// .catch(({ e }) => {
// console.log(e, "e");
// });
// // element1.content = content;
// });
// }
// });
// console.log("执行后的结果", this.cateList);
//
} else {
this.treeList = [];
this.treeList[0].children = [];
this.cateList = [];
}
this.loading = false;
@@ -364,7 +360,7 @@ export default {
});
},
editContent(item) {
console.log("编辑内容");
// console.log("编辑内容");
this.$router.push({
path: "/acupointDetail",
query: { cid: item.id, title: "编辑穴位" }