index.vue 23 KB

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