index.vue 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297
  1. <template>
  2. <div class="app-container">
  3. <!-- 搜索栏 -->
  4. <el-form :inline="true" v-if="isMentor">
  5. <el-form-item label="会议日期">
  6. <el-date-picker
  7. size="small"
  8. v-model="meetingDate"
  9. align="right"
  10. type="date"
  11. placeholder="选择会议日期"
  12. :picker-options="pickerOptions"
  13. style="width:200px"
  14. >
  15. </el-date-picker>
  16. </el-form-item>
  17. <el-form-item label="参会导师">
  18. <el-select
  19. size="small"
  20. v-model="mentorOptionsArray"
  21. multiple
  22. placeholder="请选择导师"
  23. prop="mentorId"
  24. style="width:200px"
  25. >
  26. <el-option
  27. v-for="mentor in this.mentorOptions"
  28. :key="mentor.key"
  29. :label="mentor.value"
  30. :value="mentor.key">
  31. </el-option>
  32. </el-select>
  33. </el-form-item>
  34. <el-form-item>
  35. <el-button
  36. icon="el-icon-s-promotion"
  37. type="success"
  38. size="mini"
  39. @click="handleInvite"
  40. >
  41. 邀请
  42. </el-button>
  43. </el-form-item>
  44. </el-form>
  45. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
  46. <el-form-item label="学员" prop="successorId" v-if="isMentor">
  47. <el-select
  48. size="small"
  49. v-model="queryParams.successorId"
  50. placeholder="请选择学员"
  51. style="width:200px"
  52. >
  53. <el-option
  54. v-for="successor in this.successorOptions"
  55. :key="successor.key"
  56. :label="successor.value"
  57. :value="successor.key"
  58. ></el-option>
  59. </el-select>
  60. </el-form-item>
  61. <el-form-item label="年" prop="feedbackYear">
  62. <el-date-picker
  63. v-model="queryParams.feedbackYearTemp"
  64. placeholder="请选择年"
  65. clearable
  66. type="year"
  67. size="small"
  68. @keyup.enter.native="handleQuery"
  69. style="width:200px"
  70. />
  71. </el-form-item>
  72. <el-form-item label="季度" prop="feedbackSason">
  73. <el-select
  74. v-model="queryParams.feedbackSeason"
  75. placeholder="请选择季度"
  76. clearable
  77. size="small"
  78. @keyup.enter.native="handleQuery"
  79. style="width:200px"
  80. >
  81. <el-option label="第一季度" value="1"></el-option>
  82. <el-option label="第二季度" value="2"></el-option>
  83. <el-option label="第三季度" value="3"></el-option>
  84. <el-option label="第四季度" value="4"></el-option>
  85. </el-select>
  86. </el-form-item>
  87. <el-form-item>
  88. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  89. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  90. </el-form-item>
  91. </el-form>
  92. <!-- 标签页 -->
  93. <el-tabs type="border-card" @tab-click="handleTabClick" v-model="activeName">
  94. <el-tab-pane
  95. :key="item.name"
  96. v-for="(item) in mentorTabs"
  97. :label="item.title"
  98. :name="item.name"
  99. >
  100. <!-- 培养计划总表 -->
  101. <el-table
  102. v-loading="loading"
  103. :data="dataList"
  104. @selection-change="handleSelectionChange"
  105. ref="feedbackListSeasonalTable"
  106. border
  107. :cell-style="tableCellStyle"
  108. >
  109. <el-table-column label="培养内容" align="center" prop="plantName" width="600px"/>
  110. <el-table-column label="开始日期" align="center" prop="startDate"/>
  111. <el-table-column label="结束日期" align="center" prop="endDate"/>
  112. <el-table-column label="实际完成日期" align="center" prop="dateOfCompletion"/>
  113. <el-table-column label="学习状态" align="center" prop="studyState" :formatter="studyStateFormat"/>
  114. <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
  115. <template slot-scope="scope">
  116. <el-button
  117. size="mini"
  118. type="text"
  119. icon="el-icon-chat-dot-round"
  120. v-hasPermi="['spec:plan:edit']"
  121. @click="handleFeedback(scope.row)"
  122. >详情</el-button>
  123. </template>
  124. </el-table-column>
  125. </el-table>
  126. <!-- 汇报附件 -->
  127. <div>
  128. <h3>汇报展示PPT</h3>
  129. <el-upload
  130. v-if="!isMentor"
  131. ref="doc"
  132. :headers="doc.headers"
  133. class="upload-demo"
  134. :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
  135. :disabled="doc.isUploading"
  136. :on-progress="handleFileDocProgress"
  137. :on-success="handleFileDocSuccess"
  138. :auto-upload="true"
  139. multiple
  140. :limit="3">
  141. <el-button size="small" type="primary" style="margin-bottom:10px;">点击上传</el-button>
  142. </el-upload>
  143. <el-table :data="doc.commonfileList" border style="width:600px;">
  144. <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
  145. <template slot-scope="scope">
  146. <a class="link-type" @click="handleDownload(scope.row)">
  147. <span>{{ scope.row.fileName }}</span>
  148. </a>
  149. </template>
  150. </el-table-column>
  151. <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
  152. <template slot-scope="scope">
  153. <el-button
  154. v-if="scope.row.fileName.endsWith('pdf')"
  155. size="mini"
  156. type="text"
  157. icon="el-icon-view"
  158. @click="handleSee(scope.row)"
  159. >{{ $t('预览') }}</el-button>
  160. <el-button
  161. size="mini"
  162. type="text"
  163. icon="el-icon-download"
  164. @click="handleDownload(scope.row)"
  165. >{{ $t('下载') }}</el-button>
  166. <el-button
  167. v-if="!isMentor"
  168. size="mini"
  169. type="text"
  170. icon="el-icon-delete"
  171. @click="handleDeleteDoc(scope.row)"
  172. >{{ $t('删除') }}</el-button>
  173. </template>
  174. </el-table-column>
  175. </el-table>
  176. </div>
  177. <!-- 问卷 -->
  178. <div v-if="isMentor">
  179. <div style="display:inline-block;width:40%;">
  180. <h3 style="margin-bottom:0px;">学员表现</h3>
  181. <div class="question">
  182. 1. 学员的现场汇报精神面貌如何?
  183. </div>
  184. <div class="answer">
  185. <el-radio-group v-model="radio1" size="small">
  186. <el-radio label="1">优秀</el-radio>
  187. <el-radio label="2">良好</el-radio>
  188. <el-radio label="3">一般</el-radio>
  189. <el-radio label="4">基本合格</el-radio>
  190. </el-radio-group>
  191. </div>
  192. <div class="question">
  193. 2. 学员的现场汇报语言表达如何?
  194. </div>
  195. <div class="answer">
  196. <el-radio-group v-model="radio2" size="small">
  197. <el-radio label="1">优秀</el-radio>
  198. <el-radio label="2">良好</el-radio>
  199. <el-radio label="3">一般</el-radio>
  200. <el-radio label="4">基本合格</el-radio>
  201. </el-radio-group>
  202. </div>
  203. <div class="question">
  204. 3. 学员的现场汇报逻辑思维如何?
  205. </div>
  206. <div class="answer">
  207. <el-radio-group v-model="radio3" size="small">
  208. <el-radio label="1">优秀</el-radio>
  209. <el-radio label="2">良好</el-radio>
  210. <el-radio label="3">一般</el-radio>
  211. <el-radio label="4">基本合格</el-radio>
  212. </el-radio-group>
  213. </div>
  214. <h3 style="margin-bottom:0px;">汇报材料及内容</h3>
  215. <div class="question">
  216. 4. 汇报材料准备是否充分,汇报材料是否紧贴本季学习内容?
  217. </div>
  218. <div class="answer">
  219. <el-radio-group v-model="radio4" size="small">
  220. <el-radio label="1">充分</el-radio>
  221. <el-radio label="2">比较充分</el-radio>
  222. <el-radio label="3">一般</el-radio>
  223. <el-radio label="4">基本合格</el-radio>
  224. </el-radio-group>
  225. </div>
  226. <div class="question">
  227. 5. 汇报内容是否符合学习材料(SOP或者程序)的要求?
  228. </div>
  229. <div class="answer">
  230. <el-radio-group v-model="radio5" size="small">
  231. <el-radio label="1">完全符合</el-radio>
  232. <el-radio label="2">基本符合</el-radio>
  233. <el-radio label="3">一般</el-radio>
  234. <el-radio label="4">基本合格</el-radio>
  235. </el-radio-group>
  236. </div>
  237. <div class="question">
  238. 6. 学员对本季的学习内容、学习目标及学习结果的阐述是否具体、完整、准确?
  239. </div>
  240. <div class="answer">
  241. <el-radio-group v-model="radio6" size="small">
  242. <el-radio label="1">非常全面</el-radio>
  243. <el-radio label="2">全面</el-radio>
  244. <el-radio label="3">一般</el-radio>
  245. <el-radio label="4">基本合格</el-radio>
  246. </el-radio-group>
  247. </div>
  248. <div class="question">
  249. 7. 学员本季汇报内容较上次是否有所提升?
  250. </div>
  251. <div class="answer">
  252. <el-radio-group v-model="radio7" size="small">
  253. <el-radio label="1">进步明显</el-radio>
  254. <el-radio label="2">略有提升</el-radio>
  255. <el-radio label="3">一般</el-radio>
  256. <el-radio label="4">基本合格</el-radio>
  257. </el-radio-group>
  258. </div>
  259. </div>
  260. <div style="display:inline-block;width:40%;">
  261. <div class="question">
  262. 8. 汇报内容针对本季学习范围是否存在明显的汇报漏项或者不足?
  263. </div>
  264. <div class="answer">
  265. <el-radio-group v-model="radio8" size="small">
  266. <el-radio label="1">完全不存在</el-radio>
  267. <el-radio label="2">基本不存在</el-radio>
  268. <el-radio label="3">无明显存在</el-radio>
  269. <el-radio label="4">存在</el-radio>
  270. </el-radio-group>
  271. </div>
  272. <div class="question">
  273. 9. 学员的本季汇报内容是否结合岗位工作实际?
  274. </div>
  275. <div class="answer">
  276. <el-radio-group v-model="radio9" size="small">
  277. <el-radio label="1">紧密结合</el-radio>
  278. <el-radio label="2">结合</el-radio>
  279. <el-radio label="3">一般</el-radio>
  280. <el-radio label="4">基本合格</el-radio>
  281. </el-radio-group>
  282. </div>
  283. <div class="question">
  284. 10. 学员在实际工作中是否能够学有所用?
  285. </div>
  286. <div class="answer">
  287. <el-radio-group v-model="radio10" size="small">
  288. <el-radio label="1">灵活运用</el-radio>
  289. <el-radio label="2">基本运用</el-radio>
  290. <el-radio label="3">尝试运用</el-radio>
  291. <el-radio label="4">基本合格</el-radio>
  292. </el-radio-group>
  293. </div>
  294. <div class="question">
  295. 11. 汇报内容对目标岗位建设是否能起到启发促进作用?
  296. </div>
  297. <div class="answer">
  298. <el-radio-group v-model="radio11" size="small">
  299. <el-radio label="1">极有建设性</el-radio>
  300. <el-radio label="2">建设性</el-radio>
  301. <el-radio label="3">一般</el-radio>
  302. <el-radio label="4">基本合格</el-radio>
  303. </el-radio-group>
  304. </div>
  305. <div class="question">
  306. 12. 汇报内容对于装置及公司的人才培养计划是否能起到建设性促进作用?
  307. </div>
  308. <div class="answer">
  309. <el-radio-group v-model="radio12" size="small">
  310. <el-radio label="1">极有建设性</el-radio>
  311. <el-radio label="2">建设性</el-radio>
  312. <el-radio label="3">一般</el-radio>
  313. <el-radio label="4">基本合格</el-radio>
  314. </el-radio-group>
  315. </div>
  316. <div class="question">
  317. 13. 汇报内容是否有对装置生产、管理、建设提出合理化建议?
  318. </div>
  319. <div class="answer">
  320. <el-radio-group v-model="radio13" size="small">
  321. <el-radio label="1">有可采用的合理化建议</el-radio>
  322. <el-radio label="2">有可行性合理化建议</el-radio>
  323. <el-radio label="3">有合理化建议</el-radio>
  324. <el-radio label="4">无</el-radio>
  325. </el-radio-group>
  326. </div>
  327. <div class="question">
  328. 14. 汇报内容是否对下期培训提出新的培训需求?
  329. </div>
  330. <div class="answer">
  331. <el-radio-group v-model="radio14" size="small">
  332. <el-radio label="1">有计划外需求</el-radio>
  333. <el-radio label="2">有计划内需求</el-radio>
  334. <el-radio label="3">有需求</el-radio>
  335. <el-radio label="4">无具体需求</el-radio>
  336. </el-radio-group>
  337. </div>
  338. </div>
  339. </div>
  340. <!-- 导师反馈 -->
  341. <div>
  342. <h3>导师反馈</h3>
  343. <div v-if="showSaveButton && ( staffId == activeName )">
  344. <editor
  345. :min-height="300"
  346. v-model="mentorFeedback"
  347. />
  348. </div>
  349. <span
  350. v-if="!showSaveButton || ( staffId != activeName )"
  351. v-html="mentorFeedback"
  352. style="overflow:scroll; display:block; border:1px solid #CCCCCC; height: 300px; padding:15px;font-family: Helvetica, Arial, sans-serif; font-size: 13px;"
  353. >
  354. </span>
  355. </div>
  356. <!-- 保存按钮 -->
  357. <div style="text-align:center;margin: 20px auto;">
  358. <el-button
  359. size="medium"
  360. type="success"
  361. @click="handleSave"
  362. v-if="showSaveButton && ( staffId == activeName )"
  363. >
  364. 保存
  365. </el-button>
  366. </div>
  367. </el-tab-pane>
  368. </el-tabs>
  369. <!-- 详情对话框 -->
  370. <el-dialog v-dialogDrag :title="feedbackDialog.title" :visible.sync="feedbackDialog.open" width="800px" append-to-body>
  371. <div style="width:700px; margin:0px auto;">
  372. <h3 style="margin-bottom:20px;">学员心得</h3>
  373. <el-table :data="tableData" border style="width: 100%">
  374. <el-table-column prop="id" label="编号" width="50"></el-table-column>
  375. <el-table-column prop="question" label="问题" width="250"></el-table-column>
  376. <el-table-column prop="answer" label="答案"></el-table-column>
  377. </el-table>
  378. <el-table :data="docFeedback.commonfileList" border>
  379. <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
  380. <template slot-scope="scope">
  381. <a class="link-type" @click="handleDownload(scope.row)">
  382. <span>{{ scope.row.fileName }}</span>
  383. </a>
  384. </template>
  385. </el-table-column>
  386. <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
  387. <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
  388. <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
  389. <template slot-scope="scope">
  390. <el-button
  391. v-if="scope.row.fileName.endsWith('pdf')"
  392. size="mini"
  393. type="text"
  394. icon="el-icon-view"
  395. @click="handleSee(scope.row)"
  396. >{{ $t('预览') }}</el-button>
  397. <el-button
  398. size="mini"
  399. type="text"
  400. icon="el-icon-download"
  401. @click="handleDownload(scope.row)"
  402. >{{ $t('下载') }}</el-button>
  403. </template>
  404. </el-table-column>
  405. </el-table>
  406. <el-form v-if="detailFeedback != null">
  407. <h3 style="margin-top:30px;margin-bottom:20px;">导师反馈</h3>
  408. <el-form-item>
  409. <p v-html="detailFeedback" style="border:1px solid #DFE6EC; overflow:scroll; height:200px;"/>
  410. </el-form-item>
  411. </el-form>
  412. </div>
  413. </el-dialog>
  414. </div>
  415. </template>
  416. <script>
  417. import { getAnswer, addAnswer, updateAnswer, listAnswer } from "@/api/training/spec/answer";
  418. import { allFileList, delCommonfile } from "@/api/common/commonfile";
  419. import { addFeedback, getFeedbackByParams, listInvitedSuccessor, updateFeedback, listFeedback, getFeedbackByPlanId } from "@/api/training/spec/feedback";
  420. import { listMentors } from "@/api/training/spec/successor";
  421. import { listSuccessorsByMentorId, listPlanSeasonal } from "@/api/training/spec/plan";
  422. import { getToken } from "@/utils/auth";
  423. import Treeselect from "@riophae/vue-treeselect";
  424. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  425. import Editor from '@/components/Editor';
  426. import { listMentors2, getStaffId, isMentor } from "@/api/plant/staffmgr";
  427. export default {
  428. name: "SeasonalFeedback",
  429. components: { Treeselect, Editor },
  430. data() {
  431. return {
  432. // 父级反馈导师id
  433. mentorId: null,
  434. // 是否为第一次搜索
  435. isFirstSearch: true,
  436. // 当前用户id
  437. staffId: null,
  438. // 是否为导师
  439. isMentor: null,
  440. // 显示保存按钮
  441. showSaveButton: false,
  442. // 导师标签
  443. mentorTabs: [],
  444. // 详情对话框表格数据
  445. tableData: [],
  446. // 反馈id
  447. feedbackId: null,
  448. // 父级反馈id
  449. parentId: null,
  450. // 会议日期快捷选项
  451. pickerOptions: {
  452. shortcuts: [{
  453. text: '今天',
  454. onClick(picker) {
  455. picker.$emit('pick', new Date());
  456. }
  457. }, {
  458. text: '昨天',
  459. onClick(picker) {
  460. const date = new Date();
  461. date.setTime(date.getTime() - 3600 * 1000 * 24);
  462. picker.$emit('pick', date);
  463. }
  464. }, {
  465. text: '一周前',
  466. onClick(picker) {
  467. const date = new Date();
  468. date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
  469. picker.$emit('pick', date);
  470. }
  471. }, {
  472. text: '一周后',
  473. onClick(picker) {
  474. const date = new Date();
  475. date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
  476. picker.$emit('pick', date);
  477. }
  478. }]
  479. },
  480. // 会议日期
  481. meetingDate: null,
  482. // 学习状态字典
  483. studyStateOptions: [],
  484. // 汇报展示附件参数
  485. doc: { // 反馈附件
  486. file: "",
  487. // 是否显示弹出层(报告附件)
  488. open: false,
  489. // 弹出层标题(报告附件)
  490. title: "",
  491. // 是否禁用上传
  492. isUploading: false,
  493. // 是否更新已经存在的用户数据
  494. updateSupport: 0,
  495. // 报告附件上传位置编号
  496. ids: 0,
  497. // 设置上传的请求头部
  498. headers: { Authorization: "Bearer " + getToken() },
  499. // 上传的地址
  500. url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
  501. commonfileList: null,
  502. queryParams: {
  503. pId: null,
  504. pType: 'docSeasonal'
  505. },
  506. pType: 'docSeasonal',
  507. pId: null
  508. },
  509. // 培养计划总表数据
  510. dataList: [],
  511. // 首选标签页
  512. activeName: null,
  513. // 学员下拉列表
  514. successorOptions: [],
  515. // 导师下拉列表
  516. mentorOptions: [],
  517. // 导师数组
  518. mentorOptionsArray: [],
  519. // 包含导师id的查询对象
  520. queryObject: {
  521. mentorStaffId: ""
  522. },
  523. // 导师反馈内容
  524. mentorFeedback: null, // 季度反馈内容
  525. detailFeedback: null, // 计划详情反馈内容
  526. // 反馈对话框参数
  527. feedbackDialog: {
  528. id: 0,
  529. // 是否显示弹出层(报告附件)
  530. open: false,
  531. // 弹出层标题(报告附件)
  532. title: ""
  533. },
  534. // 问卷单选框
  535. radio1: '',
  536. radio2: '',
  537. radio3: '',
  538. radio4: '',
  539. radio5: '',
  540. radio6: '',
  541. radio7: '',
  542. radio8: '',
  543. radio9: '',
  544. radio10: '',
  545. radio11: '',
  546. radio12: '',
  547. radio13: '',
  548. radio14: '',
  549. // 报告附件参数
  550. doc: { // 季度汇报附件
  551. file: "",
  552. // 是否显示弹出层(报告附件)
  553. open: false,
  554. // 弹出层标题(报告附件)
  555. title: "",
  556. // 是否禁用上传
  557. isUploading: false,
  558. // 是否更新已经存在的用户数据
  559. updateSupport: 0,
  560. // 报告附件上传位置编号
  561. ids: 0,
  562. // 设置上传的请求头部
  563. headers: { Authorization: "Bearer " + getToken() },
  564. // 上传的地址
  565. url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
  566. commonfileList: null,
  567. queryParams: {
  568. pId: null,
  569. pType: 'plan'
  570. },
  571. pType: 'plan',
  572. pId: null
  573. },
  574. docFeedback: { // 反馈附件
  575. file: "",
  576. // 是否显示弹出层(报告附件)
  577. open: false,
  578. // 弹出层标题(报告附件)
  579. title: "",
  580. // 是否禁用上传
  581. isUploading: false,
  582. // 是否更新已经存在的用户数据
  583. updateSupport: 0,
  584. // 报告附件上传位置编号
  585. ids: 0,
  586. // 设置上传的请求头部
  587. headers: { Authorization: "Bearer " + getToken() },
  588. // 上传的地址
  589. url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
  590. commonfileList: null,
  591. queryParams: {
  592. pId: null,
  593. pType: 'docFeedback'
  594. },
  595. pType: 'docFeedback',
  596. pId: null
  597. },
  598. // 标签页选中项
  599. activeName: 'zhu',
  600. // 遮罩层
  601. loading: true,
  602. // 选中数组
  603. ids: [],
  604. // 非单个禁用
  605. single: true,
  606. // 非多个禁用
  607. multiple: true,
  608. // 显示搜索条件
  609. showSearch: true,
  610. // 总条数
  611. total: 0,
  612. // 专项培训反馈表格数据
  613. feedbackList: [],
  614. // 弹出层标题
  615. title: "",
  616. // 部门树选项
  617. deptOptions: undefined,
  618. clientHeight:300,
  619. // 是否显示弹出层
  620. open: false,
  621. // 用户导入参数
  622. upload: {
  623. // 是否显示弹出层(用户导入)
  624. open: false,
  625. // 弹出层标题(用户导入)
  626. title: "",
  627. // 是否禁用上传
  628. isUploading: false,
  629. // 是否更新已经存在的用户数据
  630. updateSupport: 0,
  631. // 设置上传的请求头部
  632. headers: { Authorization: "Bearer " + getToken() },
  633. // 上传的地址
  634. url: process.env.VUE_APP_BASE_API + "/spec/feedback/importData"
  635. },
  636. // 查询参数
  637. queryParams: {
  638. pageNum: 1,
  639. pageSize: 100,
  640. feedbackType: null,
  641. mentorId: null,
  642. successorId: null,
  643. successorName: null,
  644. parentId: null,
  645. planId: null,
  646. feedbackYear: null,
  647. feedbackYearTemp: null,
  648. feedbackSeason: null,
  649. feedbackMonth: null,
  650. successorFeedback: null,
  651. mentorFeedback: null,
  652. feedbackScore: null,
  653. feedbackStatus: null,
  654. meetingDate: null
  655. },
  656. // 表单参数
  657. form: {},
  658. // 表单校验
  659. rules: {
  660. }
  661. };
  662. },
  663. watch: {
  664. },
  665. created() {
  666. //设置表格高度对应屏幕高度
  667. this.$nextTick(() => {
  668. this.clientHeight = document.body.clientHeight -250
  669. })
  670. // 获取学习状态字典
  671. this.getDicts("st_study_state").then(response => {
  672. this.studyStateOptions = response.data;
  673. });
  674. // 初始化页面数据
  675. this.initPageData();
  676. },
  677. methods: {
  678. /** 设置最后截止日期 */
  679. resetLastDay() {
  680. // 最后截止日期
  681. let lastDay = new Date(this.meetingDate);
  682. lastDay.setTime(lastDay.getTime() + 3600 * 1000 * 24 * 7);
  683. // 当前日期
  684. let now = new Date();
  685. if (lastDay > now) {
  686. // 导师可修改反馈内容
  687. this.showSaveButton = true;
  688. // 学员可查看导师反馈内容
  689. } else {
  690. // 导师不可修改反馈内容
  691. this.showSaveButton = false;
  692. // 学员不可查看导师反馈内容
  693. }
  694. },
  695. /** 标签页切换事件 */
  696. handleTabClick(tab) {
  697. this.activeName = tab.name;
  698. if (this.isMentor) {
  699. // 清空问卷
  700. this.radio1 = null;
  701. this.radio2 = null;
  702. this.radio3 = null;
  703. this.radio4 = null;
  704. this.radio5 = null;
  705. this.radio6 = null;
  706. this.radio7 = null;
  707. this.radio8 = null;
  708. this.radio9 = null;
  709. this.radio10 = null;
  710. this.radio11 = null;
  711. this.radio12 = null;
  712. this.radio13 = null;
  713. this.radio14 = null;
  714. }
  715. // 清空导师反馈内容
  716. this.mentorFeedback = null;
  717. // 查询参数
  718. let feedback = {};
  719. feedback.mentorId = tab.name;
  720. feedback.successorId = this.queryParams.successorId;
  721. feedback.feedbackYear = this.queryParams.feedbackYear;
  722. feedback.feedbackSeason = this.queryParams.feedbackSeason;
  723. if (this.isMentor && this.staffId != tab.name) {
  724. feedback.parentId = this.parentId;
  725. }
  726. // 根据标签页导师id获取反馈id
  727. getFeedbackByParams(feedback).then(response => {
  728. let data = response.data;
  729. // 设置反馈id为当前tab导师反馈id
  730. this.feedbackId = data.id;
  731. // 刷新导师反馈内容
  732. this.mentorFeedback = data.mentorFeedback;
  733. if (this.isMentor) {
  734. // 刷新问卷
  735. listAnswer( { feedbackId: this.feedbackId } ).then(response => {
  736. let data = response.rows;
  737. for (let i = 0; i < data.length; i++) {
  738. if (data[i].questionId == "4") { this.radio1 = data[i].answer; }
  739. if (data[i].questionId == "5") { this.radio2 = data[i].answer; }
  740. if (data[i].questionId == "6") { this.radio3 = data[i].answer; }
  741. if (data[i].questionId == "7") { this.radio4 = data[i].answer; }
  742. if (data[i].questionId == "8") { this.radio5 = data[i].answer; }
  743. if (data[i].questionId == "9") { this.radio6 = data[i].answer; }
  744. if (data[i].questionId == "10") { this.radio7 = data[i].answer; }
  745. if (data[i].questionId == "11") { this.radio8 = data[i].answer; }
  746. if (data[i].questionId == "12") { this.radio9 = data[i].answer; }
  747. if (data[i].questionId == "13") { this.radio10 = data[i].answer; }
  748. if (data[i].questionId == "14") { this.radio11 = data[i].answer; }
  749. if (data[i].questionId == "15") { this.radio12 = data[i].answer; }
  750. if (data[i].questionId == "16") { this.radio13 = data[i].answer; }
  751. if (data[i].questionId == "17") { this.radio14 = data[i].answer; }
  752. }
  753. window.scrollTo(0, 0);
  754. });
  755. }
  756. });
  757. },
  758. /** 初始化页面数据 */
  759. initPageData() {
  760. // 获取当前日期
  761. let date = new Date();
  762. // 搜索条件默认为当年、当季度
  763. this.queryParams.feedbackYear = date.getFullYear().toString();
  764. this.queryParams.feedbackYearTemp = date.getFullYear().toString();
  765. this.queryParams.feedbackSeason = ( ( date.getMonth() + 2 ) / 3 ).toString();
  766. // 获取当前用户id
  767. getStaffId().then(response => {
  768. this.staffId = response.data;
  769. // 判断当前用户是否为导师
  770. return isMentor();
  771. })
  772. .then(response => {
  773. this.isMentor = response.data;
  774. if (this.isMentor) { // 当前用户是导师
  775. // ====================获取导师下拉列表====================
  776. listMentors2().then(response => {
  777. let mentorList = response.data;
  778. for (let i = 0; i < mentorList.length; i++) {
  779. let mentor = {};
  780. mentor.key = mentorList[i].staffid;
  781. mentor.value = mentorList[i].name;
  782. this.mentorOptions.push(mentor);
  783. }
  784. });
  785. // ====================获取当前导师的学员列表====================
  786. listSuccessorsByMentorId(this.queryObject).then(response => {
  787. let data = response.data;
  788. for (let i = 0; i < data.length; i++) {
  789. if (i == 0) {
  790. // 默认选中列表中第一个学员
  791. this.queryParams.successorId = data[i].staffId;
  792. this.getList();
  793. }
  794. this.successorOptions.push( { key: data[i].staffId, value: data[i].staffName } );
  795. }
  796. // 获取当前学员当年当季度反馈id
  797. getFeedbackByParams({
  798. successorId: this.queryParams.successorId,
  799. feedbackYear: this.queryParams.feedbackYear,
  800. feedbackSeason: this.queryParams.feedbackSeason
  801. }).then(response => {
  802. let data = response.data;
  803. this.feedbackId = data.id;
  804. this.mentorId = data.id;
  805. this.parentId = data.id;
  806. this.meetingDate = data.meetingDate;
  807. this.resetLastDay();
  808. this.mentorFeedback = data.mentorFeedback;
  809. // 初始化汇报附件
  810. this.initFileList(data.id);
  811. // ====================初始化导师标签页====================
  812. this.activeName = data.mentorId;
  813. this.mentorTabs.push({ name: data.mentorId, title: data.mentorName});
  814. listFeedback( { parentId: data.id } ).then(response => {
  815. let data = response.rows;
  816. for (let i = 0; i < data.length; i++) {
  817. this.mentorTabs.push({ name: data[i].mentorId, title: data[i].mentorName});
  818. }
  819. });
  820. // ====================获取问卷答案====================
  821. listAnswer( { feedbackId: this.feedbackId } ).then(response => {
  822. let data = response.rows;
  823. for (let i = 0; i < data.length; i++) {
  824. if (data[i].questionId == "4") { this.radio1 = data[i].answer; }
  825. if (data[i].questionId == "5") { this.radio2 = data[i].answer; }
  826. if (data[i].questionId == "6") { this.radio3 = data[i].answer; }
  827. if (data[i].questionId == "7") { this.radio4 = data[i].answer; }
  828. if (data[i].questionId == "8") { this.radio5 = data[i].answer; }
  829. if (data[i].questionId == "9") { this.radio6 = data[i].answer; }
  830. if (data[i].questionId == "10") { this.radio7 = data[i].answer; }
  831. if (data[i].questionId == "11") { this.radio8 = data[i].answer; }
  832. if (data[i].questionId == "12") { this.radio9 = data[i].answer; }
  833. if (data[i].questionId == "13") { this.radio10 = data[i].answer; }
  834. if (data[i].questionId == "14") { this.radio11 = data[i].answer; }
  835. if (data[i].questionId == "15") { this.radio12 = data[i].answer; }
  836. if (data[i].questionId == "16") { this.radio13 = data[i].answer; }
  837. if (data[i].questionId == "17") { this.radio14 = data[i].answer; }
  838. }
  839. window.scrollTo(0, 0);
  840. });
  841. });
  842. });
  843. // ====================获取当前导师作为受邀导师的学员列表====================
  844. listInvitedSuccessor(null).then(response => {
  845. let data = response.data;
  846. for (let i = 0; i < data.length; i++) {
  847. this.successorOptions.push( { key: data[i].successorId, value: data[i].successorName } );
  848. }
  849. });
  850. } else { // 当前用户是学员
  851. this.queryParams.successorId = this.staffId;
  852. this.getList();
  853. // 获取当前学员当年当季度反馈id
  854. getFeedbackByParams({
  855. successorId: this.queryParams.successorId,
  856. feedbackYear: this.queryParams.feedbackYear,
  857. feedbackSeason: this.queryParams.feedbackSeason
  858. }).then(response => {
  859. let data = response.data;
  860. this.feedbackId = data.id;
  861. this.parentId = data.id;
  862. this.meetingDate = data.meetingDate;
  863. this.resetLastDay();
  864. this.mentorFeedback = data.mentorFeedback;
  865. // 初始化汇报附件
  866. this.initFileList(data.id);
  867. // ====================初始化导师标签页====================
  868. this.activeName = data.mentorId;
  869. this.mentorTabs.push({ name: data.mentorId, title: data.mentorName});
  870. listFeedback( { parentId: data.id } ).then(response => {
  871. let data = response.rows;
  872. for (let i = 0; i < data.length; i++) {
  873. this.mentorTabs.push({ name: data[i].mentorId, title: data[i].mentorName});
  874. }
  875. });
  876. });
  877. }
  878. });
  879. },
  880. /** 问卷判空 */
  881. isEmpty() {
  882. let radioArray = [ this.radio1, this.radio2, this.radio3, this.radio4, this.radio5, this.radio6, this.radio7, this.radio8, this.radio9, this.radio10, this.radio11, this.radio12, this.radio13, this.radio14 ];
  883. let isEmpty = false;
  884. for (let i = 0; i < radioArray.length; i++) {
  885. if (radioArray[i] == "") {
  886. isEmpty = true;
  887. }
  888. }
  889. return isEmpty;
  890. },
  891. /** 计算导师评分 */
  892. calcFeedbackScore() {
  893. let mentorFeedbackScore = 0; // 本导师评分
  894. let invitedMentorFeedbackScoreSum = 0; // 受邀导师总分
  895. let invitedMentorFeedbackScoreAvg = 0; // 受邀导师平均分
  896. let invitedMentors = 0; // 受邀导师人数
  897. let overallScore = 0; // 季度平均分
  898. let feedbackId = null; // 本导师反馈id
  899. // 获取问题答案列表
  900. listAnswer( { feedbackId: this.feedbackId } )
  901. .then(response => {
  902. let data = response.rows;
  903. // 计算导师评分
  904. let total = 0; // 总分
  905. for (let i = 0; i < data.length; i++) {
  906. if(data[i].answer == "1") {
  907. total += 100;
  908. }
  909. }
  910. let avg = total / 14; // 平均分
  911. // 更新当前导师评分
  912. return updateFeedback( { id: this.feedbackId, feedbackScore: avg } );
  913. })
  914. .then(() => {
  915. // 获取本导师反馈
  916. return getFeedbackByParams({
  917. successorId: this.queryParams.successorId,
  918. feedbackYear: this.queryParams.feedbackYear,
  919. feedbackSeason: this.queryParams.feedbackSeason
  920. })
  921. })
  922. .then(response => {
  923. // 设置本导师反馈id
  924. feedbackId = response.data.id;
  925. // 设置导师评分
  926. mentorFeedbackScore = response.data.feedbackScore;
  927. // 获取受邀导师列表
  928. return listFeedback( { parentId: feedbackId } );
  929. })
  930. .then(response => {
  931. let data = response.rows;
  932. for (let i = 0; i < data.length; i++) {
  933. if (data[i].feedbackScore != null) {
  934. invitedMentorFeedbackScoreSum += Number(data[i].feedbackScore);
  935. invitedMentors += 1;
  936. }
  937. }
  938. // 受邀导师平均分 = 总分 / 人数
  939. invitedMentorFeedbackScoreAvg = invitedMentorFeedbackScoreSum / invitedMentors;
  940. // 季度平均分 = 本导师评分 * 60% + 受邀导师平均分 * 40%
  941. overallScore = mentorFeedbackScore * 0.6 + invitedMentorFeedbackScoreAvg * 0.4;
  942. // 更新季度平均分
  943. updateFeedback({ id: feedbackId, overallScore: overallScore });
  944. });
  945. },
  946. /** 保存反馈问题 */
  947. saveAnswer(questionId, answer) {
  948. let answerObj = {};
  949. answerObj.feedbackId = this.feedbackId;
  950. answerObj.questionId = questionId;
  951. getAnswer(answerObj).then(response => {
  952. let data = response.data;
  953. answerObj.answer = answer;
  954. if (data != null) {
  955. if (response.answer == data.answer) { // 答案一致
  956. return;
  957. } else { // 答案不一致
  958. answerObj.id = data.id;
  959. updateAnswer(answerObj).then(response => {
  960. // 计算导师评分
  961. this.calcFeedbackScore();
  962. });
  963. }
  964. } else {
  965. addAnswer(answerObj).then(response => {
  966. // 计算导师评分
  967. this.calcFeedbackScore();
  968. });
  969. }
  970. });
  971. },
  972. /** 保存导师反馈内容 */
  973. saveMentorFeedback() {
  974. let feedback = {};
  975. feedback.id = this.feedbackId;
  976. feedback.mentorFeedback = this.mentorFeedback;
  977. updateFeedback(feedback);
  978. },
  979. /** 保存按钮处理 */
  980. handleSave() {
  981. // 问卷判空
  982. if (this.isEmpty()) {
  983. this.$message.error('问卷答案不能为空')
  984. return;
  985. }
  986. let radioArray = [ this.radio1, this.radio2, this.radio3, this.radio4, this.radio5, this.radio6, this.radio7, this.radio8, this.radio9, this.radio10, this.radio11, this.radio12, this.radio13, this.radio14 ];
  987. let questionArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
  988. // 保存问卷内容
  989. for (let i = 0; i < radioArray.length; i++) {
  990. this.saveAnswer(questionArray[i]+3, radioArray[i]);
  991. }
  992. // 保存导师反馈内容
  993. this.saveMentorFeedback();
  994. this.msgSuccess("保存成功");
  995. },
  996. /** 培养计划详情处理 */
  997. handleFeedback(row) {
  998. // 加载反馈附件
  999. this.docFeedback.id = row.id;
  1000. this.docFeedback.queryParams.pId = row.id
  1001. this.docFeedback.pId = row.id
  1002. this.getFileListFeedback();
  1003. // 清空导师反馈内容
  1004. this.detailFeedback = null;
  1005. // 清空表格数据
  1006. this.tableData = [];
  1007. let feedback1 = {};
  1008. feedback1.planId = row.id;
  1009. feedback1.questionId = 1;
  1010. let feedback2 = {};
  1011. feedback2.planId = row.id;
  1012. feedback2.questionId = 2;
  1013. let feedback3 = {};
  1014. feedback3.planId = row.id;
  1015. feedback3.questionId = 3;
  1016. let answerObj1 = {};
  1017. let answerObj2 = {};
  1018. let answerObj3 = {};
  1019. // 获取问题和答案
  1020. getAnswer(feedback1).then(response => {
  1021. let data = response.data;
  1022. if (data != null) {
  1023. answerObj1 = { id: 1, question: data.question, answer: data.answer};
  1024. }
  1025. return getAnswer(feedback2);
  1026. }).then(response => {
  1027. let data = response.data;
  1028. if (data != null) {
  1029. answerObj2 = { id: 2, question: data.question, answer: data.answer};
  1030. }
  1031. return getAnswer(feedback3);
  1032. }).then(response => {
  1033. let data = response.data;
  1034. if (data != null) {
  1035. answerObj3 = { id: 3, question: data.question, answer: data.answer};
  1036. this.tableData.push(answerObj1);
  1037. this.tableData.push(answerObj2);
  1038. this.tableData.push(answerObj3);
  1039. }
  1040. // 获取导师反馈内容
  1041. return getFeedbackByPlanId(row.id);
  1042. }).then(response => {
  1043. if (response.data != null) {
  1044. let data = response.data;
  1045. this.detailFeedback = data.mentorFeedback;
  1046. }
  1047. this.feedbackDialog.title = row.staffName + row.plantName + "学习情况详情";
  1048. this.feedbackDialog.planId = row.id;
  1049. this.feedbackDialog.studyState = row.studyState;
  1050. this.feedbackDialog.open = true;
  1051. });
  1052. },
  1053. /** 单元格样式 */
  1054. tableCellStyle(row, column, rowIndex, columnIndex) {
  1055. if (row.column.label === "实际完成日期" && row.row.dateOfCompletion > row.row.endDate) {
  1056. return "background: #FFEEEE"
  1057. }
  1058. },
  1059. /** 学习状态字典翻译 */
  1060. studyStateFormat(row, column) {
  1061. return this.selectDictLabel(this.studyStateOptions, row.studyState);
  1062. },
  1063. /** 文件下载处理 */
  1064. handleDownload(row) {
  1065. var name = row.fileName;
  1066. var url = row.fileUrl;
  1067. var suffix = url.substring(url.lastIndexOf("."), url.length);
  1068. const a = document.createElement('a');
  1069. a.setAttribute('download', name);
  1070. a.setAttribute('target', '_blank');
  1071. a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
  1072. a.click();
  1073. },
  1074. openPdf() {
  1075. window.open(this.pdf.pdfUrl);//path是文件的全路径地址
  1076. },
  1077. handleSee(row) {
  1078. this.pdf.open = true;
  1079. this.pdf.title = row.fileName;
  1080. this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl;
  1081. },
  1082. /** 汇报附件参数初始化 */
  1083. initFileList(id) {
  1084. this.doc.queryParams.pId = id
  1085. this.doc.pId = id
  1086. this.getFileList()
  1087. // this.$nextTick(() => {
  1088. // this.$refs.doc.clearFiles()
  1089. // })
  1090. },
  1091. getFileList() {
  1092. allFileList(this.doc.queryParams).then(response => {
  1093. this.doc.commonfileList = response;
  1094. });
  1095. },
  1096. getFileListFeedback() {
  1097. allFileList(this.docFeedback.queryParams).then(response => {
  1098. this.docFeedback.commonfileList = response;
  1099. });
  1100. },
  1101. /** 附件上传中处理 */
  1102. handleFileDocProgress(event, file, fileList) {
  1103. this.doc.file = file;
  1104. this.doc.isUploading = true;
  1105. },
  1106. handleFileDocProgressFeedback(event, file, fileList) {
  1107. this.docFeedback.file = file;
  1108. this.docFeedback.isUploading = true;
  1109. },
  1110. /** 附件上传成功处理 */
  1111. handleFileDocSuccess(response, file, fileList) {
  1112. this.doc.isUploading = false;
  1113. this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
  1114. this.getFileList()
  1115. },
  1116. handleFileDocSuccessFeedback(response, file, fileList) {
  1117. this.docMentorFeedback.isUploading = false;
  1118. this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
  1119. this.getFileListFeedback()
  1120. },
  1121. /** 删除按钮操作 */
  1122. handleDeleteDoc(row) {
  1123. const ids = row.id || this.ids;
  1124. this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
  1125. confirmButtonText: this.$t('确定'),
  1126. cancelButtonText: this.$t('取消'),
  1127. type: "warning"
  1128. }).then(function() {
  1129. return delCommonfile(ids);
  1130. }).then(() => {
  1131. this.getFileList()
  1132. this.msgSuccess(this.$t('删除成功'));
  1133. })
  1134. },
  1135. /** 邀请导师 */
  1136. handleInvite() {
  1137. let updateParams = {};
  1138. updateParams.id = this.feedbackId;
  1139. let date = new Date(this.meetingDate);
  1140. date.setTime( date.getTime() + 3600 * 1000 * 24 );
  1141. updateParams.meetingDate = date;
  1142. updateParams.id = this.parentId;
  1143. // 修改会议日期
  1144. updateFeedback(updateParams);
  1145. for (let i = 0; i < this.mentorOptionsArray.length; i++) {
  1146. let feedback = {};
  1147. feedback.parentId = this.feedbackId; // 设置父级id
  1148. feedback.feedbackYear = this.queryParams.feedbackYear;
  1149. feedback.feedbackSeason = this.queryParams.feedbackSeason;
  1150. feedback.feedbackType = 3;
  1151. feedback.mentorId = this.mentorOptionsArray[i];
  1152. feedback.successorId = this.queryParams.successorId;
  1153. getFeedbackByParams(feedback).then(response => {
  1154. let data = response.data;
  1155. if (data == null) {
  1156. // 新增受邀导师反馈记录
  1157. addFeedback(feedback);
  1158. }
  1159. });
  1160. // 发送邮件提醒受邀导师
  1161. }
  1162. // 刷新标签列表
  1163. this.msgSuccess("邀请成功,邮件已发送");
  1164. },
  1165. /** 查询专项培训反馈列表 */
  1166. getList() {
  1167. this.loading = true;
  1168. listPlanSeasonal(this.queryParams).then(response => {
  1169. this.dataList = response.rows;
  1170. this.total = response.total;
  1171. this.loading = false;
  1172. });
  1173. },
  1174. // 取消按钮
  1175. cancel() {
  1176. this.open = false;
  1177. this.reset();
  1178. },
  1179. // 表单重置
  1180. reset() {
  1181. this.form = {
  1182. id: null,
  1183. feedbackType: null,
  1184. mentorId: null,
  1185. successorId: null,
  1186. successorName: null,
  1187. parentId: null,
  1188. planId: null,
  1189. feedbackYear: null,
  1190. feedbackSeason: null,
  1191. feedbackMonth: null,
  1192. successorFeedback: null,
  1193. mentorFeedback: null,
  1194. feedbackScore: null,
  1195. feedbackStatus: 0,
  1196. meetingDate: null
  1197. };
  1198. this.resetForm("form");
  1199. },
  1200. /** 搜索按钮操作 */
  1201. handleQuery() {
  1202. if (this.isFirstSearch) {
  1203. this.queryParams.feedbackYear = this.queryParams.feedbackYearTemp;
  1204. this.isFirstSearch = false;
  1205. } else {
  1206. this.queryParams.feedbackYear = this.queryParams.feedbackYearTemp.getFullYear();
  1207. }
  1208. this.queryParams.pageNum = 1;
  1209. this.getList();
  1210. // 清空问卷
  1211. this.radio1 = null;
  1212. this.radio2 = null;
  1213. this.radio3 = null;
  1214. this.radio4 = null;
  1215. this.radio5 = null;
  1216. this.radio6 = null;
  1217. this.radio7 = null;
  1218. this.radio8 = null;
  1219. this.radio9 = null;
  1220. this.radio10 = null;
  1221. this.radio11 = null;
  1222. this.radio12 = null;
  1223. this.radio13 = null;
  1224. this.radio14 = null;
  1225. // 清空导师反馈内容
  1226. this.mentorFeedback = null;
  1227. // 清空会议日期
  1228. this.meetingDate = null;
  1229. getFeedbackByParams({
  1230. successorId: this.queryParams.successorId,
  1231. feedbackYear: this.queryParams.feedbackYear,
  1232. feedbackSeason: this.queryParams.feedbackSeason,
  1233. }).then(response => {
  1234. let data = response.data;
  1235. this.feedbackId = data.id;
  1236. this.parentId = data.id;
  1237. this.meetingDate = data.meetingDate;
  1238. this.resetLastDay();
  1239. this.mentorFeedback = data.mentorFeedback;
  1240. // 刷新汇报附件
  1241. this.initFileList(data.id);
  1242. });
  1243. // 刷新问卷
  1244. listAnswer( { feedbackId: this.feedbackId } ).then(response => {
  1245. let data = response.rows;
  1246. for (let i = 0; i < data.length; i++) {
  1247. if (data[i].questionId == "4") { this.radio1 = data[i].answer; }
  1248. if (data[i].questionId == "5") { this.radio2 = data[i].answer; }
  1249. if (data[i].questionId == "6") { this.radio3 = data[i].answer; }
  1250. if (data[i].questionId == "7") { this.radio4 = data[i].answer; }
  1251. if (data[i].questionId == "8") { this.radio5 = data[i].answer; }
  1252. if (data[i].questionId == "9") { this.radio6 = data[i].answer; }
  1253. if (data[i].questionId == "10") { this.radio7 = data[i].answer; }
  1254. if (data[i].questionId == "11") { this.radio8 = data[i].answer; }
  1255. if (data[i].questionId == "12") { this.radio9 = data[i].answer; }
  1256. if (data[i].questionId == "13") { this.radio10 = data[i].answer; }
  1257. if (data[i].questionId == "14") { this.radio11 = data[i].answer; }
  1258. if (data[i].questionId == "15") { this.radio12 = data[i].answer; }
  1259. if (data[i].questionId == "16") { this.radio13 = data[i].answer; }
  1260. if (data[i].questionId == "17") { this.radio14 = data[i].answer; }
  1261. }
  1262. });
  1263. },
  1264. /** 重置按钮操作 */
  1265. resetQuery() {
  1266. this.resetForm("queryForm");
  1267. this.handleQuery();
  1268. },
  1269. // 多选框选中数据
  1270. handleSelectionChange(selection) {
  1271. this.ids = selection.map(item => item.id)
  1272. this.single = selection.length!==1
  1273. this.multiple = !selection.length
  1274. },
  1275. }
  1276. };
  1277. </script>
  1278. <style scoped>
  1279. .question{
  1280. margin: 20px 0px;
  1281. padding-left: 20px;
  1282. }
  1283. .answer{
  1284. padding-bottom: 10px;
  1285. padding-left: 40px;
  1286. }
  1287. h3{
  1288. margin: 20px 0px;
  1289. }
  1290. </style>