소스 검색

王子文 专项培养

wangggziwen 3 년 전
부모
커밋
501fe7fdf7
1개의 변경된 파일56개의 추가작업 그리고 2개의 파일을 삭제
  1. 56 2
      ui/src/views/training/spec/seasonalfeedback/index.vue

+ 56 - 2
ui/src/views/training/spec/seasonalfeedback/index.vue

@@ -48,7 +48,6 @@
           size="small"
           v-model="queryParams.successorId" 
           placeholder="请选择学员"
-          @change="someMethod()"
           style="width:200px"
         >
           <el-option
@@ -61,7 +60,7 @@
       </el-form-item>
       <el-form-item label="年" prop="feedbackYear">
         <el-date-picker
-          v-model="queryParams.feedbackYear"
+          v-model="queryParams.feedbackYearTemp"
           placeholder="请选择年"
           clearable
           type="year"
@@ -622,6 +621,7 @@ export default {
         parentId: null,
         planId: null,
         feedbackYear: null,
+        feedbackYearTemp: null,
         feedbackSeason: null,
         feedbackMonth: null,
         successorFeedback: null,
@@ -712,6 +712,7 @@ export default {
       let date = new Date();
       // 搜索条件默认为当年、当季度
       this.queryParams.feedbackYear = date.getFullYear().toString();
+      this.queryParams.feedbackYearTemp = date.getFullYear().toString();
       this.queryParams.feedbackSeason = ( ( date.getMonth() + 2 ) / 3 ).toString();
       // ====================获取导师下拉列表====================
       listMentors().then(response => {
@@ -1107,8 +1108,61 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      this.queryParams.feedbackYear = this.queryParams.feedbackYearTemp.getFullYear();
       this.queryParams.pageNum = 1;
       this.getList();
+      // 清空问卷
+      this.radio1 = null;
+      this.radio2 = null;
+      this.radio3 = null;
+      this.radio4 = null;
+      this.radio5 = null;
+      this.radio6 = null;
+      this.radio7 = null;
+      this.radio8 = null;
+      this.radio9 = null;
+      this.radio10 = null;
+      this.radio11 = null;
+      this.radio12 = null;
+      this.radio13 = null;
+      this.radio14 = null;
+      // 清空导师反馈内容
+      this.mentorFeedback = null;
+      // 清空会议日期
+      this.meetingDate = null;
+      getFeedbackByParams({
+        successorId: this.queryParams.successorId,
+        feedbackYear: this.queryParams.feedbackYear,
+        feedbackSeason: this.queryParams.feedbackSeason,
+      }).then(response => {
+        let data = response.data;
+        this.feedbackId = data.id;
+        this.parentId = data.id;
+        this.meetingDate = data.meetingDate;
+        this.mentorFeedback = data.mentorFeedback;
+        // 刷新汇报附件
+        this.initFileList(data.id);
+      });
+      // 刷新问卷
+      listAnswer( { feedbackId: this.feedbackId } ).then(response => {
+        let data = response.rows;
+        for (let i = 0; i < data.length; i++) {
+          if (data[i].questionId == "4") { this.radio1 = data[i].answer; }
+          if (data[i].questionId == "5") { this.radio2 = data[i].answer; }
+          if (data[i].questionId == "6") { this.radio3 = data[i].answer; }
+          if (data[i].questionId == "7") { this.radio4 = data[i].answer; }
+          if (data[i].questionId == "8") { this.radio5 = data[i].answer; }
+          if (data[i].questionId == "9") { this.radio6 = data[i].answer; }
+          if (data[i].questionId == "10") { this.radio7 = data[i].answer; }
+          if (data[i].questionId == "11") { this.radio8 = data[i].answer; }
+          if (data[i].questionId == "12") { this.radio9 = data[i].answer; }
+          if (data[i].questionId == "13") { this.radio10 = data[i].answer; }
+          if (data[i].questionId == "14") { this.radio11 = data[i].answer; }
+          if (data[i].questionId == "15") { this.radio12 = data[i].answer; }
+          if (data[i].questionId == "16") { this.radio13 = data[i].answer; }
+          if (data[i].questionId == "17") { this.radio14 = data[i].answer; }
+        }
+      });
     },
     /** 重置按钮操作 */
     resetQuery() {