提交 9aa0462e authored 作者: coderBryanFu's avatar coderBryanFu

update

上级 199f9d95
import request from "@/api/request.js";
// 头部信息
/**
* @param { id }
*/
export function getGovOrgBasicInfo(params) {
return request({
method: 'GET',
url: `/api/governmentOrg/info/${params.id}`,
params
})
}
// 最新动态
/**
* @param { orgId, cRelated, currentPage, pageSize }
*/
export function getGovOrgLatestDynamics(params) {
return request({
method: 'GET',
url: `/api/governmentOrg/dynamics/${params.orgId}`,
params
})
}
// 基本信息-关键人物
/**
* @param { orgId }
*/
export function getGovOrgKeyPerson(params) {
return request({
method: 'GET',
url: `/api/governmentOrg/person/${params.orgId}`,
params
})
}
// 深度挖掘--------------------------------------------------
// 资助企业情况
/**
* @param { orgId }
*/
export function getGovOrgCompanyArea(params) {
return request({
method: 'GET',
url: `/api/governmentOrg/field/${params.orgId}`,
params
})
}
// 主要科技政策观点
/**
* @param { orgId }
*/
export function getGovOrgOpinions(params) {
return request({
method: 'GET',
url: `/api/governmentOrg/keyWord/${params.orgId}`,
params
})
}
\ No newline at end of file
...@@ -540,7 +540,12 @@ import Message3 from "./assets/images/message-icon3.png"; ...@@ -540,7 +540,12 @@ import Message3 from "./assets/images/message-icon3.png";
// 跳转行政机构主页 // 跳转行政机构主页
const handleToInstitution = item => { const handleToInstitution = item => {
const curRoute = router.resolve("/institution"); const curRoute = router.resolve({
path: "/institution",
query: {
id: item.id
}
});
window.open(curRoute.href, "_blank"); window.open(curRoute.href, "_blank");
}; };
......
...@@ -6,7 +6,7 @@ const getBarChart = (nameList, valueList) => { ...@@ -6,7 +6,7 @@ const getBarChart = (nameList, valueList) => {
tooltip: {}, tooltip: {},
grid: { grid: {
top: '3%', top: '3%',
right: '7%', right: 40,
bottom: '1%', bottom: '1%',
left: '1%', left: '1%',
containLabel: true containLabel: true
...@@ -55,7 +55,7 @@ const getBarChart = (nameList, valueList) => { ...@@ -55,7 +55,7 @@ const getBarChart = (nameList, valueList) => {
barWidth: 8, barWidth: 8,
label: { label: {
show: true, show: true,
position: [355, 0], position: [330, 0],
formatter: function(params) { formatter: function(params) {
return params.value return params.value
} }
......
...@@ -115,15 +115,21 @@ ...@@ -115,15 +115,21 @@
<div class="box4-main-right-main"> <div class="box4-main-right-main">
<div class="box4-main-right-item"> <div class="box4-main-right-item">
<div class="icon"></div> <div class="icon"></div>
<div class="text">{{ '在2016年和2024年的总统竞选中,卢特尼克利用其在金融界的影响力,为特朗普筹集了数千万美元的竞选资金,并个人捐赠了1000万美元。' }}</div> <div class="text">
{{
"在2016年和2024年的总统竞选中,卢特尼克利用其在金融界的影响力,为特朗普筹集了数千万美元的竞选资金,并个人捐赠了1000万美元。"
}}
</div>
</div> </div>
<div class="box4-main-right-item"> <div class="box4-main-right-item">
<div class="icon"></div> <div class="icon"></div>
<div class="text">{{ '提名霍华德·卢特尼克担任商务部长,赋予其直接监督美国贸易代表办公室(USTR)的权力。' }}</div> <div class="text">
{{ "提名霍华德·卢特尼克担任商务部长,赋予其直接监督美国贸易代表办公室(USTR)的权力。" }}
</div>
</div> </div>
<div class="box4-main-right-item"> <div class="box4-main-right-item">
<div class="icon"></div> <div class="icon"></div>
<div class="text">{{ '在接受CBS News采访时强调,特朗普政府的政策“是美国历史上最重要的”。' }}</div> <div class="text">{{ "在接受CBS News采访时强调,特朗普政府的政策“是美国历史上最重要的”。" }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -146,12 +152,15 @@ ...@@ -146,12 +152,15 @@
<script setup> <script setup>
import { ref, computed, onMounted } from "vue"; import { ref, computed, onMounted } from "vue";
import { useRoute } from "vue-router";
import setChart from "@/utils/setChart"; import setChart from "@/utils/setChart";
import getSankeyChart from "./utils/sankey"; import getSankeyChart from "./utils/sankey";
import getPieChart from "./utils/piechart"; import getPieChart from "./utils/piechart";
import getWordCloudChart from "./utils/worldCloudChart"; import getWordCloudChart from "./utils/worldCloudChart";
import getGraphChart from "./utils/graph"; import getGraphChart from "./utils/graph";
import { getGovOrgCompanyArea, getGovOrgOpinions } from "@/api/institution/index";
import Img from "./assets/images/9.png"; import Img from "./assets/images/9.png";
import Img1 from "./assets/images/1.png"; import Img1 from "./assets/images/1.png";
import Img2 from "./assets/images/2.png"; import Img2 from "./assets/images/2.png";
...@@ -162,6 +171,8 @@ import Img6 from "./assets/images/6.png"; ...@@ -162,6 +171,8 @@ import Img6 from "./assets/images/6.png";
import Img7 from "./assets/images/7.png"; import Img7 from "./assets/images/7.png";
import Img8 from "./assets/images/8.png"; import Img8 from "./assets/images/8.png";
const route = useRoute()
const box1ChartData = ref({ const box1ChartData = ref({
nodes: [ nodes: [
{ {
...@@ -289,6 +300,7 @@ const box1ChartData = ref({ ...@@ -289,6 +300,7 @@ const box1ChartData = ref({
] ]
}); });
// 资助企业情况
const box2ChartData = ref([ const box2ChartData = ref([
{ {
name: "集成电路", name: "集成电路",
...@@ -323,6 +335,29 @@ const box2ChartData = ref([ ...@@ -323,6 +335,29 @@ const box2ChartData = ref([
value: 24 value: 24
} }
]); ]);
const handleGetCompanyArea = async () => {
const params = {
orgId: route.query.id
};
try {
const res = await getGovOrgCompanyArea(params);
console.log("资助企业情况", res);
if (res.code === 200 && res.data) {
box2ChartData.value = res.data.map(item => {
return {
name: item.industry,
value: item.amount
};
});
}
} catch (error) {}
};
const handleBox2 = async () => {
await handleGetCompanyArea();
const box2Chart = getPieChart(box2ChartData.value);
setChart(box2Chart, "box2Chart");
};
const box3ChartData = ref([ const box3ChartData = ref([
{ name: "人工智能(AI)", value: 100 }, { name: "人工智能(AI)", value: 100 },
...@@ -344,6 +379,20 @@ const box3ChartData = ref([ ...@@ -344,6 +379,20 @@ const box3ChartData = ref([
{ name: "不得向中国机构提供援助", value: 62 }, { name: "不得向中国机构提供援助", value: 62 },
{ name: "开展先进生物能源计划", value: 51 } { name: "开展先进生物能源计划", value: 51 }
]); ]);
const handleGetOpinions = async () => {
const params = {
orgId: '50754570da464d0a81a5563dcb61d2ec'
}
try {
const res = await getGovOrgOpinions(params)
console.log('主要科技政策观点', res);
} catch (error) {
}
}
const box4ChartData = ref({ const box4ChartData = ref({
nodes: [ nodes: [
...@@ -371,10 +420,10 @@ const box4ChartData = ref({ ...@@ -371,10 +420,10 @@ const box4ChartData = ref({
}); });
onMounted(() => { onMounted(() => {
handleBox2();
handleGetOpinions()
const box1Chart = getSankeyChart(box1ChartData.value.nodes, box1ChartData.value.links); const box1Chart = getSankeyChart(box1ChartData.value.nodes, box1ChartData.value.links);
setChart(box1Chart, "box1Chart"); setChart(box1Chart, "box1Chart");
const box2Chart = getPieChart(box2ChartData.value);
setChart(box2Chart, "box2Chart");
const box3Chart = getWordCloudChart(box3ChartData.value); const box3Chart = getWordCloudChart(box3ChartData.value);
setChart(box3Chart, "box3Chart"); setChart(box3Chart, "box3Chart");
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="wrap"> <div class="wrap">
<div class="header"> <div class="header">
<div class="header-left"> <div class="header-left">
<img src="@/assets/images/decree-org.png" alt="" /> <img :src="institutionInfo.logo?institutionInfo.logo: DefaultIcon2" alt="" />
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="title">{{ institutionInfo.name }}</div> <div class="title">{{ institutionInfo.name }}</div>
...@@ -42,17 +42,45 @@ ...@@ -42,17 +42,45 @@
<script setup> <script setup>
import { ref, computed, onMounted } from "vue"; import { ref, computed, onMounted } from "vue";
import { useRoute } from "vue-router";
import InsDetail from "./insDetail/index.vue"; import InsDetail from "./insDetail/index.vue";
import Deepdig from "./deepdig/index.vue"; import Deepdig from "./deepdig/index.vue";
import Sanction from "./sanction/index.vue"; import Sanction from "./sanction/index.vue";
import {getGovOrgBasicInfo} from '@/api/institution/index'
import DefaultIcon2 from '@/assets/icons/default-icon2.png'
const route = useRoute()
const institutionInfo = ref({ const institutionInfo = ref({
name: "美国商务部", name: "",
enName: "United States Department of Commerce", enName: "",
desc: "美国联邦政府的重要经济部门,主要职责为国际贸易、进出口管制、经济数据统计及专利商标管理。", desc: "",
tagList: ["实体清单", "232调查", "行政令"] tagList: [],
logo: ''
}); });
const handleGetInfo = async () => {
const params = {
id: route.query.id
}
try {
const res = await getGovOrgBasicInfo(params)
console.log('机构信息', res);
if(res.code === 200 && res.data) {
institutionInfo.value.name = res.data.orgName
institutionInfo.value.enName = res.data.orgNameEn
institutionInfo.value.desc = res.data.orgIntroduction
institutionInfo.value.name = res.data.orgName
}
} catch (error) {
}
}
handleGetInfo()
const activeTabName = ref("机构详情"); const activeTabName = ref("机构详情");
const tabList = ref([ const tabList = ref([
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论