提交 46bcc87b authored 作者: coderBryanFu's avatar coderBryanFu

update

上级 6dcbeb07
......@@ -18,6 +18,9 @@
<el-dropdown-menu>
<el-dropdown-item command="/">智库首页</el-dropdown-item>
<el-dropdown-item command="/billHome">法案首页</el-dropdown-item>
<el-dropdown-item command="/exportControl">出口管制</el-dropdown-item>
<el-dropdown-item command="/decree">政令</el-dropdown-item>
<el-dropdown-item command="/marketAccessRestrictions">市场准入限制</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
......@@ -192,7 +195,8 @@ body {
.el-main {
padding: 0;
min-height: calc(100vh - 60px);
height: calc(100vh - 60px);
background-color: rgba(246, 251, 255, 1);
overflow-y: auto;
}
</style>
\ No newline at end of file
......@@ -23,6 +23,22 @@ import InfluenceLayout from '@/views/influence/index.vue'
import InfluenceIndustry from '@/views/influence/industry/index.vue'
import InfluenceScientificResearch from '@/views/influence/scientificResearch/index.vue'
// 出口管制
import ExportControl from '@/views/exportControl/index.vue'
// 政令
import Decree from '@/views/decree/decreeHome/index.vue'
import DecreeLayoutContainer from '@/views/decree/decreeLayout/index.vue'
import OverviewLayout from '@/views/decree/decreeLayout/overview/index.vue'
import DecreeIntroduction from '@/views/decree/decreeLayout/overview/introduction/index.vue'
import DecreeBackground from '@/views/decree/decreeLayout/overview/background/index.vue'
import DecreeDeepDig from '@/views/decree/decreeLayout/deepdig/index.vue'
// 市场准入限制
import MarketAccessRestrictions from '@/views/marketAccessRestrictions/marketAccessHome/index.vue'
import MarketAccessLayout from '@/views/marketAccessRestrictions/marketAccessLayout/index.vue'
import MarketAccessOverview from '@/views/marketAccessRestrictions/marketAccessLayout/overview/index.vue'
import MarketAccessCase from '@/views/marketAccessRestrictions/marketAccessLayout/case/index.vue'
const routes = [
// 智库系统的主要路由
......@@ -163,6 +179,131 @@ const routes = [
}
]
},
// 出口管制首页
{
path: '/exportControl',
name: 'ExportControl',
component: ExportControl,
meta: {
title: '出口管制'
},
},
// 政令首页
{
path: '/decree',
name: 'Decree',
component: Decree,
meta: {
title: '政令'
},
},
{
path: '/decreeLayout',
name: 'DecreeLayoutContainer',
component: DecreeLayoutContainer,
redirect: '/decreeLayout/overview',
meta: {
title: '政令布局'
},
children: [
{
path: 'overview',
name: 'OverviewLayout',
component: OverviewLayout,
redirect: '/decreeLayout/overview/introduction',
meta: {
title: '政令概况'
},
children: [
{
path: 'introduction',
name: 'DecreeIntroduction',
component: DecreeIntroduction,
meta: { title: '政令简介' }
},
{
path: 'background',
name: 'DecreeBackground',
component: DecreeBackground,
meta: { title: '政令背景' }
},
]
},
// 深度挖掘路由
{
path: 'deepDig',
name: 'DeepDig',
component: DecreeDeepDig,
meta: {
title: '深度挖掘'
},
},
// // 影响分析路由
// {
// path: 'influence',
// name: 'InfluenceLayout',
// component: InfluenceLayout,
// redirect: '/billLayout/influence/industry',
// meta: {
// title: '影响分析'
// },
// children: [
// {
// path: 'industry',
// name: 'InfluenceIndustry',
// component: InfluenceIndustry,
// meta: { title: '对华产业影响' }
// },
// {
// path: 'scientificResearch',
// name: 'InfluenceScientificResearch',
// component: InfluenceScientificResearch,
// meta: { title: '对华科研影响' }
// }
// ]
// }
]
},
// 市场准入限制首页
{
path: '/marketAccessRestrictions',
name: 'MarketAccessRestrictions',
component: MarketAccessRestrictions,
meta: {
title: '市场准入限制'
},
},
{
path: '/marketAccessLayout',
name: 'MarketAccessLayout',
component: MarketAccessLayout,
redirect: '/marketAccessLayout/overview',
meta: {
title: '市场准入限制布局'
},
children: [
{
path: 'overview',
name: 'MarketAccessOverview',
component: MarketAccessOverview,
meta: {
title: '调查概况'
},
},
{
path: 'case',
name: 'MarketAccessCase',
component: MarketAccessCase,
meta: {
title: '调查案件'
},
},
]
},
]
const router = createRouter({
......
......@@ -329,7 +329,7 @@
<script setup>
import { onMounted, ref } from "vue";
import * as echarts from "echarts";
import router from "../../router/index";
import router from "@/router/index";
import { getHotBills, getBillsByType, getHylyList } from "@/api/home";
......
......@@ -134,7 +134,7 @@
<script setup>
import { ref, onMounted } from "vue";
import router from "../../router";
import router from "@/router";
import GJKJAQImg from "./assets/images/icon1.png";
import GJKJAQActiveImg from "./assets/images/icon1.png";
......
<template>
<div>
<div class="echarts-wrap" ref="echartWord"></div>
</div>
</template>
<script setup>
import { ref, onMounted, onBeforeUnmount } from "vue";
import * as echarts from "echarts";
import "echarts-wordcloud";
const props = defineProps({
// 词云数据
data: {
type: Array,
required: true,
// 示例:
// [
// { name: 'Vue', value: 1000 },
// { name: 'ECharts', value: 618 },
// // ...
// ]
},
// 词云形状,可以是 'circle', 'cardioid', 'diamond', 'triangle-forward', 'triangle', 'pentagon' 等
shape: {
type: String,
default: "circle",
},
});
const echartWord = ref(null);
let myChart = null;
const initChart = () => {
if (echartWord.value) {
myChart = echarts.init(echartWord.value);
const option = {
grid: {
left: 5,
top: 5,
right: 5,
bottom: 5,
},
series: [
{
type: "wordCloud",
shape: props.shape,
// 其他形状你可以使用形状路径
// shape: 'circle', // 示例
// 或者自定义路径
gridSize: 20, // 网格大小,影响词间距。
sizeRange: [15, 25], // 定义词云中文字大小的范围
rotationRange: [0, 0],
rotationStep: 0,
drawOutOfBound: false, // 是否超出画布
// 字体
textStyle: {
// normal: {
// color: function () {
// return 'rgb(' + [
// Math.round(Math.random() * 160),
// Math.round(Math.random() * 160),
// Math.round(Math.random() * 160)
// ].join(',') + ')';
// }
// },
color: function () {
let colors = [
"rgba(189, 33, 33, 1)",
"rgba(232, 151, 21, 1)",
"rgba(220, 190, 68, 1)",
"rgba(96, 58, 186, 1)",
"rgba(32, 121, 69, 1)",
"rgba(22, 119, 255, 1)",
];
return colors[parseInt(Math.random() * colors.length)];
},
emphasis: {
shadowBlur: 5,
shadowColor: "#333",
},
},
// 设置词云数据
data: props.data,
},
],
};
myChart.setOption(option);
window.addEventListener("resize", myChart.resize);
}
};
onMounted(() => {
initChart();
});
onBeforeUnmount(() => {
if (myChart) {
window.removeEventListener("resize", myChart.resize);
myChart.dispose();
}
});
</script>
<style lang="scss" scoped>
.echarts-wrap {
// width: 100%;
width: 576px;
height: 215px;
}
</style>
差异被折叠。
import * as echarts from 'echarts'
const getMultiLineChart = (dataX, dataY1, dataY2) => {
return {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
grid: {
top: '8%',
right: '5%',
bottom: '5%',
left: '5%',
containLabel: true
},
legend: {
data: ['提出法案', '通过法案'],
show: false
},
color: ['#1459bb', '#fa8c16'],
xAxis: [
{
type: 'category',
boundaryGap: false,
data: dataX
}
],
yAxis: [
{
type: 'value'
}
],
series: [
{
name: '提出法案',
type: 'line',
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(22, 119, 255, 1)' // 起始颜色
}, {
offset: 1,
color: 'rgba(22, 119, 255, 0)' // 结束颜色
}])
},
emphasis: {
focus: 'series'
},
data: dataY1
},
{
name: '通过法案',
type: 'line',
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(255, 172, 77, 1)' // 起始颜色
}, {
offset: 1,
color: 'rgba(255, 172, 77, 0)' // 结束颜色
}])
},
emphasis: {
focus: 'series'
},
data: dataY2
}
]
}
}
export default getMultiLineChart
\ No newline at end of file
差异被折叠。
<template>
<div class="decree-overview-wrap">
<div class="left">
<div
class="sider-btn"
:class="{ siderBtnActive: siderBtnActive === item.name }"
@click="handleClickLeftSiderBtn(item)"
v-for="(item, index) in siderList"
:key="index"
>
<div class="btn-text">{{ item.name }}</div>
<div class="btn-icon">
<el-icon v-if="siderBtnActive === item.name" color="#fff"
><CaretRight
/></el-icon>
</div>
</div>
</div>
<div class="main">
<router-view />
</div>
</div>
</template>
<script setup>
import { ref, onMounted } from "vue";
import router from '@/router'
const siderList = ref([
{
name: "政令简介",
path: "/decreeLayout/overview/introduction",
},
{
name: "政令背景",
path: "/decreeLayout/overview/background",
},
]);
const siderBtnActive = ref("政令简介");
const handleClickLeftSiderBtn = (item) => {
siderBtnActive.value = item.name
router.push(item.path)
}
</script>
<style lang="scss" scoped>
.decree-overview-wrap {
width: 1920px;
height: 100%;
overflow: hidden;
background: rgba(247, 248, 249, 1);
display: flex;
.left {
width: 160px;
padding-top: 16px;
.sider-btn {
margin-top: 20px;
margin-left: 23px;
width: 112px;
height: 32px;
display: flex;
line-height: 32px;
border-radius: 16px;
cursor: pointer;
.btn-text {
width: 82px;
height: 32px;
line-height: 32px;
text-align: left;
box-sizing: border-box;
padding-left: 24px;
font-size: 14px;
font-family: Microsoft YaHei;
color: rgba(95, 101, 108, 1);
}
.btn-icon {
width: 22px;
padding-top: 2px;
}
}
.siderBtnActive {
background: rgba(10, 87, 166, 1);
.btn-text {
color: #fff !important;
}
}
}
.main{
width: 1760px;
height: 901px;
}
}
</style>
\ No newline at end of file
function getFormattedDateTime(includeTime = false) {
const date = new Date();
const weekdays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
const weekday = weekdays[date.getDay()];
let result = `${year}${month}${day}${weekday}`;
if (includeTime) {
const pad = n => n.toString().padStart(2, '0');
result += ` ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`;
}
return result;
}
export default getFormattedDateTime
\ No newline at end of file
......@@ -24,7 +24,7 @@
<script setup>
import { onMounted, ref } from "vue";
import router from "../../router";
import router from "@/router";
const siderBtnList = ref([
{
......
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论