瑶都万能墙
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.

406 lines
8.1 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
3 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
3 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
4 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="发布招工" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="form">
  5. <view class="help-issue">
  6. <text>招工标题</text>
  7. <text style="color: #BD3624;">*</text>
  8. </view>
  9. <view class="form-sheet-cell">
  10. <input type="text"
  11. v-model="form.title"
  12. class="title-input"/>
  13. </view>
  14. <uv-cell
  15. title="工作地点"
  16. rightIconStyle="fontSize: 30rpx;"
  17. :value="form.address || '请选择招工地点'"
  18. @click="selectAddr"
  19. isLink
  20. ></uv-cell>
  21. <!-- <uv-cell
  22. title="学历要求"
  23. rightIconStyle="fontSize: 30rpx;"
  24. :value="form.school || '请选择学历要求'"
  25. @click="openPicker('school')"
  26. isLink
  27. ></uv-cell> -->
  28. <uv-cell
  29. title="工龄要求"
  30. rightIconStyle="fontSize: 30rpx;"
  31. :value="form.workYear || '请选择工龄要求'"
  32. @click="openPicker('workYear')"
  33. isLink
  34. ></uv-cell>
  35. <!-- <view class="form-sheet-cell">
  36. <view class="label">
  37. 薪资范围
  38. </view>
  39. <view class="price">
  40. <input placeholder="最小薪资" v-model="form.minPrice" />
  41. ~
  42. <input placeholder="最大薪资" v-model="form.maxPrice" />
  43. </view>
  44. </view> -->
  45. <view class="form-sheet-cell">
  46. <view class="label">
  47. 招聘公司
  48. </view>
  49. <input placeholder="请输入招聘公司" v-model="form.company" />
  50. </view>
  51. <view class="form-sheet-cell">
  52. <view class="label">
  53. 薪资范围
  54. </view>
  55. <input placeholder="请输入薪资范围" v-model="form.minPrice" />
  56. </view>
  57. <!-- <view class="form-sheet-cell">
  58. <view class="label">
  59. 结算方式
  60. </view>
  61. <uv-radio-group v-model="radiovalue">
  62. <view class="price">
  63. <uv-radio
  64. :customStyle="{margin: '8px'}"
  65. v-for="(item, index) in priceList"
  66. :key="index"
  67. iconSize="30rpx"
  68. size="40rpx"
  69. labelSize="26rpx"
  70. :label="item.name"
  71. :name="item.name">
  72. </uv-radio>
  73. </view>
  74. </uv-radio-group>
  75. </view>
  76. <view class="form-sheet-cell">
  77. <view class="label">
  78. 工作性质
  79. </view>
  80. <uv-radio-group v-model="radiovalue">
  81. <view class="price">
  82. <uv-radio
  83. :customStyle="{margin: '8px'}"
  84. v-for="(item, index) in jopList"
  85. :key="index"
  86. iconSize="30rpx"
  87. size="40rpx"
  88. labelSize="26rpx"
  89. :label="item.name"
  90. :name="item.name">
  91. </uv-radio>
  92. </view>
  93. </uv-radio-group>
  94. </view> -->
  95. <view class="form-sheet-cell">
  96. <view class="label">
  97. 标签
  98. </view>
  99. <input placeholder="请输入标签(多个用,号分割)" v-model="form.iconText" />
  100. </view>
  101. <!-- <view class="form-sheet-cell">
  102. <view class="label">
  103. 联系人
  104. </view>
  105. <input placeholder="请输入联系人" v-model="form.userName" />
  106. </view> -->
  107. <view class="form-sheet-cell">
  108. <view class="label">
  109. 联系人
  110. </view>
  111. <input placeholder="请输入联系人" v-model="form.userName" />
  112. </view>
  113. <view class="form-sheet-cell">
  114. <view class="label">
  115. 联系电话
  116. </view>
  117. <input placeholder="请输入联系电话" v-model="form.userPhone" />
  118. </view>
  119. <view class="category">
  120. <view class="title">
  121. 选择地区
  122. </view>
  123. <view class="tagList">
  124. <view
  125. :class="{act : t.id == form.addId}"
  126. @click="form.addId = t.id"
  127. v-for="(t, i) in cityList"
  128. :key="i">
  129. {{ t.name }}
  130. </view>
  131. </view>
  132. </view>
  133. <view class=""
  134. style="margin-top: 20rpx;">
  135. <uv-textarea
  136. v-model="form.jobContext"
  137. count
  138. :maxlength="300"
  139. autoHeight
  140. placeholder="请输入职位描述"></uv-textarea>
  141. </view>
  142. <view class=""
  143. style="margin-top: 20rpx;">
  144. <uv-textarea
  145. v-model="form.school"
  146. count
  147. :maxlength="300"
  148. autoHeight
  149. placeholder="请输入岗位要求"></uv-textarea>
  150. </view>
  151. <view class=""
  152. style="margin-top: 20rpx;">
  153. <uv-textarea
  154. v-model="form.jobDetails"
  155. count
  156. :maxlength="300"
  157. autoHeight
  158. placeholder="请输入岗位详细介绍"></uv-textarea>
  159. </view>
  160. <view class=""
  161. style="margin-top: 20rpx;">
  162. <uv-textarea
  163. v-model="form.gsContext"
  164. count
  165. :maxlength="300"
  166. autoHeight
  167. placeholder="请输入公司介绍"></uv-textarea>
  168. </view>
  169. <view class="uni-color-btn"
  170. @click="submit">
  171. 发布
  172. </view>
  173. </view>
  174. <uv-picker ref="picker"
  175. :columns="columns"
  176. @confirm="pickerConfirm"></uv-picker>
  177. </view>
  178. </template>
  179. <script>
  180. import Position from '@/utils/position.js'
  181. import { mapState } from 'vuex'
  182. export default {
  183. data() {
  184. return {
  185. form : {
  186. school : '',
  187. workYear : '',
  188. minPrice : '',
  189. maxPrice : '',
  190. address : '',
  191. addId : '',
  192. company : '',
  193. gsContext : '',
  194. jobContext : '',
  195. },
  196. radiovalue : '',
  197. priceList : [
  198. {
  199. name : '日结',
  200. },
  201. {
  202. name : '月结',
  203. },
  204. ],
  205. jopList : [
  206. {
  207. name : '正式工',
  208. },
  209. {
  210. name : '临时工',
  211. },
  212. ],
  213. picker : {
  214. workYear : [
  215. '不限',
  216. ],
  217. school : [
  218. '不限',
  219. '初中',
  220. '高中',
  221. '专科',
  222. '本科',
  223. '研究生',
  224. '博士',
  225. ],
  226. },
  227. pickerKey : 'workYear',
  228. }
  229. },
  230. onLoad() {
  231. for (var i = 0; i < 30; i++) {
  232. this.picker.workYear.push((i + 1) + '年')
  233. }
  234. this.form.addId = this.cityList[0].id
  235. },
  236. computed : {
  237. columns(){
  238. return [this.picker[this.pickerKey]]
  239. },
  240. ...mapState(['cityList', 'category']),
  241. },
  242. methods: {
  243. openPicker(key){
  244. this.pickerKey = key
  245. this.$refs.picker.open()
  246. },
  247. pickerConfirm(e){
  248. this.form[this.pickerKey] = e.value[0]
  249. },
  250. //地图上选择地址
  251. selectAddr() {
  252. Position.selectAddress(res => {
  253. //经纬度信息
  254. this.form.latitude = res.latitude
  255. this.form.longitude = res.longitude
  256. if (res.name) {
  257. return this.form.address = res.name
  258. }
  259. this.form.address = ''
  260. })
  261. },
  262. // 提交
  263. submit(){
  264. // if(this.fileList.length == 0){
  265. // return uni.showToast({
  266. // title: '请上传图片',
  267. // icon : 'none'
  268. // })
  269. // }
  270. if (this.$utils.verificationAll(this.form, {
  271. title: '请输入招工标题',
  272. address : '请选择工作地点',
  273. workYear : '请选择工龄要求',
  274. company : '请输入招聘公司',
  275. minPrice : '请输入薪资范围',
  276. iconText: '请输入标签',
  277. userName: '请输入联系人',
  278. userPhone: '请输入联系电话',
  279. jobContext : '请输入职位描述',
  280. school : '请输入岗位要求',
  281. jobDetails: '请输入岗位详细介绍',
  282. gsContext : '请输入公司介绍',
  283. })) {
  284. return
  285. }
  286. this.$api('publishJob', this.form, res => {
  287. if(res.code == 200){
  288. uni.showToast({
  289. title: '发布成功!',
  290. icon: 'none'
  291. })
  292. setTimeout(uni.navigateBack, 1000, -1)
  293. }
  294. })
  295. },
  296. }
  297. }
  298. </script>
  299. <style scoped lang="scss">
  300. .page{
  301. background-color: #fff;
  302. min-height: 100vh;
  303. box-sizing: border-box;
  304. color: #333333;
  305. font-size: 28rpx;
  306. /deep/ text{
  307. font-size: 28rpx !important;
  308. }
  309. input{
  310. width: 450rpx;
  311. }
  312. .form{
  313. padding: 30rpx;
  314. .help-issue {
  315. margin: 20rpx;
  316. }
  317. .title-input{
  318. border: 1px solid $uni-color;
  319. width: 100%;
  320. border-radius: 10rpx;
  321. padding: 10rpx 20rpx;
  322. box-sizing: border-box;
  323. height: 65rpx;
  324. }
  325. .form-sheet-cell{
  326. display: flex;
  327. background-color: #fff;
  328. padding: 20rpx 30rpx;
  329. align-items: center;
  330. .label{
  331. width: 160rpx;
  332. }
  333. .price{
  334. display: flex;
  335. text-align: center;
  336. input{
  337. width: 150rpx;
  338. border: 1px solid $uni-color;
  339. margin: 0 10rpx;
  340. }
  341. }
  342. .right-icon{
  343. margin-left: auto;
  344. }
  345. }
  346. }
  347. .category{
  348. padding: 20rpx;
  349. .title{
  350. // font-weight: 900;
  351. // font-size: 30rpx;
  352. }
  353. .tagList{
  354. display: flex;
  355. flex-wrap: wrap;
  356. padding: 10rpx 0;
  357. view{
  358. background: rgba($uni-color, 0.1);
  359. padding: 10rpx 20rpx;
  360. margin: 10rpx;
  361. border-radius: 10rpx;
  362. font-size: 26rpx;
  363. }
  364. .act{
  365. color: #fff;
  366. background: $uni-color;
  367. }
  368. }
  369. }
  370. }
  371. </style>