Commit 3bd200b2 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 7d359cdc b6425633
......@@ -113,7 +113,7 @@ export default {
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) }
on: { click: () => this.remove(params.row) }
},
"删除"
)
......@@ -253,14 +253,22 @@ export default {
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
Api.delete(id).then(r => {
remove(row) {
if(row.children&&row.children.length==0)
{
Api.delete(row.id).then(r => {
if (r.success) {
this.$Message.success("删除成功");
var name = this.searchValue;
this.laodaction(name);
}
});
}
else
{
this.$Message.error("此节点有子节点,不能删除!");
return false
}
},
cancel() {
this.curId = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment