gaoshp
2024-11-03 dcc4992bd51e9ee4a97099cd3a15085f7e247f23
src/views/master/person/main/department.vue
@@ -35,8 +35,8 @@
            value1: true,
            mode: "add",
            titleMap: {
               add: '添加岗位',
               edit: '修改岗位',
               add: '添加部门',
               edit: '修改部门',
               show: '查看'
            },
            visible: false,
@@ -73,7 +73,7 @@
      },
      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;
               }
@@ -100,11 +100,16 @@
         },
         //表单提交方法
         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;