特易招,招聘小程序
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.

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