diff --git a/src/military/achievement/achivChart/index.jsx b/src/military/achievement/achivChart/index.jsx
index eb3b4b41e..0a11e1491 100644
--- a/src/military/achievement/achivChart/index.jsx
+++ b/src/military/achievement/achivChart/index.jsx
@@ -3,6 +3,7 @@ import echarts from 'echarts';
import './index.scss';
import topCountPng from '../image/left_top_icon.png';
import botCountPng from '../image/left_bot_icon.png';
+import { getAchivChart } from '../api';
function AchivChart() {
useEffect(() => {
@@ -60,7 +61,18 @@ function AchivChart() {
{ value: 45, name: '科研成果 32%' },
{ value: 52, name: '装备成果 40%' },
{ value: 66, name: '其他成果 50%' }
- ]
+ ],
+ label: {
+ show: true,
+ position: 'inside',
+ color: 'white',
+ formatter: function (params) {
+ return Math.round(params.percent) + '%';
+ },
+ textStyle: {
+ fontSize: 20
+ }
+ }
}
],
graphic: {
diff --git a/src/military/achievement/achivChart/index.scss b/src/military/achievement/achivChart/index.scss
index 99f7b4235..baa5ffaad 100644
--- a/src/military/achievement/achivChart/index.scss
+++ b/src/military/achievement/achivChart/index.scss
@@ -1,6 +1,6 @@
#mainContent {
- margin: 40px auto 0 auto;
+ margin: 10px auto 0 auto;
width: 1200px;
height: 450px;
display: flex;
@@ -8,12 +8,12 @@
box-shadow:8px 6px 18px rgba(171, 202, 255, 0.24) inset;
#leftBox {
- width: 500px;
+ width: 550px;
height: 450px;
position: relative;
.count-top {
display: flex;
- width: 180px;
+ width: 190px;
height: 95px;
position: absolute;
top: 87px;
@@ -39,30 +39,31 @@
height: 95px;
display: flex;
flex-direction: column;
+ justify-content: center;
#count-num {
width: 100%;
- height: 55px;
- line-height: 55px;
+ height: 35px;
+ line-height: 35px;
// font-family:Alibaba PuHuiTi;
font-weight:600;
color:#283444;
font-size:24px;
letter-spacing:2px;
}
- // .count-title {
- // width: 100%;
- // height: 40px;
- // line-height: 40px;
- // // font-family:Alibaba PuHuiTi;
- // color:#445a7a;
- // font-size:15px;
- // letter-spacing:50px;
- // }
+ .count-title {
+ width: 100%;
+ height: 30px;
+ line-height: 30px;
+ // font-family:Alibaba PuHuiTi;
+ color:#445a7a;
+ font-size:15px;
+ letter-spacing:1px;
+ }
}
}
.count-bot {
display: flex;
- width: 180px;
+ width: 190px;
height: 95px;
position: absolute;
top: 227px;
@@ -89,24 +90,23 @@
display: flex;
flex-direction: column;
justify-content: center;
- align-items: center;
#count-num {
width: 100%;
- height: 55px;
+ height: 35px;
+ line-height: 35px;
// font-family:Alibaba PuHuiTi;
font-weight:600;
color:#283444;
font-size:24px;
- line-height: 30px;
letter-spacing:2px;
}
.count-title {
width: 100%;
- height: 40px;
+ height: 30px;
+ line-height: 30px;
// font-family:Alibaba PuHuiTi;
color:#445a7a;
font-size:15px;
- line-height: 20px;
letter-spacing:1px;
}
}
@@ -117,7 +117,7 @@
height: 450px;
}
#blankBox {
- width: 200px;
+ width: 150px;
height: 450px;
}
}
diff --git a/src/military/achievement/api.js b/src/military/achievement/api.js
index 5100db141..f88b73c6f 100644
--- a/src/military/achievement/api.js
+++ b/src/military/achievement/api.js
@@ -1,6 +1,21 @@
import fetch from './fetch';
import { notification } from 'antd';
+// 成果概览查询
+export async function getAchivChart() {
+ let res = await fetch({
+ url: '/api/',
+ method: 'get'
+ });
+ if (res.message === 'success') {
+ return res.data;
+ } else {
+ notification.open({
+ message: "提示",
+ description: res.message || '请求错误',
+ });
+ }
+}
// 成果列表查询
export async function getNoticeList(params) {
diff --git a/src/military/achievement/components/itemList/index.jsx b/src/military/achievement/components/itemList/index.jsx
index db51d09f8..f6cabb36e 100644
--- a/src/military/achievement/components/itemList/index.jsx
+++ b/src/military/achievement/components/itemList/index.jsx
@@ -12,10 +12,15 @@ export default (props) => {
{item.achievementName || item.title} {item.new &&
发布单位:{item.publisher}
} +成果来源:{item.achievementSource || '未知'}
+发布单位:{item.publisher || '未知'}
发布时间:{(item.publishDate && item.publishDate.split(' ')[0]) || (item.createTime && item.createTime.split(' ')[0])}
+下载量:{item.attachmentDownloadCount || '0'}
{item.visits || 0}
摘要:{item.text && item.text.substring(3, item.text.length-4)}
+