|
@@ -291,8 +291,8 @@ export default {
|
|
|
mentorStaffId: ""
|
|
|
},
|
|
|
// 导师反馈内容
|
|
|
- mentorFeedback: null, // 季度反馈内容
|
|
|
- detailFeedback: null, // 计划详情反馈内容
|
|
|
+ mentorFeedback: "", // 季度反馈内容
|
|
|
+ detailFeedback: "", // 计划详情反馈内容
|
|
|
// 反馈对话框参数
|
|
|
feedbackDialog: {
|
|
|
id: 0,
|
|
@@ -450,7 +450,7 @@ export default {
|
|
|
this.queryParams.feedbackMonth = tab.name;
|
|
|
this.getList();
|
|
|
// 清空导师反馈内容
|
|
|
- this.mentorFeedback = null;
|
|
|
+ this.mentorFeedback = "";
|
|
|
// 根据月获取反馈id
|
|
|
getFeedbackByParams({
|
|
|
successorId: this.queryParams.successorId,
|
|
@@ -486,7 +486,7 @@ export default {
|
|
|
listSuccessorsByMentorId(this.queryObject).then(response => {
|
|
|
let data = response.data;
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
- if (i == 0) {
|
|
|
+ if (i == 0 && data.length != 0) {
|
|
|
// 默认选中列表中第一个学员
|
|
|
this.queryParams.successorId = data[i].staffId;
|
|
|
// 设置导师id
|
|
@@ -496,16 +496,21 @@ export default {
|
|
|
}
|
|
|
this.successorOptions.push( { key: data[i].staffId, value: data[i].staffName } );
|
|
|
}
|
|
|
- // 获取当前学员当年当月反馈id
|
|
|
- getFeedbackByParams({
|
|
|
- successorId: this.queryParams.successorId,
|
|
|
- feedbackYear: this.queryParams.feedbackYear,
|
|
|
- feedbackMonth: this.queryParams.feedbackMonth
|
|
|
- }).then(response => {
|
|
|
- let data = response.data;
|
|
|
- this.feedbackId = data.id;
|
|
|
- this.mentorFeedback = data.mentorFeedback;
|
|
|
- });
|
|
|
+ if (data.length != 0) {
|
|
|
+ // 获取当前学员当年当月反馈id
|
|
|
+ getFeedbackByParams({
|
|
|
+ successorId: this.queryParams.successorId,
|
|
|
+ feedbackYear: this.queryParams.feedbackYear,
|
|
|
+ feedbackMonth: this.queryParams.feedbackMonth
|
|
|
+ }).then(response => {
|
|
|
+ let data = response.data;
|
|
|
+ this.feedbackId = data.id;
|
|
|
+ this.mentorFeedback = data.mentorFeedback;
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ this.loading = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
});
|
|
|
} else { // 当前用户是学员
|
|
|
// 学员id = 当当前用户id
|
|
@@ -723,7 +728,7 @@ export default {
|
|
|
this.queryParams.pageNum = 1;
|
|
|
this.getList();
|
|
|
// 清空导师反馈内容
|
|
|
- this.mentorFeedback = null;
|
|
|
+ this.mentorFeedback = "";
|
|
|
getFeedbackByParams({
|
|
|
successorId: this.queryParams.successorId,
|
|
|
feedbackYear: this.queryParams.feedbackYear,
|