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

393 lines
7.8 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
5 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
6 months ago
7 months ago
6 months ago
7 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 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.school || '请选择学历要求'"
  18. @click="openPicker('school')"
  19. isLink
  20. ></uv-cell> -->
  21. <!-- <uv-cell
  22. title="工作地点"
  23. rightIconStyle="fontSize: 30rpx;"
  24. :value="form.address || '请选择招工地点'"
  25. @click="selectAddr"
  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 { mapState } from 'vuex'
  181. export default {
  182. data() {
  183. return {
  184. form : {
  185. school : '',
  186. workYear : '',
  187. minPrice : '',
  188. maxPrice : '',
  189. address : '',
  190. addId : '',
  191. company : '',
  192. gsContext : '',
  193. jobContext : '',
  194. },
  195. radiovalue : '',
  196. priceList : [
  197. {
  198. name : '日结',
  199. },
  200. {
  201. name : '月结',
  202. },
  203. ],
  204. jopList : [
  205. {
  206. name : '正式工',
  207. },
  208. {
  209. name : '临时工',
  210. },
  211. ],
  212. picker : {
  213. workYear : [
  214. '不限',
  215. ],
  216. school : [
  217. '不限',
  218. '初中',
  219. '高中',
  220. '专科',
  221. '本科',
  222. '研究生',
  223. '博士',
  224. ],
  225. },
  226. pickerKey : 'workYear',
  227. }
  228. },
  229. onLoad() {
  230. for (var i = 0; i < 30; i++) {
  231. this.picker.workYear.push((i + 1) + '年')
  232. }
  233. this.form.addId = this.cityList[0].id
  234. },
  235. computed : {
  236. columns(){
  237. return [this.picker[this.pickerKey]]
  238. },
  239. ...mapState(['cityList', 'category']),
  240. },
  241. methods: {
  242. openPicker(key){
  243. this.pickerKey = key
  244. this.$refs.picker.open()
  245. },
  246. pickerConfirm(e){
  247. this.form[this.pickerKey] = e.value[0]
  248. },
  249. // 提交
  250. submit(){
  251. // if(this.fileList.length == 0){
  252. // return uni.showToast({
  253. // title: '请上传图片',
  254. // icon : 'none'
  255. // })
  256. // }
  257. if (this.$utils.verificationAll(this.form, {
  258. title: '请输入招工标题',
  259. address : '请选择工作地点',
  260. workYear : '请选择工龄要求',
  261. company : '请输入招聘公司',
  262. minPrice : '请输入薪资范围',
  263. iconText: '请输入标签',
  264. userName: '请输入联系人',
  265. userPhone: '请输入联系电话',
  266. jobContext : '请输入职位描述',
  267. school : '请输入岗位要求',
  268. jobDetails: '请输入岗位详细介绍',
  269. gsContext : '请输入公司介绍',
  270. })) {
  271. return
  272. }
  273. this.$api('publishJob', this.form, res => {
  274. if(res.code == 200){
  275. uni.showToast({
  276. title: '发布成功!',
  277. icon: 'none'
  278. })
  279. setTimeout(uni.navigateBack, 1000, -1)
  280. }
  281. })
  282. },
  283. }
  284. }
  285. </script>
  286. <style scoped lang="scss">
  287. .page{
  288. background-color: #fff;
  289. min-height: 100vh;
  290. box-sizing: border-box;
  291. color: #333333;
  292. font-size: 28rpx;
  293. /deep/ text{
  294. font-size: 28rpx !important;
  295. }
  296. input{
  297. width: 450rpx;
  298. }
  299. .form{
  300. padding: 30rpx;
  301. .help-issue {
  302. margin: 20rpx;
  303. }
  304. .title-input{
  305. border: 1px solid $uni-color;
  306. width: 100%;
  307. border-radius: 10rpx;
  308. padding: 10rpx 20rpx;
  309. box-sizing: border-box;
  310. height: 65rpx;
  311. }
  312. .form-sheet-cell{
  313. display: flex;
  314. background-color: #fff;
  315. padding: 20rpx 30rpx;
  316. align-items: center;
  317. .label{
  318. width: 160rpx;
  319. }
  320. .price{
  321. display: flex;
  322. text-align: center;
  323. input{
  324. width: 150rpx;
  325. border: 1px solid $uni-color;
  326. margin: 0 10rpx;
  327. }
  328. }
  329. .right-icon{
  330. margin-left: auto;
  331. }
  332. }
  333. }
  334. .category{
  335. padding: 20rpx;
  336. .title{
  337. // font-weight: 900;
  338. // font-size: 30rpx;
  339. }
  340. .tagList{
  341. display: flex;
  342. flex-wrap: wrap;
  343. padding: 10rpx 0;
  344. view{
  345. background: rgba($uni-color, 0.1);
  346. padding: 10rpx 20rpx;
  347. margin: 10rpx;
  348. border-radius: 10rpx;
  349. font-size: 26rpx;
  350. }
  351. .act{
  352. color: #fff;
  353. background: $uni-color;
  354. }
  355. }
  356. }
  357. }
  358. </style>