_id.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <template>
  2. <div class="wrapper" v-if="job">
  3. <div class="loading" v-if="applying">
  4. <i class="el-icon-loading"></i>
  5. 提交申请中
  6. </div>
  7. <div class="header">
  8. <div class="title-wrapper">
  9. <div class="title">{{job.title}}</div>
  10. <div v-bind:class="title_class">{{job.status_name}}</div>
  11. </div>
  12. <div class="price">¥ {{job.salary_from}}-{{job.salary_to}}</div>
  13. </div>
  14. <div class="info-wrapper">
  15. <div class="info">
  16. <p>发布时间: {{job.created_at}}</p>
  17. <p>工作经验: {{job.work_year}}年</p>
  18. <p>要求: {{job.skills_name}}</p>
  19. <p>驻场地点: {{job.city}}</p>
  20. </div>
  21. <div class="btn-wrapper">
  22. <template v-if="job.status===1">
  23. <template v-if="job.apply.status===-1">
  24. <button class="btn-first" @click="login">请先登陆</button>
  25. </template>
  26. <template v-else-if="job.apply.status===-2"><a href="/sign/new" class="btn-first">请先签约</a></template>
  27. <template v-else>
  28. <button v-bind:class="!applying?'btn-first':'btn-second'" v-if="job.apply.status===0" @click="apply()">
  29. {{applying?'提交申请中':'立即申请 '}} <i v-if="applying" class="el-icon-loading"></i>
  30. </button>
  31. <div class="btn-second" v-else-if="job.apply.status===1">筛选中</div>
  32. <div class="btn-second" v-else-if="job.apply.status===2">待面试</div>
  33. <div class="btn-third" v-else-if="job.apply.status===3">面试不通过</div>
  34. <div class="btn-third" v-else-if="job.apply.status===4">不合适</div>
  35. <div class="btn-fourth" v-else-if="job.apply.status===5">对接成功</div>
  36. </template>
  37. </template>
  38. <template v-else>
  39. <div class="btn-third" v-if="job.status>1">{{job.status_name}}</div>
  40. </template>
  41. <div class="btn-tips">当前已经有 <span>{{job.apply_count}}</span> 人申请</div>
  42. </div>
  43. </div>
  44. <div class="content">
  45. <div>工作内容:</div>
  46. <div>{{job.job_description}}</div>
  47. </div>
  48. <div class="file-list">
  49. <div class="file-item" v-for="file in job.files">
  50. <a v-bind:href="file.url"><img src="~@/assets/img/job/icon_file.png" alt=""></a>
  51. <a v-bind:href="file.url" v-bind:title="file.file_name" class="file">{{file.file_name}}</a>
  52. </div>
  53. </div>
  54. </div>
  55. </template>
  56. <script>
  57. export default {
  58. head() {
  59. return {
  60. title: '驻场工作招聘,2019年最新驻场工作招聘信息-程序员客栈',
  61. meta: [{
  62. 'name': 'keywords',
  63. 'content': '驻场招聘,驻场工作招聘,2019年最新驻场招聘信息'
  64. }, {
  65. 'name': 'description',
  66. 'content': '程序员客栈提供全国各地城市IT驻场工作最新招聘信息,核实企业资质,让有工作需求的程序员能得到一份满意的驻场工作;对程序员从业者能力进行严格把关,保障企业能在驻场招聘平台找到靠谱的程序员,确保项目正常进行。找工作、招聘合格的程序员,就上程序员客栈驻场招聘平台!'
  67. }]
  68. }
  69. },
  70. data() {
  71. return {
  72. has_login: false,
  73. city: '',
  74. total: 0,
  75. job: null,
  76. status: 1,
  77. title_class: "status-first",
  78. applying: false,
  79. }
  80. },
  81. mounted() {
  82. this.getData();
  83. },
  84. methods: {
  85. getData() {
  86. this.$axios.$post('/api/present_job/detail', {id: this.$route.params.id}).then(res => {
  87. this.job = res.data;
  88. switch (this.job.status) {
  89. case 1:
  90. this.title_class = 'status-first';
  91. break;
  92. case 3:
  93. this.title_class = 'status-second';
  94. break;
  95. default:
  96. this.title_class = 'status-third';
  97. }
  98. })
  99. },
  100. login() {
  101. location.href = 'https://www.proginn.com/?loginbox=show&next=' + encodeURIComponent(location.href)
  102. },
  103. apply() {
  104. if (this.applying) {
  105. return false;
  106. }
  107. this.applying = true;
  108. this.$axios.$post('/api/present_job/apply', {id: this.$route.params.id}).then(res => {
  109. if (res.status === 1) {
  110. this.$message.success(res.info);
  111. this.getData();
  112. } else {
  113. this.$message.error(res.info);
  114. this.getData();
  115. }
  116. this.applying = false;
  117. }).catch(res => {
  118. this.applying = false;
  119. })
  120. }
  121. }
  122. }
  123. </script>
  124. <style lang="scss" scope>
  125. .wrapper {
  126. overflow: hidden;
  127. margin-top: 10px;
  128. width: 1000px;
  129. background-color: #ffffff;
  130. }
  131. .header {
  132. margin-top: 45px;
  133. display: flex;
  134. align-items: center;
  135. }
  136. .title-wrapper {
  137. flex: 1;
  138. display: flex;
  139. align-items: center;
  140. }
  141. .title {
  142. margin-left: 20px;
  143. margin-right: 9px;
  144. font-weight: 500;
  145. font-size: 17px;
  146. color: #222222;
  147. }
  148. .status-first {
  149. padding: 3px 9px;
  150. border-radius: 1px;
  151. border: 1px solid #27BB6F;
  152. text-align: center;
  153. font-size: 11px;
  154. color: #27BB6F;
  155. }
  156. .status-second {
  157. padding: 3px 9px;
  158. border-radius: 1px;
  159. border: 1px solid #FF6600;
  160. text-align: center;
  161. font-size: 11px;
  162. color: #FF6600;
  163. }
  164. .status-third {
  165. padding: 3px 9px;
  166. border-radius: 1px;
  167. border: 1px solid #666666;
  168. text-align: center;
  169. font-size: 11px;
  170. color: #666666;
  171. }
  172. .price {
  173. margin-right: 20px;
  174. font-weight: 600;
  175. font-size: 16px;
  176. color: #FF331E;
  177. }
  178. .info-wrapper {
  179. margin-top: 9px;
  180. display: flex;
  181. }
  182. .info {
  183. flex: 1;
  184. margin-left: 20px;
  185. }
  186. .info p {
  187. margin-top: 15px;
  188. line-height: 18px;
  189. font-weight: 500;
  190. font-size: 13px;
  191. color: #333333;
  192. }
  193. .btn-wrapper {
  194. margin-top: 19px;
  195. margin-right: 20px;
  196. }
  197. .btn-first {
  198. display: block;
  199. width: 125px;
  200. height: 40px;
  201. border-radius: 2px;
  202. background-color: #308EFF;
  203. line-height: 40px;
  204. text-align: center;
  205. font-size: 14px;
  206. color: #FFFFFF;
  207. }
  208. .btn-second {
  209. width: 125px;
  210. height: 40px;
  211. border-radius: 2px;
  212. background-color: #308EFF;
  213. line-height: 40px;
  214. text-align: center;
  215. font-size: 14px;
  216. color: #FFFFFF;
  217. opacity: 0.5;
  218. }
  219. .btn-third {
  220. width: 125px;
  221. height: 40px;
  222. border-radius: 2px;
  223. background-color: #ECECEC;
  224. line-height: 40px;
  225. text-align: center;
  226. font-size: 14px;
  227. color: #666666;
  228. }
  229. .btn-fourth {
  230. width: 125px;
  231. height: 40px;
  232. border-radius: 2px;
  233. border: 1px solid #10B96A;
  234. line-height: 40px;
  235. text-align: center;
  236. font-size: 14px;
  237. color: #10B96A;
  238. }
  239. .btn-tips {
  240. margin-top: 13px;
  241. line-height: 20px;
  242. font-size: 13px;
  243. color: #666666;
  244. }
  245. .btn-tips span {
  246. color: #308EFF;
  247. }
  248. .content {
  249. margin: 61px 20px 0;
  250. line-height: 27px;
  251. font-weight: 500;
  252. font-size: 13px;
  253. color: #333333;
  254. }
  255. .file-list {
  256. margin-top: 45px;
  257. padding-bottom: 61px;
  258. display: flex;
  259. align-items: center;
  260. }
  261. .file-item {
  262. margin-left: 47px;
  263. margin-right: 30px;
  264. text-align: center;
  265. }
  266. .file-item img {
  267. width: 25px;
  268. height: 30px;
  269. }
  270. .file-item a {
  271. margin-top: 6px;
  272. display: block;
  273. line-height: 30px;
  274. font-size: 13px;
  275. color: #308EFF;
  276. text-decoration: underline;
  277. display: -webkit-box;
  278. -webkit-box-orient: vertical;
  279. -webkit-line-clamp: 1;
  280. overflow: hidden;
  281. }
  282. .loading {
  283. display: flex;
  284. justify-content: center;
  285. align-items: center;
  286. }
  287. .mask {
  288. position: absolute;
  289. width: 100%;
  290. height: 100%;
  291. left: 0px;
  292. top: 0px;
  293. background: #EEEEEE;
  294. opacity: 0.5;
  295. filter: alpha(opacity=40);
  296. z-index: 5;
  297. }
  298. </style>