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

373 lines
7.5 KiB

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