parent
cd2ecc1ef5
commit
d77fa4b624
@ -0,0 +1,208 @@
|
|||||||
|
<template>
|
||||||
|
<div class="chart-container">
|
||||||
|
<!-- 自定义标题 -->
|
||||||
|
<div class="custom-title">项目投资趋势</div>
|
||||||
|
|
||||||
|
<!-- 筛选区域 -->
|
||||||
|
<div class="filter-bar">
|
||||||
|
<!-- 年份 -->
|
||||||
|
<el-date-picker v-model="years" type="year" value-format="yyyy" placeholder="选择年份"
|
||||||
|
@change="fetchData"></el-date-picker>
|
||||||
|
|
||||||
|
<!-- 年度/季度 -->
|
||||||
|
<el-select v-model="type" placeholder="选择类型" @change="fetchData">
|
||||||
|
<el-option label="年度统计" :value="1"></el-option>
|
||||||
|
<el-option label="季度统计" :value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 折线图容器 -->
|
||||||
|
<div ref="lineChart" style="width: 110%; height: 400px;"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as echarts from 'echarts';
|
||||||
|
import { fetchInvestmentData } from '@/api/ManageApi/index';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'YueDuTouZi',
|
||||||
|
props: {
|
||||||
|
xmId: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chart: null,
|
||||||
|
type: 1,
|
||||||
|
years: new Date().getFullYear().toString(),
|
||||||
|
chartOption: {
|
||||||
|
grid: {
|
||||||
|
left: '3%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis'
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: ['月投资额', '月投资比例', '累计投资额']
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: []
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '月投资额',
|
||||||
|
type: 'line',
|
||||||
|
data: [],
|
||||||
|
smooth: true,
|
||||||
|
itemStyle: { color: '#4CAF50' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '累计投资额',
|
||||||
|
type: 'line',
|
||||||
|
data: [],
|
||||||
|
smooth: true,
|
||||||
|
itemStyle: { color: '#2B62F1' }
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '月投资比例',
|
||||||
|
type: 'line',
|
||||||
|
data: [],
|
||||||
|
smooth: true,
|
||||||
|
itemStyle: { color: '#FF9800' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.initChart();
|
||||||
|
this.fetchData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initChart() {
|
||||||
|
this.chart = echarts.init(this.$refs.lineChart);
|
||||||
|
this.chart.setOption(this.chartOption);
|
||||||
|
},
|
||||||
|
async fetchData() {
|
||||||
|
try {
|
||||||
|
const params = {
|
||||||
|
xmId: this.xmId,
|
||||||
|
type: this.type
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.years) {
|
||||||
|
params.years = this.years;
|
||||||
|
}
|
||||||
|
|
||||||
|
const res = await fetchInvestmentData(params);
|
||||||
|
|
||||||
|
if (res.code === 200 && Array.isArray(res.data)) {
|
||||||
|
let categories = [];
|
||||||
|
let seriesData = [];
|
||||||
|
|
||||||
|
if (this.type === 1) {
|
||||||
|
// 年度模式
|
||||||
|
const months = Array.from({ length: 12 }, (_, i) => `${i + 1}月`);
|
||||||
|
const dataMap = res.data.reduce((acc, item) => {
|
||||||
|
const month = item.month ? parseInt(item.month.split('-')[1]) : -1;
|
||||||
|
if (month >= 1 && month <= 12) {
|
||||||
|
acc[month] = item;
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
categories = months;
|
||||||
|
|
||||||
|
const ytzeData = months.map((_, index) => dataMap[index + 1]?.ytze ?? 0);
|
||||||
|
const ljtzeData = months.map((_, index) => dataMap[index + 1]?.ljtze ?? 0);
|
||||||
|
const ytzblData = months.map((_, index) => dataMap[index + 1]?.ytzbl ?? 0);
|
||||||
|
|
||||||
|
seriesData = [
|
||||||
|
{ name: '月投资额', type: 'line', data: ytzeData, itemStyle: { color: '#4CAF50' } },
|
||||||
|
{ name: '累计投资额', type: 'line', data: ljtzeData, itemStyle: { color: '#2B62F1' } },
|
||||||
|
{ name: '月投资比例', type: 'line', data: ytzblData, itemStyle: { color: '#FF9800' } }
|
||||||
|
];
|
||||||
|
} else if (this.type === 2) {
|
||||||
|
// 季度模式
|
||||||
|
const quarters = ['第一季度', '第二季度', '第三季度', '第四季度'];
|
||||||
|
const dataMap = {};
|
||||||
|
|
||||||
|
res.data.forEach(item => {
|
||||||
|
if (item.jd >= 1 && item.jd <= 4) {
|
||||||
|
dataMap[item.jd] = item;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
categories = quarters;
|
||||||
|
const jdtzeData = quarters.map((_, idx) => dataMap[idx + 1]?.jdtze ?? 0);
|
||||||
|
|
||||||
|
seriesData = [
|
||||||
|
{ name: '季度投资额', type: 'line', data: jdtzeData, itemStyle: { color: '#2B62F1' } }
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
this.chart.setOption({
|
||||||
|
grid: {
|
||||||
|
left: '3%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis'
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: this.type === 1 ? ['月投资额', '累计投资额', '月投资比例'] : ['季度投资额']
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: categories
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: seriesData
|
||||||
|
}, true);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取投资数据失败:', error);
|
||||||
|
this.$message.error('获取数据失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (this.chart) {
|
||||||
|
this.chart.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.chart-container {
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-title {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-bar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 97%;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 1rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,259 +1,258 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="dashboard-container">
|
<!-- 正式的统计页面 -->
|
||||||
<!-- 1 -->
|
<div class="dashboard-container">
|
||||||
<div class="dashboard-row">
|
<!-- 1 -->
|
||||||
<div class="dashboard-col wide">
|
<div class="dashboard-row">
|
||||||
<div class="allarea">
|
<div class="dashboard-col wide">
|
||||||
<AllArea @year-change="handleYearChange" />
|
<div class="allarea">
|
||||||
</div>
|
<AllArea @year-change="handleYearChange" />
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-col narrow">
|
</div>
|
||||||
<div class="itemhead">
|
<div class="dashboard-col narrow">
|
||||||
<span>消息通知</span>
|
<div class="itemhead">
|
||||||
</div>
|
<span>消息通知</span>
|
||||||
<div class="mainarea">
|
</div>
|
||||||
<Message />
|
<div class="mainarea">
|
||||||
</div>
|
<Message />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 2区-->
|
<!-- 2区-->
|
||||||
<div class="dashboard-rowtwo">
|
<div class="dashboard-rowtwo">
|
||||||
<div class="dashboard-col wide bgcicon">
|
<div class="dashboard-col wide bgcicon">
|
||||||
<MapArea />
|
<MapArea />
|
||||||
|
</div>
|
||||||
|
<div class="dashboard-col narrow">
|
||||||
|
<div class="itemhead" style="margin: .5rem 0 0 0;">
|
||||||
|
<span>功能区</span>
|
||||||
|
</div>
|
||||||
|
<div class="relaitem">
|
||||||
|
<FunctionArea :years="years" />
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-col narrow">
|
|
||||||
<div class="itemhead" style="margin: .5rem 0 0 0;">
|
|
||||||
<span>功能区</span>
|
|
||||||
</div>
|
|
||||||
<div class="relaitem">
|
|
||||||
<FunctionArea :years="years" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="itemhead" style="margin: 0;">
|
<div class="itemhead" style="margin: 0;">
|
||||||
<span>投资主体</span>
|
<span>投资主体</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="relaitem">
|
<div class="relaitem">
|
||||||
<InvestArea :years="years" />
|
<InvestArea :years="years" />
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 3 -->
|
<!-- 3 -->
|
||||||
<div class="dashboard-row">
|
<div class="dashboard-row">
|
||||||
<div class="dashboard-col">
|
<div class="dashboard-col">
|
||||||
<div class="itemhead">
|
<div class="itemhead">
|
||||||
<span>产业数据分析</span>
|
<span>产业数据分析</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="relaitem">
|
<div class="relaitem">
|
||||||
<Cyeshuju />
|
<Cyeshuju />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dashboard-col">
|
||||||
|
<div class="itemhead">
|
||||||
|
<span>产业导向目录分析</span>
|
||||||
|
</div>
|
||||||
|
<div class="relaitem">
|
||||||
|
<Cydxml />
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-col">
|
</div>
|
||||||
<div class="itemhead">
|
<div class="dashboard-col" style="height: 11rem;">
|
||||||
<span>产业导向目录分析</span>
|
<div class="itemhead">
|
||||||
</div>
|
<span>产业导向细分产业分析</span>
|
||||||
<div class="relaitem">
|
|
||||||
<Cydxml />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-col">
|
<div class="relaitem" style="height: 9rem;">
|
||||||
<div class="itemhead">
|
<Cydxxfgl />
|
||||||
<span>产业导向细分产业分析</span>
|
|
||||||
</div>
|
|
||||||
<div class="relaitem">
|
|
||||||
<Cydxxfgl />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AllArea from '@/views/components/analysis/all.vue'
|
import AllArea from '@/views/components/analysis/all.vue'
|
||||||
import FunctionArea from '@/views/components/analysis/function.vue'
|
import FunctionArea from '@/views/components/analysis/function.vue'
|
||||||
import InvestArea from '@/views/components/analysis/invest.vue'
|
import InvestArea from '@/views/components/analysis/invest.vue'
|
||||||
import Message from '@/views/components/analysis/message.vue'
|
import Message from '@/views/components/analysis/message.vue'
|
||||||
import ProjectList from '@/views/components/analysis/projectList.vue'
|
import ProjectList from '@/views/components/analysis/projectList.vue'
|
||||||
import MapArea from '@/views/components/analysis/map.vue'
|
import MapArea from '@/views/components/analysis/map.vue'
|
||||||
import Cyeshuju from '@/views/components/analysis/chanyeshuju.vue'
|
import Cyeshuju from '@/views/components/analysis/chanyeshuju.vue'
|
||||||
import Cydxml from '@/views/components/analysis/chanyedxml.vue'
|
import Cydxml from '@/views/components/analysis/chanyedxml.vue'
|
||||||
import Cydxxfgl from '@/views/components/analysis/chanyexfgl.vue'
|
import Cydxxfgl from '@/views/components/analysis/chanyexfgl.vue'
|
||||||
import { investall, fungong } from '@/api/ManageApi/index'
|
import { investall, fungong } from '@/api/ManageApi/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
AllArea,
|
AllArea,
|
||||||
FunctionArea,
|
FunctionArea,
|
||||||
InvestArea,
|
InvestArea,
|
||||||
Message,
|
Message,
|
||||||
ProjectList,
|
ProjectList,
|
||||||
MapArea,
|
MapArea,
|
||||||
Cyeshuju,
|
Cyeshuju,
|
||||||
Cydxml,
|
Cydxml,
|
||||||
Cydxxfgl
|
Cydxxfgl
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
years: new Date().getFullYear().toString(),
|
||||||
|
allnumber: {
|
||||||
|
touzinumber: 0
|
||||||
|
},
|
||||||
|
functionnumber: {
|
||||||
|
functionnumber: 0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleYearChange(years) {
|
||||||
|
this.years = years;
|
||||||
|
console.log("index.vue: handleYearChange called with years:", years);
|
||||||
},
|
},
|
||||||
data() {
|
async getData() {
|
||||||
return {
|
const response = await investall();
|
||||||
years: new Date().getFullYear().toString(),
|
if (response && response.data) {
|
||||||
allnumber: {
|
const totalCount = response.data.reduce((sum, item) => sum + item.count, 0);
|
||||||
touzinumber: 0
|
this.allnumber = {
|
||||||
},
|
touzinumber: totalCount
|
||||||
functionnumber: {
|
};
|
||||||
functionnumber: 0
|
}
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
methods: {
|
async getfuncdata() {
|
||||||
handleYearChange(years) {
|
const response2 = await fungong();
|
||||||
this.years = years;
|
if (response2 && response2.data) {
|
||||||
console.log("index.vue: handleYearChange called with years:", years);
|
const totalCount2 = response2.data.reduce(
|
||||||
},
|
(sum, item) => sum + item.count, 0
|
||||||
async getData() {
|
);
|
||||||
const response = await investall();
|
this.functionnumber = {
|
||||||
if (response && response.data) {
|
functionnumber: totalCount2
|
||||||
const totalCount = response.data.reduce((sum, item) => sum + item.count, 0);
|
|
||||||
this.allnumber = {
|
|
||||||
touzinumber: totalCount
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async getfuncdata() {
|
|
||||||
const response2 = await fungong();
|
|
||||||
if (response2 && response2.data) {
|
|
||||||
const totalCount2 = response2.data.reduce(
|
|
||||||
(sum, item) => sum + item.count, 0
|
|
||||||
);
|
|
||||||
this.functionnumber = {
|
|
||||||
functionnumber: totalCount2
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getData();
|
|
||||||
this.getfuncdata();
|
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
</script>
|
created() {
|
||||||
|
this.getData();
|
||||||
|
this.getfuncdata();
|
||||||
<style scoped>
|
|
||||||
.dashboard-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 100%;
|
|
||||||
padding: 0.5rem;
|
|
||||||
gap: 0.5rem;
|
|
||||||
box-sizing: border-box;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
.dashboard-row {
|
|
||||||
display: flex;
|
|
||||||
flex: 1;
|
|
||||||
gap: 0.5rem;
|
|
||||||
|
|
||||||
}
|
<style scoped>
|
||||||
|
.dashboard-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0.5rem;
|
||||||
|
gap: 0.5rem;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.dashboard-rowtwo {
|
.dashboard-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: auto;
|
flex: 1;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-col {
|
.dashboard-rowtwo {
|
||||||
flex: 1;
|
display: flex;
|
||||||
background-color: #FFFFFF;
|
height: auto;
|
||||||
border-radius: 0.5rem;
|
gap: 0.5rem;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-col.wide {
|
}
|
||||||
flex: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-col.narrow {
|
.dashboard-col {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
background-color: #FFFFFF;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.itemhead {
|
.dashboard-col.wide {
|
||||||
width: 100%;
|
flex: 2;
|
||||||
border-left: 0.25rem solid #2B62F1;
|
}
|
||||||
margin: 0.5rem 0;
|
|
||||||
margin: 0.5rem 0;
|
|
||||||
height: 1.25rem;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.relaitem {
|
.dashboard-col.narrow {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
position: relative;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.itemsall {
|
.itemhead {
|
||||||
position: absolute;
|
width: 100%;
|
||||||
display: flex;
|
border-left: 0.25rem solid #2B62F1;
|
||||||
flex-direction: column;
|
margin: 0.5rem 0;
|
||||||
justify-content: center;
|
margin: 0.5rem 0;
|
||||||
align-items: center;
|
height: 1.25rem;
|
||||||
top: 33%;
|
display: flex;
|
||||||
left: 23%;
|
align-items: center;
|
||||||
z-index: 1;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.itemsall span:nth-child(1) {
|
.relaitem {
|
||||||
font-family: DINbold;
|
flex: 1;
|
||||||
font-weight: 500;
|
position: relative;
|
||||||
font-size: 1.25rem;
|
}
|
||||||
color: #292C33;
|
|
||||||
text-align: left;
|
|
||||||
font-style: normal;
|
|
||||||
text-transform: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemsall span:nth-child(2) {
|
.itemsall {
|
||||||
font-family: alibold;
|
position: absolute;
|
||||||
font-weight: 400;
|
display: flex;
|
||||||
font-size: 0.68rem;
|
flex-direction: column;
|
||||||
color: #9E9E9E;
|
justify-content: center;
|
||||||
text-align: left;
|
align-items: center;
|
||||||
font-style: normal;
|
top: 33%;
|
||||||
text-transform: none;
|
left: 23%;
|
||||||
}
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.itemhead span {
|
.itemsall span:nth-child(1) {
|
||||||
margin-left: 1rem;
|
font-family: DINbold;
|
||||||
font-family: alibold;
|
font-weight: 500;
|
||||||
font-weight: 600;
|
font-size: 1.25rem;
|
||||||
font-size: 1rem;
|
color: #292C33;
|
||||||
color: #3D424C;
|
text-align: left;
|
||||||
line-height: 1.69rem;
|
font-style: normal;
|
||||||
text-align: left;
|
text-transform: none;
|
||||||
font-style: normal;
|
}
|
||||||
text-transform: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mainarea {
|
.itemsall span:nth-child(2) {
|
||||||
flex: 1;
|
font-family: alibold;
|
||||||
padding: 0 0 0 .5rem;
|
font-weight: 400;
|
||||||
overflow: auto;
|
font-size: 0.68rem;
|
||||||
}
|
color: #9E9E9E;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
.allarea {
|
.itemhead span {
|
||||||
flex: 1;
|
margin-left: 1rem;
|
||||||
padding: 0rem 1rem 0 1rem;
|
font-family: alibold;
|
||||||
display: flex;
|
font-weight: 600;
|
||||||
flex-direction: column;
|
font-size: 1rem;
|
||||||
}
|
color: #3D424C;
|
||||||
|
line-height: 1.69rem;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
.bgcicon {
|
.mainarea {
|
||||||
padding: 0 !important;
|
flex: 1;
|
||||||
}
|
padding: 0 0 0 .5rem;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.allarea {
|
||||||
|
flex: 1;
|
||||||
|
padding: 0rem 1rem 0 1rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
.bgcicon {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,295 +1,296 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="dashboard-container">
|
<!-- 这是测试的页面 -->
|
||||||
<!-- 1 -->
|
<div class="dashboard-container">
|
||||||
<div class="dashboard-row">
|
<!-- 1 -->
|
||||||
<div class="dashboard-col wide">
|
<div class="dashboard-row">
|
||||||
<div class="allarea">
|
<div class="dashboard-col wide">
|
||||||
<AllArea @year-change="handleYearChange" />
|
<div class="allarea">
|
||||||
</div>
|
<AllArea @year-change="handleYearChange" />
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-col narrow">
|
</div>
|
||||||
<div class="itemhead">
|
<div class="dashboard-col narrow">
|
||||||
<span>消息通知</span>
|
<div class="itemhead">
|
||||||
</div>
|
<span>消息通知</span>
|
||||||
<div class="mainarea">
|
</div>
|
||||||
<Message />
|
<div class="mainarea">
|
||||||
</div>
|
<Message />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 2区-->
|
<!-- 2区-->
|
||||||
<div class="dashboard-rowtwo">
|
<div class="dashboard-rowtwo">
|
||||||
<div class="dashboard-col wide bgcicon">
|
<div class="dashboard-col wide bgcicon">
|
||||||
<MapArea />
|
<MapArea />
|
||||||
|
</div>
|
||||||
|
<div class="dashboard-col narrow">
|
||||||
|
<div class="itemhead" style="margin: .5rem 0 0 0;">
|
||||||
|
<span>功能区</span>
|
||||||
|
</div>
|
||||||
|
<div class="relaitem">
|
||||||
|
<FunctionArea :years="years" />
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-col narrow">
|
|
||||||
<div class="itemhead" style="margin: .5rem 0 0 0;">
|
|
||||||
<span>功能区</span>
|
|
||||||
</div>
|
|
||||||
<div class="relaitem">
|
|
||||||
<FunctionArea :years="years" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="itemhead" style="margin: 0;">
|
<div class="itemhead" style="margin: 0;">
|
||||||
<span>投资主体</span>
|
<span>投资主体</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="relaitem">
|
<div class="relaitem">
|
||||||
<InvestArea :years="years" />
|
<InvestArea :years="years" />
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 3 -->
|
<!-- 3 -->
|
||||||
<div class="dashboard-row">
|
<div class="dashboard-row">
|
||||||
<div class="dashboard-col">
|
<div class="dashboard-col">
|
||||||
<div class="itemhead">
|
<div class="itemhead">
|
||||||
<span>产业数据分析</span>
|
<span>产业数据分析</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="relaitem">
|
<div class="relaitem">
|
||||||
<Cyeshuju />
|
<Cyeshuju />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dashboard-col">
|
||||||
|
<div class="itemhead">
|
||||||
|
<span>产业导向目录分析</span>
|
||||||
|
</div>
|
||||||
|
<div class="relaitem">
|
||||||
|
<Cydxml />
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-col">
|
</div>
|
||||||
<div class="itemhead">
|
<div class="dashboard-col" style="height: 11rem;">
|
||||||
<span>产业导向目录分析</span>
|
<div class="itemhead">
|
||||||
</div>
|
<!-- <span>产业导向细分产业分析</span> -->
|
||||||
<div class="relaitem">
|
<span>年度任务完成情况</span>
|
||||||
<Cydxml />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-col" style="height: 11rem;">
|
<div class="relaitem" style="height: 9rem;">
|
||||||
<div class="itemhead">
|
<!-- <Cydxxfgl /> -->
|
||||||
<!-- <span>产业导向细分产业分析</span> -->
|
<Ndwcqk />
|
||||||
<span>年度任务完成情况</span>
|
|
||||||
</div>
|
|
||||||
<div class="relaitem" style="height: 9rem;">
|
|
||||||
<!-- <Cydxxfgl /> -->
|
|
||||||
<Ndwcqk />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 4 -->
|
<!-- 4 -->
|
||||||
<div class="dashboard-row">
|
<div class="dashboard-row">
|
||||||
<div class="dashboard-col">
|
<div class="dashboard-col">
|
||||||
<div class="itemhead">
|
<div class="itemhead">
|
||||||
<span>储备项目统计分析</span>
|
<span>储备项目统计分析</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="relaitem">
|
<div class="relaitem">
|
||||||
<Cbxm />
|
<Cbxm />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dashboard-col">
|
||||||
|
<div class="itemhead">
|
||||||
|
<span>产业导向细分产业分析</span>
|
||||||
|
<!-- <span>年度任务完成情况</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-col">
|
<div class="relaitem">
|
||||||
<div class="itemhead">
|
<Cydxxfgl />
|
||||||
<span>产业导向细分产业分析</span>
|
<!-- <Ndwcqk /> -->
|
||||||
<!-- <span>年度任务完成情况</span> -->
|
|
||||||
</div>
|
|
||||||
<div class="relaitem">
|
|
||||||
<Cydxxfgl />
|
|
||||||
<!-- <Ndwcqk /> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AllArea from '@/views/components/analysis/all.vue'
|
import AllArea from '@/views/components/analysis/all.vue'
|
||||||
import FunctionArea from '@/views/components/analysis/function.vue'
|
import FunctionArea from '@/views/components/analysis/function.vue'
|
||||||
import InvestArea from '@/views/components/analysis/invest.vue'
|
import InvestArea from '@/views/components/analysis/invest.vue'
|
||||||
import Message from '@/views/components/analysis/message.vue'
|
import Message from '@/views/components/analysis/message.vue'
|
||||||
import ProjectList from '@/views/components/analysis/projectList.vue'
|
import ProjectList from '@/views/components/analysis/projectList.vue'
|
||||||
import MapArea from '@/views/components/analysis/map.vue'
|
import MapArea from '@/views/components/analysis/map.vue'
|
||||||
import Cyeshuju from '@/views/components/analysis/chanyeshuju.vue'
|
import Cyeshuju from '@/views/components/analysis/chanyeshuju.vue'
|
||||||
import Cydxml from '@/views/components/analysis/chanyedxml.vue'
|
import Cydxml from '@/views/components/analysis/chanyedxml.vue'
|
||||||
import Cydxxfgl from '@/views/components/analysis/chanyexfgl.vue'
|
import Cydxxfgl from '@/views/components/analysis/chanyexfgl.vue'
|
||||||
import Cbxm from '@/views/components/analysis/chubeixm.vue'
|
import Cbxm from '@/views/components/analysis/chubeixm.vue'
|
||||||
import Ndwcqk from '@/views/components/analysis/ndwcqk.vue'
|
import Ndwcqk from '@/views/components/analysis/ndwcqk.vue'
|
||||||
import { investall, fungong } from '@/api/ManageApi/index'
|
import { investall, fungong } from '@/api/ManageApi/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
AllArea,
|
AllArea,
|
||||||
FunctionArea,
|
FunctionArea,
|
||||||
InvestArea,
|
InvestArea,
|
||||||
Message,
|
Message,
|
||||||
ProjectList,
|
ProjectList,
|
||||||
MapArea,
|
MapArea,
|
||||||
Cyeshuju,
|
Cyeshuju,
|
||||||
Cydxml,
|
Cydxml,
|
||||||
Cydxxfgl,
|
Cydxxfgl,
|
||||||
Cbxm,
|
Cbxm,
|
||||||
Ndwcqk
|
Ndwcqk
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
years: new Date().getFullYear().toString(),
|
||||||
|
allnumber: {
|
||||||
|
touzinumber: 0
|
||||||
|
},
|
||||||
|
functionnumber: {
|
||||||
|
functionnumber: 0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleYearChange(years) {
|
||||||
|
this.years = years;
|
||||||
|
console.log("index.vue: handleYearChange called with years:", years);
|
||||||
},
|
},
|
||||||
data() {
|
async getData() {
|
||||||
return {
|
const response = await investall();
|
||||||
years: new Date().getFullYear().toString(),
|
if (response && response.data) {
|
||||||
allnumber: {
|
const totalCount = response.data.reduce((sum, item) => sum + item.count, 0);
|
||||||
touzinumber: 0
|
this.allnumber = {
|
||||||
},
|
touzinumber: totalCount
|
||||||
functionnumber: {
|
};
|
||||||
functionnumber: 0
|
}
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
methods: {
|
async getfuncdata() {
|
||||||
handleYearChange(years) {
|
const response2 = await fungong();
|
||||||
this.years = years;
|
if (response2 && response2.data) {
|
||||||
console.log("index.vue: handleYearChange called with years:", years);
|
const totalCount2 = response2.data.reduce(
|
||||||
},
|
(sum, item) => sum + item.count, 0
|
||||||
async getData() {
|
);
|
||||||
const response = await investall();
|
this.functionnumber = {
|
||||||
if (response && response.data) {
|
functionnumber: totalCount2
|
||||||
const totalCount = response.data.reduce((sum, item) => sum + item.count, 0);
|
|
||||||
this.allnumber = {
|
|
||||||
touzinumber: totalCount
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async getfuncdata() {
|
|
||||||
const response2 = await fungong();
|
|
||||||
if (response2 && response2.data) {
|
|
||||||
const totalCount2 = response2.data.reduce(
|
|
||||||
(sum, item) => sum + item.count, 0
|
|
||||||
);
|
|
||||||
this.functionnumber = {
|
|
||||||
functionnumber: totalCount2
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getData();
|
|
||||||
this.getfuncdata();
|
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
</script>
|
created() {
|
||||||
|
this.getData();
|
||||||
|
this.getfuncdata();
|
||||||
<style scoped>
|
|
||||||
.dashboard-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 100%;
|
|
||||||
padding: 0.5rem;
|
|
||||||
gap: 0.5rem;
|
|
||||||
box-sizing: border-box;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
.dashboard-row {
|
|
||||||
display: flex;
|
|
||||||
flex: 1;
|
|
||||||
gap: 0.5rem;
|
|
||||||
|
|
||||||
}
|
<style scoped>
|
||||||
|
.dashboard-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0.5rem;
|
||||||
|
gap: 0.5rem;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.dashboard-rowtwo {
|
.dashboard-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: auto;
|
flex: 1;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-col {
|
.dashboard-rowtwo {
|
||||||
flex: 1;
|
display: flex;
|
||||||
background-color: #FFFFFF;
|
height: auto;
|
||||||
border-radius: 0.5rem;
|
gap: 0.5rem;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-col.wide {
|
}
|
||||||
flex: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-col.narrow {
|
.dashboard-col {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
background-color: #FFFFFF;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.itemhead {
|
.dashboard-col.wide {
|
||||||
width: 100%;
|
flex: 2;
|
||||||
border-left: 0.25rem solid #2B62F1;
|
}
|
||||||
margin: 0.5rem 0;
|
|
||||||
margin: 0.5rem 0;
|
|
||||||
height: 1.25rem;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.top {
|
.dashboard-col.narrow {
|
||||||
width: auto;
|
flex: 1;
|
||||||
display: flex;
|
}
|
||||||
margin-bottom: 10px;
|
|
||||||
font-size: 0.88rem;
|
|
||||||
color: gray!important;
|
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.relaitem {
|
.itemhead {
|
||||||
flex: 1;
|
width: 100%;
|
||||||
position: relative;
|
border-left: 0.25rem solid #2B62F1;
|
||||||
}
|
margin: 0.5rem 0;
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
height: 1.25rem;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
.itemsall {
|
.top {
|
||||||
position: absolute;
|
width: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
margin-bottom: 10px;
|
||||||
justify-content: center;
|
font-size: 0.88rem;
|
||||||
align-items: center;
|
color: gray!important;
|
||||||
top: 33%;
|
justify-content: flex-end;
|
||||||
left: 23%;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.itemsall span:nth-child(1) {
|
.relaitem {
|
||||||
font-family: DINbold;
|
flex: 1;
|
||||||
font-weight: 500;
|
position: relative;
|
||||||
font-size: 1.25rem;
|
}
|
||||||
color: #292C33;
|
|
||||||
text-align: left;
|
|
||||||
font-style: normal;
|
|
||||||
text-transform: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemsall span:nth-child(2) {
|
.itemsall {
|
||||||
font-family: alibold;
|
position: absolute;
|
||||||
font-weight: 400;
|
display: flex;
|
||||||
font-size: 0.68rem;
|
flex-direction: column;
|
||||||
color: #9E9E9E;
|
justify-content: center;
|
||||||
text-align: left;
|
align-items: center;
|
||||||
font-style: normal;
|
top: 33%;
|
||||||
text-transform: none;
|
left: 23%;
|
||||||
}
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.itemhead span {
|
.itemsall span:nth-child(1) {
|
||||||
margin-left: 1rem;
|
font-family: DINbold;
|
||||||
font-family: alibold;
|
font-weight: 500;
|
||||||
font-weight: 600;
|
font-size: 1.25rem;
|
||||||
font-size: 1rem;
|
color: #292C33;
|
||||||
color: #3D424C;
|
text-align: left;
|
||||||
line-height: 1.69rem;
|
font-style: normal;
|
||||||
text-align: left;
|
text-transform: none;
|
||||||
font-style: normal;
|
}
|
||||||
text-transform: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mainarea {
|
.itemsall span:nth-child(2) {
|
||||||
flex: 1;
|
font-family: alibold;
|
||||||
padding: 0 0 0 .5rem;
|
font-weight: 400;
|
||||||
overflow: auto;
|
font-size: 0.68rem;
|
||||||
}
|
color: #9E9E9E;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
.allarea {
|
.itemhead span {
|
||||||
flex: 1;
|
margin-left: 1rem;
|
||||||
padding: 0rem 1rem 0 1rem;
|
font-family: alibold;
|
||||||
display: flex;
|
font-weight: 600;
|
||||||
flex-direction: column;
|
font-size: 1rem;
|
||||||
}
|
color: #3D424C;
|
||||||
|
line-height: 1.69rem;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
.bgcicon {
|
.mainarea {
|
||||||
padding: 0 !important;
|
flex: 1;
|
||||||
}
|
padding: 0 0 0 .5rem;
|
||||||
</style>
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.allarea {
|
||||||
|
flex: 1;
|
||||||
|
padding: 0rem 1rem 0 1rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bgcicon {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in new issue