candidateAll.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. <!--
  2. * @Description: create
  3. * @Version: 1.0
  4. * @Autor: XuTongZhang
  5. * @Date: 2020-07-30 10:17:25
  6. * @LastEditors: XuTongZhang
  7. * @LastEditTime: 2020-08-17 15:57:05
  8. -->
  9. <template>
  10. <div class="indexPage">
  11. <v-input :btn="btn" :list="list" @search="search" @exports="exports"></v-input>
  12. <v-table :table="table" :tableList="tableList" :sortType="true" :queryData="queryData" :form="searchForm" @details="details" @update="update"></v-table>
  13. <v-pager @page="callPage" :total="totalrecords"></v-pager>
  14. <!-- <resume :dialogFormVisible="dialogFormVisible" :close="close" :info="info" :searchForm="searchForm" :queryData="queryData"></resume> -->
  15. <el-dialog :visible.sync="dialogVisible" width="600px" :before-close="closeDia" :close-on-click-modal="false">
  16. <el-form :model="form" ref="uform" label-width="140px" :rules="rules" label-position="right">
  17. <el-form-item label="姓名" prop="delivererName">
  18. <el-input placeholder="请输入姓名" v-model="form.delivererName" maxlength="32" show-word-limit></el-input>
  19. </el-form-item>
  20. <el-form-item label="性别" prop="delivererSex">
  21. <el-select v-model="form.delivererSex" class="select" placeholder="请选择性别">
  22. <el-option v-for="item in [{ value: 0, label: '女' }, { value: 1, label: '男' }]" :key="item.value" :label="item.label" :value="item.value">
  23. </el-option>
  24. </el-select>
  25. </el-form-item>
  26. <el-form-item label="简历投递职位" prop="positionApplied">
  27. <el-input placeholder="请输入投递职位" v-model="form.positionApplied" maxlength="32" show-word-limit></el-input>
  28. </el-form-item>
  29. <el-form-item label="工作年限" prop="delivererWorkExp">
  30. <el-input placeholder="请输入工作年限" v-model="form.delivererWorkExp" maxlength="200" show-word-limit></el-input>
  31. </el-form-item>
  32. <el-form-item label="学历" prop="delivererEducation">
  33. <el-select class="select" v-model="form.delivererEducation" placeholder="请选择学历">
  34. <el-option v-for="item in ['大专', '本科', '研究生', '博士', '其他']" :key="item" :label="item" :value="item">
  35. </el-option>
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item label="联系电话" prop="delivererPhone">
  39. <el-input placeholder="请输入联系电话" v-model.number="form.delivererPhone" maxlength="11" show-word-limit></el-input>
  40. </el-form-item>
  41. <el-form-item label="邮箱地址" prop="delivererMail">
  42. <el-input placeholder="请输入邮箱地址" v-model="form.delivererMail" maxlength="32" show-word-limit></el-input>
  43. </el-form-item>
  44. <el-form-item label="面试应聘职位" prop="desiredPositionId">
  45. <el-select class="select" v-model="form.desiredPositionId" placeholder="请选择应聘职位">
  46. <el-option v-for="item in positionList" :key="item.value" :label="item.label" :value="item.value">
  47. </el-option>
  48. </el-select>
  49. </el-form-item>
  50. <el-form-item>
  51. <el-button @click="closeDia">取 消</el-button>
  52. <el-button type="primary" @click="submit">修 改</el-button>
  53. </el-form-item>
  54. </el-form>
  55. </el-dialog>
  56. </div>
  57. </template>
  58. <script>
  59. export default {
  60. data () {
  61. let validator = (rule, value, callback) => {
  62. if (value === '') {
  63. callback(new Error('请输入手机号'))
  64. } else {
  65. if (!(/^1[3456789]\d{9}$/.test(value))) {
  66. callback(new Error('请输入正确的手机格式'))
  67. }
  68. callback()
  69. }
  70. }
  71. return {
  72. tableList: [],
  73. dialogFormVisible: false,
  74. dialogVisible: false,
  75. page: 1,
  76. totalrecords: 0,
  77. pickList: [],
  78. downList1: [],
  79. searchForm: {},
  80. form: {},
  81. rules: {
  82. delivererEducation: [{
  83. required: true,
  84. message: '请选择学历',
  85. trigger: 'change'
  86. }],
  87. delivererName: [{
  88. required: true,
  89. message: '请输入姓名',
  90. trigger: 'change'
  91. }],
  92. delivererPhone: [{
  93. required: true,
  94. validator,
  95. trigger: 'change'
  96. }],
  97. delivererMail: [{
  98. required: true,
  99. message: '请输入邮箱',
  100. trigger: 'change'
  101. }],
  102. delivererSex: [{
  103. required: true,
  104. message: '请选择性别',
  105. trigger: 'change'
  106. }],
  107. delivererWorkExp: [{
  108. required: true,
  109. message: '请填写工作经验',
  110. trigger: 'change'
  111. }],
  112. // desiredPositionId: [{
  113. // required: true,
  114. // message: '请选择应聘职位',
  115. // trigger: 'change'
  116. // }],
  117. positionApplied: [{
  118. required: true,
  119. message: '请填写投递职位',
  120. trigger: 'change'
  121. }]
  122. },
  123. positionList: [],
  124. info: {},
  125. list: [{
  126. placeholder: '请输入关键字查询',
  127. props: 'condition'
  128. },
  129. {
  130. type: 'select',
  131. placeholder: '性别',
  132. props: 'delivererSex',
  133. options: [{
  134. label: '全部',
  135. value: null
  136. }, {
  137. label: '男',
  138. value: 1
  139. }, {
  140. label: '女',
  141. value: 0
  142. }]
  143. },
  144. {
  145. type: 'select',
  146. placeholder: '来源',
  147. props: 'resumeFrom',
  148. options: [{
  149. label: '全部',
  150. value: null
  151. },
  152. {
  153. label: '51job',
  154. value: 0
  155. },
  156. {
  157. label: '智联',
  158. value: 1
  159. },
  160. {
  161. label: '58同城',
  162. value: 2
  163. },
  164. {
  165. label: '平台',
  166. value: 3
  167. }
  168. ]
  169. }
  170. ],
  171. btn: [{
  172. name: '确定',
  173. type: 'primary',
  174. method: 'search'
  175. },
  176. {
  177. name: '导出',
  178. type: 'primary',
  179. method: 'exports'
  180. }
  181. ],
  182. table: {
  183. selection: true,
  184. column: [{
  185. label: '编号',
  186. props: 'id'
  187. },
  188. {
  189. label: '姓名',
  190. props: 'delivererName',
  191. width: 60
  192. },
  193. {
  194. label: '性别',
  195. props: 'delivererSex',
  196. options: ['女', '男'],
  197. width: 60
  198. },
  199. {
  200. label: '简历来源',
  201. props: 'resumeFrom',
  202. options: ['51job', '智联招聘', '58同城', '平台'],
  203. width: 80
  204. },
  205. {
  206. label: '招聘类型',
  207. props: 'recruitType',
  208. options: ['社招', '校招', '直接校招'],
  209. width: 80
  210. },
  211. {
  212. label: '简历投递职位',
  213. props: 'positionApplied'
  214. },
  215. {
  216. label: '简历状态',
  217. props: 'state'
  218. },
  219. {
  220. label: '工作年限',
  221. props: 'delivererWorkExp'
  222. },
  223. {
  224. label: '学历',
  225. props: 'delivererEducation'
  226. },
  227. {
  228. label: '联系电话',
  229. props: 'delivererPhone'
  230. },
  231. {
  232. label: '邮箱',
  233. props: 'delivererMail'
  234. },
  235. {
  236. label: '面试应聘职位',
  237. props: 'positionName'
  238. },
  239. {
  240. label: '通知面试时间',
  241. props: 'sendMailTime'
  242. },
  243. {
  244. label: '完成面试时间',
  245. props: 'confirmInterviewTime'
  246. },
  247. {
  248. label: '面试状态',
  249. props: 'interviewStatus',
  250. options: ['未面试', '已面试']
  251. },
  252. {
  253. label: '面试结果',
  254. props: 'interviewResult',
  255. options: ['未读', '已通过', '已淘汰']
  256. }
  257. ],
  258. // fixed: true,
  259. width: 200,
  260. handle: [{
  261. title: '修改信息',
  262. method: 'update',
  263. type: 'warning'
  264. }
  265. // {
  266. // title: '查看简历',
  267. // method: 'details',
  268. // type: 'info'
  269. // }
  270. ]
  271. }
  272. }
  273. },
  274. mounted () {
  275. this.queryData()
  276. this.queryDownList()
  277. },
  278. methods: {
  279. queryData (form = {}) {
  280. let page = this.page
  281. this.searchForm = form
  282. let reqdata = form
  283. this.$api
  284. .post('/resumeInfo/queryTalentPoolList', {
  285. reqdata,
  286. page
  287. })
  288. .then((res) => {
  289. this.totalrecords = res.totalrecords
  290. this.tableList = res.list.map(item => {
  291. item.delivererSex = item.delivererSex - 0 || 0
  292. item.desiredPositionId = item.desiredPositionId - 0 || null
  293. // item.desiredPositionId = item.desiredPositionId ? this.downList1.some(i => i.id === item.desiredPositionId) ? this.downList1.find(i => i.id === item.desiredPositionId).positionName : '' : ''
  294. item.state = item.interviewResult ? ['', '已通过', '未通过'][item.interviewResult] : item.isSendInviteMail ? '已通知' : ['未读', '通过', '淘汰', '待定'][item.isPass]
  295. return item
  296. })
  297. })
  298. },
  299. queryDownList () {
  300. this.$api
  301. .post('/position/queryPositionList', {
  302. reqdata: {}
  303. })
  304. .then((res) => {
  305. this.positionList = res.list.map((item) => ({
  306. value: item.id,
  307. label: item.positionName
  308. }))
  309. this.downList1 = res.list
  310. })
  311. },
  312. search (form) {
  313. this.queryData(form)
  314. },
  315. update (row) {
  316. this.openDia()
  317. console.log(row)
  318. this.form = Object.assign({}, row)
  319. },
  320. submit () {
  321. let a
  322. this.$refs['uform'].validate((valid) => {
  323. a = valid
  324. })
  325. if (!a) return
  326. let reqdata = this.form
  327. this.$api
  328. .post('/resumeInfo/updateResumeInfo', {
  329. reqdata
  330. })
  331. .then((res) => {
  332. this.$message({
  333. message: '修改成功!',
  334. type: 'success'
  335. })
  336. this.closeDia()
  337. this.queryData()
  338. })
  339. },
  340. details (row) {
  341. this.open()
  342. this.info = row
  343. },
  344. exports () {
  345. this.$api
  346. .post('/export/export2Web', {
  347. reqdata: this.searchForm
  348. })
  349. .then((res) => {
  350. console.log(res)
  351. })
  352. },
  353. openDia () {
  354. this.dialogVisible = true
  355. },
  356. closeDia () {
  357. this.dialogVisible = false
  358. this.form = {}
  359. },
  360. open () {
  361. this.dialogFormVisible = true
  362. },
  363. close () {
  364. this.dialogFormVisible = false
  365. this.form = {}
  366. },
  367. callPage (val) {
  368. this.page = val
  369. this.queryData(this.searchForm)
  370. }
  371. }
  372. }
  373. </script>