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

合并分支 'dev_hhq' 到 'master'

Dev hhq 查看合并请求 !60
// 企业主页接口信息
import request from "@/api/request.js";
// 企业基本信息:基本信息
export function getEnterprisePageInfo(params) {
return request({
method: 'GET',
url: `/api/enterprisePage/info/${params}`,
})
}
// 企业基本信息:主要人员
export function getEnterpriseKeyPerson(params) {
return request({
method: 'GET',
url: `/api/enterprisePage/keyPerson/${params}`,
})
}
//企业基本信息:分支机构
export function getEnterpriseBranch(params) {
return request({
method: 'GET',
url: `/api/enterprisePage/branch/${params}`,
})
}
//企业基本信息:最新动态
export function getEnterpriseNewDynamic(params) {
return request({
method: 'GET',
url: `/api/enterprisePage/newDynamic/${params}`,
})
}
//企业研发投入:年度研发投入对比
export function getEnterpriseStudy(params) {
return request({
method: 'GET',
url: `/api/enterprisePage/study/${params}`,
})
}
//企业研发投入:年度研发增长对比
export function getEnterpriseGrowth(params) {
return request({
method: 'GET',
url: `/api/enterprisePage/growth/${params}`,
})
}
//企业研究人员:人员数量
export function getEnterpriseResearcherNum(params) {
return request({
method: 'GET',
url: `/api/enterprisePage/researcherNum/${params}`,
})
}
//企业研究人员:人员学历
export function getEnterpriseResearcherDegree(params) {
return request({
method: 'GET',
url: `/api/enterprisePage/researcherDegree/${params}`,
})
}
//企业专利:地域分布
export function getEnterprisePatentRegion(params) {
return request({
method: 'GET',
url: `/api/enterprisePage/patentRegion/${params}`,
})
}
//企业专利:领域分布
export function getEnterprisPatentField(params) {
return request({
method: 'GET',
url: `/api/enterprisePage/patentField/${params}`,
})
}
......@@ -4,7 +4,7 @@ import companyPages from "@/views/companyPages/index.vue";
const companyPagesRoutes = [
// 智库系统的主要路由
{
path: "/companyPages",
path: "/companyPages/:id",
name: "companyPages",
component: companyPages,
meta: {
......
......@@ -15,11 +15,11 @@
<div class="node" :style="leftOffset(i)">
<!-- 圆环 -->
<div class="dot" :class="linePos(i, flip)" :style="{
marginTop: linePos(i, flip) === 'down' ? '35px' : '-10px'
marginTop: linePos(i, flip) === 'down' ? '-5px' : '35px'
}"></div>
<div class="time" :style="{
marginTop: linePos(i, flip) === 'down' ? '10px' : '-40px'
marginTop: linePos(i, flip) === 'down' ? '-50px' : '10px'
}" v-if="type === 'normal'">
{{ item.time }}
</div>
......@@ -37,9 +37,12 @@
{{ item.title }}
<!-- <img class="item-header-icon" src="@/assets/images/icon/copy.png" style="cursor: pointer;"></img> -->
</div>
<div class="content">
{{ item.content }}
</div>
<el-tooltip class="box-item" effect="dark" :content="item.content" placement="top">
<div class="content">
{{ item.content }}
</div>
</el-tooltip>
</div>
</div>
</div>
......@@ -86,7 +89,7 @@ export default {
},
methods: {
leftOffset(i) {
return this.type === 'normal' ? { left: `${(i * 100) / 5}%`, top: '50%' } : { left: `${(i * 100) / 5}%`, top: '100%' }
return this.type === 'normal' ? { left: `${(i * 100) / 4}%`, top: '50%' } : { left: `${(i * 100) / 4}%`, top: '100%' }
},
......@@ -105,6 +108,7 @@ export default {
<style scoped>
/* 样式与之前完全一致,不再重复 */
.timeline-wrapper {
font-family: Microsoft YaHei;
display: flex;
align-items: center;
width: 100%;
......@@ -252,13 +256,46 @@ export default {
line-height: 24px;
letter-spacing: 0px;
text-align: justify;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 4;
overflow: hidden;
-webkit-box-orient: vertical;
}
.card.up {
bottom: 50px;
bottom: 80px;
margin-bottom: 20px;
margin-left: 160px;
}
.card.down {
top: 20px;
top: -50px;
margin-top: 95px;
margin-left: 160px;
}
.box-item {
color: rgba(255, 255, 255, 1);
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 16px;
font-weight: 400;
line-height: 30px;
letter-spacing: 0px;
text-align: left;
}
:deep(.el-popper.is-dark) {
color: rgba(255, 255, 255, 1);
font-family: Microsoft YaHei !important;
font-style: Regular;
font-size: 16px;
font-weight: 400;
line-height: 30px;
letter-spacing: 0px;
text-align: left;
}
</style>
\ No newline at end of file
</style>
import * as echarts from "echarts";
const getBarChart = (nameList, valueList, isPer) => {
const option = {
title: { text: '' },
/**
* 生成雷达图配置项(单系列)
* @param {{name: string[], value: number[]}} data - 包含 name 和 value 的对象
* @param {string} seriesName - 系列名称(如“学历分布”),可选,默认为 ''
* @returns {Object} ECharts 配置项
*/
const getRadarChart = (data, seriesName = '') => {
const nameList = data.name
const valueList = data.value
console.log(nameList, valueList, 'datadatadatadata')
// 自动计算每个维度的 max:取 value 中的最大值 * 1.2 并向上取整到合适刻度
const maxValue = Math.max(...valueList);
// 简单处理:如果 maxValue <= 10,max 设为 10;否则按 1.2 倍并取整到百/十位
let max;
if (maxValue === 0) {
max = 10;
} else if (maxValue <= 10) {
max = 10;
} else if (maxValue <= 100) {
max = Math.ceil(maxValue * 1.2 / 10) * 10;
} else {
max = Math.ceil(maxValue * 1.2 / 100) * 100;
}
// 所有 indicator 使用相同的 max(也可每个维度单独设,但你没提供)
const indicators = nameList.map(name => ({ name, max }));
const option = {
title: { text: '' },
radar: {
radius: '50%', // 关键:缩小整个雷达
center: ['50%', '50%'], // 可选:再往下挪一点,避免图例挤在一起
indicator: [
{ name: '5G通信', max: 6500 },
{ name: '生物科技', max: 16000 },
{ name: '人工智能', max: 30000 },
{ name: '物联网', max: 38000 },
{ name: '量子科技', max: 52000 },
{ name: '智能汽车', max: 25000 }
],
radius: '50%',
center: ['50%', '50%'],
indicator: indicators,
axisName: {
formatter: '{value}',
color: 'rgba(59, 65, 75, 1)',
......@@ -25,26 +43,25 @@ const getBarChart = (nameList, valueList, isPer) => {
},
series: [
{
name: 'Budget vs spending',
name: seriesName,
type: 'radar',
symbol: 'none',
// 添加或修改 lineStyle 属性来控制线条粗细
lineStyle: {
width: 1, // 调整这个值可以改变线条的粗细,数值越大线条越粗
width: 1,
color: '#69B1FF'
},
data: [
{
value: [4200, 3000, 20000, 35000, 50000, 18000],
name: '美国',
value: valueList,
name: seriesName,
areaStyle: { color: 'rgba(105, 177, 255, 0.1)' }
},
}
]
}
]
}
return option
}
};
return option;
};
export default getBarChart
\ No newline at end of file
export default getRadarChart;
\ No newline at end of file
......@@ -4,7 +4,7 @@
<div class="box1">
<div class="box-header">
<div class="header-left"></div>
<div class="title">政策建议落实情况</div>
<div class="title">政策建议相关情况</div>
<div class="header-right">
<div class="icon">
<img src="@/assets/icons/box-header-icon2.png" alt="" />
......@@ -108,7 +108,7 @@ import {
} from "@/api/thinkTank/overview";
import { useRouter } from "vue-router";
const router = useRouter();
// 政策建议落实情况
// 政策建议相关情况
const box1Data = ref([
{
id: 1,
......@@ -265,12 +265,12 @@ const box1Data = ref([
const handleGetThinkTankReportPolicy = async () => {
try {
const res = await getThinkTankReportPolicy(router.currentRoute._value.params.id);
console.log("政策建议落实情况", res);
console.log("政策建议相关情况", res);
if (res.code === 200 && res.data) {
box1Data.value = res.data
}
} catch (error) {
console.error("获取政策建议落实情况rror", error);
console.error("获取政策建议相关情况rror", error);
}
};
......
......@@ -17,12 +17,12 @@
<div class="box1-main">
{{ box1Data }}
</div>
<div class="box1-footer">
<!-- <div class="box1-footer">
<div class="text">{{ "查看更多" }}</div>
<div class="icon">
<img src="@/assets/images/icon-double-down.png" alt="" />
</div>
</div>
</div> -->
</div>
<div class="box2">
<div class="box-header">
......@@ -53,14 +53,14 @@
<div class="box-header">
<div class="header-left"></div>
<div class="title">主要观点</div>
<div class="header-btn-box">
<!-- <div class="header-btn-box">
<div class="btn btnActive">
{{ "核心发现" }}
</div>
<div class="btn">
{{ "政策建议" }}
</div>
</div>
</div> -->
<div class="header-right">
<div class="icon">
<img src="@/assets/icons/box-header-icon2.png" alt="" />
......@@ -78,7 +78,7 @@
</div>
<div class="center">
<div class="title">{{ item.content }}</div>
<div class="desc">{{ item.econtent }}</div>
<!-- <div class="desc">{{ item.econtent }}</div> -->
</div>
<div class="right">
<div class="tag" v-for="(val, idx) in item.hylyList" :key="idx">
......@@ -489,7 +489,7 @@ onMounted(() => {
.box1-main {
margin: 5px auto;
width: 428px;
height: 282px;
height: 315px;
/* 9行 * 30px/行 = 270px,这里可以稍微调整 */
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
......
......@@ -7,7 +7,7 @@
<img src="./images/box-header-icon1.png" alt="" />
</div>
<div class="title">{{ "提出建议领域分布" }}</div>
<div class="box-header-right">{{ "查看数据源 >" }}</div>
<!-- <div class="box-header-right">{{ "查看数据源 >" }}</div> -->
</div>
<div class="box-main">
<div class="select-box">
......@@ -19,7 +19,7 @@
<div id="box1Chart"></div>
</div>
</div>
<div class="box2 box">
<!-- <div class="box2 box">
<div class="box-header">
<div class="icon">
<img src="./images/box-header-icon2.png" alt="" />
......@@ -42,20 +42,17 @@
:percentage="item.percent" />
<div class="num">{{ item.amount + "项" }} / {{ item.totalAmount + "项" }}</div>
<div class="per">{{ item.percent + "%" }}</div>
</div>
<!-- <div class="box2-item">
<el-progress :percentage="50" />
</div> -->
</div>
</div>
</div>
</div>
</div> -->
<div class="box3 box">
<div class="box-header">
<div class="icon">
<img src="./images/box-header-icon2.png" alt="" />
</div>
<div class="title">{{ "热门研究方向变化趋势" }}</div>
<div class="box-header-right">{{ "查看数据源 >" }}</div>
<!-- <div class="box-header-right">{{ "查看数据源 >" }}</div> -->
</div>
<div class="box-main">
<div class="select-box">
......@@ -141,7 +138,7 @@
</div>
</div>
<div class="right-footer">
<div class="info">{{ total }}项调查</div>
<div class="info">{{ total }}智库报告</div>
<div class="page-box">
<el-pagination :page-size="12" background layout="prev, pager, next" :total="total"
@current-change="handleCurrentChange" :current-page="currentPage" />
......@@ -577,7 +574,7 @@ onMounted(() => {
gap: 16px;
.box {
width: 520px;
width: 790px;
height: 420px;
box-sizing: border-box;
border: 1px solid rgba(234, 236, 238, 1);
......@@ -586,7 +583,7 @@ onMounted(() => {
background: rgba(255, 255, 255, 1);
.box-header {
width: 520px;
width: 790px;
height: 48px;
border-bottom: 1px solid rgba(234, 236, 238, 1);
display: flex;
......
......@@ -23,7 +23,7 @@
</div>
<div class="main-content">
<div class="left">
<div class="select-box">
<!-- <div class="select-box">
<div class="select-box-header">
<div class="icon"></div>
<div class="title">{{ "报告类型" }}</div>
......@@ -36,7 +36,7 @@
</el-checkbox>
</div>
</div>
</div>
</div> -->
<div class="select-box">
<div class="select-box-header">
<div class="icon"></div>
......@@ -331,7 +331,7 @@ const handleGetThinkDynamicsReport = async () => {
authorName: author.value ? author.value : null,
currentPage: currentPage.value - 1,
pageSize: 12,
reportTypeIds: arrayToString(selectedReportTypeList.value) === '' ? null : arrayToString(selectedResearchTypeList.value),
// reportTypeIds: arrayToString(selectedReportTypeList.value) === '' ? null : arrayToString(selectedResearchTypeList.value),
researchTypeIds: arrayToString(selectedResearchTypeList.value) === '' ? null : arrayToString(selectedResearchTypeList.value)
}
......
......@@ -86,11 +86,11 @@
</div>
<div class="card2">
<div class="card-title">{{ "政府部门" }}</div>
<div class="card-num">{{ box1LeftData.zfJe }}亿美元</div>
<div class="card-num">{{ box1LeftData.zfJe / 100000000 }}亿美元</div>
</div>
<div class="card3">
<div class="card-title">{{ "其他机构" }}</div>
<div class="card-num">{{ box1LeftData.otherJe }}亿美元</div>
<div class="card-num">{{ box1LeftData.otherJ / 100000000 }}亿美元</div>
</div>
</div>
<div class="box1-main-right" id="box1Chart"></div>
......
......@@ -2,51 +2,51 @@ const getPieChart = (data) => {
let option = {
series: [
{
type: 'pie',
radius: [70, 100],
height: '100%',
left: 'center',
width: '100%',
itemStyle: {
borderColor: '#fff',
borderWidth: 1
},
label: {
alignTo: 'edge',
formatter: '{name|{b}}\n{time|{c} 条 {d}%}',
minMargin: 15,
edgeDistance: 10,
lineHeight: 15,
rich: {
name: {
fontSize: 16,
color: 'rgba(59, 65, 75, 1)',
fontWeight: 700,
},
time: {
fontSize: 14,
color: 'rgba(59, 65, 75, 1)',
type: 'pie',
radius: [70, 100],
height: '100%',
left: 'center',
width: '100%',
itemStyle: {
borderColor: '#fff',
borderWidth: 1
},
label: {
alignTo: 'edge',
formatter: '{name|{b}}\n{time|{c} 个 {d}%}',
minMargin: 15,
edgeDistance: 10,
lineHeight: 15,
rich: {
name: {
fontSize: 16,
color: 'rgba(59, 65, 75, 1)',
fontWeight: 700,
},
time: {
fontSize: 14,
color: 'rgba(59, 65, 75, 1)',
}
}
}
},
labelLine: {
length: 15,
length2: 0,
maxSurfaceAngle: 80
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < 556 / 2;
const points = params.labelLinePoints;
// Update the end point.
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
},
data: data
}]
},
labelLine: {
length: 15,
length2: 0,
maxSurfaceAngle: 80
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < 556 / 2;
const points = params.labelLinePoints;
// Update the end point.
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
},
data: data
}]
}
return option
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论