|
@@ -120,7 +120,8 @@ import {
|
|
|
listWorkshopByParentId,
|
|
listWorkshopByParentId,
|
|
|
listFactoryLineByParentId,
|
|
listFactoryLineByParentId,
|
|
|
listByProductionLineId,
|
|
listByProductionLineId,
|
|
|
- saveteam
|
|
|
|
|
|
|
+ saveteam,
|
|
|
|
|
+ updateteam
|
|
|
} from '@/api/workforceManagement/team';
|
|
} from '@/api/workforceManagement/team';
|
|
|
import userTable from './userTable.vue';
|
|
import userTable from './userTable.vue';
|
|
|
export default {
|
|
export default {
|
|
@@ -235,7 +236,8 @@ export default {
|
|
|
if (this.type == 'add') {
|
|
if (this.type == 'add') {
|
|
|
delete par.id;
|
|
delete par.id;
|
|
|
}
|
|
}
|
|
|
- saveteam(par)
|
|
|
|
|
|
|
+ const saveOrUpdate = this.type == 'add'? saveteam : updateteam
|
|
|
|
|
+ saveOrUpdate(par)
|
|
|
.then((msg) => {
|
|
.then((msg) => {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
this.$message.success(msg);
|
|
this.$message.success(msg);
|