123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- @extends('module.layouts.content')
- @push('meta')
- @endpush
- @push('css')
- <link href="{{ theme_asset('app/css/common.css') }}" rel="stylesheet">
- <link href="{{theme_asset('app/css/jobfair/newjobfair.css')}}" rel="stylesheet"/>
- <link rel="stylesheet" type="text/css" href="{{ theme_asset('app/css/company/company_ajax_dialog.css')}}"/>
- <link rel="stylesheet" type="text/css" href="{{ theme_asset('app/css/common_ajax_dialog.css')}}"/>
- @endpush
- @push('js')
- <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>
- @endpush
- @section('content')
- <div class="newjobfair">
- {{--banner信息--}}
- <div class="jobfairshow_top_info">
- <div class="top_info_des">
- <div class="j_name">2020年晋江市“职‘鼠’于你”新春公益线上招聘会</div>
- <div class="top_info_l">
- <div class="t2">举办地点:线上(聚才网)</div>
- <div class="t3">联系方式:0595-82008296</div>
- </div>
- <div class="top_info_r">
- <div class="other_info">
- <div class="t1">参会企业:<span>xxx</span>家</div>
- <div class="t2">需求人数:<span>xxxx</span>人</div>
- </div>
- </div>
- <div class="clear"></div>
- </div>
- </div>
- <div class="jobfair_detail_show">
- <div class="tabs">
- <div class="search_box"><input type="text" class="search_input" placeholder="请输入企业或职位"><input type="button" class="search_btn" value="搜索"></div>
- <div class="clear"></div>
- </div>
- <div class="tabs_show">
- {{--参会企业--}}
- <div class="tabs_show_item" id="join_com" >
- <div id="waterfall_main" class="waterfall_main list load_more_body">
- <div class="wf_box wf_element">
- <div>
- <a href="{{ route('jobfair.company',['company_id'=>59156]) }}" target="_blank" rel="nofollow noopener noreferrer" class="comName">test</a>
- </div>
- <p>
- <a href="{{ route('jobs.show',['id'=>4791]) }}" target="_blank" rel="nofollow noopener noreferrer" title="test">test({{ 10 or '若干' }})</a>
- <!--<a href="javascript:;" style="color:#999">暂无职位</a>-->
- </p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endsection
- @section('script')
- <script type="text/javascript" src="{{ theme_asset('app/js/jquery.disappear.tooltip.js') }}"></script>
- <script type="text/javascript" src="{{theme_asset('app/js/jquery.cxscroll.js')}}"></script>
- <script src='./jmessage-sdk-web.<version>.min.js'></script>
- <script>
- var filter = {
- expr: function(o){
- var cls = this.replace(o.item || ".wf_element"),
- leftCls = this.replace(o.leftItem || ".wf_temp"),
- rightCls = this.replace(o.rightItem || ".wf_rank");
- $.extend($.expr[':'],{
- node:function(a){
- return $(a).hasClass(cls);
- },
- leftNode: function(a){
- return $(a).hasClass(leftCls);
- },
- rightNode: function(a){
- return $(a).hasClass(rightCls);
- }
- });
- },
- replace: function(cls){
- var regExp = /[.#]/g,
- whitespace = /\s/g;
- if(whitespace.test(cls)){
- cls = cls.split(' ')[0];
- }
- return cls.replace(regExp, '');
- }
- }
- function Waterfall(o){
- this.target = o.target || $('#waterfall_main');
- this.targetItem = o.targetItem || '.wf_box';
- this.colWidth = o.colWidth || 0;
- this.colCount = o.colCount || 4;
- filter.expr(o);
- this.init();
- }
- Waterfall.prototype = {
- init:function(){
- var self = this,
- col = [],
- nodes = self.target.find(":node"),
- leftNodes = self.target.find(":leftNode"),
- rightNodes = self.target.find(":rightNode"),
- nodeLen = nodes.length,
- leftLen = leftNodes.length,
- rightLen = rightNodes.length;
- for(var i = 0; i < self.colCount; i++){
- col[i] = 0;
- if(i == 0 && leftLen){
- for(var j = 0; j < leftLen; j++){
- col[i] += leftNodes.eq(j).outerHeight(true);
- }
- }
- if(i == self.colCount - 1 && rightLen){
- for(var j = 0; j < rightLen; j++){
- col[i] += rightNodes.eq(j).outerHeight(true);
- }
- }
- }
- nodes.each(function(){
- this.h = $(this).outerHeight(true);
- if($(this).hasClass(filter.replace(self.targetItem))){
- var ming = self.getMinCol(col);
- $(this).css({"left": ming * self.colWidth, "top": col[ming]});
- col[ming] += this.h;
- }
- });
- self.target.css('height', self.maxHeight(col));
- },
- setColWidth:function(wid){
- this.colWidth = wid;
- },
- setColCount:function(col){
- this.colCount = col;
- },
- maxHeight:function(arr){
- var len = arr.length,temp = arr[0];
- for(var i= 1; i < len; i++){
- if(temp < arr[i]){
- temp = arr[i];
- }
- }
- return temp;
- },
- getMinCol:function(arr){
- var ca = arr,cl = ca.length,temp = ca[0],minc = 0;
- for(var ci = 0; ci < cl; ci++){
- if(temp > ca[ci]){
- temp = ca[ci];
- minc = ci;
- }
- }
- return minc;
- }
- };
- var content = $('#waterfall_main');
- var item = content.find('.wf_element'),
- itemWidth = item.outerWidth(),/*取瀑布流元素宽*/
- contentWidth = 1162, /*取容器宽*/
- list_sum = parseInt(contentWidth / itemWidth),
- list_sum_margin = list_sum - 1, /*取元素间距的值*/
- left = (contentWidth - itemWidth * list_sum) / list_sum_margin;
- if(itemWidth * list_sum > contentWidth){
- list_sum -= 1;
- left = contentWidth - itemWidth * list_sum;
- }
- var colWidth = itemWidth + left;
- var waterfall = new Waterfall({
- //设定列宽度
- "colWidth": colWidth,
- //设定显示列数
- "colCount": 2
- });
- content.on('mouseenter', '.wf_box', function(){
- $(this).addClass('wf_hov');
- }).on('mouseleave', '.wf_box', function(){
- $(this).removeClass('wf_hov');
- });
- $(function () {
- //banner上在线预订按钮
- $(".online_order_btn a").click(function () {
- if($(this).hasClass("btn_disabled")){
- return false;
- }else {
- $(".jobfair_detail_show .tabs li").removeClass("active").eq(2).addClass("active");
- $(".tabs_show_item").eq(2).slideDown().siblings().slideUp();
- }
- })
- // 招聘会tab切换
- $(".jobfair_detail_show .tabs li").click(function () {
- var index = $(this).index();
- $(this).addClass("active").siblings().removeClass("active");
- $(".tabs_show .tabs_show_item").eq(index).slideDown(function () {
- $(".search_box").hide();
- }).siblings().slideUp(
- function () {
- if($("#join_com").is(":visible")){
- $(".search_box").show();
- }
- }
- );
- if($("#join_com").is(":visible") && !$("#join_com").data("v")){
- waterfall.init();
- $("#join_com").data("v","true");
- }
- })
- // 预订展位
- var floorplan_id= $("select[name='selectImg']").val();
- var jobfair_id = "1";
- jobfairShow(floorplan_id, jobfair_id);
- $("select[name='selectImg']").change(function(){
- floorplan_id = $(this).val();
- jobfairShow(floorplan_id, jobfair_id);
- })
- function jobfairShow (floorplan_id, jobfair_id){
- $.ajax({
- type:"get",
- url:"{{ route('jobfair.ajax.get.data') }}",
- data:{jobfair_id:jobfair_id,floorplan_id:floorplan_id},
- async:true,
- beforeSend:function(){
- $(".reserve1_img .ajax_loading").show();
- },
- success:function(result){
- if(result.status==1){
- $(".jobfairImg").attr("src",result.imageUrl);
- $(".reserve_main").html("");
- for (var i = 0; i < result.value.length; i++) {
- var statusClass,statusTxt,restxt='';
- var jobslist='';
- switch(result.value[i].status){
- case 1://可预订
- statusClass = "order";
- statusTxt = "可预订";
- restxt = "展位号:"+result.value[i].name;
- break;
- case 2://预留已锁定
- statusClass = "stayLock";
- statusTxt = "预留已锁定";
- restxt = "展位号:"+result.value[i].name;
- break;
- case 3://审核中
- statusClass = "audit";
- statusTxt = "审核中";
- restxt = result.value[i].company.companys.companyname;
- break;
- case 4://已预订
- statusClass = "succeed";
- statusTxt = "已预订";
- var jobfairArr = result.value[i].company.jobfair_put_job;
- for(var k =0 ;k<jobfairArr.length;k++){
- if(jobfairArr[k].jobs.audit != 1 || jobfairArr[k].jobs.display != 1){
- continue;
- }
- var amount ='';
- if(jobfairArr[k].jobs.amount) {
- amount = jobfairArr[k].jobs.amount;
- } else {
- amount = '若干'
- }
- 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>';
- }
- if(result.value[i].company.companys){
- restxt = result.value[i].company.companys.companyname+'<ul style="overflow-y: auto;max-height:300px;">'+ jobslist +'</ul>';
- }else{
- //console.log("企业不存在")
- }
- break;
- }
- 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 +'">' +
- '<span class="zw-name">'+ result.value[i].name +'</span>' +
- '<div class="tip '+ statusClass +'">' +
- '<div class="arrow"></div>' +
- '<div class="box">' +
- '<div class="t">展位状态:'+ statusTxt +'</div>' +
- '<div class="restxt link_gray6">'+ restxt +'</div>' +
- '</div>' +
- '</div>' +
- '</li>';
- $(".reserve_main").append(html);
- if($(".reserve_main .zw-box").length>320){
- var n1 = Math.ceil(($(".reserve_main .zw-box").length-320)/20);
- $(".reserve1_img").css("min-height",800+n1*50);
- }
- }
- }
- },
- complete:function () {
- $(".reserve1_img .ajax_loading").hide();
- }
- });
- }
- $(".reserve_main").on("mouseenter",".li",function(){
- $(this).find(".tip").show();
- })
- $(".reserve_main").on("mouseleave",".li",function(){
- $(this).find(".tip").hide();
- })
- $(".reserve_main").on('click','.zw-box.order',function(){
- var $this = $(this);
- var position_id = $(this).attr("positionid");
- var url = "{{ route('jobfair.appoint.save') }}";
- $.getJSON(url,{jobfair_id:jobfair_id,position_id:position_id,floorplan_id:floorplan_id},function (res) {
- if (res.status == 1) {
- var qsDialog = $(this).dialog({
- title: '预定招聘会',
- loading: true,
- border: false,
- footer:true,
- yes: function() {
- $.post(url,{position_id:position_id,jobfair_id:jobfair_id,floorplan_id:floorplan_id,_token:"{{ csrf_token() }}"},function(result){
- if(result.status==1){
- disapperTooltip("success", result.msg);
- $this.removeClass("order").addClass("audit");
- $this.find(".t").text("展位状态:审核中");
- $this.find(".restxt").text(result.data.companyname);
- }else{
- disapperTooltip("remind", result.msg);
- }
- });
- }
- });
- qsDialog.setContent(res.msg);
- } else {
- disapperTooltip("remind", res.msg);
- if(res.type == 1){
- var qsDialogSon = $(this).dialog({
- title: '企业会员登录',
- loading: true,
- border: false,
- footer:false,
- });
- qsDialogSon.setContent(res.html);
- }
- }
- })
- });
- $(document).on('click','.search_btn',function () {
- var keyinput = $('.search_input').val();
- $.getJSON("{{ route('jobfair.ajax.jobs') }}",{jobfair_id:"{{ $jobfair->id }}",keyinput:keyinput},function(result){
- if(result.status==1){
- $("#waterfall_main").html(result.data);
- waterfall.init();
- }else{
- disapperTooltip("remind", result.msg);
- }
- });
- });
- })
- </script>
- @endsection
|