Commit fee18a2e authored by danfuman's avatar danfuman

修改

parent 9bb12b1b
......@@ -127,6 +127,13 @@ export function regionalCompare(param) {
data: param
})
}
export function multipleCompare(param) {
return request({
url: '/economic/regional/multipleCompare',
method: 'POST',
data: param
})
}
......
......@@ -102,7 +102,7 @@
<script>
import dataRegion from '@/assets/json/dataRegion'
import { regionalCompare,getYears } from '@/api/macro/macro'
import { regionalCompare,getYears,multipleCompare } from '@/api/macro/macro'
export default {
name: 'comparison',
props:['dataQuery','provinceId'],
......@@ -287,7 +287,8 @@ export default {
value3Flag:false,
value4Flag:false,
value5Flag:false,
regionData:[]
regionData:[],
compareList:[{},{},{},{},{}]
}
},
watch: {
......@@ -302,19 +303,32 @@ export default {
this.yearOptions=res.data.reverse();
this.queryParams.year = this.yearOptions[0].year;
if(this.dataQuery.pId){
const params = { year: this.queryParams.year,type:3}
let item={}
if(this.provinceId.length >= 0){
params.provinceId=this.provinceId[0]
item.provinceId=this.provinceId[0]
}
if(this.provinceId.length >= 1){
params.cityId=this.provinceId[1]
item.cityId=this.provinceId[1]
}
if(this.provinceId.length >= 2){
params.areaId=this.provinceId[2]
item.areaId=this.provinceId[2]
}
if(this.dataQuery.id){
item.id=this.dataQuery.id
}
this.compareList.splice(0,1,item);
this.value1Flag=true
this.addressValue1=this.dataQuery.province.join('-')
this.getData(params,1)
let list=[];
for (let i=0; i<this.compareList.length; i++){
if(this.compareList[i].provinceId){
list.push(this.compareList[i])
}
}
let params={}
params.compareList=list;
this.getData(params)
}
})
},
......@@ -329,13 +343,19 @@ export default {
}
},
methods: {
getData(params,index){
if(this.dataQuery.id){
params.id=this.dataQuery.id
}
regionalCompare(params).then(res => {
getData(params){
params.year=this.queryParams.year;
multipleCompare(params).then(res => {
if(res.data){
this.tableData.splice(index-1,1,res.data)
let arr=[]
for (let i=0; i<this.compareList.length; i++){
if(this.compareList[i].provinceId){
arr.push(i)
}
}
for (let j=0; j<res.data.length; j++){
this.tableData.splice(arr[j],1,res.data[j])
}
this.$forceUpdate();
}
})
......@@ -413,21 +433,34 @@ export default {
this.value5Flag=true
break;
}
const params = { year: this.queryParams.year,type:3 }
const params = {}
let code=[];
for (var i in this.regionData) {
code=this.regionData[i].path
}
let item={}
if(code.length >= 1){
params.provinceId=code[0]
item.provinceId=code[0]
}
if(code.length >= 2){
params.cityId=code[1]
item.cityId=code[1]
}
if(code.length >= 3){
params.areaId=code[2]
item.areaId=code[2]
}
this.getData(params,index)
if(this.dataQuery.id){
item.id=this.dataQuery.id
}
this.compareList.splice(index-1,1,item);
let list=[];
for (let i=0; i<this.compareList.length; i++){
if(this.compareList[i].provinceId){
list.push(this.compareList[i])
}
}
params.compareList=list;
this.getData(params)
}
}
},
......@@ -538,12 +571,20 @@ export default {
break;
}
this.tableData.splice(index-1,1,{})
this.compareList.splice(index-1,1,{})
this.$forceUpdate();
},
handleSelect(val){
const params = { year: this.queryParams.year,type:3 }
console.log(val)
let list=[];
for (let i=0; i<this.compareList.length; i++){
if(this.compareList[i].provinceId){
list.push(this.compareList[i])
}
}
const params = {}
params.compareList=list;
this.getData(params)
},
formatStatus: function(row, column, cellValue) {
if(row.title === '经济'||row.title === '财政'||row.title === '债务'){
......
......@@ -129,6 +129,7 @@ export default {
endTime=this.queryParams.year+'-12-31';
}
bidGroupCountByProjectType({startDate:startTime,endDate:endTime}).then(res => {
if(res.code === 200){
let list=[]
for(let i=0; i<res.data.length; i++){
let item={};
......@@ -137,7 +138,10 @@ export default {
list.push(item);
}
this.data=list;
if(list.length > 0){
this.initChart()
}
}
})
},
initChart() {
......
......@@ -165,10 +165,13 @@ export default {
data.provinceId=item.provinceId;
data.cityId=item.cityId;
data.areaId=item.areaId;
if(item.area){
data.province=item.area;
if(item.cityId){
data.province=[item.province,item.city];
if(item.areaId){
data.province=[item.province,item.city,item.area];
}
}else {
data.province=item.province;
data.province=[item.province];
}
this.$parent.handleClick('first',data);
}
......
......@@ -676,6 +676,7 @@ export default {
},
childMethod() {
let data=this.dataQuery
console.log(this.dataQuery,"||||||||")
data.pId=this.dataQuery.provinceId
this.$parent.handleClick('four',data);
}
......
......@@ -66,14 +66,15 @@ export default {
// params.provinceId=this.dataQuery.provinceId
// }
if(this.dataQuery.provinceId){
this.province=this.dataQuery.province;
this.province=this.dataQuery.province[this.dataQuery.province.length-1];
this.provinceId.push(this.dataQuery.provinceId)
}else {
location({}).then(res => {
this.province=res.data.province;
if(!this.dataQuery.provinceId){
this.dataQuery.provinceId=res.data.provinceId
this.dataQuery.province=this.province;
let arr=[this.province]
this.dataQuery.province=arr;
this.provinceId.push(res.data.provinceId)
}else {
this.provinceId.push(this.dataQuery.provinceId)
......@@ -112,7 +113,8 @@ export default {
this.provinceId.push(item.areaId)
}
}
this.province=item.province;
this.province=item.province[item.province.length-1];
this.dataQuery=item;
}
// sessionStorage.setItem('currentTab', this.activeName)
},
......
......@@ -311,6 +311,13 @@ export default {
padding: 0;
}
.qyzx{
.query-ability{
span{
font-weight: 400;
color: #3D3D3D;
font-size: 12px;
}
}
.content{
background: #ffffff;
padding: 16px;
......
......@@ -325,6 +325,9 @@
.qgjjdq{
.query-box{
margin: -8px 0 8px 0;
.a-link:hover{
text-decoration:none;
}
.query-params{
.el-form{
margin-left: 24px;
......
......@@ -174,8 +174,8 @@
<el-table-column prop="biddingCount" label="招标数量" :formatter="formatStatus" sortable="custom" width="110" align="right"/>
<el-table-column prop="landInfoCount" label="城投拿地" :formatter="formatStatus" sortable="custom" width="100" align="right"/>
<el-table-column prop="supplierCount" label="供应商" :formatter="formatStatus" sortable="custom" width="100" align="right"/>
<!--<el-table-column prop="bratingSubjectLevel" label="主体评级" :formatter="formatStatus" sortable="custom" width="110" />-->
<el-table-column prop="bondBalance" label="债券余额(亿元)" :formatter="formatStatus" sortable="custom" width="140" align="right"/>
<el-table-column prop="bratingSubjectLevel" label="主体评级" :formatter="formatStatus" width="110" />
<el-table-column prop="uipExecutiveLevel" label="行政级别" :formatter="formatStatus" width="110" />
<el-table-column prop="shareholderBg" label="股东背景" :formatter="formatStatus" width="110" />
<el-table-column prop="equityRelationship" label="股权关系" :formatter="formatStatus" width="110" />
......
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