| | |
| | | value1: true, |
| | | mode: "add", |
| | | titleMap: { |
| | | add: '添加岗位', |
| | | edit: '修改岗位', |
| | | add: '添加部门', |
| | | edit: '修改部门', |
| | | show: '查看' |
| | | }, |
| | | visible: false, |
| | |
| | | }, |
| | | methods: { |
| | | getOrganizationList() { |
| | | this.$HTTP.get(`/api/blade-cps/organization/tree?groupType=group_organization&groupCategory=1`).then(res=> { |
| | | this.$HTTP.get(`/api/smis/organization/tree?groupType=group_organization&groupCategory=1`).then(res=> { |
| | | if(res.code == 200) { |
| | | this.departmentList = res.data; |
| | | } |
| | |
| | | }, |
| | | //表单提交方法 |
| | | departmentSubmit(){ |
| | | if(this.mode == "edit") { |
| | | var postMethods = "put"; |
| | | }else { |
| | | var postMethods = "post"; |
| | | } |
| | | var obj = Object.assign({},this.depatmentForm); |
| | | obj.status = obj.status ? 1 : 0; |
| | | this.$refs.dialogForm.validate(async (valid) => { |
| | | if (valid) { |
| | | this.$HTTP.post("/api/blade-cps/group",obj).then(res=> { |
| | | this.$HTTP[postMethods]("/api/smis/group",obj).then(res=> { |
| | | if(res.code == 200) { |
| | | this.$emit('success', this.depatmentForm, this.mode); |
| | | this.visible = false; |