|
@@ -39,7 +39,7 @@
|
|
|
|
|
|
<script>
|
|
|
import tree from "@/views/treeAndTable/components/tree";
|
|
|
-import { getJob, postJob } from "@/api/treeAndTable.js";
|
|
|
+import { getJob, postJob, deleteJob } from "@/api/treeAndTable.js";
|
|
|
|
|
|
export default {
|
|
|
name: "tree_table",
|
|
@@ -71,7 +71,18 @@ export default {
|
|
|
},
|
|
|
// 岗位标签页的删除按钮
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
- deleteJob: function (id) {},
|
|
|
+ deleteJob: function (id) {
|
|
|
+ deleteJob(id).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.status == 204) {
|
|
|
+ this.$message({
|
|
|
+ message: "删除岗位成功",
|
|
|
+ type: "warning",
|
|
|
+ });
|
|
|
+ this.tabClick({ name: "job" });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// tabs点击的时候获取当前标签页下的所有信息
|
|
|
tabClick: function (tabNode) {
|
|
|
if (tabNode.name == "job") {
|