修正部门配置
parent
ec17ab2e10
commit
eb9de2f1e3
|
@ -34,10 +34,10 @@ class DepartmentConfig extends React.Component<any, any> {
|
|||
}
|
||||
})
|
||||
if (newRow) {
|
||||
let data={
|
||||
let data = {
|
||||
departmentName: row.departmentName,
|
||||
departmentManagerId: row.departmentManagerId,
|
||||
staffIds:[]
|
||||
staffIds: []
|
||||
}
|
||||
axiosInstance.post("management/department", data).then((res) => {
|
||||
this.update()
|
||||
|
@ -45,11 +45,11 @@ class DepartmentConfig extends React.Component<any, any> {
|
|||
this.update()
|
||||
})
|
||||
} else {
|
||||
let data={
|
||||
let data = {
|
||||
departmentName: row.departmentName,
|
||||
departmentManagerId: row.departmentManagerId,
|
||||
}
|
||||
axiosInstance.put("management/department/"+row.departmentId, data).then((res) => {
|
||||
axiosInstance.put("management/department/" + row.departmentId, data).then((res) => {
|
||||
this.update()
|
||||
}).catch((err) => {
|
||||
this.update()
|
||||
|
@ -76,8 +76,9 @@ class DepartmentConfig extends React.Component<any, any> {
|
|||
return []
|
||||
}
|
||||
let res = []
|
||||
console.log(columns)
|
||||
for (let i = 0; i < columns.length; i++) {
|
||||
console.log(columns[i].departmentName)
|
||||
if (columns[i].deletedAt == null)
|
||||
res.push({
|
||||
id: columns[i].departmentId,
|
||||
departmentId: columns[i].departmentId,
|
||||
|
|
Loading…
Reference in New Issue