特易招,招聘小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

376 lines
7.6 KiB

6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
4 months ago
6 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
4 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
4 months ago
6 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
6 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
6 months ago
4 months ago
4 months ago
4 months ago
6 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="在线简历"
  4. leftClick
  5. @leftClick="$utils.navigateBack"/>
  6. <view class="box">
  7. <view class="list">
  8. <view class="item"
  9. v-for="(item, index) in list"
  10. :key="index">
  11. <view class="title">
  12. {{ item.title }}
  13. </view>
  14. <view class="tagList">
  15. <view :class="{act : i == item.index}"
  16. @click="clickTag(item, i)" v-for="(t, i) in item.tag"
  17. :key="t.id">
  18. {{ t.name || t.adress }}
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="form-sheet-cell">
  24. <view class="label">
  25. 求职岗位
  26. </view>
  27. <input placeholder="请输入求职岗位"
  28. v-model="form.title" />
  29. </view>
  30. <view class="form-sheet-cell">
  31. <view class="label">
  32. 您的年龄
  33. </view>
  34. <input placeholder="请输入年龄"
  35. type="number"
  36. v-model="form.age" />
  37. </view>
  38. <view class="form-sheet-cell">
  39. <view class="label">
  40. 您的性别
  41. </view>
  42. <uv-radio-group v-model="form.sex">
  43. <view style="display: flex;justify-content: center;">
  44. <uv-radio
  45. :customStyle="{margin: '8px'}"
  46. v-for="(item, index) in sexList"
  47. :key="index"
  48. iconSize="30rpx"
  49. size="40rpx"
  50. labelSize="26rpx"
  51. :label="item.name"
  52. :name="item.name">
  53. </uv-radio>
  54. </view>
  55. </uv-radio-group>
  56. </view>
  57. <view class="form-sheet-cell">
  58. <view class="label">
  59. 您的民族
  60. </view>
  61. <input placeholder="请输入民族"
  62. v-model="form.nation" />
  63. </view>
  64. <view class="form-sheet-cell">
  65. <view class="label">
  66. 期望薪资
  67. </view>
  68. <view class="price">
  69. <input placeholder="下限" v-model="form.salaryLow" />
  70. ~
  71. <input placeholder="上限" v-model="form.salaryUp" />
  72. </view>
  73. </view>
  74. <view class="form-sheet-cell"
  75. @click="openPicker('qualification')">
  76. <view class="label">
  77. 您的学历
  78. </view>
  79. <input placeholder="请选择学历"
  80. disabled
  81. v-model="form.qualification" />
  82. </view>
  83. <!-- <view class="form-sheet-cell">
  84. <view class="label">
  85. 您的学历
  86. </view>
  87. <input placeholder="请输入您的学历"
  88. v-model="form.qualification" />
  89. </view> -->
  90. <uv-textarea
  91. v-model="form.brief"
  92. count
  93. :maxlength="300"
  94. autoHeight
  95. placeholder="请输入个人介绍"></uv-textarea>
  96. <view class="uni-color-btn"
  97. @click="submit">
  98. 发布
  99. </view>
  100. </view>
  101. <uv-picker ref="picker"
  102. :columns="columns"
  103. @confirm="pickerConfirm"></uv-picker>
  104. </view>
  105. </template>
  106. <script>
  107. import { mapState } from 'vuex'
  108. export default {
  109. data() {
  110. return {
  111. list: [
  112. {
  113. title: '您希望从事的工种',
  114. tag: [],
  115. index: 0,
  116. type : 'typeId',
  117. },
  118. {
  119. title: '您希望从事工作的地区',
  120. tag: [],
  121. index: 0,
  122. type : 'areaId',
  123. },
  124. {
  125. title: '您希望从事工作的性质',
  126. tag: [],
  127. index: 0,
  128. type : 'natureId',
  129. },
  130. ],
  131. form : {
  132. sex : '男',
  133. qulification : '',
  134. },
  135. sexList : [
  136. {
  137. name : '男',
  138. },
  139. {
  140. name : '女',
  141. },
  142. ],
  143. picker : {
  144. qualification : [
  145. '初中',
  146. '高中',
  147. '专科',
  148. '本科',
  149. '研究生',
  150. '博士',
  151. ],
  152. },
  153. pickerKey : 'workAge',
  154. }
  155. },
  156. computed : {
  157. ...mapState(['natureList', 'jobTypeList', 'addressList']),
  158. columns(){
  159. return [this.picker[this.pickerKey]]
  160. },
  161. },
  162. onLoad() {
  163. this.list[0].tag = this.jobTypeList
  164. this.list[1].tag = this.addressList
  165. this.list[2].tag = this.natureList
  166. this.queryResumeByUserId()
  167. },
  168. methods: {
  169. clickTag(item, index){
  170. item.index = index
  171. },
  172. openPicker(key, picker){
  173. this.pickerKey = key
  174. if(picker){
  175. picker.open()
  176. }else{
  177. this.$refs.picker.open()
  178. }
  179. },
  180. pickerConfirm(e){
  181. console.log(e);
  182. let data = e.value[0]
  183. if(data && data.id){
  184. this.form[this.pickerKey] = data.id
  185. this.form[this.pickerKey + '_dictText'] = data.name || data.adress
  186. }else{
  187. this.form[this.pickerKey] = data
  188. }
  189. },
  190. // 提交
  191. submit(){
  192. // if(this.fileList.length == 0){
  193. // return uni.showToast({
  194. // title: '请上传图片',
  195. // icon : 'none'
  196. // })
  197. // }
  198. this.list.forEach(n => {
  199. this.form[n.type] = n.tag[n.index].id
  200. })
  201. if (this.$utils.verificationAll(this.form, {
  202. title: '请输入求职岗位',
  203. typeId : '请选择工种',
  204. areaId : '请选择工作的地区',
  205. natureId : '请选择工作的性质',
  206. age : '请输入您的年龄',
  207. nation : '请输入您的民族',
  208. salaryLow : '请输入期望薪资下限',
  209. salaryUp : '请输入期望薪资上限',
  210. qualification : '请选择您的学历',
  211. brief: '请输入个人介绍',
  212. })) {
  213. return
  214. }
  215. // 清理不需要给后端的字段
  216. delete this.form.createBy
  217. delete this.form.createTime
  218. delete this.form.updateBy
  219. delete this.form.updateTime
  220. delete this.form.userId
  221. let data = {
  222. title: this.form.title,
  223. typeId : this.form.typeId,
  224. areaId : this.form.areaId,
  225. natureId : this.form.natureId,
  226. age : this.form.age,
  227. nation : this.form.nation,
  228. salaryLow : this.form.salaryLow,
  229. salaryUp : this.form.salaryUp,
  230. qualification : this.form.qualification,
  231. brief: this.form.brief
  232. }
  233. if(this.form.id !=null){
  234. data = {
  235. id:this.form.id,
  236. title: this.form.title,
  237. typeId : this.form.typeId,
  238. areaId : this.form.areaId,
  239. natureId : this.form.natureId,
  240. age : this.form.age,
  241. nation : this.form.nation,
  242. salaryLow : this.form.salaryLow,
  243. salaryUp : this.form.salaryUp,
  244. qualification : this.form.qualification,
  245. brief: this.form.brief
  246. }
  247. }
  248. this.$api('addResume', data, res => {
  249. if(res.code == 200){
  250. uni.showToast({
  251. title: '发布成功!',
  252. icon: 'none'
  253. })
  254. setTimeout(uni.navigateBack, 1000, -1)
  255. }
  256. })
  257. },
  258. queryResumeByUserId(){
  259. this.$api('queryResumeByUserId', res => {
  260. if(res.code == 200){
  261. this.form = res.result.records[0] || {
  262. sex : '男',
  263. qulification : '',
  264. }
  265. if(res.result.records[0]!=null){
  266. this.form.id=res.result.records[0].id
  267. }
  268. }
  269. })
  270. },
  271. },
  272. }
  273. </script>
  274. <style scoped lang="scss">
  275. .page{
  276. background-color: #fff;
  277. min-height: 100vh;
  278. .box{
  279. padding: 30rpx;
  280. .list {
  281. .item {
  282. margin-top: 20rpx;
  283. .title {
  284. font-weight: 900;
  285. font-size: 30rpx;
  286. }
  287. .tagList {
  288. display: flex;
  289. flex-wrap: wrap;
  290. padding: 10rpx 0;
  291. view {
  292. background: rgba($uni-color, 0.1);
  293. padding: 10rpx 20rpx;
  294. margin: 10rpx;
  295. border-radius: 10rpx;
  296. font-size: 26rpx;
  297. }
  298. .act {
  299. color: #fff;
  300. background: $uni-color;
  301. }
  302. }
  303. }
  304. }
  305. .form-sheet-cell{
  306. display: flex;
  307. background-color: #fff;
  308. padding: 20rpx;
  309. align-items: center;
  310. .label{
  311. width: 160rpx;
  312. font-weight: 900;
  313. }
  314. .price{
  315. display: flex;
  316. text-align: center;
  317. input{
  318. width: 150rpx;
  319. border: 1px solid $uni-color;
  320. margin: 0 10rpx;
  321. }
  322. }
  323. input{
  324. flex: 1;
  325. background-color: rgba($uni-color, 0.1);
  326. padding: 10rpx 20rpx;
  327. border-radius: 10rpx;
  328. }
  329. .right-icon{
  330. margin-left: auto;
  331. }
  332. }
  333. /deep/ .uv-textarea{
  334. background-color: rgba($uni-color, 0.1) !important;
  335. min-height: 400rpx;
  336. }
  337. }
  338. }
  339. </style>