monthdata.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  1. <template>
  2. <div class="app-container">
  3. <!-- 搜索栏 -->
  4. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
  5. <el-form-item label="年" prop="feedbackYear">
  6. <el-date-picker
  7. v-model="queryParams.feedbackYearTemp"
  8. placeholder="请选择年"
  9. clearable
  10. type="year"
  11. size="small"
  12. @keyup.enter.native="handleQuery"
  13. style="width:200px"
  14. />
  15. </el-form-item>
  16. <el-form-item>
  17. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  18. </el-form-item>
  19. </el-form>
  20. <!-- 标签页 -->
  21. <el-tabs type="border-card" @tab-click="handleTabClick" v-model="activeMonth">
  22. <el-tab-pane
  23. :key="item.key"
  24. v-for="(item) in monthTabs"
  25. :label="item.value"
  26. :name="item.key"
  27. :lazy="true"
  28. >
  29. <div v-if="item.key == activeMonth">
  30. <!-- 培养计划总表 -->
  31. <el-table
  32. v-loading="loading"
  33. :data="dataList"
  34. @selection-change="handleSelectionChange"
  35. ref="feedbackListSeasonalTable"
  36. border
  37. :cell-style="tableCellStyle"
  38. >
  39. <template slot="empty">
  40. <el-empty :image-size="100" description='当月无学习计划'></el-empty>
  41. </template>
  42. <el-table-column label="培养内容" align="center" prop="plantName" width="600px"/>
  43. <el-table-column label="开始日期" align="center" prop="startDate"/>
  44. <el-table-column label="结束日期" align="center" prop="endDate"/>
  45. <el-table-column label="实际完成日期" align="center" prop="dateOfCompletion"/>
  46. <el-table-column label="学习状态" align="center" prop="studyState" :formatter="studyStateFormat"/>
  47. <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
  48. <template slot-scope="scope">
  49. <el-button
  50. size="mini"
  51. type="text"
  52. icon="el-icon-chat-dot-round"
  53. v-hasPermi="['spec:plan:edit']"
  54. @click="handleFeedback(scope.row)"
  55. >详情</el-button>
  56. </template>
  57. </el-table-column>
  58. </el-table>
  59. <!-- 导师反馈 -->
  60. <div>
  61. <h3>导师反馈</h3>
  62. <span
  63. v-html="mentorFeedback"
  64. style="overflow:scroll; display:block; border:1px solid #CCCCCC; height: 300px; padding:15px;font-family: Helvetica, Arial, sans-serif; font-size: 13px;"
  65. >
  66. </span>
  67. </div>
  68. </div>
  69. </el-tab-pane>
  70. </el-tabs>
  71. <!-- 详情对话框 -->
  72. <el-dialog v-dialogDrag :title="feedbackDialog.title" :visible.sync="feedbackDialog.open" width="800px" append-to-body>
  73. <div style="width:700px; margin:0px auto;">
  74. <h3 style="margin-bottom:20px;">学员心得</h3>
  75. <el-table :data="tableData" border style="width: 100%">
  76. <el-table-column prop="id" label="编号" width="50"></el-table-column>
  77. <el-table-column prop="question" label="问题" width="250"></el-table-column>
  78. <el-table-column prop="answer" label="答案"></el-table-column>
  79. </el-table>
  80. <el-table :data="docFeedback.commonfileList" border>
  81. <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
  82. <template slot-scope="scope">
  83. <a class="link-type" @click="handleDownload(scope.row)">
  84. <span>{{ scope.row.fileName }}</span>
  85. </a>
  86. </template>
  87. </el-table-column>
  88. <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
  89. <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
  90. <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
  91. <template slot-scope="scope">
  92. <el-button
  93. v-if="scope.row.fileName.endsWith('pdf')"
  94. size="mini"
  95. type="text"
  96. icon="el-icon-view"
  97. @click="handleSee(scope.row)"
  98. >{{ $t('预览') }}</el-button>
  99. <el-button
  100. size="mini"
  101. type="text"
  102. icon="el-icon-download"
  103. @click="handleDownload(scope.row)"
  104. >{{ $t('下载') }}</el-button>
  105. </template>
  106. </el-table-column>
  107. </el-table>
  108. <el-form v-if="detailFeedback != null">
  109. <h3 style="margin-top:30px;margin-bottom:20px;">导师反馈</h3>
  110. <el-form-item>
  111. <p v-html="detailFeedback" style="border:1px solid #DFE6EC; overflow:scroll; height:200px;"/>
  112. </el-form-item>
  113. </el-form>
  114. </div>
  115. </el-dialog>
  116. </div>
  117. </template>
  118. <script>
  119. import { getAnswer, addAnswer, updateAnswer, listAnswer } from "@/api/training/spec/answer";
  120. import { allFileList, delCommonfile } from "@/api/common/commonfile";
  121. import { addFeedback, getFeedbackByParams, listInvitedSuccessor, updateFeedback, listFeedback, getFeedbackByPlanId } from "@/api/training/spec/feedback";
  122. import { listMentors, getSuccessorBySuccessorId } from "@/api/training/spec/successor";
  123. import { listSuccessorsByMentorId, listPlanMonthly } from "@/api/training/spec/plan";
  124. import { getToken } from "@/utils/auth";
  125. import Treeselect from "@riophae/vue-treeselect";
  126. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  127. import Editor from '@/components/Editor';
  128. import { getStaffId, isMentor } from "@/api/plant/staffmgr";
  129. export default {
  130. name: "MonthlyFeedback",
  131. components: { Treeselect, Editor },
  132. data() {
  133. return {
  134. // 当前用户id
  135. staffId: null,
  136. // 是否为导师
  137. isMentor: null,
  138. // 首选标签页
  139. activeMonth: null,
  140. // 月份标签页
  141. monthTabs: [
  142. { key: "1", value: "1月" },
  143. { key: "2", value: "2月" },
  144. { key: "3", value: "3月" },
  145. { key: "4", value: "4月" },
  146. { key: "5", value: "5月" },
  147. { key: "6", value: "6月" },
  148. { key: "7", value: "7月" },
  149. { key: "8", value: "8月" },
  150. { key: "9", value: "9月" },
  151. { key: "10", value: "10月" },
  152. { key: "11", value: "11月" },
  153. { key: "12", value: "12月" }
  154. ],
  155. // 导师标签
  156. mentorTabs: [],
  157. // 详情对话框表格数据
  158. tableData: [],
  159. // 反馈id
  160. feedbackId: null,
  161. // 父级反馈id
  162. parentId: null,
  163. // 会议日期快捷选项
  164. pickerOptions: {
  165. shortcuts: [{
  166. text: '今天',
  167. onClick(picker) {
  168. picker.$emit('pick', new Date());
  169. }
  170. }, {
  171. text: '昨天',
  172. onClick(picker) {
  173. const date = new Date();
  174. date.setTime(date.getTime() - 3600 * 1000 * 24);
  175. picker.$emit('pick', date);
  176. }
  177. }, {
  178. text: '一周前',
  179. onClick(picker) {
  180. const date = new Date();
  181. date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
  182. picker.$emit('pick', date);
  183. }
  184. }, {
  185. text: '一周后',
  186. onClick(picker) {
  187. const date = new Date();
  188. date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
  189. picker.$emit('pick', date);
  190. }
  191. }]
  192. },
  193. // 会议日期
  194. meetingDate: null,
  195. // 学习状态字典
  196. studyStateOptions: [],
  197. // 汇报展示附件参数
  198. doc: { // 反馈附件
  199. file: "",
  200. // 是否显示弹出层(报告附件)
  201. open: false,
  202. // 弹出层标题(报告附件)
  203. title: "",
  204. // 是否禁用上传
  205. isUploading: false,
  206. // 是否更新已经存在的用户数据
  207. updateSupport: 0,
  208. // 报告附件上传位置编号
  209. ids: 0,
  210. // 设置上传的请求头部
  211. headers: { Authorization: "Bearer " + getToken() },
  212. // 上传的地址
  213. url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
  214. commonfileList: null,
  215. queryParams: {
  216. pId: null,
  217. pType: 'docSeasonal'
  218. },
  219. pType: 'docSeasonal',
  220. pId: null
  221. },
  222. // 培养计划总表数据
  223. dataList: [],
  224. // 首选标签页
  225. activeName: null,
  226. // 学员下拉列表
  227. successorOptions: [],
  228. // 导师下拉列表
  229. mentorOptions: [],
  230. // 导师数组
  231. mentorOptionsArray: [],
  232. // 包含导师id的查询对象
  233. queryObject: {
  234. mentorStaffId: ""
  235. },
  236. // 导师反馈内容
  237. mentorFeedback: "", // 季度反馈内容
  238. detailFeedback: "", // 计划详情反馈内容
  239. // 反馈对话框参数
  240. feedbackDialog: {
  241. id: 0,
  242. // 是否显示弹出层(报告附件)
  243. open: false,
  244. // 弹出层标题(报告附件)
  245. title: ""
  246. },
  247. // 问卷单选框
  248. radio1: '',
  249. radio2: '',
  250. radio3: '',
  251. radio4: '',
  252. radio5: '',
  253. radio6: '',
  254. radio7: '',
  255. radio8: '',
  256. radio9: '',
  257. radio10: '',
  258. radio11: '',
  259. radio12: '',
  260. radio13: '',
  261. radio14: '',
  262. // 报告附件参数
  263. doc: { // 季度汇报附件
  264. file: "",
  265. // 是否显示弹出层(报告附件)
  266. open: false,
  267. // 弹出层标题(报告附件)
  268. title: "",
  269. // 是否禁用上传
  270. isUploading: false,
  271. // 是否更新已经存在的用户数据
  272. updateSupport: 0,
  273. // 报告附件上传位置编号
  274. ids: 0,
  275. // 设置上传的请求头部
  276. headers: { Authorization: "Bearer " + getToken() },
  277. // 上传的地址
  278. url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
  279. commonfileList: null,
  280. queryParams: {
  281. pId: null,
  282. pType: 'plan'
  283. },
  284. pType: 'plan',
  285. pId: null
  286. },
  287. docFeedback: { // 反馈附件
  288. file: "",
  289. // 是否显示弹出层(报告附件)
  290. open: false,
  291. // 弹出层标题(报告附件)
  292. title: "",
  293. // 是否禁用上传
  294. isUploading: false,
  295. // 是否更新已经存在的用户数据
  296. updateSupport: 0,
  297. // 报告附件上传位置编号
  298. ids: 0,
  299. // 设置上传的请求头部
  300. headers: { Authorization: "Bearer " + getToken() },
  301. // 上传的地址
  302. url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
  303. commonfileList: null,
  304. queryParams: {
  305. pId: null,
  306. pType: 'docFeedback'
  307. },
  308. pType: 'docFeedback',
  309. pId: null
  310. },
  311. // 标签页选中项
  312. activeName: 'zhu',
  313. // 遮罩层
  314. loading: true,
  315. // 选中数组
  316. ids: [],
  317. // 非单个禁用
  318. single: true,
  319. // 非多个禁用
  320. multiple: true,
  321. // 显示搜索条件
  322. showSearch: true,
  323. // 总条数
  324. total: 0,
  325. // 专项培训反馈表格数据
  326. feedbackList: [],
  327. // 弹出层标题
  328. title: "",
  329. // 部门树选项
  330. deptOptions: undefined,
  331. clientHeight:300,
  332. // 是否显示弹出层
  333. open: false,
  334. // 用户导入参数
  335. upload: {
  336. // 是否显示弹出层(用户导入)
  337. open: false,
  338. // 弹出层标题(用户导入)
  339. title: "",
  340. // 是否禁用上传
  341. isUploading: false,
  342. // 是否更新已经存在的用户数据
  343. updateSupport: 0,
  344. // 设置上传的请求头部
  345. headers: { Authorization: "Bearer " + getToken() },
  346. // 上传的地址
  347. url: process.env.VUE_APP_BASE_API + "/spec/feedback/importData"
  348. },
  349. // 查询参数
  350. queryParams: {
  351. pageNum: 1,
  352. pageSize: 100,
  353. feedbackType: null,
  354. mentorId: null,
  355. successorId: null,
  356. successorName: null,
  357. parentId: null,
  358. planId: null,
  359. feedbackYear: null,
  360. feedbackYearTemp: null,
  361. feedbackSeason: null,
  362. feedbackMonth: null,
  363. successorFeedback: null,
  364. mentorFeedback: null,
  365. feedbackScore: null,
  366. feedbackStatus: null,
  367. meetingDate: null
  368. },
  369. // 表单参数
  370. form: {},
  371. // 表单校验
  372. rules: {
  373. }
  374. };
  375. },
  376. watch: {
  377. },
  378. created() {
  379. //设置表格高度对应屏幕高度
  380. this.$nextTick(() => {
  381. this.clientHeight = document.body.clientHeight -250
  382. })
  383. const staffId = this.$route.params && this.$route.params.staffId;
  384. this.queryParams.successorId = staffId;
  385. // 获取学习状态字典
  386. this.getDicts("st_study_state").then(response => {
  387. this.studyStateOptions = response.data;
  388. });
  389. // 初始化页面数据
  390. this.initPageData();
  391. },
  392. methods: {
  393. /** 标签页切换事件 */
  394. handleTabClick(tab) {
  395. this.queryParams.feedbackMonth = tab.name;
  396. this.getList();
  397. // 清空导师反馈内容
  398. this.mentorFeedback = "";
  399. // 根据月获取反馈id
  400. getFeedbackByParams({
  401. successorId: this.queryParams.successorId,
  402. feedbackYear: this.queryParams.feedbackYear,
  403. feedbackMonth: this.queryParams.feedbackMonth,
  404. }).then(response => {
  405. let data = response.data;
  406. // 设置反馈id为当前月反馈id
  407. this.feedbackId = data.id;
  408. // 刷新导师反馈内容
  409. this.mentorFeedback = data.mentorFeedback;
  410. });
  411. },
  412. /** 初始化页面数据 */
  413. initPageData() {
  414. // 获取当前日期
  415. let date = new Date();
  416. // 搜索条件默认为当年、当月
  417. this.queryParams.feedbackYear = date.getFullYear().toString();
  418. this.queryParams.feedbackYearTemp = date.getFullYear().toString();
  419. this.queryParams.feedbackMonth = ( date.getMonth() + 1 ).toString();
  420. this.activeMonth = ( date.getMonth() + 1 ).toString();
  421. // 获取当前用户id
  422. getStaffId().then(response => {
  423. this.staffId = response.data;
  424. // 判断当前用户是否为导师
  425. return isMentor();
  426. })
  427. .then(response => {
  428. this.isMentor = response.data;
  429. if (this.isMentor) { // 当前用户是导师
  430. // 获取当前导师的学员列表
  431. listSuccessorsByMentorId(this.queryObject).then(response => {
  432. let data = response.data;
  433. for (let i = 0; i < data.length; i++) {
  434. if (i == 0 && data.length != 0) {
  435. getSuccessorBySuccessorId(this.queryParams.successorId).then(response => {
  436. this.queryParams.mentorId = response.data.mentorId;
  437. });
  438. // 查询学习计划列表
  439. this.getList();
  440. }
  441. this.successorOptions.push( { key: data[i].staffId, value: data[i].staffName } );
  442. }
  443. if (data.length != 0) {
  444. // 获取当前学员当年当月反馈id
  445. getFeedbackByParams({
  446. successorId: this.queryParams.successorId,
  447. feedbackYear: this.queryParams.feedbackYear,
  448. feedbackMonth: this.queryParams.feedbackMonth
  449. }).then(response => {
  450. let data = response.data;
  451. this.feedbackId = data.id;
  452. this.mentorFeedback = data.mentorFeedback;
  453. });
  454. }else {
  455. this.loading = false;
  456. return;
  457. }
  458. });
  459. } else { // 当前用户是学员
  460. // 学员id = 当当前用户id
  461. this.queryParams.successorId = this.staffId;
  462. // 查询学习计划列表
  463. this.getList();
  464. // 获取当前学员当年当月反馈id
  465. getFeedbackByParams({
  466. successorId: this.queryParams.successorId,
  467. feedbackYear: this.queryParams.feedbackYear,
  468. feedbackMonth: this.queryParams.feedbackMonth
  469. }).then(response => {
  470. let data = response.data;
  471. this.feedbackId = data.id;
  472. this.mentorFeedback = data.mentorFeedback;
  473. });
  474. }
  475. });
  476. },
  477. /** 保存导师反馈内容 */
  478. saveMentorFeedback() {
  479. let feedback = {};
  480. feedback.id = this.feedbackId;
  481. feedback.mentorFeedback = this.mentorFeedback;
  482. updateFeedback(feedback);
  483. },
  484. /** 保存按钮处理 */
  485. handleSave() {
  486. // 保存导师反馈内容
  487. this.saveMentorFeedback();
  488. this.msgSuccess("保存成功");
  489. },
  490. /** 培养计划详情处理 */
  491. handleFeedback(row) {
  492. // 加载反馈附件
  493. this.docFeedback.id = row.id;
  494. this.docFeedback.queryParams.pId = row.id
  495. this.docFeedback.pId = row.id
  496. this.getFileListFeedback();
  497. // 清空导师反馈内容
  498. this.detailFeedback = null;
  499. // 清空表格数据
  500. this.tableData = [];
  501. let feedback1 = {};
  502. feedback1.planId = row.id;
  503. feedback1.questionId = 1;
  504. let feedback2 = {};
  505. feedback2.planId = row.id;
  506. feedback2.questionId = 2;
  507. let feedback3 = {};
  508. feedback3.planId = row.id;
  509. feedback3.questionId = 3;
  510. let answerObj1 = {};
  511. let answerObj2 = {};
  512. let answerObj3 = {};
  513. // 获取问题和答案
  514. getAnswer(feedback1).then(response => {
  515. let data = response.data;
  516. if (data != null) {
  517. answerObj1 = { id: 1, question: data.question, answer: data.answer};
  518. }
  519. return getAnswer(feedback2);
  520. }).then(response => {
  521. let data = response.data;
  522. if (data != null) {
  523. answerObj2 = { id: 2, question: data.question, answer: data.answer};
  524. }
  525. return getAnswer(feedback3);
  526. }).then(response => {
  527. let data = response.data;
  528. if (data != null) {
  529. answerObj3 = { id: 3, question: data.question, answer: data.answer};
  530. this.tableData.push(answerObj1);
  531. this.tableData.push(answerObj2);
  532. this.tableData.push(answerObj3);
  533. }
  534. // 获取导师反馈内容
  535. return getFeedbackByPlanId(row.id);
  536. }).then(response => {
  537. if (response.data != null) {
  538. let data = response.data;
  539. this.detailFeedback = data.mentorFeedback;
  540. }
  541. this.feedbackDialog.title = row.staffName + row.plantName + "学习情况详情";
  542. this.feedbackDialog.planId = row.id;
  543. this.feedbackDialog.studyState = row.studyState;
  544. this.feedbackDialog.open = true;
  545. });
  546. },
  547. /** 单元格样式 */
  548. tableCellStyle(row, column, rowIndex, columnIndex) {
  549. if (row.column.label === "实际完成日期" && row.row.dateOfCompletion > row.row.endDate) {
  550. return "background: #FFEEEE"
  551. }
  552. },
  553. /** 学习状态字典翻译 */
  554. studyStateFormat(row, column) {
  555. return this.selectDictLabel(this.studyStateOptions, row.studyState);
  556. },
  557. /** 文件下载处理 */
  558. handleDownload(row) {
  559. var name = row.fileName;
  560. var url = row.fileUrl;
  561. var suffix = url.substring(url.lastIndexOf("."), url.length);
  562. const a = document.createElement('a');
  563. a.setAttribute('download', name);
  564. a.setAttribute('target', '_blank');
  565. a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
  566. a.click();
  567. },
  568. openPdf() {
  569. window.open(this.pdf.pdfUrl);//path是文件的全路径地址
  570. },
  571. handleSee(row) {
  572. this.pdf.open = true;
  573. this.pdf.title = row.fileName;
  574. this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl;
  575. },
  576. /** 汇报附件参数初始化 */
  577. initFileList(id) {
  578. this.doc.queryParams.pId = id
  579. this.doc.pId = id
  580. this.getFileList()
  581. // this.$nextTick(() => {
  582. // this.$refs.doc.clearFiles()
  583. // })
  584. },
  585. getFileList() {
  586. allFileList(this.doc.queryParams).then(response => {
  587. this.doc.commonfileList = response;
  588. });
  589. },
  590. getFileListFeedback() {
  591. allFileList(this.docFeedback.queryParams).then(response => {
  592. this.docFeedback.commonfileList = response;
  593. });
  594. },
  595. /** 附件上传中处理 */
  596. handleFileDocProgress(event, file, fileList) {
  597. this.doc.file = file;
  598. this.doc.isUploading = true;
  599. },
  600. handleFileDocProgressFeedback(event, file, fileList) {
  601. this.docFeedback.file = file;
  602. this.docFeedback.isUploading = true;
  603. },
  604. /** 附件上传成功处理 */
  605. handleFileDocSuccess(response, file, fileList) {
  606. this.doc.isUploading = false;
  607. this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
  608. this.getFileList()
  609. },
  610. handleFileDocSuccessFeedback(response, file, fileList) {
  611. this.docMentorFeedback.isUploading = false;
  612. this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
  613. this.getFileListFeedback()
  614. },
  615. /** 删除按钮操作 */
  616. handleDeleteDoc(row) {
  617. const ids = row.id || this.ids;
  618. this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
  619. confirmButtonText: this.$t('确定'),
  620. cancelButtonText: this.$t('取消'),
  621. type: "warning"
  622. }).then(function() {
  623. return delCommonfile(ids);
  624. }).then(() => {
  625. this.getFileList()
  626. this.msgSuccess(this.$t('删除成功'));
  627. })
  628. },
  629. /** 查询专项培训反馈列表 */
  630. getList() {
  631. this.loading = true;
  632. listPlanMonthly(this.queryParams).then(response => {
  633. this.dataList = response.rows;
  634. this.total = response.total;
  635. this.loading = false;
  636. console.log(this.queryParams);
  637. });
  638. },
  639. // 取消按钮
  640. cancel() {
  641. this.open = false;
  642. this.reset();
  643. },
  644. // 表单重置
  645. reset() {
  646. this.form = {
  647. id: null,
  648. feedbackType: null,
  649. mentorId: null,
  650. successorId: null,
  651. successorName: null,
  652. parentId: null,
  653. planId: null,
  654. feedbackYear: null,
  655. feedbackSeason: null,
  656. feedbackMonth: null,
  657. successorFeedback: null,
  658. mentorFeedback: null,
  659. feedbackScore: null,
  660. feedbackStatus: 0,
  661. meetingDate: null
  662. };
  663. this.resetForm("form");
  664. },
  665. /** 搜索按钮操作 */
  666. handleQuery() {
  667. if (typeof(this.queryParams.feedbackYearTemp) == 'string') {
  668. this.queryParams.feedbackYear = this.queryParams.feedbackYearTemp;
  669. } else {
  670. this.queryParams.feedbackYear = this.queryParams.feedbackYearTemp.getFullYear();
  671. }
  672. this.queryParams.pageNum = 1;
  673. this.getList();
  674. // 清空导师反馈内容
  675. this.mentorFeedback = "";
  676. getFeedbackByParams({
  677. successorId: this.queryParams.successorId,
  678. feedbackYear: this.queryParams.feedbackYear,
  679. feedbackMonth: this.queryParams.feedbackMonth,
  680. }).then(response => {
  681. let data = response.data;
  682. this.feedbackId = data.id;
  683. this.mentorFeedback = data.mentorFeedback;
  684. });
  685. },
  686. /** 重置按钮操作 */
  687. resetQuery() {
  688. this.resetForm("queryForm");
  689. this.handleQuery();
  690. },
  691. // 多选框选中数据
  692. handleSelectionChange(selection) {
  693. this.ids = selection.map(item => item.id)
  694. this.single = selection.length!==1
  695. this.multiple = !selection.length
  696. },
  697. }
  698. };
  699. </script>
  700. <style scoped>
  701. .question{
  702. margin: 20px 0px;
  703. padding-left: 20px;
  704. }
  705. .answer{
  706. padding-bottom: 10px;
  707. padding-left: 40px;
  708. }
  709. h3{
  710. margin: 20px 0px;
  711. }
  712. </style>