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