|
@@ -298,16 +298,27 @@ export default {
|
|
|
// 如果没有 班组数据 将人员数据清空 并且判断
|
|
// 如果没有 班组数据 将人员数据清空 并且判断
|
|
|
this.crewList = [];
|
|
this.crewList = [];
|
|
|
this.form.teamId = '';
|
|
this.form.teamId = '';
|
|
|
|
|
+ this.setTeamLeaderName(null); // 清空班组长
|
|
|
let data = this.processList.find((item) => item.id == this.processId);
|
|
let data = this.processList.find((item) => item.id == this.processId);
|
|
|
if (data.assignType == 2) {
|
|
if (data.assignType == 2) {
|
|
|
this.$set(data, 'list', []);
|
|
this.$set(data, 'list', []);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ // 设置班组长显示 (班组数据里的 leaderUserName)
|
|
|
|
|
+ setTeamLeaderName(team) {
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.form,
|
|
|
|
|
+ 'leaderUserName',
|
|
|
|
|
+ (team && team.leaderUserName) || ''
|
|
|
|
|
+ );
|
|
|
|
|
+ this.$set(this.form, 'leaderUserId', (team && team.leaderUserId) || '');
|
|
|
|
|
+ },
|
|
|
// 选择班组 查询人员的数据
|
|
// 选择班组 查询人员的数据
|
|
|
async changeGroups(e) {
|
|
async changeGroups(e) {
|
|
|
let data = this.teamList.find((item) => item.id == e);
|
|
let data = this.teamList.find((item) => item.id == e);
|
|
|
this.form.teamName = data.name;
|
|
this.form.teamName = data.name;
|
|
|
|
|
+ this.setTeamLeaderName(data); // 显示班组长
|
|
|
try {
|
|
try {
|
|
|
const res = await listUserByIds([e]);
|
|
const res = await listUserByIds([e]);
|
|
|
this.crewList = res;
|
|
this.crewList = res;
|