提交 58537cbd authored 作者: 朱政's avatar 朱政

Merge branch 'master' into zz-dev

......@@ -9,5 +9,6 @@
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<script src="/js/config.js"></script>
</body>
</html>
\ No newline at end of file
const baseUrl = `http://8.140.26.4:9085/`
\ No newline at end of file
......@@ -235,12 +235,26 @@ body {
display: none;
}
/* #region 公共样式类名 */
/* 单行文本溢出隐藏显示省略号 */
.one-line-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 多行文本两端对齐 最后一行正常显示 */
.text-align-justify {
text-align: justify;
text-align-last: left;
-webkit-text-align-last: left;
}
/* 可点击文本 鼠标悬浮样式 */
#app .text-click-hover:hover {
text-decoration: underline;
color: rgb(5, 95, 194);
cursor: pointer;
}
/* #endregion 公共样式类名 */
</style>
<style lang="scss" scoped>
......
......@@ -192,3 +192,30 @@ export function getBillFullText(params) {
params,
})
}
// 条款对比-根据两版版本与筛选条件获取配对条款列表
/**
* @param {billId,oldVersionId,newVersionId,diffType,cRelated,keyword}
* @header token
* @returns { list: Array<{ oldTerm: object|null, newTerm: object|null }> }
*/
export function getBillTermsCompare(params) {
return request({
method: "GET",
url: "/api/billInfoBean/content/compare",
params,
});
}
// 版本对比-根据两版版本与筛选条件获取条款列表(分页)
/**
* @param {billId,content,currentPage,currentVersion,isCn,originalVersion,pageSize,status}
* @header token
*/
export function getBillVersionCompare(params) {
return request({
method: "GET",
url: "/api/billInfoBean/versionCompare",
params,
});
}
import request from "@/api/request.js";
// 最新科技政令
export function getDepartmentList() {
export function getDepartmentList(params) {
return request({
method: 'GET',
url: `/api/administrativeDict/department`,
......@@ -43,10 +43,10 @@ export function getDecreeArea(params) {
}
// 关键行政令
export function getKeyDecree() {
export function getKeyDecree(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderOverview/action`,
url: `/api/administrativeOrderOverview/action?pageSize=${params.pageSize}&pageNum=${params.pageNum}`,
})
}
......
......@@ -17,7 +17,7 @@ defineProps({
})
</script>
<style scoped>
<style lang="scss" scoped>
.action-button {
height: 28px;
padding: 0 8px;
......@@ -29,11 +29,16 @@ defineProps({
font-size: 16px;
font-weight: 400;
transition: all 0.3s;
}
.action-button[type="normal"] {
background-color: rgba(255, 255, 255, 1);
color: rgba(59, 65, 75, 1);
&:hover {
background: var(--color-primary-2);
}
}
.action-button[type="active"] {
......@@ -52,6 +57,4 @@ defineProps({
.action-button[type="active"]:hover {
background-color: #40a9ff;
} */
</style>
\ No newline at end of file
<svg viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16.000000" height="12.000000" fill="none" customFrame="url(#clipPath_1)">
<defs>
<clipPath id="clipPath_1">
<rect width="16.000000" height="12.000000" x="0.000000" y="0.000000" rx="6.000000" fill="rgb(255,255,255)" />
</clipPath>
</defs>
<rect id="AI-logo" width="16.000000" height="12.000000" x="0.000000" y="0.000000" rx="6.000000" />
<path id="合并" d="M13.0238 1.46629C13.7681 0.916637 14.14 0 14.14 0C14.14 0 14.0472 0.916623 14.5122 1.46629C14.9772 2.01595 16 2.19866 16 2.19866C16 2.19866 14.8838 2.38224 14.1396 2.93288C13.3955 3.48351 13.0234 4.40121 13.0234 4.40121C13.0234 4.40121 13.1163 3.48353 12.6512 2.93288C12.1861 2.38222 11.163 2.1986 11.163 2.1986C11.163 2.1986 12.2795 2.01594 13.0238 1.46629ZM8.72107 2.20032L9.85481 10.5L7.29299 10.5L6.99502 8.24068L3.42302 8.24068L2.42736 10.5L0 10.5L3.28857 2.61208L2.85978 2.20032L8.72107 2.20032ZM5.4325 3.60747L4.00442 6.83353L6.86057 6.83353L6.43179 3.60747L5.4325 3.60747ZM13.9457 10.4999L14.9162 4.57493L11.475 4.57493L11.9074 5.13349L11.2386 10.4999L13.9457 10.4999Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
</svg>
<template>
<div class="ai-button-wrapper">
<div class="icon">
<img src="./ai-icon.svg" alt="">
</div>
<div class="text text-tip-1">{{ '总结' }}</div>
</div>
</template>
<style lang="scss" scoped>
.ai-button-wrapper{
width: 74px;
height: 28px;
border-radius: 20px 0 0 20px;
background: var(--color-primary-10);
display: flex;
gap: 6px;
align-items: center;
justify-content: left;
box-sizing: border-box;
padding-left: 12px;
cursor: pointer;
.text{
color: var(--color-primary-100);
}
}
</style>
\ No newline at end of file
<svg viewBox="0 0 20 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20.000000" height="16.000000" fill="none" customFrame="url(#clipPath_2)">
<defs>
<clipPath id="clipPath_2">
<rect width="20.000000" height="16.000000" x="0.000000" y="0.000000" rx="8.000000" fill="rgb(255,255,255)" />
</clipPath>
</defs>
<rect id="AI-logo" width="20.000000" height="16.000000" x="0.000000" y="0.000000" rx="8.000000" />
<path id="合并" d="M16.2798 1.95505C17.2101 1.22218 17.6751 0 17.6751 0C17.6751 0 17.559 1.22216 18.1403 1.95505C18.7215 2.68794 20 2.93155 20 2.93155C20 2.93155 18.6047 3.17632 17.6745 3.9105C16.7443 4.64468 16.2793 5.86828 16.2793 5.86828C16.2793 5.86828 16.3954 4.6447 15.814 3.9105C15.2326 3.1763 13.9537 2.93147 13.9537 2.93147C13.9537 2.93147 15.3494 2.68792 16.2798 1.95505ZM10.9013 2.93376L12.3185 14L9.11624 14L8.74378 10.9876L4.27877 10.9876L3.03421 14L0 14L4.11071 3.48277L3.57473 2.93376L10.9013 2.93376ZM6.79062 4.80996L5.00553 9.11138L8.57572 9.11138L8.03974 4.80996L6.79062 4.80996ZM17.4321 13.9999L18.6452 6.09991L14.3437 6.09991L14.8843 6.84466L14.0482 13.9999L17.4321 13.9999Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
</svg>
<template>
<div class="ai-pane-wrapper">
<div class="header">
<div class="icon">
<img src="./ai-icon.svg" alt="">
</div>
<div class="title text-title-3-show">{{ '智能总结' }}</div>
</div>
<div class="content text-regular">{{ aiContent }}</div>
</div>
</template>
<script setup>
const props = defineProps({
aiContent: {
type: String,
default: ''
}
})
</script>
<style lang="scss">
.ai-pane-wrapper {
width: 100%;
height: 156px;
background: var(--color-primary-2);
box-sizing: border-box;
padding: 12px 16px;
.header {
width: 126px;
height: 30px;
display: flex;
justify-content: center;
align-items: center;
gap: 8px;
border-radius: 20px;
background: var(--color-primary-10);
.icon {
width: 20px;
height: 16px;
img {
width: 100%;
height: 100%;
}
}
.title {
color: var(--color-primary-100);
}
}
.content {
margin-top: 8px;
width: 100%;
height: 90px;
box-sizing: border-box;
padding: 0 12px;
color: var(--color-primary-100);
display: -webkit-box;
-webkit-line-clamp: 3;
/* 控制显示的行数 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-word;
/* 防止长单词溢出 */
}
}
</style>
\ No newline at end of file
<svg viewBox="0 0 1019 61" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1019.000000" height="61.000000" fill="none" customFrame="#000000">
<defs>
<linearGradient id="paint_linear_1" x1="7.60449219" x2="10.1398888" y1="-1.90734863e-06" y2="61.0955963" gradientUnits="userSpaceOnUse">
<stop stop-color="rgb(231,243,255)" offset="0" stop-opacity="1" />
<stop stop-color="rgb(231,243,255)" offset="1" stop-opacity="0" />
</linearGradient>
</defs>
<path id="矩形 5734" d="M0.000322558 0L1019 0L1019 31.5006L0 61.0008L0.000322558 0Z" fill="url(#paint_linear_1)" fill-rule="evenodd" />
</svg>
<svg viewBox="0 0 15 12" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="15.000000" height="12.000000" fill="none" customFrame="url(#clipPath_0)">
<defs>
<clipPath id="clipPath_0">
<rect width="15.000000" height="12.000000" x="0.000000" y="0.000000" rx="6.000000" fill="rgb(255,255,255)" />
</clipPath>
<linearGradient id="paint_linear_0" x1="7.49999952" x2="7.49999952" y1="0" y2="10.5" gradientUnits="userSpaceOnUse">
<stop stop-color="rgb(5,95,194)" offset="0" stop-opacity="1" />
<stop stop-color="rgb(137,193,255)" offset="1" stop-opacity="1" />
</linearGradient>
</defs>
<rect id="AI-logo" width="15.000000" height="12.000000" x="0.000000" y="0.000000" rx="6.000000" />
<path id="合并" d="M12.2098 1.46629C12.9076 0.916637 13.2563 0 13.2563 0C13.2563 0 13.1693 0.916623 13.6052 1.46629C14.0411 2.01595 15 2.19866 15 2.19866C15 2.19866 13.9535 2.38224 13.2559 2.93288C12.5583 3.48351 12.2095 4.40121 12.2095 4.40121C12.2095 4.40121 12.2966 3.48353 11.8605 2.93288C11.4245 2.38222 10.4653 2.1986 10.4653 2.1986C10.4653 2.1986 11.5121 2.01594 12.2098 1.46629ZM8.176 2.20032L9.23888 10.5L6.83718 10.5L6.55783 8.24068L3.20908 8.24068L2.27565 10.5L0 10.5L3.08303 2.61208L2.68105 2.20032L8.176 2.20032ZM5.09297 3.60747L3.75415 6.83353L6.43179 6.83353L6.0298 3.60747L5.09297 3.60747ZM13.0741 10.4999L13.9839 4.57493L10.7578 4.57493L11.1632 5.13349L10.5361 10.4999L13.0741 10.4999Z" fill="url(#paint_linear_0)" fill-rule="evenodd" />
</svg>
<svg viewBox="0 0 6.70703 13.4102" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="6.707031" height="13.410156" fill="none" customFrame="#000000">
<rect id="容器 848" width="6.000000" height="11.997072" x="0.353516" y="0.707031" />
<path id="矢量 626" d="M0 0L2.99854 2.99854L6 0" stroke="rgb(5,95,194)" stroke-width="1.000000" transform="matrix(1,0,0,-1,0.353516,3.70508)" />
<path id="矢量 627" d="M0.353516 9.70508L3.35205 12.7036L6.35352 9.70508" stroke="rgb(5,95,194)" stroke-width="1.000000" />
</svg>
<template>
<div class="summary-wrapper">
<div class="summary-header">
<div class="icon1">
<img src="./icon1.svg" alt="">
</div>
<div class="text text-tip-1">{{ '智库报告总结摘要' }}</div>
<div class="icon2">
<img src="./icon2.svg" alt="">
</div>
</div>
<div class="summary-main">
<slot name="summary-content"></slot>
</div>
</div>
</template>
<style lang="scss">
.summary-wrapper {
width: 100%;
height: 100%;
// background: linear-gradient(90deg, var(--color-primary-10) 0%, var(--bg-white-100) 100%) ;
background: url('./bg.svg') no-repeat;
overflow: hidden;
border-radius: 4px;
border: 1px solid #E7F3FF;
.summary-header {
margin-top: 16px;
margin-left: 24px;
width: 199px;
height: 32px;
border: 1px solid var(--color-primary-100);
border-radius: 16px;
background: var(--color-primary-10);
display: flex;
justify-content: center;
align-items: center;
gap: 9px;
.icon1 {
width: 15px;
height: 12px;
img {
width: 100%;
height: 100%;
}
}
.text {
color: var(--color-primary-100);
}
.icon2 {
width: 6px;
height: 12px;
img {
width: 100%;
height: 100%;
}
}
}
.summary-main {
margin: 0 auto;
margin-top: 24px;
width: calc(100% - 52px);
height: calc(100% - 92px);
}
}
</style>
\ No newline at end of file
......@@ -239,6 +239,8 @@ watch(isTranslate, () => {
background-color: white;
padding: 0 60px;
flex: auto;
height: 100%;
min-height: 0;
display: flex;
flex-direction: column;
.report-header {
......@@ -324,9 +326,14 @@ watch(isTranslate, () => {
.report-main {
flex: auto;
min-height: 0;
box-sizing: border-box;
padding-top: 10px;
:deep(.el-scrollbar) {
height: 100%;
}
.no-content {
height: 100%;
display: flex;
......
......@@ -133,11 +133,12 @@ const emit = defineEmits(['save', 'download', 'collect'])
}
}
// .header-btn {
// display: flex;
// justify-content: flex-end;
// gap: 8px;
// }
.header-btn {
// display: flex;
// justify-content: flex-end;
// gap: 8px;
margin-right: 10px;
}
// .header-btn1 {
// position: absolute;
......
// 法案资源库
const CountryBill = () => import('@/views/dataLibrary/components/bill/countryBill/index.vue')
const StateBill = () => import('@/views/dataLibrary/components/bill/stateBill/index.vue')
const CountryBill = () => import('@/views/dataLibrary/bill/countryBill/index.vue')
const StateBill = () => import('@/views/dataLibrary/bill/stateBill/index.vue')
const dataBillRoutes = [
// 科技法案资源库路由
{
path: "/countryBill",
path: "/dataLibrary/countryBill",
name: "CountryBill",
component: CountryBill,
meta: {
......@@ -16,7 +16,7 @@ const dataBillRoutes = [
},
{
path: "/stateBill",
path: "/dataLibrary/stateBill",
name: "StateBill",
component: StateBill,
meta: {
......
// 法案资源库
const Decree = () => import('@/views/dataLibrary/components/decree/index.vue')
const Decree = () => import('@/views/dataLibrary/decree/index.vue')
const dataDecreeRoutes = [
// 科技法案资源库路由
{
path: "/dataDecree",
path: "/dataLibrary/dataDecree",
name: "DataDecree",
component: Decree,
meta: {
......
// 法案资源库
const CommerceControlList = () => import('@/views/dataLibrary/components/exportControl/commerceControlList/index.vue')
const CommerceControlListEvent = () => import('@/views/dataLibrary/components/exportControl/commerceControlListEvent/index.vue')
const EntityList = () => import('@/views/dataLibrary/components/exportControl/entityList/index.vue')
const EntityListEvent = () => import('@/views/dataLibrary/components/exportControl/entityListEvent/index.vue')
const CommerceControlList = () => import('@/views/dataLibrary/exportControl/commerceControlList/index.vue')
const CommerceControlListEvent = () => import('@/views/dataLibrary/exportControl/commerceControlListEvent/index.vue')
const EntityList = () => import('@/views/dataLibrary/exportControl/entityList/index.vue')
const EntityListEvent = () => import('@/views/dataLibrary/exportControl/entityListEvent/index.vue')
const dataDecreeRoutes = [
// 科技法案资源库路由
{
path: "/dataCommerceControlList",
path: "/dataLibrary/dataCommerceControlList",
name: "CommerceControlList",
component: CommerceControlList,
meta: {
......@@ -17,7 +17,7 @@ const dataDecreeRoutes = [
}
},
{
path: "/dataCommerceControlListEvent",
path: "/dataLibrary/dataCommerceControlListEvent",
name: "CommerceControlListEvent",
component: CommerceControlListEvent,
meta: {
......@@ -27,7 +27,7 @@ const dataDecreeRoutes = [
}
},
{
path: "/dataEntityList",
path: "/dataLibrary/dataEntityList",
name: "EntityList",
component: EntityList,
meta: {
......@@ -37,7 +37,7 @@ const dataDecreeRoutes = [
}
},
{
path: "/dataEntityListEvent",
path: "/dataLibrary/dataEntityListEvent",
name: "EntityListEvent",
component: EntityListEvent,
meta: {
......
// 法案资源库
const MREList = () => import('@/views/dataLibrary/components/financeControl/mREList/index.vue')
const MREListEvent = () => import('@/views/dataLibrary/components/financeControl/mREListEvent/index.vue')
const SDNList = () => import('@/views/dataLibrary/components/financeControl/sDNList/index.vue')
const SDNListEvent = () => import('@/views/dataLibrary/components/financeControl/sDNListEvent/index.vue')
const MREList = () => import('@/views/dataLibrary/financeControl/mREList/index.vue')
const MREListEvent = () => import('@/views/dataLibrary/financeControl/mREListEvent/index.vue')
const SDNList = () => import('@/views/dataLibrary/financeControl/sDNList/index.vue')
const SDNListEvent = () => import('@/views/dataLibrary/financeControl/sDNListEvent/index.vue')
const dataDecreeRoutes = [
// 科技法案资源库路由
{
path: "/mREList",
path: "/dataLibrary/mREList",
name: "MREList",
component: MREList,
meta: {
......@@ -17,7 +17,7 @@ const dataDecreeRoutes = [
}
},
{
path: "/mREListEvent",
path: "/dataLibrary/mREListEvent",
name: "MREListEvent",
component: MREListEvent,
meta: {
......@@ -27,7 +27,7 @@ const dataDecreeRoutes = [
}
},
{
path: "/sDNList",
path: "/dataLibrary/sDNList",
name: "SDNList",
component: SDNList,
meta: {
......@@ -37,7 +37,7 @@ const dataDecreeRoutes = [
}
},
{
path: "/sDNListEvent",
path: "/dataLibrary/sDNListEvent",
name: "SDNListEvent",
component: SDNListEvent,
meta: {
......
// 法案资源库
const KeyLab = () => import('@/views/dataLibrary/components/innovationSubject/keyLab/index.vue')
const ResearchUniversity = () => import('@/views/dataLibrary/components/innovationSubject/researchUniversity/index.vue')
const TechnologyCompany = () => import('@/views/dataLibrary/components/innovationSubject/technologyCompany/index.vue')
const KeyLab = () => import('@/views/dataLibrary/innovationSubject/keyLab/index.vue')
const ResearchUniversity = () => import('@/views/dataLibrary/innovationSubject/researchUniversity/index.vue')
const TechnologyCompany = () => import('@/views/dataLibrary/innovationSubject/technologyCompany/index.vue')
const dataDecreeRoutes = [
// 科技法案资源库路由
{
path: "/keyLab",
path: "/dataLibrary/keyLab",
name: "KeyLab",
component: KeyLab,
meta: {
......@@ -17,7 +17,7 @@ const dataDecreeRoutes = [
},
{
path: "/researchUniversity",
path: "/dataLibrary/researchUniversity",
name: "ResearchUniversity",
component: ResearchUniversity,
meta: {
......@@ -28,7 +28,7 @@ const dataDecreeRoutes = [
},
{
path: "/technologyCompany",
path: "/dataLibrary/technologyCompany",
name: "TechnologyCompany",
component: TechnologyCompany,
meta: {
......
// 法案资源库
const Case337 = () => import('@/views/dataLibrary/components/marketControl/case337/index.vue')
const Case232 = () => import('@/views/dataLibrary/components/marketControl/case232/index.vue')
const Case301 = () => import('@/views/dataLibrary/components/marketControl/case301/index.vue')
const Case337 = () => import('@/views/dataLibrary/marketControl/case337/index.vue')
const Case232 = () => import('@/views/dataLibrary/marketControl/case232/index.vue')
const Case301 = () => import('@/views/dataLibrary/marketControl/case301/index.vue')
const dataDecreeRoutes = [
// 科技法案资源库路由
{
path: "/case337",
path: "/dataLibrary/case337",
name: "Case337",
component: Case337,
meta: {
......@@ -16,7 +16,7 @@ const dataDecreeRoutes = [
}
},
{
path: "/case232",
path: "/dataLibrary/case232",
name: "Case232",
component: Case232,
meta: {
......@@ -26,7 +26,7 @@ const dataDecreeRoutes = [
}
},
{
path: "/case301",
path: "/dataLibrary/case301",
name: "Case301",
component: Case301,
meta: {
......
// 法案资源库
const CongressMan = () => import('@/views/dataLibrary/components/technologyFigures/congressMan/index.vue')
const Minister = () => import('@/views/dataLibrary/components/technologyFigures/minister/index.vue')
const TechnologyLeader = () => import('@/views/dataLibrary/components/technologyFigures/technologyLeader/index.vue')
const ThinkTankResearcher = () => import('@/views/dataLibrary/components/technologyFigures/thinkTankResearcher/index.vue')
const CongressMan = () => import('@/views/dataLibrary/technologyFigures/congressMan/index.vue')
const Minister = () => import('@/views/dataLibrary/technologyFigures/minister/index.vue')
const TechnologyLeader = () => import('@/views/dataLibrary/technologyFigures/technologyLeader/index.vue')
const ThinkTankResearcher = () => import('@/views/dataLibrary/technologyFigures/thinkTankResearcher/index.vue')
const dataDecreeRoutes = [
// 科技法案资源库路由
{
path: "/congressMan",
path: "/dataLibrary/congressMan",
name: "CongressMan",
component: CongressMan,
meta: {
......@@ -17,7 +17,7 @@ const dataDecreeRoutes = [
}
},
{
path: "/minister",
path: "/dataLibrary/minister",
name: "Minister",
component: Minister,
meta: {
......@@ -27,7 +27,7 @@ const dataDecreeRoutes = [
}
},
{
path: "/technologyLeader",
path: "/dataLibrary/technologyLeader",
name: "TechnologyLeader",
component: TechnologyLeader,
meta: {
......@@ -37,7 +37,7 @@ const dataDecreeRoutes = [
}
},
{
path: "/thinkTankResearcher",
path: "/dataLibrary/thinkTankResearcher",
name: "ThinkTankResearcher",
component: ThinkTankResearcher,
meta: {
......
// 法案资源库
const ThinkTank = () => import('@/views/dataLibrary/components/thinkTank/index.vue')
const ThinkTank = () => import('@/views/dataLibrary/thinkTank/index.vue')
const dataThinkTankRoutes = [
// 科技法案资源库路由
{
path: "/dataThinkTank",
path: "/dataLibrary/dataThinkTank",
name: "DataThinkTank",
component: ThinkTank,
meta: {
title: '科技智库', // 显示在tag上的文字
title: '美国科技智库', // 显示在tag上的文字
affix: false, // 是否为固定tag(首页通常设置为true,不可关闭)
keepAlive: true // 是否需要缓存
}
......
......@@ -34,6 +34,9 @@ const routes = [
path: "/dataLibrary",
name: "DataLibrary",
component: DataLibrary,
meta: {
title: '数据资源库'
},
children: [
...dataRoutes
]
......
......@@ -13,7 +13,7 @@ const BillInfluenceLayout = () => import('@/views/bill/influence/index.vue')
const BillInfluenceIndustry = () => import('@/views/bill/influence/industry/index.vue')
const BillInfluenceScientificResearch = () => import('@/views/bill/influence/scientificResearch/index.vue')
const BillRelevantCircumstance = () => import('@/views/bill/relevantCircumstance/index.vue')
const BillOriginalText = () => import('@/views/bill/billOriginalText/index.vue')
const BillVersionCompare = () => import('@/views/bill/versionCompare/index.vue')
const billRoutes = [
......@@ -36,14 +36,6 @@ const billRoutes = [
dynamicTitle: true // 标记需要动态设置标题
},
children: [
{
path: "originalText",
name: "BillOriginalText",
component: BillOriginalText,
meta: {
title: "法案原文"
}
},
// 法案分析路由
{
path: "bill",
......@@ -138,6 +130,14 @@ const billRoutes = [
// meta: {
// title: "相关情况"
// }
},
{
path: "versionCompare",
name: "BillVersionCompare",
component: BillVersionCompare,
meta: {
title: "版本对比"
}
}
]
},
......
......@@ -18,7 +18,7 @@ const decreeRoutes = [
name: "Decree",
component: Decree,
meta: {
title: "政令概览"
title: "科技政令概况"
}
},
{
......
<template>
<el-row class="wrapper layout-grid-line">
<el-col :span="span">
<pre>
{{
`
import AiButton from '@/components/base/AiButton/index.vue'
import AiPane from '@/components/base/AiPane/index.vue'
<div class="chart-box">
<div class="btn-box" @mouseenter="handleSwitchAiContentShow(true)">
<AiButton />
</div>
<div class="content-box" v-if="isShowAiContent" @mouseleave="handleSwitchAiContentShow(false)">
<AiPane :aiContent="aiContent" />
</div>
</div>
`
}}
</pre>
<div class="chart-box">
<div class="btn-box" @mouseenter="handleSwitchAiContentShow(true)">
<AiButton />
</div>
<div class="content-box" v-if="isShowAiContent" @mouseleave="handleSwitchAiContentShow(false)">
<AiPane :aiContent="aiContent" />
</div>
</div>
</el-col>
</el-row>
</template>
<script setup>
import { ref } from 'vue'
import '@/styles/common.scss'
import AiButton from '@/components/base/Ai/AiButton/index.vue'
import AiPane from '@/components/base/Ai/AiPane/index.vue'
const span = 12
const handleSwitchAiContentShow = (isShow) => {
isShowAiContent.value = isShow
}
const isShowAiContent = ref(false)
const aiContent = ref(`整个立法过程反映了美国政治的高度极化特点。民主党全员反对该法案,批评其"劫贫济富"。而共和党内部也有分歧,特别是在财政赤字问题上。马斯克多次公开批评该法案是"疯狂的支出计划"。整个立法过程反映了美国政治的高度极化特点。民主党全员反对该法案,批评其"劫贫济富"。而共和党内部也有分歧,特别是在财政赤字问题上。马斯克多次公开批评该法案是"疯狂的支出计划"。`)
</script>
<style lang="scss" scoped>
.chart-box {
width: 520px;
height: 300px;
border: 1px solid var(--bg-black-5);
position: relative;
.btn-box {
position: absolute;
right: 0;
bottom: 18px;
}
.content-box {
position: absolute;
left: 0;
bottom: 0;
}
}
</style>
\ No newline at end of file
<template>
<el-row class="wrapper layout-grid-line">
<el-col :span="span">
<pre>
{{
`
import AiSummary from '@/components/base/Ai/AiSummary/index.vue'
<div class="summary-box">
<AiSummary />
</div>
`
}}
</pre>
<div class="summary-box">
<AiSummary>
<template #summary-content>
<div class="content-box">
我是插槽内容区域(忽略背景色)
</div>
</template>
</AiSummary>
</div>
</el-col>
</el-row>
</template>
<script setup>
import { ref } from 'vue'
import '@/styles/common.scss'
import AiSummary from '@/components/base/Ai/AiSummary/index.vue'
const span = 24
const aiContent = ref(`整个立法过程反映了美国政治的高度极化特点。民主党全员反对该法案,批评其"劫贫济富"。而共和党内部也有分歧,特别是在财政赤字问题上。马斯克多次公开批评该法案是"疯狂的支出计划"。整个立法过程反映了美国政治的高度极化特点。民主党全员反对该法案,批评其"劫贫济富"。而共和党内部也有分歧,特别是在财政赤字问题上。马斯克多次公开批评该法案是"疯狂的支出计划"。`)
</script>
<style lang="scss" scoped>
.summary-box {
margin-left: 10px;
margin-bottom: 10px;
width: 1019px;
height: 453px;
.content-box{
width: 100%;
height: 100%;
background: var(--color-primary-2);
}
}
</style>
\ No newline at end of file
......@@ -43,6 +43,12 @@
<el-tab-pane label="时间选择框" lazy>
<TimeTabPane />
</el-tab-pane>
<el-tab-pane label="Ai智能总结" lazy>
<AiInfo />
</el-tab-pane>
<el-tab-pane label="Ai内容摘要" lazy>
<AiSummary />
</el-tab-pane>
<el-tab-pane label="层级关系图" lazy>
<GraphChart />
</el-tab-pane>
......@@ -83,6 +89,8 @@ import ActionButton from './ActionButton/index.vue'
import WordCloudChart from './WordCloudChart/index.vue'
import NewsPage from './News/index.vue'
import TimeTabPane from './TimeTabPane/index.vue'
import AiInfo from './Ai/AiInfo/index.vue'
import AiSummary from './Ai/AiSummary/index.vue'
</script>
<style lang="scss" scoped>
......
......@@ -204,16 +204,20 @@
<div class="coop-members">
<div class="coop-member">
<img class="coop-avatar" :src="item.avatar || defaultAvatar" alt="committee-avatar" />
<div class="coop-member-name" :title="item.name">{{ item.name }}</div>
<div class="coop-member-info">
<div class="coop-member-name" :title="item.name">{{ item.name }}</div>
<div v-if="item.nameEn" class="coop-member-name-en" :title="item.nameEn">
{{ item.nameEn }}
</div>
</div>
</div>
</div>
<div class="coop-summary" :title="item.desc">
<!-- <div class="coop-summary" :title="item.desc">
{{ item.desc }}
</div>
</div> -->
<div class="coop-count">
{{ `${item.proposalSize ?? (item.bills || []).length}项重点法案` }}
</div>
<slot name="committee-extra" :committee="item" />
</div>
<div class="coop-proposals">
<div
......@@ -447,6 +451,7 @@ const handleGetCommitteeList = async () => {
const descText = billInfoPage[0]?.originDepart || "";
return {
id: item.id,
nameEn:item.nameEn || "",
avatar: "",
name: item.name || "-",
desc: descText,
......@@ -1232,6 +1237,12 @@ onMounted(() => {
min-width: 0;
}
.coop-member-info {
display: flex;
flex-direction: column;
min-width: 0;
}
.coop-avatar {
width: 40px;
height: 40px;
......@@ -1273,6 +1284,17 @@ onMounted(() => {
text-overflow: ellipsis;
}
.coop-member-name-en {
color: var(--text-primary-65-color);
font-family: "Microsoft YaHei";
font-size: 14px;
font-weight: 400;
line-height: 22px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.coop-count {
flex-shrink: 0;
color: #1459bb;
......@@ -1284,7 +1306,6 @@ onMounted(() => {
}
.coop-proposals {
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid #eaeced;
display: grid;
......
......@@ -114,7 +114,13 @@
<el-empty v-if="!box5HasData" description="暂无数据" :image-size="100" />
<div v-else id="box5Chart" class="overview-chart"></div>
</div>
<TipTab class="overview-tip" />
<div class="overview-tip-row">
<TipTab class="overview-tip" />
<AiButton class="overview-tip-action" @mouseenter="handleShowAiPane('box5')" />
</div>
<div v-if="aiPaneVisible.box5" class="overview-ai-pane" @mouseleave="handleHideAiPane('box5')">
<AiPane :aiContent="overviewAiContent.box5" />
</div>
</div>
</OverviewCard>
<OverviewCard class="overview-card--single box6" title="涉华法案领域分布" :icon="box6HeaderIcon">
......@@ -128,7 +134,13 @@
<el-empty v-if="!box9HasData" description="暂无数据" :image-size="100" />
<div v-else id="box9Chart" class="overview-chart"></div>
</div>
<TipTab class="overview-tip" />
<div class="overview-tip-row">
<TipTab class="overview-tip" />
<AiButton class="overview-tip-action" @mouseenter="handleShowAiPane('box6')" />
</div>
<div v-if="aiPaneVisible.box6" class="overview-ai-pane" @mouseleave="handleHideAiPane('box6')">
<AiPane :aiContent="overviewAiContent.box6" />
</div>
</div>
</OverviewCard>
</div>
......@@ -144,7 +156,13 @@
<el-empty v-if="!box7HasData" description="暂无数据" :image-size="100" />
<div v-else id="box7Chart" class="overview-chart"></div>
</div>
<TipTab class="overview-tip" />
<div class="overview-tip-row">
<TipTab class="overview-tip" />
<AiButton class="overview-tip-action" @mouseenter="handleShowAiPane('box7')" />
</div>
<div v-if="aiPaneVisible.box7" class="overview-ai-pane" @mouseleave="handleHideAiPane('box7')">
<AiPane :aiContent="overviewAiContent.box7" />
</div>
</div>
</OverviewCard>
<OverviewCard class="overview-card--single box8" title="涉华法案进展分布" :icon="box7HeaderIcon">
......@@ -161,7 +179,13 @@
<div id="box8Chart" class="overview-chart box8-chart"></div>
</template>
</div>
<TipTab class="overview-tip" />
<div class="overview-tip-row">
<TipTab class="overview-tip" />
<AiButton class="overview-tip-action" @mouseenter="handleShowAiPane('box8')" />
</div>
<div v-if="aiPaneVisible.box8" class="overview-ai-pane" @mouseleave="handleHideAiPane('box8')">
<AiPane :aiContent="overviewAiContent.box8" />
</div>
</div>
</OverviewCard>
<OverviewCard class="overview-card--single box9" title="涉华法案关键条款" :icon="box7HeaderIcon">
......@@ -170,7 +194,13 @@
<el-empty v-if="!wordCloudHasData" description="暂无数据" :image-size="100" />
<WordCloundChart v-else class="overview-chart" width="100%" height="100%" :data="wordCloudData" />
</div>
<TipTab class="overview-tip" />
<div class="overview-tip-row">
<TipTab class="overview-tip" />
<AiButton class="overview-tip-action" @mouseenter="handleShowAiPane('box9')" />
</div>
<div v-if="aiPaneVisible.box9" class="overview-ai-pane" @mouseleave="handleHideAiPane('box9')" >
<AiPane :aiContent="overviewAiContent.box9" />
</div>
</div>
</OverviewCard>
</div>
......@@ -208,6 +238,8 @@ import OverviewCard from "./OverviewCard.vue";
import ResourceLibrarySection from "./ResourceLibrarySection.vue";
import { useContainerScroll } from "@/hooks/useScrollShow";
import TipTab from "@/components/base/TipTab/index.vue";
import AiButton from "@/components/base/Ai/AiButton/index.vue";
import AiPane from "@/components/base/Ai/AiPane/index.vue";
import WordCloundChart from "@/components/base/WordCloundChart/index.vue";
import getMultiLineChart from "./utils/multiLineChart";
......@@ -357,6 +389,36 @@ const box7YearList = ref([
}
]);
const aiPaneVisible = ref({
box5: false,
box6: false,
box7: false,
box8: false,
box9: false
});
const overviewAiContent = ref({
box5: "智能总结生成中...",
box6: "智能总结生成中...",
box7: "智能总结生成中...",
box8: "智能总结生成中...",
box9: "智能总结生成中..."
});
const handleShowAiPane = key => {
aiPaneVisible.value = {
...aiPaneVisible.value,
[key]: true
};
};
const handleHideAiPane = key => {
aiPaneVisible.value = {
...aiPaneVisible.value,
[key]: false
};
};
const box8selectetedTime = ref("2025");
const box8YearList = ref([
{
......@@ -2097,6 +2159,20 @@ onUnmounted(() => {
.overview-card-body {
display: flex;
flex-direction: column;
position: relative;
}
.overview-ai-pane {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
z-index: 3;
pointer-events: none;
.ai-pane-wrapper {
pointer-events: auto;
}
}
.overview-chart-wrap {
......@@ -2119,8 +2195,17 @@ onUnmounted(() => {
min-height: 0;
}
.overview-tip {
.overview-tip-row {
margin-top: 10px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.overview-tip-action {
position: absolute;
right: -30px;
}
}
}
......
......@@ -78,14 +78,6 @@
<div class="right-box-bottom" v-if="showActions">
<template v-if="isLoading">
<div class="btn1 is-skeleton">
<div class="icon">
<el-skeleton-item class="skeleton-action-icon" variant="text" />
</div>
<div class="text">
<el-skeleton-item class="skeleton-action-text" variant="text" />
</div>
</div>
<div class="btn3 is-skeleton">
<div class="icon">
<el-skeleton-item class="skeleton-action-icon" variant="text" />
......@@ -96,13 +88,6 @@
</div>
</template>
<template v-else>
<div class="btn1" @click="emit('open-original-text')">
<div class="icon">
<img :src="btnIconOriginalText" alt="" />
</div>
<div class="text">{{ "法案原文" }}</div>
</div>
<div class="btn3" @click="emit('open-analysis')">
<div class="icon">
<img :src="btnIconAnalysis" alt="" />
......@@ -118,7 +103,6 @@
<script setup>
import { computed } from "vue";
import btnIconOriginalText from "@/views/thinkTank/ReportDetail/images/btn-icon1.png";
import btnIconAnalysis from "@/views/thinkTank/ReportDetail/images/btn-icon3.png";
const props = defineProps({
......@@ -150,7 +134,7 @@ const props = defineProps({
const isLoading = computed(() => !props.billInfo || !props.billInfo.billName);
const emit = defineEmits(["tab-click", "open-original-text", "open-analysis"]);
const emit = defineEmits(["tab-click", "open-analysis"]);
</script>
<style lang="scss" scoped>
......@@ -363,41 +347,6 @@ const emit = defineEmits(["tab-click", "open-original-text", "open-analysis"]);
justify-content: flex-end;
gap: 8px;
.btn1 {
cursor: pointer;
width: 120px;
height: 36px;
box-sizing: border-box;
border: 1px solid rgba(230, 231, 232, 1);
border-radius: 6px;
background: rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
gap: 8px;
.icon {
width: 16px;
height: 16px;
img {
width: 100%;
height: 100%;
}
}
.text {
height: 24px;
color: rgba(95, 101, 108, 1);
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
line-height: 24px;
letter-spacing: 0px;
text-align: left;
}
}
.btn3 {
cursor: pointer;
width: 120px;
......
......@@ -7,10 +7,9 @@
:defaultLogo="USALogo"
:tabs="mainHeaderBtnList"
:activeTitle="activeTitle"
:showTabs="!isBillOriginalTextPage"
:showActions="!isBillOriginalTextPage"
:showTabs="showHeaderTabs"
:showActions="showHeaderActions"
@tab-click="handleClickMainHeaderBtn"
@open-original-text="handleOpenBillOriginalText"
@open-analysis="handleAnalysisClick"
/>
......@@ -22,14 +21,13 @@
</template>
<script setup>
import { ref, onMounted, computed, watch } from "vue";
import { ref, onMounted, watch } from "vue";
import router from "@/router";
import { useRoute } from "vue-router";
import { getBillInfoGlobal } from "@/api/bill";
import BillHeader from "./components/BillHeader.vue";
const route = useRoute();
const isBillOriginalTextPage = computed(() => route.path === "/billLayout/originalText");
import icon1 from "./assets/icons/icon1.svg";
import icon1Active from "./assets/icons/icon1_active.svg";
......@@ -55,16 +53,6 @@ const getBillInfoGlobalFn = async () => {
}
};
const handleOpenBillOriginalText = () => {
const targetRoute = router.resolve({
path: "/billLayout/originalText",
query: {
billId: route.query.billId
}
});
window.open(targetRoute.href, "_blank");
};
const mainHeaderBtnList = ref([
{
icon: icon1,
......@@ -93,6 +81,8 @@ const mainHeaderBtnList = ref([
]);
const activeTitle = ref("法案概况");
const showHeaderTabs = ref(true);
const showHeaderActions = ref(true);
const getActiveTitleByRoutePath = path => {
if (path.startsWith("/billLayout/deepDig")) return "深度挖掘";
......@@ -102,8 +92,12 @@ const getActiveTitleByRoutePath = path => {
return "法案概况";
};
const syncActiveTitleFromRoute = () => {
const syncHeaderStateFromRoute = () => {
const currentPath = route.path || "";
activeTitle.value = getActiveTitleByRoutePath(route.path);
const isVersionCompare = currentPath.startsWith("/billLayout/versionCompare");
showHeaderTabs.value = !isVersionCompare;
showHeaderActions.value = !isVersionCompare;
};
const handleClickMainHeaderBtn = item => {
......@@ -134,7 +128,7 @@ const handleAnalysisClick = () => {
onMounted(() => {
getBillInfoGlobalFn();
// 以当前路由为准,避免 sessionStorage 造成高亮错乱
syncActiveTitleFromRoute();
syncHeaderStateFromRoute();
// 兜底:如果未来出现未知路由且有缓存,再用缓存
const cachedTitle = window.sessionStorage.getItem("activeTitle");
if (!activeTitle.value && cachedTitle) activeTitle.value = cachedTitle;
......@@ -143,7 +137,7 @@ onMounted(() => {
watch(
() => route.path,
() => {
syncActiveTitleFromRoute();
syncHeaderStateFromRoute();
},
{ immediate: true }
);
......
......@@ -696,6 +696,7 @@ onMounted(() => {
position: absolute;
right: 84px;
top: 15px;
.btn {
height: 28px;
......
<template>
<div class="process-overview-wrap">
<!-- <div class="box-header">
<div class="header-left"></div>
<div class="title">流程概要</div>
<div class="header-right">
<div class="icon">
<img src="@/assets/icons/box-header-icon2.png" alt="" />
</div>
<div class="icon">
<img src="@/assets/icons/box-header-icon3.png" alt="" />
</div>
</div>
</div>
<div class="main">
<div class="left" :style="{ width: (maxLineWidth + 250) + 'px' }">
<div class="top">
<div class="top-line" :style="{ width: lineWidth }">
<div class="top-line1"></div>
</div>
<div class="start">
<div class="icon">
<img src="./assets/images/logo1.png" alt="" />
</div>
<div class="name">{{ "参议院" }}</div>
</div>
<div class="content-box" :style="senateBoxStyle">
<div class="item-box" v-for="(item, index) in senateList" :key="item.id" style="width: 280px; flex-shrink: 0;">
<div class="item-box-dot">
<img src="./assets/images/top-line-dot.png" alt="" />
</div>
<div class="item-content">
<div class="item-header">
<div class="item-title" :title="item.actionTitle">
{{ item.actionTitle }} <span v-if="item.versionId">({{ item.versionId }})</span>
</div>
<div class="item-header-icon" @click="handleClickDetail(true, item, $event)">
<img src="./assets/images/item-header-icon.png" alt="" />
</div>
</div>
<div class="item-info" v-if="item.agreeVote !== null || item.disagreeVote !== null">
{{ (item.agreeVote || 0) + "赞成:" + (item.disagreeVote || 0) + "反对" }}
</div>
<div class="item-main" v-if="item.fynrList && item.fynrList.length">
<div class="item-main-item" v-for="(sub, subIndex) in item.fynrList" :key="subIndex">
<div class="icon"></div>
<CommonPrompt :content="sub">
<div class="text">{{ sub }}</div>
</CommonPrompt>
</div>
</div>
</div>
<div class="item-time">
{{ item.actionDate }}
</div>
</div>
</div>
</div>
<div class="bottom">
<div class="bottom-line" :style="{ width: lineWidth }">
<div class="bottom-line1"></div>
</div>
<div class="start">
<div class="name">{{ "众议院" }}</div>
<div class="icon">
<img src="./assets/images/logo2.png" alt="" />
</div>
</div>
<div class="content-box" :style="houseBoxStyle">
<div class="item-box" v-for="(item, index) in houseList" :key="item.id" style="width: 280px; flex-shrink: 0;">
<div class="item-time">
{{ item.actionDate }}
</div>
<div class="item-box-dot">
<img src="./assets/images/bottom-line-dot.png" alt="" />
</div>
<div class="item-content">
<div class="item-header">
<div class="item-title" :title="item.actionTitle">
{{ item.actionTitle }} <span v-if="item.versionId">({{ item.versionId }})</span>
</div>
<div class="item-header-icon" @click="handleClickDetail(true, item, $event)">
<img src="./assets/images/item-header-icon.png" alt="" />
</div>
</div>
<div class="item-info" v-if="item.agreeVote !== null || item.disagreeVote !== null">
{{ (item.agreeVote || 0) + "赞成:" + (item.disagreeVote || 0) + "反对" }}
</div>
<div class="item-main" v-if="item.fynrList && item.fynrList.length">
<div class="item-main-item" v-for="(sub, subIndex) in item.fynrList" :key="subIndex">
<div class="icon"></div>
<CommonPrompt :content="sub">
<div class="text">{{ sub }}</div>
</CommonPrompt>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="right" :style="{ left: rightPos }">
<div class="junction-dot">
<div class="inner-dot"></div>
</div>
<div class="right-line"></div>
</div>
</div>
</div> -->
<AnalysisBox title="流程概要" :showAllBtn="false">
<div class="main">
<div class="left" :style="{ width: (maxLineWidth + 250) + 'px' }">
......@@ -207,17 +99,6 @@
</div>
</div>
</div>
<!-- <div class="footer">
<div class="footer-left">
<img src="./assets/icons/right-icon1.png" alt="" />
</div>
<div class="footer-center">
立法过程始于2025年2月共和党启动预算框架谈判,5月22日众议院以215:214的1票优势通过初始版本;随后参议院历经16小时全文朗读和马拉松式辩论,于7月1日以51:50的票数通过修订版(副总统万斯投关键票);因参议院版本大改(如永久化减税、提高债限至5万亿美元),法案重返众议院审议,经程序性投票(219:213)和最终表决(218:214),于7月3日深夜通过;特朗普在7月4日独立日签署生效,全程凸显两党对立、党内分歧及程序博弈。
</div>
<div class="footer-right">
<img src="./assets/icons/arrow-right.png" alt="" />
</div>
</div> -->
</AnalysisBox>
<ProcessOverviewDetailDialog
......
......@@ -29,7 +29,7 @@ const siderBtnList = ref([
path: '/billLayout/bill/background'
},
{
name: '内容概要',
name: '法案原文',
path: '/billLayout/bill/template'
},
])
......@@ -38,7 +38,7 @@ const siderBtnActive = ref("法案简介");
const getSiderActiveByRoutePath = path => {
if (path.includes("/billLayout/bill/background")) return "法案背景";
if (path.includes("/billLayout/bill/template")) return "内容概要";
if (path.includes("/billLayout/bill/template")) return "法案原文";
return "法案简介";
};
......
......@@ -387,7 +387,7 @@ const handleChangeBill = val => {
};
const handleOpenVersionCompare = () => {
const targetUrl = `/billLayout/deepDig/processOverview?billId=${route.query.billId}`;
const targetUrl = `/billLayout/versionCompare?billId=${route.query.billId}`;
window.open(targetUrl, "_blank");
};
......@@ -404,8 +404,8 @@ const handleGetBillList = async () => {
billList.value = rawList
.map(item => {
return {
label: item.bbmc,
value: item.bbmc
label: item.contentZh,
value: item.contentZh
};
})
.filter(item => {
......
<svg viewBox="0 0 13.5996 12.666" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="13.599609" height="12.666016" fill="none" customFrame="#000000">
<path id="矢量 455" d="M2 8.66667L2 10C1.99999 10.0416 2.00192 10.0831 2.00578 10.1245C2.00965 10.1659 2.01545 10.207 2.02317 10.2479C2.03089 10.2888 2.0405 10.3292 2.052 10.3691C2.0635 10.4091 2.07684 10.4484 2.09202 10.4872C2.1072 10.5259 2.12416 10.5638 2.14289 10.6009C2.16162 10.6381 2.18204 10.6742 2.20416 10.7095C2.22627 10.7447 2.24998 10.7788 2.27529 10.8118C2.3006 10.8448 2.32739 10.8765 2.35566 10.907C2.38394 10.9375 2.41358 10.9666 2.44458 10.9944C2.47558 11.0221 2.50781 11.0483 2.54126 11.073C2.57472 11.0977 2.60925 11.1208 2.64487 11.1423C2.68048 11.1637 2.71702 11.1835 2.75448 11.2016C2.79195 11.2196 2.83017 11.2359 2.86916 11.2503C2.90814 11.2648 2.94772 11.2775 2.98788 11.2882C3.02805 11.299 3.06863 11.3079 3.10963 11.3149C3.15063 11.3218 3.19186 11.3269 3.23333 11.33L3.33333 11.3333L5.33333 11.3333L5.33333 12.6667L3.33333 12.6667C3.246 12.6667 3.15887 12.6624 3.07195 12.6538C2.98504 12.6453 2.89875 12.6325 2.81309 12.6154C2.72743 12.5984 2.64282 12.5772 2.55924 12.5518C2.47566 12.5265 2.39353 12.4971 2.31284 12.4637C2.23216 12.4303 2.1533 12.393 2.07627 12.3518C1.99925 12.3106 1.92443 12.2658 1.85181 12.2173C1.77919 12.1687 1.70913 12.1168 1.64162 12.0614C1.57411 12.006 1.50947 11.9474 1.44771 11.8856C1.38596 11.8239 1.32738 11.7592 1.27197 11.6917C1.21657 11.6242 1.1646 11.5541 1.11608 11.4815C1.06756 11.4089 1.02271 11.3341 0.981543 11.2571C0.940373 11.18 0.903077 11.1012 0.869654 11.0205C0.836232 10.9398 0.806845 10.8577 0.781492 10.7741C0.75614 10.6905 0.734944 10.6059 0.717906 10.5202C0.700867 10.4346 0.688068 10.3483 0.679507 10.2614C0.670947 10.1745 0.666666 10.0873 0.666666 10L0.666666 8.66667L2 8.66667L2 8.66667ZM10.6667 5.33333L13.6 12.6667L12.1633 12.6667L11.3627 10.6667L8.636 10.6667L7.83667 12.6667L6.40067 12.6667L9.33333 5.33333L10.6667 5.33333L10.6667 5.33333ZM10 7.25667L9.16867 9.33333L10.83 9.33333L10 7.25667ZM4 0L4 1.33333L6.66667 1.33333L6.66667 6L4 6L4 8L2.66667 8L2.66667 6L0 6L0 1.33333L2.66667 1.33333L2.66667 0L4 0ZM10 0.666667C10.0873 0.666667 10.1745 0.670947 10.2614 0.679507C10.3483 0.688068 10.4346 0.700867 10.5202 0.717906C10.6059 0.734944 10.6905 0.75614 10.7741 0.781492C10.8577 0.806845 10.9398 0.836232 11.0205 0.869654C11.1012 0.903077 11.18 0.940373 11.2571 0.981543C11.3341 1.02271 11.4089 1.06756 11.4815 1.11608C11.5541 1.1646 11.6242 1.21657 11.6917 1.27197C11.7592 1.32738 11.8239 1.38596 11.8856 1.44772C11.9474 1.50947 12.006 1.57411 12.0614 1.64162C12.1168 1.70913 12.1687 1.77919 12.2173 1.85181C12.2658 1.92443 12.3106 1.99925 12.3518 2.07628C12.393 2.1533 12.4303 2.23216 12.4637 2.31284C12.4971 2.39353 12.5265 2.47566 12.5518 2.55924C12.5772 2.64282 12.5984 2.72743 12.6154 2.81309C12.6325 2.89875 12.6453 2.98504 12.6538 3.07195C12.6624 3.15887 12.6667 3.246 12.6667 3.33333L12.6667 4.66667L11.3333 4.66667L11.3333 3.33333C11.3333 3.28966 11.3312 3.2461 11.3269 3.20264C11.3226 3.15919 11.3162 3.11604 11.3077 3.07321C11.2992 3.03038 11.2886 2.98807 11.2759 2.94629C11.2632 2.9045 11.2486 2.86343 11.2318 2.82309C11.2151 2.78274 11.1965 2.74332 11.1759 2.7048C11.1553 2.66629 11.1329 2.62888 11.1086 2.59257C11.0844 2.55626 11.0584 2.52123 11.0307 2.48748C11.003 2.45372 10.9737 2.4214 10.9428 2.39052C10.9119 2.35965 10.8796 2.33036 10.8459 2.30265C10.8121 2.27495 10.7771 2.24897 10.7408 2.22471C10.7045 2.20045 10.667 2.17802 10.6285 2.15744C10.59 2.13685 10.5506 2.1182 10.5102 2.10149C10.4699 2.08478 10.4288 2.07009 10.387 2.05741C10.3453 2.04474 10.303 2.03414 10.2601 2.02562C10.2173 2.0171 10.1741 2.0107 10.1307 2.00642C10.0872 2.00214 10.0437 2 10 2L8 2L8 0.666667L10 0.666667L10 0.666667ZM2.66667 2.66667L1.33333 2.66667L1.33333 4.66667L2.66667 4.66667L2.66667 2.66667ZM5.33333 2.66667L4 2.66667L4 4.66667L5.33333 4.66667L5.33333 2.66667Z" fill="rgb(95,101,108)" fill-rule="nonzero" />
</svg>
差异被折叠。
<svg viewBox="0 0 16 14" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16.000000" height="14.000000" fill="none">
<rect id="降序 1" width="16.000000" height="14.000000" x="0.000000" y="0.000000" />
<path id="矢量 469" d="M5.19867 14C5.1619 14 5.12548 13.9955 5.08942 13.9865C5.05336 13.9776 5.01834 13.9643 4.98437 13.9467C4.9504 13.9291 4.91813 13.9076 4.88755 13.882C4.85698 13.8565 4.82869 13.8275 4.80269 13.795C4.77669 13.7625 4.75348 13.7271 4.73305 13.6889C4.71262 13.6507 4.69537 13.6103 4.6813 13.5679C4.66723 13.5254 4.65661 13.4816 4.64943 13.4366C4.64226 13.3915 4.63867 13.346 4.63867 13.3L4.63867 0.7C4.63867 0.654037 4.64226 0.608516 4.64943 0.563437C4.65661 0.518357 4.66723 0.474586 4.6813 0.432122C4.69537 0.389658 4.71262 0.349317 4.73305 0.311101C4.75348 0.272884 4.77669 0.237526 4.80269 0.205025C4.82869 0.172525 4.85698 0.143507 4.88755 0.117971C4.91813 0.0924358 4.9504 0.0708735 4.98437 0.0532843C5.01834 0.0356952 5.05336 0.0224172 5.08942 0.0134503C5.12548 0.00448343 5.1619 0 5.19867 0C5.23544 0 5.27186 0.00448343 5.30792 0.0134503C5.34399 0.0224172 5.379 0.0356952 5.41297 0.0532843C5.44695 0.0708735 5.47922 0.0924358 5.50979 0.117971C5.54036 0.143507 5.56865 0.172525 5.59465 0.205025C5.62065 0.237526 5.64387 0.272884 5.66429 0.311101C5.68472 0.349317 5.70197 0.389658 5.71604 0.432122C5.73012 0.474586 5.74074 0.518357 5.74791 0.563437C5.75508 0.608516 5.75867 0.654037 5.75867 0.7L5.75867 13.3C5.75867 13.346 5.75508 13.3915 5.74791 13.4366C5.74074 13.4816 5.73012 13.5254 5.71604 13.5679C5.70197 13.6103 5.68472 13.6507 5.66429 13.6889C5.64387 13.7271 5.62065 13.7625 5.59465 13.795C5.56865 13.8275 5.54036 13.8565 5.50979 13.882C5.47922 13.9076 5.44695 13.9291 5.41297 13.9467C5.379 13.9643 5.34399 13.9776 5.30792 13.9865C5.27186 13.9955 5.23544 14 5.19867 14L5.19867 14ZM11.1963 10.297L8.39627 13.797C8.34144 13.8593 8.27984 13.9083 8.21147 13.944C8.1433 13.979 8.07237 13.9965 7.99867 13.9965C7.92498 13.9965 7.85404 13.979 7.78587 13.944C7.71745 13.9085 7.65705 13.858 7.60467 13.7925C7.55228 13.727 7.51188 13.6515 7.48347 13.566C7.4545 13.481 7.43957 13.3924 7.43867 13.3L7.43867 0.7C7.43867 0.654037 7.44226 0.608516 7.44943 0.563437C7.4566 0.518357 7.46723 0.474586 7.4813 0.432122C7.49537 0.389658 7.51262 0.349317 7.53305 0.311101C7.55348 0.272884 7.57669 0.237526 7.60269 0.205025C7.62869 0.172525 7.65698 0.143507 7.68755 0.117971C7.71813 0.0924358 7.7504 0.0708735 7.78437 0.0532843C7.81834 0.0356952 7.85336 0.0224172 7.88942 0.0134503C7.92548 0.00448343 7.9619 0 7.99867 0C8.03544 0 8.07186 0.00448343 8.10792 0.0134503C8.14399 0.0224172 8.179 0.0356952 8.21297 0.0532843C8.24694 0.0708735 8.27922 0.0924358 8.30979 0.117971C8.34036 0.143507 8.36865 0.172525 8.39465 0.205025C8.42065 0.237526 8.44387 0.272884 8.46429 0.311101C8.48472 0.349317 8.50197 0.389658 8.51604 0.432122C8.53012 0.474586 8.54074 0.518357 8.54791 0.563437C8.55509 0.608516 8.55867 0.654037 8.55867 0.7L8.55867 11.613L10.4011 9.303C10.4272 9.27036 10.4556 9.24123 10.4863 9.21559C10.517 9.18995 10.5494 9.1683 10.5835 9.15064C10.6176 9.13298 10.6528 9.11964 10.689 9.11064C10.7252 9.10164 10.7618 9.09713 10.7987 9.09713C10.8356 9.09713 10.8722 9.10164 10.9084 9.11064C10.9446 9.11964 10.9797 9.13298 11.0139 9.15064C11.048 9.1683 11.0804 9.18995 11.1111 9.21559C11.1418 9.24123 11.1702 9.27036 11.1963 9.303C11.2224 9.33563 11.2457 9.37114 11.2662 9.40951C11.2867 9.44788 11.304 9.48839 11.3182 9.53102C11.3323 9.57366 11.343 9.61761 11.3502 9.66288C11.3574 9.70814 11.361 9.75385 11.361 9.8C11.361 9.84615 11.3574 9.89186 11.3502 9.93712C11.343 9.98238 11.3323 10.0263 11.3182 10.069C11.304 10.1116 11.2867 10.1521 11.2662 10.1905C11.2457 10.2289 11.2224 10.2644 11.1963 10.297L11.1963 10.297Z" fill="rgb(95,101,108)" fill-rule="nonzero" />
</svg>
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16.000000" height="16.000000" fill="none" customFrame="#000000">
<rect id="Line/Download" width="16.000000" height="16.000000" x="0.000000" y="0.000000" />
<path id="形状" d="M7.90156 10.3281C7.95156 10.3922 8.04844 10.3922 8.09844 10.3281L9.84844 8.11406C9.9125 8.03281 9.85469 7.9125 9.75 7.9125L8.59219 7.9125L8.59219 2.625C8.59219 2.55625 8.53594 2.5 8.46719 2.5L7.52969 2.5C7.46094 2.5 7.40469 2.55625 7.40469 2.625L7.40469 7.91094L6.25 7.91094C6.14531 7.91094 6.0875 8.03125 6.15156 8.1125L7.90156 10.3281ZM12.7812 9.78125L13.7188 9.78125C13.7875 9.78125 13.8438 9.8375 13.8438 9.90625L13.8438 13C13.8438 13.2766 13.6203 13.5 13.3438 13.5L2.65625 13.5C2.37969 13.5 2.15625 13.2766 2.15625 13L2.15625 9.90625C2.15625 9.8375 2.2125 9.78125 2.28125 9.78125L3.21875 9.78125C3.2875 9.78125 3.34375 9.8375 3.34375 9.90625L3.34375 12.3125L12.6562 12.3125L12.6562 9.90625C12.6562 9.8375 12.7125 9.78125 12.7812 9.78125Z" fill="rgb(95,101,108)" fill-rule="evenodd" />
</svg>
<svg viewBox="0 0 12.7275 12.7266" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.727539" height="12.726562" fill="none" customFrame="#000000">
<path id="合并" d="M5 4L5 0L4 0L4 4L0 4L0 5L4 5L4 9L5 9L5 5L9 5L9 4L5 4Z" fill="rgb(5,95,194)" fill-rule="evenodd" transform="matrix(0.707107,-0.707107,0.707107,0.707107,0,6.36328)" />
</svg>
<template>
<div class="wrapper">
<div class="text text-tip-1">{{ tagName }}</div>
<div class="icon" @click="handleClose">
<img src="./close.svg" alt="">
</div>
</div>
</template>
<script setup>
const props = defineProps({
tagName: {
type: String,
default: ''
}
})
const emit = defineEmits(['close'])
const handleClose = () => {
emit('close')
}
</script>
<style lang="scss" scoped>
.wrapper{
height: 30px;
box-sizing: border-box;
display: flex;
padding: 3px 4px 3px 8px;
align-items: center;
justify-content: flex-start;
gap: 4px;
border-radius: 4px;
border: 1px solid var(--color-primary-35);
background: var(--color-primary-2);
cursor: pointer;
.text{
color: var(--color-primary-100);
}
.icon{
width: 15px;
height: 15px;
img{
width: 100%;
height: 100%;
}
}
}
</style>
\ No newline at end of file
import * as echarts from "echarts";
const getBarChart = (data) => {
const option = {
tooltip: {},
grid: {
top: 48,
right: 34,
bottom: 10,
left: 24,
containLabel: true
},
yAxis: {
type: 'value',
splitLine: {
show: true,
lineStyle: {
color: ['#DEE2E7'], // 线条颜色,可以是数组,用于不同间隔交替颜色
width: 1, // 线宽
type: 'dashed', // 类型:'solid'(实线), 'dashed'(虚线), 'dotted'(点线)
// opacity: 0.6 // 透明度
}
},
axisLine: {
show: false,
lineStyle: {
color: 'rgba(95, 101, 108, 1)',
}
},
show: true,
textStyle: {
color: 'rgba(95, 101, 108, 1)',
fontFamily: 'Microsoft YaHei',
fontsize: 14,
}
},
xAxis: {
type: 'category',
data: data.dataX,
splitLine: {
show: false
},
axisTick: {
show: true
},
axisLine: {
show: true,
lineStyle: {
color: '#e7f3ff',
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(95, 101, 108, 1)',
fontFamily: 'Microsoft YaHei',
fontsize: 14,
}
}
},
series: [{
type: 'bar',
data: data.dataY,
label: {
show: true,
position: 'top',
color: 'rgb(59, 65, 75)',
fontWeight: 'regular', // 文字加粗
fontSize: 16,
fontFamily: 'Source Han Sans CN',
formatter: function (params) {
return params.value
},
},
barWidth: 20,
itemStyle: {
color: function (params) {
return new echarts.graphic.LinearGradient(0, 1, 0, 0,
[{
offset: 0,
color: 'rgba(10, 87, 166, 0)'
},
{
offset: 1,
color: 'rgba(5, 95, 194, 1)'
}
]);
},
// barBorderRadius: 10,
}
}]
}
return option
}
export default getBarChart
\ No newline at end of file
<template>
<div class="bar-chart-wrapper" id="bar-chart"></div>
</template>
<script setup>
import { ref, onMounted, nextTick } from 'vue'
import setChart from '@/utils/setChart';
import getBarChart from './barchart';
const props = defineProps({
barChartData: {
type: Array,
default: [
]
}
})
onMounted(() => {
const barChart = getBarChart(props.barChartData)
setChart(barChart, 'bar-chart', )
})
</script>
<style lang="scss">
.bar-chart-wrapper {
width: 100%;
height: 100%;
}
</style>
\ No newline at end of file
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.000000" height="32.000000" fill="none" customFrame="#000000">
<rect id="排行" width="32.000000" height="32.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M9 7C9.55228 7 10 7.44772 10 8L10 24C10 24.5523 9.55228 25 9 25L8 25C7.44772 25 7 24.5523 7 24L7 8C7 7.44772 7.44772 7 8 7L9 7ZM14 12C14.5523 12 15 12.4477 15 13L15 24C15 24.5523 14.5523 25 14 25L13 25C12.4477 25 12 24.5523 12 24L12 13C12 12.4477 12.4477 12 13 12L14 12ZM19 17C19.5523 17 20 17.4477 20 18L20 24C20 24.5523 19.5523 25 19 25L18 25C17.4477 25 17 24.5523 17 24L17 18C17 17.4477 17.4477 17 18 17L19 17ZM24 20C24.5523 20 25 20.4477 25 21L25 24C25 24.5523 24.5523 25 24 25L23 25C22.4477 25 22 24.5523 22 24L22 21C22 20.4477 22.4477 20 23 20L24 20Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
</svg>
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.000000" height="32.000000" fill="none" customFrame="#000000">
<rect id="排行" width="32.000000" height="32.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M9 7C9.55228 7 10 7.44772 10 8L10 24C10 24.5523 9.55228 25 9 25L8 25C7.44772 25 7 24.5523 7 24L7 8C7 7.44772 7.44772 7 8 7L9 7ZM14 12C14.5523 12 15 12.4477 15 13L15 24C15 24.5523 14.5523 25 14 25L13 25C12.4477 25 12 24.5523 12 24L12 13C12 12.4477 12.4477 12 13 12L14 12ZM19 17C19.5523 17 20 17.4477 20 18L20 24C20 24.5523 19.5523 25 19 25L18 25C17.4477 25 17 24.5523 17 24L17 18C17 17.4477 17.4477 17 18 17L19 17ZM24 20C24.5523 20 25 20.4477 25 21L25 24C25 24.5523 24.5523 25 24 25L23 25C22.4477 25 22 24.5523 22 24L22 21C22 20.4477 22.4477 20 23 20L24 20Z" fill="rgb(170,173,177)" fill-rule="evenodd" />
</svg>
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.000000" height="32.000000" fill="none">
<defs>
<clipPath id="clipPath_0">
<rect width="18.000000" height="15.000000" x="7.000000" y="7.000000" fill="rgb(255,255,255)" />
</clipPath>
</defs>
<rect id="收藏按钮" width="32.000000" height="32.000000" x="0.000000" y="0.000000" />
<g id="容器 742" customFrame="url(#clipPath_0)">
<rect id="容器 742" width="18.000000" height="15.000000" x="7.000000" y="7.000000" />
<rect id="矩形 347" width="2.000000" height="6.000000" x="15.000000" y="7.000000" fill="rgb(132,136,142)" />
<path id="矢量 600" d="M20 13L12 13L16 18L20 13Z" fill="rgb(132,136,142)" fill-rule="evenodd" />
<path id="矢量 601" d="M24 21.9996L24.9999 17.0012L21.9999 14.0011L20.9999 14L23.0003 17.001L19.9999 17.0015L18.9998 19.9987L16 19.9996L13.0001 19.9997L12 17.002L9.00017 17.0028L11 14.0008L10 14.0004L7 17.0023L8.00016 22L24 21.9996Z" fill="rgb(132,136,142)" fill-rule="evenodd" />
</g>
</svg>
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.000000" height="32.000000" fill="none" customFrame="#000000">
<rect id="折线图" width="32.000000" height="32.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M24.5419 8.84013L17.1957 13.5768C17.0388 13.678 16.867 13.7311 16.6804 13.736C16.4938 13.741 16.3194 13.6972 16.1573 13.6045L12.0821 11.274L8.50424 13.3633C8.02065 13.6457 7.41881 13.4877 7.13642 13.0041C6.85402 12.5205 7.0121 11.9187 7.49568 11.6363L11.5725 9.25552C11.7269 9.16537 11.8935 9.11988 12.0723 9.11907C12.2511 9.11826 12.418 9.16223 12.5732 9.25098L16.6226 11.5666L23.4581 7.15925C23.9287 6.85578 24.537 6.98714 24.8404 7.45779C25.1439 7.92844 25.0125 8.53667 24.5419 8.84013ZM8.00352 17.6827L11.5804 15.6372C11.888 15.4613 12.2657 15.4613 12.5733 15.6372L16.1169 17.6636C16.4459 17.8517 16.853 17.8377 17.1683 17.6273L22.9449 13.7732C23.6095 13.3299 24.4999 13.8062 24.4999 14.6051L24.4999 23.5008C24.4999 24.0531 24.0522 24.5008 23.4999 24.5008L8.49997 24.501C7.94768 24.501 7.49996 24.0533 7.49996 23.501L7.49993 18.5507C7.49993 18.192 7.6921 17.8607 8.00352 17.6827Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
</svg>
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.000000" height="32.000000" fill="none" customFrame="#000000">
<rect id="折线图" width="32.000000" height="32.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M24.5419 8.84013L17.1957 13.5768C17.0388 13.678 16.867 13.7311 16.6804 13.736C16.4938 13.741 16.3194 13.6972 16.1573 13.6045L12.0821 11.274L8.50424 13.3633C8.02065 13.6457 7.41881 13.4877 7.13642 13.0041C6.85402 12.5205 7.0121 11.9187 7.49568 11.6363L11.5725 9.25552C11.7269 9.16537 11.8935 9.11988 12.0723 9.11907C12.2511 9.11826 12.418 9.16223 12.5732 9.25098L16.6226 11.5666L23.4581 7.15925C23.9287 6.85578 24.537 6.98714 24.8404 7.45779C25.1439 7.92844 25.0125 8.53667 24.5419 8.84013ZM8.00352 17.6827L11.5804 15.6372C11.888 15.4613 12.2657 15.4613 12.5733 15.6372L16.1169 17.6636C16.4459 17.8517 16.853 17.8377 17.1683 17.6273L22.9449 13.7732C23.6095 13.3299 24.4999 13.8062 24.4999 14.6051L24.4999 23.5008C24.4999 24.0531 24.0522 24.5008 23.4999 24.5008L8.49997 24.501C7.94768 24.501 7.49996 24.0533 7.49996 23.501L7.49993 18.5507C7.49993 18.192 7.6921 17.8607 8.00352 17.6827Z" fill="rgb(170,173,177)" fill-rule="evenodd" />
</svg>
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.000000" height="32.000000" fill="none" customFrame="#000000">
<rect id="环形图" width="32.000000" height="32.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M24.7648 13.9444C25.2033 15.8248 25.0255 17.7965 24.2576 19.5681C23.6227 21.0327 22.6124 22.2963 21.3365 23.2358C20.8918 23.5633 20.2761 23.3951 20 22.9168L18.75 20.7518C18.4739 20.2735 18.6479 19.6688 19.0536 19.294C19.5109 18.8715 19.8783 18.3562 20.1288 17.7784C20.5128 16.8925 20.6017 15.9067 20.3824 14.9665C20.1631 14.0263 19.6472 13.1815 18.911 12.557C18.4307 12.1495 17.8732 11.8499 17.2762 11.6734C16.7466 11.5167 16.323 11.0515 16.359 10.5003L16.5222 8.00568C16.5583 7.45457 17.036 7.03139 17.5797 7.12833C19.1396 7.40643 20.6047 8.09274 21.822 9.12533C23.2945 10.3744 24.3262 12.0639 24.7648 13.9444ZM7.30579 13.6625C7.07063 14.5415 6.97061 15.4491 7.00743 16.3544C7.02988 16.9062 7.54601 17.2816 8.09195 17.1981L10.5632 16.8201C11.1092 16.7366 11.4723 16.2227 11.5112 15.6718C11.5313 15.3866 11.5786 15.1032 11.6529 14.8256C11.8137 14.2247 12.0972 13.6637 12.4857 13.1779C12.8742 12.6922 13.3592 12.2923 13.91 12.0034C14.1646 11.8699 14.4306 11.7615 14.7044 11.6791C15.2333 11.5201 15.6549 11.053 15.6163 10.502L15.4419 8.0081C15.4034 7.45717 14.9238 7.03614 14.3805 7.13552C13.4893 7.29855 12.6258 7.59559 11.8201 8.01817C10.7184 8.59592 9.74843 9.39579 8.97144 10.3673C8.19446 11.3388 7.62731 12.4608 7.30579 13.6625ZM12.0819 24.091C10.9656 23.5512 9.973 22.7866 9.16618 21.8451C8.57678 21.1574 8.09583 20.3861 7.7381 19.5581C7.51906 19.0511 7.82141 18.4891 8.34956 18.3276L10.7403 17.5967C11.2685 17.4352 11.8185 17.7408 12.0924 18.2204C12.2332 18.4669 12.3974 18.7002 12.5831 18.9169C12.9865 19.3876 13.4828 19.7699 14.0409 20.0398C14.599 20.3097 15.2069 20.4613 15.8264 20.4853C16.1115 20.4963 16.3964 20.4801 16.677 20.4374C17.223 20.3543 17.8041 20.5957 18.0055 21.1099L18.9171 23.4378C19.1185 23.9521 18.8657 24.5381 18.3322 24.6812C17.4611 24.9149 16.5578 25.0169 15.6528 24.9819C14.4138 24.9341 13.1981 24.6308 12.0819 24.091Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
</svg>
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.000000" height="32.000000" fill="none" customFrame="#000000">
<rect id="环形图" width="32.000000" height="32.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M24.7648 13.9444C25.2033 15.8248 25.0255 17.7965 24.2576 19.5681C23.6227 21.0327 22.6124 22.2963 21.3365 23.2358C20.8918 23.5633 20.2761 23.3951 20 22.9168L18.75 20.7518C18.4739 20.2735 18.6479 19.6688 19.0536 19.294C19.5109 18.8715 19.8783 18.3562 20.1288 17.7784C20.5128 16.8925 20.6017 15.9067 20.3824 14.9665C20.1631 14.0263 19.6472 13.1815 18.911 12.557C18.4307 12.1495 17.8732 11.8499 17.2762 11.6734C16.7466 11.5167 16.323 11.0515 16.359 10.5003L16.5222 8.00568C16.5583 7.45457 17.036 7.03139 17.5797 7.12833C19.1396 7.40643 20.6047 8.09274 21.822 9.12533C23.2945 10.3744 24.3262 12.0639 24.7648 13.9444ZM7.30579 13.6625C7.07063 14.5415 6.97061 15.4491 7.00743 16.3544C7.02988 16.9062 7.54601 17.2816 8.09195 17.1981L10.5632 16.8201C11.1092 16.7366 11.4723 16.2227 11.5112 15.6718C11.5313 15.3866 11.5786 15.1032 11.6529 14.8256C11.8137 14.2247 12.0972 13.6637 12.4857 13.1779C12.8742 12.6922 13.3592 12.2923 13.91 12.0034C14.1646 11.8699 14.4306 11.7615 14.7044 11.6791C15.2333 11.5201 15.6549 11.053 15.6163 10.502L15.4419 8.0081C15.4034 7.45717 14.9238 7.03614 14.3805 7.13552C13.4893 7.29855 12.6258 7.59559 11.8201 8.01817C10.7184 8.59592 9.74843 9.39579 8.97144 10.3673C8.19446 11.3388 7.62731 12.4608 7.30579 13.6625ZM12.0819 24.091C10.9656 23.5512 9.973 22.7866 9.16618 21.8451C8.57678 21.1574 8.09583 20.3861 7.7381 19.5581C7.51906 19.0511 7.82141 18.4891 8.34956 18.3276L10.7403 17.5967C11.2685 17.4352 11.8185 17.7408 12.0924 18.2204C12.2332 18.4669 12.3974 18.7002 12.5831 18.9169C12.9865 19.3876 13.4828 19.7699 14.0409 20.0398C14.599 20.3097 15.2069 20.4613 15.8264 20.4853C16.1115 20.4963 16.3964 20.4801 16.677 20.4374C17.223 20.3543 17.8041 20.5957 18.0055 21.1099L18.9171 23.4378C19.1185 23.9521 18.8657 24.5381 18.3322 24.6812C17.4611 24.9149 16.5578 25.0169 15.6528 24.9819C14.4138 24.9341 13.1981 24.6308 12.0819 24.091Z" fill="rgb(170,173,177)" fill-rule="evenodd" />
</svg>
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.000000" height="32.000000" fill="none" customFrame="#000000">
<rect id="容器 1716" width="32.000000" height="32.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M24.9229 13.317C25.2734 13.5717 25.42 14.023 25.2862 14.4351L22.1025 24.2334C21.9686 24.6455 21.5846 24.9244 21.1514 24.9244L10.8488 24.9244C10.4156 24.9244 10.0316 24.6455 9.89773 24.2334L6.71405 14.4351C6.58018 14.023 6.72683 13.5717 7.07732 13.317L15.4123 7.2613C15.7628 7.00665 16.2374 7.00665 16.5879 7.2613L24.9229 13.317ZM22.0701 14.2438C22.4206 14.4985 22.5672 14.9498 22.4334 15.3618L20.3395 21.8061C20.2056 22.2181 19.8217 22.4971 19.3884 22.4971L12.6125 22.4971C12.1793 22.4971 11.7954 22.2181 11.6615 21.8061L9.56761 15.3618C9.43373 14.9498 9.58039 14.4985 9.93088 14.2438L15.4127 10.261C15.7632 10.0064 16.2378 10.0064 16.5883 10.261L22.0701 14.2438ZM20.5313 15.9799C20.6651 15.5679 20.5185 15.1165 20.168 14.8618L16.5883 12.261C16.2378 12.0064 15.7632 12.0064 15.4127 12.261L11.833 14.8618C11.4825 15.1165 11.3358 15.5679 11.4697 15.9799L12.837 20.1881C12.9709 20.6001 13.3549 20.8791 13.7881 20.8791L18.2129 20.8791C18.6461 20.8791 19.0301 20.6001 19.1639 20.1881L20.5313 15.9799Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
</svg>
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.000000" height="32.000000" fill="none" customFrame="#000000">
<rect id="容器 1716" width="32.000000" height="32.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M24.9229 13.317C25.2734 13.5717 25.42 14.023 25.2862 14.4351L22.1025 24.2334C21.9686 24.6455 21.5846 24.9244 21.1514 24.9244L10.8488 24.9244C10.4156 24.9244 10.0316 24.6455 9.89773 24.2334L6.71405 14.4351C6.58018 14.023 6.72683 13.5717 7.07732 13.317L15.4123 7.2613C15.7628 7.00665 16.2374 7.00665 16.5879 7.2613L24.9229 13.317ZM22.0701 14.2438C22.4206 14.4985 22.5672 14.9498 22.4334 15.3618L20.3395 21.8061C20.2056 22.2181 19.8217 22.4971 19.3884 22.4971L12.6125 22.4971C12.1793 22.4971 11.7954 22.2181 11.6615 21.8061L9.56761 15.3618C9.43373 14.9498 9.58039 14.4985 9.93088 14.2438L15.4127 10.261C15.7632 10.0064 16.2378 10.0064 16.5883 10.261L22.0701 14.2438ZM20.5313 15.9799C20.6651 15.5679 20.5185 15.1165 20.168 14.8618L16.5883 12.261C16.2378 12.0064 15.7632 12.0064 15.4127 12.261L11.833 14.8618C11.4825 15.1165 11.3358 15.5679 11.4697 15.9799L12.837 20.1881C12.9709 20.6001 13.3549 20.8791 13.7881 20.8791L18.2129 20.8791C18.6461 20.8791 19.0301 20.6001 19.1639 20.1881L20.5313 15.9799Z" fill="rgb(170,173,177)" fill-rule="evenodd" />
</svg>
<template>
<div class="chart-wrapper">
<div class="header">
<div class="header-left">
<div class="chart-item" v-for="item, index in chartItemList" :key="index" @click="handleClickChartItem(item)">
<img v-if="!item.active" :src="item.icon" alt="">
<img v-else :src="item.activeIcon" alt="">
</div>
</div>
<div class="header-center text-title-3-bold">{{ chartTitle }}</div>
<div class="header-right">
<img src="./assets/icons/download.svg" alt="">
</div>
</div>
<div class="main">
<div class="chart-box">
<slot name="chart-box"></slot>
</div>
<div class="tip-box">
<TipTab />
</div>
</div>
</div>
</template>
<script setup>
import { ref, computed, onMounted, nextTick } from 'vue'
import Line from './assets/icons/line.svg'
import LineActive from './assets/icons/line-active.svg'
import Bar from './assets/icons/bar.svg'
import BarActive from './assets/icons/bar-active.svg'
import Pie from './assets/icons/pie.svg'
import PieActive from './assets/icons/pie-active.svg'
import Radar from './assets/icons/radar.svg'
import RadarActive from './assets/icons/radar-active.svg'
import TipTab from '@/components/base/TipTab/index.vue'
const defaultChartTypeList = [
{
name: '折线图',
active: false,
icon: Line,
activeIcon: LineActive
},
{
name: '柱状图',
active: false,
icon: Bar,
activeIcon: BarActive
},
{
name: '饼状图',
active: false,
icon: Pie,
activeIcon: PieActive
},
{
name: '雷达图',
active: false,
icon: Radar,
activeIcon: RadarActive
},
]
const emit = defineEmits('clickChartItem')
const handleClickChartItem = (item) => {
chartItemList.value.forEach(chart => {
chart.active = false
})
item.active = true
emit('clickChartItem', item)
}
const props = defineProps({
chartTitle: {
type: String,
default: ''
},
chartTypeList : {
type: Array,
default: []
}
})
const chartItemList = computed(() => {
let arr = []
props.chartTypeList.forEach(item => {
defaultChartTypeList.forEach(val => {
if(val.name === item) {
arr.push(val)
}
})
})
arr.forEach(item => {
item.active = false
})
arr[0].active = true
return arr
})
// nextTick(() => {
// let arr = chartItemList.value.filter(item => item.active)
// if(!arr.length) {
// alert(1)
// chartItemList.value[0].active = true
// }
// })
</script>
<style lang="scss" scoped>
.chart-wrapper {
width: 1520px;
height: 682px;
border-radius: 10px;
border: 1px solid var(--bg-black-5);
.header {
height: 48px;
border-bottom: 1px solid var(--bg-black-5);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 13px 0 16px;
position: relative;
.header-left {
width: 152px;
height: 32px;
display: flex;
gap: 8px;
.chart-item {
width: 32px;
height: 32px;
border-radius: 4px;
cursor: pointer;
&:hover {
background: var(--color-primary-2);
}
img {
width: 100%;
height: 100%;
}
}
}
.header-center {
position: absolute;
width: 1120px;
height: 24px;
text-align: center;
left: 200px;
top: 12px;
color: var(--text-primary-80-color);
}
.header-right {
width: 32px;
height: 32px;
cursor: pointer;
img {
width: 100%;
height: 100%;
}
}
}
.main {
.chart-box {
width: 1520px;
height: 580px;
}
.tip-box {
height: 54px;
box-sizing: border-box;
padding-top: 10px;
// background: orange;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="wrapper">
<div class="left">
<div class="left-text text-tip-1">{{ '统计维度:' }}</div>
<div class="left-list">
<ActionButton v-for="item, index in list" :key="index" :name="item.name"
:type="item.active ? 'active' : 'normal'" @click="handleClickItem(item)" />
</div>
</div>
<div class="right">
<slot name="chart-header-right"></slot>
</div>
</div>
</template>
<script setup>
import ActionButton from '@/components/base/ActionButton/index.vue'
const props = defineProps({
list: {
type: Array,
default: [
]
}
})
const emit = defineEmits(['clickItem'])
const handleClickItem = (item) => {
emit('clickItem', item)
}
</script>
<style lang="scss" scoped>
.wrapper {
width: 1520px;
height: 28px;
display: flex;
justify-content: space-between;
align-items: center;
.left {
display: flex;
gap: 8px;
align-items: center;
justify-content: flex-start;
.left-text {
color: var(--text-primary-80-color);
}
.left-list {
display: flex;
gap: 8px;
align-items: center;
justify-content: flex-start;
}
}
}
</style>
\ No newline at end of file
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16.000000" height="16.000000" fill="none" customFrame="#000000">
<rect id="Line/Up" width="16.000000" height="16.000000" x="0.000000" y="0.000000" transform="matrix(1,0,0,-1,0,16)" />
<path id="路径" d="M11.852 7.80156L6.34264 0.20625C6.14264 -0.06875 5.73327 -0.06875 5.53483 0.20625L0.0238932 7.80156C-0.0354818 7.88438 0.0223307 8 0.125456 8L1.29733 8C1.37702 8 1.45202 7.96094 1.49889 7.89687L5.93796 1.77813L10.377 7.89687C10.4239 7.96094 10.4989 8 10.5786 8L11.7505 8C11.852 8 11.9114 7.88438 11.852 7.80156L11.852 7.80156Z" fill="rgb(5,95,194)" fill-rule="evenodd" transform="matrix(1,0,0,-1,2.0625,12)" />
</svg>
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16.000000" height="16.000000" fill="none" customFrame="#000000">
<rect id="Line/Up" width="16.000000" height="16.000000" x="0.000000" y="0.000000" />
<path id="路径" d="M13.9145 11.8016L8.40514 4.20625C8.20514 3.93125 7.79577 3.93125 7.59733 4.20625L2.08639 11.8016C2.02702 11.8844 2.08483 12 2.18796 12L3.35983 12C3.43952 12 3.51452 11.9609 3.56139 11.8969L8.00046 5.77812L12.4395 11.8969C12.4864 11.9609 12.5614 12 12.6411 12L13.813 12C13.9145 12 13.9739 11.8844 13.9145 11.8016L13.9145 11.8016Z" fill="rgb(5,95,194)" fill-rule="evenodd" />
</svg>
<template>
<div class="wrapper">
<div class="show" @click="handleSwitchShowAll">
<div class="text text-compact">{{ isShowAll ? '收起' : '展开全部' }}</div>
<div class="icon">
<img v-if="isShowAll" src="./arrow-up.svg" alt="">
<img v-else src="./arrow-down.svg" alt="">
</div>
</div>
<div class="clear text-tip-1" @click="handleClear">
{{ '清空条件' }}
</div>
<div class="confirm text-tip-1" @click="handleConfirm">
{{ '确定' }}
</div>
</div>
</template>
<script setup>
import {ref} from 'vue'
const props = defineProps({
isShowAll: {
type: Boolean,
default: false
}
})
const handleSwitchShowAll = () => {
emit('showAll')
}
const emit = defineEmits(['showAll', 'clear', 'confirm'])
const handleClear = () => {
emit('clear')
}
const handleConfirm = () => {
emit('confirm')
}
</script>
<style lang="scss" scoped>
.wrapper {
height: 36px;
display: flex;
gap: 12px;
justify-content: flex-end;
align-items: center;
.show {
display: flex;
justify-content: center;
align-items: center;
gap: 4px;
cursor: pointer;
.text {
color: var(--color-primary-100);
}
.icon {
width: 16px;
height: 16px;
img {
width: 100%;
height: 100%;
}
}
}
.clear {
width: 98px;
height: 36px;
border-radius: 4px;
box-sizing: border-box;
border: 1px solid var(--bg-black-10);
text-align: center;
padding: 6px 16px;
color: var(--text-primary-65-color);
cursor: pointer;
}
.confirm {
width: 150px;
height: 36px;
border-radius: 4px;
box-sizing: border-box;
padding: 6px 59px;
background: var(--color-primary-100);
color: var(--bg-white-100);
text-align: center;
cursor: pointer;
}
}
</style>
\ No newline at end of file
<template>
<div class="line-chart-wrapper" id="line-chart"></div>
</template>
<script setup>
import { ref, onMounted, nextTick } from 'vue'
import setChart from '@/utils/setChart';
import getLineChart from './lineChart';
const props = defineProps({
lineChartData: {
type: Object,
default: {
dataX: [],
dataY: []
}
}
})
onMounted(() => {
const lineChart = getLineChart(props.lineChartData.dataX, props.lineChartData.dataY)
setChart(lineChart, 'line-chart', )
})
</script>
<style lang="scss">
.line-chart-wrapper {
width: 100%;
height: 100%;
// width: 1520px;
// height: 580px;
}
</style>
\ No newline at end of file
import * as echarts from 'echarts'
const getLineChart = (dataX, dataY) => {
return {
grid: {
left: 24,
top: 48,
right: 34,
bottom: 10,
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
splitLine: {
show: false
},
axisLine: {
show: false
},
data: dataX
},
yAxis: {
type: 'value',
splitLine: {
show: true,
lineStyle: {
color: ['#DEE2E7'], // 线条颜色,可以是数组,用于不同间隔交替颜色
width: 1, // 线宽
type: 'dashed', // 类型:'solid'(实线), 'dashed'(虚线), 'dotted'(点线)
// opacity: 0.6 // 透明度
}
},
axisLine: {
show: false
},
},
series: [
{
data: dataY,
type: 'line',
// showSymbol: false,
symbol: 'circle', // 圆形
symbolSize: 8, // 大小为8px
itemStyle: {
// color: 'rgba(5, 95, 194, 1)', // 填充为珊瑚红
color: '#fff',
borderColor: 'rgba(5, 95, 194, 1)',
borderWidth: 4,
// 不设置borderColor和borderWidth,即为纯实心
},
lineStyle: {
color: 'rgba(5, 95, 194, 1)'
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(5, 95, 194, 0.8)' // 起始颜色:深色
}, {
offset: 1,
color: 'rgba(5, 95, 194, 0)' // 结束颜色:浅色且透明度降低
}])
},
}
]
}
}
export default getLineChart;
\ No newline at end of file
<template>
<div class="pie-chart-wrapper" id="pie-chart"></div>
</template>
<script setup>
import { ref, onMounted, nextTick } from 'vue'
import setChart from '@/utils/setChart';
import getPieChart from './piechart';
const props = defineProps({
pieChartData: {
type: Array,
default: [
// {
// name: 'aaa',
// value: 12
// },
// {
// name: 'bbb',
// value: 8
// },
// {
// name: 'ccc',
// value: 15
// },
]
}
})
onMounted(() => {
const pieChart = getPieChart(props.pieChartData)
setChart(pieChart, 'pie-chart', )
})
</script>
<style lang="scss">
.pie-chart-wrapper {
width: 100%;
height: 100%;
// width: 1520px;
// height: 580px;
}
</style>
\ No newline at end of file
import { MUTICHARTCOLORS } from "@/common/constant";
const getPieChart = (data) => {
const colorList = MUTICHARTCOLORS
let option = {
color: colorList,
series: [
{
type: 'pie',
radius: [160, 190],
height: '100%',
left: 'center',
width: '98%',
itemStyle: {
borderColor: '#fff',
borderWidth: 1
},
label: {
alignTo: 'edge',
formatter: '{name|{b}}\n{time|{c} 条 {d}%}',
minMargin: 5,
edgeDistance: 10,
lineHeight: 25,
rich: {
name: {
color: 'rgba(59, 65, 75, 1)',
fontFamily: 'Microsoft YaHei',
fontSize: 16,
fontWeight: 'bold',
},
time: {
fontSize: 16,
fontFamily: 'Microsoft YaHei',
color: '#rgba(95, 101, 108, 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
}]
}
return option
}
export default getPieChart;
\ No newline at end of file
<template>
<div class="radar-chart-wrapper" id="radar-chart"></div>
</template>
<script setup>
import { ref, onMounted, nextTick } from 'vue'
import setChart from '@/utils/setChart';
import getRadarChart from './radarChart';
const props = defineProps({
radarChartData: {
type: Object,
default: {
title: [],
data: []
}
}
})
onMounted(() => {
const radarChart = getRadarChart(props.radarChartData)
setChart(radarChart, 'radar-chart',)
})
</script>
<style lang="scss">
.radar-chart-wrapper {
width: 100%;
height: 100%;
// width: 1520px;
// height: 580px;
}
</style>
\ No newline at end of file
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论