$(function(){ var bstj_char_data = []; layui.use('form', function() { var form = layui.form; form.on('select(year)', function(data) { console.log(data.value); //寰楀埌琚€変腑鐨勫€ getData(data.value); }); }); getData($("#year").val()); function getData(year) { $.ajax({ url: '/szinf/consult/getBanJianNumByYear', // url: '/szinf/consult/getBanJianNumByYear', type: 'POST', // async: false, data: { year: year, }, beforeSend: LoadFunction, //鍔犺浇鎵ц鏂规硶 error: erryFunction, //閿欒鎵ц鏂规硶 success: succFunction //鎴愬姛鎵ц鏂规硶 }); function LoadFunction() { $('#zxl').html("鍔犺浇涓?); $('#sll').html("鍔犺浇涓?); $('#bjl').html("鍔犺浇涓?); $('#dataSource').html('
  • \
    鏁版嵁鍔犺浇涓?..
    \
    鏁版嵁鍔犺浇涓?..
    \
    鏁版嵁鍔犺浇涓?..
    \
    鏁版嵁鍔犺浇涓?..
    \
  • '); } function erryFunction() { $('#zxl').html("鍔犺浇涓?); $('#sll').html("鍔犺浇涓?); $('#bjl').html("鍔犺浇涓?); } function succFunction(data) { $('#zxl').html(data.custom.projectnum.consultYear); $('#sll').html(data.custom.projectnum.slYear); $('#bjl').html(data.custom.projectnum.bjYear); sjcx_char_data = []; var template = ""; var sImgPath = $(".data-statistics .opt-wrap .txt-wp img").attr("src"); $("#dataSource").html(''); for (var i = 0; i < data.custom.projectnum.monthList.length; i++) { $("#dataSource").append("
  • " + "
    " + year + '骞? + data.custom.projectnum.monthList[i].month + '鏈? + "
    " + "
    " + data.custom.projectnum.monthList[i].consultNum + "
    " + "
    " + data.custom.projectnum.monthList[i].slNum + "
    " + "
    " + data.custom.projectnum.monthList[i].bjNum + "
    " + "
  • "); sjcx_char_data.unshift({ month: year + '骞? + data.custom.projectnum.monthList[i].month + '鏈?, v1: data.custom.projectnum.monthList[i].consultNum, v2: data.custom.projectnum.monthList[i].slNum, v3: data.custom.projectnum.monthList[i].bjNum }); } $(".rating-list-box").slide({mainCell:".bd ul",autoPage:true,effect:"top",autoPlay:true,vis:1}); } } }); $(window).load(function () { $(".niceScroll").mCustomScrollbar({ theme: "minimal" }); });