joinPerson.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. <template>
  2. <view class="content">
  3. <view class="" v-if="state == 0 || state == 1">
  4. <view class="top hflex acenter" v-if="state == 1">
  5. <image src="/static/images/comment/person.png" class="top_img"></image>
  6. <view class="top_text">你已成功加入人才库</view>
  7. </view>
  8. <view class="box" style="margin-top: 20rpx;">
  9. <view class="box_title">基本信息</view>
  10. <view class="hflex acenter jbetween cell">
  11. <view class="left">姓名</view>
  12. <u-input v-model="userInfo.name" placeholder="请输入您的姓名" inputAlign="right" border="none"></u-input>
  13. </view>
  14. <picker @change="bindSexChange" :value="index" :range="sexList">
  15. <view class="hflex acenter jbetween cell">
  16. <view class="left">性别</view>
  17. <u-input border="none" v-model="sexList[userInfo.sex]" placeholder="请选择您的性别" suffixIcon="arrow-right" suffixIconStyle="color: #b7b7b7" inputAlign="right"></u-input>
  18. </view>
  19. </picker>
  20. <picker @change="bindAgeChange" :value="index" :range="ageList">
  21. <view class="hflex acenter jbetween cell">
  22. <view class="left">年龄</view>
  23. <u-input border="none" v-model="ageList[userInfo.age]" placeholder="请选择您的年龄" suffixIcon="arrow-right" suffixIconStyle="color: #b7b7b7" inputAlign="right"></u-input>
  24. </view>
  25. </picker>
  26. <view class="hflex acenter jbetween cell">
  27. <view class="left">籍贯</view>
  28. <u-input v-model="userInfo.place" placeholder="请输入您的籍贯" inputAlign="right" border="none"></u-input>
  29. </view>
  30. <view class="hflex acenter jbetween cell">
  31. <view class="left">电话</view>
  32. <u-input v-model="userInfo.phone" placeholder="请输入您的电话" inputAlign="right" border="none"></u-input>
  33. </view>
  34. <view class="hflex acenter jbetween cell">
  35. <view class="left">邮箱</view>
  36. <u-input v-model="userInfo.email" placeholder="请输入您的邮箱" inputAlign="right" border="none"></u-input>
  37. </view>
  38. <picker mode="region" @change="changeAddress" :value="index" >
  39. <view class="hflex acenter jbetween cell">
  40. <view class="left">所在地区</view>
  41. <u-input border="none" inputAlign="right" v-model="userInfo.region" placeholder="请选择省市区" suffixIcon="arrow-right" suffixIconStyle="color: #b7b7b7"></u-input>
  42. </view>
  43. </picker>
  44. <view class="hflex acenter jbetween cell">
  45. <view class="left">详细地址</view>
  46. <u-input v-model="address" placeholder="街道,楼牌号等" inputAlign="right" border="none"></u-input>
  47. </view>
  48. <picker @change="bindEduChange" :value="index" :range="educationList">
  49. <view class="hflex acenter jbetween cell">
  50. <view class="left">学历</view>
  51. <u-input border="none" v-model="educationList[userInfo.education]" placeholder="请选择您的学历" suffixIcon="arrow-right" suffixIconStyle="color: #b7b7b7" inputAlign="right"></u-input>
  52. </view>
  53. </picker>
  54. <view class="hflex acenter jbetween cell">
  55. <view class="left">个人特长</view>
  56. <u-input v-model="userInfo.specialty" placeholder="请输入您的特长" inputAlign="right" border="none"></u-input>
  57. </view>
  58. <view class="hflex acenter jbetween cell">
  59. <view class="left">技能</view>
  60. <u-input v-model="userInfo.skill" placeholder="请输入您的技能描述" inputAlign="right" border="none"></u-input>
  61. </view>
  62. <picker @change="bindTitleChange" :value="index" :range="titleList">
  63. <view class="hflex acenter jbetween cell">
  64. <view class="left">职称选择</view>
  65. <u-input border="none" v-model="titleList[userInfo.title]" placeholder="请选择您的职称" suffixIcon="arrow-right" suffixIconStyle="color: #b7b7b7" inputAlign="right"></u-input>
  66. </view>
  67. </picker>
  68. </view>
  69. <view class="box">
  70. <view class="box_title">简历及相关信息</view>
  71. <view class="box_title">工作履历</view>
  72. <view class="box_subTitle">请填写您近年来的工作经历</view>
  73. <u-input v-model="userInfo.work" border="bottom"></u-input>
  74. <view class="box_title">资质证书</view>
  75. <view class="box_subTitle">至少上传一张专业证书(包含毕业证书),证书请完整展示姓名,证书名称,证书日期及有效期</view>
  76. <view class="upload">
  77. <u-upload :fileList="userInfo.imgList" @afterRead="afterRead" @delete="deletePic" :maxCount="10" name="1" multiple :previewFullImage="true" width="110" height="110">
  78. <image src="/static/images/comment/upload.png" style="width: 220rpx;height: 220rpx;"></image>
  79. </u-upload>
  80. </view>
  81. <view class="box_title">培训经历</view>
  82. <view class="box_subTitle">请详细描述您的培训经历</view>
  83. <u-input v-model="userInfo.train" border="bottom"></u-input>
  84. <view class="bottom" v-if="state == 0">
  85. <view class="btn" @click="submit">提交</view>
  86. </view>
  87. </view>
  88. </view>
  89. <view class="box1 vflex acenter" v-if="state == 2">
  90. <image src="/static/images/comment/wait.png" class="box1_img"></image>
  91. <view class="box1_title">审核中</view>
  92. <view class="box1_subTitle">预计审核时间3个工作日</view>
  93. <view class="box1_subTitle">请留意当前页面变动</view>
  94. <view class="btn" @click="result">返回</view>
  95. </view>
  96. <view class="box1 vflex acenter" v-if="state == 3">
  97. <image src="/static/images/comment/error.png" class="box1_img"></image>
  98. <view class="box1_title">审核失败</view>
  99. <view class="box1_subTitle">驳回原因</view>
  100. <view class="box1_subTitle">{{reason}}<span style="color: #506dff;margin-left: 8rpx;" @click="edit">立即修改></span></view>
  101. <view class="btn" @click="result">返回</view>
  102. </view>
  103. </view>
  104. </template>
  105. <script>
  106. import $api from '@/static/js/api.js'
  107. var that = ''
  108. export default {
  109. data() {
  110. return {
  111. userInfo: {
  112. name: '', //姓名
  113. sex: '', //性别
  114. age: '', //年龄
  115. place: '', //籍贯
  116. phone: '', //电话
  117. email: '', //邮箱
  118. region: '', //所在地区
  119. address: '', //详细地址
  120. education: '', //学历
  121. specialty: '', //特长
  122. skill: '', //技能
  123. title: '', //职称
  124. work: '', //工作经历
  125. imgList: [], //资质证明
  126. train: '', //培训经历
  127. },
  128. sexList: ['男','女'],
  129. ageList: ['18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50'],
  130. educationList: ['初中','高中','专科','本科','研究生','博士'],
  131. titleList: ['初级','中级','高级','特级'],
  132. state: 3, //0 未加入,1 已加入,2 审核中, 3审核失败
  133. reason: '资料填写不完整', //驳回原因
  134. }
  135. },
  136. onLoad() {
  137. that = this
  138. },
  139. methods: {
  140. // 选择性别
  141. bindSexChange(e) {
  142. that.userInfo.sex = e.detail.value
  143. },
  144. // 选择年龄
  145. bindAgeChange(e) {
  146. that.userInfo.age = e.detail.value
  147. },
  148. // 选择所在地区
  149. changeAddress(e) {
  150. console.log(e);
  151. that.userInfo.region = e.detail.value[0] + '-' + e.detail[1] + '-' + e.detail[2]
  152. },
  153. // 选择学历
  154. bindEduChange(e) {
  155. that.userInfo.education = e.detail.value
  156. },
  157. // 选择职称
  158. bindTitleChange(e) {
  159. that.userInfo.title = e.detail.value
  160. },
  161. // 删除图片
  162. deletePic(event) {
  163. that.userInfo.imgList.splice(event.index, 1)
  164. },
  165. // 新增图片
  166. async afterRead(event) {
  167. // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
  168. let lists = [].concat(event.file)
  169. let imgListLen = this.userInfo.imgList.length
  170. lists.map((item) => {
  171. this.userInfo.imgList.push({
  172. ...item,
  173. status: 'uploading',
  174. message: '上传中'
  175. })
  176. })
  177. for (let i = 0; i < lists.length; i++) {
  178. const result = await this.uploadFilePromise(lists[i].url)
  179. let item = this.userInfo.imgList[imgListLen]
  180. this.userInfo.imgList.splice(imgListLen, 1, Object.assign(item, {
  181. status: 'success',
  182. message: '',
  183. url: result
  184. }))
  185. imgListLen++
  186. }
  187. },
  188. // 上传图片
  189. uploadFilePromise(url) {
  190. return new Promise((resolve, reject) => {
  191. let a = uni.uploadFile({
  192. url: 'http://192.168.2.21:7001/upload', // 仅为示例,非真实的接口地址
  193. filePath: url,
  194. name: 'file',
  195. formData: {
  196. user: 'test'
  197. },
  198. success: (res) => {
  199. setTimeout(() => {
  200. resolve(res.data.data)
  201. }, 1000)
  202. }
  203. });
  204. })
  205. },
  206. // 立即修改
  207. edit() {
  208. that.state = 0
  209. },
  210. // 返回
  211. result() {
  212. $api.jump(-1)
  213. },
  214. // 提交
  215. submit() {
  216. var u = that.userInfo
  217. if ($api.formCheck(u.name,'truename') && $api.formCheck(u.sex,'required') && $api.formCheck(u.age,'required') && $api.formCheck(u.phone,'mobile') && $api.formCheck(u.email,'email')) {
  218. $api.jump('/pages/tabbar/mine/mine',3)
  219. }
  220. }
  221. },
  222. }
  223. </script>
  224. <style lang="scss" scoped>
  225. .content::v-deep {
  226. background-color: #f4f4f4;
  227. // padding-top: 20rpx;
  228. .top {
  229. width: 100%;
  230. height: 60rpx;
  231. background-color: #f8efe2;
  232. padding: 20rpx 32rpx;
  233. box-sizing: border-box;
  234. .top_img {
  235. width: 36rpx;
  236. height: 36rpx;
  237. }
  238. .top_text {
  239. font-size: 26rpx;
  240. margin-left: 6rpx;
  241. color: #330e00;
  242. }
  243. }
  244. .box {
  245. width: 100%;
  246. background-color: #fff;
  247. margin-bottom: 20rpx;
  248. box-sizing: border-box;
  249. padding: 28rpx 30rpx;
  250. .box_title {
  251. font-size: 30rpx;
  252. color: #222;
  253. margin: 20rpx 0 32rpx;
  254. }
  255. .box_subTitle {
  256. font-size: 26rpx;
  257. color: #b7b7b7;
  258. // margin: ;
  259. }
  260. .upload {
  261. margin-top: 20rpx;
  262. width: 100%;
  263. padding-bottom: 20rpx;
  264. border-bottom: 1rpx solid #f4f4f4;
  265. }
  266. .u-input {
  267. width: 100%;
  268. margin-top: 30rpx;
  269. }
  270. .cell {
  271. width: 100%;
  272. padding: 20rpx 0;
  273. .left {
  274. font-size: 28rpx;
  275. color: #222;
  276. }
  277. .u-input {
  278. font-size: 28rpx;
  279. color: #222;
  280. }
  281. }
  282. .bottom {
  283. margin: 80rpx 0 50rpx;
  284. .btn {
  285. width: 100%;
  286. height: 88rpx;
  287. border-radius: 44rpx;
  288. text-align: center;
  289. line-height: 88rpx;
  290. background-color: #506dff;
  291. font-size: 36rpx;
  292. color: #fff;
  293. }
  294. }
  295. }
  296. .box1 {
  297. width: 100%;
  298. height: 100vh;
  299. background-color: #fff;
  300. .box1_img {
  301. width: 124rpx;
  302. height: 124rpx;
  303. margin: 108rpx 0 40rpx;
  304. }
  305. .box1_title {
  306. font-size: 32rpx;
  307. color: #222;
  308. margin-bottom: 24rpx;
  309. }
  310. .box1_subTitle {
  311. margin: 12rpx 0;
  312. font-size: 26rpx;
  313. color: #595959;
  314. }
  315. .btn {
  316. width: 530rpx;
  317. height: 88rpx;
  318. background-color: #506dff;
  319. color: #fff;
  320. text-align: center;
  321. line-height: 88rpx;
  322. border-radius: 44rpx;
  323. font-size: 36rpx;
  324. margin-top: 122rpx;
  325. }
  326. }
  327. }
  328. </style>