Commit a7709d00 authored by danfuman's avatar danfuman

修改

parent a69d5c15
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
box-shadow: 0 1px 4px rgba(0,21,41,.08); box-shadow: 0 1px 4px rgba(0,21,41,.08);
position: fixed; position: fixed;
top:0; top:0;
z-index: 9999; z-index: 999;
.left-menu{ .left-menu{
float: left; float: left;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</el-table-column> </el-table-column>
<el-table-column label="产业类型" prop="projectType"></el-table-column> <el-table-column label="产业类型" prop="projectType"></el-table-column>
<el-table-column :label="oneYear"> <el-table-column :label="oneYear">
<el-table-column prop="money" label="金额(亿元)" sortable> </el-table-column> <el-table-column prop="money" label="金额(亿元)" sortable></el-table-column>
<el-table-column prop="rate" label="占比(%)"> </el-table-column> <el-table-column prop="rate" label="占比(%)"> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column :label="twoYear"> <el-table-column :label="twoYear">
...@@ -114,6 +114,12 @@ export default { ...@@ -114,6 +114,12 @@ export default {
} }
} }
} }
for(let i=0; i<list.length; i++){
list[i].money=Number(list[i].money).toFixed(2)
list[i].rate=Number(list[i].rate).toFixed(2)
list[i].lastMoney=Number(list[i].lastMoney).toFixed(2)
list[i].lastRate=Number(list[i].lastRate).toFixed(2)
}
this.tableData=list.reverse() this.tableData=list.reverse()
}) })
}, },
...@@ -220,7 +226,7 @@ export default { ...@@ -220,7 +226,7 @@ export default {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr); const value = Number(curr);
if (!isNaN(value)) { if (!isNaN(value)) {
return Number(Number(prev) + Number(curr)).toFixed(3) return Number(Number(prev) + Number(curr)).toFixed(2)
} else { } else {
return prev; return prev;
} }
......
...@@ -268,7 +268,7 @@ export default { ...@@ -268,7 +268,7 @@ export default {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
tableDataTotal: 0, tableDataTotal: 0,
labelData:[2021,2022], labelData:[],
valData:[], valData:[],
valData1:[], valData1:[],
valData2:[], valData2:[],
...@@ -280,6 +280,8 @@ export default { ...@@ -280,6 +280,8 @@ export default {
}, },
created() { created() {
this.getData() this.getData()
let mydate=new Date();
this.labelData=[mydate.getFullYear()-2,mydate.getFullYear()-1]
this.$nextTick(()=>{ this.$nextTick(()=>{
// console.log(this.dataQuery) // console.log(this.dataQuery)
}) })
...@@ -325,11 +327,11 @@ export default { ...@@ -325,11 +327,11 @@ export default {
regional(params).then(res => { regional(params).then(res => {
this.recentlyYear=res.data[0].recentlyYear; this.recentlyYear=res.data[0].recentlyYear;
this.nextYearMap=res.data[0].nextYearMap; this.nextYearMap=res.data[0].nextYearMap;
this.valData=[this.nextYearMap.gdp,this.recentlyYear.gdp] this.valData=[this.getMoneyNum(this.nextYearMap.gdp),this.getMoneyNum(this.recentlyYear.gdp)]
this.valData1=[this.nextYearMap.gdpGrowth,this.recentlyYear.gdpGrowth] this.valData1=[this.getMoneyNum(this.nextYearMap.gdpGrowth),this.getMoneyNum(this.recentlyYear.gdpGrowth)]
this.valData2=[this.nextYearMap.population,this.recentlyYear.population] this.valData2=[this.getMoneyNum(this.nextYearMap.population),this.getMoneyNum(this.recentlyYear.population)]
this.valData3=[this.nextYearMap.gbr,this.recentlyYear.gbr] this.valData3=[this.getMoneyNum(this.nextYearMap.gbr),this.getMoneyNum(this.recentlyYear.gbr)]
this.valData4=[this.nextYearMap.govDebtBalance,this.recentlyYear.govDebtBalance] this.valData4=[this.getMoneyNum(this.nextYearMap.govDebtBalance),this.getMoneyNum(this.recentlyYear.govDebtBalance)]
this.initChart() this.initChart()
this.initChart1() this.initChart1()
this.initChart2() this.initChart2()
...@@ -676,7 +678,8 @@ export default { ...@@ -676,7 +678,8 @@ export default {
}, },
childMethod(key) { childMethod(key) {
let data=this.dataQuery let data=this.dataQuery
data.pId=this.dataQuery.provinceId data.pId=this.provinceId;
this.dataQuery.provinceId=this.provinceId;
switch (key) { switch (key) {
case 1: case 1:
this.$parent.handleClick('second', data); this.$parent.handleClick('second', data);
...@@ -685,7 +688,8 @@ export default { ...@@ -685,7 +688,8 @@ export default {
this.$router.push({ this.$router.push({
path: '/macro/urban', path: '/macro/urban',
query:{ query:{
provinceId:this.dataQuery.provinceId provinceId:this.dataQuery.provinceId,
province:this.dataQuery.province,
} }
}) })
break; break;
...@@ -695,6 +699,12 @@ export default { ...@@ -695,6 +699,12 @@ export default {
} }
}, },
getMoneyNum(num){
if (!num) return 0;
num = num + ''
if (num.indexOf(',') != -1) return num.replace(/\,/g, '');
else return num;
}
} }
} }
</script> </script>
......
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
created() { created() {
location({}).then(res => { location({}).then(res => {
this.province=res.data.province; this.province=res.data.province;
this.provinceId=res.data.provinceId; this.provinceId=res.data.provinceId
this.querySubmit() this.querySubmit()
}) })
this.aptitudeCode() this.aptitudeCode()
...@@ -264,7 +264,6 @@ export default { ...@@ -264,7 +264,6 @@ export default {
}); });
}, },
addressListbtn(data) { addressListbtn(data) {
console.log(data)
this.province=data.province; this.province=data.province;
this.provinceId=data.provinceId[data.provinceId.length-1]; this.provinceId=data.provinceId[data.provinceId.length-1];
this.dataQuery.province=data.provinces; this.dataQuery.province=data.provinces;
......
<template> <template>
<div class="app-container qyzx"> <div class="app-container qyzx">
<Region v-if="province" :province="province" :dataQuery="dataQuery" @addressListbtn="addressListbtn"></Region>
<div class="content"> <div class="content">
<div class="common-title">专项债项目</div> <div class="common-title">专项债项目</div>
<div class="content-box"> <div class="content-box">
...@@ -76,9 +77,13 @@ ...@@ -76,9 +77,13 @@
<script> <script>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { statistics,projectsPage } from '@/api/macro/macro' import { statistics,projectsPage,location } from '@/api/macro/macro'
import Region from '../component/region'
export default { export default {
name: 'Financing', name: 'Financing',
components: {
Region
},
data() { data() {
return { return {
queryParams:{}, queryParams:{},
...@@ -90,13 +95,29 @@ export default { ...@@ -90,13 +95,29 @@ export default {
pageSize: 10, pageSize: 10,
tableDataTotal: 0, tableDataTotal: 0,
show_page:true, show_page:true,
MaxPage:1000 MaxPage:1000,
dataQuery:{},
province:'',
provinceId:[]
} }
}, },
created() { created() {
this.getStatistics() location({}).then(res => {
this.province=res.data.province;
if(!this.dataQuery.provinceId){
this.dataQuery.provinceId=res.data.provinceId
let arr=[res.data.province]
this.dataQuery.province=arr;
this.provinceId.push(res.data.provinceId)
}else {
this.provinceId.push(this.dataQuery.provinceId)
}
this.getData() this.getData()
this.$nextTick(()=>{ this.getStatistics()
})
},
mounted() {
this.$nextTick(() => {
}) })
}, },
...@@ -110,6 +131,15 @@ export default { ...@@ -110,6 +131,15 @@ export default {
if(this.tableParams.order){ if(this.tableParams.order){
params.order=this.tableParams.order params.order=this.tableParams.order
} }
if(this.provinceId.length > 0){
params.provinceId=this.provinceId[0]
}
if(this.provinceId.length > 1){
params.cityId=this.provinceId[1]
}
if(this.provinceId.length > 2){
params.areaId=this.provinceId[2]
}
projectsPage(params).then(res => { projectsPage(params).then(res => {
this.tableLoading = false this.tableLoading = false
this.listData=res.data.list; this.listData=res.data.list;
...@@ -122,6 +152,15 @@ export default { ...@@ -122,6 +152,15 @@ export default {
}, },
getStatistics(){ getStatistics(){
let params={}; let params={};
if(this.provinceId.length > 0){
params.provinceId=this.provinceId[0]
}
if(this.provinceId.length > 1){
params.cityId=this.provinceId[1]
}
if(this.provinceId.length > 2){
params.areaId=this.provinceId[2]
}
if(this.queryParams.field){ if(this.queryParams.field){
params.field=this.queryParams.field params.field=this.queryParams.field
} }
...@@ -301,8 +340,31 @@ export default { ...@@ -301,8 +340,31 @@ export default {
message: '功能正在开发中', message: '功能正在开发中',
type: 'warning' type: 'warning'
}); });
},
addressListbtn(data) {
this.province=data.province;
this.provinceId=data.provinceId;
this.dataQuery.province=data.provinces;
let params={}
if(data){
if(this.provinceId.length > 0){
params.provinceId=this.provinceId[0]
}
if(this.provinceId.length > 1){
params.cityId=this.provinceId[1]
}
if(this.provinceId.length > 2){
params.areaId=this.provinceId[2]
} }
} }
location(params).then(res => {
console.log(res.data)
})
this.pageIndex = 1;
this.getData()
this.getStatistics()
},
}
} }
</script> </script>
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<span class="common-title">全国招标项目概览</span> <span class="common-title">全国招标项目概览</span>
</div> </div>
</div> </div>
<div class="text">通过对{{year}}全国招标数据进行分析,发现主要集中在{{dataSort[0].label}}({{dataSort[0].count}}个)、{{dataSort[1].label}}({{dataSort[1].count}}个)进行招标。</div> <div class="text">通过对{{year}}全国招标数据进行分析,发现主要集中在{{dataSort[0].label}}({{dataSort[0].count}}个)、{{dataSort[1].label}}({{dataSort[1].count}}个)进行招标。</div>
<div class="main1"> <div class="main1">
<div id="gl-echarts" style="height: 250px"></div> <div id="gl-echarts" style="height: 250px"></div>
<p class="tips"><i class="el-icon-info"></i>数据来源大司空建筑大数据平台,统计范围为{{year}}年全国公开的招标项目,未公开的不含在内</p> <p class="tips"><i class="el-icon-info"></i>数据来源大司空建筑大数据平台,统计范围为{{year}}年全国公开的招标项目,未公开的不含在内</p>
...@@ -314,6 +314,11 @@ export default { ...@@ -314,6 +314,11 @@ export default {
xAxis: { xAxis: {
type: 'category', type: 'category',
data: this.tableData1.map(item => item.label), data: this.tableData1.map(item => item.label),
axisLabel: {
show: true,
// "interval": 0,
"rotate": this.year === '近二年'|| this.year === '近三年'? 40: 0 //X轴倾斜度
},
}, },
yAxis: { yAxis: {
type: 'value' type: 'value'
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="content"> <div class="content" id="content">
<div class="flex-box query-box"> <div class="flex-box query-box">
<div class="flex-box query-params"> <div class="flex-box query-params">
<span class="common-title">城投平台列表</span> <span class="common-title">城投平台列表</span>
...@@ -276,6 +276,7 @@ ...@@ -276,6 +276,7 @@
import {encodeStr} from "@/assets/js/common.js" import {encodeStr} from "@/assets/js/common.js"
import dataRegion from '@/assets/json/dataRegion' import dataRegion from '@/assets/json/dataRegion'
import api from '@/api/enterpriseData/enterpriseData.js'; import api from '@/api/enterpriseData/enterpriseData.js';
import elementResizeDetectorMaker from "element-resize-detector"
import { uipGroupData,urbanInvestmentPage,urbanInvestmentStatistics,claim,location } from '@/api/macro/macro' import { uipGroupData,urbanInvestmentPage,urbanInvestmentStatistics,claim,location } from '@/api/macro/macro'
import { infoHeader } from '@/api/detail/party-a/index' import { infoHeader } from '@/api/detail/party-a/index'
import Region from '../component/region' import Region from '../component/region'
...@@ -324,7 +325,9 @@ export default { ...@@ -324,7 +325,9 @@ export default {
tableHeight: 0, tableHeight: 0,
dataQuery:{}, dataQuery:{},
province:'', province:'',
provinceId:[] provinceId:[],
fixed: false,
StyWidth:null
} }
}, },
watch:{ watch:{
...@@ -340,10 +343,23 @@ export default { ...@@ -340,10 +343,23 @@ export default {
} }
} }
}, },
mounted(){
window.addEventListener('scroll', this.handleScroll);
const _this = this, erd = elementResizeDetectorMaker(), partBox = document.getElementById("content")
erd.listenTo(partBox, element => {
_this.$nextTick(() => {
this.StyWidth = partBox.offsetWidth + 'px';
})
})
},
destroyed () {
window.removeEventListener('scroll', this.handleScroll)
},
created() { created() {
this.dataRegion() this.dataRegion()
this.getType() this.getType()
this.dataQuery=this.$route.query; this.dataQuery=this.$route.query;
console.log(this.dataQuery)
if(this.dataQuery.provinceId){ if(this.dataQuery.provinceId){
if(Array.isArray(this.dataQuery.province)){ if(Array.isArray(this.dataQuery.province)){
this.province=this.dataQuery.province[0]; this.province=this.dataQuery.province[0];
...@@ -351,7 +367,13 @@ export default { ...@@ -351,7 +367,13 @@ export default {
this.province=this.dataQuery.province this.province=this.dataQuery.province
this.dataQuery.province = [this.dataQuery.province]; this.dataQuery.province = [this.dataQuery.province];
} }
if(Array.isArray(this.dataQuery.provinceId)){
this.provinceId=this.dataQuery.provinceId
}else {
this.provinceId.push(this.dataQuery.provinceId) this.provinceId.push(this.dataQuery.provinceId)
}
this.querySubmit()
}else { }else {
location({}).then(res => { location({}).then(res => {
this.province=res.data.province; this.province=res.data.province;
...@@ -364,21 +386,21 @@ export default { ...@@ -364,21 +386,21 @@ export default {
this.provinceId.push(this.dataQuery.provinceId) this.provinceId.push(this.dataQuery.provinceId)
} }
}) })
this.querySubmit()
} }
},
mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.querySubmit()
// window.innerHeight 浏览器窗口的可见高度,下面的 220 是除了table最大高度的剩余空间。
// let height = this.$refs.urban.offsetHeight - this.$refs.queryForm.offsetHeight;
// this.tableHeight = height;
// console.log(window.innerHeight,"|||||||||")
// console.log(this.$refs.urban.offsetHeight)
}) })
}, },
methods: { methods: {
handleScroll () {
let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
if (scrollTop > 300) {
this.fixed = true
} else {
this.fixed = false
}
},
getType(){ getType(){
uipGroupData({}).then(res => { uipGroupData({}).then(res => {
this.typeList=res.data; this.typeList=res.data;
...@@ -386,6 +408,7 @@ export default { ...@@ -386,6 +408,7 @@ export default {
}, },
// 查询提交 // 查询提交
async querySubmit() { async querySubmit() {
console.log(this.provinceId,"||||")
this.tableLoading = true this.tableLoading = true
const params = { pageNum: this.pageIndex, pageSize: this.pageSize,type:Number(this.queryParams.radio)} const params = { pageNum: this.pageIndex, pageSize: this.pageSize,type:Number(this.queryParams.radio)}
const param={} const param={}
...@@ -1001,5 +1024,10 @@ export default { ...@@ -1001,5 +1024,10 @@ export default {
} }
} }
} }
.fixed{
position: fixed;
z-index: 999;
top: 56px;
}
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment