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