|
@@ -239,10 +239,10 @@
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleComment(scope.row)"
|
|
|
+ icon="el-icon-chat-dot-round"
|
|
|
+ @click="handleFeedback(scope.row)"
|
|
|
v-hasPermi="['spec:plan:edit']"
|
|
|
- >查看</el-button>
|
|
|
+ >反馈</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
@@ -425,10 +425,10 @@
|
|
|
<el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <!-- 评价对话框 -->
|
|
|
- <el-dialog v-dialogDrag :title="comment.title" :visible.sync="comment.open" width="800px" append-to-body>
|
|
|
+ <!-- 反馈对话框 -->
|
|
|
+ <el-dialog v-dialogDrag :title="feedbackDialog.title" :visible.sync="feedbackDialog.open" width="800px" append-to-body>
|
|
|
<div style="width:700px; margin:0px auto;">
|
|
|
- <h3 style="margin-bottom:20px;text-align:center;">学习心得</h3>
|
|
|
+ <h3 style="margin-bottom:20px;text-align:center;">学员心得</h3>
|
|
|
<el-table :data="tableData" border style="width: 100%">
|
|
|
<el-table-column prop="id" label="编号" width="50"></el-table-column>
|
|
|
<el-table-column prop="question" label="问题" width="250"></el-table-column>
|
|
@@ -471,12 +471,12 @@
|
|
|
<h3 style="margin-top:30px;margin-bottom:20px;text-align:center;">导师反馈</h3>
|
|
|
<el-form>
|
|
|
<el-form-item>
|
|
|
- <editor :min-height="192"/>
|
|
|
+ <editor v-model="feedbackParams.mentorFeedback" :min-height="192"/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div style="text-align:center;">
|
|
|
- <el-button @click="handleAddComment()" type="success" size="medium" style="margin-right:25px;">{{ $t('通 过') }}</el-button>
|
|
|
- <el-button @click="comment.open = false" type="danger" size="medium">{{ $t('驳 回') }}</el-button>
|
|
|
+ <el-button @click="handleApprove()" type="success" size="medium" style="margin-right:25px;">{{ $t('通 过') }}</el-button>
|
|
|
+ <el-button @click="handleReject()" type="danger" size="medium">{{ $t('驳 回') }}</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -485,9 +485,22 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getFeedback} from "@/api/training/spec/planfeedback";
|
|
|
-import { getPlan,listPlanByYearId, delPlan, addPlan, updatePlan, updatePlan2, exportPlan, importTemplate, listSuccessorsByMentorId, listPlanByMentorId } from "@/api/training/spec/plan";
|
|
|
-import { allFileList, delCommonfile } from "@/api/common/commonfile";
|
|
|
+import { addFeedback } 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 { treeselect } from "@/api/system/dept";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import PlanApprove from "./plan-approve"
|
|
@@ -505,12 +518,10 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- // 评论参数
|
|
|
- commentParams: {
|
|
|
- id: 0,
|
|
|
- score: null,
|
|
|
- overallComment: "",
|
|
|
- studyState: 2
|
|
|
+ // 反馈参数
|
|
|
+ feedbackParams: {
|
|
|
+ id: null,
|
|
|
+ mentorFeedback: null
|
|
|
},
|
|
|
showMonths:[],
|
|
|
minDay:"", // 最小日期
|
|
@@ -523,8 +534,8 @@ export default {
|
|
|
// 弹出层标题(报告附件)
|
|
|
title: ""
|
|
|
},
|
|
|
- // 评价参数
|
|
|
- comment: {
|
|
|
+ // 反馈对话框参数
|
|
|
+ feedbackDialog: {
|
|
|
id: 0,
|
|
|
// 是否显示弹出层(报告附件)
|
|
|
open: false,
|
|
@@ -716,14 +727,15 @@ export default {
|
|
|
this.getDicts("spec_training_approve_status").then(response => {
|
|
|
this.approveStatusOptions = response.data;
|
|
|
});
|
|
|
- this.getSuccessorOptions();
|
|
|
},
|
|
|
methods: {
|
|
|
- // 单元格样式
|
|
|
+ /** 单元格样式 */
|
|
|
tableCellStyle (row, column, rowIndex, columnIndex) {
|
|
|
+ // 超时学习突出显示
|
|
|
if (row.column.label === "实际完成日期" && row.row.dateOfCompletion > row.row.endDate) {
|
|
|
return "background: #FFEEEE"
|
|
|
}
|
|
|
+ // 修改过的计划突出显示
|
|
|
if (row.column.label === "修改人" && row.row.updateBy!=null) {
|
|
|
return "background: #FFFFDB"
|
|
|
}
|
|
@@ -731,49 +743,54 @@ export default {
|
|
|
return "background: #FFFFDB"
|
|
|
}
|
|
|
},
|
|
|
- /** 评价提交处理 */
|
|
|
- handleAddComment() {
|
|
|
- this.commentParams.id = this.comment.id;
|
|
|
- updatePlan2(this.commentParams).then(response => {
|
|
|
- this.comment.open = false;
|
|
|
- this.msgSuccess("已结束学习");
|
|
|
- this.getList();
|
|
|
+ /** 通过处理 */
|
|
|
+ handleApprove() {
|
|
|
+ this.feedbackParams.planId = this.feedbackDialog.id;
|
|
|
+ addFeedback(this.feedbackParams).then(response => {
|
|
|
+ // 后期需要发邮件通知学员
|
|
|
+ this.feedbackDialog.open = false;
|
|
|
});
|
|
|
},
|
|
|
- /** 查看培训详情处理 */
|
|
|
- handleDetail(row) {
|
|
|
- this.tableData = [];
|
|
|
- this.detail.id = row.id;
|
|
|
- this.detail.title = row.plantName + this.$t('详情');
|
|
|
- this.detail.open = true;
|
|
|
- getFeedback(row.id).then(response => {
|
|
|
- let feedbackObject = response.data;
|
|
|
- let data1 = { id: 1, question: feedbackObject.question1, answer: feedbackObject.answer1};
|
|
|
- let data2 = { id: 2, question: feedbackObject.question2, answer: feedbackObject.answer2};
|
|
|
- let data3 = { id: 3, question: feedbackObject.question3, answer: feedbackObject.answer3};
|
|
|
- this.tableData.push(data1);
|
|
|
- this.tableData.push(data2);
|
|
|
- this.tableData.push(data3);
|
|
|
- });
|
|
|
- getPlan(row.id).then(response => {
|
|
|
- this.commentParams.score = response.data.score;
|
|
|
- this.commentParams.overallComment = response.data.overallComment;
|
|
|
+ /** 驳回处理 */
|
|
|
+ handleReject() {
|
|
|
+ this.feedbackParams.planId = this.feedbackDialog.id;
|
|
|
+ addFeedback(this.feedbackParams).then(response => {
|
|
|
+ // 后期需要发邮件通知学员
|
|
|
+ this.feedbackDialog.open = false;
|
|
|
});
|
|
|
},
|
|
|
- /** 评价处理 */
|
|
|
- handleComment(row) {
|
|
|
+ /** 反馈处理 */
|
|
|
+ handleFeedback(row) {
|
|
|
this.tableData = [];
|
|
|
- this.comment.id = row.id;
|
|
|
- this.comment.title = row.staffName + " " + row.plantName + " " + this.$t('学习情况');
|
|
|
- this.comment.open = true;
|
|
|
- getFeedback(row.id).then(response => {
|
|
|
- let feedbackObject = response.data;
|
|
|
- let data1 = { id: 1, question: feedbackObject.question1, answer: feedbackObject.answer1};
|
|
|
- let data2 = { id: 2, question: feedbackObject.question2, answer: feedbackObject.answer2};
|
|
|
- let data3 = { id: 3, question: feedbackObject.question3, answer: feedbackObject.answer3};
|
|
|
- this.tableData.push(data1);
|
|
|
- this.tableData.push(data2);
|
|
|
- this.tableData.push(data3);
|
|
|
+ let feedback1 = {};
|
|
|
+ feedback1.planId = row.id;
|
|
|
+ feedback1.questionId = 1;
|
|
|
+ let feedback2 = {};
|
|
|
+ feedback2.planId = row.id;
|
|
|
+ feedback2.questionId = 2;
|
|
|
+ let feedback3 = {};
|
|
|
+ feedback3.planId = row.id;
|
|
|
+ feedback3.questionId = 3;
|
|
|
+ let answerObj1 = {};
|
|
|
+ let answerObj2 = {};
|
|
|
+ let answerObj3 = {};
|
|
|
+ getAnswerByPlanIdAndQuestionId(feedback1).then(response => {
|
|
|
+ let data = response.data;
|
|
|
+ answerObj1 = { id: feedback1.questionId, question: data.question, answer: data.answer};
|
|
|
+ return getAnswerByPlanIdAndQuestionId(feedback2);
|
|
|
+ }).then(response => {
|
|
|
+ let data = response.data;
|
|
|
+ answerObj2 = { id: feedback2.questionId, question: data.question, answer: data.answer};
|
|
|
+ return getAnswerByPlanIdAndQuestionId(feedback3);
|
|
|
+ }).then(response => {
|
|
|
+ let data = response.data;
|
|
|
+ answerObj3 = { id: feedback3.questionId, question: data.question, answer: data.answer};
|
|
|
+ this.tableData.push(answerObj1);
|
|
|
+ this.tableData.push(answerObj2);
|
|
|
+ this.tableData.push(answerObj3);
|
|
|
+ this.feedbackDialog.id = row.id;
|
|
|
+ this.feedbackDialog.title = row.staffName + " " + row.plantName + " " + this.$t('学习情况');
|
|
|
+ this.feedbackDialog.open = true;
|
|
|
});
|
|
|
},
|
|
|
/** 文件下载处理 */
|
|
@@ -837,18 +854,6 @@ export default {
|
|
|
this.msgSuccess(this.$t('删除成功'));
|
|
|
})
|
|
|
},
|
|
|
- /** 查询学员下拉列表 */
|
|
|
- getSuccessorOptions() {
|
|
|
- listSuccessorsByMentorId(this.queryObject).then(response => {
|
|
|
- let successorList = response.data;
|
|
|
- for (let i = 0; i < successorList.length; i++) {
|
|
|
- let successor = {};
|
|
|
- successor.key = successorList[i].staffId;
|
|
|
- successor.value = successorList[i].staffName;
|
|
|
- this.successorOptions.push(successor);
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
/** 查询培训计划列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|