Browse Source

王子文 专项培养
1) 培养计划和我的计划模块的学习资料、学员附件、反馈附件分表显示
2) 沟通流程实现:(a) 学员提交学习心得和反馈附件=>导师审核,并给出通过意见,结束学习;
(b) 学员提交学习心得和反馈附件=>导师给出驳回意见,学员查看导师反馈内容,重新学习,并提交学习心得和反馈附件=>导师重新审核,并给出通过意见,结束学习

wangggziwen 3 years ago
parent
commit
6bea29c02e
2 changed files with 478 additions and 197 deletions
  1. 206 89
      ui/src/views/training/spec/myplan/index.vue
  2. 272 108
      ui/src/views/training/spec/plan/index.vue

+ 206 - 89
ui/src/views/training/spec/myplan/index.vue

@@ -34,14 +34,14 @@
             size="mini"
             type="text"
             icon="el-icon-document"
-            @click="handleDoc(scope.row)"
+            @click="handleDocSuccessor(scope.row)"
             v-hasPermi="['spec:plan:edit']"
           >学员附件</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-document"
-            @click="handleDoc(scope.row)"
+            @click="handleDocMentor(scope.row)"
             v-hasPermi="['spec:plan:edit']"
           >学习资料</el-button>
         </template>
@@ -55,16 +55,57 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-    <!-- 附件对话框 -->
-    <el-dialog v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="800px" append-to-body>
+    <!-- 学习资料对话框 -->
+    <el-dialog v-dialogDrag :title="docMentor.title" :visible.sync="docMentor.open" width="700px" append-to-body>
+      <el-table :data="docMentor.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="docMentor.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 学员附件对话框 -->
+    <el-dialog v-dialogDrag :title="docSuccessor.title" :visible.sync="docSuccessor.open" width="700px" append-to-body>
       <el-upload
-        ref="doc"
+        ref="docSuccessor"
         :limit="50"
-        :headers="doc.headers"
-        :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
-        :disabled="doc.isUploading"
-        :on-progress="handleFileDocProgress"
-        :on-success="handleFileDocSuccess"
+        :headers="docSuccessor.headers"
+        :action="docSuccessor.url + '?pType=' + docSuccessor.pType + '&pId=' + docSuccessor.pId"
+        :disabled="docSuccessor.isUploading"
+        :on-progress="handleFileDocProgressSuccessor"
+        :on-success="handleFileDocSuccessSuccessor"
         :auto-upload="true"
         drag
       >
@@ -74,7 +115,7 @@
           <em>{{ $t('点击上传') }}</em>
         </div>
       </el-upload>
-      <el-table :data="doc.commonfileList" border>
+      <el-table :data="docSuccessor.commonfileList" border>
         <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
           <template slot-scope="scope">
             <a  class="link-type"  @click="handleDownload(scope.row)">
@@ -84,7 +125,7 @@
         </el-table-column>
         <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
         <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
-        <el-table-column :label="$t('操作')" align="center" width="180" class-name="small-padding fixed-width">
+        <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
           <template slot-scope="scope">
             <el-button
               v-if="scope.row.fileName.endsWith('pdf')"
@@ -116,7 +157,7 @@
         </div>
       </el-dialog>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+        <el-button @click="docSuccessor.open = false">{{ $t('返 回') }}</el-button>
       </div>
     </el-dialog>
     <!-- 反馈对话框 -->
@@ -129,13 +170,13 @@
       </el-form>
       <h3>我的心得</h3>
       <el-upload
-        ref="doc"
-        :headers="doc.headers"
+        ref="docFeedback"
+        :headers="docFeedback.headers"
         class="upload-demo"
-        action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
-        :disabled="doc.isUploading"
-        :on-progress="handleFileDocProgress"
-        :on-success="handleFileDocSuccess"
+        :action="docFeedback.url + '?pType=' + docFeedback.pType + '&pId=' + docFeedback.pId"
+        :disabled="docFeedback.isUploading"
+        :on-progress="handleFileDocProgressFeedback"
+        :on-success="handleFileDocSuccessFeedback"
         :auto-upload="true"
         multiple
         :limit="3">
@@ -148,7 +189,7 @@
           点击上传附件
         </el-button>
       </el-upload>
-      <el-table :data="doc.commonfileList" border>
+      <el-table :data="docFeedback.commonfileList" border>
         <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
           <template slot-scope="scope">
             <a  class="link-type"  @click="handleDownload(scope.row)">
@@ -197,32 +238,15 @@
         <el-button @click="handleSubmitFeedback()" v-if="feedbackDialog.studyState == 0 || feedbackDialog.studyState == 3">{{ $t('提 交') }}</el-button>
         <el-button @click="feedbackDialog.open = false">{{ $t('返 回') }}</el-button>
       </div>
-      
     </el-dialog>
   </div>
 </template>
 
 <script>
 import { getFeedbackByPlanId } from "@/api/training/spec/feedback";
-import {
-  updateAnswer,
-  addAnswer,
-  getAnswerByPlanIdAndQuestionId
-} from "@/api/training/spec/answer";
-import {
-  getPlan,
-  delPlan,
-  addPlan,
-  updatePlan,
-  updatePlan2,
-  exportPlan,
-  importTemplate,
-  listPlanByStaffId
-} from "@/api/training/spec/plan";
-import {
-  allFileList,
-  delCommonfile
-} from "@/api/common/commonfile";
+import { updateAnswer, addAnswer, getAnswerByPlanIdAndQuestionId } from "@/api/training/spec/answer";
+import { getPlan, delPlan, addPlan, updatePlan, updatePlan2, exportPlan, importTemplate, listPlanByStaffId } from "@/api/training/spec/plan";
+import { allFileList, delCommonfile } from "@/api/common/commonfile";
 import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
@@ -233,6 +257,79 @@ export default {
   components: { Treeselect },
   data() {
     return {
+      // 报告附件参数
+      docFeedback: {  // 反馈附件
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'docFeedback'
+        },
+        pType: 'docFeedback',
+        pId: null
+      },
+      docMentor: {  // 学习资料
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'docMentor'
+        },
+        pType: 'docMentor',
+        pId: null
+      },
+      docSuccessor: { // 学员附件
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'docSuccessor'
+        },
+        pType: 'docSuccessor',
+        pId: null
+      },
       // 遮罩层
       loading: true,
       // 选中数组
@@ -259,31 +356,6 @@ export default {
       open: false,
       // 学习状态字典
       studyStateOptions: [],
-      // 报告附件参数
-      doc: {
-        file: "",
-        // 是否显示弹出层(报告附件)
-        open: false,
-        // 弹出层标题(报告附件)
-        title: "",
-        // 是否禁用上传
-        isUploading: false,
-        // 是否更新已经存在的用户数据
-        updateSupport: 0,
-        // 报告附件上传位置编号
-        ids: 0,
-        // 设置上传的请求头部
-        headers: { Authorization: "Bearer " + getToken() },
-        // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
-        commonfileList: null,
-        queryParams: {
-          pId: null,
-          pType: 'plan'
-        },
-        pType: 'plan',
-        pId: null
-      },
       // 反馈对话框参数
       feedbackDialog: {
         // 是否显示弹出层(报告附件)
@@ -333,11 +405,11 @@ export default {
     };
   },
   watch: {
-        // 根据名称筛选部门树
-        deptName(val) {
-            this.$refs.tree.filter(val);
-        }
-   },
+    // 根据名称筛选部门树
+    deptName(val) {
+        this.$refs.tree.filter(val);
+    }
+  },
   created() {
     //设置表格高度对应屏幕高度
     this.$nextTick(() => {
@@ -358,6 +430,14 @@ export default {
     },
     /** 反馈处理 */
     handleFeedback(row) {
+      this.docFeedback.id = row.id;
+      this.docFeedback.queryParams.pId = row.id
+      this.docFeedback.pId = row.id
+      this.getFileListFeedback()
+      this.$nextTick(() => {
+        this.$refs.docFeedback.clearFiles()
+      })
+
       this.feedbackParams = {};
       this.mentorFeedback = null;
       let feedback1 = {};
@@ -369,7 +449,6 @@ export default {
       let feedback3 = {};
       feedback3.planId = row.id;
       feedback3.questionId = 3;
-      // 查询学员反馈3个问题的答案
       getAnswerByPlanIdAndQuestionId(feedback1).then(response => {
         let data = response.data;
         if (data != null) {
@@ -387,7 +466,6 @@ export default {
         if (data != null) {
           this.feedbackParams.answer3 = data.answer;
         }
-        // 查询导师反馈
         return getFeedbackByPlanId(row.id);
       }).then(response => {
         if (response.data != null) {
@@ -476,32 +554,71 @@ export default {
       this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl;
     },
     /** 报告附件按钮操作 */
-    handleDoc(row) {
-      this.doc.id = row.id;
-      this.doc.title = row.plantName + this.$t('学习资料');
-      this.doc.open = true;
-      this.doc.queryParams.pId = row.id;
-      this.doc.pId = row.id;
-      this.getFileList();
+    handleDocMentor(row) {
+      this.docMentor.id = row.id;
+      this.docMentor.title = row.plantName + this.$t('学习资料');
+      this.docMentor.open = true;
+      this.docMentor.queryParams.pId = row.id
+      this.docMentor.pId = row.id
+      this.getFileListMentor()
       this.$nextTick(() => {
-        this.$refs.doc.clearFiles();
+        this.$refs.docMentor.clearFiles()
       })
     },
-    getFileList() {
-      allFileList(this.doc.queryParams).then(response => {
-        this.doc.commonfileList = response;
+    handleDocSuccessor(row) {
+      this.docSuccessor.id = row.id;
+      this.docSuccessor.title = row.plantName + this.$t('学员附件');
+      this.docSuccessor.open = true;
+      this.docSuccessor.queryParams.pId = row.id
+      this.docSuccessor.pId = row.id
+      this.getFileListSuccessor()
+      this.$nextTick(() => {
+        this.$refs.docSuccessor.clearFiles()
+      })
+    },
+    getFileListMentor() {
+      allFileList(this.docMentor.queryParams).then(response => {
+        this.docMentor.commonfileList = response;
+      });
+    },
+    getFileListSuccessor() {
+      allFileList(this.docSuccessor.queryParams).then(response => {
+        this.docSuccessor.commonfileList = response;
+      });
+    },
+    getFileListFeedback() {
+      allFileList(this.docFeedback.queryParams).then(response => {
+        this.docFeedback.commonfileList = response;
       });
     },
     /** 附件上传中处理 */
-    handleFileDocProgress(event, file, fileList) {
-      this.doc.file = file;
-      this.doc.isUploading = true;
+    handleFileDocProgressFeedback(event, file, fileList) {
+      this.docFeedback.file = file;
+      this.docFeedback.isUploading = true;
+    },
+    handleFileDocProgressMentor(event, file, fileList) {
+      this.docMentor.file = file;
+      this.docMentor.isUploading = true;
+    },
+    handleFileDocProgressSuccessor(event, file, fileList) {
+      this.docSuccessor.file = file;
+      this.docSuccessor.isUploading = true;
     },
     /** 附件上传成功处理 */
-    handleFileDocSuccess(response, file, fileList) {
-      this.doc.isUploading = false;
+    handleFileDocSuccessFeedback(response, file, fileList) {
+      this.docMentorFeedback.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      this.getFileListFeedback()
+    },
+    handleFileDocSuccessMentor(response, file, fileList) {
+      this.docMentor.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      this.getFileListMentor()
+    },
+    handleFileDocSuccessSuccessor(response, file, fileList) {
+      this.docSuccessor.isUploading = false;
       this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
-      this.getFileList()
+      this.getFileListSuccessor()
     },
     /** 删除按钮操作 */
     handleDeleteDoc(row) {

+ 272 - 108
ui/src/views/training/spec/plan/index.vue

@@ -193,14 +193,14 @@
             size="mini"
             type="text"
             icon="el-icon-document"
-            @click="handleDoc(scope.row)"
+            @click="handleDocSuccessor(scope.row)"
             v-hasPermi="['spec:plan:edit']"
           >学员附件</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-document"
-            @click="handleDoc(scope.row)"
+            @click="handleDocMentor(scope.row)"
             v-hasPermi="['spec:plan:edit']"
           >学习资料</el-button>
           <el-button
@@ -308,16 +308,16 @@
             <el-button @click="upload.open = false">取 消</el-button>
         </div>
     </el-dialog>
-    <!-- 附件对话框 -->
-    <el-dialog v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="700px" append-to-body>
+    <!-- 学习资料对话框 -->
+    <el-dialog v-dialogDrag :title="docMentor.title" :visible.sync="docMentor.open" width="700px" append-to-body>
       <el-upload
-        ref="doc"
+        ref="docMentor"
         :limit="50"
-        :headers="doc.headers"
-        :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
-        :disabled="doc.isUploading"
-        :on-progress="handleFileDocProgress"
-        :on-success="handleFileDocSuccess"
+        :headers="docMentor.headers"
+        :action="docMentor.url + '?pType=' + docMentor.pType + '&pId=' + docMentor.pId"
+        :disabled="docMentor.isUploading"
+        :on-progress="handleFileDocProgressMentor"
+        :on-success="handleFileDocSuccessMentor"
         :auto-upload="true"
         drag
       >
@@ -327,7 +327,7 @@
           <em>{{ $t('点击上传') }}</em>
         </div>
       </el-upload>
-      <el-table :data="doc.commonfileList" border>
+      <el-table :data="docMentor.commonfileList" border>
         <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
           <template slot-scope="scope">
             <a  class="link-type"  @click="handleDownload(scope.row)">
@@ -369,7 +369,48 @@
         </div>
       </el-dialog>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+        <el-button @click="docMentor.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 学员附件对话框 -->
+    <el-dialog v-dialogDrag :title="docSuccessor.title" :visible.sync="docSuccessor.open" width="700px" append-to-body>
+      <el-table :data="docSuccessor.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a  class="link-type"  @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="docSuccessor.open = false">{{ $t('返 回') }}</el-button>
       </div>
     </el-dialog>
     <!-- 反馈对话框 -->
@@ -381,7 +422,7 @@
           <el-table-column prop="question" label="问题" width="250"></el-table-column>
           <el-table-column prop="answer" label="答案"></el-table-column>
         </el-table>
-        <el-table :data="doc.commonfileList" border>
+        <el-table :data="docFeedback.commonfileList" border>
           <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
             <template slot-scope="scope">
               <a  class="link-type"  @click="handleDownload(scope.row)">
@@ -406,12 +447,6 @@
                 icon="el-icon-download"
                 @click="handleDownload(scope.row)"
               >{{ $t('下载') }}</el-button>
-              <el-button
-                size="mini"
-                type="text"
-                icon="el-icon-delete"
-                @click="handleDeleteDoc(scope.row)"
-              >{{ $t('删除') }}</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -421,6 +456,11 @@
             <editor v-model="feedbackParams.mentorFeedback" :min-height="192"/>
           </el-form-item>
         </el-form>
+        <el-form v-if="mentorFeedback != null && feedbackDialog.studyState != 2">
+        <el-form-item>
+          <p v-html="mentorFeedback" style="border:1px solid #DFE6EC;" />
+        </el-form-item>
+      </el-form>
         <div style="text-align:center;">
           <el-button 
             @click="handleApprove()" 
@@ -447,22 +487,11 @@
 </template>
 
 <script>
-import { addFeedback } from "@/api/training/spec/feedback";
+import { getFeedbackByPlanId } from "@/api/training/spec/feedback";
+import { addFeedback, updateFeedback } from "@/api/training/spec/feedback";
 import { getAnswerByPlanIdAndQuestionId } from "@/api/training/spec/answer";
-import {
-  getPlan,
-  listPlanByYearId,
-  delPlan,
-  addPlan,
-  updatePlan,
-  updatePlan2,
-  exportPlan,
-  importTemplate,
-} from "@/api/training/spec/plan";
-import {
-  allFileList,
-  delCommonfile
-} from "@/api/common/commonfile";
+import { getPlan, listPlanByYearId, delPlan, addPlan, updatePlan, updatePlan2, exportPlan, importTemplate } from "@/api/training/spec/plan";
+import { allFileList, delCommonfile } from "@/api/common/commonfile";
 import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import PlanApprove from "./plan-approve"
@@ -473,13 +502,84 @@ import Editor from '@/components/Editor';
 
 export default {
   name: "MyPlan",
-  components: {
-    Treeselect,
-    PlanApprove,
-    Editor
-  },
+  components: { Treeselect, PlanApprove, Editor },
   data() {
     return {
+      // 报告附件参数
+      docFeedback: {  // 反馈附件
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'docFeedback'
+        },
+        pType: 'docFeedback',
+        pId: null
+      },
+      docMentor: {  // 学习资料
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'docMentor'
+        },
+        pType: 'docMentor',
+        pId: null
+      },
+      docSuccessor: { // 学员附件
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'docSuccessor'
+        },
+        pType: 'docSuccessor',
+        pId: null
+      },
+      // 导师反馈内容
+      mentorFeedback: null,
       // 开始日期不能跨年 不能小于当前日期
       pickerOptionsStartDate: {
         disabledDate(time) {
@@ -569,31 +669,6 @@ export default {
           // 上传的地址
           url: process.env.VUE_APP_BASE_API + "/spec/plan/importData"
       },
-      // 报告附件参数
-      doc: {
-        file: "",
-        // 是否显示弹出层(报告附件)
-        open: false,
-        // 弹出层标题(报告附件)
-        title: "",
-        // 是否禁用上传
-        isUploading: false,
-        // 是否更新已经存在的用户数据
-        updateSupport: 0,
-        // 报告附件上传位置编号
-        ids: 0,
-        // 设置上传的请求头部
-        headers: { Authorization: "Bearer " + getToken() },
-        // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
-        commonfileList: null,
-        queryParams: {
-          pId: null,
-          pType: 'plan'
-        },
-        pType: 'plan',
-        pId: null
-      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -626,10 +701,10 @@ export default {
     };
   },
   watch: {
-        // 根据名称筛选部门树
-        deptName(val) {
-            this.$refs.tree.filter(val);
-        }
+    // 根据名称筛选部门树
+    deptName(val) {
+        this.$refs.tree.filter(val);
+    }
    },
   computed:{
     // 获取最小日期-月开始时间戳
@@ -695,7 +770,6 @@ export default {
     const yearId = this.$route.params && this.$route.params.yearId;
     // 设置查询参数年度计划编号
     this.queryParams.yearPlanId = yearId;
-
     this.getList();
     this.getTreeselect();
     this.getDicts("st_study_state").then(response => {
@@ -723,40 +797,84 @@ export default {
     /** 通过处理 */
     handleApprove() {
       this.feedbackParams.planId = this.feedbackDialog.id;
-      addFeedback(this.feedbackParams).then(response => {
-        // 后期需要发邮件通知学员
-        this.feedbackDialog.open = false;
-        // 修改学习状态为1已完成
-        let plan = {};
-        plan.id = this.feedbackDialog.planId;
-        plan.studyState = 1;
-        plan.dateOfCompletion = new Date();
-        updatePlan2(plan).then(response => {
+      if (this.mentorFeedback == null) {
+        addFeedback(this.feedbackParams).then(response => {
+          // 后期需要发邮件通知学员
           this.feedbackDialog.open = false;
-          this.msgSuccess("已通过");
-          this.getList();
+          // 修改学习状态为1已完成
+          let plan = {};
+          plan.id = this.feedbackDialog.planId;
+          plan.studyState = 1;
+          plan.dateOfCompletion = new Date();
+          updatePlan2(plan).then(response => {
+            this.feedbackDialog.open = false;
+            this.msgSuccess("已通过");
+            this.getList();
+          });
         });
-      });
+      } else {
+        updateFeedback(this.feedbackParams).then(response => {
+          // 后期需要发邮件通知学员
+          this.feedbackDialog.open = false;
+          // 修改学习状态为1已完成
+          let plan = {};
+          plan.id = this.feedbackDialog.planId;
+          plan.studyState = 1;
+          plan.dateOfCompletion = new Date();
+          updatePlan2(plan).then(response => {
+            this.feedbackDialog.open = false;
+            this.msgSuccess("已通过");
+            this.getList();
+          });
+        });
+      }
     },
     /** 驳回处理 */
     handleReject() {
       this.feedbackParams.planId = this.feedbackDialog.id;
-      addFeedback(this.feedbackParams).then(response => {
-        // 后期需要发邮件通知学员
-        this.feedbackDialog.open = false;
+      if (this.mentorFeedback == null) {
+        addFeedback(this.feedbackParams).then(response => {
+          // 后期需要发邮件通知学员
+          this.feedbackDialog.open = false;
         // 修改学习状态为3导师已反馈
-        let plan = {};
-        plan.id = this.feedbackDialog.planId;
-        plan.studyState = 3;
-        updatePlan2(plan).then(response => {
+          let plan = {};
+          plan.id = this.feedbackDialog.planId;
+          plan.studyState = 3;
+          plan.dateOfCompletion = new Date();
+          updatePlan2(plan).then(response => {
+            this.feedbackDialog.open = false;
+            this.msgSuccess("已驳回");
+            this.getList();
+          });
+        });
+      } else {
+        updateFeedback(this.feedbackParams).then(response => {
+          // 后期需要发邮件通知学员
           this.feedbackDialog.open = false;
-          this.msgSuccess("已驳回");
-          this.getList();
+        // 修改学习状态为3导师已反馈
+          let plan = {};
+          plan.id = this.feedbackDialog.planId;
+          plan.studyState = 3;
+          plan.dateOfCompletion = new Date();
+          updatePlan2(plan).then(response => {
+            this.feedbackDialog.open = false;
+            this.msgSuccess("已驳回");
+            this.getList();
+          });
         });
-      });
+      }
     },
     /** 反馈处理 */
     handleFeedback(row) {
+      this.docFeedback.id = row.id;
+      this.docFeedback.queryParams.pId = row.id
+      this.docFeedback.pId = row.id
+      this.getFileListFeedback()
+      this.$nextTick(() => {
+        this.$refs.docFeedback.clearFiles()
+      })
+
+      this.mentorFeedback = null;
       this.tableData = [];
       let feedback1 = {};
       feedback1.planId = row.id;
@@ -790,6 +908,13 @@ export default {
           this.tableData.push(answerObj2);
           this.tableData.push(answerObj3);
         }
+        return getFeedbackByPlanId(row.id);
+      }).then(response => {
+        if (response.data != null) {
+          let data = response.data;
+          this.mentorFeedback = data.mentorFeedback;
+          this.feedbackParams.id = data.id;
+        }
         this.feedbackDialog.title = row.staffName + row.plantName + "学习情况反馈";
         this.feedbackDialog.id = row.id;
         this.feedbackDialog.planId = row.id;
@@ -817,32 +942,71 @@ export default {
       this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
     },
     /** 报告附件按钮操作 */
-    handleDoc(row) {
-      this.doc.id = row.id;
-      this.doc.title = row.plantName + this.$t('附件');
-      this.doc.open = true;
-      this.doc.queryParams.pId = row.id
-      this.doc.pId = row.id
-      this.getFileList()
+    handleDocMentor(row) {
+      this.docMentor.id = row.id;
+      this.docMentor.title = row.plantName + this.$t('学习资料');
+      this.docMentor.open = true;
+      this.docMentor.queryParams.pId = row.id
+      this.docMentor.pId = row.id
+      this.getFileListMentor()
+      this.$nextTick(() => {
+        this.$refs.docMentor.clearFiles()
+      })
+    },
+    handleDocSuccessor(row) {
+      this.docSuccessor.id = row.id;
+      this.docSuccessor.title = row.plantName + this.$t('学员附件');
+      this.docSuccessor.open = true;
+      this.docSuccessor.queryParams.pId = row.id
+      this.docSuccessor.pId = row.id
+      this.getFileListSuccessor()
       this.$nextTick(() => {
-        this.$refs.doc.clearFiles()
+        this.$refs.docSuccessor.clearFiles()
       })
     },
-    getFileList (){
-      allFileList(this.doc.queryParams).then(response => {
-        this.doc.commonfileList = response;
+    getFileListMentor() {
+      allFileList(this.docMentor.queryParams).then(response => {
+        this.docMentor.commonfileList = response;
+      });
+    },
+    getFileListSuccessor() {
+      allFileList(this.docSuccessor.queryParams).then(response => {
+        this.docSuccessor.commonfileList = response;
+      });
+    },
+    getFileListFeedback() {
+      allFileList(this.docFeedback.queryParams).then(response => {
+        this.docFeedback.commonfileList = response;
       });
     },
     /** 附件上传中处理 */
-    handleFileDocProgress(event, file, fileList) {
-      this.doc.file = file;
-      this.doc.isUploading = true;
+    handleFileDocProgressFeedback(event, file, fileList) {
+      this.docFeedback.file = file;
+      this.docFeedback.isUploading = true;
+    },
+    handleFileDocProgressMentor(event, file, fileList) {
+      this.docMentor.file = file;
+      this.docMentor.isUploading = true;
+    },
+    handleFileDocProgressSuccessor(event, file, fileList) {
+      this.docSuccessor.file = file;
+      this.docSuccessor.isUploading = true;
     },
     /** 附件上传成功处理 */
-    handleFileDocSuccess(response, file, fileList) {
-      this.doc.isUploading = false;
+    handleFileDocSuccessFeedback(response, file, fileList) {
+      this.docMentorFeedback.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      this.getFileListFeedback()
+    },
+    handleFileDocSuccessMentor(response, file, fileList) {
+      this.docMentor.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      this.getFileListMentor()
+    },
+    handleFileDocSuccessSuccessor(response, file, fileList) {
+      this.docSuccessor.isUploading = false;
       this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
-      this.getFileList()
+      this.getFileListSuccessor()
     },
     /** 删除按钮操作 */
     handleDeleteDoc(row) {