"use strict";var newsMap={event:{yearList:[],newsMap:{},allList:[]},notice:{yearList:[],newsMap:{},allList:[]}};function handleNews(){$("#news").on("click","button",function(){$("#news button").removeClass("active"),$(this).addClass("active");var e,t=$(this).data("nav"),n=$(this).data("type");("special"==n?(handleSpecialListHtml("#news3",specialList),$("#news3").show().siblings().hide(),$(".news-btn")):($(".news-btn").show(),e=newsMap[n].yearList[0],$("#newsValue").text(e).show(),e=newsMap[n].allList.slice(0,5),handleNewsHtml("#news".concat(t),e),handleSelectYear(n),$("#news".concat(t)).show().siblings())).hide()})}function handleMoreNews(){$("#news").on("click","#moreBtn",function(){for(var e=$("#news button.active").data("nav"),t="",n=0;n<5;n++)t+='
\n \n 2021-04-28\n '.concat(n,"三菱重工在华成立通用汽油发动机销售及服务新公司
\n \n ");$("#news".concat(e)).append(t)})}function handleNewsSelect(){$("#newsSelect").change(function(){var e=$(this).val(),t=($("#newsValue").text(e).show(),$("#news button.active").data("nav")),n=$("#news button.active").data("type");handleNewsHtml("#news".concat(t),newsMap[n].newsMap[e]),$(this).val("more")})}function getNewsList(){var n=getQueryString("tab"),e=window.location.pathname;"/news/notice/index.html"!==e&&"/news/notice/"!==e||(n=1),"/news/event/index.html"!==e&&"/news/event/"!==e||(n=0),"/news/special/index.html"!==e&&"/news/special/"!==e||(n=2),$.when($.ajax({url:"/data/news/event.json"}),$.ajax({url:"/data/news/notice.json"})).then(function(e,t){newsMap.event.allList=e[0],newsMap.notice.allList=t[0],handleNewsData("event",e[0],n),handleNewsData("notice",t[0],n),handleNewsData("special",[],n)})}function handleNewsData(n){var e,t,a=1').concat(e,"")}),$("#newsSelect").html(t)}function handleNewsHtml(e){var t="";(1[ '.concat(e," ]")}),t+='\n\t\t\t\n\t\t\t\t').concat(e.publishTime,'\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t
').concat(e.newsTitle,"
\n\t\t\t\t
\n\t\t\t\n\t\t")}),$(e).html(t)}function handleSpecialListHtml(e){var t="";(1\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t
').concat(e.title,"
\n\t\t\t\t
\n\t\t\t\n\t\t")}),$(e).html(t)}$(function(){getNewsList(),handleNews(),handleMoreNews(),handleNewsSelect(),handleSpecialListHtml("#news3",specialList)});