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.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)}

+
) }) diff --git a/src/military/achievement/components/itemList/index.scss b/src/military/achievement/components/itemList/index.scss index c920cd3e8..7bc27299d 100644 --- a/src/military/achievement/components/itemList/index.scss +++ b/src/military/achievement/components/itemList/index.scss @@ -3,45 +3,69 @@ padding: 17px 20px; background: #fff; border-bottom: 1px dashed #dedede; -} -.list-title { - font-size: 1rem; - color: #000; - cursor: pointer; - display: flex; - align-items: center; - svg { - margin-left: 0.5rem; - } -} -.list-title:hover { - color: #4154f1; -} -.list-title span { - padding: 3px 5px; - margin-left: 0.5em; - background: #f8c753; - font-size: 13px; - color: #fff; - border-radius: 3px; -} -.list-other { - margin-top: 0.5rem; - display: flex; - align-items: center; - & > p { - display: inline-block; - font-size: 0.875rem; - color: #666; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + .list-title { + font-size: 1rem; + color: #000; + cursor: pointer; + display: flex; + align-items: center; + svg { + margin-left: 0.5rem; + } } - p:first-child{ - width: 50%; + .list-title:hover { + color: #4154f1; } - p:nth-child(2){ - width: 40%; + .list-title span { + padding: 3px 5px; + margin-left: 0.5em; + background: #f8c753; + font-size: 13px; + color: #fff; + border-radius: 3px; } -} + + .list-other { + margin-top: 0.5rem; + display: flex; + align-items: center; + & > p { + display: inline-block; + font-size: 0.875rem; + color: #666; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + p:first-child{ + width: 25%; + } + p:nth-child(2){ + width: 25%; + } + p:nth-child(3){ + width: 25%; + } + p:nth-child(4){ + width: 15%; + } + p:nth-child(5){ + width: 10%; + } + } + + .list-text { + p { + width: 100%; + // height: 56px; + height: 30px; + font-size: 0.875rem; + color: #666; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + +} \ No newline at end of file diff --git a/src/military/achievement/noticeList/index.scss b/src/military/achievement/noticeList/index.scss index 2c2eabe92..c7c23546c 100644 --- a/src/military/achievement/noticeList/index.scss +++ b/src/military/achievement/noticeList/index.scss @@ -54,6 +54,7 @@ } .notice-center-content{ + width: 889px; padding:1.25rem; background: #fff; flex: auto; diff --git a/src/military/achievement/overview/index.scss b/src/military/achievement/overview/index.scss index 7b25048a3..257ac6eda 100644 --- a/src/military/achievement/overview/index.scss +++ b/src/military/achievement/overview/index.scss @@ -4,6 +4,7 @@ align-items: center; height: 622px; position: relative; + margin-top: -100px; .banner-img { width: 1200px; height: 572px; @@ -16,7 +17,7 @@ display: flex; justify-content: center; position: absolute; - bottom: 0px; + bottom: 20px; .button { width: 50%; background:#f6f7fa;