online.blade.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. @extends('module.layouts.content')
  2. @push('meta')
  3. @endpush
  4. @push('css')
  5. <link href="{{ theme_asset('app/css/common.css') }}" rel="stylesheet">
  6. <link href="{{theme_asset('app/css/jobfair/newjobfair.css')}}" rel="stylesheet"/>
  7. <link rel="stylesheet" type="text/css" href="{{ theme_asset('app/css/company/company_ajax_dialog.css')}}"/>
  8. <link rel="stylesheet" type="text/css" href="{{ theme_asset('app/css/common_ajax_dialog.css')}}"/>
  9. @endpush
  10. @push('js')
  11. <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak={{ subsite_config('aix.system.map.map.map_ak') }}&s=1"></script>
  12. @endpush
  13. @section('content')
  14. <div class="newjobfair">
  15. {{--banner信息--}}
  16. <div class="jobfairshow_top_info">
  17. <div class="top_info_des">
  18. <div class="j_name">2020年晋江市“职‘鼠’于你”新春公益线上招聘会</div>
  19. <div class="top_info_l">
  20. <div class="t2">举办地点:线上(聚才网)</div>
  21. <div class="t3">联系方式:0595-82008296</div>
  22. </div>
  23. <div class="top_info_r">
  24. <div class="other_info">
  25. <div class="t1">参会企业:<span>xxx</span>家</div>
  26. <div class="t2">需求人数:<span>xxxx</span>人</div>
  27. </div>
  28. </div>
  29. <div class="clear"></div>
  30. </div>
  31. </div>
  32. <div class="jobfair_detail_show">
  33. <div class="tabs">
  34. <div class="search_box"><input type="text" class="search_input" placeholder="请输入企业或职位"><input type="button" class="search_btn" value="搜索"></div>
  35. <div class="clear"></div>
  36. </div>
  37. <div class="tabs_show">
  38. {{--参会企业--}}
  39. <div class="tabs_show_item" id="join_com" >
  40. <div id="waterfall_main" class="waterfall_main list load_more_body">
  41. <div class="wf_box wf_element">
  42. <div>
  43. <a href="{{ route('jobfair.company',['company_id'=>59156]) }}" target="_blank" rel="nofollow noopener noreferrer" class="comName">test</a>
  44. </div>
  45. <p>
  46. <a href="{{ route('jobs.show',['id'=>4791]) }}" target="_blank" rel="nofollow noopener noreferrer" title="test">test({{ 10 or '若干' }})</a>
  47. <!--<a href="javascript:;" style="color:#999">暂无职位</a>-->
  48. </p>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. @endsection
  56. @section('script')
  57. <script type="text/javascript" src="{{ theme_asset('app/js/jquery.disappear.tooltip.js') }}"></script>
  58. <script type="text/javascript" src="{{theme_asset('app/js/jquery.cxscroll.js')}}"></script>
  59. <script src='./jmessage-sdk-web.<version>.min.js'></script>
  60. <script>
  61. var filter = {
  62. expr: function(o){
  63. var cls = this.replace(o.item || ".wf_element"),
  64. leftCls = this.replace(o.leftItem || ".wf_temp"),
  65. rightCls = this.replace(o.rightItem || ".wf_rank");
  66. $.extend($.expr[':'],{
  67. node:function(a){
  68. return $(a).hasClass(cls);
  69. },
  70. leftNode: function(a){
  71. return $(a).hasClass(leftCls);
  72. },
  73. rightNode: function(a){
  74. return $(a).hasClass(rightCls);
  75. }
  76. });
  77. },
  78. replace: function(cls){
  79. var regExp = /[.#]/g,
  80. whitespace = /\s/g;
  81. if(whitespace.test(cls)){
  82. cls = cls.split(' ')[0];
  83. }
  84. return cls.replace(regExp, '');
  85. }
  86. }
  87. function Waterfall(o){
  88. this.target = o.target || $('#waterfall_main');
  89. this.targetItem = o.targetItem || '.wf_box';
  90. this.colWidth = o.colWidth || 0;
  91. this.colCount = o.colCount || 4;
  92. filter.expr(o);
  93. this.init();
  94. }
  95. Waterfall.prototype = {
  96. init:function(){
  97. var self = this,
  98. col = [],
  99. nodes = self.target.find(":node"),
  100. leftNodes = self.target.find(":leftNode"),
  101. rightNodes = self.target.find(":rightNode"),
  102. nodeLen = nodes.length,
  103. leftLen = leftNodes.length,
  104. rightLen = rightNodes.length;
  105. for(var i = 0; i < self.colCount; i++){
  106. col[i] = 0;
  107. if(i == 0 && leftLen){
  108. for(var j = 0; j < leftLen; j++){
  109. col[i] += leftNodes.eq(j).outerHeight(true);
  110. }
  111. }
  112. if(i == self.colCount - 1 && rightLen){
  113. for(var j = 0; j < rightLen; j++){
  114. col[i] += rightNodes.eq(j).outerHeight(true);
  115. }
  116. }
  117. }
  118. nodes.each(function(){
  119. this.h = $(this).outerHeight(true);
  120. if($(this).hasClass(filter.replace(self.targetItem))){
  121. var ming = self.getMinCol(col);
  122. $(this).css({"left": ming * self.colWidth, "top": col[ming]});
  123. col[ming] += this.h;
  124. }
  125. });
  126. self.target.css('height', self.maxHeight(col));
  127. },
  128. setColWidth:function(wid){
  129. this.colWidth = wid;
  130. },
  131. setColCount:function(col){
  132. this.colCount = col;
  133. },
  134. maxHeight:function(arr){
  135. var len = arr.length,temp = arr[0];
  136. for(var i= 1; i < len; i++){
  137. if(temp < arr[i]){
  138. temp = arr[i];
  139. }
  140. }
  141. return temp;
  142. },
  143. getMinCol:function(arr){
  144. var ca = arr,cl = ca.length,temp = ca[0],minc = 0;
  145. for(var ci = 0; ci < cl; ci++){
  146. if(temp > ca[ci]){
  147. temp = ca[ci];
  148. minc = ci;
  149. }
  150. }
  151. return minc;
  152. }
  153. };
  154. var content = $('#waterfall_main');
  155. var item = content.find('.wf_element'),
  156. itemWidth = item.outerWidth(),/*取瀑布流元素宽*/
  157. contentWidth = 1162, /*取容器宽*/
  158. list_sum = parseInt(contentWidth / itemWidth),
  159. list_sum_margin = list_sum - 1, /*取元素间距的值*/
  160. left = (contentWidth - itemWidth * list_sum) / list_sum_margin;
  161. if(itemWidth * list_sum > contentWidth){
  162. list_sum -= 1;
  163. left = contentWidth - itemWidth * list_sum;
  164. }
  165. var colWidth = itemWidth + left;
  166. var waterfall = new Waterfall({
  167. //设定列宽度
  168. "colWidth": colWidth,
  169. //设定显示列数
  170. "colCount": 2
  171. });
  172. content.on('mouseenter', '.wf_box', function(){
  173. $(this).addClass('wf_hov');
  174. }).on('mouseleave', '.wf_box', function(){
  175. $(this).removeClass('wf_hov');
  176. });
  177. $(function () {
  178. //banner上在线预订按钮
  179. $(".online_order_btn a").click(function () {
  180. if($(this).hasClass("btn_disabled")){
  181. return false;
  182. }else {
  183. $(".jobfair_detail_show .tabs li").removeClass("active").eq(2).addClass("active");
  184. $(".tabs_show_item").eq(2).slideDown().siblings().slideUp();
  185. }
  186. })
  187. // 招聘会tab切换
  188. $(".jobfair_detail_show .tabs li").click(function () {
  189. var index = $(this).index();
  190. $(this).addClass("active").siblings().removeClass("active");
  191. $(".tabs_show .tabs_show_item").eq(index).slideDown(function () {
  192. $(".search_box").hide();
  193. }).siblings().slideUp(
  194. function () {
  195. if($("#join_com").is(":visible")){
  196. $(".search_box").show();
  197. }
  198. }
  199. );
  200. if($("#join_com").is(":visible") && !$("#join_com").data("v")){
  201. waterfall.init();
  202. $("#join_com").data("v","true");
  203. }
  204. })
  205. // 预订展位
  206. var floorplan_id= $("select[name='selectImg']").val();
  207. var jobfair_id = "1";
  208. jobfairShow(floorplan_id, jobfair_id);
  209. $("select[name='selectImg']").change(function(){
  210. floorplan_id = $(this).val();
  211. jobfairShow(floorplan_id, jobfair_id);
  212. })
  213. function jobfairShow (floorplan_id, jobfair_id){
  214. $.ajax({
  215. type:"get",
  216. url:"{{ route('jobfair.ajax.get.data') }}",
  217. data:{jobfair_id:jobfair_id,floorplan_id:floorplan_id},
  218. async:true,
  219. beforeSend:function(){
  220. $(".reserve1_img .ajax_loading").show();
  221. },
  222. success:function(result){
  223. if(result.status==1){
  224. $(".jobfairImg").attr("src",result.imageUrl);
  225. $(".reserve_main").html("");
  226. for (var i = 0; i < result.value.length; i++) {
  227. var statusClass,statusTxt,restxt='';
  228. var jobslist='';
  229. switch(result.value[i].status){
  230. case 1://可预订
  231. statusClass = "order";
  232. statusTxt = "可预订";
  233. restxt = "展位号:"+result.value[i].name;
  234. break;
  235. case 2://预留已锁定
  236. statusClass = "stayLock";
  237. statusTxt = "预留已锁定";
  238. restxt = "展位号:"+result.value[i].name;
  239. break;
  240. case 3://审核中
  241. statusClass = "audit";
  242. statusTxt = "审核中";
  243. restxt = result.value[i].company.companys.companyname;
  244. break;
  245. case 4://已预订
  246. statusClass = "succeed";
  247. statusTxt = "已预订";
  248. var jobfairArr = result.value[i].company.jobfair_put_job;
  249. for(var k =0 ;k<jobfairArr.length;k++){
  250. if(jobfairArr[k].jobs.audit != 1 || jobfairArr[k].jobs.display != 1){
  251. continue;
  252. }
  253. var amount ='';
  254. if(jobfairArr[k].jobs.amount) {
  255. amount = jobfairArr[k].jobs.amount;
  256. } else {
  257. amount = '若干'
  258. }
  259. jobslist+='<li><div class="jname">职位:<a href="/content/jobfair/show/quarters/'+jobfairArr[k].id+'">'+ jobfairArr[k].jobs.jobs_name +'</a></div><div class="jnum">人数:'+ amount +'</div></span></li>';
  260. }
  261. if(result.value[i].company.companys){
  262. restxt = result.value[i].company.companys.companyname+'<ul style="overflow-y: auto;max-height:300px;">'+ jobslist +'</ul>';
  263. }else{
  264. //console.log("企业不存在")
  265. }
  266. break;
  267. }
  268. var html='<li data-id="zw-'+ i +'" class="li zw-box '+ statusClass +'" positionid="'+ result.value[i].id +'" style="left:'+ result.value[i].left +';top:'+ result.value[i].top +'">' +
  269. '<span class="zw-name">'+ result.value[i].name +'</span>' +
  270. '<div class="tip '+ statusClass +'">' +
  271. '<div class="arrow"></div>' +
  272. '<div class="box">' +
  273. '<div class="t">展位状态:'+ statusTxt +'</div>' +
  274. '<div class="restxt link_gray6">'+ restxt +'</div>' +
  275. '</div>' +
  276. '</div>' +
  277. '</li>';
  278. $(".reserve_main").append(html);
  279. if($(".reserve_main .zw-box").length>320){
  280. var n1 = Math.ceil(($(".reserve_main .zw-box").length-320)/20);
  281. $(".reserve1_img").css("min-height",800+n1*50);
  282. }
  283. }
  284. }
  285. },
  286. complete:function () {
  287. $(".reserve1_img .ajax_loading").hide();
  288. }
  289. });
  290. }
  291. $(".reserve_main").on("mouseenter",".li",function(){
  292. $(this).find(".tip").show();
  293. })
  294. $(".reserve_main").on("mouseleave",".li",function(){
  295. $(this).find(".tip").hide();
  296. })
  297. $(".reserve_main").on('click','.zw-box.order',function(){
  298. var $this = $(this);
  299. var position_id = $(this).attr("positionid");
  300. var url = "{{ route('jobfair.appoint.save') }}";
  301. $.getJSON(url,{jobfair_id:jobfair_id,position_id:position_id,floorplan_id:floorplan_id},function (res) {
  302. if (res.status == 1) {
  303. var qsDialog = $(this).dialog({
  304. title: '预定招聘会',
  305. loading: true,
  306. border: false,
  307. footer:true,
  308. yes: function() {
  309. $.post(url,{position_id:position_id,jobfair_id:jobfair_id,floorplan_id:floorplan_id,_token:"{{ csrf_token() }}"},function(result){
  310. if(result.status==1){
  311. disapperTooltip("success", result.msg);
  312. $this.removeClass("order").addClass("audit");
  313. $this.find(".t").text("展位状态:审核中");
  314. $this.find(".restxt").text(result.data.companyname);
  315. }else{
  316. disapperTooltip("remind", result.msg);
  317. }
  318. });
  319. }
  320. });
  321. qsDialog.setContent(res.msg);
  322. } else {
  323. disapperTooltip("remind", res.msg);
  324. if(res.type == 1){
  325. var qsDialogSon = $(this).dialog({
  326. title: '企业会员登录',
  327. loading: true,
  328. border: false,
  329. footer:false,
  330. });
  331. qsDialogSon.setContent(res.html);
  332. }
  333. }
  334. })
  335. });
  336. $(document).on('click','.search_btn',function () {
  337. var keyinput = $('.search_input').val();
  338. $.getJSON("{{ route('jobfair.ajax.jobs') }}",{jobfair_id:"{{ $jobfair->id }}",keyinput:keyinput},function(result){
  339. if(result.status==1){
  340. $("#waterfall_main").html(result.data);
  341. waterfall.init();
  342. }else{
  343. disapperTooltip("remind", result.msg);
  344. }
  345. });
  346. });
  347. })
  348. </script>
  349. @endsection