var isSearch = false; var offsetH = 173; var treeType = 0; //左侧目录树类型 var XZQHID = ""; //区域 var NF = ""; //年份 var IsSC = 0; //是否收藏 $(function () { var divZiYuanLeiXing = document.getElementById("div_ZiYuanLX"); var divDiQu = document.getElementById("div_DiQu"); var GongXiangXieYi = document.getElementById("div_GongXiangXieYi"); var JiChengLeiXing = document.getElementById("div_JiChengLeiXing"); var Time = document.getElementById("div_Time"); var DanWei = document.getElementById("div_DanWei"); var ZiYuanLeiXingChart = echarts.init(divZiYuanLeiXing); var DiQuChart = echarts.init(divDiQu); var GongXiangXieYiChart = echarts.init(GongXiangXieYi); var JiChengLeiXingChart = echarts.init(JiChengLeiXing); var TimeChart = echarts.init(Time); var DanWeiChart = echarts.init(DanWei); ZiYuanLeiXingOption = { tooltip: { trigger: 'item', formatter: "{b} : {c} ({d}%)" }, legend: { textStyle: { color: '#000000', }, y: 'bottom', data: ZYLXLend, }, color: ['#31C4CB', '#B6A1E2', '#59B1F0', '#FFB880', '#DA7980', '#8D98B4', '#E5CE0C', '#98B74F', '#D48265', '#91C7AE', '#749F83', '#D8DEB8'], series: [ { type: 'pie', selectedMode: 'single', calculable: true, center: ['50%', '38%'], radius: '68%', label: { normal: { position: 'inner', formatter: '{c}', textStyle: { color: '#fff', fontWeight: 'bold', fontSize: 14 } } }, labelLine: { normal: { show: false } }, data: ZYLXJson } ] }; $("#sumlx_zhmj").text(ZYLXCount); ZiYuanLeiXingChart.setOption(ZiYuanLeiXingOption); DiQuOption = { tooltip: { trigger: 'item', formatter: "{b} : {c} ({d}%)" }, legend: { textStyle: { color: '#000000', }, y: 'bottom', data: XZQHLend }, color: ['#31C4CB', '#B6A1E2', '#59B1F0', '#FFB880', '#DA7980', '#8D98B4', '#E5CE0C', '#98B74F', '#D48265'], series: [ { type: 'pie', selectedMode: 'single', calculable: true, center: ['50%', '38%'], radius: '68%', label: { normal: { position: 'inner', formatter: '{c}', textStyle: { color: '#fff', fontWeight: 'bold', fontSize: 14 } } }, labelLine: { normal: { show: false } }, data: XZQHJson } ] } $("#sumfs_zhmj").text(XZQHCount); DiQuChart.setOption(DiQuOption); GongXiangXieYiOption = { backgroundColor: '#fff', tooltip: { trigger: 'item', formatter: "{b} : {c} ({d}%)" }, title: { text: GXXYCount, x: 'center', y: '40%', textStyle: { color: '#008ACD', fontWeight: 'normal', fontSize: 16 } }, legend: { textStyle: { color: '#000000', }, y: 'bottom', data: GXXYLend }, color: ['#31C4CB', '#B6A1E2', '#59B1F0', '#FFB880'], series: [ { type: 'pie', selectedMode: 'single', calculable: true, center: ['50%', '42%'], radius: ['40%', '75%'], label: { normal: { position: 'inner', formatter: '{c}', textStyle: { color: '#fff', fontWeight: 'bold', fontSize: 14 } } }, labelLine: { normal: { show: false } }, data: GXXYJson } ] } $("#sumjb_xmsl").text(GXXYCount); GongXiangXieYiChart.setOption(GongXiangXieYiOption); JiChengLeiXingOption = { backgroundColor: '#fff', tooltip: { trigger: 'item', formatter: "{b} : {c} ({d}%)" }, title: { text: '196', x: 'center', y: '40%', textStyle: { color: '#008ACD', fontWeight: 'normal', fontSize: 16 } }, legend: { textStyle: { color: '#000000', }, y: 'bottom', data: ['服务集成', '业务集成', '数据集成'] }, color: ['#31C4CB', '#B6A1E2', '#59B1F0', '#FFB880'], series: [ { type: 'pie', selectedMode: 'single', calculable: true, center: ['50%', '45%'], radius: ['45%', '80%'], label: { normal: { position: 'inner', formatter: '{c}', textStyle: { color: '#fff', fontWeight: 'bold', fontSize: 14 } } }, labelLine: { normal: { show: false } }, data: [{value: 99, name: '服务集成'}, {value: 63, name: '业务集成'}, {value: 34, name: '数据集成'}] } ] } //JiChengLeiXingChart.setOption(JiChengLeiXingOption); //发布时间按月统计配置代码 var TimeoptionMonth = { tooltip: { show: true, trigger: 'item' }, calculable: true, title: { x: 'center', text: '按发布时间统计-本年', y: 0 }, xAxis: [ { type: 'category', data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] } ], yAxis: [ { type: 'value', } ], series: [{ type: 'bar', stack: '总量', data: [5, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], itemStyle: { normal: { label: { show: true, position: 'top', formatter: '{c}' } , barBorderRadius: [5, 5, 0, 0], color: '#2EC7C9' } } }] }; //发布时间按年统计配置代码 var TimeoptionYear = { tooltip: { show: true, trigger: 'item' }, calculable: true, title: { x: 'center', text: '按发布时间统计-历年', y: 0 }, xAxis: [ { type: 'category', data: ['2016年', '2017年', '2018年'] } ], yAxis: [{type: 'value'}], series: [ { type: 'bar', stack: '总量', data: [9, 459, 18], itemStyle: { normal: { label: { show: true, position: 'top', formatter: '{c}' } , barBorderRadius: [5, 5, 0, 0], color: '#2EC7C9' } } } ] }; TimeChart.setOption(TimeoptionMonth); //按单位统计配置代码 var DanWeiOption = { tooltip: { show: true, trigger: 'item' }, calculable: true, title: { x: 'center', text: '按单位统计', y: 0 }, xAxis: [ { type: 'category', axisLabel: { formatter: function (value, index) { if (value.length > 8) value = value.substr(0, 8); return value; } }, data: DWLend // data: ['国家海洋环境监测中心(监管中心)', '海域管理司', '广东省海洋与渔业局', '海域管理处', '江苏省海洋与渔业局', '江门市海洋与渔业局', '泉港区海洋与渔业局', '广东省用海申请单位'] } ], yAxis: [{type: 'value'}], series: [ { type: 'bar', stack: '总量', data: DWJson, //data: [6, 395, 78, 3, 1, 1, 1, 1],// itemStyle: { normal: { label: { show: true, position: 'top', formatter: '{c}' }, barBorderRadius: [5, 5, 0, 0], color: '#2EC7C9' } } } ] }; DanWeiChart.setOption(DanWeiOption); setMonth(); var param = window.location.search; var arr = param.replace("?", "").split('&'); for (var i = 0; i < arr.length; i++) { if (arr[i].indexOf("Message=") > -1) { isSearch = true; document.getElementById("tab2").click(); isSearch = false; } }; leftPanelTreeLoad(); //$("#block").load('ZiYuanDataList', formdata, function () { //加载图文列表 //}); // $('#ZiYuanMuLuCode').val(@ViewBag.ZYMLCode); // $('#YongHuID').val(@ViewBag.YONGHUID); // $('#TreeTypeNumber').val(@ViewBag.TREETYPENUMBER); // $('#YongHuName').val('@ViewBag.YONGHUNAME'); // $('#BuMenId').val('@ViewBag.BUMENID'); $(".date-picker").datepicker({format: 'yyyy-mm-dd', language: 'zh-CN'}); //初始化时间控件 $("#divSearch").keyup(function (e) { if (e.keyCode == 13) { Search('', ''); } }); //初始化左侧目录树区域高度 $("#DivTree").height($(window).height() - offsetH); //当文档窗口发生改变时 触发左侧目录树区域高度调整 $(window).resize(function () { $("#DivTree").height($(window).height() - offsetH); }); $("#dataViewMenu").unbind("mouseover").unbind("mouseup"); $("#sidebar").unbind("mouseover").unbind("mouseup"); $("#leftmenu").bind('click', function () { //qiehuan(this); if ($("body").hasClass("fold_leftMenu")) { $("body").removeClass("fold_leftMenu"); } else { $("body").addClass("fold_leftMenu"); } }); }); //弹出所属目录页面层 function tanchu() { layer.open({ type: 2, title: '所属目录', id: 'SuoShuMuLu', shadeClose: true, shade: false, maxmin: false, //开启最大化最小化按钮 area: ['300px', '500px'], content: '/res/ResManage/ResRegister/MuLuShu' }); } //选项卡切换事件 function f_unit_certifcate_def() { this.onPage = function (action) { var pageIndex = getUrlParam('pageIndex', action); var url = 'ZiYuanDataList'; url += '?pageIndex=' + pageIndex; $.ajax({ url: url, success: function (result) { $("#block").load(url, formdata, function () { }); init(); }, error: function (result) { alert(result.message); } }); }; this.onInit = function () { init(); }; this.load = function () { var url = 'ZiYuanDataList'; $("#div_ScanOriginal").load(url, formdata, function () { f_u_certifcate.onInit(); }); }; function init() { } } var f_u_certifcate = new f_unit_certifcate_def(); function LoadCharts() { if ($("#tabBtn3").parent().hasClass("active")) return; else { LoadChartTongJi(); } } //加载资源统计页面柱状图 function LoadChartTongJi() { var ZYMLZiYuan = document.getElementById('ZYMLZiYuan'); //var url; //if ($('input:radio[name="Type"]:checked').val() == 'ZiYuanLeiXing') // url = 'ZiYuanTongji?Type=ZiYuanLeiXing'; //else if ($('input:radio[name="Type"]:checked').val() == 'DiQuFenBu') // url = 'ZiYuanTongji?Type=DiQuFenBu'; //else if ($('input:radio[name="Type"]:checked').val() == 'FaBuNianFen') // url = 'ZiYuanTongji?Type=FaBuNianFen'; //$.ajax({ // url: url, // type: 'post', // data: formdata, // success: function (data) { // var json = eval("(" + data + ")"); var option = { tooltip: { show: true, trigger: 'item' }, calculable: true, xAxis: [ { type: 'category', data: ['基础底图', '业务图层', '空间服务', '专题地图', '专题应用程序', '业务集成', '文档数据'] } ], yAxis: [ { type: 'value' } ], series: [ { type: 'bar', stack: '总量', data: [137, 12, 26, 28, 67, 56, 111], itemStyle: { normal: { label: { show: true, position: 'top', formatter: '{c}' }, barBorderRadius: [5, 5, 0, 0], color: '#2EC7C9' } } } ] }; var ZYMLZiYuanChart = echarts.init(ZYMLZiYuan); ZYMLZiYuanChart.setOption(option); // } //}) } //切换为按月 function setMonth() { var Time = document.getElementById("div_Time"); TimeChart = echarts.init(Time); getZiYuanFaBuQingKuangChartData(); } function ShowZiYuanFaBu_ShiYongQingKuangChart(Legend, xAxis, Series) { var option = { tooltip: { trigger: 'axis' }, color: [ '#31C4CB', '#B6A1E2', '#59B1F0', '#FFB880', '#DA7980', '#8D98B4', '#E5CE0C', '#98B74F', '#D48265', '#91C7AE', '#749F83', '#D8DEB8' ], legend: { top: 10, right: 50, textStyle: { fontSize: 14 }, data: Legend }, calculable: true, grid: { top: 80, right: 60, bottom: 50, left: 60 }, xAxis: [ { type: 'category', boundaryGap: false, data: xAxis } ], yAxis: [ { type: 'value', axisLine: { color: '#78B9EF', opacity: 0.5, } } ], series: Series }; return option; } //获取资源发布情况统计数据 function getZiYuanFaBuQingKuangChartData() { $.ajax({ url: "/res/ZiYuan/getZiYuanFaBuQingKuangChartData?Method=" + "Month", type: 'post', data: {}, success: function (result) { var result = "{\"Legend\": [{\"name\":\"基础底图\", \"icon\": \"rect\"},{\"name\":\"业务图层\", \"icon\": \"rect\"},{\"name\":\"专题地图\", \"icon\": \"rect\"},{\"name\":\"文档成果\", \"icon\": \"rect\"},{\"name\":\"其它\", \"icon\": \"rect\"}], \"xAxis\": [\"3月\",\"2月\",\"1月\",\"去年12月\",\"去年11月\",\"去年10月\",\"去年9月\",\"去年8月\",\"去年7月\",\"去年6月\",\"去年5月\",\"去年4月\"], \"Series\": {\"JcdtSeries\":[0,1,0,0,5,1,3,3,1,7,1,13], \"YwtcSeries\": [1,3,4,2,18,2,6,9,4,15,6,10], \"ZtdtSeries\": [1,1,0,4,39,0,3,1,1,1,1,1],\"WdcgSeries\": [0,0,0,0,1,3,1,0,2,0,0,2], \"QtSeries\": [0,6,1,2,33,28,8,3,24,36,27,14]}}"; var obj = eval("(" + result + ")"); var Series = [ { name: '基础底图', type: 'line', smooth: true, data: obj.Series.JcdtSeries, markPoint: { data: [ {type: 'max', name: '最大值'} ] } }, { name: '业务图层', type: 'line', smooth: true, data: obj.Series.YwtcSeries, markPoint: { data: [ {type: 'max', name: '最大值'} ] } }, { name: '专题地图', type: 'line', smooth: true, data: obj.Series.ZtdtSeries, markPoint: { data: [ {type: 'max', name: '最大值'} ] } }, { name: '文档成果', type: 'line', smooth: true, areaStyle: {normal: {color: '#59B1F0', opacity: 0.3}}, data: obj.Series.WdcgSeries, markPoint: { data: [ {type: 'max', name: '最大值'} ] } }, { name: '其它', type: 'line', smooth: true, data: obj.Series.QtSeries, markPoint: { data: [ {type: 'max', name: '最大值'} ] } } ]; var Legend = obj.Legend; var xAxis = obj.xAxis; TimeChart.setOption(ShowZiYuanFaBu_ShiYongQingKuangChart(Legend, xAxis, Series)); }, error: function (e) { alert(e); } }); } //切换为按年 function setYear() { TimeChart = echarts.init(Time); TimeChart.setOption(TimeoptionYear); } function changepage(num) { var url = 'ZiYuanDataList?page=' + num; $("#block").load(url, formdata, function () { //加载图文列表 var Page = Number(document.getElementById("curren").value); var Count = Number(document.getElementById("total").value); $('#Paginator').jqPaginator({ totalCounts: Count, pageSize: 15, currentPage: Page, first: '