|
@@ -39,7 +39,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import tree from "@/views/treeAndTable/components/tree";
|
|
import tree from "@/views/treeAndTable/components/tree";
|
|
-import { getJob } from "@/api/treeAndTable.js";
|
|
|
|
|
|
+import { getJob, postJob } from "@/api/treeAndTable.js";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "tree_table",
|
|
name: "tree_table",
|
|
@@ -88,6 +88,23 @@ export default {
|
|
this.dialog.name = "";
|
|
this.dialog.name = "";
|
|
this.dialog.visible = false;
|
|
this.dialog.visible = false;
|
|
},
|
|
},
|
|
|
|
+ dataFormSubmitHandle: function () {
|
|
|
|
+ if (this.dialog.type == 2) {
|
|
|
|
+ postJob({
|
|
|
|
+ dept_id: this.dept_id,
|
|
|
|
+ name: this.dialog.name,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ this.dialog.visible = false;
|
|
|
|
+ if (res.data.msg == "success") {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "新增岗位成功",
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
|
|
+ this.tabClick({ name: "job" });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|