postMessage.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. <template>
  2. <view>
  3. <u-navbar back-text="发布求职信息" back-icon-size="28" back-icon-color="#ffffff"
  4. :background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
  5. <!-- 基本信息 -->
  6. <view class="information-group">
  7. <view class="headline">
  8. 基本信息
  9. </view>
  10. <!-- 职位名称 -->
  11. <view class="item">
  12. <view class="title">
  13. <text>*</text>职位名称
  14. </view>
  15. <view class="input">
  16. <u-input type="text" v-model="formData.positionName"
  17. placeholder="请填写职位名称"></u-input>
  18. </view>
  19. </view>
  20. <!-- *薪资待遇 -->
  21. <view class="item">
  22. <view class="title">
  23. <text>*</text>薪资待遇
  24. </view>
  25. <view class="input2">
  26. <u-input type="text" v-model="formData.salary"
  27. placeholder="请填写薪资待遇"></u-input>
  28. </view>
  29. <view class="unit" @click="showselect(0)">
  30. {{salaryForm}}
  31. </view>
  32. <view class="icon" @click="showselect(0)">
  33. <u-icon name="arrow-right" color="#999999"></u-icon>
  34. </view>
  35. </view>
  36. <!--结算形式 -->
  37. <view class="item">
  38. <view class="title">
  39. <text>*</text>结算形式
  40. </view>
  41. <view class="input">
  42. <u-input type="select" v-model="settlementMethod"
  43. @click="showselect(1)" placeholder="请选择结算形式"></u-input>
  44. </view>
  45. </view>
  46. <!-- 行业 -->
  47. <view class="item">
  48. <view class="title">
  49. <text>*</text>行业
  50. </view>
  51. <view class="input">
  52. <u-input type="select" v-model="industry"
  53. @click="showselect(2)" placeholder="请选择行业"></u-input>
  54. </view>
  55. </view>
  56. <!-- 招聘人数 -->
  57. <view class="item">
  58. <view class="title">
  59. <text>*</text>招聘人数
  60. </view>
  61. <view class="input">
  62. <u-input type="number" v-model="formData.recruitingNumbers"
  63. placeholder="请填写招聘人数"></u-input>
  64. </view>
  65. </view>
  66. </view>
  67. <!-- 工作描述 -->
  68. <view class="job-description">
  69. <view class="title">
  70. <text>*</text>工作描述
  71. </view>
  72. <textarea class="textarea" v-model="formData.desc"
  73. placeholder="请简单描述工作内容及职位要求"></textarea>
  74. </view>
  75. <!-- 个人信息 -->
  76. <view class="information-group">
  77. <view class="headline">
  78. 基本信息
  79. </view>
  80. <!-- 联系人 -->
  81. <view class="item">
  82. <view class="title">
  83. <text>*</text>联系人
  84. </view>
  85. <view class="input">
  86. <u-input type="text" v-model="formData.contacts"
  87. placeholder="请填写联系人"></u-input>
  88. </view>
  89. </view>
  90. <!-- 联系电话 -->
  91. <view class="item">
  92. <view class="title">
  93. <text>*</text>联系电话
  94. </view>
  95. <view class="input">
  96. <u-input type="text" v-model="formData.contactsPhone"
  97. placeholder="请填写联系电话"></u-input>
  98. </view>
  99. </view>
  100. <!--工作地区 -->
  101. <view class="item">
  102. <view class="title">
  103. <text>*</text>工作地区
  104. </view>
  105. <view class="input">
  106. <u-input type="select" v-model="workArea"
  107. @click="showselect(3)" placeholder="请选择工作地区"></u-input>
  108. </view>
  109. </view>
  110. <!-- 详细地址 -->
  111. <view class="item">
  112. <view class="title">
  113. <text>*</text>详细地址
  114. </view>
  115. <view class="input">
  116. <u-input type="text" v-model="formData.address"
  117. placeholder="请填写详细的工作地址"></u-input>
  118. </view>
  119. </view>
  120. </view>
  121. <u-select v-model="show" value-name="value" label-name="name"
  122. :list="list" @confirm="confirm"></u-select>
  123. <button class="issue" @click="submit()"
  124. type="default">发布</button>
  125. </view>
  126. </template>
  127. <script>
  128. import * as API_weixin from '@/apis/weixin.js'
  129. import * as API from '@/apis/pagejs/packages.js'
  130. export default {
  131. data() {
  132. return {
  133. selectIndex:0,
  134. show: false,
  135. list: [],
  136. formData:{
  137. positionName:"",
  138. salary:"",
  139. settlementMethod:"",
  140. industry:"",
  141. recruitingNumbers:"",
  142. desc:"",
  143. contacts:"",
  144. contactsPhone:"",
  145. workArea:"",
  146. address:"",
  147. salaryForm:"1",
  148. },
  149. settlementMethod:"",
  150. salaryForm:"计件",
  151. industry:"",
  152. workArea:"",
  153. sqlList:[[],[],[],[],[],[],[]],
  154. valueList:[-1,-1,-1,-1,-1,-1],
  155. userInfo:{}
  156. }
  157. },
  158. onLoad(){
  159. this.userInfo=this.carhelp.getPersonInfo()
  160. //this.tel=this.userInfo.phone
  161. },
  162. methods: {
  163. confirm(e) {
  164. this.show = false;
  165. var name=["salaryForm","settlementMethod",
  166. "industry",
  167. "workArea",]
  168. this[name[this.selectIndex]]=e[0].label
  169. this.formData[name[this.selectIndex]]=e[0].value
  170. console.log(e)
  171. },
  172. showselect(k){
  173. this.selectIndex=k;
  174. if(this.sqlList[k].length==0){
  175. var name=['薪资形式','结算方式','意向行业','工作地区']
  176. uni.showLoading({
  177. title: "加载中",
  178. mask: true,
  179. })
  180. API_weixin.findListByCatalogName({
  181. name:name[k],
  182. }).then((res) => {
  183. uni.hideLoading();
  184. this.sqlList[k]=res.data.dictionaryList
  185. this.list=this.sqlList[k];
  186. this.show= true
  187. }).catch(error => {
  188. uni.showToast({
  189. title: error
  190. })
  191. //this.getPhone()
  192. })
  193. }else{
  194. this.list=this.sqlList[k];
  195. this.show= true
  196. }
  197. },
  198. submit(){
  199. if(!this.formData.positionName){
  200. uni.showToast({
  201. title: "请填写职位名称"
  202. })
  203. return
  204. }
  205. if(!this.formData.salary){
  206. uni.showToast({
  207. title: "请填写薪资待遇"
  208. })
  209. return
  210. }
  211. if(!this.formData.settlementMethod){
  212. uni.showToast({
  213. title: "请选择结算形式"
  214. })
  215. return
  216. }
  217. if(!this.formData.industry){
  218. uni.showToast({
  219. title: "请选择行业"
  220. })
  221. return
  222. }
  223. if(!this.formData.recruitingNumbers){
  224. uni.showToast({
  225. title: "请填写招聘人数"
  226. })
  227. return
  228. }
  229. if(!this.formData.desc){
  230. uni.showToast({
  231. title: "请简单描述工作内容及职位要求"
  232. })
  233. return
  234. }
  235. if(!this.formData.contacts){
  236. uni.showToast({
  237. title: "请填写联系人"
  238. })
  239. return
  240. }
  241. if(!this.formData.contactsPhone){
  242. uni.showToast({
  243. title: "请填写联系电话"
  244. })
  245. return
  246. }
  247. if(!this.formData.workArea){
  248. uni.showToast({
  249. title: "请选择工作地区"
  250. })
  251. return
  252. }
  253. if(!this.formData.address){
  254. uni.showToast({
  255. title: "请填写详细的工作地址"
  256. })
  257. return
  258. }
  259. uni.showLoading({
  260. title: "加载中",
  261. mask: true,
  262. })
  263. API.createJobHunt(this.formData).then((res) => {
  264. uni.hideLoading();
  265. const eventChannel = this.getOpenerEventChannel();
  266. eventChannel.emit('refreshData');
  267. uni.showModal({
  268. title: '提示',
  269. content: '发布成功,等待审核!',
  270. showCancel:false,
  271. success: function (res) {
  272. if (res.confirm) {
  273. uni.navigateBack()
  274. } else if (res.cancel) {
  275. console.log('用户点击取消');
  276. }
  277. }
  278. });
  279. }).catch(error => {
  280. uni.showToast({
  281. title: error
  282. })
  283. //this.getPhone()
  284. })
  285. }
  286. }
  287. }
  288. </script>
  289. <style>
  290. page {
  291. background: #F0F0F2;
  292. padding-bottom: 150px;
  293. }
  294. </style>
  295. <style lang="scss" scoped>
  296. .information-group {
  297. margin: 32rpx;
  298. padding: 24rpx 32rpx;
  299. background-color: #fff;
  300. border-radius: 24rpx;
  301. .headline {
  302. color: rgba(16, 16, 16, 1);
  303. font-size: 36rpx;
  304. margin-bottom: 24rpx;
  305. font-family: 'PingFangSC-medium';
  306. }
  307. .item {
  308. display: flex;
  309. align-items: center;
  310. padding: 12rpx 0;
  311. border-bottom: 1px solid #f1f1f1;
  312. .title {
  313. color: rgba(51, 51, 51, 1);
  314. font-size: 32rpx;
  315. width: 148rpx;
  316. text {
  317. color: #EE3138
  318. }
  319. }
  320. .input {
  321. width: 450rpx;
  322. margin-left: 24rpx;
  323. /deep/.uni-input-input {
  324. color: rgba(51, 51, 51, 1);
  325. }
  326. }
  327. .input2 {
  328. width: 350rpx;
  329. margin-left: 24rpx;
  330. /deep/.uni-input-input {
  331. color: rgba(51, 51, 51, 1);
  332. }
  333. }
  334. .icon {
  335. margin-left: auto;
  336. }
  337. .unit {
  338. margin-left: auto;
  339. color: rgba(51, 51, 51, 1);
  340. font-size: 32rpx;
  341. }
  342. }
  343. }
  344. // 工作描述
  345. .job-description {
  346. margin: 24rpx 32rpx;
  347. background-color: #fff;
  348. border-radius: 12px;
  349. padding: 24rpx 32rpx;
  350. .title {
  351. color: #333333;
  352. font-size: 18px;
  353. font-family: 'PingFangSC-medium';
  354. }
  355. text {
  356. color: #FF0000;
  357. }
  358. .textarea {
  359. margin-top: 24rpx;
  360. line-height: 40rpx;
  361. width: 100%;
  362. height: 200rpx;
  363. }
  364. }
  365. /* 发布 */
  366. .issue {
  367. background-color: rgba(34, 149, 255, 1);
  368. color: rgba(241, 241, 241, 1);
  369. font-size: 18px;
  370. height: 96rpx;
  371. line-height: 96rpx;
  372. border-radius: 50px;
  373. position: fixed;
  374. left: 32rpx;
  375. right: 32rpx;
  376. bottom: 20rpx;
  377. z-index: 999;
  378. }
  379. </style>