From 4f0d9bde31a80f6279e26466250da7716eec627f Mon Sep 17 00:00:00 2001
From: zs <zhoushuai@zbooksoft.com>
Date: 星期四, 18 十二月 2025 09:15:05 +0800
Subject: [PATCH] 提交成果资料按钮调整
---
src/main/webapp/WEB-INF/view/gh/utlStatistics/utlStatistics.jsp | 91 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 84 insertions(+), 7 deletions(-)
diff --git a/src/main/webapp/WEB-INF/view/gh/utlStatistics/utlStatistics.jsp b/src/main/webapp/WEB-INF/view/gh/utlStatistics/utlStatistics.jsp
index b24dd4a..4a45e52 100644
--- a/src/main/webapp/WEB-INF/view/gh/utlStatistics/utlStatistics.jsp
+++ b/src/main/webapp/WEB-INF/view/gh/utlStatistics/utlStatistics.jsp
@@ -91,9 +91,10 @@
<div class="statistics_txt">
<div class="title">缁熻缁撴灉</div>
<div class="statistics_scroll" style="padding:0">
- <div id="tab_statistical" class="fulltext_row2">
- <iframe name="statisticsIframe" id="statisticsIframe" width="100%" frameborder="no" border="0"
- marginwidth="0" marginheight="0" allowtransparency="yes"></iframe>
+ <div id="tab_statistical" class="fulltext_row2" style="width: 100%;height:100%;">
+ <div id="pie_statisticals" style="width: 100%;height:100%;overflow: hidden;"></div>
+<%-- <iframe name="statisticsIframe" id="statisticsIframe" width="100%" frameborder="no" border="0"--%>
+<%-- marginwidth="0" marginheight="0" allowtransparency="yes"></iframe>--%>
</div>
</div>
</div>
@@ -115,11 +116,87 @@
})
function utilizationStatistics() {
+ var myChart = echarts.init(document.getElementById('pie_statisticals'));
+ var colors = ['#87CEFA', '#945b6c', '#00FFFF', '#FFA500'];
+ option = {
+ title: {
+ text: '鍊熼槄缁熻',
+ left: 'center',
+ textStyle: {
+ color: '#0c0c0c'
+ }
+ },
+ tooltip: {
+ trigger: 'item',
+ formatter: '{a} <br/>{b}: {c} ({d}%)'
+ },
+ legend: {
+ orient: 'vertical',
+ left: 'left',
+ data: ['闈炲瘑', '鍐呴儴', '绉樺瘑', '鏈哄瘑'],
+ textStyle: {
+ color: '#0e0e0e'
+ }
+ },
+ series: [
+ {
+ name: '绾歌川鍊熼槄',
+ type: 'pie',
+ radius: ['0%', '40%'], // 鍐呭崐寰勫拰澶栧崐寰�
+ center: ['50%', '50%'], // 鍦嗗績浣嶇疆
+ data: [],
+ color: colors,
+ label: {
+ color: '#2d2424'
+ }
+ },
+ {
+ name: '鐢靛瓙鍊熼槄',
+ type: 'pie',
+ radius: ['50%', '70%'], // 鍐呭崐寰勫拰澶栧崐寰�
+ center: ['50%', '50%'], // 鍦嗗績浣嶇疆
+ data: [],
+ color: colors,
+ label: {
+ color: '#100f0f'
+ }
+ }
+ ]
+ };
- var reportFile = "borrow_approval_hn.ureport%202.xml";
- var path = "<%=path%>";
- var url = path + "/ureport/preview?_u=file:" + reportFile ;
- $('#statisticsIframe').attr('src', url); //娉細涓嶈兘鐢╳indow.open鏂瑰紡鎵撳紑锛屽惁鍒欐斁澶х缉灏忎細琚竻绌�
+ myChart.showLoading(); //loading鍔ㄧ敾
+
+ $.ajax({
+ type: "post",
+ async: true,
+ url: "screen/getBorrowEchartsPie",
+ dataType: "json",
+ success: function (result) {
+ if (result) {
+ myChart.hideLoading();
+ // 鍋囪杩斿洖鐨勬暟鎹寘鍚焊璐ㄥ�熼槄鍜岀數瀛愬�熼槄涓ょ粍鏁版嵁
+ myChart.setOption({
+ series: [
+ { data: result.paperData || [] }, // 绾歌川鍊熼槄鏁版嵁
+ { data: result.electronicData || [] } // 鐢靛瓙鍊熼槄鏁版嵁
+ ]
+ });
+ }
+ },
+ error: function (errorMsg) {
+ //璇锋眰澶辫触鏃舵墽琛岃鍑芥暟
+ alert("璇锋眰鏁版嵁澶辫触!");
+ myChart.hideLoading();
+ }
+ });
+
+ myChart.setOption(option);
+
+
+ <%--var reportFile = "borrow_approval_hn.ureport%202.xml";--%>
+ <%--var path = "<%=path%>";--%>
+ <%--var url = path + "/ureport/preview?_u=file:" + reportFile ;--%>
+ <%--$('#statisticsIframe').attr('src', url); //娉細涓嶈兘鐢╳indow.open鏂瑰紡鎵撳紑锛屽惁鍒欐斁澶х缉灏忎細琚竻绌�--%>
}
</script>
--
Gitblit v1.9.1