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

365 lines
7.3 KiB

4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
4 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. title: '',
  135. typeId : '',
  136. areaId : '',
  137. natureId : '',
  138. age : '',
  139. nation : '',
  140. salaryLow : '',
  141. salaryUp : '',
  142. qualification : '',
  143. brief: '',
  144. },
  145. sexList : [
  146. {
  147. name : '男',
  148. },
  149. {
  150. name : '女',
  151. },
  152. ],
  153. picker : {
  154. qualification : [
  155. '初中',
  156. '高中',
  157. '专科',
  158. '本科',
  159. '研究生',
  160. '博士',
  161. ],
  162. },
  163. pickerKey : 'workAge',
  164. }
  165. },
  166. computed : {
  167. ...mapState(['natureList', 'jobTypeList', 'addressList']),
  168. columns(){
  169. return [this.picker[this.pickerKey]]
  170. },
  171. },
  172. onLoad() {
  173. this.list[0].tag = this.jobTypeList
  174. this.list[1].tag = this.addressList
  175. this.list[2].tag = this.natureList
  176. this.queryResumeByUserId()
  177. },
  178. methods: {
  179. clickTag(item, index){
  180. item.index = index
  181. },
  182. openPicker(key, picker){
  183. this.pickerKey = key
  184. if(picker){
  185. picker.open()
  186. }else{
  187. this.$refs.picker.open()
  188. }
  189. },
  190. pickerConfirm(e){
  191. console.log(e);
  192. let data = e.value[0]
  193. if(data && data.id){
  194. this.form[this.pickerKey] = data.id
  195. this.form[this.pickerKey + '_dictText'] = data.name || data.adress
  196. }else{
  197. this.form[this.pickerKey] = data
  198. }
  199. },
  200. // 提交
  201. submit(){
  202. // if(this.fileList.length == 0){
  203. // return uni.showToast({
  204. // title: '请上传图片',
  205. // icon : 'none'
  206. // })
  207. // }
  208. this.list.forEach(n => {
  209. this.form[n.type] = n.tag[n.index].id
  210. })
  211. if (this.$utils.verificationAll(this.form, {
  212. title: '请输入求职岗位',
  213. typeId : '请选择工种',
  214. areaId : '请选择工作的地区',
  215. natureId : '请选择工作的性质',
  216. age : '请输入您的年龄',
  217. sex : '请选择性别',
  218. nation : '请输入您的民族',
  219. salaryLow : '请输入期望薪资下限',
  220. salaryUp : '请输入期望薪资上限',
  221. qualification : '请选择您的学历',
  222. brief: '请输入个人介绍',
  223. })) {
  224. return
  225. }
  226. let data = {
  227. title: this.form.title,
  228. typeId : this.form.typeId,
  229. areaId : this.form.areaId,
  230. natureId : this.form.natureId,
  231. age : this.form.age,
  232. nation : this.form.nation,
  233. salaryLow : this.form.salaryLow,
  234. salaryUp : this.form.salaryUp,
  235. qualification : this.form.qualification,
  236. brief: this.form.brief,
  237. sex: this.form.sex,
  238. }
  239. if(this.form.id){
  240. data.id = this.form.id
  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 && res.result && res.result.records[0]){
  255. this.form = res.result.records[0]
  256. if(res.result.records[0]!=null){
  257. this.form.id=res.result.records[0].id
  258. }
  259. }
  260. })
  261. },
  262. },
  263. }
  264. </script>
  265. <style scoped lang="scss">
  266. .page{
  267. background-color: #fff;
  268. min-height: 100vh;
  269. .box{
  270. padding: 30rpx;
  271. .list {
  272. .item {
  273. margin-top: 20rpx;
  274. .title {
  275. font-weight: 900;
  276. font-size: 30rpx;
  277. }
  278. .tagList {
  279. display: flex;
  280. flex-wrap: wrap;
  281. padding: 10rpx 0;
  282. view {
  283. background: rgba($uni-color, 0.1);
  284. padding: 10rpx 20rpx;
  285. margin: 10rpx;
  286. border-radius: 10rpx;
  287. font-size: 26rpx;
  288. }
  289. .act {
  290. color: #fff;
  291. background: $uni-color;
  292. }
  293. }
  294. }
  295. }
  296. .form-sheet-cell{
  297. display: flex;
  298. background-color: #fff;
  299. padding: 20rpx;
  300. align-items: center;
  301. .label{
  302. width: 160rpx;
  303. font-weight: 900;
  304. }
  305. .price{
  306. display: flex;
  307. text-align: center;
  308. input{
  309. width: 150rpx;
  310. border: 1px solid $uni-color;
  311. margin: 0 10rpx;
  312. }
  313. }
  314. input{
  315. flex: 1;
  316. background-color: rgba($uni-color, 0.1);
  317. padding: 10rpx 20rpx;
  318. border-radius: 10rpx;
  319. }
  320. .right-icon{
  321. margin-left: auto;
  322. }
  323. }
  324. /deep/ .uv-textarea{
  325. background-color: rgba($uni-color, 0.1) !important;
  326. min-height: 400rpx;
  327. }
  328. }
  329. }
  330. </style>