|
|
|
|
@ -235,37 +235,31 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
rowSave(row, loading, done) { |
|
|
|
|
add(row).then( |
|
|
|
|
() => { |
|
|
|
|
loading(); |
|
|
|
|
this.onLoadParent(this.pageParent); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
error => { |
|
|
|
|
done(); |
|
|
|
|
window.console.log(error); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
rowSave(row, done, loading) { |
|
|
|
|
add(row).then(() => { |
|
|
|
|
this.onLoadParent(this.pageParent); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
done(); |
|
|
|
|
}, error => { |
|
|
|
|
window.console.log(error); |
|
|
|
|
loading(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
rowUpdate(row, index, loading, done) { |
|
|
|
|
update(row).then( |
|
|
|
|
() => { |
|
|
|
|
loading(); |
|
|
|
|
this.onLoadParent(this.pageParent); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
error => { |
|
|
|
|
done(); |
|
|
|
|
window.console.log(error); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
|
update(row).then(() => { |
|
|
|
|
this.onLoadParent(this.pageParent); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
done(); |
|
|
|
|
}, error => { |
|
|
|
|
window.console.log(error); |
|
|
|
|
loading(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
rowDel(row) { |
|
|
|
|
this.$confirm("确定将选择数据删除?", { |
|
|
|
|
@ -284,7 +278,7 @@ |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleRowClick (row) { |
|
|
|
|
handleRowClick(row) { |
|
|
|
|
this.parentId = row.id; |
|
|
|
|
this.onLoadChild(this.pageChild); |
|
|
|
|
}, |
|
|
|
|
@ -344,37 +338,31 @@ |
|
|
|
|
refreshChange() { |
|
|
|
|
this.onLoadParent(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
rowSaveChild(row, loading, done) { |
|
|
|
|
add(row).then( |
|
|
|
|
() => { |
|
|
|
|
loading(); |
|
|
|
|
this.onLoadChild(this.pageChild); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
error => { |
|
|
|
|
done(); |
|
|
|
|
window.console.log(error); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
rowSaveChild(row, done, loading) { |
|
|
|
|
add(row).then(() => { |
|
|
|
|
this.onLoadChild(this.pageChild); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
done(); |
|
|
|
|
}, error => { |
|
|
|
|
window.console.log(error); |
|
|
|
|
loading(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
rowUpdateChild(row, index, loading, done) { |
|
|
|
|
update(row).then( |
|
|
|
|
() => { |
|
|
|
|
loading(); |
|
|
|
|
this.onLoadChild(this.pageChild); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
error => { |
|
|
|
|
done(); |
|
|
|
|
window.console.log(error); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
rowUpdateChild(row, index, done, loading) { |
|
|
|
|
update(row).then(() => { |
|
|
|
|
this.onLoadChild(this.pageChild); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
done(); |
|
|
|
|
}, error => { |
|
|
|
|
window.console.log(error); |
|
|
|
|
loading(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
rowDelChild(row) { |
|
|
|
|
this.$confirm("确定将选择数据删除?", { |
|
|
|
|
|