提交 c49dbacc authored 作者: 胡卉清's avatar 胡卉清

合并分支 'dev_hhq' 到 'master'

Dev hhq 查看合并请求 !80
...@@ -40,4 +40,23 @@ export function getOverallRanking(params) { ...@@ -40,4 +40,23 @@ export function getOverallRanking(params) {
url: `/api/innovateSubject/overallRanking`, url: `/api/innovateSubject/overallRanking`,
params params
}) })
} }
\ No newline at end of file
//创新主体主页:领域布局
export function getResearchField(params) {
return request({
method: 'GET',
url: `/api/innovateSubject/researchField`,
params
})
}
//创新主体主页:主体类型分类领域布局
export function getResearchFieldSubjectType(params) {
return request({
method: 'GET',
url: `/api/innovateSubject/researchFieldSubjectType`,
params
})
}
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
</div> </div>
</div> </div>
<div class="select-box"> <div class="select-box">
<el-select v-model="releaseTime" placeholder="2022" style="width: 120px" <el-select v-model="releaseTime" pl aceholder="2022" style="width: 120px"
@change="handleGetOverallRanking"> @change="handleGetOverallRanking">
<el-option v-for="item in releaseTimeList" :key="item.value" :label="item.label" <el-option v-for="item in releaseTimeList" :key="item.value" :label="item.label"
:value="item.value" /> :value="item.value" />
...@@ -308,7 +308,8 @@ ...@@ -308,7 +308,8 @@
</div> </div>
</div> </div>
<div class="select-box"> <div class="select-box">
<el-select v-model="releaseTime" placeholder="2022" style="width: 120px"> <el-select v-model="releaseTime" placeholder="2022" style="width: 120px"
@change="handleGetResearchField(), handleGetResearchFieldSubjectType()">
<el-option v-for="item in releaseTimeList" :key="item.value" :label="item.label" <el-option v-for="item in releaseTimeList" :key="item.value" :label="item.label"
:value="item.value" /> :value="item.value" />
</el-select> </el-select>
...@@ -324,7 +325,7 @@ ...@@ -324,7 +325,7 @@
</div> </div>
<div class="center-footer-layout-content"> <div class="center-footer-layout-content">
<div class="center-footer-layout-content-item"> <div class="center-footer-layout-content-item">
<EChart :option="pieOption" autoresize :style="{ height: '370px', width: '750px' }" /> <EChart :option="pieOption(barOptionData)" autoresize :style="{ height: '370px', width: '750px' }" />
<div class="center-footer-elx-footer"> <div class="center-footer-elx-footer">
<img src="./assets/images/ai.png" alt="" /> <img src="./assets/images/ai.png" alt="" />
<div class="center-footer-elx-footer-text"> <div class="center-footer-elx-footer-text">
...@@ -335,7 +336,8 @@ ...@@ -335,7 +336,8 @@
</div> </div>
<div style="width: 1px;height: 432px;background: rgba(234, 236, 238, 1);"></div> <div style="width: 1px;height: 432px;background: rgba(234, 236, 238, 1);"></div>
<div class="center-footer-layout-content-item"> <div class="center-footer-layout-content-item">
<EChart :option="raderOption" autoresize :style="{ height: '370px', width: '750px' }" /> <EChart :option="raderOption(raderOptionData)" autoresize
:style="{ height: '370px', width: '750px' }" />
<div class="center-footer-elx-footer"> <div class="center-footer-elx-footer">
<img src="./assets/images/ai.png" alt="" /> <img src="./assets/images/ai.png" alt="" />
<div class="center-footer-elx-footer-text"> <div class="center-footer-elx-footer-text">
...@@ -413,7 +415,9 @@ import { ...@@ -413,7 +415,9 @@ import {
getCountSubjectType, getCountSubjectType,
getSubjectTypeList, getSubjectTypeList,
findListBySubjectTypeId, findListBySubjectTypeId,
getOverallRanking getOverallRanking,
getResearchField,
getResearchFieldSubjectType
} from "@/api/innovationSubject/overview.js"; } from "@/api/innovationSubject/overview.js";
import setChart from "@/utils/setChart"; import setChart from "@/utils/setChart";
...@@ -884,6 +888,43 @@ const releaseTimeList = ref([ ...@@ -884,6 +888,43 @@ const releaseTimeList = ref([
]); ]);
const categoryList = ref(["创新主体排名", "研究布局"]); const categoryList = ref(["创新主体排名", "研究布局"]);
const activeCate = ref("创新主体排名"); const activeCate = ref("创新主体排名");
//研究领域布局情况
const barOptionData = ref([])
const handleGetResearchField = async () => {
try {
let params = {
year: releaseTime.value,
}
const res = await getResearchField(params);
console.log("研究领域布局情况", res);
if (res.code === 200 && res.data) {
// 提取 names 和 values
const names = res.data.map(item => item.areaName);
const values = res.data.map(item => item.amount); // 或者使用 item.percent,根据需求选择
const total = res.data.reduce((sum, item) => sum + item.amount, 0);
barOptionData.value = {
names, values, total
}
}
} catch (error) {
console.error("获取研究领域布局情况error", error);
}
};
const raderOptionData = ref([])
const handleGetResearchFieldSubjectType = async () => {
try {
let params = {
year: releaseTime.value,
}
const res = await getResearchFieldSubjectType(params);
console.log("研究领域布局情况", res);
if (res.code === 200 && res.data) {
raderOptionData.value = res.data
}
} catch (error) {
console.error("获取研究领域布局情况error", error);
}
};
const areaList = ref([ const areaList = ref([
{ {
...@@ -965,6 +1006,8 @@ onMounted(async () => { ...@@ -965,6 +1006,8 @@ onMounted(async () => {
handleGetOverallRanking() handleGetOverallRanking()
handleFindListBySubjectTypeId() handleFindListBySubjectTypeId()
handleGetResearchField()
handleGetResearchFieldSubjectType()
let chart1 = getPieChart(chart1Data.value, colorList); let chart1 = getPieChart(chart1Data.value, colorList);
setChart(chart1, "chart1"); setChart(chart1, "chart1");
}); });
......
...@@ -98,11 +98,11 @@ ...@@ -98,11 +98,11 @@
<div class="bottom-main"> <div class="bottom-main">
<div class="left"> <div class="left">
<div class="select-box"> <div class="select-box">
<div class="select-box-header"> <div class="select-box-header" style=" display: flex;">
<div class="icon"></div> <div class="icon"></div>
<div class="title">{{ "科技领域" }}</div> <div class="title">{{ "科技领域" }}</div>
</div> </div>
<div class="select-main"> <div class="select-main" style="padding: 25px;">
<div class="checkbox-group"> <div class="checkbox-group">
<!-- <el-checkbox v-for="(item, index) in areaList" :key="index" v-model="selectedAreaList" :label="item" <!-- <el-checkbox v-for="(item, index) in areaList" :key="index" v-model="selectedAreaList" :label="item"
class="filter-checkbox"> class="filter-checkbox">
...@@ -918,6 +918,7 @@ onMounted(() => { ...@@ -918,6 +918,7 @@ onMounted(() => {
.select-box { .select-box {
margin-top: 21px; margin-top: 21px;
.paixu-btn { .paixu-btn {
display: flex; display: flex;
width: 120px; width: 120px;
...@@ -970,6 +971,26 @@ onMounted(() => { ...@@ -970,6 +971,26 @@ onMounted(() => {
} }
} }
} }
.icon {
margin-top: 4px;
width: 8px;
height: 16px;
background: var(--color-main-active);
border-radius: 0 4px 4px 0;
}
.title {
color: rgba(5, 95, 194, 1);
margin-left: 17px;
font-family: Microsoft YaHei;
font-style: Bold;
font-size: 20px;
font-weight: 700;
line-height: 26px;
letter-spacing: 0px;
text-align: left;
}
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论