Ver código fonte

update 用户管理账号修改

linweizeng 3 anos atrás
pai
commit
a46aea4d7d

+ 2 - 1
src/api/platform/org/employee.js

@@ -1,5 +1,6 @@
 import request from '@/utils/request'
 import request from '@/utils/request'
 import { ORG_URL } from '@/api/baseUrl'
 import { ORG_URL } from '@/api/baseUrl'
+import { PLATFORM_BASE_URL } from '@/api/baseUrl'
 /**
 /**
  * 查询列表数据
  * 查询列表数据
  * @param {*} params
  * @param {*} params
@@ -43,7 +44,7 @@ export function create(data) {
  */
  */
  export function upEmployee(data) {
  export function upEmployee(data) {
     return request({
     return request({
-      url: ORG_URL() + '/sys/universal/upEmployee',
+      url: PLATFORM_BASE_URL() + '/sys/universal/upEmployee',
       method: 'post',
       method: 'post',
       data
       data
     })
     })

+ 13 - 4
src/views/platform/org/employee/edit/index.vue

@@ -206,8 +206,11 @@
                 // 验证表单是否填写
                 // 验证表单是否填写
                 this.$refs.basicInfo.validate((valid) => {
                 this.$refs.basicInfo.validate((valid) => {
                     if (valid) {
                     if (valid) {
-                        this.getUpEmployee()
-                        this.saveData()
+                        if(this.formId){
+                            this.getUpEmployee()
+                        }else{
+                            this.saveData()
+                        }
                     } else {
                     } else {
                         this.activeName = 'basic-info'
                         this.activeName = 'basic-info'
                         ActionUtils.saveErrorMessage()
                         ActionUtils.saveErrorMessage()
@@ -228,7 +231,14 @@
                 }
                 }
                 console.log(params)
                 console.log(params)
                 upEmployee(params).then(res => {
                 upEmployee(params).then(res => {
-                    console.log('测试',res)
+                    if(res.state == 200){
+                        const data = res.data
+                        if(data == "Y"){
+                            this.saveData()
+                        }else{
+                            ActionUtils.warning(res.message)
+                        }
+                    }
                 })
                 })
             },
             },
             saveData() {
             saveData() {
@@ -250,7 +260,6 @@
                     return
                     return
                 }
                 }
                 if (this.formId) {
                 if (this.formId) {
-                    console.log(vo)
                     update(vo).then(response => {
                     update(vo).then(response => {
                         this.dialogLoading = false
                         this.dialogLoading = false
                         this.$emit('dialog-callback', this)
                         this.$emit('dialog-callback', this)