interview.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. <template>
  2. <view>
  3. <view style="padding:5rpx 20rpx 45rpx 20rpx;">
  4. <view class="desc">
  5. <uni-row>
  6. <uni-col :span="5">
  7. <view class="desc" style="font-size: 25rpx;">
  8. 姓名
  9. </view>
  10. </uni-col>
  11. <uni-col :span="19">
  12. <view>
  13. <uni-easyinput primaryColor="#37babd" v-model="form.name">
  14. </uni-easyinput>
  15. </view>
  16. </uni-col>
  17. </uni-row>
  18. </view>
  19. <view class="desc">
  20. <hs-dict-select label="性别" dictKey="sys_user_sex" v-model="form.sex" />
  21. </view>
  22. <view class="desc">
  23. <uni-row>
  24. <uni-col :span="5">
  25. <view class="desc" style="font-size: 25rpx;">
  26. 手机号
  27. </view>
  28. </uni-col>
  29. <uni-col :span="19">
  30. <view>
  31. <uni-easyinput primaryColor="#37babd" v-model="form.phone">
  32. </uni-easyinput>
  33. </view>
  34. </uni-col>
  35. </uni-row>
  36. </view>
  37. <view class="desc">
  38. <uni-row>
  39. <uni-col :span="5">
  40. <view class="desc" style="font-size: 25rpx;">
  41. 生日
  42. </view>
  43. </uni-col>
  44. <uni-col :span="19">
  45. <view>
  46. <uni-datetime-picker type="date" :clear-icon="false" v-model="form.birthdate"
  47. @maskClick="maskClick" @change="onchange()" />
  48. </view>
  49. </uni-col>
  50. </uni-row>
  51. </view>
  52. <view class="desc">
  53. <uni-row>
  54. <uni-col :span="5">
  55. <view class="desc" style="font-size: 25rpx;">
  56. 毕业院校
  57. </view>
  58. </uni-col>
  59. <uni-col :span="19">
  60. <view>
  61. <uni-easyinput primaryColor="#37babd" v-model="form.graduateSchool">
  62. </uni-easyinput>
  63. </view>
  64. </uni-col>
  65. </uni-row>
  66. </view>
  67. <view class="desc">
  68. <hs-dict-select label="学历学位" dictKey="degree_dict" v-model="form.degree" />
  69. </view>
  70. <view class="desc">
  71. <view class="desc" style="font-size: 25rpx;">
  72. 专业技能</view>
  73. <view>
  74. <uni-easyinput type="textarea" primaryColor="#37babd" v-model="form.skill">
  75. </uni-easyinput>
  76. </view>
  77. </view>
  78. <view class="desc">
  79. <hs-post-select label="意向岗位" v-model="form.post" />
  80. </view>
  81. <view class="desc">
  82. <uni-row>
  83. <uni-col :span="5">
  84. <view class="desc" style="font-size: 25rpx;">
  85. 面试时间
  86. </view>
  87. </uni-col>
  88. <uni-col :span="19">
  89. <view>
  90. <uni-datetime-picker type="date" :clear-icon="false" v-model="form.interviewTime"
  91. @maskClick="maskClick" @change="onchange()" />
  92. </view>
  93. </uni-col>
  94. </uni-row>
  95. </view>
  96. <view class="desc">
  97. <hs-dict-select label="面试形式" dictKey="interview_type" v-model="form.interviewType" />
  98. </view>
  99. <view class="desc">
  100. <view class="desc" style="font-size: 25rpx;">
  101. 面试官
  102. </view>
  103. <view>
  104. <uni-easyinput type="textarea" primaryColor="#37babd" v-model="form.interviewer">
  105. </uni-easyinput>
  106. </view>
  107. </view>
  108. <view class="desc">
  109. <view class="desc" style="font-size: 25rpx;">
  110. 技术水平
  111. </view>
  112. <view>
  113. <uni-easyinput type="textarea" primaryColor="#37babd" v-model="form.skillScore">
  114. </uni-easyinput>
  115. </view>
  116. </view>
  117. <view class="desc">
  118. <uni-row>
  119. <uni-col :span="5">
  120. <view class="desc" style="font-size: 25rpx;">
  121. 期望薪资
  122. </view>
  123. </uni-col>
  124. <uni-col :span="19">
  125. <uni-easyinput primaryColor="#37babd" v-model="form.expectSalary">
  126. </uni-easyinput>
  127. </uni-col>
  128. </uni-row>
  129. </view>
  130. <view class="desc">
  131. <view class="desc" style="font-size: 25rpx;">
  132. 新工作关注重点
  133. </view>
  134. <view>
  135. <uni-easyinput type="textarea" primaryColor="#37babd" v-model="form.emphasis">
  136. </uni-easyinput>
  137. </view>
  138. </view>
  139. <view class="desc">
  140. <view class="desc" style="font-size: 25rpx;">
  141. 其他纪要
  142. </view>
  143. <view>
  144. <uni-easyinput type="textarea" primaryColor="#37babd" v-model="form.other">
  145. </uni-easyinput>
  146. </view>
  147. </view>
  148. <view class="desc">
  149. <view>
  150. 简历资料
  151. </view>
  152. <view style="width: 100%;overflow-x: scroll;white-space: nowrap">
  153. <u-upload style="margin: 0;" :fileList="fileList" @afterRead="afterRead" @delete="deletePic"
  154. name="1" multiple :maxCount="1" width="120" height="120" uploadIcon="plus-circle">
  155. </u-upload>
  156. </view>
  157. </view>
  158. <view class="desc">
  159. <view class="desc" style="font-size: 25rpx;">
  160. 结论
  161. </view>
  162. <view>
  163. <uni-easyinput type="textarea" primaryColor="#37babd" v-model="form.conclusion">
  164. </uni-easyinput>
  165. </view>
  166. </view>
  167. <view class="desc">
  168. <view class="desc" style="font-size: 25rpx;">
  169. 备注
  170. </view>
  171. <view>
  172. <uni-easyinput type="textarea" primaryColor="#37babd" v-model="form.remark">
  173. </uni-easyinput>
  174. </view>
  175. </view>
  176. </view>
  177. <u-gap height="70" bgColor="#ffffff"></u-gap>
  178. <view class="bottim_view">
  179. <view>
  180. <u-row>
  181. <u-col span="11">
  182. <u-button :disabled="isDisabled" class="btnDoPay" shape="circle" @click="submit"
  183. color="rgb(55,186,189)" text="提交"></u-button>
  184. </u-col>
  185. </u-row>
  186. </view>
  187. </view>
  188. <!-- 下一步选择人员弹窗 -->
  189. <uni-popup ref="popup" background-color="#fff">
  190. <view style="height: 800rpx;">
  191. <view class="desc">
  192. <uni-row>
  193. <uni-col :span="10">
  194. <view style="font-size: 40rpx;color: rgb(145, 145, 145);">
  195. </view>
  196. </uni-col>
  197. <uni-col :span="11">
  198. <view style="font-size: 40rpx;color: rgb(98, 98, 98);">
  199. 下一步
  200. </view>
  201. </uni-col>
  202. <uni-col :span="3">
  203. <view @click="submitPass" style="font-size: 40rpx;color: rgb(55,186,189);">
  204. 确认
  205. </view>
  206. </uni-col>
  207. </uni-row>
  208. </view>
  209. <view>
  210. <!-- -->
  211. <uni-row>
  212. <uni-col>
  213. <view style="padding: 15rpx 20rpx;">
  214. <uni-data-picker ref="picker" placeholder="请选择" :popup-title="selectTitle"
  215. :localdata="dataTree" v-model="hxForm.candidate" @change="nextApprovalChange">
  216. </uni-data-picker>
  217. </view>
  218. </uni-col>
  219. </uni-row>
  220. </view>
  221. </view>
  222. </uni-popup>
  223. </view>
  224. </template>
  225. <script>
  226. export default {
  227. data() {
  228. return {
  229. isDisabled: false,
  230. selectTitle: '',
  231. hxForm: {},
  232. dataTree: [],
  233. fileList: [],
  234. form: {},
  235. header: {
  236. "Authorization": "Bearer " + uni.getStorageSync('token')
  237. },
  238. index: 0
  239. }
  240. },
  241. onLoad() {},
  242. methods: {
  243. async submit() {
  244. this.isDisabled = true
  245. // if (!this.form.name) {
  246. // this.isDisabled = false
  247. // uni.showModal({
  248. // content: '请输入姓名',
  249. // title: '提交失败',
  250. // showCancel: false
  251. // })
  252. // return
  253. // }
  254. // if (!this.form.sex) {
  255. // this.isDisabled = false
  256. // uni.showModal({
  257. // content: '请选择性别',
  258. // title: '提交失败',
  259. // showCancel: false
  260. // })
  261. // return
  262. // }
  263. // if (!this.form.phone) {
  264. // this.isDisabled = false
  265. // uni.showModal({
  266. // content: '请输入手机号',
  267. // title: '提交失败',
  268. // showCancel: false
  269. // })
  270. // return
  271. // }
  272. // if (this.form.phone.length != 11) {
  273. // this.isDisabled = false
  274. // uni.showModal({
  275. // content: '请输入手机号',
  276. // title: '提交失败',
  277. // showCancel: false
  278. // })
  279. // return
  280. // }
  281. // if (!this.form.birthdate) {
  282. // this.isDisabled = false
  283. // uni.showModal({
  284. // content: '请选择出生日期',
  285. // title: '提交失败',
  286. // showCancel: false
  287. // })
  288. // return
  289. // }
  290. // if (!this.form.degree) {
  291. // this.isDisabled = false
  292. // uni.showModal({
  293. // content: '请选择学历',
  294. // title: '提交失败',
  295. // showCancel: false
  296. // })
  297. // return
  298. // }
  299. // if (!this.form.skill) {
  300. // this.isDisabled = false
  301. // uni.showModal({
  302. // content: '请选择专业技能',
  303. // title: '提交失败',
  304. // showCancel: false
  305. // })
  306. // return
  307. // }
  308. // if (!this.form.jobInterview) {
  309. // this.isDisabled = false
  310. // uni.showModal({
  311. // content: '请选择意向岗位',
  312. // title: '提交失败',
  313. // showCancel: false
  314. // })
  315. // return
  316. // }
  317. // if (!this.form.interviewType) {
  318. // this.isDisabled = false
  319. // uni.showModal({
  320. // content: '请选择面试时间',
  321. // title: '提交失败',
  322. // showCancel: false
  323. // })
  324. // return
  325. // }
  326. // if (!this.form.interviewer) {
  327. // this.isDisabled = false
  328. // uni.showModal({
  329. // content: '请选择面试官',
  330. // title: '提交失败',
  331. // showCancel: false
  332. // })
  333. // return
  334. // }
  335. // if (!this.form.skillScore) {
  336. // this.isDisabled = false
  337. // uni.showModal({
  338. // content: '请选择技术水平',
  339. // title: '提交失败',
  340. // showCancel: false
  341. // })
  342. // return
  343. // }
  344. // if (!this.form.expectSalary) {
  345. // this.isDisabled = false
  346. // uni.showModal({
  347. // content: '请填写期望薪资',
  348. // title: '提交失败',
  349. // showCancel: false
  350. // })
  351. // return
  352. // }
  353. // if (this.fileList.length === 0) {
  354. // this.isDisabled = false
  355. // uni.showModal({
  356. // content: '请上传简历附件',
  357. // title: '提交失败',
  358. // showCancel: false
  359. // })
  360. // return
  361. // }
  362. setTimeout(() => {
  363. this.isDisabled = false
  364. }, 1000)
  365. //统一写入参数
  366. this.form.applyUserId = uni.getStorageSync('setUserName')
  367. this.form.applyUserName = uni.getStorageSync('userInfo').nickName
  368. // this.form.avatar = this.fileList[0].url
  369. const {
  370. data: res
  371. } = await this.$httpRequest({
  372. url: '/app/submitApply/interview',
  373. method: 'post',
  374. data: this.form,
  375. urlType: this.$getUrlType()
  376. });
  377. if (res.code === 200) {
  378. this.dataTree = res.data.tree
  379. this.hxForm.taskId = res.data.taskId
  380. this.$refs.popup.open('bottom')
  381. this.selectTitle = "请选择" + this.dataTree[0].text
  382. this.isDisabled = false
  383. } else {
  384. this.$showModal(res.msg)
  385. }
  386. this.isDisabled = false
  387. },
  388. async getPostData() {
  389. const {
  390. data: res
  391. } = await this.$httpRequest({
  392. url: '/app/posts',
  393. method: 'get',
  394. urlType: this.$getUrlType()
  395. });
  396. if (res.code === 200) {
  397. this.post.data = res.data
  398. } else {
  399. }
  400. },
  401. nextApprovalChange(e) {
  402. // console.log('onchange:', e.detail.value[1].text);
  403. this.hxForm.applyUserName = e.detail.value[1].text
  404. this.hxForm.candidate = e.detail.value[1].value
  405. },
  406. onchange(e) {
  407. setTimeout(() => {
  408. }, 200)
  409. },
  410. maskClick(e) {
  411. },
  412. bindPickerChange: function(e) {
  413. this.index = e.detail.value
  414. },
  415. interviewTypeBindPickerChange: function(e) {
  416. this.interview_type.index = e.detail.value
  417. this.form.interviewType = this.interview_type.data[this.interview_type.index].dictValue
  418. },
  419. sexsBindPickerChange: function(e) {
  420. this.sexs.index = e.detail.value
  421. this.form.sex = this.sexs.data[this.sexs.index].dictValue
  422. },
  423. degreeBindPickerChange: function(e) {
  424. this.degree.index = e.detail.value
  425. this.form.degree = this.degree.data[this.degree.index].dictValue
  426. },
  427. // 删除图片
  428. deletePic(event) {
  429. this.fileList.splice(event.index, 1)
  430. },
  431. async submitPass() {
  432. if (!this.hxForm.candidate) {
  433. uni.showModal({
  434. content: '请选择' + this.dataTree[0].text,
  435. title: '提交失败',
  436. showCancel: false,
  437. })
  438. }
  439. const {
  440. data: res
  441. } = await this.$httpRequest({
  442. url: '/app/task/submit/candidate?taskId=' + this.hxForm.taskId +
  443. '&candidate=' + this.hxForm.candidate + '&applyUserName=' + this.hxForm.applyUserName,
  444. method: 'get',
  445. urlType: this.$getUrlType()
  446. });
  447. if (res.code === 200) {
  448. uni.showModal({
  449. content: '已提交给审批人员',
  450. title: '提交成功',
  451. showCancel: false,
  452. success() {
  453. uni.navigateBack()
  454. }
  455. })
  456. } else {
  457. uni.showModal({
  458. content: res.msg,
  459. title: '提交失败',
  460. showCancel: false,
  461. success() {
  462. uni.navigateBack()
  463. }
  464. })
  465. }
  466. },
  467. // 新增图片
  468. async afterRead(event) {
  469. // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
  470. let lists = [].concat(event.file)
  471. let fileListLen
  472. if (this.fileList) {
  473. fileListLen = this.fileList.length
  474. } else {
  475. this.fileList = []
  476. fileListLen = 0
  477. }
  478. lists.map((item) => {
  479. this.fileList.push({
  480. ...item,
  481. status: 'uploading',
  482. message: '上传中'
  483. })
  484. })
  485. for (let i = 0; i < lists.length; i++) {
  486. const result = await this.uploadFilePromise(lists[i].url)
  487. let item = this.fileList[fileListLen]
  488. this.fileList.splice(fileListLen, 1, Object.assign(item, {
  489. status: 'success',
  490. message: '',
  491. url: result
  492. }))
  493. fileListLen++
  494. }
  495. this.form.involveFile = this.this.fileList[0].url
  496. },
  497. uploadFilePromise(url) {
  498. return new Promise((resolve, reject) => {
  499. let a = uni.uploadFile({
  500. url: this.$BASE_URL + '/common/upload', // 仅为示例,非真实的接口地址
  501. filePath: url,
  502. name: 'file',
  503. header: this.header,
  504. success: (res) => {
  505. // console.log(JSON.parse(res.data).url);
  506. setTimeout(() => {
  507. resolve(JSON.parse(res.data).url)
  508. }, 1000)
  509. }
  510. });
  511. })
  512. }
  513. }
  514. }
  515. </script>
  516. <style lang="scss" scoped>
  517. .desc {
  518. padding: 10rpx 5rpx;
  519. color: #818181;
  520. font-size: 20rpx;
  521. }
  522. .pickerView {
  523. // align-items: flex-end;
  524. padding: 10rpx 20rpx;
  525. border: 1rpx #eeeeee solid;
  526. }
  527. .pickerText {
  528. font-size: 26rpx;
  529. color: #b1b1b1;
  530. }
  531. .bottim_view {
  532. padding: 5px 20px 30px;
  533. position: fixed;
  534. left: 0px;
  535. bottom: 0px;
  536. width: 100%;
  537. height: 40px;
  538. background-color: #ffffff;
  539. }
  540. </style>