candidateList.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081
  1. <!--
  2. * @Description: create
  3. * @Version: 1.0
  4. * @Autor: XuTongZhang
  5. * @Date: 2020-07-28 15:25:06
  6. * @LastEditors: XuTongZhang
  7. * @LastEditTime: 2020-08-18 17:00:57
  8. -->
  9. <template>
  10. <div class="candidateList">
  11. <v-input :btn="(isCollapse==1?btn1:isCollapse===2?btn2:isCollapse===3?btn3:btn0).slice(0, 1)" :list="list" :key="isCollapse+3" @del="delAll" @search="search" @through="throughAll" @notice="noticeAll" @eliminate="eliminateAll" @undetermined="undeterminedAll" @sendMail="sendMailAll"></v-input>
  12. <el-radio-group v-model="isCollapse" size="medium" style="margin-bottom: 20px;" fill="#00a0e9">
  13. <el-radio-button :label="0">候选人列表</el-radio-button>
  14. <el-radio-button :label="1">已通过候选人</el-radio-button>
  15. <el-radio-button :label="2">已淘汰候选人</el-radio-button>
  16. <el-radio-button :label="3">待定候选人</el-radio-button>
  17. </el-radio-group><br/>
  18. <el-dropdown v-if="table.button" @command="dropdownMethods">
  19. <el-button style="background: #00a0e9;color:#fff">
  20. 更多操作<i class="el-icon-arrow-down el-icon--right"></i>
  21. </el-button>
  22. <el-dropdown-menu slot="dropdown">
  23. <el-dropdown-item v-for="(item,index) in (isCollapse==1?btn1:isCollapse===2?btn2:isCollapse===3?btn3:btn0).slice(1)" :key="index" :command="{method: item.method}">{{item.name}}</el-dropdown-item>
  24. </el-dropdown-menu>
  25. </el-dropdown>
  26. <div style="height:20px"></div>
  27. <v-table :key="isCollapse" :table="isCollapse===1?table1:isCollapse===2?table2:isCollapse===3?table3:table" :tableList="tableList" :sortType="true" :form="searchForm" :queryData="queryData" @details="details" @eliminate="eliminate" @through="through" @notice="notice" @del="del" @undetermined="undetermined" @openDia="openDia" @update="update" @selection-change="selection" @sendMail="sendMail" id="id"></v-table>
  28. <v-pager @page="callPage" :total="totalrecords"></v-pager>
  29. <el-dialog :visible.sync="dialogFormVisible" width="600px" :before-close="close" :close-on-click-modal="false">
  30. <el-form :model="form" ref="form" label-width="140px" :rules="rules" label-position="left">
  31. <el-form-item label-width="0">
  32. <div class="title">通知群发列表</div>
  33. <div class="content">
  34. <el-tag v-for="(item, index) in copyPickList" :key="item" closable @close="copyPickList.splice(index, 1)" :type="errorlist.includes(item)?'danger':'success'">
  35. {{tableList.some(i => i.id === item) ? tableList.find(i => i.id === item).delivererName + (tableList.find(i => i.id === item).delivererMail || '(无邮箱)') : ''}}
  36. </el-tag>
  37. </div>
  38. </el-form-item>
  39. <el-form-item label="选择邀约岗位" prop="templateId">
  40. <el-select v-model="form.templateId" placeholder="请选择邀约岗位">
  41. <el-option v-for="item in downList.filter(item => item.sceneId===3)" :key="item.id" :label="item.templateName" :value="item.id"></el-option>
  42. </el-select>
  43. <!-- <div v-else>{{this.downList1.some(i => i.id === form.processId) ? this.downList1.find(i => i.id === form.processId).processName : ''}}</div> -->
  44. </el-form-item>
  45. <el-form-item label="群发邮箱">{{email}}</el-form-item>
  46. <el-form-item>
  47. <el-button @click="close">取消</el-button>
  48. <el-button type="primary" @click="launch">立即发出</el-button>
  49. </el-form-item>
  50. </el-form>
  51. </el-dialog>
  52. <el-dialog :visible.sync="dialogVisible" width="600px" :before-close="closeDia" :close-on-click-modal="false">
  53. <div class="title" slot="title">{{info.delivererName}}的面试视频</div>
  54. <div class="content">
  55. <div class="video">
  56. <video width="100%" controls :src="info.answerVideoList && info.answerVideoList.length ? $img + vedioUrl : ''"></video>
  57. </div>
  58. <div class="list" v-if="info.answerVideoList && info.answerVideoList.length">
  59. <div v-for="(item, index) in info.answerVideoList" :key="item.id" class="active" @click="detActive(index)" :class="info.active === index ? 'is-active' : ''">第{{index + 1}}段</div>
  60. </div>
  61. <div v-else class="prompt">暂无视频</div>
  62. </div>
  63. </el-dialog>
  64. <el-dialog :visible.sync="visible" width="600px" :before-close="closeVisible" :close-on-click-modal="false">
  65. <el-form :model="uform" ref="uform" label-width="140px" :rules="rule" label-position="right">
  66. <el-form-item label="姓名" prop="delivererName">
  67. <el-input placeholder="请输入姓名" v-model="uform.delivererName" maxlength="32" show-word-limit></el-input>
  68. </el-form-item>
  69. <el-form-item label="性别" prop="delivererSex">
  70. <el-select v-model="uform.delivererSex" class="select" placeholder="请选择性别">
  71. <el-option v-for="item in [{ value: 0, label: '女' }, { value: 1, label: '男' }]" :key="item.value" :label="item.label" :value="item.value">
  72. </el-option>
  73. </el-select>
  74. </el-form-item>
  75. <!-- <el-form-item label="简历投递职位" prop="positionApplied">
  76. <el-input placeholder="请输入投递职位" v-model="uform.positionApplied"></el-input>
  77. </el-form-item> -->
  78. <el-form-item label="工作年限" prop="delivererWorkExp">
  79. <el-input placeholder="请输入工作年限" v-model="uform.delivererWorkExp" maxlength="200" show-word-limit></el-input>
  80. </el-form-item>
  81. <el-form-item label="学历" prop="delivererEducation">
  82. <el-select class="select" v-model="uform.delivererEducation" placeholder="请选择学历">
  83. <el-option v-for="item in ['大专', '本科', '研究生', '博士', '其他']" :key="item" :label="item" :value="item">
  84. </el-option>
  85. </el-select>
  86. </el-form-item>
  87. <el-form-item label="联系电话" prop="delivererPhone">
  88. <el-input placeholder="请输入联系电话" v-model.number="uform.delivererPhone" maxlength="11" show-word-limit></el-input>
  89. </el-form-item>
  90. <el-form-item label="邮箱地址" prop="delivererMail">
  91. <el-input placeholder="请输入邮箱地址" v-model="uform.delivererMail" maxlength="32" show-word-limit></el-input>
  92. </el-form-item>
  93. <el-form-item label="应聘职位" prop="desiredPositionId">
  94. <el-select class="select" v-model="uform.desiredPositionId" placeholder="请选择应聘职位">
  95. <el-option v-for="item in positionList" :key="item.value" :label="item.label" :value="item.value">
  96. </el-option>
  97. </el-select>
  98. </el-form-item>
  99. <el-form-item>
  100. <el-button @click="closeVisible">取 消</el-button>
  101. <el-button type="primary" @click="submit">修 改</el-button>
  102. </el-form-item>
  103. </el-form>
  104. </el-dialog>
  105. <resume :dialogFormVisible="visibleTwo" :close="closeTwo" :info="infoTwo" :searchForm="searchForm" :queryData="queryData"></resume>
  106. </div>
  107. </template>
  108. <script>
  109. import resume from './resume'
  110. export default {
  111. data () {
  112. let validator = (rule, value, callback) => {
  113. if (value === '') {
  114. callback(new Error('请输入手机号'))
  115. } else {
  116. if (!(/^1[3456789]\d{9}$/.test(value))) {
  117. callback(new Error('请输入正确的手机格式'))
  118. }
  119. callback()
  120. }
  121. }
  122. return {
  123. dialogFormVisible: false,
  124. dialogVisible: false,
  125. visible: false,
  126. visibleTwo: false,
  127. tableList: [],
  128. page: 1,
  129. isCollapse: 0,
  130. totalrecords: 0,
  131. pickList: [],
  132. copyPickList: [],
  133. downList: [],
  134. positionList: [],
  135. errorlist: [],
  136. searchForm: {},
  137. form: {},
  138. uform: {},
  139. email: '',
  140. state: 2,
  141. info: {},
  142. infoTwo: {},
  143. vedioUrl: '',
  144. rules: {
  145. templateId: [{
  146. required: true,
  147. message: '请选择选择邀约岗位',
  148. trigger: 'blur'
  149. }]
  150. },
  151. rule: {
  152. delivererEducation: [{
  153. required: true,
  154. message: '请选择学历',
  155. trigger: 'change'
  156. }],
  157. delivererName: [{
  158. required: true,
  159. message: '请输入姓名',
  160. trigger: 'change'
  161. }],
  162. delivererPhone: [{
  163. required: true,
  164. validator,
  165. trigger: 'change'
  166. }],
  167. delivererMail: [{
  168. required: true,
  169. message: '请输入邮箱',
  170. trigger: 'change'
  171. }],
  172. delivererSex: [{
  173. required: true,
  174. message: '请选择性别',
  175. trigger: 'change'
  176. }],
  177. delivererWorkExp: [{
  178. required: true,
  179. message: '请填写工作经验',
  180. trigger: 'change'
  181. }],
  182. // desiredPositionId: [
  183. // { required: true, message: '请选择应聘职位', trigger: 'change' }
  184. // ],
  185. positionApplied: [{
  186. required: true,
  187. message: '请填写投递职位',
  188. trigger: 'change'
  189. }]
  190. },
  191. list: [{
  192. placeholder: '请输入关键字查询',
  193. props: 'condition'
  194. },
  195. {
  196. type: 'select',
  197. placeholder: '性别',
  198. props: 'delivererSex',
  199. options: [{
  200. label: '全部',
  201. value: null
  202. }, {
  203. label: '男',
  204. value: 1
  205. }, {
  206. label: '女',
  207. value: 0
  208. }]
  209. },
  210. {
  211. type: 'select',
  212. placeholder: '来源',
  213. props: 'resumeFrom',
  214. options: [{
  215. label: '全部',
  216. value: null
  217. },
  218. {
  219. label: '51job',
  220. value: 0
  221. },
  222. {
  223. label: '智联',
  224. value: 1
  225. },
  226. {
  227. label: '58同城',
  228. value: 2
  229. },
  230. {
  231. label: '平台',
  232. value: 3
  233. }
  234. ]
  235. },
  236. {
  237. type: 'date'
  238. }
  239. ],
  240. btn0: [{
  241. name: '确定',
  242. type: 'primary',
  243. method: 'search'
  244. },
  245. {
  246. name: '通过',
  247. type: 'success',
  248. method: 'through'
  249. },
  250. {
  251. name: '淘汰',
  252. type: 'danger',
  253. method: 'eliminate'
  254. },
  255. {
  256. name: '待定',
  257. type: 'warning',
  258. method: 'undetermined'
  259. },
  260. {
  261. name: '邮件通知',
  262. method: 'sendMail',
  263. type: 'success'
  264. }
  265. ],
  266. btn1: [{
  267. name: '确定',
  268. type: 'primary',
  269. method: 'search'
  270. },
  271. {
  272. name: '通知成功',
  273. type: 'success',
  274. method: 'notice'
  275. }
  276. ],
  277. btn2: [{
  278. name: '确定',
  279. type: 'primary',
  280. method: 'search'
  281. },
  282. {
  283. name: '通过',
  284. type: 'success',
  285. method: 'through'
  286. },
  287. {
  288. name: '删除',
  289. type: 'danger',
  290. method: 'del'
  291. },
  292. {
  293. name: '邮件通知',
  294. method: 'sendMail',
  295. type: 'success'
  296. }
  297. ],
  298. btn3: [{
  299. name: '确定',
  300. type: 'primary',
  301. method: 'search'
  302. },
  303. {
  304. name: '通过',
  305. type: 'success',
  306. method: 'through'
  307. },
  308. {
  309. name: '淘汰',
  310. type: 'danger',
  311. method: 'eliminate'
  312. },
  313. {
  314. name: '邮件通知',
  315. method: 'sendMail',
  316. type: 'success'
  317. }
  318. ],
  319. table: {
  320. selection: true,
  321. column: [{
  322. label: this.$t('field.serialNumber'),
  323. props: 'serialNumber'
  324. },
  325. {
  326. label: '姓名',
  327. props: 'delivererName'
  328. },
  329. {
  330. label: '性别',
  331. props: 'delivererSex',
  332. options: ['女', '男']
  333. },
  334. {
  335. label: '简历来源',
  336. props: 'resumeFrom',
  337. options: ['51job', '智联招聘', '58同城', '平台']
  338. },
  339. {
  340. label: '招聘类型',
  341. props: 'recruitType',
  342. options: ['社招', '校招', '直接校招']
  343. },
  344. // {
  345. // label: '简历投递职位',
  346. // props: 'positionApplied'
  347. // },
  348. {
  349. label: '应聘职位',
  350. props: 'positionName'
  351. },
  352. {
  353. label: '工作年限',
  354. props: 'delivererWorkExp'
  355. },
  356. {
  357. label: '学历',
  358. props: 'delivererEducation'
  359. },
  360. {
  361. label: '联系电话',
  362. props: 'delivererPhone'
  363. },
  364. {
  365. label: '邮箱',
  366. props: 'delivererMail'
  367. },
  368. {
  369. label: '通知时间',
  370. props: 'sendMailTime'
  371. },
  372. {
  373. label: '完成时间',
  374. props: 'confirmInterviewTime'
  375. }
  376. ],
  377. width: 150,
  378. button: true,
  379. handle: [{
  380. title: '查看',
  381. method: 'details',
  382. type: 'info'
  383. },
  384. // {
  385. // title: '查看视频',
  386. // method: 'openDia',
  387. // type: 'info'
  388. // },
  389. {
  390. title: '通过',
  391. method: 'through',
  392. type: 'success'
  393. },
  394. {
  395. title: '淘汰',
  396. method: 'eliminate',
  397. type: 'danger'
  398. },
  399. {
  400. title: '待定',
  401. method: 'undetermined',
  402. type: 'warning'
  403. },
  404. {
  405. title: '修改',
  406. method: 'update',
  407. type: 'warning'
  408. },
  409. {
  410. title: '邮件通知',
  411. method: 'sendMail',
  412. type: 'success'
  413. }
  414. ]
  415. },
  416. table1: {
  417. selection: true,
  418. column: [{
  419. label: this.$t('field.serialNumber'),
  420. props: 'serialNumber'
  421. },
  422. {
  423. label: '姓名',
  424. props: 'delivererName'
  425. },
  426. {
  427. label: '性别',
  428. props: 'delivererSex',
  429. options: ['女', '男']
  430. },
  431. {
  432. label: '简历来源',
  433. props: 'resumeFrom',
  434. options: ['51job', '智联招聘', '58同城', '平台']
  435. },
  436. {
  437. label: '招聘类型',
  438. props: 'recruitType',
  439. options: ['社招', '校招', '直接校招']
  440. },
  441. // {
  442. // label: '简历投递职位',
  443. // props: 'positionApplied'
  444. // },
  445. {
  446. label: '应聘职位',
  447. props: 'positionName'
  448. },
  449. {
  450. label: '工作年限',
  451. props: 'delivererWorkExp'
  452. },
  453. {
  454. label: '学历',
  455. props: 'delivererEducation'
  456. },
  457. {
  458. label: '联系电话',
  459. props: 'delivererPhone'
  460. },
  461. {
  462. label: '邮箱',
  463. props: 'delivererMail'
  464. },
  465. {
  466. label: '通知时间',
  467. props: 'sendMailTime'
  468. },
  469. {
  470. label: '完成时间',
  471. props: 'confirmInterviewTime'
  472. },
  473. {
  474. label: '邮件发送状态',
  475. props: 'sendConfirmStatus',
  476. options: ['未发送', '发送中', '发送成功', '发送失败']
  477. }
  478. ],
  479. width: 150,
  480. button: true,
  481. handle: [{
  482. title: '查看',
  483. method: 'details',
  484. type: 'info'
  485. },
  486. // {
  487. // title: '查看视频',
  488. // method: 'openDia',
  489. // type: 'info'
  490. // },
  491. {
  492. title: '通知成功',
  493. method: 'notice',
  494. type: 'success'
  495. },
  496. {
  497. title: '修改',
  498. method: 'update',
  499. type: 'warning'
  500. }
  501. ]
  502. },
  503. table2: {
  504. selection: true,
  505. column: [{
  506. label: this.$t('field.serialNumber'),
  507. props: 'serialNumber'
  508. },
  509. {
  510. label: '姓名',
  511. props: 'delivererName'
  512. },
  513. {
  514. label: '性别',
  515. props: 'delivererSex',
  516. options: ['女', '男']
  517. },
  518. {
  519. label: '简历来源',
  520. props: 'resumeFrom',
  521. options: ['51job', '智联招聘', '58同城', '平台']
  522. },
  523. // {
  524. // label: '简历投递职位',
  525. // props: 'positionApplied'
  526. // },
  527. {
  528. label: '应聘职位',
  529. props: 'positionName'
  530. },
  531. {
  532. label: '工作年限',
  533. props: 'delivererWorkExp'
  534. },
  535. {
  536. label: '学历',
  537. props: 'delivererEducation'
  538. },
  539. {
  540. label: '联系电话',
  541. props: 'delivererPhone'
  542. },
  543. {
  544. label: '邮箱',
  545. props: 'delivererMail'
  546. },
  547. {
  548. label: '被标记未通过时间',
  549. props: 'rejectTime'
  550. },
  551. {
  552. label: '理由',
  553. props: 'rejectReason'
  554. }
  555. ],
  556. width: 150,
  557. button: true,
  558. handle: [{
  559. title: '查看',
  560. method: 'details',
  561. type: 'info'
  562. },
  563. {
  564. title: '通过',
  565. method: 'through',
  566. type: 'success'
  567. },
  568. {
  569. title: '删除',
  570. method: 'del',
  571. type: 'danger'
  572. },
  573. {
  574. title: '修改',
  575. method: 'update',
  576. type: 'warning'
  577. },
  578. {
  579. title: '邮件通知',
  580. method: 'sendMail',
  581. type: 'success'
  582. }
  583. ]
  584. },
  585. table3: {
  586. selection: true,
  587. column: [{
  588. label: this.$t('field.serialNumber'),
  589. props: 'serialNumber'
  590. },
  591. {
  592. label: '姓名',
  593. props: 'delivererName'
  594. },
  595. {
  596. label: '性别',
  597. props: 'delivererSex',
  598. options: ['女', '男']
  599. },
  600. {
  601. label: '简历来源',
  602. props: 'resumeFrom',
  603. options: ['51job', '智联招聘', '58同城', '平台']
  604. },
  605. // {
  606. // label: '简历投递职位',
  607. // props: 'positionApplied'
  608. // },
  609. {
  610. label: '应聘职位',
  611. props: 'positionName'
  612. },
  613. {
  614. label: '工作年限',
  615. props: 'delivererWorkExp'
  616. },
  617. {
  618. label: '学历',
  619. props: 'delivererEducation'
  620. },
  621. {
  622. label: '联系电话',
  623. props: 'delivererPhone'
  624. },
  625. {
  626. label: '邮箱',
  627. props: 'delivererMail'
  628. }
  629. ],
  630. width: 150,
  631. button: true,
  632. handle: [{
  633. title: '查看',
  634. method: 'details',
  635. type: 'info'
  636. },
  637. // {
  638. // title: '查看视频',
  639. // method: 'openDia',
  640. // type: 'info'
  641. // },
  642. {
  643. title: '通过',
  644. method: 'through',
  645. type: 'success'
  646. },
  647. {
  648. title: '淘汰',
  649. method: 'eliminate',
  650. type: 'danger'
  651. },
  652. {
  653. title: '修改',
  654. method: 'update',
  655. type: 'warning'
  656. },
  657. {
  658. title: '邮件通知',
  659. method: 'sendMail',
  660. type: 'success'
  661. }
  662. ]
  663. }
  664. }
  665. },
  666. components: {
  667. resume
  668. },
  669. mounted () {
  670. this.queryDownList()
  671. this.queryEmail()
  672. },
  673. methods: {
  674. dropdownMethods ({ method }) {
  675. console.log(method)
  676. this[method + 'All']()
  677. },
  678. queryData (form = {}) {
  679. let page = this.page
  680. this.searchForm = form
  681. let reqdata = form
  682. reqdata.interviewResult = this.isCollapse
  683. reqdata.isPass = 1
  684. reqdata.isSendInviteMail = 1
  685. this.$api
  686. .post('/resumeInfo/queryCandidateList', {
  687. reqdata,
  688. page
  689. })
  690. .then((res) => {
  691. this.totalrecords = res.totalrecords
  692. this.tableList = res.list.map((item, index) => {
  693. item.delivererSex = item.delivererSex - 0 || 0
  694. item.desiredPositionId = item.desiredPositionId - 0 || null
  695. item.serialNumber = (this.page - 1) * 10 + index + 1
  696. // item.desiredPositionId = item.desiredPositionId ? this.downList1.some(i => i.id === item.desiredPositionId) ? this.downList1.find(i => i.id === item.desiredPositionId).positionName : '' : ''
  697. return item
  698. })
  699. })
  700. },
  701. queryDownList () {
  702. this.$api
  703. .post('/position/queryPositionList', {
  704. reqdata: {}
  705. })
  706. .then((res) => {
  707. this.positionList = res.list.map((item) => ({
  708. value: item.id,
  709. label: item.positionName
  710. }))
  711. this.downList1 = res.list
  712. this.queryData()
  713. })
  714. this.$api
  715. .post('/template/queryTemplateList', {
  716. reqdata: {},
  717. rows: 100
  718. })
  719. .then((res) => {
  720. this.downList = res.list
  721. })
  722. },
  723. queryEmail () {
  724. this.$api
  725. .post('/companyAccount/queryCompanyAccountList', {
  726. reqdata: {}
  727. }).then(res => {
  728. this.email = res.list.some(item => item.useType === 1) ? res.list.find(item => item.useType === 1).cmpMailAccount : ''
  729. })
  730. },
  731. search (form) {
  732. this.queryData(form)
  733. },
  734. details (row) {
  735. // row.filePath ? window.open(this.$img + row.filePath) : this.$message({
  736. // type: 'info',
  737. // message: '无此人简历'
  738. // })
  739. this.openTwo()
  740. this.infoTwo = row
  741. },
  742. launch () {
  743. let a
  744. this.$refs['form'].validate((valid) => {
  745. a = valid
  746. })
  747. if (!a) return
  748. let resumeInfoStatusList = this.copyPickList.map(item => ({
  749. id: item,
  750. templateId: this.form.templateId
  751. }))
  752. this.copyPickList.length
  753. ? this.$api
  754. .post('/resumeInfo/sendMail', {
  755. reqdata: {
  756. resumeInfoStatusList,
  757. type: this.state
  758. }
  759. })
  760. .then((res) => {
  761. this.$alert('邮件正在发送中,请耐心等待!', '发送结果', {
  762. confirmButtonText: '确定',
  763. callback: action => {
  764. }
  765. })
  766. // this.errorlist = res.object.sendMailFailList.map(item => {
  767. // return item.id
  768. // })
  769. })
  770. : this.$message({
  771. type: 'info',
  772. message: '请添加需要通知的对象!'
  773. })
  774. },
  775. notice (row) {
  776. this.open()
  777. this.state = 2
  778. this.copyPickList = [row.id]
  779. },
  780. noticeAll () {
  781. this.pickList.length
  782. ? this.open()
  783. : this.$message({
  784. type: 'info',
  785. message: '请选择需要通知的对象!'
  786. })
  787. },
  788. through (row, type = false) {
  789. let ids = type ? row : [row.id]
  790. let resumeInfoStatusList = ids.map(item => ({
  791. id: item,
  792. interviewResult: 1
  793. }))
  794. this.$api
  795. .post('/resumeInfo/changeInterviewResult', {
  796. reqdata: {
  797. resumeInfoStatusList
  798. }
  799. })
  800. .then((res) => {
  801. this.queryData(this.searchForm)
  802. })
  803. },
  804. throughAll () {
  805. this.pickList.length
  806. ? this.through(this.pickList, true)
  807. : this.$message({
  808. type: 'info',
  809. message: '请选择通过的应聘者!'
  810. })
  811. },
  812. eliminate (row, type = false) {
  813. let ids = type ? row : [row.id]
  814. let resumeInfoStatusList = ids.map(item => ({
  815. id: item,
  816. interviewResult: 2
  817. }))
  818. this.$api
  819. .post('/resumeInfo/changeInterviewResult', {
  820. reqdata: {
  821. resumeInfoStatusList
  822. }
  823. })
  824. .then((res) => {
  825. this.queryData(this.searchForm)
  826. })
  827. },
  828. eliminateAll () {
  829. this.pickList.length
  830. ? this.eliminate(this.pickList, true)
  831. : this.$message({
  832. type: 'info',
  833. message: '请选择被淘汰的应聘者!'
  834. })
  835. },
  836. del (row, type = false) {
  837. let ids = type ? row : [row.id]
  838. let resumeInfoStatusList = ids.map(item => ({
  839. id: item,
  840. status: 1
  841. }))
  842. this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
  843. confirmButtonText: '确定',
  844. cancelButtonText: '取消',
  845. type: 'warning'
  846. })
  847. .then(() => {
  848. this.$api
  849. .post('/resumeInfo/deleteResumeInfo', {
  850. reqdata: {
  851. resumeInfoStatusList
  852. }
  853. })
  854. .then((res) => {
  855. this.queryData(this.searchForm)
  856. this.$message({
  857. type: 'success',
  858. message: '删除成功!'
  859. })
  860. })
  861. })
  862. .catch(() => {
  863. this.$message({
  864. type: 'info',
  865. message: '已取消删除'
  866. })
  867. })
  868. },
  869. delAll () {
  870. this.pickList.length
  871. ? this.del(this.pickList, true)
  872. : this.$message({
  873. type: 'info',
  874. message: '请选择需要删除的内容'
  875. })
  876. },
  877. undetermined (row, type = false) {
  878. let ids = type ? row : [row.id]
  879. let resumeInfoStatusList = ids.map(item => ({
  880. id: item,
  881. interviewResult: 3
  882. }))
  883. this.$api
  884. .post('/resumeInfo/changeInterviewResult', {
  885. reqdata: {
  886. resumeInfoStatusList
  887. }
  888. })
  889. .then((res) => {
  890. this.queryData(this.searchForm)
  891. })
  892. },
  893. undeterminedAll () {
  894. this.pickList.length
  895. ? this.undetermined(this.pickList, true)
  896. : this.$message({
  897. type: 'info',
  898. message: '请选择待定的应聘者'
  899. })
  900. },
  901. selection (val) {
  902. this.$set(this.$data, 'pickList', val)
  903. },
  904. detActive (index) {
  905. this.$set(this.info, 'active', index)
  906. this.vedioUrl = this.info.answerVideoList[this.info.active || 0] ? this.info.answerVideoList[this.info.active || 0].answerVideoPath : ''
  907. },
  908. update (row) {
  909. this.openVisible()
  910. console.log(row)
  911. this.uform = Object.assign({}, row)
  912. },
  913. submit () {
  914. let a
  915. this.$refs['uform'].validate((valid) => {
  916. a = valid
  917. })
  918. if (!a) return
  919. let reqdata = this.uform
  920. this.$api
  921. .post('/resumeInfo/updateResumeInfo', {
  922. reqdata
  923. })
  924. .then((res) => {
  925. this.$message({
  926. message: '修改成功!',
  927. type: 'success'
  928. })
  929. this.closeVisible()
  930. this.queryData(this.searchForm)
  931. })
  932. },
  933. sendMail ({ id }) {
  934. this.open()
  935. this.state = 2
  936. this.copyPickList = [id]
  937. },
  938. sendMailAll () {
  939. if (this.pickList.length) {
  940. this.open()
  941. this.state = 2
  942. } else {
  943. this.$message({
  944. type: 'info',
  945. message: '请选择需通知的应聘者'
  946. })
  947. }
  948. },
  949. open () {
  950. this.dialogFormVisible = true
  951. },
  952. close () {
  953. this.dialogFormVisible = false
  954. this.form = {}
  955. this.queryData(this.searchForm)
  956. this.copyPickList = Array.from(this.pickList)
  957. },
  958. closeDia () {
  959. this.dialogVisible = false
  960. },
  961. openDia (row) {
  962. this.info = row
  963. this.info.active = 0
  964. this.vedioUrl = this.info.answerVideoList[this.info.active || 0] ? this.info.answerVideoList[this.info.active || 0].answerVideoPath : ''
  965. this.dialogVisible = true
  966. },
  967. openVisible () {
  968. this.visible = true
  969. },
  970. openTwo () {
  971. this.visibleTwo = true
  972. },
  973. closeTwo () {
  974. this.visibleTwo = false
  975. },
  976. closeVisible () {
  977. this.visible = false
  978. this.uform = {}
  979. },
  980. callPage (val) {
  981. this.page = val
  982. this.queryData(this.searchForm)
  983. }
  984. },
  985. watch: {
  986. isCollapse () {
  987. this.queryData(this.searchForm)
  988. this.isCollapse === 0 && this.$set(this.table, 'handle',
  989. [{
  990. title: '查看',
  991. method: 'details',
  992. type: 'info'
  993. },
  994. // {
  995. // title: '查看视频',
  996. // method: 'openDia',
  997. // type: 'info'
  998. // },
  999. {
  1000. title: '通过',
  1001. method: 'through',
  1002. type: 'success'
  1003. },
  1004. {
  1005. title: '淘汰',
  1006. method: 'eliminate',
  1007. type: 'danger'
  1008. },
  1009. {
  1010. title: '待定',
  1011. method: 'undetermined',
  1012. type: 'warning'
  1013. },
  1014. {
  1015. title: '修改',
  1016. method: 'update',
  1017. type: 'warning'
  1018. },
  1019. {
  1020. title: '邮件通知',
  1021. method: 'sendMail',
  1022. type: 'success'
  1023. }
  1024. ]
  1025. )
  1026. },
  1027. pickList () {
  1028. this.copyPickList = Array.from(this.pickList)
  1029. }
  1030. }
  1031. }
  1032. </script>
  1033. <style lang="scss" scoped>
  1034. .title {
  1035. font-size: 20px;
  1036. font-weight: bold;
  1037. }
  1038. .prompt {
  1039. text-align: center;
  1040. height: 30px;
  1041. line-height: 40px;
  1042. font-size: 20px;
  1043. color: #888;
  1044. }
  1045. </style><style lang="scss">
  1046. .candidateList {
  1047. .el-dialog__body {
  1048. padding-top: 10px;
  1049. }
  1050. }
  1051. .list {
  1052. margin-top: 10px;
  1053. font-size: 14px;
  1054. display: flex;
  1055. color: rgb(42, 117, 216);
  1056. >div {
  1057. cursor: pointer;
  1058. margin: 10px;
  1059. }
  1060. .is-active {
  1061. color: #000;
  1062. font-size: 16px;
  1063. margin-top: 7px;
  1064. }
  1065. }
  1066. .content {
  1067. min-height: 50px;
  1068. >span {
  1069. margin: 5px;
  1070. }
  1071. }
  1072. </style>