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

313 lines
6.1 KiB

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