resumeList.vue 28 KB

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