define(['jquery', "template", "Tools", "echarts", 'LeftNav', 'dateTime'], function ($, template, Tools, echarts, LeftNav) { //数据存储 var module = { data: { }, option : { tooltip: { trigger: 'axis' }, grid: { left: '0%', right: '0%', bottom: '3%', containLabel: true }, xAxis: { type: 'category', axisLine:{ show:false }, axisTick:{ show:false }, boundaryGap: false, data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] }, yAxis: { position:'right', type: 'value', name:'单位:元/500g', axisLine:{ show:false }, axisTick:{ show:false }, }, series: [ { name: 'Email', type: 'line', stack: 'Total', data: [120, 132, 101, 134, 90, 230, 210, 101, 134, 90, 230, 210] }, { name: 'Union Ads', type: 'line', stack: 'Total', data: [220, 182, 191, 234, 290, 330, 310, 191, 234, 290, 330, 310] }, { name: 'Video Ads', type: 'line', stack: 'Total', data: [150, 232, 201, 154, 190, 330, 410, 201, 154, 190, 330, 410] }, { name: 'Direct', type: 'line', stack: 'Total', data: [320, 332, 301, 334, 390, 330, 320, 301, 334, 390, 330, 320] }, { name: 'Search Engine', type: 'line', stack: 'Total', data: [820, 932, 901, 934, 1290, 1330, 1320, 901, 934, 1290, 1330, 1320] } ] }, }; var tools = new Tools(); module.init = function (page) { var widget = $('.tabs-vertical'); var tabs = widget.find('ul a'), content = widget.find('.tabs-content-placeholder > div'); tabs.on('click', function (e) { e.preventDefault(); // Get the data-index attribute, and show the matching content div var index = $(this).data('index'); tabs.removeClass('tab-active'); // content.removeClass('tab-content-active'); $(this).addClass('tab-active'); // content.eq(index).addClass('tab-content-active'); }); var chartDom = document.getElementById('chart'); var myChart = echarts.init(chartDom); module.option && myChart.setOption(module.option); }; return module; })