提交 c2f806a2 authored 作者: 张烨's avatar 张烨

feat:市场出口限制替换ai智能报告功能

上级 5e2fa608
......@@ -107,7 +107,7 @@
<MessageBubble :messageList="messageList" @person-click="handleClickPerson" @info-click="handleGetMessage"
imageUrl="img" @more-click="handleToSocialDetail" />
</div>
<DivideHeader id="position3" class="divide3" :titleText="'数据总览'"></DivideHeader>
<DivideHeader id="position3" class="divide3" :titleText="'全景概览'"></DivideHeader>
<div class="center-footer">
<div class="box5" v-loading="box5Params.loading">
<div class="box5-header">
......@@ -140,10 +140,7 @@
<div style="padding: 14px 22px;">
<TipTab text="数据来源:美国各行政机构官网" />
</div>
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content1" />
</div>
<AiReport ref="refAiReport1"></AiReport>
</div>
<div class="box5" v-loading="box6Params.loading">
<div class="box5-header">
......@@ -170,10 +167,7 @@
<div style="padding: 14px 22px;">
<TipTab text="数据来源:美国各行政机构官网" />
</div>
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content2" />
</div>
<AiReport ref="refAiReport2"></AiReport>
</div>
</div>
<div class="center-footer1">
......@@ -254,10 +248,7 @@
<div style="padding: 14px 22px;">
<TipTab text="数据来源:美国各行政机构官网" />
</div>
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content3" />
</div>
<AiReport ref="refAiReport3"></AiReport>
</div>
</div>
</div>
......@@ -395,8 +386,7 @@ import RiskSignalOverviewDetailDialog from "@/components/base/RiskSignalOverview
import WordCloudChart from "@/components/base/WordCloundChart/index.vue"
import SimplePagination from "@/components/SimplePagination.vue";
import SummaryCardsPanel from "@/components/base/SummaryCardsPanel/index.vue";
import AiButton from '@/components/base/Ai/AiButton/index.vue';
import AiPane from '@/components/base/Ai/AiPane/index.vue';
import AiReport from '@/views/marketAccessRestrictions/marketAccessHome/com/AiReport.vue';
import TipTab from "@/components/base/TipTab/index.vue"
import {
getDepartmentList,
......@@ -422,7 +412,7 @@ import setChart from "@/utils/setChart";
import DefaultIcon2 from "@/assets/icons/default-icon2.png";
import tipsTcon from "./assets/images/tips-icon.png";
import { ElMessage } from "element-plus";
import { getAIReport, getNearYearList } from "@/views/marketAccessRestrictions/utils/index.ts"
import { getNearYearList } from "@/views/marketAccessRestrictions/utils/index.ts"
import { useGotoNewsDetail } from '@/router/modules/news';
......@@ -697,14 +687,9 @@ const handleClickPerson = async item => {
const yearList = getNearYearList();
// 获取AI智能报告
const aiContent = reactive({
content1: "正在生成...",
content2: "正在生成...",
content3: "正在生成...",
})
const onAIReport = (data, key) => {
getAIReport(data).then(res => { aiContent[key] = res })
}
const refAiReport1 = ref(null)
const refAiReport2 = ref(null)
const refAiReport3 = ref(null)
// 数量变化趋势
const chart1Data = reactive({
......@@ -729,17 +714,15 @@ const handleGetDecreeYearOrder = async () => {
if (res.code === 200 && res.data) {
chart1Data.dataX = res.data.map(item => item.year);
chart1Data.dataY = res.data.map(item => item.count);
onAIReport({ type: "柱状图", name: "数量变化趋势", data: chart1Data }, "content1")
} else {
chart1Data.dataX = [];
chart1Data.dataY = [];
aiContent.content1 = "数据为空"
}
} catch (error) {
chart1Data.dataX = [];
chart1Data.dataY = [];
aiContent.content1 = "数据为空"
}
refAiReport1.value?.onDataInfo({ type: "柱状图", name: "数量变化趋势", data: chart1Data })
box5Params.loading = false
};
const getBox5Data = async () => {
......@@ -777,15 +760,13 @@ const getBox6Data = async () => {
console.log("领域分布情况", res);
if (res.code === 200 && res.data) {
chart2Data.value = res.data.map(item => ({name: item.industry, value: item.count}));
onAIReport({ type: "环形图", name: "领域分布情况", data: chart2Data.value }, "content2")
} else {
chart2Data.value = []
aiContent.content2 = "数据为空"
}
} catch (error) {
chart2Data.value = []
aiContent.content2 = "数据为空"
}
refAiReport2.value?.onDataInfo({ type: "环形图", name: "领域分布情况", data: chart2Data.value })
box6Params.loading = false
nextTick(() => {
let box6Chart = createPieChart(box6Ref, chart2Data.value)
......@@ -865,15 +846,13 @@ const getBox8Data = async () => {
console.log("关键条款词云", res);
if (res.code == 200) {
wordCloudData.value = res.data.map(item => ({ name: item.clause, value: item.count }));
onAIReport({ type: "词云图", name: "关键条款词云", data: wordCloudData.value }, "content3")
} else {
wordCloudData.value = []
aiContent.content1 = "数据为空"
}
} catch (error) {
wordCloudData.value = []
aiContent.content1 = "数据为空"
}
refAiReport3.value?.onDataInfo({ type: "词云图", name: "关键条款词云", data: wordCloudData.value })
box8Params.loading = false
};
......@@ -1089,34 +1068,6 @@ onMounted(async () => {
box-shadow: none;
}
.ai-pane {
position: absolute;
right: 0px;
bottom: 15px;
z-index: 2;
:deep(.ai-pane-wrapper) {
display: none;
}
:deep(.ai-button-wrapper) {
display: flex;
}
&:hover {
width: 100%;
bottom: 0px;
:deep(.ai-pane-wrapper) {
display: block;
}
:deep(.ai-button-wrapper) {
display: none;
}
}
}
.home-wrapper {
width: 100%;
height: 100%;
......
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24.000000" height="24.000000" fill="none" customFrame="#000000">
<rect id="折线图" width="24.000000" height="24.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M20.5419 4.83623L13.1957 9.57293C13.0388 9.6741 12.867 9.72717 12.6804 9.73213C12.4937 9.7371 12.3194 9.69325 12.1573 9.60057L8.08207 7.27011L4.50424 9.35944C4.02065 9.64183 3.41881 9.48376 3.13642 9.00018C2.85402 8.51659 3.0121 7.91475 3.49568 7.63236L7.57254 5.25161C7.72693 5.16146 7.8935 5.11598 8.07228 5.11516C8.25106 5.11435 8.41804 5.15832 8.57324 5.24707L12.6226 7.56272L19.4581 3.15534C19.9287 2.85188 20.537 2.98324 20.8404 3.45388C21.1439 3.92453 21.0125 4.53276 20.5419 4.83623ZM4.00352 13.6788L7.58044 11.6333C7.88802 11.4574 8.2657 11.4574 8.57327 11.6333L12.1169 13.6597C12.4459 13.8478 12.853 13.8338 13.1683 13.6234L18.9449 9.76933C19.6095 9.32597 20.4999 9.80233 20.4999 10.6012L20.4999 19.4969C20.4999 20.0492 20.0522 20.4969 19.4999 20.4969L4.49997 20.4971C3.94769 20.4971 3.49997 20.0494 3.49997 19.4971L3.49993 14.5468C3.49993 14.1881 3.6921 13.8568 4.00352 13.6788Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
<rect id="容器 239" width="24.000000" height="24.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M21.582 2.81364L14.582 7.81329C14.42 7.92898 14.2396 7.9908 14.0407 7.99874C13.8418 8.00668 13.657 7.95945 13.4863 7.85704L9.00066 5.16578L4.5155 7.8569C4.0353 8.14502 3.43163 7.99411 3.14351 7.51391C2.85539 7.03372 3.0063 6.43004 3.4865 6.14192L8.48614 3.1421C8.64448 3.0471 8.81598 2.99959 9.00063 2.99959C9.18528 2.99959 9.35678 3.04709 9.51512 3.14209L13.9531 5.80474L20.4196 1.18613C20.8753 0.860653 21.4891 0.962974 21.8146 1.41868C22.1401 1.87438 22.0377 2.48816 21.582 2.81364ZM3.00092 12.7841L8.11631 9.89203L13.2317 12.784L22.0009 6.99978L22.0009 19.9995L3.00096 19.9998L3.00092 12.7841Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
</svg>
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24.000000" height="24.000000" fill="none" customFrame="#000000">
<rect id="容器 1714" width="24.000000" height="24.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M12 2.72656C10.6193 2.72656 9.5 3.84585 9.5 5.22656C9.5 6.60727 10.6193 7.72656 12 7.72656C13.3807 7.72656 14.5 6.60727 14.5 5.22656C14.5 3.84585 13.3807 2.72656 12 2.72656ZM8.5 5.28283C8.5 5.19541 8.5032 5.10875 8.5095 5.02295C5.55588 6.35486 3.5 9.32509 3.5 12.7755C3.5 13.5624 3.60693 14.3243 3.80705 15.0475C4.32848 14.6278 4.97275 14.3546 5.67741 14.2902C5.56142 13.8042 5.5 13.297 5.5 12.7755C5.5 10.2821 6.90397 8.11655 8.9645 7.02635C8.66902 6.51302 8.5 5.91766 8.5 5.28283ZM15.5 5.28283C15.5 5.19542 15.4968 5.10875 15.4905 5.02295C18.4441 6.35485 20.5 9.32509 20.5 12.7755C20.5 13.5624 20.3931 14.3243 20.193 15.0475C19.6715 14.6278 19.0273 14.3546 18.3226 14.2902C18.4386 13.8042 18.5 13.297 18.5 12.7755C18.5 10.2821 17.096 8.11655 15.0355 7.02635C15.331 6.51302 15.5 5.91766 15.5 5.28283ZM8.5 17.7754C8.5 16.3947 7.38071 15.2754 6 15.2754C4.61929 15.2754 3.5 16.3947 3.5 17.7754C3.5 19.1561 4.61929 20.2754 6 20.2754C7.38071 20.2754 8.5 19.1561 8.5 17.7754ZM18 15.2754C19.3807 15.2754 20.5 16.3947 20.5 17.7754C20.5 19.1561 19.3807 20.2754 18 20.2754C16.6193 20.2754 15.5 19.1561 15.5 17.7754C15.5 16.3947 16.6193 15.2754 18 15.2754ZM14.6294 18.7217C14.8172 19.3922 15.1997 19.9813 15.7121 20.4242C14.5905 20.9696 13.331 21.2755 12 21.2755C10.669 21.2755 9.40951 20.9696 8.28791 20.4242C8.80027 19.9813 9.18277 19.3922 9.3706 18.7217C10.1745 19.0777 11.0642 19.2755 12 19.2755C12.9358 19.2755 13.8255 19.0777 14.6294 18.7217Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24.000000" height="24.000000" fill="none">
<rect id="雷达图_图表-雷达图 1" width="24.000000" height="24.000000" x="0.000000" y="0.000000" />
<g id="组合 1062">
<path id="多边形 25" d="M19.7942 7.5L19.7942 16.5L12 21L4.20577 16.5L4.20577 7.5L12 3L19.7942 7.5Z" fill-rule="evenodd" stroke="rgb(5,95,194)" stroke-linejoin="round" stroke-width="2.000000" />
<path id="多边形 26" d="M16.3301 9.5L16.3301 14.5L12 17L7.66987 14.5L7.66987 9.5L12 7L16.3301 9.5Z" fill-rule="evenodd" stroke="rgb(5,95,194)" stroke-width="2.000000" />
<path id="多边形 27" d="M13.7321 11L13.7321 13L12 14L10.2679 13L10.2679 11L12 10L13.7321 11Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
</g>
</svg>
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24.000000" height="24.000000" fill="none">
<rect id="定位" width="24.000000" height="24.000000" x="0.000000" y="0.000000" />
<path id="矢量 573" d="M11.7453 2.01562C8.03585 2.01562 5.02783 5.03994 5.02783 8.77327C5.02783 10.6381 5.78079 12.3271 6.99554 13.5507L11.7453 18.3294L16.4964 13.5507C16.6523 13.394 16.8001 13.2301 16.9399 13.0589C17.0797 12.8877 17.2107 12.7101 17.3331 12.526C17.4554 12.3419 17.5685 12.1523 17.6722 11.9572C17.776 11.7621 17.8699 11.5623 17.954 11.3579C18.0382 11.1536 18.1121 10.9456 18.1758 10.7339C18.2396 10.5223 18.2928 10.3081 18.3355 10.0913C18.3782 9.87441 18.4102 9.65599 18.4315 9.43601C18.4527 9.21603 18.4632 8.99553 18.4628 8.77452C18.4628 5.04119 15.4561 2.01687 11.7453 2.01687L11.7453 2.01562ZM11.7453 11.775C11.6473 11.7748 11.5495 11.7697 11.4519 11.7598C11.3543 11.75 11.2575 11.7354 11.1613 11.716C11.0652 11.6966 10.9703 11.6726 10.8765 11.6439C10.7827 11.6152 10.6906 11.582 10.6001 11.5442C10.5096 11.5064 10.4211 11.4643 10.3348 11.4179C10.2484 11.3715 10.1645 11.3209 10.0831 11.2662C10.0017 11.2115 9.92319 11.153 9.84754 11.0906C9.77189 11.0282 9.69948 10.9622 9.63031 10.8927C9.56115 10.8232 9.49555 10.7504 9.43353 10.6745C9.37151 10.5985 9.31337 10.5197 9.25909 10.438C9.20481 10.3564 9.15467 10.2722 9.10866 10.1856C9.06265 10.099 9.021 10.0104 8.9837 9.91968C8.9464 9.82898 8.91364 9.73668 8.8854 9.64277C8.85717 9.54885 8.83362 9.45378 8.81473 9.35756C8.79584 9.26133 8.78171 9.16441 8.77234 9.06679C8.76298 8.96917 8.75842 8.87133 8.75867 8.77327L8.75867 8.77077C8.75838 8.67272 8.7629 8.57489 8.77222 8.47729C8.78155 8.37969 8.79564 8.28277 8.81449 8.18655C8.83334 8.09033 8.85686 7.99527 8.88506 7.90136C8.91325 7.80745 8.94598 7.71515 8.98324 7.62446C9.02051 7.53377 9.06213 7.44512 9.10811 7.35852C9.15409 7.27192 9.2042 7.18778 9.25844 7.1061C9.31269 7.02443 9.37081 6.94561 9.4328 6.86964C9.4948 6.79368 9.56036 6.72094 9.62951 6.65142C9.69865 6.5819 9.77103 6.51593 9.84666 6.45353C9.92228 6.39112 10.0008 6.33257 10.0822 6.27788C10.1635 6.22319 10.2474 6.17262 10.3338 6.12617C10.4201 6.07972 10.5085 6.03762 10.599 5.99986C10.6895 5.9621 10.7816 5.92887 10.8754 5.90017C10.9691 5.87146 11.0641 5.84742 11.1602 5.82805C11.2563 5.80867 11.3531 5.79405 11.4507 5.7842C11.5482 5.77434 11.646 5.76929 11.7441 5.76904L11.7453 5.76904C11.8434 5.76929 11.9412 5.77434 12.0388 5.7842C12.1363 5.79405 12.2332 5.80867 12.3293 5.82804C12.4255 5.84741 12.5204 5.87145 12.6142 5.90015C12.708 5.92885 12.8001 5.96208 12.8906 5.99984C12.9811 6.03759 13.0695 6.07969 13.1559 6.12614C13.2423 6.17258 13.3262 6.22315 13.4076 6.27783C13.489 6.33252 13.5675 6.39106 13.6431 6.45346C13.7188 6.51587 13.7912 6.58182 13.8604 6.65134C13.9295 6.72086 13.9951 6.7936 14.0571 6.86956C14.1192 6.94552 14.1773 7.02433 14.2316 7.10601C14.2859 7.18768 14.336 7.27182 14.382 7.35842C14.428 7.44502 14.4697 7.53367 14.507 7.62436C14.5443 7.71506 14.577 7.80736 14.6053 7.90127C14.6335 7.99519 14.6571 8.09026 14.6759 8.18649C14.6948 8.28271 14.709 8.37963 14.7183 8.47725C14.7277 8.57487 14.7322 8.67271 14.732 8.77077L14.732 8.77327C14.7322 8.87124 14.7277 8.96899 14.7183 9.06651C14.709 9.16404 14.6949 9.26087 14.676 9.35701C14.6572 9.45315 14.6336 9.54813 14.6055 9.64196C14.5773 9.73579 14.5445 9.82801 14.5073 9.91862C14.4701 10.0092 14.4285 10.0978 14.3825 10.1843C14.3366 10.2709 14.2865 10.3549 14.2323 10.4366C14.1781 10.5182 14.12 10.5969 14.0581 10.6728C13.9962 10.7488 13.9307 10.8215 13.8616 10.8909C13.7925 10.9604 13.7202 11.0263 13.6447 11.0887C13.5691 11.1511 13.4907 11.2096 13.4094 11.2643C13.3281 11.319 13.2443 11.3695 13.1581 11.416C13.0718 11.4624 12.9835 11.5046 12.8931 11.5423C12.8027 11.5801 12.7107 11.6134 12.617 11.6421C12.5233 11.6708 12.4285 11.6949 12.3325 11.7143C12.2365 11.7338 12.1397 11.7484 12.0422 11.7584C11.9448 11.7683 11.8471 11.7734 11.7491 11.7737L11.7453 11.7737L11.7453 11.775ZM8.75867 20.5254C8.75867 20.5665 8.76346 20.6075 8.77305 20.6484C8.78264 20.6893 8.79697 20.7299 8.81605 20.7703C8.83514 20.8106 8.85888 20.8504 8.88727 20.8897C8.91567 20.929 8.94858 20.9677 8.98601 21.0057C9.02345 21.0436 9.06522 21.0807 9.11133 21.117C9.15744 21.1532 9.20767 21.1884 9.26201 21.2226C9.31635 21.2568 9.37455 21.2898 9.43661 21.3215C9.49866 21.3533 9.56427 21.3837 9.63344 21.4128C9.70261 21.4418 9.775 21.4694 9.85061 21.4955C9.92623 21.5216 10.0047 21.546 10.086 21.5688C10.1674 21.5917 10.2512 21.6128 10.3374 21.6322C10.4237 21.6515 10.512 21.6691 10.6024 21.6848C10.6928 21.7005 10.7847 21.7144 10.8783 21.7263C10.972 21.7382 11.0667 21.7482 11.1627 21.7562C11.2586 21.7642 11.3552 21.7703 11.4526 21.7743C11.5499 21.7783 11.6475 21.7803 11.7453 21.7803C11.8432 21.7803 11.9407 21.7783 12.0381 21.7743C12.1354 21.7703 12.2321 21.7642 12.328 21.7562C12.4239 21.7482 12.5187 21.7382 12.6123 21.7263C12.7059 21.7144 12.7979 21.7005 12.8883 21.6848C12.9787 21.6691 13.067 21.6515 13.1532 21.6322C13.2395 21.6128 13.3233 21.5917 13.4046 21.5688C13.486 21.546 13.5644 21.5216 13.6401 21.4955C13.7157 21.4694 13.7881 21.4418 13.8572 21.4128C13.9264 21.3837 13.992 21.3533 14.0541 21.3215C14.1161 21.2898 14.1743 21.2568 14.2287 21.2226C14.283 21.1884 14.3332 21.1532 14.3793 21.117C14.4254 21.0807 14.4672 21.0436 14.5047 21.0057C14.5421 20.9677 14.575 20.929 14.6034 20.8897C14.6318 20.8504 14.6555 20.8106 14.6746 20.7703C14.6937 20.7299 14.708 20.6893 14.7176 20.6484C14.7272 20.6075 14.732 20.5665 14.732 20.5254C14.732 20.4843 14.7272 20.4433 14.7176 20.4024C14.708 20.3615 14.6937 20.3209 14.6746 20.2806C14.6555 20.2403 14.6318 20.2005 14.6034 20.1612C14.575 20.1218 14.5421 20.0832 14.5047 20.0452C14.4672 20.0072 14.4254 19.9701 14.3793 19.9339C14.3332 19.8976 14.283 19.8624 14.2287 19.8283C14.1743 19.7941 14.1161 19.7611 14.0541 19.7293C13.992 19.6976 13.9264 19.6672 13.8572 19.6381C13.7881 19.609 13.7157 19.5815 13.6401 19.5554C13.5644 19.5293 13.486 19.5049 13.4046 19.482C13.3233 19.4592 13.2395 19.4381 13.1532 19.4187C13.067 19.3993 12.9787 19.3818 12.8883 19.3661C12.7979 19.3503 12.7059 19.3365 12.6123 19.3246C12.5187 19.3126 12.4239 19.3027 12.328 19.2947C12.2321 19.2866 12.1354 19.2806 12.0381 19.2766C11.9407 19.2726 11.8432 19.2705 11.7453 19.2705C11.6475 19.2705 11.5499 19.2726 11.4526 19.2766C11.3552 19.2806 11.2586 19.2866 11.1627 19.2947C11.0667 19.3027 10.972 19.3126 10.8784 19.3246C10.7847 19.3365 10.6928 19.3503 10.6024 19.3661C10.512 19.3818 10.4237 19.3993 10.3374 19.4187C10.2512 19.4381 10.1674 19.4592 10.086 19.482C10.0047 19.5049 9.92623 19.5293 9.85061 19.5554C9.775 19.5815 9.70261 19.609 9.63344 19.6381C9.56427 19.6672 9.49866 19.6976 9.43661 19.7293C9.37455 19.7611 9.31635 19.7941 9.26201 19.8283C9.20767 19.8624 9.15744 19.8976 9.11133 19.9339C9.06522 19.9701 9.02345 20.0072 8.98601 20.0452C8.94858 20.0832 8.91567 20.1218 8.88727 20.1612C8.85888 20.2005 8.83514 20.2403 8.81605 20.2806C8.79697 20.3209 8.78264 20.3615 8.77305 20.4024C8.76346 20.4433 8.75867 20.4843 8.75867 20.5254L8.75867 20.5254Z" fill="rgb(5,95,194)" fill-rule="nonzero" />
<rect id="位置 1" width="24.000000" height="24.000000" x="0.000000" y="0.000000" />
<path id="矢量 544" d="M12 3C8.17162 3 5.05724 6.114 5.05762 9.942C5.05762 11.364 5.48474 12.7312 6.28424 13.8821C6.32437 13.9511 6.36487 14.0179 6.41249 14.0828L11.4799 20.7623C11.6175 20.9156 11.8024 21 12.0004 21C12.1957 21 12.3817 20.9149 12.5426 20.7345L17.5867 14.0816C17.6366 14.0156 17.679 13.9432 17.7022 13.9009C18.5134 12.7339 18.9427 11.3651 18.9427 9.94275C18.9427 6.114 15.8284 3 12 3ZM12 12.4249C10.6327 12.4249 9.52012 11.3123 9.52012 9.94462C9.52012 8.57737 10.6327 7.46513 12 7.46513C13.3672 7.46513 14.4799 8.57775 14.4799 9.94462C14.4799 11.3123 13.3672 12.4249 12 12.4249Z" fill="rgb(5,95,194)" fill-rule="nonzero" />
</svg>
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24.000000" height="24.000000" fill="none">
<rect id="热门" width="24.000000" height="24.000000" x="0.000000" y="0.000000" />
<g id="组合 130">
<path id="矢量 473" d="M8.5148 21C7.29316 18.4839 7.95351 17.0645 8.91101 15.7419C9.93455 14.2258 10.1987 12.8065 10.1987 12.8065C10.1987 12.8065 11.0241 13.8065 10.727 15.4516C12.1467 13.871 12.3778 11.3871 12.2127 10.4516C15.4154 12.6452 16.8352 17.4516 14.9532 20.9677C24.8253 15.4516 17.3964 7.25807 16.1088 6.3871C16.571 7.32258 16.637 8.90323 15.7126 9.64516C14.2268 4.06452 10.5619 3 10.5619 3C11.0241 5.80645 9.01006 8.87097 7.09506 11.1935C7.02903 10.0645 6.96299 9.32258 6.33566 8.19355C6.2036 10.2581 4.61877 11.9032 4.15653 13.9677C3.56221 16.8065 4.58575 18.8064 8.5148 21Z" fill="rgb(5,95,194)" fill-rule="nonzero" />
</g>
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24.000000" height="24.000000" fill="none" customFrame="#000000">
<rect id="容器 239" width="24.000000" height="24.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M17.822 5.13656C19.2945 6.38564 20.3262 8.07517 20.7648 9.95562C21.2033 11.8361 21.0255 13.8077 20.2576 15.5793C19.4896 17.351 18.1722 18.8286 16.5 19.7941L14.25 15.897C15.0861 15.4142 15.7448 14.6754 16.1288 13.7896C16.5128 12.9038 16.6017 11.918 16.3824 10.9777C16.1631 10.0375 15.6472 9.19274 14.911 8.5682C14.1747 7.94366 13.2572 7.57247 12.2938 7.50944L12.5875 3.01904C14.5143 3.14509 16.3495 3.88748 17.822 5.13656ZM4.97144 6.37851C4.19446 7.35001 3.62731 8.47202 3.30579 9.67374C2.98428 10.8755 2.91538 12.1308 3.10345 13.3605L7.55172 12.6802C7.45769 12.0653 7.49214 11.4377 7.6529 10.8368C7.81365 10.2359 8.09723 9.67493 8.48572 9.18918C8.87422 8.70343 9.35919 8.3035 9.91003 8.01462C10.4609 7.72574 11.0656 7.5542 11.6861 7.51081L11.3722 3.02177C10.1312 3.10855 8.92174 3.45164 7.82006 4.0294C6.71837 4.60715 5.74843 5.40702 4.97144 6.37851ZM11.6528 20.9931C10.4138 20.9453 9.19809 20.642 8.08187 20.1022C6.96565 19.5624 5.973 18.7978 5.16618 17.8564C4.35936 16.9149 3.75577 15.8169 3.39326 14.6312L7.69663 13.3155C7.87788 13.9084 8.17968 14.4574 8.58309 14.9281C8.9865 15.3988 9.48283 15.7811 10.0409 16.051C10.599 16.3209 11.2069 16.4726 11.8264 16.4965C12.4459 16.5204 13.0636 16.4161 13.6409 16.19L15.2817 20.3802C14.1272 20.8323 12.8917 21.041 11.6528 20.9931Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
</svg>
......@@ -11,7 +11,7 @@
<div class="date-icon">
<img :src="tipsTcon" alt="">
</div>
<div class="date-text">近期美国各联邦政府机构市场准入限制调查数量汇总</div>
<div class="date-text">近期美国各联邦政府机构市场准入限制涉华调查数量汇总</div>
<TimeTabPane @time-click="handleGetStatSort" activeTime="近一年" />
</div>
<div class="home-main-header-card-box">
......@@ -77,7 +77,7 @@
</MessageBubble>
</div>
<DivideHeader id="position3" class="divide-header" :titleText="'数据总览'"></DivideHeader>
<DivideHeader id="position3" class="divide-header" :titleText="'全景概览'"></DivideHeader>
<div class="center-footer">
<div class="box5">
<OverviewNormalBox title="数量变化趋势" width="auto" height="100%">
......@@ -179,19 +179,10 @@
</div>
<div class="home-main-footer">
<DivideHeader id="position4" class="divide-header" :titleText="'资源库'"></DivideHeader>
<DivideHeader id="position4" class="divide-header" titleText="市场准入限制数据库"></DivideHeader>
<div class="home-main-footer-header">
<SourceTabList :sourceTabList="categoryList" :activeSouceTabId="activeCateId" @clickTab="handleClickCate"></SourceTabList>
<div class="select-box">
<el-select v-model="isSort" placeholder="发布时间" style="width: 166px" @change="handlePxChange">
<template #prefix>
<div style="display: flex; align-items: center; height: 100%">
<img src="@/assets/icons/jiangxu1.png" style="width: 14px; height: 14px" />
</div>
</template>
<el-option v-for="item in releaseTimeList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<TimeSortSelectBox @handle-px-change="handlePxChange"></TimeSortSelectBox>
</div>
<div class="home-main-footer-main">
<div class="left">
......@@ -283,6 +274,7 @@ import NewsList from "@/components/base/newsList/index.vue";
import DivideHeader from "@/components/DivideHeader.vue";
import SurveyHistory from "@/views/marketAccessRestrictions/com/SurveyHistory.vue"
import TimeTabPane from '@/components/base/TimeTabPane/index.vue';
import TimeSortSelectBox from '@/components/base/TimeSortSelectBox/index.vue';
import CarouselItem337 from '@/views/marketAccessRestrictions/marketAccessHome/com/CarouselItem337.vue';
import CarouselItem301 from '@/views/marketAccessRestrictions/marketAccessHome/com/CarouselItem301.vue';
import CarouselItem232 from '@/views/marketAccessRestrictions/marketAccessHome/com/CarouselItem232.vue';
......@@ -858,7 +850,8 @@ const releaseTimeList = ref([
{ label: "按发布时间升序", value: false }
]);
const isSort = ref(true);
const handlePxChange = () => {
const handlePxChange = (event) => {
isSort.value = event;
currentPage.value = 1;
handleFetchSurveyList();
};
......@@ -1898,47 +1891,7 @@ onMounted(async () => {
margin: 0 auto;
display: flex;
justify-content: space-between;
.btn-box {
width: 1000px;
display: flex;
.btn {
color: rgba(95, 101, 108, 1);
font-family: Source Han Sans CN;
font-size: 16px;
font-weight: 400;
line-height: 42px;
padding: 0 24px;
border-radius: 21px;
background: rgba(20, 89, 187, 0);
margin-right: 20px;
cursor: pointer;
&:hover {
background: rgba(20, 89, 187, 0.1);
}
}
.btnActive {
padding: 0 24px;
border-radius: 21px;
background: rgba(20, 89, 187, 1);
color: #fff;
&:hover {
color: #fff;
background: rgba(20, 89, 187, 1);
}
}
}
.select-box {
height: 42px;
box-sizing: border-box;
padding: 5px 0;
}
align-items: center;
}
.home-main-footer-main {
......
......@@ -19,17 +19,7 @@
</el-select> -->
</div>
</div>
<div class="select-box">
<el-select v-model="isSort" placeholder="发布时间" style="width: 166px">
<template #prefix>
<div style="display: flex; align-items: center; height: 100%">
<img src="@/assets/icons/jiangxu1.png" style="width: 14px; height: 14px" />
</div>
</template>
<el-option label="按发布时间降序" value="desc" />
<el-option label="按发布时间升序" value="asc" />
</el-select>
</div>
<TimeSortSelectBox @handle-px-change="handlePxChange"></TimeSortSelectBox>
</div>
<div class="wrapper-main">
<div class="left">
......@@ -91,13 +81,19 @@ import { ref, onMounted, watch } from "vue";
import { Search } from "@element-plus/icons-vue";
import { getSearchAllArea, getSearchAllYear, getSurveyList } from "@/api/marketAccessRestrictions";
import SurveyHistory from "@/views/marketAccessRestrictions/com/SurveyHistory.vue"
import TimeSortSelectBox from '@/components/base/TimeSortSelectBox/index.vue';
// 顶部过滤项
const searchText = ref("");
const filterStage = ref("");
const filterParty = ref("");
const filterReason = ref("");
const isSort = ref('desc'); // 降序
const isSort = ref(true);
const handlePxChange = (event) => {
isSort.value = event;
currentPage.value = 1;
handleFetchSurveyList();
};
// 科技领域过滤
const surveyAreaList = ref([]);
......@@ -166,7 +162,7 @@ const handleFetchSurveyList = async () => {
caseStatus: filterStage.value,
keywords: searchText.value || null,
sortField: "date",
sortOrder: isSort.value
sortOrder: isSort.value ? "desc" : "asc"
};
const res = await getSurveyList(params);
if (res.code === 200 && res.data) {
......@@ -188,7 +184,7 @@ const handleSearch = () => {
};
// 监听过滤条件
watch([isSort, filterStage, filterParty, filterReason], () => {
watch([filterStage, filterParty, filterReason], () => {
if (isInitializing.value) return;
currentPage.value = 1;
handleFetchSurveyList();
......
......@@ -6,17 +6,7 @@
<el-input v-model="searchText" style="width: 360px; height: 32px" placeholder="搜索调查案件" @keyup.enter="handleSearch" :suffix-icon="Search"></el-input>
</div>
</div>
<div class="select-box">
<el-select v-model="isSort" placeholder="发布时间" style="width: 166px">
<template #prefix>
<div style="display: flex; align-items: center; height: 100%">
<img src="@/assets/icons/jiangxu1.png" style="width: 14px; height: 14px" />
</div>
</template>
<el-option label="按发布时间降序" value="desc" />
<el-option label="按发布时间升序" value="asc" />
</el-select>
</div>
<TimeSortSelectBox @handle-px-change="handlePxChange"></TimeSortSelectBox>
</div>
<div class="wrapper-main">
<div class="left">
......@@ -69,9 +59,15 @@ import { ref, onMounted, watch } from "vue";
import { Search } from "@element-plus/icons-vue";
import { getSearchAllArea, getSearchAllYear, getSurveyList } from "@/api/marketAccessRestrictions";
import SurveyHistory from "@/views/marketAccessRestrictions/com/SurveyHistory.vue"
import TimeSortSelectBox from '@/components/base/TimeSortSelectBox/index.vue';
const searchText = ref(''); // 搜索文本
const isSort = ref('desc'); // 降序
const isSort = ref(true);
const handlePxChange = (event) => {
isSort.value = event;
currentPage.value = 1;
handleFetchSurveyList();
};
// 科技领域过滤
const surveyAreaList = ref([]);
......@@ -139,7 +135,7 @@ const handleFetchSurveyList = async () => {
Area: checkedAreaList.value.join(',') || null,
keywords: searchText.value || null,
sortField: "date",
sortOrder: isSort.value
sortOrder: isSort.value ? "desc" : "asc"
};
const res = await getSurveyList(params);
if (res.code === 200 && res.data) {
......@@ -160,12 +156,6 @@ const handleSearch = () => {
handleFetchSurveyList();
};
watch([isSort], () => {
if (isInitializing.value) return;
currentPage.value = 1;
handleFetchSurveyList();
});
onMounted(async () => {
await Promise.all([handleGetSearchAllArea(), handleGetSearchAllYear()]);
isInitializing.value = false;
......
......@@ -19,17 +19,7 @@
</el-select> -->
</div>
</div>
<div class="select-box">
<el-select v-model="isSort" placeholder="发布时间" style="width: 166px">
<template #prefix>
<div style="display: flex; align-items: center; height: 100%">
<img src="@/assets/icons/jiangxu1.png" style="width: 14px; height: 14px" />
</div>
</template>
<el-option label="按发布时间降序" value="desc" />
<el-option label="按发布时间升序" value="asc" />
</el-select>
</div>
<TimeSortSelectBox @handle-px-change="handlePxChange"></TimeSortSelectBox>
</div>
<div class="wrapper-main">
<div class="left">
......@@ -94,13 +84,19 @@ import { getSearchAllArea, getSearchAllYear, getSurveyList, getSearchAllCountry
import AnalysisBox from "@/components/base/boxBackground/analysisBox.vue"
import SurveyHistory from "@/views/marketAccessRestrictions/com/SurveyHistory.vue"
import TimeSortSelectBox from '@/components/base/TimeSortSelectBox/index.vue';
// 顶部过滤项
const searchText = ref("");
const filterStage = ref("");
const filterParty = ref("");
const filterReason = ref("");
const isSort = ref('desc'); // 降序
const isSort = ref(true);
const handlePxChange = (event) => {
isSort.value = event;
currentPage.value = 1;
handleFetchSurveyList();
};
// 科技领域过滤
const surveyAreaList = ref([]);
......@@ -192,7 +188,7 @@ const handleFetchSurveyList = async () => {
caseStatus: filterStage.value || null,
keywords: searchText.value || null,
sortField: "date",
sortOrder: isSort.value
sortOrder: isSort.value ? "desc" : "asc"
};
const res = await getSurveyList(params);
if (res.code === 200) {
......@@ -214,7 +210,7 @@ const handleSearch = () => {
};
// 监听过滤条件
watch([isSort, filterStage, filterParty, filterReason], () => {
watch([filterStage, filterParty, filterReason], () => {
if (isInitializing.value) return;
currentPage.value = 1;
handleFetchSurveyList();
......
......@@ -119,9 +119,8 @@ onMounted(() => {
.page-box {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
background: rgba(255, 255, 255, 1);
overflow-y: auto;
.page-top {
width: 1600px;
margin: 0 auto;
......@@ -241,8 +240,6 @@ onMounted(() => {
border-top: 1px solid rgba(230, 231, 232, 1);
background-color: #f7f8f9;
width: 100%;
height: 20px;
flex: auto;
}
}
</style>
\ No newline at end of file
......@@ -33,10 +33,7 @@
<div class="box-main">
<div class="box-head" ref="chart1"></div>
<TipTab text="美对华232调查案件的数量变化趋势,数据来源:美国商务部官网" style="margin-top: 16px;" />
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content1" />
</div>
<AiReport ref="refAiReport1"></AiReport>
</div>
</AnalysisBox>
</div>
......@@ -50,10 +47,7 @@
<div class="box-main">
<div class="box-head" ref="chart2"></div>
<TipTab text="美对华232调查案件的领域分布情况,数据来源:美国商务部官网" style="margin-top: -16px;" />
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content2" />
</div>
<AiReport ref="refAiReport2"></AiReport>
</div>
</AnalysisBox>
</div>
......@@ -69,10 +63,7 @@
<div class="box-main">
<div class="box-head" ref="chart3"></div>
<TipTab text="美对华232调查案件导致的关税变化分布,数据来源:美国商务部官网" style="margin-top: -16px;" />
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content3" />
</div>
<AiReport ref="refAiReport3"></AiReport>
</div>
</AnalysisBox>
</div>
......@@ -86,10 +77,7 @@
<div class="box-main">
<div class="box-head" ref="chart4"></div>
<TipTab text="美232调查所涉及的国家分布情况,数据来源:美国商务部官网" style="margin-top: -16px;" />
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content4" />
</div>
<AiReport ref="refAiReport4"></AiReport>
</div>
</AnalysisBox>
</div>
......@@ -108,21 +96,15 @@ import {
import createLineChart from "@/views/marketAccessRestrictions/utils/baseLineChart";
import createPieChart from "@/views/marketAccessRestrictions/utils/basePiechart.js";
import AiButton from '@/components/base/Ai/AiButton/index.vue';
import AiPane from '@/components/base/Ai/AiPane/index.vue';
import { getNearYearList, getAIReport } from "@/views/marketAccessRestrictions/utils/index.ts";
import AiReport from '@/views/marketAccessRestrictions/marketAccessHome/com/AiReport.vue';
import { getNearYearList } from "@/views/marketAccessRestrictions/utils/index.ts";
const yearList = getNearYearList();
// 获取AI智能报告
const aiContent = reactive({
content1: "正在生成...",
content2: "正在生成...",
content3: "正在生成...",
content4: "正在生成...",
})
const onAIReport = (data, key) => {
getAIReport(data).then(res => { aiContent[key] = res })
}
const refAiReport1 = ref(null)
const refAiReport2 = ref(null)
const refAiReport3 = ref(null)
const refAiReport4 = ref(null)
// 数量统计
const totalCaseNum = ref(0)
......@@ -163,7 +145,7 @@ const onStatNum = async (event) => {
chartData.title = [];
chartData.list = [];
}
onAIReport({ type: "折线图", name: "数量变化趋势", data: chartData }, "content1")
refAiReport1.value?.onDataInfo({ type: "折线图", name: "数量变化趋势", data: chartData })
nextTick(() => { createLineChart(chart1, chartData) });
box1Loading.value = false;
}
......@@ -188,7 +170,7 @@ const handleGetStatArea = async () => {
} catch (error) {
chartData = [];
}
onAIReport({ type: "环形图", name: "领域分布情况", data: chartData }, "content2")
refAiReport2.value?.onDataInfo({ type: "环形图", name: "领域分布情况", data: chartData })
nextTick(() => { createPieChart(chart2, chartData) });
box2Loading.value = false;
};
......@@ -218,7 +200,7 @@ const onSearchTariff = async () => {
}catch (error) {
chartData = [];
}
onAIReport({ type: "环形图", name: "关税变化分布", data: chartData }, "content3")
refAiReport3.value?.onDataInfo({ type: "环形图", name: "关税变化分布", data: chartData })
nextTick(() => { createPieChart(chart3, chartData) });
box3Loading.value = false;
}
......@@ -243,7 +225,7 @@ const handleGetSearchCountry = async () => {
} catch (error) {
chartData = []
}
onAIReport({ type: "环形图", name: "国家分布情况", data: chartData }, "content4")
refAiReport4.value?.onDataInfo({ type: "环形图", name: "国家分布情况", data: chartData })
nextTick(() => { createPieChart(chart4, chartData) });
box4Loading.value = false;
};
......@@ -350,28 +332,6 @@ onMounted(() => {
height: 20px;
flex: auto;
}
.ai-pane {
position: absolute;
right: 0px;
bottom: 15px;
z-index: 2;
:deep(.ai-pane-wrapper) {
display: none;
}
:deep(.ai-button-wrapper) {
display: flex;
}
&:hover {
width: 100%;
bottom: 0px;
:deep(.ai-pane-wrapper) {
display: block;
}
:deep(.ai-button-wrapper) {
display: none;
}
}
}
}
}
}
......
......@@ -9,10 +9,7 @@
<div class="box-main">
<div class="box-head" ref="box1Chart"></div>
<TipTab text="美对华301调查案件的数量变化趋势,数据来源:美国贸易代表办公室官网" style="margin-top: 16px" />
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content1" />
</div>
<AiReport ref="refAiReport1"></AiReport>
</div>
</AnalysisBox>
</div>
......@@ -26,10 +23,7 @@
<div class="box-main">
<div class="box-head" id="box2Chart"></div>
<TipTab text="美301调查所涉及的国家分布情况,数据来源:美国贸易代表办公室官网" style="margin-top: 16px" />
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content2" />
</div>
<AiReport ref="refAiReport2"></AiReport>
</div>
</AnalysisBox>
</div>
......@@ -40,10 +34,7 @@
<div class="box-main">
<div class="box-head" id="box3Chart"></div>
<TipTab text="美301调查方向及结果分布情况,数据来源:美国贸易代表办公室官网" style="margin-top: 16px;" />
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content3" />
</div>
<AiReport ref="refAiReport3"></AiReport>
</div>
</AnalysisBox>
</div>
......@@ -57,10 +48,7 @@
<div class="box-main">
<div class="box-head" ref="box4Chart"></div>
<TipTab text="美对华301调查案件的领域分布情况,数据来源:美国贸易代表办公室官网" style="margin-top: -16px;" />
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content4" />
</div>
<AiReport ref="refAiReport4"></AiReport>
</div>
</AnalysisBox>
</div>
......@@ -81,21 +69,15 @@ import {
} from "@/api/marketAccessRestrictions";
import createLineChart from "@/views/marketAccessRestrictions/utils/baseLineChart";
import createPieChart from "@/views/marketAccessRestrictions/utils/basePiechart.js";
import AiButton from '@/components/base/Ai/AiButton/index.vue';
import AiPane from '@/components/base/Ai/AiPane/index.vue';
import { getNearYearList, getAIReport } from "@/views/marketAccessRestrictions/utils/index.ts";
import AiReport from '@/views/marketAccessRestrictions/marketAccessHome/com/AiReport.vue';
import { getNearYearList } from "@/views/marketAccessRestrictions/utils/index.ts";
const yearList = getNearYearList();
// 获取AI智能报告
const aiContent = reactive({
content1: "正在生成...",
content2: "正在生成...",
content3: "正在生成...",
content4: "正在生成...",
})
const onAIReport = (data, key) => {
getAIReport(data).then(res => { aiContent[key] = res })
}
const refAiReport1 = ref(null)
const refAiReport2 = ref(null)
const refAiReport3 = ref(null)
const refAiReport4 = ref(null)
const inProgressCount = ref(0);
......@@ -122,7 +104,7 @@ const handleGetStatNum = async () => {
chartData.list = []
inProgressCount.value = 0
}
onAIReport({ type: "折线图", name: "数量变化趋势", data: chartData }, "content1")
refAiReport1.value?.onDataInfo({ type: "折线图", name: "数量变化趋势", data: chartData })
nextTick(() => { createLineChart(box1Chart, chartData) })
box1Loading.value = false;
};
......@@ -153,7 +135,7 @@ const handleGetSearchCountry = async () => {
chartData.title = []
chartData.data = []
}
onAIReport({ type: "柱状图", name: "国家分布情况", data: chartData }, "content2")
refAiReport2.value?.onDataInfo({ type: "柱状图", name: "国家分布情况", data: chartData })
nextTick(() => {
const box2Chart = getBarChart(chartData.title, chartData.data);
setChart(box2Chart, "box2Chart");
......@@ -190,7 +172,7 @@ const handleGetSearchDirection = async () => {
chartData.nodes = [];
chartData.links = [];
}
onAIReport({ type: "桑基图", name: "调查方向及结果分布", data: chartData }, "content3")
refAiReport3.value?.onDataInfo({ type: "桑基图", name: "调查方向及结果分布", data: chartData })
nextTick(() => {
const box3Chart = getSankeyChart(chartData.nodes, chartData.links);
setChart(box3Chart, "box3Chart");
......@@ -218,7 +200,7 @@ const handleGetStatArea = async () => {
} catch (error) {
chartData = []
}
onAIReport({ type: "环形图", name: "领域分布情况", data: chartData }, "content4")
refAiReport4.value?.onDataInfo({ type: "环形图", name: "领域分布情况", data: chartData })
nextTick(() => { createPieChart(box4Chart, chartData) })
box4Loading.value = false;
};
......@@ -260,28 +242,6 @@ onMounted(() => {
height: 20px;
flex: auto;
}
.ai-pane {
position: absolute;
right: 0px;
bottom: 15px;
z-index: 2;
:deep(.ai-pane-wrapper) {
display: none;
}
:deep(.ai-button-wrapper) {
display: flex;
}
&:hover {
width: 100%;
bottom: 0px;
:deep(.ai-pane-wrapper) {
display: block;
}
:deep(.ai-button-wrapper) {
display: none;
}
}
}
}
}
}
......
......@@ -33,10 +33,7 @@
<div class="box-main">
<div class="box-head" ref="chart1"></div>
<TipTab text="美对华337调查案件的数量变化趋势,数据来源:美国国际贸易委员会官网" style="margin-top: 16px;" />
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content1" />
</div>
<AiReport ref="refAiReport1"></AiReport>
</div>
</AnalysisBox>
</div>
......@@ -50,10 +47,7 @@
<div class="box-main">
<div class="box-head" ref="chart2"></div>
<TipTab text="美对华337调查案件的领域分布情况,数据来源:美国国际贸易委员会官网" style="margin-top: -16px;" />
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content2" />
</div>
<AiReport ref="refAiReport2"></AiReport>
</div>
</AnalysisBox>
</div>
......@@ -85,10 +79,7 @@
<div class="map-box-right" id="chartMap"></div>
</div>
<TipTab text="美对华337调查案件的中国实体分布情况,数据来源:美国国际贸易委员会官网" />
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content3" />
</div>
<AiReport ref="refAiReport3"></AiReport>
</div>
</AnalysisBox>
</div>
......@@ -102,10 +93,7 @@
<div class="box-main">
<div class="box-head" ref="chart4"></div>
<TipTab text="美对华337调查案件的调查结果分布情况,数据来源:美国国际贸易委员会官网" style="margin-top: -16px;" />
<div class="ai-pane">
<AiButton />
<AiPane :aiContent="aiContent.content4" />
</div>
<AiReport ref="refAiReport4"></AiReport>
</div>
</AnalysisBox>
</div>
......@@ -129,21 +117,15 @@ import createLineChart from "@/views/marketAccessRestrictions/utils/baseLineChar
import createPieChart from "@/views/marketAccessRestrictions/utils/basePiechart.js";
import getBarChart from "./utils/barChart";
import getMapChart from "./utils/mapChart";
import AiButton from '@/components/base/Ai/AiButton/index.vue';
import AiPane from '@/components/base/Ai/AiPane/index.vue';
import { getNearYearList, getAIReport } from "@/views/marketAccessRestrictions/utils/index.ts";
import AiReport from '@/views/marketAccessRestrictions/marketAccessHome/com/AiReport.vue';
import { getNearYearList } from "@/views/marketAccessRestrictions/utils/index.ts";
const yearList = getNearYearList();
// 获取AI智能报告
const aiContent = reactive({
content1: "正在生成...",
content2: "正在生成...",
content3: "正在生成...",
content4: "正在生成...",
})
const onAIReport = (data, key) => {
getAIReport(data).then(res => { aiContent[key] = res })
}
const refAiReport1 = ref(null)
const refAiReport2 = ref(null)
const refAiReport3 = ref(null)
const refAiReport4 = ref(null)
const provinceCoords = {
"北京": [116.46, 39.92],
......@@ -227,7 +209,7 @@ const handleGetStatNum = async (type) => {
chartData.title = [];
chartData.list = [];
}
onAIReport({ type: "折线图", name: "数量变化趋势", data: chartData }, "content1")
refAiReport1.value?.onDataInfo({ type: "折线图", name: "数量变化趋势", data: chartData })
nextTick(() => { createLineChart(chart1, chartData) });
box1Loading.value = false;
};
......@@ -252,7 +234,7 @@ const handleGetStatArea = async () => {
} catch (error) {
chartData = [];
}
onAIReport({ type: "环形图", name: "领域分布情况", data: chartData }, "content2")
refAiReport2.value?.onDataInfo({ type: "环形图", name: "领域分布情况", data: chartData })
nextTick(() => { createPieChart(chart2, chartData) });
box2Loading.value = false;
};
......@@ -282,7 +264,7 @@ const handleGetStatcnOrgCount = async () => {
chartData.name = [];
chartData.value = [];
}
onAIReport({ type: "柱状图", name: "中国实体分布情况", data: chartData }, "content3")
refAiReport3.value?.onDataInfo({ type: "柱状图", name: "中国实体分布情况", data: chartData })
nextTick(() => {
let chart3 = getBarChart(chartData.name, chartData.value);
setChart(chart3, "chart3");
......@@ -305,7 +287,7 @@ const handleGetStatcnOrgCount = async () => {
} catch (error) {
mapData.value = [];
}
onAIReport({ type: "地图", name: "中国实体分布情况", data: mapData.value }, "content3")
refAiReport3.value?.onDataInfo({ type: "地图", name: "中国实体分布情况", data: mapData.value })
nextTick(() => {
let chartMap = getMapChart(mapData.value);
setChart(chartMap, "chartMap");
......@@ -334,7 +316,7 @@ const handleGetSearchResult = async () => {
} catch (error) {
chartData = [];
}
onAIReport({ type: "环形图", name: "调查结果分布", data: chartData }, "content4")
refAiReport4.value?.onDataInfo({ type: "环形图", name: "调查结果分布", data: chartData })
nextTick(() => { createPieChart(chart4, chartData) });
box4Loading.value = false;
};
......@@ -441,28 +423,6 @@ onMounted(() => {
height: 20px;
flex: auto;
}
.ai-pane {
position: absolute;
right: 0px;
bottom: 15px;
z-index: 2;
:deep(.ai-pane-wrapper) {
display: none;
}
:deep(.ai-button-wrapper) {
display: flex;
}
&:hover {
width: 100%;
bottom: 0px;
:deep(.ai-pane-wrapper) {
display: block;
}
:deep(.ai-button-wrapper) {
display: none;
}
}
}
}
}
}
......
......@@ -155,7 +155,7 @@ onMounted(() => {
<style lang="scss" scoped>
.wrapper {
width: 1600px;
margin: 20px auto;
margin: 16px auto;
display: flex;
flex-direction: column;
gap: 16px;
......
......@@ -104,8 +104,7 @@ onMounted(() => {
.page-box {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
overflow-y: auto;
background: rgba(255, 255, 255, 1);
.page-top {
width: 1600px;
......@@ -279,8 +278,6 @@ onMounted(() => {
border-top: 1px solid rgba(230, 231, 232, 1);
background-color: #f7f8f9;
width: 100%;
height: 20px;
flex: auto;
}
}
</style>
\ No newline at end of file
......@@ -204,7 +204,7 @@ onMounted(() => {
<style lang="scss" scoped>
.wrapper {
width: 1600px;
margin: 20px auto;
margin: 16px auto;
display: flex;
gap: 16px;
.left {
......
......@@ -215,7 +215,7 @@ onMounted(() => {
<style lang="scss" scoped>
.wrapper {
width: 1600px;
margin: 20px auto;
margin: 16px auto;
display: flex;
.page-left {
width: 520px;
......
......@@ -45,7 +45,9 @@
<div class="data-icon">{{ baseInfo.orgAbb }}</div>
<div class="data-right">
<div class="data-name">{{ baseInfo.orgNameEn }}</div>
<div class="data-desc">{{ baseInfo.ORGNAME }}</div>
<div class="data-desc">
<span class="text-click-hover" @click="handleToInstitution(baseInfo)">{{ baseInfo.ORGNAME }}</span>
</div>
</div>
</div>
<div class="data-text">{{ baseInfo.ORGBLURB || '-' }}</div>
......@@ -60,9 +62,11 @@
<div class="info-item" v-for="(val, idx) in item.companyList" :key="idx">
<div class="icon">
<img :src="val.logo" alt="" v-if="val.logo">
<div class="default-logo" v-else>{{ val.name ? val.name.substring(0, 1) : '' }}</div>
<div class="default-logo" v-else>{{ val.COMNAM?.substring(0, 1) || '' }}</div>
</div>
<div class="text">{{ val.name }}</div>
<div class="text" >
<span class="text-click-hover" @click="handleToInstitution(val)">{{ val.COMNAM }}</span>
</div>
</div>
</div>
</div>
......@@ -77,7 +81,7 @@ import { ref, onMounted } from "vue";
import { useRoute } from "vue-router";
import { getSearchBlurb , getRelatedEvents} from "@/api/marketAccessRestrictions";
import AiTips from "@/views/marketAccessRestrictions/com/AiTips.vue";
import router from "@/router";
import RelatedEvent from "@/views/marketAccessRestrictions/com/RelatedEvent.vue";
import SurveyAffiche from "@/views/marketAccessRestrictions/com/SurveyAffiche.vue";
......@@ -96,7 +100,7 @@ const handleGetSearchBlurb = async () => {
searchId: route.query.searchId,
sortCode: "337"
});
console.log("调查概况", res)
console.log("调查概况/原告信息/被告信息", res)
if (res.code === 200 && res.data) {
const data = res.data;
baseInfo.value = data;
......@@ -117,19 +121,23 @@ const handleGetSearchBlurb = async () => {
companyList: []
};
}
groups[companyName].companyList.push({
name: item.COMNAM,
logo: "" // API 不提供 logo
});
groups[companyName].companyList.push(item);
});
caseList.value = Object.values(groups);
}
}
} catch (error) {
console.log("获取调查概况失败", error);
}
} catch (error) {}
loading.value = false;
};
// 跳转行政机构主页
const handleToInstitution = item => {
window.sessionStorage.setItem("curTabName", item.ORGNAME|| item.COMNAM);
const curRoute = router.resolve({
path: "/institution",
query: { id: item.ORGID|| item.OMID }
});
window.open(curRoute.href, "_blank");
};
// 相关事件
const eventList = ref([])
......@@ -153,7 +161,7 @@ onMounted(() => {
<style lang="scss" scoped>
.wrapper {
width: 1600px;
margin: 20px auto;
margin: 16px auto;
display: flex;
.box-header {
height: 56px;
......
......@@ -55,57 +55,4 @@ export const getNearYearList = (num=6) => {
yearOptions.push({ label: year.toString()+'年', value: year.toString() });
}
return yearOptions;
};
/**
* AI智能总结
* @param data 需要分析的数据
*/
export const getAIReport = async (data: any, timeoutMs: number = 10000): Promise<string> => {
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
try {
const res = await fetch('/aiAnalysis/chart_interpretation', {
method: 'POST',
headers: {
"X-API-Key": "aircasKEY19491001",
'Content-Type': 'application/json',
},
body: JSON.stringify({ text: JSON.stringify(data) }),
signal: controller.signal
});
clearTimeout(timeoutId);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const reader = res.body.getReader();
const decoder = new TextDecoder();
let result = '';
// 添加读取超时
const readTimeout = setTimeout(() => {
reader.cancel();
}, timeoutMs);
try {
while (true) {
const { done, value } = await reader.read();
if (done) break;
const chunk = decoder.decode(value, { stream: true });
const match = chunk.match(/"解读":\s*"([^"]*)"/);
if (match?.[1]) {
result = match[1];
break; // 获取到结果立即结束
}
}
} finally {
clearTimeout(readTimeout);
reader.cancel(); // 确保连接关闭
}
return result || "未获取到解读内容";
} catch (err) {
return "系统异常,生成失败";
}
};
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论